
/* Layout: an inspection workbench — intake and a findings ledger on the left, a sticky options rail on the right; Frost surfaces with hairline rules. */
:root {
  --bg: #fafafa; --surface: #ffffff; --sunk: #f4f4f6; --fg: #0b0b0d; --muted: #5f6069; --faint: #92939c;
  --line: #e6e7eb; --line-strong: #d3d4da; --ink: #111114; --ink-fg: #fafafa; --accent: #2453d6;
  --ai: #c8372a; --ai-bg: #fcefed; --tool: #9a620f; --tool-bg: #faf2e3; --personal: #2a62c4; --personal-bg: #edf2fc;
  --hidden: #6d42c9; --hidden-bg: #f2edfb; --time: #676973; --time-bg: #f0f0f3; --ok: #17744b; --ok-bg: #e8f5ee; --warn: #9a5a06; --warn-bg: #fcf2e1;
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 12px; --r-sm: 7px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0b0b0d; --surface: #121215; --sunk: #17171b; --fg: #ececef; --muted: #a0a1aa; --faint: #6e6f78;
  --line: #24252a; --line-strong: #34353c; --ink: #ececef; --ink-fg: #0b0b0d; --accent: #82a6ff;
  --ai: #ff7b6c; --ai-bg: #2b1612; --tool: #eeb553; --tool-bg: #2a2011; --personal: #7fa9ff; --personal-bg: #131c2d;
  --hidden: #b89bff; --hidden-bg: #1f172f; --time: #a2a3ab; --time-bg: #1c1c20; --ok: #52c78f; --ok-bg: #0f2318; --warn: #eeb553; --warn-bg: #2a2011;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0b0b0d; --surface: #121215; --sunk: #17171b; --fg: #ececef; --muted: #a0a1aa; --faint: #6e6f78;
  --line: #24252a; --line-strong: #34353c; --ink: #ececef; --ink-fg: #0b0b0d; --accent: #82a6ff;
  --ai: #ff7b6c; --ai-bg: #2b1612; --tool: #eeb553; --tool-bg: #2a2011; --personal: #7fa9ff; --personal-bg: #131c2d;
  --hidden: #b89bff; --hidden-bg: #1f172f; --time: #a2a3ab; --time-bg: #1c1c20; --ok: #52c78f; --ok-bg: #0f2318; --warn: #eeb553; --warn-bg: #2a2011;
  color-scheme: dark; }

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font: 400 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
.mono { font-family: var(--mono); }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-in { max-width: 1180px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.brand svg { width: 22px; height: 22px; color: var(--fg); }
.local { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.local i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }

.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 16px; padding-block: 28px 64px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "intake rail" "results rail" "limits rail"; column-gap: 28px; row-gap: 22px; align-items: start; }
.intake { grid-area: intake; min-width: 0; }
.results { grid-area: results; min-width: 0; display: grid; gap: 12px; }
.rail { grid-area: rail; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); }
.limits { grid-area: limits; min-width: 0; }

h1 { font-size: clamp(24px, 3.2vw, 31px); line-height: 1.15; letter-spacing: -0.025em; font-weight: 600; margin: 0 0 8px; text-wrap: balance; }
.lede { color: var(--muted); max-width: 64ch; margin: 0 0 18px; }

