/* tools.zaiphr.ai, after css/shell.css, on the vendored tokens: css/tokens.css
   (core) and css/tokens-tools.css (the tools block). Doctrine: zaiphr-brand
   components/tools-surface.md. Redact is Direction A, "Desk" (Matt,
   2026-10-17): a dark workspace lit from above, the document as a sheet of
   paper with real depth, and every hidden detail a strip of ink tape carrying
   its placeholder. Licence breaks, named: the paper's layered shadow, the ink
   tape's gradient, and the one scan line (--z-live) that passes once per scan.
   Group colours are marks only (a tick, a dot, an icon, an outline): --cat on
   dark grounds and the tape, --cat-deep on paper; the group is always named in
   text too. Every value is a token or a mix of tokens (tools-surface §6).
   Motion is transform and opacity. */

@layer base {
  /* tools set their UI in Jost too (Direction A); play keeps the shell's UI face */
  body { font-family: var(--z-font-display); }
  [data-group='people'] { --cat: var(--z-tools-cat-people); --cat-deep: var(--z-tools-cat-people-deep); }
  [data-group='contact'] { --cat: var(--z-tools-cat-contact); --cat-deep: var(--z-tools-cat-contact-deep); }
  [data-group='place'] { --cat: var(--z-tools-cat-place); --cat-deep: var(--z-tools-cat-place-deep); }
  [data-group='id'] { --cat: var(--z-tools-cat-id); --cat-deep: var(--z-tools-cat-id-deep); }
  [data-group='money'] { --cat: var(--z-tools-cat-money); --cat-deep: var(--z-tools-cat-money-deep); }
  [data-group='other'] { --cat: var(--z-tools-cat-other); --cat-deep: var(--z-tools-cat-other-deep); }
}

@layer layout {
  .desk-body .site-foot { max-width: none; padding-inline: 20px; }
  .desk {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 352px;
    height: calc(100dvh - var(--topbar-h)); min-height: 560px;
    background:
      radial-gradient(900px 520px at 42% -8%, color-mix(in oklab, var(--z-surface-2) 85%, transparent), transparent 72%),
      var(--z-night);
  }
  .work { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 16px 28px 0; }
  .sheet-wrap { flex: 1; min-height: 0; overflow: auto; padding: 16px 6px 36px; }
}

