:root {
  --paper: #f7f7f5;
  --ink: #171717;
  --soft-ink: #3d3d3d;
  --muted: #737373;
  --line: #d5d5d2;
  --line-strong: #9f9f9a;
  --accent: #d85a30;
  --serif: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
}

a {
  color: inherit;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 4px;
}

.site-shell {
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 0.5px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--serif);
  font-size: 22px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: 48px;
  align-items: end;
  min-height: 320px;
  padding: 54px 0 34px;
  border-bottom: 0.5px solid var(--line);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 86px);
  font-weight: 400;
  line-height: 0.98;
}

.hero p {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--soft-ink);
  font-size: 17px;
  line-height: 1.8;
}

.section-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
}

.drawing-slot {
  min-height: 220px;
}

.building-drawing {
  width: 100%;
  height: auto;
  overflow: visible;
}

.building-drawing path {
  fill: none;
  stroke: var(--ink);
  stroke-width: var(--w, 1.05);
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: var(--o, 0.92);
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw-line 1.55s ease forwards;
}

.building-drawing path:nth-child(2n) {
  animation-delay: 0.08s;
}

.building-drawing path:nth-child(3n) {
  animation-delay: 0.16s;
}

@keyframes draw-line {
  to {
    stroke-dashoffset: 0;
  }
}

.action-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}

.button.primary,
button.primary {
  border-color: var(--ink);
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  padding-top: 44px;
}

.line-panel {
  padding-top: 22px;
  border-top: 0.5px solid var(--line);
}

.line-panel h2,
.report-section h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
}

.line-panel p {
  color: var(--soft-ink);
  line-height: 1.7;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: 46px;
  padding-top: 42px;
}

form {
  border-top: 0.5px solid var(--line-strong);
}

.field {
  display: grid;
  gap: 8px;
  padding: 18px 0;
  border-bottom: 0.5px solid var(--line);
}

label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  border: 0;
  border-bottom: 0.5px solid var(--line-strong);
  padding: 10px 0;
  background: transparent;
  color: var(--ink);
  font: 16px/1.5 var(--sans);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus,
.button:focus {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.form-actions {
  padding-top: 22px;
}

.status-box {
  min-height: 160px;
  padding: 18px 0 0;
  border-top: 0.5px solid var(--line-strong);
  white-space: pre-wrap;
  color: var(--soft-ink);
  font: 13px/1.75 var(--mono);
}

.status-box[data-mode="ok"] {
  border-top-color: var(--ink);
}

.status-box[data-mode="error"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 4px;
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 0.5px solid var(--line-strong);
  border-bottom: 0.5px solid var(--line);
  margin: 34px 0 18px;
}

.score-metric {
  min-height: 130px;
  padding: 18px 20px;
  border-left: 0.5px solid var(--line);
}

.score-metric:first-child {
  border-left: 0;
}

.score-metric.accent {
  border-left: 0;
}

.score-label {
  display: block;
  margin-bottom: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.score-metric strong {
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 400;
  line-height: 1;
}

.score-metric.accent strong {
  color: var(--accent);
}

.score-figure {
  display: block;
  width: min(230px, 100%);
  height: 84px;
  color: var(--ink);
}

.score-figure.accent {
  color: var(--accent);
}

.score-figure text {
  font-family: var(--serif);
  font-size: 76px;
  font-weight: 400;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 0.85;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: draw-score 1.35s ease forwards, fill-score 0.01s linear 1.05s forwards;
}

.score-unit {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

@keyframes draw-score {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fill-score {
  to {
    fill: currentColor;
  }
}

.report-section {
  padding: 28px 0;
  border-bottom: 0.5px solid var(--line);
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
}

.review-copy,
.suggestions {
  color: var(--soft-ink);
  font-size: 17px;
  line-height: 1.85;
}

.suggestions {
  margin: 0;
  padding-left: 22px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 0.5px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
}

.empty-line {
  color: var(--muted);
  font-family: var(--mono);
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100vw - 28px, 1120px);
    padding-top: 18px;
  }

  .hero,
  .form-layout,
  .work-grid,
  .two-column,
  .score-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 22px;
    padding-top: 38px;
  }

  .score-metric,
  .score-metric:first-child {
    border-left: 0.5px solid var(--line-strong);
    border-top: 0.5px solid var(--line);
  }
}