.drop { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 30px 18px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover { border-color: var(--faint); }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop.over { border-color: var(--accent); background: var(--sunk); }
.drop svg { width: 28px; height: 28px; color: var(--muted); }
.drop strong { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.drop .hint { color: var(--muted); font-size: 12.5px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.formats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.formats span { font: 500 11px/1 var(--mono); letter-spacing: .04em; color: var(--muted); padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--ink-fg); font-weight: 500; font-size: 13px; cursor: pointer; white-space: nowrap; transition: opacity .15s, transform .1s; }
.btn:hover { opacity: .88; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--surface); color: var(--fg); border-color: var(--line-strong); }
.btn.ghost:hover { opacity: 1; background: var(--sunk); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn[disabled] { opacity: .4; cursor: default; }
.btn svg { width: 15px; height: 15px; }

/* summary */
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.stat { padding: 12px 14px; border-right: 1px solid var(--line); min-width: 0; }
.stat b { display: block; font: 600 21px/1.1 var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat.ai b { color: var(--ai); }
.stat.rv b { color: var(--warn); }
.sum-act { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); color: var(--muted); font-size: 13px; }
.banner b { color: var(--fg); font-weight: 600; }

/* file cards */
.file { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.fh { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 14px; }
.badge { font: 500 10.5px/1 var(--mono); letter-spacing: .05em; padding: 6px 7px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--muted); min-width: 44px; text-align: center; }
.fname { font-weight: 600; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.fsub { font: 400 12px/1.4 var(--mono); color: var(--muted); overflow-wrap: anywhere; margin-top: 2px; }
.fsub .ren { color: var(--fg); }
.status { font-size: 12px; font-weight: 500; padding: 4px 9px 4px 8px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--ok); background: var(--ok-bg); }
.status.none { color: var(--time); background: var(--time-bg); }
.status.warn { color: var(--warn); background: var(--warn-bg); }
.status.bad { color: var(--ai); background: var(--ai-bg); }
.status.busy { color: var(--muted); background: var(--sunk); }
.status.busy::before { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.tally { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--sunk); color: var(--muted); font-variant-numeric: tabular-nums; }
.pill i { width: 7px; height: 7px; border-radius: 2px; background: currentColor; }
.pill b { color: var(--fg); font-weight: 600; }
.c-ai { color: var(--ai); } .c-tool { color: var(--tool); } .c-personal { color: var(--personal); } .c-hidden { color: var(--hidden); } .c-time, .c-meta, .c-style { color: var(--time); } .c-review { color: var(--warn); }

details.log { border-top: 1px solid var(--line); }
details.log > summary { list-style: none; cursor: pointer; padding: 10px 14px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; user-select: none; }
details.log > summary::-webkit-details-marker { display: none; }
details.log > summary svg { width: 14px; height: 14px; transition: transform .15s; }
details.log[open] > summary svg { transform: rotate(90deg); }
.rows { list-style: none; margin: 0; padding: 0 14px 12px; display: grid; gap: 0; }
.row { display: grid; grid-template-columns: 10px minmax(150px, 0.9fr) minmax(0, 1.6fr) auto; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.row:first-child { border-top: 0; }
.row .dot { width: 7px; height: 7px; border-radius: 2px; background: currentColor; align-self: center; }
.row .lbl { color: var(--fg); overflow-wrap: anywhere; }
.row .det { font: 400 12px/1.5 var(--mono); color: var(--muted); overflow-wrap: anywhere; min-width: 0; }
.row .det em { font-style: normal; color: var(--faint); display: block; font-size: 11px; }
.row .act { font: 500 10.5px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--faint); align-self: center; }
.row .act.rv { color: var(--warn); }
.subhead { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 14px 0 6px; border-top: 1px solid var(--line); }
.resid { margin: 0 14px 12px; padding: 9px 11px; border-radius: var(--r-sm); background: var(--warn-bg); color: var(--warn); font-size: 12.5px; }
.err { margin: 0 14px 14px; padding: 9px 11px; border-radius: var(--r-sm); background: var(--ai-bg); color: var(--ai); font-size: 12.5px; }

/* rail */
.rail-box { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.rail-box > summary { list-style: none; cursor: pointer; padding: 14px 16px 6px; font-weight: 600; font-size: 13.5px; display: flex; justify-content: space-between; align-items: center; }
.rail-box > summary::-webkit-details-marker { display: none; }
.rail-box > summary small { font-weight: 400; color: var(--faint); font-size: 12px; }
.group { padding: 4px 16px 10px; }
.group + .group { border-top: 1px solid var(--line); padding-top: 10px; }
.glabel { font: 500 10.5px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin: 6px 0 6px; }
.opt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 7px 0; cursor: pointer; }
.opt .t { font-size: 13px; font-weight: 500; }
.opt .d { font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 1px; }
.sw { position: relative; width: 32px; height: 19px; margin-top: 1px; }
.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sw span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-strong); transition: background .15s; pointer-events: none; }
.sw span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.sw input:checked + span { background: var(--ink); }
.sw input:checked + span::after { transform: translateX(13px); }
.sw input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: grid; gap: 5px; padding: 8px 0 4px; }
.field label { font-size: 13px; font-weight: 500; }
.field input { height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 10px; background: var(--bg); font-size: 13px; width: 100%; }
.field small { font-size: 12px; color: var(--muted); }
.rail-note { padding: 10px 16px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

.limits h2 { font-size: 14px; font-weight: 600; margin: 8px 0 8px; letter-spacing: -0.005em; }
.limits ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; max-width: 72ch; }
.limits li { color: var(--muted); font-size: 13px; padding-left: 16px; position: relative; }
.limits li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 1px; background: var(--faint); }
.limits li b { color: var(--fg); font-weight: 500; }

