/* The Plat — Inspection Fee. A surveyor's drawing sheet, not a header-and-card site. */
@import url("https://fonts.googleapis.com/css2?family=Antonio:wght@400;500;600;700&family=Figtree:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap");

:root {
  --vellum: #f4ead0;
  --sheet: #fbf6e3;
  --leaf: #fffdf4;
  --ink: #1a3328;
  --mute: #4d6157;
  --faint: #6b7d73;
  --grid: #d5c9a8;
  --rule: #b9ad8d;
  --print: #2f6f62;
  --print-soft: #dce8e3;
  --blaze: #e25a14;
  --blaze-deep: #b8440c;
  --flag: #c43c2d;
  --tape: #efe08a;
  --hatch: #e8dcb8;
  --stamp: #9b2a1f;
  --focus: #e25a14;
  --shadow: 0 1px 0 rgba(26, 51, 40, 0.06);
  --title: "Antonio", "Saira SemiCondensed", "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", "DM Mono", "Martian Mono", ui-monospace, monospace;
  --body: "Figtree", "Segoe UI", "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body.plat {
  background:
    radial-gradient(ellipse at 20% 0%, #efe3c0 0, transparent 50%),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(47, 111, 98, 0.04) 47px, rgba(47, 111, 98, 0.04) 48px),
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(47, 111, 98, 0.04) 47px, rgba(47, 111, 98, 0.04) 48px),
    var(--vellum);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.65;
  padding: 1.1rem 1.1rem 5.5rem;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--print); text-underline-offset: 0.16em; text-decoration-thickness: 1px; }
a:hover { color: var(--blaze-deep); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.jump {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  background: var(--ink);
  color: var(--sheet);
  padding: 0.45rem 0.75rem;
  z-index: 30;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-decoration: none;
}
.jump:focus { top: 0.6rem; }

/* The drawing sheet */
.sheet {
  width: min(86rem, 100%);
  margin: 0 auto;
  background: var(--sheet);
  border: 2px solid var(--ink);
  box-shadow: 8px 10px 0 rgba(26, 51, 40, 0.08);
  position: relative;
}
.sheet::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--ink);
  pointer-events: none;
  z-index: 2;
}
.sheet-grid {
  display: grid;
  grid-template-columns: 15.5rem 1fr;
  min-height: 70vh;
  position: relative;
}

/* Key plan — a drawn house, not a typographic spine */
.keyplan {
  border-right: 1px solid var(--ink);
  background:
    repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(26, 51, 40, 0.03) 6px, rgba(26, 51, 40, 0.03) 7px),
    var(--hatch);
  padding: 1.15rem 0.7rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.keyplan .brand {
  text-decoration: none;
  color: var(--ink);
  display: grid;
  gap: 0.15rem;
  padding: 0 0.35rem;
}
.keyplan .brand strong {
  font-family: var(--title);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-transform: uppercase;
}
.keyplan .brand em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--print);
}
.keyplan h2, .pocket h2 {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0.4rem 0 0.2rem;
  color: var(--mute);
}
.plan-wrap { padding: 0.15rem; }
.plan-wrap svg { width: 100%; height: auto; display: block; }
.plan-wrap a.room {
  cursor: pointer;
}
.plan-wrap a.room rect, .plan-wrap a.room path.floor {
  fill: var(--leaf);
  stroke: var(--ink);
  stroke-width: 1.4;
  transition: fill 0.2s ease;
}
.plan-wrap a.room:hover rect,
.plan-wrap a.room:hover path.floor,
.plan-wrap a.room[aria-current="page"] rect,
.plan-wrap a.room[aria-current="page"] path.floor {
  fill: var(--tape);
}
.plan-wrap a.room[aria-current="page"] text { font-weight: 600; }
.plan-wrap text {
  font-family: var(--mono);
  font-size: 7.2px;
  fill: var(--ink);
  letter-spacing: 0.06em;
  pointer-events: none;
  text-transform: uppercase;
}
.north {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--mute);
  padding: 0 0.35rem;
}
.north svg { width: 1.4rem; height: 1.4rem; }
.scale-note {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--faint);
  padding: 0 0.35rem;
  letter-spacing: 0.04em;
}

