/* Shared styles for the signed-in pages (/app/ Quick, /app/detailed/ Detailed, /app/im/, /app/history/).
   Light theme (Tim, 17 Oct 2026) — the same black / white / gold as the public pages (/site.css). The variable names
   are the dark theme's, kept so the pages' own styles keep working: --space is the page, --white the main text. */
  :root {
    --space: #FFFFFF;
    --panel: #FFFFFF;
    --white: #000000;        /* main text */
    --soft: #5F5D58;         /* secondary text */
    --dim: #7A7873;          /* labels, hints */
    --gold: #A88528;         /* lines, accents */
    --gold-light: #866718;   /* gold text on white */
    --gold-bright: #D4AF37;
    --line: #E3E2DE;
    --line-strong: #C9C7C1;
    --good: #2E7D4F;
    --bad: #B42318;
    --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  }
  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body {
    margin: 0; background: var(--space); color: var(--white);
    font-family: "Instrument Sans", system-ui, sans-serif; font-size: 1rem; line-height: 1.55; font-variant-numeric: lining-nums;
  }
  a { color: var(--white); text-decoration-color: var(--gold); text-underline-offset: 3px; }
  .wrap { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
  @media (min-width: 40rem) { .wrap { padding: 0 2rem; } }

  /* top bar — signed-in: the logo goes to the home page, tabs for the feasibilities, account links on the right */
  .bar { border-bottom: 1px solid var(--line); background: #fff; }
  .bar .wrap { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand acct" "tabs tabs";
               align-items: center; column-gap: 1.5rem; }
  .brand { grid-area: brand; display: flex; align-items: center; height: 3.75rem; justify-self: start; line-height: 0; }
  .brand img { width: 8.5rem; height: auto; }
  .acct { grid-area: acct; display: flex; justify-content: flex-end; align-items: center; gap: 1.1rem; font-size: 0.875rem; min-width: 0; }
  /* My Reports set apart by a rule either side; Log out on its own at the far right (Tim, 20 Oct 2026) */
  .acct .mine { padding: 0 1.1rem; border-left: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong);
                line-height: 1.6; }
  .acct .mine[aria-current="page"] { color: var(--white); }
  .acct a { color: var(--soft); text-decoration: none; white-space: nowrap; }
  .acct a:hover, .acct a:focus-visible { color: var(--white); }
  .tabs { grid-area: tabs; display: flex; gap: 0; margin: 0 -1rem; }
  .tabs a { flex: 1; text-align: center; padding: 0.8rem 0.5rem 0.75rem; color: var(--soft); text-decoration: none;
            font-size: 0.9375rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
  .tabs a:hover, .tabs a:focus-visible { color: var(--white); outline: none; }
  .tabs a[aria-current="page"] { color: var(--white); border-bottom-color: var(--gold); }
  /* three tabs (the IM — Property Introduction Report since 11 Nov 2026 — added 16 Oct 2026): short labels on phones */
  .tabs .sm { display: none; }
  @media (max-width: 45.99rem) { .tabs .lg { display: none; } .tabs .sm { display: inline; } }
  @media (min-width: 46rem) {
    /* logo · the four tabs · … · | My Reports | Log out at the far right (Tim, 20 Oct 2026) */
    .bar .wrap { grid-template-columns: auto auto 1fr; grid-template-areas: "brand tabs acct"; height: 4.5rem; column-gap: 1.75rem; }
    .brand { height: auto; }
    .brand img { width: 9.5rem; }
    .tabs { margin: 0; align-self: stretch; gap: 0.25rem; justify-content: flex-start; }
    .acct { justify-content: flex-end; }       /* | My Reports | Log out, together at the far right (Tim, 20 Oct 2026) */
    .bar .wrap { max-width: 92rem; }             /* the header runs wider than the page so the tabs have room */
    .tabs a { flex: none; padding: 0 1rem; display: flex; align-items: center; }
  }
  /* tablets and small laptops: the short tab names (Quick · Detailed · IM · Reno · Buyers) so nothing runs off the edge
     (the fifth tab, Home Buyers, 30 Oct 2026, moved the long names out from 75rem to 84rem) */
  @media (min-width: 46rem) and (max-width: 83.99rem) {
    .tabs .lg { display: none; } .tabs .sm { display: inline; }
    .tabs a { padding: 0 0.8rem; }
  }

  h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.1rem, 5vw, 3.1rem);
       line-height: 1.05; margin: 2.75rem 0 0.9rem; letter-spacing: -0.01em; }
  .sub { color: var(--soft); margin: 0 0 2rem; max-width: 38rem; }
  /* when the header doesn't fit (web/app/plan.js fitHeader): .short swaps in the short tab names, .stack also puts the
     tabs on a row of their own under the logo and the account links */
  .bar.short .tabs .lg { display: none; }
  .bar.short .tabs .sm { display: inline; }
  @media (min-width: 46rem) {
    .bar.stack .wrap { grid-template-columns: auto 1fr; grid-template-areas: "brand acct" "tabs tabs"; height: auto; }
    .bar.stack .brand { height: 3.75rem; }
    .bar.stack .tabs { align-self: auto; }
    .bar.stack .tabs a { padding: 0.8rem 0.8rem 0.75rem; }
  }

  /* tabs with no intro line (Detailed, IM, Renovation): same gap under the heading as the intro gave */
  h1:has(+ .step) { margin-bottom: 2rem; }

  /* steps */
  .step { border: 1px solid var(--line-strong); background: var(--panel); margin: 0 0 1.25rem; }
  .step > header { display: flex; align-items: baseline; gap: 0.75rem; padding: 1.1rem 1.25rem 0; }
  .step > header .n { font-family: var(--serif); font-weight: 600; color: var(--gold); font-size: 1.25rem; }
  .step > header h2 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; margin: 0; }
  .step .body { padding: 1rem 1.25rem 1.25rem; }
  .step[hidden] { display: none; }
  .tabs a[hidden] { display: none; }   /* the Renovator plan sees the Renovation tab only (web/app/plan.js) */

  label { display: block; font-size: 0.8125rem; color: var(--soft); margin: 0 0 0.35rem; }
  input, select {
    width: 100%; font: inherit; color: var(--white); background: #fff; border: 1px solid var(--line-strong);
    border-radius: 0; padding: 0.7rem 0.8rem; min-height: 2.9rem;
  }
  input::placeholder { color: #A3A19B; }
  input:focus, select:focus { outline: none; border-color: var(--white); box-shadow: 0 0 0 3px rgba(168,133,40,0.22); }
  .row { display: grid; gap: 0.75rem; }
  @media (min-width: 40rem) { .row.addr { grid-template-columns: 1fr auto; align-items: end; } }

  button {
    font: inherit; font-weight: 600; cursor: pointer; border-radius: 0; min-height: 2.9rem; padding: 0.7rem 1.3rem;
    border: 1.5px solid #000; background: #000; color: #fff; letter-spacing: 0.02em;
  }
  button:hover { background: #fff; color: #000; }
  button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
  button.ghost { background: transparent; color: var(--white); border-color: var(--line-strong); font-weight: 500; }
  button.ghost:hover { border-color: #000; }
  button:disabled { opacity: 0.55; cursor: progress; }
  .hint { font-size: 0.8125rem; color: var(--dim); margin: 0.6rem 0 0; }

  .status { margin: 0.9rem 0 0; font-size: 0.9375rem; color: var(--soft); display: flex; gap: 0.6rem; align-items: center; }
  .status.err { color: var(--bad); }
  /* a question left blank on Run: its wording in red, with what's needed */
  .q.missing > .p .t { color: var(--bad); }
  .q.missing > .p .t::after { content: " — needs to be answered"; font-size: 0.875rem; }
  .spin { width: 14px; height: 14px; border: 2px solid var(--line-strong); border-top-color: var(--gold);
          border-radius: 50%; animation: spin 0.9s linear infinite; flex: none; }
  @keyframes spin { to { transform: rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

  /* site profile */
  .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.25rem 1.5rem; margin: 0; }
  .facts div { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
  .facts dt { font-size: 0.75rem; color: var(--dim); }
  .facts dd { margin: 0.1rem 0 0; }
  .chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1rem 0 0; padding: 0; list-style: none; }
  .chips li { border: 1px solid var(--line-strong); padding: 0.25rem 0.7rem; font-size: 0.8125rem; color: var(--soft); }
  .chips li b { color: var(--white); font-weight: 500; }
  .chips li.flag { border-color: var(--gold); }
  .note { margin: 1rem 0 0; padding: 0.75rem 0.9rem; border-left: 2px solid var(--gold); background: #FBF8EF;
          font-size: 0.9375rem; color: var(--soft); }
  .muted-list { margin: 0.9rem 0 0; padding-left: 1.1rem; color: var(--dim); font-size: 0.875rem; }
  h3 { font-size: 0.8125rem; color: var(--soft); font-weight: 600; margin: 1.4rem 0 0.4rem; }

  /* options */
  .opts { display: grid; gap: 1rem; }
  @media (min-width: 52rem) { .opts { grid-template-columns: 1fr 1fr; } }
  .opt { border: 1px solid var(--line-strong); padding: 1rem; }
  .opt h4 { margin: 0 0 0.2rem; font-family: var(--serif); font-weight: 600; font-size: 1.35rem; }
  .opt .why { font-size: 0.8125rem; color: var(--dim); margin: 0 0 0.8rem; }
  .opt .why.warn { color: var(--bad); }
  .opt .fields { display: grid; gap: 0.7rem; grid-template-columns: 1fr 1fr; }
  .opt .fields .wide { grid-column: 1 / -1; }
  .check { display: flex; gap: 0.5rem; align-items: center; font-size: 0.875rem; color: var(--soft); grid-column: 1 / -1; }
  .check input { width: auto; min-height: 0; accent-color: #000; }

  /* comps */
  details.comps { margin: 1.25rem 0 0; border-top: 1px solid var(--line); padding-top: 1rem; }
  details.comps summary { cursor: pointer; color: var(--soft); font-size: 0.9375rem; }
  .comp-row { display: grid; gap: 0.5rem; grid-template-columns: 1fr; margin: 0.6rem 0 0; }
  @media (min-width: 46rem) { .comp-row { grid-template-columns: 1.4fr 1.2fr 0.8fr 0.7fr auto; align-items: end; } }
  .comp-row button { min-height: 2.9rem; padding: 0.5rem 0.8rem; }
  .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0 0; align-items: center; }

  /* results: the verdict band is black, as on the one-page report */
  .verdict { display: grid; gap: 0.25rem; padding: 1.1rem 1.2rem; background: #000; color: #fff; }
  .verdict .h { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; line-height: 1.1; color: var(--gold-bright); }
  .verdict.no .h { color: #FF6B5E; }
  .verdict .use { color: rgba(255,255,255,0.72); }
  .verdict ol.hurdles { margin: 0.2rem 0 0.2rem 1.2rem; padding: 0; font-weight: 600; color: #FF6B5E; }
  .verdict ul.why { margin: 0.2rem 0 0.2rem 1.2rem; padding: 0; }
  .next { margin-top: 0.75rem; padding: 0.7rem 1rem; border-left: 3px solid var(--gold); background: var(--panel); line-height: 1.5; }
  .next .l { display: block; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-light); font-weight: 700; margin-bottom: 0.2rem; }
  .verdict ul.why li { margin: 0.1rem 0; }
  .verdict .use.flag { color: #FF6B5E; font-weight: 600; }
  .tiles { display: grid; gap: 0.9rem; margin: 1rem 0 0; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
  .tile.target { border: 1.5px solid var(--gold); background: rgba(168,133,40,0.06); }   /* the 15% GRV target (Tim, 26 Oct 2026) */
  .tile { border: 1px solid var(--line-strong); padding: 1rem; }
  .tile .k { font-size: 0.75rem; color: var(--dim); }
  .tile .v { font-family: var(--serif); font-weight: 600; font-size: 2.1rem; line-height: 1.1; color: var(--gold); margin: 0.2rem 0 0; font-variant-numeric: lining-nums tabular-nums; }
  .tile .s { color: var(--soft); font-size: 0.875rem; }
  table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; margin: 0.4rem 0 0; }
  th, td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
  th { font-size: 0.75rem; color: var(--dim); font-weight: 600; }
  td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  /* the Quick result is the report only (Tim, 11 Nov 2026): its toolbar sits above it — PDF, then the next moves (no Print button since 16 Nov 2026) */
  .report-tools { margin: 0; }
  .report-tools a.button { text-decoration: none; }
  .result-only .report { margin-top: 1rem; }
  .report { margin: 1rem 0 0; border: 1px solid var(--line-strong); overflow: hidden; background: #fff; box-shadow: 0 30px 60px -40px rgba(0,0,0,0.4); }
  .report iframe { display: block; width: 794px; height: 1123px; border: 0; background: #fff; transform-origin: 0 0; }
  footer { color: var(--dim); font-size: 0.8125rem; padding: 2rem 0 3rem; }
  footer a { color: var(--gold-light); text-underline-offset: 2px; }
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  a.button { display: inline-flex; align-items: center; font-weight: 600; border-radius: 0; min-height: 2.9rem; padding: 0.7rem 1.3rem;
             border: 1.5px solid #000; background: #000; color: #fff; text-decoration: none; letter-spacing: 0.02em; }
  a.button:hover { background: #fff; color: #000; }
  a.button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Property introduction report tab (was the IM) — coming soon (Tim, 16 Oct 2026) */
.soon-page { min-height: 55vh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 3rem 0 4rem; }
.soon-page .tag { display: inline-block; padding: 0.2rem 0.8rem; border: 1px solid var(--gold); color: var(--gold-light);
                  font-size: 0.8125rem; margin: 0 0 1.25rem; }
.soon-page h1 { margin: 0 0 0.75rem; }
.soon-page p { color: var(--soft); max-width: 32rem; margin: 0; }

/* Quick: market value as it stands (Tim, 16 Oct 2026) */
.mv { max-width: 22rem; margin: 0 0 1.25rem; }

/* outline link-button (My Reports: Run again) */
a.button.ghost { background: transparent; color: var(--white); border: 1.5px solid var(--line-strong); font-weight: 500; }
a.button.ghost:hover { border-color: #000; }
.run .acts a.button { min-height: 2.4rem; padding: 0.45rem 0.9rem; font-size: 0.875rem; text-decoration: none; }
.acct a[aria-current="page"] { color: var(--white); }

/* ---------------------------------------------------------------- Quick: the site view (Tim, 17 Oct 2026)
   The map fills the screen under the header with the search on it; the sidebar holds what the lookup found and the
   run button. Phones: the map on top (60% of the screen), the sidebar below it. */
.workspace { display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--line); }
@media (min-width: 60rem) { .workspace { grid-template-columns: 26rem minmax(0, 1fr); height: calc(100vh - 4.5rem); min-height: 36rem; }
  .workspace .ws-side { order: -1; border-left: 0; border-right: 1px solid var(--line); } }  /* site info left, map right (Tim, 21 Oct 2026) */
.ws-map { position: relative; min-height: 60vh; background: #E9E8E4; }
@media (min-width: 60rem) { .ws-map { min-height: 0; } }
#map { position: absolute; inset: 0; z-index: 0; }
.ws-search { position: absolute; z-index: 500; top: 0.9rem; left: 0.9rem; right: 0.9rem; display: flex; max-width: 34rem;
             box-shadow: 0 10px 30px -12px rgba(0,0,0,0.45); }
.ws-search input { flex: 1; min-width: 0; border-color: #000; border-right: 0; min-height: 3rem; font-size: 1rem; }
.ws-search button { min-height: 3rem; }
.map-hint { position: absolute; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(0,0,0,0.45); color: #fff; font-weight: 600; font-size: 1.05rem; text-align: center; pointer-events: none;
  opacity: 0; transition: opacity 0.25s; }   /* the map leaves the page scroll alone (Tim, 11 Nov 2026) */
.map-hint.on { opacity: 1; }
.ws-base { position: absolute; z-index: 500; top: 4.6rem; left: 0.9rem; display: flex; background: #fff; border: 1px solid #000;
           box-shadow: 0 10px 30px -12px rgba(0,0,0,0.45); }
@media (min-width: 40rem) { .ws-base { top: 0.9rem; left: auto; right: 0.9rem; } }
.ws-base button { min-height: 2.4rem; padding: 0.35rem 0.85rem; border: 0; background: #fff; color: #000; font-weight: 500; font-size: 0.875rem; }
.ws-base button[aria-pressed="true"] { background: #000; color: #fff; }
.ws-base button:hover { background: #F3F3F1; color: #000; }
.ws-base button[aria-pressed="true"]:hover { background: #000; color: #fff; }
.leaflet-container { font-family: "Instrument Sans", system-ui, sans-serif; background: #E9E8E4; }
.leaflet-tooltip { border-radius: 0; border-color: #000; font-size: 0.8125rem; box-shadow: none; }

.ws-side { background: #fff; border-left: 1px solid var(--line); padding: 1.4rem 1.25rem 0; position: relative; }
@media (min-width: 60rem) { .ws-side { overflow-y: auto; } }
.ws-side h1 { margin-top: 0.4rem; font-size: clamp(2rem, 3vw, 2.6rem); }
.ws-side .sub { font-size: 0.9375rem; }
.ws-side .status { margin: 0.4rem 0 1rem; }

.sv-addr { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.6rem; line-height: 1.15; color: var(--white); }
.sv-where { margin: 0.25rem 0 1rem; font-size: 0.875rem; color: var(--soft); }
.sv-facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.sv-facts div { padding: 0.6rem 0.6rem 0.6rem 0; border-bottom: 1px solid var(--line); }
.sv-facts div:nth-child(even) { padding-left: 0.75rem; border-left: 1px solid var(--line); }
.sv-facts dt { font-size: 0.75rem; color: var(--dim); }
.sv-facts dd { margin: 0.1rem 0 0; font-size: 0.9375rem; line-height: 1.35; }
.sv-sec { padding: 1rem 0 0.25rem; }
.sv-sec h3 { margin: 0 0 0.5rem; font-size: 0.8125rem; font-weight: 600; color: var(--white); }
.sv-line { margin: 0; font-size: 0.9375rem; }
.sv-line.bad { color: var(--bad); font-weight: 600; }
.sv-flag { margin: 0.35rem 0 0; font-size: 0.875rem; font-weight: 600; color: var(--bad); }
.sv-none { margin: 0; font-size: 0.875rem; color: var(--dim); }
.sv-slope { display: flex; height: 0.6rem; margin-top: 0.6rem; border: 1px solid var(--line-strong); }
.sv-key { margin: 0.3rem 0 0; font-size: 0.75rem; color: var(--dim); }
.sv-ov { display: grid; grid-template-columns: 1.1rem 0.9rem 1fr; gap: 0.5rem; align-items: start; padding: 0.4rem 0;
         border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.sv-ov:last-child { border-bottom: 0; }
.sv-ov input { width: 1rem; height: 1rem; min-height: 0; margin: 0.2rem 0 0; accent-color: #000; }
.sv-ov label { margin: 0; color: var(--soft); font-size: 0.9375rem; cursor: pointer; }
.sv-ov label b { color: var(--white); font-weight: 500; }
.sv-ov.flag label b { color: var(--bad); }
.sv-cbx { width: 1rem; }
.sv-sw { width: 0.9rem; height: 0.9rem; margin-top: 0.2rem; border: 1px solid rgba(0,0,0,0.35); }
.sv-sw.eas { background: repeating-linear-gradient(45deg, #111 0 2px, transparent 2px 5px); }
.sv-list { list-style: none; margin: 0; padding: 0; font-size: 0.875rem; color: var(--soft); }
.sv-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.sv-list li:last-child { border-bottom: 0; }
.sv-list b { color: var(--white); font-weight: 500; }
.sv-mhead { margin: 0.7rem 0 0.15rem; font-size: 0.875rem; }   /* Market panel: a type, its median, its count */
.sv-notes { margin: 1rem 0 0; font-size: 0.875rem; }
.sv-notes summary { cursor: pointer; color: var(--soft); }
.sv-notes .note { font-size: 0.875rem; }
.sv-extra { display: grid; gap: 0.6rem; }
/* the run button sits at the foot of the sidebar and stays in reach while scrolling */
.sv-run { position: sticky; bottom: 0; margin: 1.25rem -1.25rem 0; padding: 0.9rem 1.25rem 1.1rem; background: #fff;
          border-top: 1px solid var(--line); }
.sv-run button { width: 100%; min-height: 3.2rem; font-size: 1rem; }

/* the Quick page runs edge to edge, so its header does too */
.wide .bar .wrap { max-width: none; }
.sv-ov label .sv-load { display: block; font-size: 0.75rem; color: var(--dim); }
.sv-ov label .sv-load:empty { display: none; }
.sv-more { margin-top: 0.4rem; }
.sv-more summary { cursor: pointer; font-size: 0.875rem; color: var(--soft); padding: 0.35rem 0; }
.sv-more .sv-ov label b { color: var(--soft); }

/* address suggestions under the search box (17 Oct 2026) */
.ws-search { flex-wrap: wrap; }
.suggest-host { position: relative; }                 /* Detailed, Renovation, IM address boxes (20 Oct 2026) */
.suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 600; list-style: none; margin: 0; padding: 0;
           background: #fff; border: 1px solid #000; border-top: 0; box-shadow: 0 16px 30px -14px rgba(0,0,0,0.45); }
.suggest li { padding: 0.65rem 0.8rem; font-size: 0.9375rem; cursor: pointer; border-top: 1px solid var(--line); }
.suggest li:first-child { border-top: 0; }
.suggest li:hover, .suggest li[aria-selected="true"] { background: #F3F3F1; }

/* "Something wrong? Flag it for the developers" (dry-run item 7, 20 Oct 2026) — under every result and every error */
.fb-mail { margin: 1.25rem 0 0; color: var(--soft); font-size: 0.9375rem; }
.fb-mail::before { content: "✉ "; color: var(--gold); }
.fb { margin-top: 1.5rem; padding: 1rem 1.1rem; border: 1px dashed var(--gold); background: #FBF8F0; }
.fb-intro .fb-h { margin: 0; font-weight: 600; }
.fb-intro .fb-why { margin: 0.3rem 0 0.8rem; color: var(--soft); font-size: 0.9375rem; max-width: 46rem; }
.fb-form { display: grid; gap: 0.45rem; max-width: 40rem; }
.fb-form label { font-size: 0.875rem; color: var(--soft); margin-top: 0.3rem; }
.fb-form select, .fb-form textarea { width: 100%; font: inherit; padding: 0.55rem 0.65rem; border: 1px solid var(--line-strong);
                                     background: #fff; color: var(--white); }
.fb-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.3rem; }
.fb-msg { margin: 0; font-size: 0.875rem; color: var(--soft); min-height: 1.2em; }
.fb-done { margin: 0; color: var(--good); font-weight: 500; }
.fb-link { background: none; border: 0; padding: 0; margin: 0.35rem 0 0; color: var(--bad); text-decoration: underline;
           text-underline-offset: 3px; cursor: pointer; font: inherit; font-size: 0.875rem; min-height: 0; }
.sv-ask { display: block; color: var(--gold); }                 /* site view: ask for a missing council's rules */

/* contours, layer data labels and the measure tool on the site view (21 Oct 2026) */
.sv-sw.ctr { background: repeating-linear-gradient(0deg, #8B5E34 0 1.5px, transparent 1.5px 4px); }
.sv-dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-right: 0.3rem; border: 1px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.25); }
.sv-dot.hi-pt { background: #DC2626; } .sv-dot.lo-pt { background: #2563EB; margin-left: 0.2rem; }
.sv-retry { margin-top: 0.5rem; min-height: 2.2rem; padding: 0.3rem 0.8rem; font-size: 0.875rem; }
.leaflet-div-icon.sv-rl, .leaflet-div-icon.sv-dim { background: none; border: 0; overflow: visible; pointer-events: none; }
.sv-rl span, .sv-dim span { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap;
  font-size: 11px; font-weight: 600; line-height: 1.3; }
.sv-rl span { color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; }
.workspace:not(.on-aerial) .sv-rl span { color: #5A3A1E; text-shadow: 0 0 3px #fff, 0 0 2px #fff; }
.sv-dim span { color: #fff; font-size: 11.5px; text-shadow: 0 0 3px #000, 0 0 2px #000, 0 0 1px #000; }
.workspace:not(.on-aerial) .sv-dim span { color: #111; text-shadow: 0 0 3px #fff, 0 0 2px #fff; }
.sv-far .sv-rl { display: none; }
.leaflet-tooltip.sv-spot { font-size: 11px; font-weight: 600; padding: 1px 5px; }
.sv-measuring { cursor: crosshair !important; }
.sv-measuring .leaflet-interactive { cursor: crosshair !important; }

/* contour key (21 Oct 2026, v2): one fact a row, its marker beside it */
.sv-ckey { margin: 0.35rem 0 0 1.6rem; padding: 0.15rem 0 0; border-top: 1px solid var(--line); font-size: 0.8125rem; }
.sv-ckey[hidden] { display: none; }
.sv-ckey div { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.3rem 0; border-bottom: 1px solid var(--line); }
.sv-ckey div:last-child { border-bottom: 0; }
.sv-ckey dt { color: var(--soft); display: flex; align-items: center; white-space: nowrap; }
.sv-ckey dd { margin: 0; color: var(--white); font-weight: 500; text-align: right; }
.sv-dot.none { background: transparent; box-shadow: none; border-color: transparent; }
.sv-line-sw { display: inline-block; width: 0.9rem; height: 0; margin-right: 0.3rem; border-top: 2px solid #8B5E34; }
.sv-line-sw.dot { border-top: 2px dotted #8B5E34; }

/* map toolbar (21 Oct 2026, v3): one vertical strip of icons at the right edge, each named on hover / focus */
.sv-tools { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0.3rem 0; background: #fff;
  border: 1px solid #000; border-radius: 999px; box-shadow: 0 8px 20px -12px rgba(0,0,0,0.55); }
.sv-tool { position: relative; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; min-height: 0; padding: 0; margin: 0.05rem 0;
  border: 0; border-radius: 50%; background: transparent; color: #000; cursor: pointer; }
.sv-tool svg { width: 1.25rem; height: 1.25rem; }
.sv-tool:hover { background: #F0EFEC; }
.sv-tool[aria-pressed="true"] { background: #000; color: #fff; }
.sv-tool[aria-pressed="true"] svg circle[fill="#fff"] { fill: #000; }
.sv-tool::after { content: attr(data-tip); position: absolute; right: calc(100% + 0.6rem); top: 50%; transform: translateY(-50%);
  padding: 0.3rem 0.55rem; background: #000; color: #fff; font: 500 0.75rem/1.2 "Instrument Sans", system-ui, sans-serif;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.12s; }
.sv-tool:hover::after, .sv-tool:focus-visible::after { opacity: 1; }
.sv-tool:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.sv-tsep { width: 1.4rem; height: 1px; margin: 0.25rem 0; background: var(--line-strong); }
/* the measurement reading sits beside the strip while measuring, and stays with the result until cleared */
.sv-mread { position: absolute; right: calc(100% + 0.6rem); top: 0.3rem; width: max-content; max-width: 15rem; padding: 0.45rem 0.65rem;
  background: #fff; border: 1px solid #000; box-shadow: 0 8px 20px -12px rgba(0,0,0,0.55); }
.sv-mread[hidden] { display: none; }
.sv-m-out { margin: 0; font-size: 0.8125rem; font-weight: 600; color: #000; line-height: 1.35; }
.sv-mhint { display: none; margin: 0.15rem 0 0; font-size: 0.6875rem; color: var(--dim); }
.sv-mread.live .sv-mhint { display: block; }
.sv-tools:has(.sv-mread:not([hidden])) .sv-tool::after { display: none; }

/* click-in pages on the site view (21 Oct 2026, from Archistar) */
.sv-pg[hidden] { display: none; }
.sv-nav { margin: 1rem 0 0.25rem; border: 1px solid var(--line-strong); }
.sv-navrow { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; min-height: 0;
  padding: 0.7rem 0.85rem; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--white); text-align: left;
  font: inherit; cursor: pointer; }
.sv-navrow:last-child { border-bottom: 0; }
.sv-navrow:hover { background: #F7F6F3; }
.sv-nt { display: flex; flex-direction: column; gap: 0.1rem; }
.sv-nt b { font-size: 0.9375rem; font-weight: 600; }
.sv-nt span { font-size: 0.8125rem; color: var(--soft); line-height: 1.35; }
.sv-chev { font-size: 1.5rem; line-height: 1; color: var(--gold); }
.sv-subhead { margin-bottom: 0.5rem; }
.sv-back { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2rem; padding: 0.15rem 0.7rem 0.15rem 0.5rem;
  border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--white); font-size: 0.8125rem; font-weight: 500; cursor: pointer; }
.sv-back span { font-size: 1.15rem; line-height: 1; color: var(--gold); }
.sv-back:hover { border-color: #000; }
.sv-crumb { margin: 0.75rem 0 0; font-family: var(--serif); font-weight: 600; font-size: 1.5rem; line-height: 1.15; }
.sv-crumb span { color: var(--dim); }
.sv-subhead .sv-where { margin: 0.2rem 0 0; }
.sv-rules { margin: 0; border-top: 1px solid var(--line); }
.sv-rules div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; }
.sv-rules dt { color: var(--soft); flex: none; max-width: 45%; }
.sv-rules dd { margin: 0; text-align: right; display: flex; flex-direction: column; }
.sv-rules dd span { font-weight: 500; }
.sv-rules dd small { color: var(--dim); font-size: 0.6875rem; line-height: 1.35; margin-top: 0.1rem; }
.sv-rules dd a { color: var(--dim); font-size: 0.6875rem; line-height: 1.35; margin-top: 0.1rem; text-decoration: underline; text-decoration-color: var(--line-strong); }
.sv-rules dd small.sv-note { color: var(--soft); }
.sv-rule { border-bottom: 1px solid var(--line); }
.sv-rule summary { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; cursor: pointer; font-size: 0.875rem; list-style: none; }
.sv-rule summary::-webkit-details-marker { display: none; }
.sv-rule summary::after { content: "›"; color: var(--gold); margin-left: 0.4rem; transition: transform 0.15s; }
.sv-rule[open] summary::after { transform: rotate(90deg); }
.sv-rule summary span { color: var(--white); }
.sv-rule summary b { margin-left: auto; font-weight: 500; }
.sv-rrow, .sv-use { padding: 0.35rem 0 0.45rem 0.75rem; border-left: 2px solid var(--line); margin: 0 0 0.45rem; }
.sv-use { border-left: 0; padding-left: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 0.55rem 0; }
.sv-rline { margin: 0; display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.875rem; }
.sv-rline span { color: var(--soft); }
.sv-rline b { font-weight: 500; text-align: right; }
.sv-rcond { margin: 0.1rem 0 0; font-size: 0.75rem; color: var(--soft); line-height: 1.4; }
.sv-ref { margin: 0.1rem 0 0; font-size: 0.6875rem; color: var(--dim); }
.sv-ref a { color: var(--gold-light); text-decoration-color: var(--gold); }
.sv-foot { margin: 1rem 0 0.5rem; font-size: 0.75rem; color: var(--dim); line-height: 1.45; }
.sv-foot a { color: var(--gold-light); }
.sv-h4 { margin: 0.75rem 0 0.25rem; font-size: 0.8125rem; font-weight: 600; }
.sv-para { margin: 0; font-size: 0.875rem; line-height: 1.5; }
.sv-lvl { font-size: 0.75rem !important; padding: 0.05rem 0.45rem; border: 1px solid var(--line-strong); white-space: nowrap; align-self: flex-start; }
.sv-lvl.acc { color: var(--good); border-color: var(--good); }
.sv-lvl.code { color: var(--gold-light); border-color: var(--gold); }
.sv-lvl.imp { color: var(--bad); border-color: var(--bad); }
.sv-prec { border-top: 1px solid var(--line); }
.sv-precrow { display: block; width: 100%; min-height: 0; padding: 0.6rem 0; border: 0; border-bottom: 1px solid var(--line); background: none;
  color: var(--white); text-align: left; font: inherit; cursor: pointer; }
.sv-precrow:hover { background: #F7F6F3; }
.sv-precrow .sv-rline b { text-align: left; font-weight: 600; }
.sv-dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; }
.sv-pfacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0.35rem 0 0.15rem; }
.sv-pfacts dt { font-size: 0.6875rem; color: var(--dim); }
.sv-pfacts dd { margin: 0; font-size: 0.875rem; font-weight: 500; }
.sv-tool[aria-busy="true"] { opacity: 0.5; cursor: progress; }
.sv-toast { position: absolute; z-index: 1000; left: 50%; bottom: 1.5rem; transform: translateX(-50%); max-width: 26rem; padding: 0.6rem 0.9rem;
  background: #000; color: #fff; font-size: 0.8125rem; box-shadow: 0 10px 30px -12px rgba(0,0,0,0.6); }

/* the run notice (Tim, 23 Oct 2026 — "it seemed like nothing happened"): pops up just above the run button while a
   quick feasibility runs; on a phone it sits along the bottom of the screen */
.run-notice { position: fixed; z-index: 1100; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; padding: 0.85rem 1rem 0.9rem;
  max-height: calc(100vh - 7rem); overflow-y: auto;
  background: #000; color: #fff; border-left: 3px solid var(--gold-bright); box-shadow: 0 14px 34px -12px rgba(0,0,0,0.55);
  animation: rn-in 0.22s ease-out; }
.run-notice[hidden] { display: none; }
.run-notice .rn-head { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9375rem; }
.run-notice .rn-head strong { font-weight: 600; flex: 1; }
.run-notice .spin { border-color: rgba(255,255,255,0.25); border-top-color: var(--gold-bright); }
.run-notice .rn-time { font-variant-numeric: tabular-nums; font-size: 0.8125rem; color: rgba(255,255,255,0.7); }
.run-notice .rn-line { margin: 0.4rem 0 0; font-size: 0.8125rem; line-height: 1.45; color: rgba(255,255,255,0.8); }
.run-notice.is-err { border-left-color: #F04438; }
.run-notice .status.err { margin: 0.4rem 0 0; font-size: 0.8125rem; color: #FDA29B; }
.run-notice .fb-link { color: #fff; }
.run-notice .fb { color: var(--white); background: #fff; margin-top: 0.6rem; }
.run-notice .rn-line a { color: var(--gold-bright); }
.run-notice .rn-close { background: transparent; border: 0; color: #fff; font-size: 1.3rem; line-height: 1; padding: 0 0.2rem;
  min-height: 0; cursor: pointer; }
@keyframes rn-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .run-notice { animation: none; } }
/* desktop: over the foot of the sidebar, just above the run button */
@media (min-width: 60rem) { .run-notice { right: auto; left: 0.75rem; width: 24.5rem; bottom: 5.4rem; } }

/* "Working on it" panel (web/app/working.js, Tim, 27 Oct 2026): a site plan that draws itself while a run works */
.working { display: grid; grid-template-columns: minmax(0, 15rem) 1fr; gap: 1.5rem; align-items: center; padding: 0.5rem 0; }
@media (max-width: 36rem) { .working { grid-template-columns: 1fr; justify-items: center; text-align: left; } }
.working .wk-art { width: 100%; max-width: 15rem; height: auto; overflow: visible; }
.wk-lot { fill: none; stroke: var(--bad); stroke-width: 2; stroke-dasharray: 640; stroke-dashoffset: 640;
          animation: wk-draw 6s ease-in-out infinite; }
.wk-road { stroke: var(--line-strong); stroke-width: 3; stroke-linecap: round; }
.wk-drive { fill: #EFEDE7; opacity: 0; animation: wk-fade 6s ease-in-out infinite; animation-delay: .4s; }
.wk-h { fill: #F6F1E3; stroke: var(--gold); stroke-width: 1.5; transform-box: fill-box; transform-origin: bottom;
        transform: scaleY(0); animation: wk-rise 6s ease-in-out infinite; }
.wk-h.h2 { animation-delay: .25s; }
.wk-h.h3 { animation-delay: .5s; }
.wk-line { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
           stroke-dasharray: 170; stroke-dashoffset: 170; animation: wk-chart 6s ease-in-out infinite; }
.wk-dot { fill: var(--gold); opacity: 0; animation: wk-dot 6s ease-in-out infinite; }
@keyframes wk-draw { 0% { stroke-dashoffset: 640; } 25%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes wk-fade { 0%, 20% { opacity: 0; } 30%, 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes wk-rise { 0%, 25% { transform: scaleY(0); } 40%, 88% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes wk-chart { 0%, 45% { stroke-dashoffset: 170; } 70%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes wk-dot { 0%, 68% { opacity: 0; } 72%, 88% { opacity: 1; } 100% { opacity: 0; } }
.working.stopped * { animation-play-state: paused; }
.wk-title { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; margin: 0 0 0.6rem; }
.wk-steps { list-style: none; margin: 0; padding: 0; }
.wk-steps li { position: relative; padding: 0.22rem 0 0.22rem 1.6rem; color: var(--dim); transition: color .4s; }
.wk-steps li::before { content: ""; position: absolute; left: 0.2rem; top: 0.68rem; width: 0.55rem; height: 0.55rem;
                       border-radius: 50%; border: 1.5px solid var(--line-strong); background: #fff; }
.wk-steps li.done { color: var(--soft); }
.wk-steps li.done::before { background: var(--gold); border-color: var(--gold); }
.wk-steps li.now { color: var(--white); font-weight: 500; }
.wk-steps li.now::before { border-color: var(--gold); animation: wk-pulse 1.4s ease-in-out infinite; }
@keyframes wk-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(168,133,40,.45); } 50% { box-shadow: 0 0 0 5px rgba(168,133,40,0); } }
.wk-note { color: var(--soft); font-size: 0.9rem; margin: 0.7rem 0 0; }
.wk-time { color: var(--dim); font-size: 0.85rem; margin: 0.5rem 0 0; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  .wk-lot, .wk-line { animation: none; stroke-dashoffset: 0; }
  .wk-h { animation: none; transform: none; }
  .wk-drive, .wk-dot { animation: none; opacity: 1; }
  .wk-steps li.now::before { animation: none; background: var(--gold); }
}

/* the optional survey / plan box on the Detailed and IM tabs (web/app/survey.js, 2 Nov 2026) */
.filebox { display: grid; gap: 0.5rem; margin: 1.25rem 0 0; }
.filebox[hidden] { display: none; }
.filebox input[type=file] { padding: 0.6rem; min-height: 0; }
.filebox .picked { font-size: 0.875rem; color: var(--soft); margin: 0; }
.filebox .help { font-size: 0.8125rem; color: var(--dim); margin: 0; }