.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--ink-fg); font-size: 13px; padding: 9px 14px; border-radius: 9px; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intake" "rail" "results" "limits"; padding-block: 20px 48px; }
  .rail { position: static; }
}
@media (max-width: 640px) {
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stat:nth-child(4) { border-right: 0; }
  .sum-act { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .sum-act .btn { flex: 1; }
  .fh { grid-template-columns: auto minmax(0, 1fr); }
  .fh .status { grid-column: 2; justify-self: start; }
  .fh .btn { grid-column: 1 / -1; }
  .row { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .row .det { grid-column: 2 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

body{margin:0}[hidden]{display:none!important}img{max-width:100%}

.trust-note{color:var(--muted);font-size:12.5px;margin:-6px 0 16px}.trust-note a{color:var(--accent)}
.preset-note{font-size:12px;color:var(--muted);margin:8px 0 0;line-height:1.5}
.public-footer{max-width:1180px;margin:0 auto;padding:0 16px 32px;color:var(--muted);font-size:12.5px}
.public-footline{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px 20px;border-top:1px solid var(--line);padding-top:16px}
.public-footline strong{color:var(--fg);font-weight:600}.public-legal{border:1px solid var(--line);border-radius:var(--r-sm);padding:12px 14px;margin-top:10px;background:var(--surface)}
.public-legal summary{color:var(--fg);font-weight:500;cursor:pointer}.public-legal h3{color:var(--fg);font-size:13px;margin:16px 0 5px}.public-legal p{max-width:100ch;margin:6px 0 10px}.public-legal pre{white-space:pre-wrap;word-break:break-word;font:11px/1.5 var(--mono);max-height:300px;overflow:auto}

.online-access{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin:0 0 16px;font-size:12.5px;color:var(--muted)}.online-access [hidden]{display:none!important}.online-access a{color:var(--accent)}html[data-access-state]:not([data-access-state="ready"]) .drop{opacity:.55;cursor:not-allowed}
.ami-brand{text-decoration:none;color:inherit;min-width:0}.ami-app-logo{width:46px;height:46px;object-fit:contain;flex-shrink:0}.ami-brand-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.ami-brand-copy>span{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ami-brand-copy small{font-size:11.5px;color:var(--muted);font-weight:400}.ami-version{border:1px solid var(--line);border-radius:5px;font:10px var(--mono);padding:3px 5px;color:var(--muted)}.top-in{min-height:72px;height:auto;padding-top:10px;padding-bottom:10px}@media(max-width:620px){.top-in{align-items:flex-start}.local{font-size:11px}.ami-app-logo{width:40px;height:40px}}
