/* ------------------------------------------------------------------ *\
   The public demo (DEMO_MODE): Zoylan's identity over the register.

   Loaded only when DEMO_MODE=yes (partials/head.ejs), and every rule is
   scoped under body.is-demo, so the client register never sees any of it.
   IBM Plex Sans and Mono are served from /static/fonts (SIL OFL 1.1).
\* ------------------------------------------------------------------ */

@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------------------------------------------------------------- tokens

   The register's green tokens are re-pointed at Zoylan's palette, so every
   rule in style.css that says "the accent" follows without being touched.
   Navy is the ink and the primary action; teal is the accent (active,
   focus, progress). Green and red stay for approve and reject only. */
body.is-demo {
  --green-900: #0c161d;
  --green-700: #08737c;
  --green-600: #0b8a94;
  --green-100: #e6f4f5;
  --ink: #0c161d;
  --ink-soft: #56656d;
  --line: #dbe5e7;
  --bg: #eef4f5;
  --surface: #ffffff;
  --danger: #b91c1c;
  --shadow: 0 1px 2px rgba(12, 22, 29, .05), 0 4px 14px rgba(12, 22, 29, .06);

  --z-navy: #0c161d;
  --z-teal: #0ea1ac;
  --z-aqua: #3fd8e0;
  --z-accent-text: #08737c;
  --z-accent-soft: #ddf1f2;
  --z-ink-faint: #7f8f96;
  --z-line-strong: #bccbcf;
  --z-surface-2: #f3f8f8;
  --z-primary: #0b8a94;
  --z-primary-hover: #08737c;
  --z-on-primary: #ffffff;
  --z-ok: #15803d;
  --z-ok-ink: #166534;
  --z-ok-soft: #dcfce7;
  --z-no: #b91c1c;
  --z-no-ink: #991b1b;
  --z-no-soft: #fee2e2;
  --z-ring: 0 0 0 3px rgba(14, 161, 172, .28);
  --z-ctrl-shadow: 0 1px 2px rgba(12, 22, 29, .12), 0 2px 8px rgba(12, 22, 29, .10);
  --z-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;

  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background-image: none;
  font-feature-settings: 'tnum' 0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.is-demo {
    --green-900: #eef3f4;
    --green-700: #3fd8e0;
    --green-600: #0ea1ac;
    --green-100: rgba(14, 161, 172, .16);
    --ink: #eef3f4;
    --ink-soft: #9fb1b8;
    --line: #22343d;
    --bg: #0a1319;
    --surface: #0f1c24;
    --danger: #f87171;
    --z-accent-text: #3fd8e0;
    --z-accent-soft: rgba(14, 161, 172, .16);
    --z-ink-faint: #5f747c;
    --z-line-strong: #2f4550;
    --z-surface-2: #16262f;
    --z-primary: #0ea1ac;
    --z-primary-hover: #3fd8e0;
    --z-on-primary: #041014;
    --z-ok: #16a34a;
    --z-ok-ink: #86efac;
    --z-ok-soft: rgba(22, 163, 74, .16);
    --z-no: #dc2626;
    --z-no-ink: #fca5a5;
    --z-no-soft: rgba(220, 38, 38, .16);
    --z-ctrl-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .3);
  }
}
:root[data-theme="dark"] body.is-demo {
  --green-900: #eef3f4;
  --green-700: #3fd8e0;
  --green-600: #0ea1ac;
  --green-100: rgba(14, 161, 172, .16);
  --ink: #eef3f4;
  --ink-soft: #9fb1b8;
  --line: #22343d;
  --bg: #0a1319;
  --surface: #0f1c24;
  --danger: #f87171;
  --z-accent-text: #3fd8e0;
  --z-accent-soft: rgba(14, 161, 172, .16);
  --z-ink-faint: #5f747c;
  --z-line-strong: #2f4550;
  --z-surface-2: #16262f;
  --z-primary: #0ea1ac;
  --z-primary-hover: #3fd8e0;
  --z-on-primary: #041014;
  --z-ok: #16a34a;
  --z-ok-ink: #86efac;
  --z-ok-soft: rgba(22, 163, 74, .16);
  --z-no: #dc2626;
  --z-no-ink: #fca5a5;
  --z-no-soft: rgba(220, 38, 38, .16);
  --z-ctrl-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .3);
}

/* No decorative tree behind the pages, no tinted mesh: the product is the
   picture. */
body.is-demo::before { display: none; }

/* ------------------------------------------------------------- basics */
.is-demo code,
.is-demo .mono,
.is-demo .tree-id strong { font-family: var(--z-mono); }
.is-demo :focus-visible { outline: 2px solid var(--z-teal); outline-offset: 2px; }
.is-demo input[type="checkbox"],
.is-demo input[type="radio"] { accent-color: var(--z-teal); }
.is-demo input[type="text"]:focus,
.is-demo input[type="search"]:focus,
.is-demo input[type="number"]:focus,
.is-demo input[type="password"]:focus,
.is-demo select:focus {
  outline: none;
  border-color: var(--z-teal);
  box-shadow: var(--z-ring);
}

.is-demo kbd {
  min-width: 1.4em;
  padding: 0 .32em;
  font: 500 .68rem/1.55 var(--z-mono);
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  border-bottom-width: 1px;
  border-radius: 4px;
  background: color-mix(in srgb, currentColor 6%, transparent);
  opacity: .9;
}

.is-demo .btn { border-radius: 8px; font-weight: 500; }
.is-demo .btn:hover { border-color: var(--z-line-strong); }
.is-demo .btn--primary {
  color: var(--z-on-primary);
  background: var(--z-primary);
  border-color: var(--z-primary);
}
.is-demo .btn--primary:hover { background: var(--z-primary-hover); border-color: var(--z-primary-hover); }

/* Sliders: a hairline track and a ringed thumb, the same in every browser. */
.is-demo input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--z-line-strong);
  cursor: pointer;
}
.is-demo input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--z-teal);
  box-shadow: 0 1px 2px rgba(12, 22, 29, .25);
}
.is-demo input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--z-teal);
  box-shadow: 0 1px 2px rgba(12, 22, 29, .25);
}
.is-demo input[type="range"]:focus-visible { outline: none; box-shadow: var(--z-ring); }

/* ------------------------------------------------------------- top bar */
.is-demo .topbar {
  min-height: 52px;
  padding-top: .45rem;
  padding-bottom: .45rem;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}