@layer components {
  .sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

  /* the proof chip: why "runs in your browser" is true */
  .proof { position: relative; }
  .proof summary {
    list-style: none; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px 0 11px;
    border: 1px solid var(--z-border-strong); border-radius: var(--z-radius-pill); cursor: pointer; user-select: none;
    font: 500 13px/1 var(--z-font-display); color: var(--z-fg);
    transition: border-color var(--z-dur-micro) ease, background-color var(--z-dur-micro) ease;
  }
  .proof summary::-webkit-details-marker { display: none; }
  .proof[open] summary { border-color: var(--z-border-control); background: var(--z-surface-1); }
  @media (hover: hover) { .proof summary:hover { border-color: var(--z-border-control); background: var(--z-surface-1); } }
  .proof-lock { stroke: var(--z-success); }
  .proof-pop {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: min(340px, 86vw); padding: 14px 16px;
    display: grid; gap: 8px; border-radius: 14px; background: var(--z-surface-1); border: 1px solid var(--z-border-control);
    color: var(--z-fg-muted); font-size: 13px; line-height: 1.5; transform-origin: top right;
    animation: pop-in var(--z-dur-std) var(--z-spring);
  }
  .proof-pop strong { color: var(--z-fg); font-weight: 600; }
  .proof-pop code { font-family: var(--z-font-mono); font-size: 12px; color: var(--z-fg); }
  @keyframes pop-in { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }

  /* work bar: the two steps, the sample label, edit and start over */
  .work-bar { display: flex; align-items: center; gap: 14px; width: min(100%, 760px); margin: 0 auto; min-height: 40px; }
  .steps { display: inline-flex; flex: none; padding: 3px; gap: 2px; border-radius: var(--z-radius-md); background: var(--z-surface-1); border: 1px solid var(--z-border); }
  .step {
    display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 8px; border: 0; border-radius: 8px;
    background: transparent; color: var(--z-fg-muted); font: 600 13px/1 var(--z-font-display); cursor: pointer; white-space: nowrap;
    transition: background-color var(--z-dur-micro) ease, color var(--z-dur-micro) ease, transform var(--z-dur-micro) ease;
  }
  @media (hover: hover) { .step:hover { color: var(--z-fg); } }
  .step:active:not([aria-disabled='true']) { transform: scale(0.97); }
  .step .n { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--z-border-control); font-size: 11px; transition: background-color var(--z-dur-std) ease, color var(--z-dur-std) ease; }
  .step[aria-selected='true'] { background: var(--z-surface-2); color: var(--z-fg); box-shadow: inset 0 1px 0 var(--z-border), 0 1px 2px color-mix(in oklab, var(--z-void) 30%, transparent); }
  .step[aria-selected='true'] .n { background: var(--z-fg); border-color: var(--z-fg); color: var(--z-night); }
  .step[aria-disabled='true'] { color: var(--z-fg-subtle); cursor: not-allowed; }
  .sample-note { margin: -20px 0 14px; text-align: right; font-size: 12px; color: var(--z-fg-subtle); }
  .work-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }

  /* the sheet of paper */
  .sheet {
    position: relative; width: min(100%, 760px); margin: 0 auto; min-height: 100%; padding: 36px 54px 44px;
    color: var(--z-ink); border-radius: 3px;
    /* the sheet is a Light island, so --z-surface-1 resolves to its Light value here */
    background:
      radial-gradient(130% 70% at 50% -10%, color-mix(in oklab, var(--z-surface-1) 55%, var(--z-paper)), var(--z-paper) 62%),
      var(--z-paper);
    box-shadow: var(--z-tools-shadow-sheet);
    animation: sheet-in var(--z-dur-enter) var(--z-ease) both;
  }
  .js .sheet { animation-delay: 40ms; }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(10px) scale(0.99); } }
  .sheet :focus-visible { outline-color: var(--z-accent-text); }
  /* one scan line passes down the page while details are found */
  .sheet::after {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 72px; pointer-events: none; opacity: 0;
    background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--z-live) 14%, transparent) 82%, color-mix(in oklab, var(--z-live) 70%, transparent));
  }
  /* tools-surface §5: once, after detection, never a progress delay, within 1.2 s */
  .sheet.is-scanning::after { animation: scan 1000ms 100ms var(--z-ease) both; }
  @keyframes scan { 0% { opacity: 1; transform: translateY(-72px); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(560px); } }
  .work.is-drop .sheet { box-shadow: 0 0 0 2px var(--z-live), var(--z-tools-shadow-sheet); }

  /* intake: paste, sample or file */
  .sheet { display: flex; flex-direction: column; }
  .intake { flex: 1; display: flex; flex-direction: column; gap: 10px; }
  .intake-title { font: 600 22px/1.2 var(--z-font-display); color: var(--z-ink); letter-spacing: -0.005em; }
  .intake-sub { font-size: 14px; color: var(--z-fg-muted); }
  .intake-text {
    flex: 1; width: 100%; min-height: 240px; margin-top: 6px; padding: 14px 16px; resize: vertical;
    font: 400 15.5px/1.65 var(--z-font-editorial); color: var(--z-ink);
    background: color-mix(in oklab, var(--z-surface-1) 45%, var(--z-paper)); border: 1px solid var(--z-border-control); border-radius: var(--z-radius-md);
    transition: border-color var(--z-dur-micro) ease, box-shadow var(--z-dur-micro) ease;
  }
  .intake-text::placeholder { color: var(--z-fg-subtle); }
  .intake-text:focus { outline: none; border-color: var(--z-ink); box-shadow: 0 0 0 3px color-mix(in oklab, var(--z-ink) 14%, transparent); }
  .intake-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
  .btn-paper { color: var(--z-ink); border-color: var(--z-border-control); }
  @media (hover: hover) { .btn-paper:hover { background: color-mix(in oklab, var(--z-ink) 6%, transparent); } }
  .intake-error { font-size: 14px; color: var(--z-danger-text); }

  /* the document */
  .doc { display: grid; gap: 14px; align-content: start; font: 400 16.5px/1.75 var(--z-font-editorial); overflow-wrap: anywhere; }
  .doc p { white-space: pre-wrap; }
  .mail-head { margin: 0 0 8px; padding: 0 0 18px; border-bottom: 1px solid color-mix(in oklab, var(--z-ink) 14%, transparent); display: grid; gap: 7px; font: 400 13px/1.55 var(--z-font-mono); }
  .mail-head div { display: grid; grid-template-columns: 74px minmax(0, 1fr); }
  .mail-head dt { color: var(--z-fg-subtle); font: 600 10.5px/1.9 var(--z-font-display); letter-spacing: var(--z-track-label); text-transform: uppercase; }
  .mail-head dd { margin: 0; white-space: pre-wrap; }

  /* ink tape: the hidden detail; its label is the placeholder the AI sees */
  .r {
    position: relative; display: inline-block; white-space: nowrap; vertical-align: 0.06em; isolation: isolate;
    padding: 0.2em 0.55em 0.16em 0.7em; border-radius: 3px; cursor: pointer;
    font: 600 0.74em/1.15 var(--z-font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--z-tools-tape-label);
  }
  .r::before {
    content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; transform-origin: left center;
    background: var(--z-tools-tape);
    box-shadow: inset 3px 0 0 var(--cat), var(--z-tools-shadow-tape);
    transition: transform var(--z-dur-micro) var(--z-ease);
  }
  .is-fresh .r::before { animation: tape 460ms calc(380ms + var(--i, 0) * 60ms) var(--z-ease) both; }
  .is-fresh .r > .ph { animation: label-in 240ms calc(600ms + var(--i, 0) * 60ms) ease both; }
  @keyframes tape { from { transform: scaleX(0); } }
  @keyframes label-in { from { opacity: 0; } }
  /* linked: a hovered or focused list row lifts its tapes, and a hovered tape lights its row */
  .r.is-linked::before { transform: translateY(-1px); outline: 2px solid var(--cat-deep); outline-offset: 2px; }
  .r.is-kept.is-linked::before { outline-style: solid; }
  .mail-head .r { font-size: 0.85em; } /* the header's tapes stay >= 11px (gate-5 review) */
  /* left in: found, but the reader chose to keep it in the text */
  .r.is-kept {
    font: inherit; letter-spacing: 0; text-transform: none; color: var(--z-ink); vertical-align: baseline; padding: 0 0.14em; margin: 0 0.06em; white-space: pre-wrap;
  }
  .r.is-kept::before {
    background: color-mix(in oklab, var(--cat-deep) 9%, transparent); box-shadow: none;
    outline: 1.5px dashed var(--cat-deep); outline-offset: 1px; animation: none;
  }
  /* peek: hovering shows what is under the tape, on this screen only */
  .peek {
    position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 5; transform: translate(-50%, 4px);
    display: grid; gap: 3px; padding: 9px 12px 10px; border-radius: var(--z-radius-md); white-space: nowrap;
    background: var(--z-night); color: var(--z-paper); text-transform: none; letter-spacing: 0; text-align: left;
    box-shadow: 0 0 0 1px var(--z-border-strong), 0 12px 28px -8px color-mix(in oklab, var(--z-void) 60%, transparent);
    opacity: 0; pointer-events: none; transition: opacity var(--z-dur-std) ease, transform var(--z-dur-std) var(--z-ease);
  }
  /* WCAG 1.4.13: the pointer can move onto the peek (a bridge spans the gap), and Esc hides it
     until the pointer leaves the tape (.peek-off, set by redact.js) */
  .r:hover::after { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 12px; }
  .r:hover .peek { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
  .doc.peek-off .peek { opacity: 0; pointer-events: none; }
  .peek::after { content: ''; position: absolute; left: 50%; top: 100%; width: 10px; height: 10px; background: var(--z-night); transform: translate(-50%, -5px) rotate(45deg); box-shadow: 1px 1px 0 var(--z-border-strong); }
  .peek b { font: 600 14px/1.2 var(--z-font-display); }
  .peek small { font: 500 11.5px/1.2 var(--z-font-display); color: color-mix(in oklab, var(--z-paper) 62%, var(--z-night)); }
  @media (hover: none) { .peek { display: none; } }

  /* restored: details put back, lightly marked */
  .doc mark.back { background: color-mix(in oklab, var(--cat-deep) 10%, transparent); color: inherit; border-radius: 3px; padding: 0 0.08em; box-shadow: inset 0 -2px 0 var(--cat-deep); }
  .is-fresh mark.back { animation: settle 520ms var(--z-spring) both; }
  @keyframes settle { from { opacity: 0; transform: translateY(3px); } }

  .answer-tag { margin: -6px 0 2px; font-size: 12.5px; color: var(--z-fg-muted); }
  .ai-tag { display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: var(--z-radius-pill); border: 1px solid var(--z-ai); color: var(--z-ai); font-weight: 600; }

  /* select any text in the document to hide it everywhere */
  .hide-sel { position: absolute; left: 0; top: 0; z-index: 30; background: var(--z-night); border-color: var(--z-border-control); box-shadow: 0 10px 24px -8px color-mix(in oklab, var(--z-void) 60%, transparent); animation: pop-in var(--z-dur-std) var(--z-spring); }

  /* inspector: the paper trail of what is hidden */
  .inspector { display: flex; flex-direction: column; min-height: 0; background: var(--z-ground); border-left: 1px solid var(--z-border); }
  .tally { display: flex; align-items: center; gap: 14px; padding: 18px 20px 16px; border-bottom: 1px solid var(--z-border); }
  .tally-figure { flex: none; font: 600 44px/1 var(--z-font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; min-width: 1ch; }
  .tally-figure.tick { animation: tick 380ms var(--z-spring); }
  @keyframes tick { from { transform: scale(0.84); opacity: 0.4; } }
  .tally-label { font: 600 15px/1.2 var(--z-font-display); }
  .tally-sub { margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--z-fg-muted); }
  .tally-toggle { display: none; }
  .inspector-body { flex: 1; min-height: 0; overflow: auto; }

  .groups { padding: 4px 0 6px; }
  .groups section { padding: 7px 20px 1px; }
  .groups h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 3px; color: var(--z-fg-muted); font-size: 11px; font-weight: 600; letter-spacing: var(--z-track-label); text-transform: uppercase; }
  .groups h2 .count { margin-left: auto; color: var(--z-fg-subtle); letter-spacing: 0.02em; text-transform: none; font-weight: 500; }
  .glyph { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--cat); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .groups ul { margin: 0; padding: 0; list-style: none; }
  .row {
    display: flex; align-items: center; gap: 10px; width: calc(100% + 16px); height: 28px; margin: 0 -8px; padding: 0 8px;
    border: 0; border-radius: 8px; background: transparent; color: var(--z-fg); text-align: left; cursor: pointer;
    transition: background-color var(--z-dur-micro) ease;
  }
  .row.is-linked { background: var(--z-surface-1); }
  @media (hover: hover) { .row:hover { background: var(--z-surface-1); } }
  .row .ph { flex: none; width: 96px; font: 400 12px/1 var(--z-font-mono); }
  .row .orig { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--z-fg-muted); }
  .row .verified { flex: none; font: 500 11.5px/1 var(--z-font-display); color: var(--z-success-text); }
  .row.is-kept .ph { color: var(--z-fg-subtle); text-decoration: line-through; }
  .row.is-kept .orig { color: var(--z-fg); }
  .sw { flex: none; position: relative; width: 30px; height: 18px; border-radius: 99px; background: var(--z-surface-2); box-shadow: inset 0 0 0 1px var(--z-border-control); transition: background-color var(--z-dur-std) ease; }
  .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--z-fg-muted); transition: transform var(--z-dur-std) var(--z-spring), background-color var(--z-dur-std) ease; }
  .row[aria-checked='true'] .sw { background: var(--z-fg); box-shadow: none; }
  .row[aria-checked='true'] .sw::after { background: var(--z-night); transform: translateX(12px); }

  .explain { padding: 18px 20px; display: grid; gap: 12px; }
  .explain .kicker { font: 600 11px/1 var(--z-font-display); letter-spacing: var(--z-track-label); text-transform: uppercase; color: var(--z-fg-muted); }
  .explain-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
  .explain-list li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; font-size: 13.5px; color: var(--z-fg-muted); line-height: 1.4; }
  .explain-list .glyph { margin-top: 1px; }
  .explain-list b { display: block; color: var(--z-fg); font-weight: 600; }
  .explain-note { font-size: 12.5px; color: var(--z-fg-subtle); line-height: 1.5; padding-top: 10px; border-top: 1px solid var(--z-border); }

  .hide-more { padding: 10px 20px 16px; border-top: 1px solid var(--z-border); display: grid; gap: 6px; font-size: 12.5px; color: var(--z-fg-muted); }
  .hide-more-row { display: flex; gap: 6px; }
  .hide-more input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--z-border-control); background: var(--z-night); font-size: 13.5px; }
  .hide-more input:focus { outline: 2px solid var(--z-accent-text); outline-offset: 1px; }

  .back-summary { padding: 16px 20px; display: grid; gap: 10px; justify-items: start; }
  .back-summary .kicker { font: 600 11px/1 var(--z-font-display); letter-spacing: var(--z-track-label); text-transform: uppercase; color: var(--z-fg-muted); }
  .back-list { width: 100%; margin: 0; padding: 0; list-style: none; display: grid; }
  .back-list li { display: flex; align-items: center; gap: 10px; height: 28px; }
  .back-list .ph { flex: none; width: 96px; font: 400 12px/1 var(--z-font-mono); color: var(--z-fg-muted); }
  .back-list .orig { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--z-fg); }
  .back-missing { font-size: 12.5px; color: var(--z-warning-text); line-height: 1.45; }

  .actions { padding: 14px 20px 16px; border-top: 1px solid var(--z-border); display: grid; gap: 8px; }
  .btn-wide { width: 100%; height: 44px; font-size: 15px; }
  .btn-wide.is-done { background: var(--z-success); }
  .actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .actions-note { font-size: 12px; color: var(--z-fg-subtle); text-align: center; line-height: 1.4; }

  .actions { position: relative; }
  .toast {
    position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 40; transform: translate(-50%, 6px);
    padding: 8px 14px; border-radius: var(--z-radius-pill); background: var(--z-surface-2); color: var(--z-fg);
    font: 500 13px/1.2 var(--z-font-display); box-shadow: 0 0 0 1px var(--z-border-strong), 0 12px 28px -10px color-mix(in oklab, var(--z-void) 60%, transparent);
    opacity: 0; pointer-events: none; transition: opacity var(--z-dur-std) ease, transform var(--z-dur-std) var(--z-ease); white-space: nowrap;
  }
  .toast.is-on { opacity: 1; transform: translate(-50%, 0); }
  .toast:empty { display: none; }

  .kicker-line { font: 600 12px/1.2 var(--z-font-display); letter-spacing: var(--z-track-label); text-transform: uppercase; color: var(--z-fg-muted); }

  /* tools home */
  .tools-home { width: 100%; max-width: 1080px; margin: 0 auto; padding: 64px 24px 72px; flex: 1; display: grid; gap: 40px; }
  .tools-home h1 { font: 600 clamp(32px, 4.6vw, 52px)/1.08 var(--z-font-display); letter-spacing: -0.015em; max-width: 18ch; }
  .tools-home .lede { margin-top: 14px; max-width: 58ch; color: var(--z-fg-muted); font-size: 17px; line-height: 1.55; }
  .tool-card {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: center; padding: 28px;
    border: 1px solid var(--z-border-strong); border-radius: 18px; background: var(--z-ground); color: inherit; text-decoration: none;
    transition: border-color var(--z-dur-std) ease, transform var(--z-dur-std) var(--z-ease);
  }
  @media (hover: hover) { .tool-card:hover { border-color: var(--z-border-control); transform: translateY(-2px); } }
  .tool-card h2 { font: 600 26px/1.15 var(--z-font-display); }
  .tool-card p { margin-top: 10px; color: var(--z-fg-muted); line-height: 1.55; }
  .tool-card .go { margin-top: 18px; }
  .tool-card .go .icon { transition: transform var(--z-dur-std) var(--z-spring); }
  @media (hover: hover) { .tool-card:hover .go .icon { transform: translateX(3px); } }
  .tools-home .kicker-line { margin-bottom: 16px; }
  .card-sheet { padding: 22px 26px; font-size: 15px; line-height: 1.8; min-height: 0; }
  .tool-card .card-sheet p { margin: 0; color: var(--z-ink); }
  .card-sheet .r { cursor: default; }

  /* responsive and reduced motion: same layer, later, so they win by order */
  @media (max-width: 1100px) {
    .desk { grid-template-columns: minmax(0, 1fr) 316px; }
    .sheet { padding: 30px 36px 38px; }
  }
  @media (max-width: 520px) { .topbar-title { display: none; } }
  @media (max-width: 760px) {
    .desk { display: block; height: auto; min-height: 0; padding-bottom: 96px; }
    .work { padding: 12px 12px 0; }
    .work-bar { flex-wrap: wrap; gap: 10px; }
    .steps { width: 100%; }
    .step { flex: 1; justify-content: center; }
    .sample-note { margin: -10px 0 12px; }
    .topbar-actions { order: 0; width: auto; margin-left: auto; }
    .proof summary { width: 34px; padding: 0; justify-content: center; }
    .proof summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .work-actions { margin-left: 0; order: 2; }
    .sheet-wrap { overflow: visible; padding: 12px 0 20px; }
    .sheet { padding: 22px 18px 26px; }
    .intake-title { font-size: 19px; }
    .intake-text { min-height: 220px; }
    .intake-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .intake-actions .btn-primary { grid-column: 1 / -1; height: 44px; }
    .doc { font-size: 16px; }
    .mail-head div { grid-template-columns: 60px minmax(0, 1fr); }
    .inspector {
      position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; max-height: 78dvh; border-left: 0;
      border-top: 1px solid var(--z-border-strong); box-shadow: 0 -16px 32px -12px color-mix(in oklab, var(--z-void) 60%, transparent);
    }
    .inspector-body { display: none; max-height: 52dvh; }
    .inspector[data-open='true'] .inspector-body { display: block; }
    .tally { padding: 10px 14px; border-bottom: 0; }
    .tally-figure { font-size: 30px; }
    .tally-sub { display: none; }
    .tally-toggle { display: grid; margin-left: auto; flex: none; }
    .tally-toggle .icon { transition: transform var(--z-dur-std) var(--z-ease); }
    .inspector[data-open='true'] .tally-toggle .icon { transform: rotate(180deg); }
    .actions { padding: 0 14px 12px; border-top: 0; }
    .actions-row, .actions-note { display: none; }
    .inspector[data-open='true'] .actions-row { display: grid; }
    .desk[data-state='empty'] .inspector { position: static; box-shadow: none; max-height: none; margin-top: 8px; border-top: 1px solid var(--z-border); }
    .desk[data-state='empty'] .inspector-body { display: block; max-height: none; }
    .desk[data-state='empty'] .tally { display: none; }
    .tool-card { grid-template-columns: 1fr; padding: 20px; }
    .tools-home { padding: 40px 16px 56px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .sheet, .is-fresh .r::before, .is-fresh .r > .ph, .is-fresh mark.back, .tally-figure.tick, .hide-sel, .proof-pop { animation: none; }
    .sheet.is-scanning::after { animation: none; }
  }
}