/* Drawing field */
.fieldpane {
  background:
    linear-gradient(180deg, rgba(251, 246, 227, 0.2), rgba(251, 246, 227, 0.2)),
    repeating-linear-gradient(0deg, transparent, transparent 27px, rgba(185, 173, 141, 0.35) 27px, rgba(185, 173, 141, 0.35) 28px),
    var(--sheet);
  min-width: 0;
}
.sheethead {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.85rem 1.4rem 0.55rem;
  border-bottom: 1px dashed var(--rule);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.sheethead .rev span { color: var(--flag); }
.crumbs { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mute); }
.crumbs a { color: var(--print); text-decoration: none; border-bottom: 1px solid var(--print); }
.crumbs a:hover { color: var(--blaze-deep); border-color: var(--blaze-deep); }

#main { padding: 1.15rem 1.5rem 2.2rem; }

/* Title block — architectural bottom strip, not a marketing footer */
.titleblock {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.1fr;
  border-top: 2px solid var(--ink);
  background: var(--leaf);
  font-family: var(--mono);
  font-size: 0.7rem;
  position: relative;
  z-index: 3;
}
.titleblock > div {
  padding: 0.65rem 0.85rem;
  border-right: 1px solid var(--ink);
  min-height: 4.4rem;
}
.titleblock > div:last-child { border-right: 0; }
.titleblock .tb-k {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.25rem;
}
.titleblock .tb-v {
  font-family: var(--title);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
}
.titleblock a { color: var(--ink); text-decoration: none; }
.titleblock a:hover { color: var(--blaze-deep); }
[hidden] { display: none !important; }
.copy-line {
  width: min(86rem, 100%);
  margin: 0.55rem auto 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--mute);
}
.copy-line p { margin: 0; }
.legal-note {
  margin: 0.8rem auto 0;
  width: min(86rem, 100%);
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--mute);
}

/* Mobile pocket of rooms — tape labels, not a dark dock */
.pocket {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: none;
  background: var(--ink);
  border-top: 4px solid var(--blaze);
}
.pocket ul {
  display: flex;
  overflow-x: auto;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0.4rem 0.5rem;
  gap: 0.3rem;
  scrollbar-width: thin;
}
.pocket a {
  display: block;
  text-decoration: none;
  color: var(--tape);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(239, 224, 138, 0.35);
  padding: 0.45rem 0.55rem;
  white-space: nowrap;
  background: transparent;
}
.pocket a[aria-current="page"], .pocket a:hover {
  background: var(--tape);
  color: var(--ink);
  border-color: var(--tape);
}

/* Type */
h1, h2, h3, .room-title {
  font-family: var(--title);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0 0 0.6rem;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); max-width: 18ch; }
h2 { font-size: 1.45rem; margin-top: 1.8rem; }
h3 { font-size: 1.1rem; margin-top: 1.2rem; }
.lede {
  font-size: 1.18rem;
  max-width: 42rem;
  color: var(--ink);
  margin: 0 0 1.2rem;
}
.hint, .tiny { font-size: 0.86rem; color: var(--mute); }
.mono { font-family: var(--mono); }