.is-demo .topbar-brand { gap: .75rem; color: var(--ink); }
.is-demo .topbar-mark { display: none; color: var(--ink); }
.is-demo .topbar-wordmark { display: inline-flex; color: var(--ink); }
.is-demo .topbar-product {
  padding-left: .75rem;
  border-left: 1px solid var(--line);
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.2rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.is-demo .topbar-tab { font-weight: 500; }
.is-demo .topbar-tab.is-active { color: var(--ink); }
.is-demo .topbar-tab.is-active::after { background: var(--z-teal); }
.is-demo .demo-badge {
  height: 1.9rem;
  padding: 0 .7rem;
  color: var(--ink-soft);
  background: var(--z-surface-2);
  border: 1px solid var(--line);
  font-size: .76rem;
  font-weight: 500;
}
.is-demo .demo-badge i { background: var(--z-teal); box-shadow: 0 0 0 3px rgba(14, 161, 172, .2); }
.is-demo .demo-company { font-weight: 500; }
.is-demo .avatar { background: var(--z-primary); color: var(--z-on-primary); font-weight: 600; }
.is-demo .topbar-user > summary:hover { background: var(--z-surface-2); }
@media (max-width: 1100px) {
  .is-demo .topbar-product { display: none; }
}
@media (max-width: 640px) {
  .is-demo .demo-badge { font-size: 0; gap: 0; padding: 0 .6rem; }
}
@media (max-width: 720px) {
  .is-demo .topbar-mark { display: inline-flex; }
  .is-demo .topbar-wordmark { display: none; }
}

/* --------------------------------------------------------------- login */
.is-demo .auth-brand--zoylan { display: inline-grid; gap: .4rem; color: var(--ink); font-weight: 400; }
.is-demo .auth-brand--zoylan small {
  font-family: var(--z-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.is-demo .auth-visual { background: #060c10; }
.is-demo .auth-visual-shade {
  background: linear-gradient(180deg, rgba(6, 12, 16, .25) 0%, rgba(6, 12, 16, .4) 45%, rgba(6, 12, 16, .92) 100%);
}
.is-demo .auth-kicker { font-family: var(--z-mono); font-weight: 500; letter-spacing: .14em; color: #3fd8e0; }
.is-demo .auth-headline { font-weight: 600; letter-spacing: -.015em; }
.is-demo .auth-facts strong { font-weight: 600; }
.is-demo .auth-facts li { border-top-color: rgba(63, 216, 224, .35); }
.is-demo .auth-form h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -.01em; }
.is-demo .auth-field { font-weight: 500; }
.is-demo .auth-field input { height: 2.75rem; border-radius: 8px; }
.is-demo .auth-field input:focus { border-color: var(--z-teal); box-shadow: var(--z-ring); }
.is-demo .auth-submit { height: 2.75rem; border-radius: 8px; font-weight: 500; }
.is-demo .auth-eye:hover,
.is-demo .auth-eye[aria-pressed="true"] { color: var(--ink); background: var(--z-surface-2); }
.is-demo .lang-option.is-active { color: var(--z-on-primary); background: var(--z-primary); }
.is-demo .lang-option:hover { color: var(--ink); background: var(--z-surface-2); }

/* ------------------------------------------------------ the map's column

   One dock of cards on an 8 px grid: hairline borders, no shadows, the same
   header in every card (icon, title, count, chevron). */
.is-demo .map-side {
  gap: 8px;
  padding: 12px;
  background: var(--bg);
  font-size: .84rem;
}
.is-demo .ms-card { border-radius: 8px; box-shadow: none; }
.is-demo .ms-head { min-height: 44px; gap: 8px; padding: 0 12px; }
.is-demo .ms-head > svg { width: 16px; height: 16px; color: var(--ink-soft); }
.is-demo .ms-head strong { font-size: .86rem; font-weight: 600; letter-spacing: -.005em; }
.is-demo .ms-head:hover { background: var(--z-surface-2); }
.is-demo .ms-head .rp-count,
.is-demo .ms-head .rp-active {
  flex: 0 0 auto;
  padding: 0 7px;
  font-size: .72rem;
  font-weight: 500;
  line-height: 20px;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.is-demo .ms-head .rp-active { color: var(--z-accent-text); background: var(--z-accent-soft); border-color: transparent; }
.is-demo .ms-chevron svg { width: 14px; height: 14px; }
.is-demo .ms-head[aria-expanded="true"] + .ms-body { border-top: 1px solid var(--line); }
.is-demo .ms-body { padding: 12px; }
.is-demo .ms-body > :first-child { margin-top: 0; }

/* Search: one field with its button attached. */
.is-demo .rp-search { gap: 0; margin-top: 0; }
.is-demo .rp-search input {
  height: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  background: var(--surface);
  font-size: .84rem;
}
.is-demo .rp-search input:focus { position: relative; z-index: 1; border-right: 1px solid var(--z-teal); }
.is-demo .rp-search button {
  height: 34px;
  padding: 0 12px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--z-on-primary);
  background: var(--z-primary);
  border-radius: 0 6px 6px 0;
}
.is-demo .rp-search button:hover { background: var(--z-primary-hover); }

/* Tools: a segmented control, a label under each icon and the key in the
   corner. The active tool is the same everywhere: teal ring, teal ink. */
.is-demo .rp-tools {
  gap: 2px;
  margin-top: 12px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.is-demo .rp-tool {
  position: relative;
  gap: 4px;
  height: 52px;
  padding: 6px 4px 4px;
  font-size: .74rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 6px;
  transition: background .12s ease, color .12s ease;
}
.is-demo .rp-tool svg { width: 18px; height: 18px; }
.is-demo .rp-tool:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.is-demo .rp-tool.is-active {
  color: var(--z-accent-text);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--z-teal), 0 1px 2px rgba(12, 22, 29, .08);
}
.is-demo .rp-tool-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-demo .rp-tool kbd {
  position: absolute;
  top: 3px;
  right: 4px;
  min-width: 0;
  padding: 0 3px;
  font-size: .6rem;
  line-height: 1.4;
  border: 0;
  background: none;
  opacity: .6;
}
.is-demo .rp-tool.is-active kbd { opacity: .9; }

.is-demo .rp-hint { margin-top: 8px; font-size: .78rem; line-height: 1.45; }
.is-demo .rp-keys {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 8px 0 0;
  font-size: .72rem;
  color: var(--z-ink-faint);
}
.is-demo .rp-keys > span { margin-right: 4px; }
.is-demo .rp-keys kbd { color: var(--ink-soft); }
@media (pointer: coarse) {
  .is-demo .rp-keys,
  .is-demo .rp-tool kbd { display: none; }
}

/* Brush: label, track, size in pixels and on the ground. */
.is-demo .rp-size {
  gap: 8px 10px;
  margin: 12px 0 0;
  padding: 8px 10px;
  background: var(--z-surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.is-demo .rp-size .rp-label { font-size: .64rem; letter-spacing: .06em; }
.is-demo #rp-size-value { min-width: 3.4em; text-align: right; font: 500 .74rem var(--z-mono); color: var(--ink); }
.is-demo #rp-size-value::after { content: ' px'; color: var(--ink-soft); }
.is-demo .rp-size-m { flex: 0 0 auto; font: 400 .72rem var(--z-mono); color: var(--ink-soft); white-space: nowrap; }

.is-demo .rp-status { border-radius: 6px; font-size: .78rem; }
.is-demo .rp-subhead { font-size: .64rem; letter-spacing: .07em; color: var(--z-ink-faint); }
.is-demo .rp-check { gap: 8px; padding: 6px 0; font-size: .82rem; }
.is-demo .rp-check input { width: 14px; height: 14px; accent-color: var(--z-teal); }
.is-demo .rp-count { font-size: .76rem; }
.is-demo .ms-clear { color: var(--z-accent-text); text-decoration: none; font-size: .76rem; font-weight: 500; }
.is-demo .ms-clear:hover { text-decoration: underline; }
.is-demo .rp-label { font-size: .64rem; letter-spacing: .06em; }
.is-demo .rp-run {
  height: 34px;
  padding: 0;
  font-weight: 500;
  color: var(--z-on-primary);
  background: var(--z-primary);
  border-radius: 6px;
}
.is-demo .rp-run:hover { background: var(--z-primary-hover); }
.is-demo .review-panel select,
.is-demo .review-panel input[type="number"],
.is-demo .rp-range-pair input { border-radius: 6px; }

/* ------------------------------------------- the inventory check (zones) */
.is-demo .zn-start,
.is-demo .zn-next {
  height: 36px;
  padding: 0 12px;
  font-size: .84rem;
  font-weight: 500;
  color: var(--z-on-primary);
  background: var(--z-primary);
  border-radius: 6px;
}
.is-demo .zn-start:hover,
.is-demo .zn-next:hover { filter: none; background: var(--z-primary-hover); }
.is-demo .zn-next kbd { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); }

.is-demo .zn-legend li { padding: 4px 0; font-size: .8rem; }
.is-demo .zn-dot { width: 10px; height: 10px; border-radius: 3px; }
.is-demo .zn-dot.is-work { background: transparent; border: 1.5px solid var(--z-teal); }
.is-demo .zn-dot.is-done { background: var(--z-ok); }
.is-demo .zn-dot.is-rejected { background: var(--z-no); }

.is-demo .zn-progress { height: 4px; margin: 8px 0 6px; background: var(--line); border: 0; border-radius: 2px; }
.is-demo .zn-progress i { background: var(--z-teal); border-radius: 2px; }
.is-demo .zn-done { font-size: .74rem; }
/* The score block under the card carries the progress in the demo. */
.is-demo #zn-picker > .zn-progress,
.is-demo #zn-done { display: none; }
.is-demo .zn-ghost { height: 32px; padding: 0; font-weight: 500; border-radius: 6px; }
.is-demo .zn-ghost:hover { border-color: var(--z-line-strong); background: var(--z-surface-2); }

/* The zone in hand: back, name, state. */
.is-demo .zn-head { gap: 8px; margin-bottom: 8px; }
.is-demo .zn-head strong { font-size: .95rem; font-weight: 600; }
.is-demo .zn-back {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: .95rem;
  border-radius: 6px;
}
.is-demo .zn-back:hover { border-color: var(--z-line-strong); background: var(--z-surface-2); }
.is-demo .zn-state {
  flex: 0 0 auto;
  padding: 0 8px;
  font-size: .7rem;
  font-weight: 500;
  line-height: 20px;
  border-radius: 999px;
  white-space: nowrap;
}
.is-demo .zn-state.is-todo { color: var(--ink-soft); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.is-demo .zn-state.is-ok { color: var(--z-ok-ink); background: var(--z-ok-soft); }
.is-demo .zn-state.is-no { color: var(--z-no-ink); background: var(--z-no-soft); }
.is-demo .zn-ask { margin-bottom: 8px; font-size: .78rem; }

.is-demo .zn-stats { gap: 8px; margin-bottom: 8px; }
.is-demo .zn-stats div {
  gap: 2px;
  padding: 8px 10px;
  background: var(--z-surface-2);
  border-radius: 6px;
}
.is-demo .zn-stats b { font-size: 1.15rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.is-demo .zn-stats span { font-size: .7rem; }

.is-demo .zn-decide { gap: 8px; margin-bottom: 8px; }
.is-demo .zn-approve,
.is-demo .zn-reject { height: 38px; padding: 0 10px; gap: 8px; font-size: .86rem; font-weight: 500; border-radius: 6px; }
.is-demo .zn-approve { color: #fff; background: var(--z-ok); border-color: var(--z-ok); }
.is-demo .zn-approve:hover { filter: none; background: #166534; border-color: #166534; }
.is-demo .zn-approve.is-on { box-shadow: 0 0 0 3px rgba(21, 128, 61, .25); }
.is-demo .zn-reject { color: var(--z-no); background: var(--surface); border-color: color-mix(in srgb, var(--z-no) 45%, var(--line)); }
.is-demo .zn-reject:hover { filter: none; background: var(--z-no-soft); border-color: var(--z-no); }
.is-demo .zn-reject.is-on { color: #fff; background: var(--z-no); border-color: var(--z-no); }
.is-demo .zn-approve kbd { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .12); }
.is-demo .zn-decided { padding: 6px 8px; border-radius: 6px; font-size: .74rem; }
.is-demo .zn-decided.is-ok { color: var(--z-ok-ink); background: var(--z-ok-soft); }
.is-demo .zn-decided.is-no { color: var(--z-no-ink); background: var(--z-no-soft); }

.is-demo .zn-walk {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin-bottom: 8px;
  padding: 0 12px;
  font-size: .84rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--z-line-strong);
  border-radius: 6px;
}
.is-demo .zn-walk span { flex: 1 1 auto; text-align: left; }
.is-demo .zn-walk svg { color: var(--z-accent-text); flex: 0 0 auto; }
.is-demo .zn-walk:hover:not(:disabled) { border-color: var(--z-teal); background: var(--z-surface-2); }
.is-demo .zn-walkbar {
  padding: 8px 10px;
  background: var(--z-accent-soft);
  border: 1px solid color-mix(in srgb, var(--z-teal) 40%, transparent);
  border-radius: 6px;
}

/* The score: progress first, then the totals, the way on, the export. */
.is-demo .zn-score { margin-top: 12px; padding-top: 12px; }
.is-demo .zn-score-progress { margin-bottom: 12px; }
.is-demo .zn-score-progress p {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  font-size: .78rem;
  font-weight: 600;
}
.is-demo .zn-score-progress b { font: 500 .76rem var(--z-mono); color: var(--z-accent-text); }
.is-demo .zn-score-progress .zn-progress { margin: 6px 0 4px; }
.is-demo .zn-score-progress small { font-size: .72rem; color: var(--ink-soft); }
.is-demo .zn-score-total { margin-bottom: 8px; font-size: .8rem; color: var(--ink-soft); }
.is-demo .zn-score-total b { color: var(--ink); font-weight: 600; }
.is-demo .zn-score-stats { gap: 8px; margin-bottom: 8px; }
.is-demo .zn-score-stats span {
  gap: 2px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--z-surface-2);
  box-shadow: inset 3px 0 0 var(--line);
}
.is-demo .zn-score-stats .is-ok { background: var(--z-surface-2); box-shadow: inset 3px 0 0 var(--z-ok); }
.is-demo .zn-score-stats .is-no { background: var(--z-surface-2); box-shadow: inset 3px 0 0 var(--z-no); }
.is-demo .zn-score-stats b { font-size: 1.1rem; font-weight: 600; line-height: 1.2; }
.is-demo .zn-alldone { color: var(--z-ok-ink); background: var(--z-ok-soft); border-radius: 6px; font-weight: 500; }
.is-demo .zn-export { gap: 8px; margin-top: 8px; font-size: .74rem; }
.is-demo .zn-export a { padding: 4px 10px; font: 500 .72rem var(--z-mono); color: var(--ink); border-radius: 6px; }
.is-demo .zn-export a:hover { border-color: var(--z-teal); background: var(--z-accent-soft); }
.is-demo .zn-help { margin-top: 8px; color: var(--z-accent-text); text-decoration: none; font-weight: 500; }
.is-demo .zn-help:hover { text-decoration: underline; }

/* The guide. */
.is-demo .zq-guide { border-radius: 12px; box-shadow: 0 24px 64px rgba(6, 12, 16, .35); }
.is-demo .zq-guide::backdrop { background: rgba(6, 12, 16, .55); }
.is-demo .zq-guide h2 { font-weight: 600; letter-spacing: -.015em; }
.is-demo .zq-guide-kicker { font-family: var(--z-mono); font-weight: 500; color: var(--z-accent-text); }
.is-demo .zq-steps li > b { width: 1.75rem; height: 1.75rem; font: 500 .8rem var(--z-mono); color: var(--z-accent-text); background: var(--z-accent-soft); border-radius: 6px; }

/* The walk's card and the phone's zone bar. */
.is-demo .zn-qcard { border-radius: 8px; box-shadow: 0 8px 24px rgba(6, 12, 16, .22); }
.is-demo .zn-q-keep,
.is-demo .zn-mbar-ok { color: #fff; background: var(--z-ok); border-color: var(--z-ok); }
.is-demo .zn-q-delete,
.is-demo .zn-mbar-no { color: var(--z-no); border-color: color-mix(in srgb, var(--z-no) 45%, var(--line)); }
.is-demo .zn-mbar-no.is-on { color: #fff; background: var(--z-no); }
.is-demo .zn-mbar-ok.is-on { box-shadow: 0 0 0 3px rgba(21, 128, 61, .25); }
.is-demo .zn-qactions button,
.is-demo .zn-mbar button,
.is-demo .zn-qnav button { border-radius: 6px; font-weight: 500; }
@media (max-width: 860px) {
  .is-demo .zn-mbar:not([hidden]) { border-radius: 10px; box-shadow: 0 8px 24px rgba(6, 12, 16, .25); }
}

/* ------------------------------------------------- the anomaly walk

   Main's walk (style.css .an-*) in the demo's dress: its own card in the
   panel, the question as a dialog in the tools' style, and the card docked on
   the map with the same tokens as the zone review. Amber stays the colour of
   "out of range", as on the map's legend; teal is the way forward. */
.is-demo .an-demo .rp-hint { margin: 0 0 10px; }
.is-demo .an-open {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin: 0;
  padding: 0 12px;
  font-size: .84rem;
  font-weight: 500;
  color: var(--z-on-primary);
  background: var(--z-primary);
  border: 0;
  border-radius: 6px;
}
.is-demo .an-open span { flex: 1 1 auto; text-align: left; }
.is-demo .an-open:hover { background: var(--z-primary-hover); }
.is-demo .an-open kbd { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); }
.is-demo .an-open kbd + kbd { margin-left: -4px; }
.is-demo .an-open svg { flex: 0 0 auto; color: var(--z-aqua); }

.is-demo .an-bar {
  gap: 8px;
  margin: 0;
  padding: 10px;
  font-size: .8rem;
  background: var(--z-surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 3px 0 0 var(--z-teal);
}
.is-demo .an-bar p { margin: 0; }
.is-demo .an-bar-pos { display: flex; align-items: baseline; gap: 6px; color: var(--ink-soft); }
.is-demo .an-bar-pos > span { font: 500 .86rem var(--z-mono); color: var(--ink); }
.is-demo .an-bar-pos b { font-weight: 600; }
.is-demo .an-bar-track { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.is-demo .an-bar-track i { display: block; width: 0; height: 100%; background: var(--z-teal); border-radius: 2px; transition: width .2s ease; }
.is-demo .an-keys { font-size: .72rem; line-height: 1.9; color: var(--ink-soft); }
.is-demo .an-keys kbd { color: var(--ink-soft); }
.is-demo .an-bar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.is-demo .an-bar-actions .zn-ghost { height: 32px; font-size: .76rem; }
@media (pointer: coarse) {
  .is-demo .an-keys,
  .is-demo .an-open kbd { display: none; }
}

/* The question. */
.is-demo .an-dialog {
  width: min(400px, calc(100vw - 32px));
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(6, 12, 16, .35);
}
.is-demo .an-dialog::backdrop { background: rgba(6, 12, 16, .55); }
.is-demo .an-dialog h2 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
.is-demo .an-dialog .rp-hint { margin: 0 0 14px; }
.is-demo .an-scope {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 8px 10px;
  font-size: .8rem;
  background: var(--z-accent-soft);
  border-radius: 6px;
}
.is-demo .an-scope span { color: var(--ink-soft); }
.is-demo .an-scope b { font-weight: 600; color: var(--z-accent-text); }
.is-demo .an-band { grid-template-columns: 1fr 5.6rem auto 5.6rem; gap: 6px; margin-bottom: 8px; font-size: .82rem; }
.is-demo .an-band input,
.is-demo .an-prop-head input {
  font: 400 .82rem var(--z-mono);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--z-line-strong);
  border-radius: 6px;
}
.is-demo .an-band input { height: 32px; padding: 0 8px; }
.is-demo .an-band input:focus,
.is-demo .an-prop-head input:focus { outline: none; border-color: var(--z-teal); box-shadow: var(--z-ring); }
.is-demo .an-dialog-actions { gap: 8px; margin-top: 16px; }
.is-demo .an-dialog-actions .zn-ghost,
.is-demo .an-dialog-actions .zn-start { height: 36px; }

/* The card on the map. */
.is-demo .an-card { padding: 10px; }
.is-demo .an-card .zn-qhead { gap: 6px; margin-bottom: 8px; }
.is-demo .an-card .zn-qhead { flex-wrap: wrap; }
.is-demo .an-card .zn-qhead > b { order: -1; flex: 1 1 100%; font: 500 .84rem var(--z-mono); }
.is-demo .an-card .zn-chip,
.is-demo .an-pos { white-space: nowrap; }
.is-demo .zn-chip { font-weight: 500; letter-spacing: .01em; }
.is-demo .zn-chip.is-out { color: #3d2600; background: #fbbf24; }
.is-demo .zn-chip:not(.is-out):not(.is-removed) { color: var(--ink-soft); background: var(--z-surface-2); }
.is-demo .an-pos { font: 400 .72rem var(--z-mono); color: var(--z-ink-faint); }
.is-demo .an-meta { gap: 2px 12px; margin: 4px 0 8px; font-size: .78rem; }
.is-demo .an-meta b { font: 500 .78rem var(--z-mono); }
.is-demo .an-meta b.is-out { color: #b45309; }
.is-demo .an-props { gap: 6px; }
.is-demo .an-prop {
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 3px 0 0 #f59e0b;
}
.is-demo .an-prop.is-done { border-color: var(--line); background: var(--z-ok-soft); box-shadow: inset 3px 0 0 var(--z-ok); }
.is-demo .an-prop.is-declined { box-shadow: inset 3px 0 0 var(--z-line-strong); opacity: .8; }
.is-demo .an-prop-head { gap: 6px; font-size: .8rem; }
.is-demo .an-prop-head b { font-weight: 600; }
.is-demo .an-prop-head input { width: 5.4rem; height: 28px; padding: 0 6px; }
.is-demo .an-old { font: 500 .8rem var(--z-mono); color: var(--z-no); }
.is-demo .an-muted { font-size: .7rem; color: var(--z-ink-faint); }
.is-demo .an-prop-head .an-muted { font-family: var(--z-mono); }
.is-demo .an-prop-src { margin-top: 6px; }
.is-demo .an-chip { padding: 2px 8px; font-size: .72rem; color: var(--ink-soft); background: var(--z-surface-2); }
.is-demo .an-chip.is-donor { color: var(--ink); border-color: color-mix(in srgb, var(--z-teal) 55%, var(--line)); background: var(--z-accent-soft); font-family: var(--z-mono); }
.is-demo .an-chip.is-donor:hover { border-color: var(--z-teal); }
.is-demo .an-chip b { color: var(--z-accent-text); font-weight: 600; }
.is-demo .an-prop-btns { gap: 6px; margin-top: 8px; }
.is-demo .an-prop-btns button { height: 30px; padding: 0 6px; font-size: .76rem; font-weight: 500; border-radius: 6px; }
.is-demo .an-card .zn-qactions { margin-top: 8px; }
.is-demo .an-card .zn-qactions button { height: 32px; padding: 0 6px; font-size: .76rem; }
/* A phone: the card along the bottom, over the legend, without the crop. */
@media (max-width: 600px) {
  .is-demo .an-card { z-index: 1001; max-height: 60%; }
  .is-demo .an-card .tc-shot { display: none; }
}

/* -------------------------------------------- controls floating on the map

   One family: 32 px, 8 px radius, hairline border, one soft shadow. */
.is-demo .leaflet-bar,
.is-demo .leaflet-touch .leaflet-bar {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--z-ctrl-shadow);
  background-clip: padding-box;
  overflow: hidden;
}
.is-demo .leaflet-bar a,
.is-demo .leaflet-touch .leaflet-bar a {
  width: 32px;
  height: 32px;
  line-height: 32px;
  color: var(--ink);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.is-demo .leaflet-bar a:last-child { border-bottom: 0; }
.is-demo .leaflet-bar a:first-child,
.is-demo .leaflet-bar a:last-child { border-radius: 0; }
.is-demo .leaflet-bar a:hover { color: var(--ink); background: var(--z-surface-2); }
.is-demo .leaflet-bar a.leaflet-disabled { color: var(--z-ink-faint); background: var(--surface); }
.is-demo .leaflet-control-zoom a { font: 400 18px/32px 'IBM Plex Sans', system-ui, sans-serif; }
.is-demo .leaflet-top.leaflet-right .leaflet-control,
.is-demo .leaflet-top.leaflet-left .leaflet-control { margin-top: 8px; }
.is-demo .leaflet-right .leaflet-control { margin-right: 12px; }
.is-demo .leaflet-left .leaflet-control { margin-left: 12px; }
.is-demo .leaflet-top .leaflet-control:first-child { margin-top: 12px; }
.is-demo .map-locate a.is-on { color: var(--z-accent-text); }
.is-demo .map-tools-toggle a.is-active { color: var(--z-accent-text); background: var(--z-accent-soft); }

.is-demo .map-place,
.is-demo .map-imagery {
  height: 32px;
  padding: 0 10px;
  gap: 6px;
  font-size: .78rem;
  font-weight: 500;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--z-ctrl-shadow);
}
.is-demo .map-place svg,
.is-demo .map-imagery svg { color: var(--ink-soft); }
.is-demo .map-imagery:hover { color: var(--ink); border-color: var(--z-line-strong); }

.is-demo .map-legend {
  min-width: 0;
  max-width: 228px;
  padding: 8px 10px;
  font-size: .72rem;
  line-height: 1.65;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--z-ctrl-shadow);
}
.is-demo .map-legend strong { margin-bottom: 2px; font: 500 .62rem var(--z-mono); letter-spacing: .1em; color: var(--z-ink-faint); }
.is-demo .map-legend .lg-dot { width: 8px; height: 8px; }
.is-demo .map-legend .lg-scale-label { margin-top: 4px; font-size: .68rem; line-height: 1.35; }
.is-demo .map-legend .lg-scale i { height: 4px; border-radius: 2px; }
.is-demo .map-legend .lg-scale em { font: 400 .66rem var(--z-mono); }
.is-demo .map-legend .lg-density { margin-top: 2px; }
.is-demo .lg-heat {
  width: 12px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: radial-gradient(closest-side, rgba(94, 230, 192, .9), rgba(94, 230, 192, .15));
}
.is-demo .leaflet-control-scale-line {
  padding: 0 6px;
  font: 500 .66rem/1.6 var(--z-mono);
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--z-line-strong);
  border-top: 0;
}
.is-demo .leaflet-control-attribution { font-size: .62rem; }
.is-demo .cluster-label { font: 500 .68rem var(--z-mono); }

/* Docked beside the map on a wide screen, the panel needs no button to open
   it, and a desk has no use for "where am I". On a phone both stay. */
@media (min-width: 861px) {
  .is-demo .map-tools-toggle { display: none; }
}
@media (min-width: 861px) and (hover: hover) and (pointer: fine) {
  .is-demo .map-locate { display: none; }
}

/* ------------------------------------------------------------- the table */
.is-demo .tree-table th { font-weight: 600; letter-spacing: .02em; }
.is-demo .tree-table th.col-peek svg { display: block; margin: 0 auto; color: var(--ink-soft); }
.is-demo .src-chip { color: var(--z-accent-text); background: var(--z-accent-soft); font-weight: 500; }
.is-demo .toast { border-radius: 8px; }

/* Touch screens get Leaflet's buttons at 40 px (style.css); the plates
   beside them follow, so the corner stays one family. */
@media (pointer: coarse) {
  .is-demo .map-place,
  .is-demo .map-imagery { height: 40px; }
  .is-demo .leaflet-control-zoom a { line-height: 40px; }
}

/* The tree card's one action: the primary button, not a third accent. */
:root body.is-demo .tc-go {
  color: var(--z-on-primary);
  background: var(--z-primary);
  border-color: var(--z-primary);
  border-radius: 6px;
  font-weight: 500;
  box-shadow: none;
}
:root body.is-demo .tc-go:hover { color: var(--z-on-primary); background: var(--z-primary-hover); }
:root body.is-demo .tc-go:focus-visible { outline-color: var(--z-teal); }
.is-demo .tree-card .tc-head strong { font-weight: 600; }

/* ===================================================== the table (Tableau)

   views/admin/list-demo-bar.ejs (the toolbar, inside the filter form) and
   list-demo-table.ejs (summary, table, pager, inside #results). One card on
   a desk: summary on top, the table scrolling inside it under a sticky
   heading, the pager at its foot - the page itself does not scroll. A phone
   gets a list of two-line rows instead. */

/* ---------------------------------------------------------------- toolbar */
body.is-demo:not(.map-full) .admin-page { gap: .7rem; padding-bottom: 1rem; }
.is-demo .filters {
  position: sticky;
  top: var(--topbar-h, 54px);
  z-index: 9;
  display: flex;
  align-items: center;
  margin: -.35rem -1.5rem 0;
  padding: .55rem 1.5rem;
  background: var(--bg);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.is-demo .filters-advanced,
.is-demo .filters-open { display: none !important; }
.is-demo .filters-primary { display: flex; align-items: center; gap: .5rem; width: 100%; min-width: 0; }
.is-demo .filters .field-search { order: 0; flex: 0 1 280px; min-width: 180px; }
.is-demo .tt-bar { order: 1; }
/* One card: summary, table and pager touch. */
body.is-demo #results { gap: 0; }
.is-demo .filters .field-search input {
  min-height: 0;
  height: 36px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: .86rem;
  border-radius: 8px;
  background: var(--surface);
}
.is-demo .filters .field-search svg { width: 15px; height: 15px; }

.is-demo .tt-bar { display: flex; align-items: center; gap: .75rem; flex: 1 1 auto; min-width: 0; }
.is-demo .tt-filters { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; min-width: 0; }
.is-demo .tt-tools { display: flex; align-items: center; gap: .5rem; margin-left: auto; flex: none; }

/* A chip: the filter's name, and once set, its value after a hairline. */
.is-demo .tt-chip { position: relative; }
.is-demo .tt-chip .fpick-toggle,
.is-demo .tt-chip-btn,
.is-demo .tt-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  width: auto;
  height: 34px;
  min-height: 0;
  padding: 0 .65rem 0 .8rem;
  font: inherit;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.is-demo .tt-btn { padding: 0 .7rem; border-radius: 8px; }
.is-demo .tt-chip .fpick-toggle:hover,
.is-demo .tt-chip-btn:hover,
.is-demo .tt-btn:hover { border-color: var(--z-line-strong); background: var(--z-surface-2); }
.is-demo .tt-chip .fpick-toggle[aria-expanded="true"],
.is-demo .tt-chip-btn[aria-expanded="true"],
.is-demo .tt-btn[aria-expanded="true"] { border-color: var(--z-teal); }
.is-demo .tt-chip .fpick-toggle:focus-visible,
.is-demo .tt-chip-btn:focus-visible,
.is-demo .tt-btn:focus-visible { outline: 0; box-shadow: var(--z-ring); }
.is-demo .tt-caret, .is-demo .tt-chip .fpick-toggle > svg { color: var(--z-ink-faint); flex: none; }
.is-demo .tt-chip .fpick-value { display: none; }
.is-demo .tt-chip .fpick-value[data-on],
.is-demo .tt-chip-v[data-on] {
  display: inline;
  padding-left: .45rem;
  border-left: 1px solid color-mix(in srgb, var(--z-teal) 40%, transparent);
  color: var(--z-accent-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.is-demo .tt-chip .fpick-value[data-on]::after { content: ' m'; font-weight: 500; }
.is-demo .tt-chip-v:not([data-on]) { display: none; }
.is-demo .tt-chip:has(.fpick-value[data-on]) .fpick-toggle,
.is-demo .tt-chip-btn:has(.tt-chip-v[data-on]) {
  background: var(--z-accent-soft);
  border-color: color-mix(in srgb, var(--z-teal) 45%, transparent);
}

/* The menus hang fixed to the screen (demo-table.js places them), so a
   chip row that scrolls sideways on a phone cannot clip them. */
.is-demo .tt-chip .fpick-menu,
.is-demo .tt-pop-menu {
  position: fixed;
  z-index: 70;
  top: 0;
  left: 0;
  min-width: 13.5rem;
  max-width: calc(100vw - 16px);
  padding: .35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(12, 22, 29, .16), 0 2px 6px rgba(12, 22, 29, .08);
}
.is-demo .tt-pop-menu[hidden], .is-demo .tt-chip .fpick-menu[hidden] { display: none; }
.is-demo .tt-pop { position: relative; }
.is-demo .tt-presets { display: grid; gap: 2px; }
.is-demo .tt-preset {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .42rem .55rem;
  font: inherit;
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-align: left;
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.is-demo .tt-preset i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.is-demo .tt-preset:hover { background: var(--z-surface-2); }
.is-demo .tt-preset.is-on { color: var(--z-accent-text); background: var(--z-accent-soft); font-weight: 600; }
.is-demo .tt-preset.is-on::after {
  content: '';
  width: 10px;
  height: 6px;
  margin-left: auto;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: translateY(-2px) rotate(-45deg);
}
.is-demo .tt-presets-k {
  margin: .45rem .55rem .1rem;
  padding-top: .45rem;
  font: 500 .66rem var(--z-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--z-ink-faint);
  border-top: 1px solid var(--line);
}
.is-demo .tt-chip .fpick-menu { width: 15rem; min-width: 0; }
.is-demo .tt-chip .rpick-body { padding: .3rem .55rem .45rem; }
.is-demo .tt-chip .rpick-end input { min-height: 0; height: 32px; padding: 0 .5rem; font-size: .84rem; font-variant-numeric: tabular-nums; }
.is-demo .tt-chip .fpick-tally { visibility: hidden; }
.is-demo .tt-chip .fpick-actions { margin: 0 -.35rem -.35rem; padding: .35rem .55rem; }

.is-demo .tt-opt {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .55rem;
  font-size: .84rem;
  border-radius: 6px;
  cursor: pointer;
}
.is-demo .tt-opt:hover { background: var(--z-surface-2); }
.is-demo .tt-opt input { margin: 0; width: 14px; height: 14px; }
.is-demo .tt-opt:has(input:checked) { font-weight: 600; }
.is-demo .tt-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.is-demo .tt-dot.is-all { border: 1.5px solid var(--z-ink-faint); }
.is-demo .tt-dot.is-todo { background: var(--z-ink-faint); }
.is-demo .tt-dot.is-done { background: var(--z-ok); }
.is-demo .tt-dot.is-rejected { background: var(--z-no); }

.is-demo .tt-clear {
  padding: 0 .3rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--z-accent-text);
  text-decoration: none;
  white-space: nowrap;
}
.is-demo .tt-clear:hover { text-decoration: underline; }
.is-demo .tt-clear[hidden] { display: none; }

.is-demo .tt-sort { display: none; }
.is-demo .tt-sort select { min-height: 0; height: 34px; padding: 0 .6rem; font-size: .82rem; border-radius: 8px; }

/* Comfortable or compact: a segmented pair. */
.is-demo .tt-density { display: inline-flex; padding: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.is-demo .tt-density button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  height: 28px;
  padding: 0 .55rem;
  font: inherit;
  font-size: .78rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.is-demo .tt-density button[aria-pressed="true"] { color: var(--ink); background: var(--z-accent-soft); }
.is-demo .tt-density button:focus-visible { outline: 0; box-shadow: var(--z-ring); }

.is-demo .tt-export { min-width: 17.5rem; }
.is-demo .tt-ex,
.is-demo .tt-ex-group p { display: flex; flex-direction: column; gap: .1rem; margin: 0; }
.is-demo .tt-ex { padding: .5rem .6rem; color: var(--ink); text-decoration: none; border-radius: 6px; }
.is-demo .tt-ex:hover { background: var(--z-surface-2); }
.is-demo .tt-ex b, .is-demo .tt-ex-group b { font-size: .84rem; font-weight: 600; }
.is-demo .tt-ex small, .is-demo .tt-ex-group small { font-size: .74rem; color: var(--ink-soft); }
.is-demo .tt-ex-group { margin-top: .3rem; padding: .55rem .6rem .45rem; border-top: 1px solid var(--line); }
.is-demo .tt-ex-group > div { display: flex; gap: .35rem; margin-top: .45rem; }
.is-demo .tt-ex-fmt {
  padding: .25rem .6rem;
  font: 500 .74rem var(--z-mono);
  color: var(--z-accent-text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.is-demo .tt-ex-fmt:hover { border-color: var(--z-teal); background: var(--z-accent-soft); }
.is-demo .tt-ex-locked { display: none; margin-top: .35rem; }
.is-demo .tt-ex-group.is-locked .tt-ex-fmt { opacity: .4; pointer-events: none; }
.is-demo .tt-ex-group.is-locked .tt-ex-locked { display: block; }

/* ---------------------------------------------------------- summary bar */
.is-demo .tt-summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding: .7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
}
.is-demo .tt-summary .list-count { margin: 0; font-size: .86rem; color: var(--ink-soft); }
.is-demo .tt-summary .list-count strong { font-size: 1.15rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.is-demo .tt-stats { display: flex; gap: 2rem; margin: 0 0 0 auto; }
.is-demo .tt-stats > div { display: flex; flex-direction: column; gap: .05rem; }
.is-demo .tt-stats dt { font: 500 .64rem var(--z-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--z-ink-faint); }
.is-demo .tt-stats dd { display: flex; align-items: center; gap: .1rem; margin: 0; font-size: .92rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.is-demo .tt-stats dd small { font-weight: 400; color: var(--ink-soft); }
.is-demo .tt-zone-bar { display: inline-flex; width: 56px; height: 4px; margin-left: .55rem; overflow: hidden; background: var(--line); border-radius: 2px; }
.is-demo .tt-zone-bar .is-done { background: var(--z-ok); }
.is-demo .tt-zone-bar .is-rejected { background: var(--z-no); }

/* Loading: the old table stays where it is, dimmed, under a moving line. */
body.is-demo #results.is-loading { opacity: 1; }
.is-demo #results.is-loading .tt-wrap,
.is-demo #results.is-loading .tt-stats { opacity: .5; transition: opacity .15s .1s; }
.is-demo #results.is-loading .tt-summary::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--z-teal), transparent) no-repeat;
  background-size: 35% 100%;
  animation: tt-load 1s linear infinite;
}
@keyframes tt-load { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) { .is-demo #results.is-loading .tt-summary::after { animation: none; background-size: 100% 100%; } }

/* ---------------------------------------------------------------- table */
.is-demo .tt-wrap {
  overflow: auto;
  max-height: max(260px, calc(100dvh - var(--topbar-h, 54px) - 214px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  overscroll-behavior: contain;
}
.is-demo .tt-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.is-demo .tt-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0;
  font-size: .75rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  color: var(--ink-soft);
  background: var(--z-surface-2);
  border-bottom: 1px solid var(--line);
}
.is-demo .tt-table th:not(.tt-th-sort) { padding: .6rem .9rem; }
.is-demo .tt-table .th-sort-link {
  display: flex;
  align-items: center;
  gap: .35rem;
  width: 100%;
  padding: .6rem .9rem;
  color: inherit;
  text-decoration: none;
  justify-content: flex-start;
}
.is-demo .tt-table .th-sort-link::before { content: none; }
.is-demo .tt-table .th-sort-link:hover { color: var(--ink); }
.is-demo .tt-table .th-sort-link:focus-visible { outline: 0; box-shadow: inset var(--z-ring); }
.is-demo .tt-sort-ic { flex: none; opacity: .35; transition: opacity .12s; }
.is-demo .tt-table .th-sort-link:hover .tt-sort-ic { opacity: .8; }
.is-demo .tt-table th.is-sorted { color: var(--z-accent-text); }
.is-demo .tt-table th.is-sorted .tt-sort-ic { opacity: 1; }
.is-demo .tt-table .tt-c-num { text-align: right; }
.is-demo .tt-table th.tt-c-num .th-sort-link { justify-content: flex-end; }

.is-demo .tt-table td {
  padding: .68rem .9rem;
  white-space: nowrap;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: background .08s;
}
body.is-demo.tt-compact .tt-table td { padding-top: .34rem; padding-bottom: .34rem; }
body.is-demo.tt-compact .tt-table { font-size: .82rem; }
.is-demo .tt-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--z-surface-2) 70%, var(--surface)); }
.is-demo .tt-table tbody tr:hover td { background: color-mix(in srgb, var(--z-teal) 7%, var(--surface)); }
.is-demo .tt-table tbody tr:last-child td { border-bottom: 0; }
.is-demo .tt-table tr.row-clickable:focus-within { outline: 0; background: none; }
.is-demo .tt-table tr.row-clickable:focus-within td { background: var(--z-accent-soft); }
.is-demo .tt-table tr.row-clickable:focus-within td:first-child { box-shadow: inset 2px 0 0 var(--z-teal); }

.is-demo .tt-table .row-link {
  font: 500 .84rem var(--z-mono);
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
}
.is-demo .tt-table tr:hover .row-link { color: var(--z-accent-text); text-decoration: underline; text-underline-offset: 3px; }
.is-demo .tt-n { display: inline-block; min-width: 2.4em; text-align: right; font-variant-numeric: tabular-nums; }
.is-demo .tt-none { color: var(--z-ink-faint); }
.is-demo .tt-hbar {
  display: inline-block;
  width: 48px;
  height: 5px;
  margin-right: .7rem;
  overflow: hidden;
  vertical-align: middle;
  background: var(--line);
  border-radius: 3px;
}
.is-demo .tt-hbar i { display: block; height: 100%; border-radius: 3px; }
.is-demo .tt-c-zone { color: var(--ink-soft); }
.is-demo td.tt-c-xy { font: 400 .78rem var(--z-mono); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.is-demo .tt-c-xy i { margin: 0 .4rem; font-style: normal; color: var(--z-ink-faint); }
.is-demo .tt-src {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .12rem .5rem;
  font-size: .74rem;
  font-weight: 500;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.is-demo .tt-src svg { color: var(--z-teal); }
.is-demo .tt-src.is-manual { color: var(--z-accent-text); background: var(--z-accent-soft); border-color: transparent; }

.is-demo .tt-status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  height: 22px;
  padding: 0 .6rem;
  font-size: .74rem;
  font-weight: 500;
  border-radius: 999px;
}
.is-demo .tt-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.is-demo .tt-status.is-todo { color: var(--ink-soft); background: var(--z-surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.is-demo .tt-status.is-todo i { background: var(--z-ink-faint); }
.is-demo .tt-status.is-done { color: var(--z-ok-ink); background: var(--z-ok-soft); }
.is-demo .tt-status.is-rejected { color: var(--z-no-ink); background: var(--z-no-soft); }

.is-demo .tt-c-act { width: 1%; text-align: right; }
.is-demo .tt-act {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--ink-soft);
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}
.is-demo .tt-act:hover { color: var(--ink); background: var(--surface); border-color: var(--line); }
.is-demo .tt-act:focus-visible { outline: 0; box-shadow: var(--z-ring); }
.is-demo .tt-c-meta { display: none; }

/* -------------------------------------------------------------- pager */
.is-demo .tt-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .6rem;
  padding: .5rem .9rem;
  font-size: .8rem;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
}
.is-demo .tt-size { display: inline-flex; align-items: center; gap: .45rem; margin-right: auto; }
.is-demo .tt-size select { min-height: 0; height: 30px; width: auto; padding: 0 1.6rem 0 .5rem; font-size: .8rem; border-radius: 6px; }
.is-demo .tt-range, .is-demo .tt-pageno { font-variant-numeric: tabular-nums; }
.is-demo .tt-range { color: var(--ink); }
.is-demo .tt-pageno { min-width: 4.5em; text-align: center; }
.is-demo .tt-page {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.is-demo .tt-page:hover { border-color: var(--z-teal); background: var(--z-accent-soft); }
.is-demo .tt-page.is-disabled { opacity: .35; pointer-events: none; }

/* -------------------------------------------------------------- empty */
.is-demo .tt-empty {
  padding: 3.5rem 1.25rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
}
.is-demo .tt-empty-ic {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: .8rem;
  color: var(--z-accent-text);
  background: var(--z-accent-soft);
  border-radius: 50%;
}
.is-demo .tt-empty h2 { margin: 0 0 .3rem; font-size: 1.05rem; font-weight: 600; }
.is-demo .tt-empty p { margin: 0; color: var(--ink-soft); font-size: .88rem; }
.is-demo .tt-empty-btn {
  display: inline-flex;
  margin-top: 1.1rem;
  padding: .5rem .95rem;
  font-size: .84rem;
  font-weight: 500;
  color: var(--z-on-primary);
  text-decoration: none;
  background: var(--z-primary);
  border-radius: 8px;
}
.is-demo .tt-empty-btn:hover { background: var(--z-primary-hover); }

/* Narrower desks: the coordinates and the button words go first. */
@media (max-width: 1240px) {
  .is-demo .tt-c-xy { display: none; }
  .is-demo .tt-density span { display: none; }
}
@media (max-width: 1020px) {
  .is-demo .tt-c-src { display: none; }
  .is-demo .tt-stats { gap: 1.25rem; }
}

/* -------------------------------------------------------------- phone */
@media (max-width: 640px) {
  .is-demo .filters {
    position: static;
    margin: 0;
    padding: 0;
    background: none;
  }
  .is-demo .filters-primary { flex-wrap: wrap; gap: .5rem; }
  .is-demo .filters .field-search { flex: 1 1 100%; min-width: 0; }
  .is-demo .filters .field-search input { height: 42px; font-size: 16px; }
  .is-demo .tt-bar { flex-direction: column; align-items: stretch; gap: .5rem; width: 100%; }
  /* One row of chips that scrolls on its own; the page never does. */
  .is-demo .tt-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px 2px;
    scrollbar-width: none;
  }
  .is-demo .tt-filters::-webkit-scrollbar { display: none; }
  .is-demo .tt-filters > * { flex: none; }
  .is-demo .tt-tools { width: 100%; margin: 0; }
  .is-demo .tt-sort { display: block; flex: 1 1 auto; min-width: 0; }
  .is-demo .tt-sort select { width: 100%; height: 38px; }
  .is-demo .tt-density { display: none; }
  .is-demo .tt-btn { height: 38px; }
  .is-demo .tt-btn span { display: none; }

  .is-demo .tt-summary { gap: .5rem; padding: .7rem .85rem; }
  .is-demo .tt-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; margin: 0; gap: .75rem; }
  .is-demo .tt-stats dt { font-size: .58rem; letter-spacing: .05em; }
  .is-demo .tt-zone-bar { display: none; }

  .is-demo .tt-wrap { max-height: none; overflow: visible; }
  .is-demo .tt-table, .is-demo .tt-table tbody { display: block; }
  .is-demo .tt-table thead { display: none; }
  .is-demo .tt-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "id st act" "meta meta act";
    align-items: center;
    gap: .25rem .6rem;
    padding: .65rem .5rem .65rem .85rem;
    border-bottom: 1px solid var(--line);
  }
  .is-demo .tt-table tbody tr:last-child { border-bottom: 0; }
  .is-demo .tt-table tbody tr td { display: none; padding: 0; border: 0; background: none !important; }
  .is-demo .tt-table .tt-c-id { display: block; grid-area: id; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .is-demo .tt-table .row-link { font-size: .9rem; }
  .is-demo .tt-table .tt-c-st { display: block; grid-area: st; }
  .is-demo .tt-table .tt-c-meta { display: block; grid-area: meta; font-size: .8rem; color: var(--ink-soft); white-space: normal; font-variant-numeric: tabular-nums; }
  .is-demo .tt-table .tt-c-act { display: flex; grid-area: act; width: auto; }
  .is-demo .tt-table .tt-act { width: 40px; height: 40px; border-color: var(--line); }
  .is-demo .tt-table .tt-act-open { display: none; }

  .is-demo .tt-pager { flex-wrap: wrap; gap: .5rem; }
  .is-demo .tt-size { display: none; }
  .is-demo .tt-range { margin-right: auto; }
}

/* ============================================ polish after review (demo)

   Small, demo-only corrections from the walk-through: page width, the order
   of the map panel, toasts that stay clear of the bar, the phone drawer and
   its tool-in-hand pill, the walk cards, and the record page. */

/* style.css reserves a scrollbar's width on every page; on the demo's
   full-bleed login and full-screen map that was an empty strip on the right.
   The register keeps it. */
html:has(> body.is-demo) { scrollbar-gutter: auto; }

/* The map panel, in the order the work is done: the tools, then the review
   of the zones (with its progress and "next zone"), then the checks. */
.is-demo #review-panel > .ms-drawer-head { order: 0; }
.is-demo #review-panel > #ms-tools { order: 1; }
.is-demo #review-panel > #ms-zones { order: 2; }
.is-demo #review-panel > #ms-anomalies { order: 3; }
.is-demo #review-panel > #rp-sec-filters { order: 4; }
.is-demo #review-panel > #rp-sec-layers { order: 5; }
.is-demo #review-panel > #ms-species { order: 6; }
.is-demo .ms-drawer-head { display: none; }

/* Toasts under the top bar, never over it. */
.is-demo .toasts { top: calc(var(--topbar-h, 54px) + 10px); }
/* On the map, centred on the map rather than the page, clear of the panel
   and of the place chip in its corner. */
@media (min-width: 861px) {
  body.is-demo:has(#map-view:not([hidden])) .toasts { left: calc(50% + 170px); width: min(26rem, calc(100vw - 400px)); }
}

@media (max-width: 860px) {
  /* The drawer: a header with its own close, and the map dimmed beside it
     (touching the dimmed map still closes it, as before). */
  .is-demo #map-view:has(.map-side.is-open) .leaflet-container { filter: brightness(.6) saturate(.85); }
  .is-demo #map-view .leaflet-container { transition: filter .2s ease; }
  .is-demo .ms-drawer-head {
    position: sticky;
    top: -12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -12px -12px 0;
    padding: 8px 8px 8px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .is-demo .ms-drawer-head strong { font-size: .9rem; font-weight: 600; }
  .is-demo .ms-drawer-close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--ink);
    background: none;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
  }
  .is-demo .ms-drawer-close:hover { background: var(--z-surface-2); }

  /* One toast at a time, beside the tools button rather than over it. */
  .is-demo .toasts {
    left: 64px;
    right: 60px;
    width: auto;
    max-width: 30rem;
    transform: none;
  }
  .is-demo .toasts > .toast:not(:last-child) { display: none; }
}

/* The tool in hand, on the map, while the drawer is shut (touch layouts). */
.is-demo .map-toolpill {
  position: absolute;
  z-index: 800;
  left: 50%;
  /* Clear of the legend (it carries the points/crowns switch) and the imagery button. */
  bottom: calc(env(safe-area-inset-bottom, 0px) + 268px);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 14px;
  height: 40px;
  font-size: .84rem;
  font-weight: 600;
  color: #fff;
  background: var(--z-navy);
  border-radius: 999px;
  box-shadow: var(--z-ctrl-shadow);
  transform: translateX(-50%);
  white-space: nowrap;
}
.is-demo .map-toolpill::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--z-aqua);
}
.is-demo .map-toolpill.is-erase::before { background: #f87171; }
.is-demo .map-toolpill[hidden] { display: none; }
.is-demo .map-toolpill-end {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
@media (min-width: 861px) { .is-demo .map-toolpill { display: none; } }

/* Leaflet's white text-shadow doubles light text in dark mode. */
.is-demo .leaflet-control-scale-line { text-shadow: none; }

/* An added tree waits in navy until confirmed (the marker is navy too). */
.is-demo .lg-dot.is-new,
.is-demo .rp-dot.is-new { background: var(--z-navy); box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px var(--z-line-strong); }

/* The walk card: Keep and Delete lead, the record is a quiet link. */
:root body.is-demo .zn-qcard .tc-go {
  color: var(--z-accent-text);
  background: none;
  border-color: var(--line);
}
:root body.is-demo .zn-qcard .tc-go:hover { background: var(--z-surface-2); }
.is-demo .zn-qcard button svg { flex: 0 0 auto; vertical-align: -2px; }
.is-demo .zn-qcard kbd {
  margin-left: 4px;
  padding: 0 5px;
  font: 500 .66rem/1.5 var(--z-mono);
  color: inherit;
  background: rgba(127, 143, 150, .14);
  border: 1px solid rgba(127, 143, 150, .35);
  border-radius: 4px;
  opacity: .85;
}
.is-demo .an-chip.is-donor b { margin-left: 2px; }
.is-demo .an-meta span svg { color: #b45309; vertical-align: -1px; }

/* The scale bar clears the zone bar and the walk card on a phone. */
@media (max-width: 860px) {
  body.is-demo:has(.zn-mbar:not([hidden])) .leaflet-control-scale,
  body.is-demo:has(.zn-qcard) .leaflet-control-scale { display: none; }
}

/* The table: the chip row never wraps on a tablet either, and the card
   leaves room for the pager. */
@media (min-width: 641px) and (max-width: 1020px) {
  .is-demo .tt-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .is-demo .tt-filters > * { flex: none; }
  .is-demo .tt-wrap { max-height: max(260px, calc(100dvh - var(--topbar-h, 54px) - 260px)); }
}
@media (max-width: 640px) {
  /* A fade says the chip row goes on past the edge. */
  .is-demo .tt-filters {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
}
.is-demo .tt-pop input[type=radio]:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.is-demo .tt-rej { color: var(--z-no-ink); }

/* ------------------------------------------------------- the record page */

/* What a detection is, first: five figures in a strip under the header. */
.is-demo .tr-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 1.25rem;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.is-demo .tr-facts > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface);
}
.is-demo .tr-facts span {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.is-demo .tr-facts b { font: 600 1.25rem/1.2 var(--z-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.is-demo .tr-facts b.is-text { font-family: inherit; font-size: .95rem; line-height: 1.3; }
.is-demo .tr-facts b.mono { font-size: .95rem; overflow-wrap: anywhere; }
.is-demo .tr-facts-st {
  align-self: flex-start;
  padding: 1px 8px;
  font-size: .72rem;
  font-style: normal;
  font-weight: 500;
  border-radius: 999px;
  color: var(--z-accent-text);
  background: var(--z-accent-soft);
}
.is-demo .tr-facts-st.is-done { color: var(--z-ok-ink); background: var(--z-ok-soft); }
.is-demo .tr-facts-st.is-rejected { color: var(--z-no-ink); background: var(--z-no-soft); }
@media (max-width: 860px) {
  .is-demo .tr-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .is-demo .tr-facts > .is-wide { grid-column: 1 / -1; }
}

/* The register's other fields: only those that hold something, until the
   record is opened for editing - then every field, so any can be filled. */
.is-demo .tree-record:not(.is-editing) .tr-row:has(.tr-value > .tr-empty) { display: none; }
.is-demo .tree-record:not(.is-editing) .tr-col:not(:has(.tr-quad .tr-value > :not(.tr-empty):not(.sr-only))) .tr-sublabel { display: none; }
.is-demo .tree-record:not(.is-editing) .tr-col:not(:has(.tr-value > :not(.tr-empty):not(.sr-only))) { display: none; }
.is-demo .tree-record:not(.is-editing) .tr-section:not(:has(.tr-value > :not(.tr-empty):not(.sr-only))) { display: none; }

/* The aerial crop names its tree: a ring at the centre. */
.is-demo .tr-shot--ortho::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(12, 22, 29, .5), inset 0 0 0 1px rgba(12, 22, 29, .35);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* A long tree number wraps on a phone instead of leaving the card. */
.is-demo .tr-head-id { min-width: 0; }
.is-demo .tr-head-id h1 { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  /* The photo above the title on a phone, so the number has the width. */
  .is-demo .tr-head { grid-template-columns: minmax(0, 1fr); }
  .is-demo .tr-head-shots { width: 100%; }
  .is-demo .tr-head-id h1 { font-size: 1.2rem; overflow-wrap: normal; }
}

/* A tablet docks the walk card at the foot of the map, as a phone does,
   rather than under the tools button. */
@media (min-width: 601px) and (max-width: 860px) {
  .is-demo .zn-qcard:not(.an-card) { z-index: 1001; top: auto; bottom: 12px; left: 12px; right: auto; width: min(420px, calc(100% - 24px)); max-height: 55%; }
}

/* ======================================== the review, tree by tree

   The Zones tool (list.ejs, enterPicker): the zone in hand sits under the
   map tools as one quiet line - back, "Zone 12", how many trees - with the
   dim and lock boxes under it. The walk card is the control. */
.is-demo .zn-inline { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.is-demo .zn-inline .zn-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.is-demo .zn-inline .zn-kind { margin-left: auto; font-size: .76rem; font-weight: 400; color: var(--ink-soft); background: none; padding: 0; }
.is-demo .zn-inline .rp-check { font-size: .78rem; }

/* A measure on its way: a quiet "…" where the number will be. */
.is-demo .tc-wait { font-style: normal; color: var(--z-ink-faint); animation: tc-wait 1.2s ease-in-out infinite; }
@keyframes tc-wait { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .is-demo .tc-wait { animation: none; } }

/* An accepted tree on the map: teal, with a white tick over the dot. */
.is-demo .tree-ok { background: none; border: 0; pointer-events: none; }
.is-demo .tree-ok svg { display: block; }
.is-demo .lg-dot.is-accepted {
  background: #0ea1ac url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
  box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px var(--z-line-strong);
}
.is-demo .map-legend .lg-dot.is-accepted { width: 10px; height: 10px; }

/* Points or crowns: a two-way switch at the head of the legend. */
.is-demo .lg-style {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 2px 0 6px;
  padding: 2px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.is-demo .lg-style button {
  height: 24px;
  padding: 0 8px;
  font-family: inherit;
  font-size: .7rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.is-demo .lg-style button:hover { color: var(--ink); }
.is-demo .lg-style button[aria-pressed="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px rgba(12, 22, 29, .12); }
.is-demo .lg-style button:focus-visible { outline: none; box-shadow: var(--z-ring); }

/* Accepted, wherever a tree's state is written. */
.is-demo .tt-status.is-accepted,
.is-demo .tr-facts-st.is-accepted { color: var(--z-accent-text); background: var(--z-accent-soft); }
.is-demo .tt-dot.is-accepted { background: var(--z-teal); }
.is-demo .tt-zone-bar .is-accepted { background: var(--z-teal); }

/* The walk card, and the anomaly card after it: one calm card. A header
   line (where, which tree, two quiet icon buttons), the close-up with a ring
   on the tree, the figures, then the actions on an 8 px grid. One accent. */
:root body.is-demo .wk-card {
  width: 300px;
  padding: 8px 12px 12px;
  border-radius: 8px;
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(6, 12, 16, .12), 0 8px 24px rgba(6, 12, 16, .16);
}
.is-demo .wk-head { display: flex; align-items: center; gap: 4px; min-height: 32px; margin-bottom: 8px; }
.is-demo .wk-where { display: flex; align-items: baseline; gap: 6px; flex: 1 1 auto; min-width: 0; margin: 0; font-size: .78rem; color: var(--ink-soft); }
.is-demo .wk-pos { font-variant-numeric: tabular-nums; white-space: nowrap; }
.is-demo .wk-sep { color: var(--z-ink-faint); }
.is-demo .wk-id { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 .78rem var(--z-mono); color: var(--ink); }
.is-demo .wk-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.is-demo .wk-icon:hover:not(:disabled) { color: var(--ink); background: var(--z-surface-2); }
.is-demo .wk-icon:disabled { opacity: .35; cursor: default; }
.is-demo .wk-icon:focus-visible,
.is-demo .wk-btn:focus-visible,
.is-demo .wk-link:focus-visible { outline: none; box-shadow: var(--z-ring); }

/* The card inside: no second frame, the id already in the header. */
.is-demo .wk-card .tree-card { padding: 0; }
.is-demo .wk-card .tc-head,
.is-demo .wk-card .tc-go { display: none; }
.is-demo .wk-card .tc-shot,
.is-demo .an-card .tc-shot { height: 128px; margin-bottom: 8px; border-radius: 6px; }
.is-demo .wk-card .tc-shot::after,
.is-demo .an-card .tc-shot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(12, 22, 29, .45);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.is-demo .wk-card .tc-measures { grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 8px; }
.is-demo .wk-card .tc-measure { flex-direction: row; align-items: baseline; gap: 8px; text-align: left; }
.is-demo .wk-card .tc-measure svg { display: none; }
.is-demo .wk-card .tc-measure > div { display: flex; flex-direction: column; width: 100%; }
.is-demo .wk-card .tc-measure span { display: block; min-height: 0; font-size: .72rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.is-demo .wk-card .tc-measure b { font-size: .95rem; font-weight: 500; }

.is-demo .wk-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: .78rem;
  color: var(--ink-soft);
}
.is-demo .wk-status svg { width: 14px; height: 14px; color: var(--z-accent-text); }
.is-demo .wk-status.is-accepted > span { color: var(--z-accent-text); font-weight: 500; }
.is-demo .wk-status.is-rejected > span { color: var(--ink); font-weight: 500; }
.is-demo .wk-link {
  margin-left: auto;
  padding: 0;
  font: inherit;
  color: var(--ink-soft);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.is-demo .wk-link:hover { color: var(--ink); }
.is-demo .wk-card.is-removed .tc-shot,
.is-demo .wk-card.is-removed .tc-measures { opacity: .5; }

.is-demo .wk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.is-demo .wk-actions > :only-child { grid-column: 1 / -1; }
.is-demo .wk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
  padding: 0 12px;
  font-family: inherit;
  font-size: .84rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--z-line-strong);
  border-radius: 6px;
  cursor: pointer;
}
.is-demo .wk-btn:hover { background: var(--z-surface-2); }
.is-demo .wk-btn--primary { color: var(--z-on-primary); background: var(--z-primary); border-color: var(--z-primary); }
.is-demo .wk-btn--primary:hover { background: var(--z-primary-hover); border-color: var(--z-primary-hover); }
.is-demo .wk-card kbd { margin-left: 4px; background: transparent; border-color: currentColor; opacity: .55; }
@media (pointer: coarse) { .is-demo .wk-card kbd { display: none; } }
@media (max-width: 600px) {
  :root body.is-demo .wk-card { width: auto; }
  .is-demo .wk-card .tc-shot { height: 96px; }
}

/* The anomaly card, in the walk card's frame (.wk-card): one muted warning
   colour for what is out of range, navy/teal for the way forward, nothing
   boxed inside a box. */
.is-demo .an-card { --an-warn: #a8660a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.is-demo .an-card { --an-warn: #d9a54c; }
}
:root[data-theme="dark"] body.is-demo .an-card { --an-warn: #d9a54c; }

.is-demo .an-card.wk-card .tc-shot { margin-bottom: 8px; }
.is-demo .an-sub { display: flex; align-items: baseline; gap: 6px; margin: 0 0 8px; font-size: .76rem; color: var(--ink-soft); }
.is-demo .an-flag { color: var(--an-warn); font-weight: 500; }
.is-demo .an-card .tc-measures { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 4px; }
.is-demo .an-card .tc-measure { display: block; text-align: left; }
.is-demo .an-card .tc-measure span { display: block; min-height: 0; font-size: .72rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.is-demo .an-card .tc-measure b { font-size: .95rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.is-demo .an-card .tc-measure.is-out b { color: var(--an-warn); }

.is-demo .an-rows { display: flex; flex-direction: column; }
.is-demo .an-row { padding: 12px 0 0; margin-top: 8px; border-top: 1px solid var(--line); }
.is-demo .an-row-label { margin: 0 0 4px; font-size: .78rem; font-weight: 600; color: var(--ink); }
.is-demo .an-compare { display: flex; align-items: center; gap: 8px; }
.is-demo .an-was { font-size: .95rem; font-variant-numeric: tabular-nums; color: var(--an-warn); }
.is-demo .an-arrow { color: var(--z-ink-faint); }
.is-demo .an-new { display: inline-flex; align-items: center; gap: 4px; font-size: .84rem; color: var(--ink-soft); }
:root body.is-demo .an-new input {
  width: 72px;
  height: 32px;
  min-height: 0;
  padding: 0 8px;
  font: 500 .95rem var(--z-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--z-line-strong);
  border-radius: 6px;
}
:root body.is-demo .an-new input:focus { outline: none; border-color: var(--z-teal); box-shadow: var(--z-ring); }

/* The plausible range: a thin track, the band on it, two ticks. */
.is-demo .an-rangebar { position: relative; height: 12px; margin: 8px 0 0; }
.is-demo .an-rangebar::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: var(--line); border-radius: 1px; }
.is-demo .an-rangefill { position: absolute; top: 4px; height: 4px; background: color-mix(in srgb, var(--z-teal) 45%, transparent); border-radius: 2px; }
.is-demo .an-mark { position: absolute; top: 1px; width: 2px; height: 10px; margin-left: -1px; border-radius: 1px; }
.is-demo .an-mark.is-cur { background: var(--an-warn); }
.is-demo .an-mark.is-new { background: var(--ink); }
.is-demo .an-range { margin: 4px 0 0; font-size: .72rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.is-demo .an-src {
  display: block;
  margin: 4px 0 0;
  padding: 0;
  font: inherit;
  font-size: .76rem;
  text-align: left;
  color: var(--z-accent-text);
  background: none;
  border: 0;
  cursor: pointer;
}
.is-demo button.an-src:hover { text-decoration: underline; text-underline-offset: 2px; }
.is-demo .an-src.is-text { color: var(--ink-soft); cursor: default; }
.is-demo .an-acts { display: flex; gap: 8px; margin-top: 8px; }
.is-demo .an-acts .wk-btn--primary { flex: 1 1 auto; }
.is-demo .wk-btn--quiet { color: var(--ink-soft); background: none; border-color: transparent; }
.is-demo .wk-btn--quiet:hover { color: var(--ink); background: var(--z-surface-2); }
.is-demo .an-row-state { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .8rem; color: var(--ink-soft); }
.is-demo .an-row-state svg { width: 14px; height: 14px; color: var(--z-accent-text); }
.is-demo .an-row.is-done .an-row-state > span:first-of-type { color: var(--ink); font-weight: 500; }
.is-demo .an-row.is-done .an-was { margin-left: auto; font-size: .76rem; text-decoration: line-through; color: var(--z-ink-faint); }
@media (max-width: 600px) {
  .is-demo .an-card.wk-card { max-height: 62%; }
}

/* A removed tree's card: the same card, its button puts the tree back. */
body.is-demo .tree-card.is-removed .tc-shot { filter: grayscale(.6); }
body.is-demo .tree-card.is-removed .tc-head em { color: #b3261e; font-style: normal; }
body.is-demo .tc-putback { width: 100%; border: 0; cursor: pointer; font: inherit; }

/* The tool hint, floating at the bottom of the map (desktop; the phone has its pill). */
.is-demo .map-toolhint {
  position: absolute; z-index: 800; left: 50%; bottom: 16px; transform: translateX(-50%);
  margin: 0; max-width: calc(100% - 340px); width: max-content; padding: 7px 14px;
  font-size: .8rem; line-height: 1.35; text-align: center; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.is-demo .map-toolhint .rp-hint { margin: 0; font-size: .8rem; white-space: nowrap; }
.is-demo .map-toolhint .rp-size { margin: 0; padding: 0 0 6px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; align-self: stretch; justify-content: center; flex: 0 0 auto; display: flex; align-items: center; flex-wrap: nowrap; }
.is-demo .map-toolhint .rp-size input { min-width: 90px; }
@media (max-width: 860px) {
  /* The phone's pill names the tool; the box keeps only the brush size, under it. */
  .is-demo .map-toolhint { bottom: calc(env(safe-area-inset-bottom, 0px) + 318px); max-width: calc(100% - 32px); }
  .is-demo .map-toolhint .rp-hint { white-space: normal; }
  .is-demo .map-toolhint .rp-hint { display: none; }
  .is-demo .map-toolhint .rp-size { padding: 0; border-left: 0; min-width: 0; }
  .is-demo .map-toolhint:not(:has(.rp-size:not([style*="none"]))) { display: none; }
}

/* One colour per kind of tree: to check (amber), accepted (green), added by hand (violet). */
.is-demo .lg-dot.is-detected, .is-demo .rp-dot.is-detected { background: #f2b233; }
.is-demo .map-legend .lg-dot.is-accepted, .is-demo .lg-dot.is-accepted { background: #22c55e; width: 8px; height: 8px; }
.is-demo .lg-dot.is-new, .is-demo .rp-dot.is-new { background: #a78bfa; }
.is-demo .lg-dot { box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px var(--z-line-strong); }

/* The last action, at the head of the map box. */
.is-demo .map-toolhint .rp-status { margin: 0; padding: 0 0 6px; align-self: stretch; text-align: center; font-size: .8rem; font-weight: 600; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.is-demo .map-toolhint .rp-status[hidden] { display: none; }
@media (max-width: 860px) { .is-demo .map-toolhint .rp-status { display: none; } }

/* The anomaly walk in progress: count, bar, one row of actions; the keys behind a keyboard icon. */
.is-demo .an-demo .an-bar { box-shadow: none; }
.is-demo .an-bar-actions { display: flex; align-items: center; gap: 6px; }
.is-demo .an-act { flex: 1 1 auto; height: 32px; padding: 0 10px; font-family: inherit; font-size: .8rem; font-weight: 600; white-space: nowrap; color: var(--z-on-primary); background: var(--z-primary); border: 0; border-radius: 6px; cursor: pointer; }
.is-demo .an-act:hover { background: var(--z-primary-hover); }
.is-demo .an-act.is-quiet { flex: 0 0 auto; color: var(--ink); background: transparent; border: 1px solid var(--line); }
.is-demo .an-act.is-quiet:hover { background: var(--z-surface-2); }
.is-demo .an-keyhelp { position: relative; display: grid; place-items: center; width: 32px; height: 32px; color: var(--ink-soft); border-radius: 6px; cursor: help; }
.is-demo .an-keyhelp:hover, .is-demo .an-keyhelp:focus-visible { color: var(--ink); background: var(--z-surface-2); outline: none; }
.is-demo .an-keyhelp::after { content: attr(data-tip); position: absolute; right: 0; bottom: calc(100% + 6px); width: 220px; padding: 8px 10px; font-size: .74rem; line-height: 1.5; color: var(--surface); background: var(--ink); border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 5; }
.is-demo .an-keyhelp:hover::after, .is-demo .an-keyhelp:focus-visible::after { opacity: 1; }

/* The dialog says what it checks through its fields; no scope banner. */
.is-demo .an-dialog .an-scope { display: none; }

/* Two measurements out at once: compact rows, one Apply for both. */
.is-demo .an-row.is-compact { padding-top: 10px; }
.is-demo .an-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.is-demo .an-row-top .an-row-label { flex: 1 0 100%; margin: 0; }
.is-demo .an-row.is-compact .an-was { white-space: nowrap; }
.is-demo .an-row-top .an-row-x { margin-left: auto; }
.is-demo .an-row.is-compact .an-compare { margin: 0; }
.is-demo .an-row.is-compact .an-new input { width: 64px; }
.is-demo .an-row-x { width: 26px; height: 26px; }
.is-demo .an-row.is-compact .an-range { margin-top: 4px; display: inline; }
.is-demo .an-row.is-compact .an-src { display: inline; font-size: .72rem; }
.is-demo .an-acts-all { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* The table's tree preview (eye button). */
.is-demo .pk-demo { width: min(360px, calc(100vw - 32px)); padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(6, 12, 16, .3); }
.is-demo .pk-demo::backdrop { background: rgba(6, 12, 16, .45); }
.is-demo .pk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.is-demo .pk-id { font: 500 .86rem var(--z-mono); }
.is-demo .pk-head .tt-status { font-size: .72rem; }
.is-demo .pk-x { margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; color: var(--ink-soft); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.is-demo .pk-x:hover { color: var(--ink); background: var(--z-surface-2); }
.is-demo .pk .tc-shot { position: relative; height: 150px; margin: 0 0 12px; border-radius: 8px; overflow: hidden; }
.is-demo .pk .tc-shot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.is-demo .pk-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 10px; }
.is-demo .pk-figs dt { font-size: .72rem; color: var(--ink-soft); }
.is-demo .pk-figs dt { white-space: nowrap; }
.is-demo .pk-figs dd { margin: 2px 0 0; font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.is-demo .pk-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.is-demo .pk-src { font-size: .74rem; }
.is-demo .pk-record { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--z-accent-text); text-decoration: none; }
.is-demo .pk-record:hover { text-decoration: underline; }
.is-demo .pk-demo .peek-actions { display: flex; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.is-demo .pk-demo .peek-actions #peek-map { flex: 1; justify-content: center; }
.is-demo .pk-demo #peek-close { display: none; }

/* No ring over the close-ups: the tree is the one at the centre. */
/* Rings back on the table preview and the map hover card; still none on the walk and anomaly cards. */
.is-demo .wk-card .tc-shot::after, .is-demo .an-card .tc-shot::after, .is-demo .rec-shot::after, .is-demo .tree-photo-ring { content: none !important; display: none !important; }
.is-demo .tr-shot--ortho::after { content: none !important; display: none !important; }

/* The demo's tree record: the close-up beside one card that holds the decision. */
.is-demo .rd { max-width: 1120px; margin: 0 auto; padding: 20px 24px 40px; }
.is-demo .rd-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.is-demo .rd-back { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.is-demo .rd-back:hover { color: var(--ink); }
.is-demo .rd-top-acts { display: flex; gap: 8px; }
.is-demo .rd-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; font: inherit; font-size: .82rem; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; cursor: pointer; }
.is-demo .rd-btn:hover { background: var(--z-surface-2); }
.is-demo .rd-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.is-demo .rd-shot { margin: 0; }
.is-demo .rd-shot-frame { position: relative; aspect-ratio: 1; max-width: 560px; overflow: hidden; border-radius: 12px; background: var(--z-surface-2); border: 1px solid var(--line); }
.is-demo .rd-shot-frame .tc-tile { position: absolute; max-width: none; }
.is-demo .rd-shot figcaption { margin-top: 8px; font-size: .74rem; color: var(--ink-soft); }
.is-demo .rd-card { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.is-demo .rd-kicker { margin: 0; font-size: .74rem; color: var(--ink-soft); }
.is-demo .rd-id { margin: 2px 0 10px; font: 500 1.35rem var(--z-mono); letter-spacing: -.01em; }
.is-demo .rd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.is-demo .rd-status, .is-demo .rd-src { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; font-size: .74rem; font-weight: 600; border-radius: 999px; border: 1px solid var(--line); }
.is-demo .rd-status i { width: 7px; height: 7px; border-radius: 50%; background: #f2b233; }
.is-demo .rd-status.is-accepted i { background: #22c55e; }
.is-demo .rd-src { font-weight: 500; color: var(--ink-soft); }
.is-demo .rd-measures { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-bottom: 18px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.is-demo .rd-measures > div { padding: 12px 14px; background: var(--surface); }
.is-demo .rd-measures span { display: block; font-size: .74rem; color: var(--ink-soft); }
.is-demo .rd-measures b { display: block; margin-top: 2px; font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.is-demo .rd-decide { display: flex; gap: 8px; margin-bottom: 20px; }
.is-demo .rd-accept, .is-demo .rd-reject, .is-demo .rd-undo { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; font: inherit; font-size: .88rem; font-weight: 600; border-radius: 8px; cursor: pointer; }
.is-demo .rd-accept { flex: 1; color: #fff; background: #15803d; border: 0; }
.is-demo .rd-accept:hover { background: #166534; }
.is-demo .rd-undo { flex: 1; color: var(--ink); background: var(--z-surface-2); border: 1px solid var(--line); }
.is-demo .rd-reject { color: var(--danger); background: transparent; border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line)); }
.is-demo .rd-reject:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.is-demo .rd-decide button:disabled { opacity: .6; cursor: progress; }
.is-demo .rd-facts { margin: 0; border-top: 1px solid var(--line); }
.is-demo .rd-facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.is-demo .rd-facts > div:last-child { border-bottom: 0; }
.is-demo .rd-facts dt { color: var(--ink-soft); }
.is-demo .rd-facts dd { margin: 0; text-align: right; font-weight: 500; }
.is-demo .rd-facts dd.mono { font-family: var(--z-mono); font-size: .8rem; }
@media (max-width: 860px) {
  .is-demo .rd { padding: 14px 16px 32px; }
  .is-demo .rd-grid { grid-template-columns: 1fr; }
  .is-demo .rd-shot-frame { aspect-ratio: 4 / 3; }
  .is-demo .rd-btn { padding: 0 10px; }
}
.is-demo .rd-shot-inner { position: absolute; left: 50%; top: 50%; width: 560px; height: 560px; transform: translate(-50%, -50%); }
@media (max-width: 860px) { .is-demo .rd-top { flex-wrap: wrap; } .is-demo .rd-back { flex: 1 0 100%; } .is-demo .rd-top-acts { flex: 1; } .is-demo .rd-top-acts .rd-btn { flex: 1; justify-content: center; } .is-demo .rd-shot-frame { max-width: none; } }

/* The zone scan: its button in the zone panel, the sweep while it runs, its card. */
.is-demo .zn-scan { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; margin: 8px 0 10px; padding: 0 12px; font: inherit; font-size: .84rem; font-weight: 600; color: var(--z-on-primary); background: var(--z-primary); border: 0; border-radius: 8px; cursor: pointer; }
.is-demo .zn-scan:hover { background: var(--z-primary-hover); }
.is-demo .zn-scan span { flex: 1; text-align: left; }
.is-demo .zn-scan kbd { color: inherit; opacity: .7; }
.is-demo .zn-scan.is-busy { opacity: .7; cursor: progress; }
.is-demo .is-scanning::after { content: ""; position: absolute; inset: 0; z-index: 650; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(56, 189, 248, .0) 40%, rgba(56, 189, 248, .28) 50%, rgba(56, 189, 248, 0) 60%, transparent 100%);
  background-size: 100% 220%; animation: sc-sweep 1.4s linear infinite; }
@keyframes sc-sweep { from { background-position: 0 100%; } to { background-position: 0 -100%; } }
.is-demo .sc-badge { display: inline-flex; align-items: center; height: 20px; margin-right: 6px; padding: 0 7px; font-size: .7rem; font-weight: 600; color: #0369a1; background: #e0f2fe; border-radius: 999px; }
.is-demo .sc-why { margin: 8px 0 6px; font-size: .78rem; line-height: 1.45; color: var(--ink-soft); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .is-demo .sc-badge { color: #7dd3fc; background: rgba(56, 189, 248, .14); } }

/* In a zone: walk (primary) and scan (secondary); the scan is suggested after a walk. */
.is-demo .zn-walk-demo { margin-bottom: 0; }
.is-demo .zn-scan.is-secondary { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.is-demo .zn-scan.is-secondary:hover { background: var(--z-surface-2); }
.is-demo .zn-scan.is-secondary.is-suggested { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, .22); animation: sc-nudge 1.6s ease-in-out 3; }
@keyframes sc-nudge { 50% { box-shadow: 0 0 0 6px rgba(56, 189, 248, .12); } }
/* Ticks in a square's corner: walked, scanned. */
.is-demo .zn-ticks { display: flex; gap: 2px; pointer-events: none; }
.is-demo .zn-ticks i { display: grid; place-items: center; width: 16px; height: 16px; color: #fff; background: #22c55e; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.is-demo .zn-ticks i.is-scan { background: #38bdf8; }
.is-demo .lg-dot.is-scan, .is-demo .rp-dot.is-scan { background: #38bdf8; }

/* The AI's sensitivity, under the scan button. */
.is-demo .sc-sens { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin: 0 0 12px; font-size: .76rem; color: var(--ink-soft); }
.is-demo .sc-sens b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.is-demo .sc-sens input { grid-column: 1 / -1; width: 100%; }

/* The crown tool's modes, in the map box. */
.is-demo .kr-modes { display: flex; gap: 2px; padding: 2px; background: var(--z-surface-2); border: 1px solid var(--line); border-radius: 8px; }
.is-demo .kr-modes button { height: 28px; padding: 0 12px; font: inherit; font-size: .78rem; font-weight: 600; color: var(--ink-soft); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.is-demo .kr-modes button:hover { color: var(--ink); }
.is-demo .kr-modes button.is-active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px rgba(12, 22, 29, .12); }

/* Five tools in one row: tighter labels, no ellipsis. */
.is-demo .rp-tools { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.is-demo .rp-tool { font-size: .68rem; padding: 6px 1px 4px; }
.is-demo .rp-tool-label { overflow: visible; text-overflow: clip; letter-spacing: -.01em; }
.is-demo .rp-tool kbd { display: none; }
/* The tab icon is zoylan.com's own (src/static/favicon.svg): the mark alone, no tile behind it. */

/* The navbar's active tab: the underline sits under the word, not on the bar's edge. */
.is-demo .topbar-tab.is-active::after { bottom: -2px; left: 2px; right: 2px; height: 2px; }

/* The record: back as a button with the way it goes, the id after it. */
.is-demo .rd-crumbs { display: flex; align-items: center; gap: 10px; min-width: 0; }
.is-demo .rd-back { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 8px; font-size: .84rem; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.is-demo .rd-back:hover { background: var(--z-surface-2); color: var(--ink); }
.is-demo .rd-sep { color: var(--z-line-strong); }
.is-demo .rd-here { font: 500 .84rem var(--z-mono); color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-demo .rd-btn--primary { color: var(--z-on-primary); background: var(--z-primary); border-color: var(--z-primary); }
.is-demo .rd-btn--primary:hover { background: var(--z-primary-hover); }
.is-demo .rd-btn[hidden] { display: none; }
/* Editing in place: the two figures turn into fields. */
.is-demo .rd-measures label { display: block; padding: 12px 14px; background: var(--surface); }
.is-demo .rd-input { display: none; align-items: center; gap: 6px; margin-top: 4px; }
.is-demo .rd-input input { width: 100%; height: 38px; padding: 0 10px; font: 600 1.1rem var(--z-mono); color: var(--ink); background: var(--surface); border: 1px solid var(--z-line-strong); border-radius: 8px; }
.is-demo .rd-input input:focus { outline: none; border-color: var(--z-teal); box-shadow: var(--z-ring); }
.is-demo .rd-input em { font-style: normal; color: var(--ink-soft); }
.is-demo .rd.is-editing .rd-measures b { display: none; }
.is-demo .rd.is-editing .rd-input { display: flex; }
.is-demo .rd.is-editing .rd-decide { opacity: .4; pointer-events: none; }
@media (max-width: 860px) { .is-demo .rd-here { display: none; } .is-demo .rd-sep { display: none; } }

/* The tree page fits the window: no page scroll on a desktop. The photo takes
   the height that is left; the card scrolls inside itself if it ever must. */
@media (min-width: 861px) {
  .is-demo .tree-record { padding-top: 0; padding-bottom: 0; }
  .is-demo .rd { height: calc(100dvh - 56px); display: flex; flex-direction: column; padding-top: 16px; padding-bottom: 16px; box-sizing: border-box; overflow: hidden; }
  .is-demo .rd-top { flex: 0 0 auto; margin-bottom: 12px; }
  .is-demo .rd-grid { flex: 1 1 auto; min-height: 0; align-items: stretch; }
  .is-demo .rd-shot { display: flex; flex-direction: column; min-height: 0; }
  .is-demo .rd-shot-frame { flex: 1 1 auto; min-height: 0; aspect-ratio: auto; max-width: none; }
  .is-demo .rd-card { min-height: 0; overflow: auto; align-self: start; max-height: 100%; box-sizing: border-box; }
}
@media (min-width: 861px) {
  .is-demo .tree-record:has(.rd) { margin: 0; padding: 0; min-height: 0; }
  html:has(.is-demo .rd) { overflow: hidden; }
}
.is-demo .rd-measures .rd-input { display: none; }
.is-demo .rd.is-editing .rd-measures .rd-input { display: flex; }
.is-demo .rd-measures .rd-input em { display: inline; font-size: .9rem; }
.is-demo .rd-shot-inner { width: 820px; height: 820px; }
.is-demo .rd-measures b { color: var(--ink); }

/* Three tree styles in the legend switch; the canopy area under it. */
.is-demo .lg-style { grid-template-columns: repeat(3, 1fr); }
.is-demo .lg-canopy { display: block; margin: 6px 0 2px; font-size: .74rem; font-weight: 600; color: var(--ink); }
.is-demo .lg-canopy[hidden] { display: none; }

/* The canopy area rides in the place chip (top left), not in the legend. */
.is-demo .map-canopy { margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--line); font-weight: 600; color: var(--ink); white-space: nowrap; }
.is-demo .map-canopy[hidden] { display: none; }
/* The tool box keeps one width whatever its hint says. */
@media (min-width: 861px) { .is-demo .map-toolhint { width: 470px; max-width: calc(100% - 340px); } .is-demo .map-toolhint .rp-hint { white-space: normal; text-align: center; } }

/* Tree record, round 3: fixed columns (editing never resizes them), the
   card as tall as the photo, the map link in the card, Save / Cancel in
   place of Accept / Reject while editing, and the tree ringed in the photo. */
@media (min-width: 861px) {
  .is-demo .rd-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .is-demo .rd-card { align-self: stretch; max-height: none; display: flex; flex-direction: column; overflow: auto; }
  .is-demo .rd-shot { align-self: stretch; }
}
.is-demo .rd-maplink { margin-top: auto; justify-content: center; width: 100%; height: 40px; box-sizing: border-box; }
.is-demo .rd-facts { margin-bottom: 16px; }
.is-demo .rd-input { position: relative; }
.is-demo .rd-input input { min-width: 0; box-sizing: border-box; padding-right: 28px; }
.is-demo .rd-input em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.is-demo .rd-input input::-webkit-inner-spin-button { display: none; }
.is-demo .rd-input input { -moz-appearance: textfield; }
.is-demo .rd-measures label { min-height: 92px; box-sizing: border-box; }
.is-demo .rd-editbar { display: none; gap: 8px; margin-bottom: 20px; }
.is-demo .rd.is-editing .rd-editbar { display: flex; }

.is-demo .rd-cancel, .is-demo .rd-save { height: 40px; padding: 0 16px; font: inherit; font-size: .88rem; font-weight: 600; border-radius: 8px; cursor: pointer; }
.is-demo .rd-cancel { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.is-demo .rd-cancel:hover { background: var(--z-surface-2); }
.is-demo .rd-save { flex: 1; color: var(--z-on-primary); background: var(--z-primary); border: 0; }
.is-demo .rd-save:hover { background: var(--z-primary-hover); }
.is-demo .rd-btn:disabled { opacity: .45; cursor: default; }
.is-demo .rd-shot-frame { position: relative; }
.is-demo .rd-shot-frame:not(.is-empty)::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 2.5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.25); pointer-events: none; z-index: 2; }

/* Editing never resizes the page: the record is always full width (up to its
   cap), and the two figures split their box evenly whatever is in them. */
.is-demo .rd { width: 100%; box-sizing: border-box; }
.is-demo .rd-grid { width: 100%; }
.is-demo .rd-measures { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.is-demo .rd-measures label, .is-demo .rd-input, .is-demo .rd-input input { min-width: 0; max-width: 100%; }

/* The active tab's underline sits just under the word. */
.is-demo .topbar-tab { padding-bottom: 0; }
.is-demo .topbar-tab.is-active::after { bottom: -5px !important; }

.is-demo .tree-popup .tc-shot, .is-demo .pk .tc-shot { position: relative; }
.is-demo .tree-popup .tc-shot::after, .is-demo .pk .tc-shot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 2.5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.25); pointer-events: none; z-index: 2; }

/* Projects, in the demo's teal. */
.is-demo .topbar-project:hover { border-color: var(--z-teal); }
.is-demo .project-card.is-current { border-color: var(--z-teal); box-shadow: 0 0 0 1px var(--z-teal), var(--shadow); }
.is-demo .project-status { background: var(--z-accent-soft); color: var(--z-accent-text); }
.is-demo .project-progress { background: var(--z-accent-soft); }
.is-demo .project-progress i { background: var(--z-teal); }
.is-demo .np-tools .btn.is-active { border-color: var(--z-teal); background: var(--z-accent-soft); }
.is-demo .np-layers button.is-active { background: var(--z-primary); }
.is-demo .np-field input:focus { outline-color: var(--z-teal); }
.is-demo .np-step.is-done h2 i { background: var(--z-teal); }
.is-demo .np-tool svg { color: var(--z-accent-text); }
.is-demo .np-tool:hover, .is-demo .np-tool.is-active { border-color: var(--z-teal); }
.is-demo .np-tool.is-active { background: var(--z-accent-soft); box-shadow: 0 0 0 1px var(--z-teal); }
.is-demo .np-drawing { background: var(--z-accent-soft); color: var(--z-accent-text); }
.is-demo .np-shape-bar i { background: var(--z-teal); }
.is-demo .np-step input:focus { outline-color: var(--z-teal); }
/* The tabs on the same line as the product name: no padding of their own
   pushing the text down (one rule above kept the top and dropped the
   bottom), and the underline on the bar's bottom edge instead. */
.is-demo .topbar-tab { padding-top: 0; padding-bottom: 0; line-height: 1.2rem; }
.is-demo .topbar-tab.is-active::after { bottom: -.45rem !important; }
.is-demo .rp-grow { color: var(--z-accent-text); }
.is-demo .np-tool { --np-dot: var(--z-accent-text); }
.is-demo .np-tool-icon { background: var(--z-accent-soft); color: var(--z-accent-text); }
.is-demo .np-tool.is-active .np-tool-icon { background: var(--z-primary); color: #fff; --np-dot: #fff; }
.is-demo .np-tool.is-active { background: var(--surface); }
.is-demo .project-row.is-current::before { background: var(--z-teal); }
.is-demo .project-status-dot { background: var(--z-teal); }
.is-demo .project-more > summary:hover, .is-demo .project-more[open] > summary { background: var(--z-accent-soft); }

/* The projects page in the trees' table clothes. */
.is-demo .project-list { margin-top: 1rem; max-height: none; }
.is-demo .project-list .tt-table td { vertical-align: top; }
.is-demo .project-list .pc-name { min-width: 16rem; }
.is-demo .project-list .pc-plain { font-weight: 600; }
.is-demo .project-list .pc-sub { display: block; margin-top: .15rem; font-size: .76rem; color: var(--ink-soft); }
.is-demo .project-list .pc-sub.project-error { color: var(--danger); }
.is-demo .project-list .pc-sub.project-warn { color: #c48400; }
.is-demo .project-list .project-progress { width: 14rem; margin-top: .35rem; }
.is-demo .project-list .pc-created { color: var(--ink-soft); white-space: nowrap; }
.is-demo .project-list tr.is-current td:first-child { box-shadow: inset 3px 0 0 var(--z-teal); }
.is-demo .project-list tr.is-current td { background: color-mix(in srgb, var(--z-teal) 8%, var(--surface)); }
.is-demo .project-list tr.row-clickable { cursor: pointer; }
.is-demo .project-list .tt-status.is-busy i { background: #f59e0b; }
.is-demo .project-list .tt-status.is-failed i { background: var(--z-no); }
.is-demo .project-list .tt-c-act { white-space: nowrap; }
.is-demo .project-list .pc-inline { display: inline-block; margin: 0 .4rem 0 0; }
.is-demo .project-list .project-more { position: relative; display: inline-block; }
.is-demo .project-list .project-more > summary { list-style: none; }
.is-demo .project-list .project-more > summary::-webkit-details-marker { display: none; }
.is-demo .project-list .project-more-menu { right: 0; left: auto; min-width: 11rem; text-align: left; }
/* The name column: an ordinary cell, the name in the page's own type, the
   note on its own line under it (undoing the earlier row-list rules and the
   trees table's monospace ids). */
.is-demo .project-list th.pc-name, .is-demo .project-list td.pc-name { display: table-cell; }
.is-demo .project-list .row-link { font: 600 .92rem var(--z-sans, inherit); letter-spacing: 0; }
.is-demo .project-list .pc-sub { display: block; }
.is-demo .project-list tr.is-current .row-link { color: var(--z-accent-text); }
/* The projects page in the trees table's shape: no page title, the filter
   strip at the top, summary and table under it, the footer. */
.is-demo .projects-page .filters { margin-top: 0; }
.is-demo .projects-page .tt-bar { flex: 1 1 auto; }
.is-demo .projects-page .tt-tools .btn--small { height: 36px; padding: 0 .8rem; min-height: 0; border-radius: 8px; }
.is-demo .projects-page .pr-results { margin-top: .9rem; }
.is-demo .projects-page .project-list { max-height: none; }
.is-demo .projects-page .tt-pager { justify-content: flex-start; }

.is-demo .projects-page .tt-c-act { white-space: nowrap; }
.is-demo .projects-page .tt-c-act .tt-act { display: inline-grid; vertical-align: middle; margin-left: .25rem; }
.is-demo .projects-page .project-more { display: inline-block; vertical-align: middle; }

/* Projects page, final: summary and table one panel, as on the trees page;
   one marker for the open project; a state only when it needs attention;
   the row menu above everything. */
.is-demo .projects-page .project-list { margin-top: 0; border-radius: 0 0 10px 10px; overflow: auto; }
.is-demo .projects-page .tt-summary { margin-top: 0; }
.is-demo .projects-page .tt-filters:empty { display: none; }
.is-demo .projects-page .project-list tr.is-current td { background: none; }
.is-demo .projects-page .project-list tr.is-current td:first-child { box-shadow: inset 3px 0 0 var(--z-teal); }
.is-demo .projects-page .project-list tr.is-current .row-link { color: var(--ink); }
.is-demo .projects-page .row-link { display: inline; }
.is-demo .projects-page .pc-current,
.is-demo .projects-page .pc-state {
  display: inline-flex; align-items: center; margin-left: .55rem; padding: .05rem .45rem;
  border-radius: 999px; font-size: .68rem; font-weight: 600; vertical-align: .1em;
}
.is-demo .projects-page .pc-current { color: var(--z-accent-text); background: var(--z-accent-soft); }
.is-demo .projects-page .pc-state.is-busy { color: #b45309; background: rgba(245, 158, 11, .14); }
.is-demo .projects-page .pc-state.is-failed { color: var(--z-no-ink); background: var(--z-no-soft); }
.is-demo .projects-page .project-more-menu { z-index: 60; min-width: 12.5rem; }
.is-demo .projects-page .project-more-menu hr { margin: .3rem .25rem; border: 0; border-top: 1px solid var(--line); }
.is-demo .projects-page .project-more-menu form { margin: 0; }
.is-demo .projects-page .tt-c-act { width: 1%; text-align: right; }
:root[data-theme="dark"] .is-demo .projects-page .pc-state.is-busy { color: #fcd34d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .is-demo .projects-page .pc-state.is-busy { color: #fcd34d; } }

/* New project: the page's one primary action, sized to the strip it sits in
   (the search box beside it is 36px), an icon that says "a new area on the
   map", a quiet lift on hover, the keyboard ring like every other control. */
.is-demo .pr-new {
  display: inline-flex; align-items: center; gap: .5rem;
  height: 36px; padding: 0 .95rem 0 .8rem;
  border-radius: 8px; border: 1px solid var(--z-primary);
  background: var(--z-primary); color: var(--z-on-primary);
  font-size: .84rem; font-weight: 600; letter-spacing: .005em; white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(12, 22, 29, .18), inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: background .14s, border-color .14s, box-shadow .14s, transform .14s;
}
.is-demo .pr-new svg { flex: none; }
.is-demo .pr-new:hover {
  background: var(--z-primary-hover); border-color: var(--z-primary-hover);
  box-shadow: 0 4px 12px rgba(14, 161, 172, .28), inset 0 1px 0 rgba(255, 255, 255, .14);
  transform: translateY(-1px);
}
.is-demo .pr-new:active { transform: none; box-shadow: 0 1px 2px rgba(12, 22, 29, .18); }
.is-demo .pr-new:focus-visible { outline: 0; box-shadow: var(--z-ring); }
@media (max-width: 640px) {
  .is-demo .pr-new span { display: none; }
  .is-demo .pr-new { width: 36px; padding: 0; justify-content: center; }
}
.is-demo .page-loading i { background: var(--z-teal); }
.is-demo .btn--primary.is-loading::after { border-color: var(--z-on-primary); border-right-color: transparent; }
/* New project: text only, so no icon-only form on a phone either. */
@media (max-width: 640px) { .is-demo .pr-new span { display: inline; } .is-demo .pr-new { width: auto; padding: 0 .9rem; } }
.is-demo .pr-new { padding: 0 1rem; }
.is-demo .page-wait-spin { border-color: var(--z-teal); border-right-color: transparent; }
/* Every project row hovers alike, over the stripes. */
.is-demo .projects-page .project-list tbody tr.row-clickable:hover td { background: color-mix(in srgb, var(--z-teal) 9%, var(--surface)); }
.is-demo .projects-page .project-list tbody tr.row-clickable:hover .row-link { color: var(--z-accent-text); }
.is-demo .np-shape.is-calculating #np-area::after, .is-demo .np-search.is-searching .np-search-icon { border-color: var(--z-teal); border-right-color: transparent; }
.is-demo .wait-arc-b { stroke: var(--z-teal); }
.is-demo .wait-mark { background: var(--z-accent-soft); }
.is-demo .wait-bar { background: color-mix(in srgb, var(--z-teal) 16%, transparent); }
.is-demo .wait-bar::after { background: var(--z-teal); }
.is-demo .wait-kicker { font-family: var(--z-mono, inherit); font-weight: 500; }

/* The drawing form in the demo teal. */
.is-demo .npf-input:focus { border-color: var(--z-teal); box-shadow: var(--z-ring); }
.is-demo .npf-seg button:focus-visible, .is-demo .npf-close:focus-visible { outline-color: var(--z-teal); }
.is-demo .npf-gauge i { background: var(--z-teal); }
.is-demo .npf-gauge i.is-over { background: var(--z-no); }
.is-demo .npf-submit { background: var(--z-primary); border-color: var(--z-primary); color: var(--z-on-primary); }
.is-demo .npf-submit:hover { background: var(--z-primary-hover); border-color: var(--z-primary-hover); }
.is-demo .npf-submit:focus-visible, .is-demo .npf-cancel:focus-visible { box-shadow: var(--z-ring); }
.is-demo .npf-submit.is-loading::after { border-color: var(--z-on-primary); border-right-color: transparent; }
.is-demo .npf-summary.is-calculating #np-area::after { border-color: var(--z-teal); border-right-color: transparent; }
.is-demo .npf-close:hover, .is-demo .npf-cancel:hover { background: var(--z-surface-2); }

/* ---- Table density: two settings that actually differ ----
   Comfortable: room to read, a 52px row. Compact: as many rows as fit, a
   32px row, smaller type and controls, the height bar thinner. */
body.is-demo:not(.tt-compact) .tt-table td { padding-top: .8rem; padding-bottom: .8rem; }
body.is-demo.tt-compact .tt-table td { padding-top: .22rem; padding-bottom: .22rem; }
body.is-demo.tt-compact .tt-table { font-size: .8rem; }
body.is-demo.tt-compact .tt-table .row-link { font-size: .78rem; }
body.is-demo.tt-compact .tt-hbar { height: 3px; width: 36px; }
body.is-demo.tt-compact .tt-status { padding-top: 0; padding-bottom: 0; font-size: .7rem; }
body.is-demo.tt-compact .tt-src { padding-top: 0; padding-bottom: 0; font-size: .7rem; }
body.is-demo.tt-compact .tt-act { width: 26px; height: 26px; }
body.is-demo.tt-compact td.tt-c-xy { font-size: .72rem; }

/* ---- Projects table: deliberate column widths ---- */
.is-demo .projects-page #pr-table { table-layout: fixed; }
.is-demo .projects-page .pc-w-area { width: 10rem; }
.is-demo .projects-page .pc-w-trees { width: 8rem; }
.is-demo .projects-page .pc-w-lidar { width: 10rem; }
.is-demo .projects-page .pc-w-created { width: 14rem; }
.is-demo .projects-page .pc-w-act { width: 3.5rem; }
.is-demo .projects-page #pr-table td, .is-demo .projects-page #pr-table th { overflow: hidden; text-overflow: ellipsis; }
.is-demo .projects-page #pr-table td.pc-name { min-width: 0; }
.is-demo .projects-page #pr-table td.tt-c-act { overflow: visible; }
@media (max-width: 1000px) {
  .is-demo .projects-page .pc-w-created { width: 10rem; }
  .is-demo .projects-page .pc-w-lidar { width: 7.5rem; }
}
.is-demo .project-menu-search input:focus { border-color: var(--z-teal); }
.is-demo .zl-confirm-icon { background: var(--z-no-soft); color: var(--z-no); }
.is-demo .npf-cluster span { background: var(--z-primary); }
/* Inside a zone: the scan's sensitivity sits with the scan, the options below
   are separated from the actions by a hairline. */
.is-demo #zn-work .sc-sens { margin-top: -.15rem; padding: .1rem .15rem 0; }
.is-demo #zn-work .rp-check { margin-top: .35rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.is-demo .rp-keys[hidden] { display: none; }

/* ------------------------------------------- projects: one screen, paged
   As the tenders list: the table takes the height left under the header,
   toolbar, summary and pager, and scrolls inside; stripes on the rows shown. */
.is-demo .projects-page .pr-results { margin-top: 4px; }
.is-demo .projects-page .project-list { border-radius: 0; }
@media (min-width: 761px) {
  .is-demo .projects-page .project-list { max-height: max(260px, calc(100dvh - var(--topbar-h, 54px) - 226px)); }
}
.is-demo .projects-page .tt-pager { justify-content: flex-end; }
.is-demo #pr-table tbody tr:nth-child(even) td { background: var(--surface); }
.is-demo #pr-table tbody tr.is-alt td { background: color-mix(in srgb, var(--z-surface-2) 70%, var(--surface)); }
.is-demo #pr-table tbody tr:hover td { background: color-mix(in srgb, var(--z-teal) 7%, var(--surface)); }
.is-demo button.tt-page { cursor: pointer; padding: 0; font: inherit; }

/* A failed project: the name as on other rows, the reason in words, and the
   way out next to it - not a raw error, not a button outside the table. */
.is-demo .projects-page .pc-plain { font-weight: 500; }
.is-demo .projects-page .pc-fail { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem .6rem; margin-top: .2rem; font-size: .8rem; color: var(--z-no-ink, #b42318); }
.is-demo .projects-page .pc-fail span { cursor: help; }
.is-demo .projects-page .pc-fail .pc-inline { margin: 0; }
.is-demo .projects-page .pc-retry { display: inline-flex; align-items: center; gap: .3rem; height: 24px; padding: 0 .5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.is-demo .projects-page .pc-retry:hover { border-color: var(--z-teal); background: var(--z-accent-soft); }
.is-demo .projects-page .pc-retry:focus-visible { outline: 0; box-shadow: var(--z-ring); }
.is-demo .projects-page tr.st-failed .pc-name { box-shadow: inset 3px 0 0 var(--z-no-ink, #b42318); }

/* Sign-in: the language switch as the app's other segmented controls - a
   quiet grey track, the current language a white chip - not a teal button
   competing with "Sign in". */
.is-demo .auth-top .lang-toggle { gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--z-surface-2); }
.is-demo .auth-top .lang-option { min-height: 0; height: 26px; min-width: 34px; padding: 0 .45rem; border: 0; border-radius: 6px; color: var(--ink-soft); }
.is-demo .auth-top .lang-option + .lang-option { border-left: 0; }
.is-demo .auth-top .lang-code { font-size: .74rem; font-weight: 600; letter-spacing: .02em; }
.is-demo .auth-top .lang-option:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.is-demo .auth-top .lang-option.is-active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px rgb(12 22 29 / .08), 0 0 0 1px var(--line); }

/* New project on a laptop-height window: the panel's spacing tightens so the
   form fits without a scrollbar for a few pixels; on taller screens it keeps
   its room. */
@media (min-width: 761px) and (max-height: 820px) {
  .is-demo .npf-head { padding-top: .75rem; padding-bottom: .7rem; }
  .is-demo .npf-body { gap: .8rem; padding-top: .85rem; padding-bottom: .85rem; }
  .is-demo .npf-field { gap: .3rem; }
  .is-demo .npf-tender { padding: .5rem .75rem; }
  .is-demo .npf-input { height: 2.5rem; min-height: 0; }
  .is-demo .npf-summary { margin-top: 0; padding-top: .55rem; padding-bottom: .6rem; }
  .is-demo .npf-foot { padding-top: .65rem; padding-bottom: .75rem; }
}

/* New project: Polygon, Rectangle and Whole area side by side; the whole area
   greyed while it cannot be used (no place yet, or over the size limit). */
.is-demo .npf-seg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.is-demo .npf-seg button { white-space: nowrap; }
.is-demo .npf-seg button[aria-disabled="true"] { color: var(--z-ink-faint); cursor: not-allowed; }
.is-demo .npf-seg button[aria-disabled="true"]:hover { color: var(--z-ink-faint); }
.is-demo .npf-whole-note { margin: .1rem 0 0; font-size: .78rem; line-height: 1.45; color: var(--ink-soft); }
.is-demo .npf-whole-note a { color: var(--z-accent-text); font-weight: 500; }
.is-demo .npf-tender small { margin-top: .2rem; font-size: .76rem; line-height: 1.4; color: var(--ink-soft); }

/* The map's key: what the outline is, and what the area is. */
.np-key { position: absolute; left: .7rem; bottom: 2.1rem; z-index: 800; display: grid; gap: .3rem; margin: 0; padding: .5rem .65rem; list-style: none; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow); font-size: .78rem; color: var(--ink); }
.np-key[hidden], .np-key li[hidden] { display: none; }
.np-key li { display: flex; align-items: center; gap: .5rem; }
.np-key i { flex: none; width: 18px; height: 12px; border-radius: 2px; }
.np-key .np-key-place { border: 2px solid #0ea1ac; box-shadow: 0 0 0 1.5px #fff inset; background: transparent; }
.np-key .np-key-area { border: 2px solid #0ea1ac; background: rgb(14 161 172 / .25); }
/* The open tenders (project-new.js): amber points, the projects being teal. */
.np-tender-mark:focus { outline: none; }
.np-key .np-key-projects { width: 12px; height: 12px; margin: 0 3px; border-radius: 50%; background: #0ea1ac; box-shadow: 0 0 0 2px #fff; }
/* The tenders' clusters: the projects' numbered circle, in amber. */
.is-demo .npf-cluster.is-tender span, .npf-cluster.is-tender span { background: #e8930c; }
/* A commune's tenders listed in one card. */
.np-tlist { display: grid; gap: .7rem; max-height: 320px; overflow: auto; }
.np-tlist .np-tcard + .np-tcard { padding-top: .7rem; border-top: 1px solid var(--line); }
.np-key .np-key-tenders { width: 12px; height: 12px; margin: 0 3px; border-radius: 50%; background: #e8930c; box-shadow: 0 0 0 2px #fff; }
.np-tpop .leaflet-popup-content-wrapper { border-radius: 10px; background: var(--surface); color: var(--ink); }
.np-tpop .leaflet-popup-tip { background: var(--surface); }
.np-tpop .leaflet-popup-content { margin: .8rem .9rem; font: 400 .86rem/1.4 "IBM Plex Sans", system-ui, sans-serif; }
.np-tcard { display: grid; gap: .3rem; }
.np-tcard b { font-size: .92rem; line-height: 1.3; }
.np-tcard-chip { justify-self: start; padding: .08rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 600; background: rgb(232 147 12 / .15); color: #a8650a; }
.np-tcard-chip.is-go { background: rgb(14 161 172 / .14); color: #0b8a94; }
.np-tcard-buyer, .np-tcard-due { color: var(--ink-soft); font-size: .8rem; }
.np-tcard-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem; margin-top: .35rem; }
.np-tcard-go { padding: .4rem .75rem; border-radius: 8px; background: #0ea1ac; color: #fff !important; font-weight: 600; text-decoration: none; }
.np-tcard-go:hover { background: #0b8a94; }
.np-tcard-see { color: #0b8a94 !important; font-weight: 600; text-underline-offset: 3px; }

/* Projects: "New project" as the Tenders toolbar's buttons - outlined, an
   icon, 36px, 4px down in its row like the search box beside it. */
.is-demo .tt-tools > .pr-new-btn { display: inline-flex; align-items: center; gap: .4rem; height: 36px; margin-top: 4px; box-sizing: border-box; text-decoration: none; }

/* Candidate places (a tender's cemeteries, schools…): amber on the map and in the key. */
.np-key .np-key-sites { border: 2px solid #b7791f; background: rgb(183 121 31 / .18); }
.is-demo .npf-sites { margin: .1rem 0 0; font-size: .78rem; line-height: 1.45; color: #8a5a12; }

/* The location's ✕: always there once a place is set, not only on hover as
   the browser's own; the browser's is hidden so there is one. */
.np-search input::-webkit-search-cancel-button { display: none; }
.npf-search .npf-input { padding-right: 2.2rem; }
.np-search-x { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink-soft); cursor: pointer; }
.np-search-x:hover { background: var(--z-surface-2); color: var(--ink); }
.np-search-x:focus-visible { outline: 0; box-shadow: var(--z-ring); }
.np-search-x[hidden] { display: none; }

/* ---- Phones: the list pages' toolbar buttons with their words, the counts number first. */
@media (max-width: 640px) {
  /* New project, alone under the search: the whole width, with its label. */
  .is-demo .projects-page .tt-tools { display: flex; }
  .is-demo .projects-page .tt-tools > .pr-new-btn { flex: 1; justify-content: center; height: 42px; margin-top: 0; }
  .is-demo .projects-page .pr-new-btn span { display: inline; }
  /* The company profile and the import, side by side, both named. */
  .is-demo .td-page .tt-tools { display: flex; gap: .5rem; }
  .is-demo .td-page .tt-tools > .tt-btn { flex: 1 1 0; justify-content: center; min-width: 0; white-space: nowrap; }
  .is-demo .td-page .td-import-btn span { display: inline; }
  /* The counts: the figure on top, its label under it, so a label on two lines moves no figure. */
  .is-demo .tt-stats > div { flex-direction: column-reverse; justify-content: flex-end; gap: .15rem; }
  .is-demo .tt-stats dd { font-size: 1.05rem; }
  .is-demo .tt-stats dt { line-height: 1.3; }
}

/* ---- Projects on a phone: the name, and under it one line of figures (area · trees · LiDAR). */
.is-demo .pc-unit { display: none; }
@media (max-width: 640px) {
  .is-demo .projects-page #pr-table tbody tr { grid-template-columns: max-content max-content minmax(0, 1fr) 44px; grid-template-areas: "name name name act" "area trees lidar act"; gap: .2rem 0; padding: .6rem .5rem .6rem .85rem; }
  .is-demo .projects-page #pr-table td.pc-name { grid-area: name; }
  .is-demo .projects-page #pr-table td.tt-c-act { grid-area: act; }
  .is-demo .projects-page #pr-table td.pc-area, .is-demo .projects-page #pr-table td.pc-trees, .is-demo .projects-page #pr-table td.pc-lidar { display: block; padding: 0; border: 0; background: none; text-align: left; white-space: nowrap; font-size: .8rem; color: var(--ink-soft); }
  .is-demo .projects-page #pr-table td.pc-area { grid-area: area; }
  .is-demo .projects-page #pr-table td.pc-trees { grid-area: trees; }
  .is-demo .projects-page #pr-table td.pc-lidar { grid-area: lidar; overflow: hidden; text-overflow: ellipsis; }
  .is-demo .projects-page #pr-table td.pc-trees::before, .is-demo .projects-page #pr-table td.pc-lidar::before { content: "·"; margin: 0 .4rem; }
  .is-demo .projects-page #pr-table td.pc-area .tt-hbar { display: none; }
  .is-demo .projects-page #pr-table td.pc-area .pc-bar-cell { display: inline; }
  .is-demo .projects-page #pr-table .tt-n { font-weight: 500; color: var(--ink); }
  .is-demo .pc-unit { display: inline; }
}

/* ---- The tree list and a tree on a phone. */
@media (max-width: 640px) {
  /* A row: the number and status, the figures under them, a small open button beside (the row opens too). */
  .is-demo .tt-table tbody tr { align-items: center; padding-top: .55rem; padding-bottom: .55rem; }
  .is-demo .tt-table .tt-c-act { align-self: center; }
  .is-demo .tt-table .tt-act { width: 34px; height: 34px; }
  /* The cells keep no desktop row height: a row is as tall as its two lines. */
  body.is-demo .tt-table tbody tr td { height: auto; min-height: 0; padding: 0 !important; line-height: 1.35; }
  /* Export says it. */
  .is-demo #tt-export-btn span { display: inline; }
  /* A tree's facts: each label over its value; zone and sector side by side, the long ones across. */
  .is-demo .rd-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
  .is-demo .rd-facts > div { display: grid; gap: 2px; padding: 9px 0; }
  .is-demo .rd-facts > div:nth-child(n+3) { grid-column: 1 / -1; }
  .is-demo .rd-facts dt { font-size: .74rem; }
  .is-demo .rd-facts dd { text-align: left; }
}

/* ---- New project on a phone: the map whole, the form a drawer over it (as a project's map tools). */
.np-panel-btn, .npf-hide { display: none; }
@media (max-width: 760px) {
  body.np-body .np { position: relative; flex-direction: row; height: calc(100vh - 52px); height: calc(100dvh - 52px); min-height: 0; overflow: hidden; }
  body.np-body .np-map-wrap { position: absolute; inset: 0; height: auto; }
  body.np-body .npf { position: absolute; z-index: 1200; top: 0; left: 0; bottom: 0; width: min(88vw, 360px); border-right: 1px solid var(--line); border-bottom: 0; box-shadow: 0 16px 48px rgba(12, 22, 29, .28); transform: translateX(-105%); transition: transform .22s ease; }
  body.np-body.np-panel-open .npf { transform: none; }
  body.np-body .npf-body { overflow-y: auto; }
  body.np-body .npf-foot { position: static; }
  body.np-body .npf-head { gap: .5rem; }
  body.np-body .npf-head h1 { flex: 1; }
  body.np-body .npf-hide { display: grid; place-items: center; width: 2rem; height: 2rem; margin-left: -.35rem; border: 0; border-radius: 8px; background: transparent; color: var(--ink-soft); cursor: pointer; }
  body.np-body .npf-hide:hover { background: var(--bg); color: var(--ink); }
  /* The way back to the form: on the map, top left; the zoom moves under it. */
  body.np-body .np-panel-btn { display: inline-flex; align-items: center; gap: .45rem; position: absolute; z-index: 900; left: 10px; top: 10px; height: 38px; padding: 0 .85rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: .86rem; font-weight: 600; box-shadow: 0 2px 8px rgba(12, 22, 29, .18); cursor: pointer; }
  body.np-body.np-panel-open .np-panel-btn { visibility: hidden; }
  body.np-body .np-map .leaflet-top.leaflet-left { top: 50px; }
}

/* ---- Phones: lists that do not scroll themselves hand the swipe to the page. */
@media (max-width: 640px) {
  .is-demo .tt-wrap, .is-demo .projects-page .project-list { overflow: visible; overscroll-behavior: auto; max-height: none; }
}
/* ---- New project on a phone, the drawer away: the area tools at the foot of the map. */
.np-maptools { display: none; }
@media (max-width: 760px) {
  body.np-body:not(.np-panel-open) .np-maptools { display: flex; position: absolute; z-index: 900; left: 12px; right: 12px; bottom: 28px; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 4px 18px rgba(12, 22, 29, .24); }
  body.np-body:not(.np-panel-open) .np-maptools button { flex: 1 1 0; justify-content: center; min-width: 0; }
  /* The legend steps up over the bar. */
  body.np-body:not(.np-panel-open) .np-key { bottom: 90px; }
}

/* ---- Phones: buttons say what they do (no icon left to guess), and the lists drop their count line. */
@media (max-width: 640px) {
  .is-demo .tt-btn span { display: inline; }
  .is-demo .tt-summary .list-count { display: none; }
}

/* The tree list on a phone: the open button on the first line, level with the status. */
@media (max-width: 640px) {
  .is-demo .tt-table tbody tr { grid-template-areas: "id st act" "meta meta meta"; }
}

/* One ring on a close-up: the one sized to the tree's crown (list.ejs, .tc-ring), not the fixed one drawn before it. */
.is-demo .pk .tc-shot::after, .is-demo .tree-popup .tc-shot::after { content: none !important; display: none !important; }
/* Phones: the list's filters share the row, none left off its edge. */
@media (max-width: 640px) {
  .is-demo .tt-filters { margin: 0; padding: 0 0 2px; gap: .4rem; }
  .is-demo .tt-filters > .tt-pop, .is-demo .tt-filters > .fpick { flex: 1 1 0; min-width: 0; }
  .is-demo .tt-filters .fpick-toggle { width: 100%; min-width: 0; justify-content: center; padding-left: .5rem; padding-right: .5rem; }
  .is-demo .tt-filters .tt-chip-btn { width: 100%; min-width: 0; justify-content: center; padding-left: .5rem; padding-right: .5rem; }
  .is-demo .tt-filters .tt-chip-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .is-demo .td-dactions .td-more summary { height: 34px; }
}

/* ---- A tree on a phone: back on the left, Edit small on the right (Accept is the action here),
   and the photo in a card of its own, inset like the facts, a little shorter, its caption inside. */
@media (max-width: 640px) {
  .is-demo .rd-top { flex-wrap: nowrap; }
  .is-demo .rd-top .rd-crumbs { flex: 1 1 auto; min-width: 0; }
  .is-demo .rd-back { flex: none; }
  .is-demo .rd-top-acts { flex: none; }
  .is-demo .rd-top-acts .rd-btn { flex: none; height: 36px; padding: 0 .85rem; }
  .is-demo #rd-edit { color: var(--ink); background: var(--surface); border-color: var(--line); }
  .is-demo #rd-edit:hover { border-color: var(--z-teal); color: var(--z-accent-text); }
  .is-demo .rd-shot { padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
  .is-demo .rd-shot-frame { aspect-ratio: 16 / 10; border-radius: 8px; }
  .is-demo .rd-shot figcaption { margin: 8px 2px 0; }
  .is-demo .rd-card { padding: 18px; }
}