/* Home: plan-first, calculator as a field clipboard over the kitchen */
.arrival {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.4rem;
  align-items: start;
}
.arrival-copy .eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blaze-deep);
  margin: 0 0 0.5rem;
}
.hero-plan { position: relative; }
.hero-plan svg { width: 100%; height: auto; }
.dim {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Clipboard calculator */
.clipform {
  background: var(--leaf);
  border: 1px solid var(--ink);
  padding: 1.15rem 1.1rem 1.25rem;
  position: relative;
  box-shadow: 4px 5px 0 rgba(26, 51, 40, 0.08);
}
.clipform::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 62px;
  height: 22px;
  background: #8a93a0;
  border: 1px solid #3d4450;
  border-radius: 0 0 8px 8px;
  box-shadow: inset 0 2px 0 #c5c9d0;
}
.form-head {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.4rem;
  margin: 0.4rem 0 0.9rem;
  display: flex;
  justify-content: space-between;
}
.form-head b { color: var(--flag); font-weight: 600; }
.itemrow {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  align-items: start;
}
.itemrow .itemno {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  padding-top: 0.35rem;
}
.itemrow label, fieldset.itemrow legend {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin: 0 0 0.25rem;
}
fieldset.itemrow {
  border: 0;
  padding: 0;
  margin: 0 0 0.75rem;
  min-width: 0;
}
input[type="text"], input[type="number"], input[type="date"], input[type="email"], select, textarea {
  width: 100%;
  font: inherit;
  font-family: var(--mono);
  font-size: 0.92rem;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 0.35rem 0.15rem;
  border-radius: 0;
}
textarea {
  border: 1px solid var(--ink);
  min-height: 7rem;
  padding: 0.5rem;
  background: repeating-linear-gradient(transparent, transparent 1.4rem, var(--grid) 1.4rem, var(--grid) calc(1.4rem + 1px));
}
.addon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem 0.8rem;
}
.choice {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  font-size: 0.92rem;
  padding: 0.15rem 0;
}
.acts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.9rem 0 0; }
.btn {
  font-family: var(--title);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  background: var(--blaze);
  color: #fffdf8;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { background: var(--blaze-deep); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { background: var(--tape); color: var(--ink); }

/* Estimate stamp */
#fee-results, .tool-out { margin-top: 1rem; }
.stampbox {
  border: 3px double var(--stamp);
  color: var(--stamp);
  padding: 0.9rem 1rem 1rem;
  background:
    repeating-linear-gradient(135deg, transparent, transparent 8px, rgba(155, 42, 31, 0.04) 8px, rgba(155, 42, 31, 0.04) 9px),
    var(--leaf);
}
.stampbox h2 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  color: var(--stamp);
}
.fee-band, .stampbox .range, p.range {
  font-family: var(--title);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.02em;
  line-height: 0.95;
  margin: 0.35rem 0 0.5rem;
  color: var(--stamp);
  text-transform: uppercase;
}
table.schedule, table.breakdown, table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
table.schedule th, table.schedule td,
table.breakdown th, table.breakdown td,
table.data th, table.data td {
  border-bottom: 1px solid var(--grid);
  text-align: left;
  padding: 0.45rem 0.35rem;
  vertical-align: top;
}
table.schedule th, table.breakdown th, table.data th {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.assume-list, .assumptions, .notes { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.assume-list li, .assumptions li, .notes li { margin: 0 0 0.3rem; }

/* Guides: specification clauses, revision gutter — not a blog column of cards */
.spec {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0 1.1rem;
}
.spec .gutter {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--flag);
  padding-top: 0.2rem;
  border-right: 1px solid var(--rule);
  padding-right: 0.6rem;
}
.spec .gutter time, .spec .gutter span { display: block; color: var(--faint); margin-top: 0.35rem; }
.spec-body { max-width: 44rem; }
.clause {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.7rem;
  margin: 0 0 1.15rem;
}
.clause .num {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--print);
  letter-spacing: 0.04em;
  padding-top: 0.15rem;
}
.clause h2 { margin-top: 0; font-size: 1.25rem; }
.notecloud {
  border: 1.5px dashed var(--flag);
  border-radius: 1.4rem 0.4rem 1.5rem 0.6rem / 0.7rem 1.4rem 0.5rem 1.2rem;
  padding: 0.7rem 0.9rem;
  margin: 1rem 0;
  background: rgba(196, 60, 45, 0.04);
}
.notecloud strong {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
  color: var(--flag);
}
.keep-reading {
  margin-top: 2rem;
  border-top: 1px solid var(--ink);
  padding-top: 0.8rem;
}
.keep-reading h2 { margin-top: 0; }
.keep-reading ol {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  gap: 1.2rem;
}
.keep-reading li {
  font-family: var(--mono);
  font-size: 0.82rem;
  margin: 0 0 0.4rem;
  break-inside: avoid;
}

/* Tools: engineer's field book */
.fieldbook {
  background: #edf2e4;
  border: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  box-shadow: 4px 5px 0 rgba(26, 51, 40, 0.08);
}
.fieldbook .margin {
  background: linear-gradient(90deg, transparent 60%, #e07a72 60%, #e07a72 66%, transparent 66%);
  border-right: 0;
}
.fieldbook .pad {
  padding: 1rem 1.1rem 1.3rem;
  background:
    repeating-linear-gradient(transparent, transparent 1.55rem, #c9d4b8 1.55rem, #c9d4b8 calc(1.55rem + 1px)),
    #edf2e4;
}
.checklist label {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.28rem 0;
  border-bottom: 1px dotted #c9d4b8;
}
.output-box {
  white-space: pre-wrap;
  background: var(--leaf);
  border: 1px dashed var(--ink);
  padding: 0.8rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  margin-top: 0.7rem;
}

/* Tools index: a door schedule, not a card grid */
.door-sched { width: 100%; }
.door-sched caption {
  text-align: left;
  font-family: var(--title);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
.door-sched td mark {
  background: var(--tape);
  color: inherit;
  padding: 0 0.2rem;
}

/* Guides index: room schedule */
.room-sched { width: 100%; }
.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 0.05rem 0.3rem;
  display: inline-block;
}
.tag.safety { background: #f3d0c8; }
.tag.water { background: #d5e4f0; }
.tag.structure { background: #e8dcb8; }
.tag.mechanical { background: #dce8e3; }
.tag.cosmetic { background: #efe8d4; }

/* Office / legal pages: expanded project data */
.datasheet {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.35rem 1rem;
  max-width: 46rem;
}
.datasheet dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  padding-top: 0.35rem;
  border-top: 1px solid var(--grid);
}
.datasheet dd {
  margin: 0;
  padding-top: 0.25rem;
  border-top: 1px solid var(--grid);
}
.prose { max-width: 44rem; }
.prose p { margin: 0 0 0.9rem; }

/* Sitemap as a labeled plat */
.platmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--ink);
}
.platmap section {
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 0.9rem 1rem 1.1rem;
  min-height: 12rem;
  background: var(--leaf);
}
.platmap section:nth-child(3n) { border-right: 0; }
.platmap h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.platmap ul { list-style: none; margin: 0; padding: 0; }
.platmap li { font-family: var(--mono); font-size: 0.8rem; margin: 0 0 0.35rem; }

/* FAQ as revision bubbles, not generic accordion chrome */
.faq details {
  border-top: 1px solid var(--rule);
  padding: 0.55rem 0;
}
.faq summary {
  font-family: var(--title);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  font-size: 1.05rem;
}
.faq details p { margin: 0.45rem 0 0.2rem; max-width: 42rem; }

/* 404 */
.lost {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: 1.5rem;
  align-items: center;
}
.lost svg { width: 100%; height: auto; }

/* Utility bands */
.band {
  margin: 1.4rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
}

@media (max-width: 960px) {
  body.plat { padding: 0.4rem 0.4rem 5.2rem; }
  .sheet-grid { grid-template-columns: 1fr; }
  .keyplan { display: none; }
  .pocket { display: block; }
  .sheet::before { inset: 4px; }
  .arrival, .spec, .lost, .fieldbook { grid-template-columns: 1fr; }
  .spec .gutter { display: none; }
  .titleblock { grid-template-columns: 1fr; }
  .platmap { grid-template-columns: 1fr; }
  .platmap section { border-right: 0; }
  .keep-reading ol { columns: 1; }
  .addon-grid { grid-template-columns: 1fr; }
  h1 { max-width: none; }
  #main { padding: 1rem 0.9rem 1.6rem; }
}

@media print {
  body.plat { background: #fff; padding: 0; }
  .keyplan, .pocket, .jump, .acts, .legal-note { display: none !important; }
  .sheet { border: 0; box-shadow: none; width: 100%; }
  .sheet::before { display: none; }
  .sheet-grid { grid-template-columns: 1fr; }
  a { color: inherit; text-decoration: none; }
}
