/* Nitaq — "the scope". Warm paper, Nile teal, and amber for what was hidden (X-ray). */

:root{
  --paper:#f6f1e7; --surface:#fffdf8; --surface-2:#f1eadc; --sunk:#ebe3d3;
  --ink:#1a1d1b; --ink-2:#424741; --muted:#5f635b; --line:#e2d9c8; --line-2:#d3c8b3; --field-line:#8f8571;
  --brand:#0e6a61; --brand-strong:#0a4741; --brand-soft:#dcece7; --brand-ink:#0a4741; --on-brand:#fffdf8;
  --amber:#a8520a; --amber-soft:#fff0d3; --amber-line:#f0b45a; --glow:#f5b544;
  --bad:#b42318; --bad-soft:#fde8e4; --bad-line:#f1a99f;
  --warn:#a65a00; --warn-soft:#fdf0d9; --warn-line:#f0c27a;
  --ok:#1d7a4c; --ok-soft:#e1f2e8; --ok-line:#9fd3b6;
  --info:#2457c5; --info-soft:#e7eefc;
  --r-s:10px; --r:16px; --r-l:24px;
  --sh-1:0 1px 2px rgba(42,33,14,.06),0 1px 1px rgba(42,33,14,.04);
  --sh-2:0 2px 6px rgba(42,33,14,.06),0 12px 32px -8px rgba(42,33,14,.14);
  --sh-3:0 24px 60px -18px rgba(10,71,65,.35);
  --font:"Plex Arabic","IBM Plex Sans Arabic","Noto Sans Arabic","Segoe UI",Tahoma,system-ui,sans-serif;
  --mono:ui-monospace,"JetBrains Mono","Cascadia Mono",Consolas,"DejaVu Sans Mono",monospace;
  --ease:cubic-bezier(.2,.7,.2,1); --t-fast:140ms; --t:240ms; --t-slow:420ms;
  --tabbar:64px; --topbar:58px;
  color-scheme:light;
}
:root[data-theme=dark]{
  --paper:#0e1311; --surface:#151b18; --surface-2:#1b231f; --sunk:#111714;
  --ink:#ece6da; --ink-2:#c9c3b6; --muted:#9ba196; --line:#252f2a; --line-2:#33403a; --field-line:#6b7a71;
  --brand:#3cc2b2; --brand-strong:#7fdccf; --brand-soft:#15302b; --brand-ink:#9fe6dc; --on-brand:#06201d;
  --amber:#f7bd5d; --amber-soft:#2a1f0d; --amber-line:#7a5418; --glow:#f5b544;
  --bad:#ff8a7a; --bad-soft:#341612; --bad-line:#6e2a22;
  --warn:#f5b35a; --warn-soft:#2f220f; --warn-line:#6b4a17;
  --ok:#5fd394; --ok-soft:#10291c; --ok-line:#21573a;
  --info:#93b4ff; --info-soft:#172341;
  --sh-1:none; --sh-2:0 1px 0 rgba(255,255,255,.03),0 16px 40px -16px rgba(0,0,0,.6); --sh-3:0 24px 60px -20px rgba(0,0,0,.7);
  color-scheme:dark;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html,body{margin:0;min-height:100%}
body{background:var(--paper);color:var(--ink);font:16px/1.7 var(--font);-webkit-font-smoothing:antialiased;
  -webkit-tap-highlight-color:transparent;overflow-x:hidden}
[lang=en] body{line-height:1.6}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--brand);text-underline-offset:3px}
bdi{unicode-bidi:isolate}
svg{width:1.15em;height:1.15em;flex:none}
.ltr{direction:ltr;unicode-bidi:isolate;text-align:start}
.mono{font-family:var(--mono);font-size:.86em}
.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
:focus-visible{outline:3px solid color-mix(in srgb,var(--brand) 55%,transparent);outline-offset:2px;border-radius:8px}
::selection{background:color-mix(in srgb,var(--glow) 45%,transparent)}

/* ------------------------------------------------------------ shell */
.app{min-height:100dvh;display:grid;grid-template-rows:var(--topbar) 1fr;padding-bottom:calc(var(--tabbar) + env(safe-area-inset-bottom))}
.top{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:10px;padding:0 max(14px,env(safe-area-inset-right)) 0 max(14px,env(safe-area-inset-left));
  background:color-mix(in srgb,var(--paper) 82%,transparent);backdrop-filter:saturate(1.4) blur(14px);-webkit-backdrop-filter:saturate(1.4) blur(14px);
  border-bottom:1px solid transparent;transition:border-color var(--t) var(--ease)}
.top.scrolled{border-bottom-color:var(--line)}
.mark{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit}
.mark img{width:34px;height:34px;border-radius:10px;box-shadow:var(--sh-1)}
.mark b{font-size:19px;font-weight:700;letter-spacing:-.2px;line-height:1}
.mark small{display:none}
.top .grow{flex:1}
.iconbtn{all:unset;cursor:pointer;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:var(--ink-2);
  transition:background var(--t-fast),transform var(--t-fast)}
.iconbtn:hover{background:var(--surface-2)} .iconbtn:active{transform:scale(.94)}
.iconbtn svg{width:21px;height:21px}
.langbtn{all:unset;cursor:pointer;height:36px;padding:0 12px;border-radius:999px;border:1px solid var(--line-2);font-size:13.5px;font-weight:600;
  display:inline-flex;align-items:center;transition:background var(--t-fast)}
.langbtn:hover{background:var(--surface-2)}
.conn{display:none;align-items:center;gap:6px;font-size:12.5px;color:var(--ok);background:var(--ok-soft);border-radius:999px;padding:3px 10px;font-weight:600}
.conn i{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 0 3px color-mix(in srgb,currentColor 25%,transparent)}
.connected .conn{display:inline-flex}

.main{width:100%;max-width:1080px;margin:0 auto;padding:18px max(16px,env(safe-area-inset-right)) 40px max(16px,env(safe-area-inset-left));outline:none;min-width:0}
.view{animation:viewIn 200ms ease-out both}
@keyframes viewIn{from{opacity:0}to{opacity:1}}

/* bottom tab bar (phones) */
.tabbar{position:fixed;inset-inline:0;bottom:0;z-index:30;height:calc(var(--tabbar) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);
  display:grid;grid-template-columns:repeat(4,1fr);background:color-mix(in srgb,var(--surface) 88%,transparent);
  backdrop-filter:saturate(1.4) blur(16px);-webkit-backdrop-filter:saturate(1.4) blur(16px);border-top:1px solid var(--line)}
.tab{all:unset;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11.5px;font-weight:600;
  color:var(--muted);position:relative;transition:color var(--t) var(--ease)}
.tab svg{width:23px;height:23px;transition:transform var(--t) var(--ease)}
.tab .pill-bg{position:absolute;top:8px;width:54px;height:30px;border-radius:999px;background:var(--brand-soft);transform:scaleX(.4);opacity:0;
  transition:transform var(--t) var(--ease),opacity var(--t) var(--ease);z-index:-1}
.tab[aria-current=page]{color:var(--brand-ink)}
.tab[aria-current=page] .pill-bg{transform:none;opacity:1}
.tab:active svg{transform:scale(.9)}
.rail{display:none}

@media (min-width:960px){
  .app{grid-template-columns:248px minmax(0,1fr);grid-template-rows:var(--topbar) 1fr;padding-bottom:0}
  .top{grid-column:1/-1}
  .tabbar{display:none}
  .rail{display:flex;flex-direction:column;gap:4px;padding:18px 14px;position:sticky;top:var(--topbar);height:calc(100dvh - var(--topbar));
    border-inline-end:1px solid var(--line)}
  .rail .tab{flex-direction:row;justify-content:flex-start;gap:12px;font-size:15px;padding:10px 14px;border-radius:12px;color:var(--ink-2)}
  .rail .tab:hover{background:var(--surface-2)}
  .rail .tab .pill-bg{inset:0;top:0;width:auto;height:auto;border-radius:12px}
  .rail .tab svg{width:21px;height:21px}
  .rail .spacer{flex:1}
  .rail .foot{font-size:12px;color:var(--muted);padding:10px 14px;line-height:1.5}
  .main{padding:30px 40px 70px}
}

/* ------------------------------------------------------------ type + primitives */
h1{font-size:clamp(26px,6.4vw,40px);line-height:1.2;letter-spacing:-.4px;margin:0 0 10px;font-weight:700;text-wrap:balance}
h2{font-size:20px;line-height:1.35;margin:0 0 10px;font-weight:700;text-wrap:balance}
h3{font-size:16.5px;margin:0 0 6px;font-weight:700}
p{margin:0 0 10px}
.lead{color:var(--ink-2);font-size:clamp(15.5px,3.9vw,18px);max-width:62ch;text-wrap:pretty}
.muted{color:var(--muted)} .small{font-size:13.5px} .tiny{font-size:12px}
.eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;font-weight:700;letter-spacing:.3px;color:var(--ink-2);
  background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:4px 12px;margin-bottom:14px}
[lang=en] .eyebrow{text-transform:uppercase;letter-spacing:.8px;font-size:11.5px}
.eyebrow svg{width:15px;height:15px}
.stack{display:flex;flex-direction:column;gap:14px}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.between{justify-content:space-between}
.grid{display:grid;gap:14px}
@media (min-width:720px){.g2{grid-template-columns:repeat(2,minmax(0,1fr))}.g3{grid-template-columns:repeat(3,minmax(0,1fr))}}
.mt{margin-top:14px}.mt2{margin-top:26px}.mt3{margin-top:40px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:18px;box-shadow:var(--sh-1)}
.card.pad-l{padding:22px}
.card.soft{background:var(--surface-2);box-shadow:none}

.btn{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:0 20px;
  border-radius:14px;font-weight:700;font-size:15.5px;background:var(--brand);color:var(--on-brand);
  box-shadow:0 1px 0 rgba(255,255,255,.18) inset,0 6px 16px -6px color-mix(in srgb,var(--brand) 70%,transparent);
  transition:transform var(--t-fast) var(--ease),filter var(--t-fast),box-shadow var(--t) var(--ease)}
.btn:hover{filter:brightness(1.07)} .btn:active{transform:scale(.97)}
.btn svg{width:20px;height:20px;flex:none}
.btn.big{min-height:56px;font-size:17px;border-radius:16px;padding:0 26px}
.btn.ghost{background:var(--brand-soft);color:var(--brand-ink);box-shadow:none}
.btn.line{background:transparent;color:var(--ink);border:1px solid var(--line-2);box-shadow:none}
.btn.line:hover{background:var(--surface-2);filter:none}
.btn.danger{background:var(--bad);color:#fff}
.btn.wide{width:100%}
.btn[disabled]{opacity:.42;cursor:not-allowed;transform:none;filter:none}
.link{all:unset;cursor:pointer;color:var(--brand);font-weight:600;text-decoration:underline;text-underline-offset:3px}

.in{width:100%;background:var(--surface);border:1px solid var(--field-line);border-radius:12px;padding:11px 14px;min-height:46px;
  transition:border-color var(--t-fast),box-shadow var(--t-fast)}
.in:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 4px color-mix(in srgb,var(--brand) 18%,transparent)}
textarea.in{min-height:150px;resize:vertical;line-height:1.6;unicode-bidi:plaintext}
textarea.in.code{font-family:var(--mono);font-size:13.5px;direction:ltr;text-align:left}
.f{display:block;font-size:13.5px;font-weight:600;color:var(--ink-2);margin:0 0 6px}

.seg{display:inline-flex;background:var(--sunk);border-radius:14px;padding:4px;gap:4px;max-width:100%;overflow-x:auto;scrollbar-width:none}
.seg::-webkit-scrollbar{display:none}
.seg button{all:unset;cursor:pointer;white-space:nowrap;padding:8px 16px;min-height:24px;line-height:24px;border-radius:11px;font-weight:600;font-size:14.5px;color:var(--muted);
  transition:background var(--t) var(--ease),color var(--t) var(--ease),box-shadow var(--t)}
.seg button[aria-pressed=true],.seg button[aria-selected=true]{background:var(--surface);color:var(--ink);box-shadow:var(--sh-1)}

.chip{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border-radius:999px;font-size:14px;font-weight:600;
  background:var(--surface);border:1px solid var(--line-2);color:var(--ink-2);transition:background var(--t-fast),transform var(--t-fast),border-color var(--t-fast)}
.chip:hover{border-color:var(--brand);color:var(--brand-ink)} .chip:active{transform:scale(.97)}
.chip svg{width:17px;height:17px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.tag{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:2px 10px;font-size:12.5px;font-weight:700;white-space:nowrap;line-height:1.7}
.tag svg{width:14px;height:14px}
.tag.bad{background:var(--bad-soft);color:var(--bad)} .tag.warn{background:var(--warn-soft);color:var(--warn)}
.tag.ok{background:var(--ok-soft);color:var(--ok)} .tag.info{background:var(--info-soft);color:var(--info)}
.tag.amber{background:var(--amber-soft);color:var(--amber);box-shadow:inset 0 0 0 1px var(--amber-line)}
.tag.mute{background:var(--surface-2);color:var(--muted)}

/* ------------------------------------------------------------ check (home) */
.hero{display:grid;gap:18px;margin:2px 0 22px;grid-template-areas:"head" "drop" "more"}
.hero .head{grid-area:head} .hero .drop{grid-area:drop} .hero .more{grid-area:more}
.hero h1{font-size:clamp(27px,7.4vw,46px);margin-bottom:0}
@media (min-width:960px){.hero{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);grid-template-areas:"head drop" "more drop";
  column-gap:44px;row-gap:16px;align-items:start;margin:20px 0 30px}.hero .more{align-self:start}}
.hero h1 em{font-style:normal;color:var(--brand);background:linear-gradient(transparent 62%,color-mix(in srgb,var(--glow) 38%,transparent) 0)}
.trust{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:14px;font-size:13.5px;color:var(--ink-2)}
.trust span{display:inline-flex;align-items:center;gap:7px}
.trust svg{width:17px;height:17px;color:var(--ok)}

.drop{position:relative;border-radius:var(--r-l);background:var(--surface);border:1.5px dashed var(--line-2);padding:26px 20px 22px;text-align:center;
  box-shadow:var(--sh-2);transition:border-color var(--t),background var(--t),transform var(--t) var(--ease)}
.drop.over{border-color:var(--brand);background:color-mix(in srgb,var(--brand-soft) 60%,var(--surface));transform:scale(1.01)}
.drop .glyph{width:64px;height:64px;margin:0 auto 12px;border-radius:20px;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand)}
.drop .glyph svg{width:32px;height:32px}
.drop h2{margin-bottom:4px}
.drop .formats{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:14px 0 4px}
.drop .or{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13px;margin:16px 0 12px}
.drop .or::before,.drop .or::after{content:"";flex:1;height:1px;background:var(--line)}
.pastebox{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--t-slow) var(--ease)}
.pastebox.open{grid-template-rows:1fr}
.pastebox > div{overflow:hidden}
.pastebox textarea{margin-top:4px}
.examples{margin-top:18px}
.examples .chips{justify-content:center}

/* progress */
.progress{height:4px;border-radius:999px;background:var(--sunk);overflow:hidden;margin:14px 0}
.progress i{display:block;height:100%;width:40%;border-radius:inherit;background:linear-gradient(90deg,var(--brand),var(--glow));
  animation:prog 1.1s var(--ease) infinite}
@keyframes prog{from{transform:translateX(-110%)}to{transform:translateX(260%)}}
[dir=rtl] .progress i{animation-name:progr}
@keyframes progr{from{transform:translateX(110%)}to{transform:translateX(-260%)}}
.scanning{display:flex;align-items:center;gap:14px;padding:18px}
.scanning .glyph{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand)}
.scanning .glyph svg{width:24px;height:24px;animation:pulse 1.2s ease-in-out infinite}
@keyframes pulse{50%{transform:scale(.86);opacity:.7}}

/* ------------------------------------------------------------ result */
.result{display:flex;flex-direction:column;gap:16px}
.verdict{position:relative;overflow:hidden;border-radius:var(--r-l);padding:22px 20px;display:grid;grid-template-columns:auto 1fr;gap:16px;align-items:start;
  border:1px solid var(--line);background:var(--surface);box-shadow:var(--sh-2);animation:pop var(--t-slow) var(--ease) both}
@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
.verdict::before{content:"";position:absolute;inset:0 0 auto 0;height:5px;background:var(--vc)}
.verdict .vi{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;background:var(--vs);color:var(--vc)}
.verdict .vi svg{width:30px;height:30px}
.verdict .vi svg path,.verdict .vi svg circle{stroke-dasharray:80;stroke-dashoffset:80;animation:draw .7s .15s var(--ease) forwards}
@keyframes draw{to{stroke-dashoffset:0}}
.verdict h2{font-size:22px;margin:0 0 4px;color:var(--vc)}
.verdict p{margin:0;color:var(--ink-2)}
.verdict.danger{--vc:var(--bad);--vs:var(--bad-soft)} .verdict.warn{--vc:var(--warn);--vs:var(--warn-soft)}
.verdict.clear{--vc:var(--ok);--vs:var(--ok-soft)} .verdict.unsupported{--vc:var(--info);--vs:var(--info-soft)}
.verdict .file{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:13.5px;color:var(--muted)}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.stat{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:12px 14px}
.stat b{display:block;font-size:26px;line-height:1.1;font-weight:700;font-variant-numeric:tabular-nums}
.stat span{font-size:12.5px;color:var(--muted);line-height:1.35;display:block;margin-top:2px}
.stat.amber b{color:var(--amber)} .stat.bad b{color:var(--bad)}

/* X-ray document */
.xray{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-l);overflow:hidden;box-shadow:var(--sh-1)}
.xray header{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,var(--surface),var(--surface-2))}
.xray header h3{margin:0;display:flex;align-items:center;gap:8px}
.xray header h3 svg{width:20px;height:20px;color:var(--amber)}
.paper{padding:16px 16px 6px}
.sg{position:relative;margin:0 0 12px;padding:2px 0;white-space:pre-wrap;word-break:break-word;unicode-bidi:plaintext;text-align:start;
  transition:opacity var(--t) var(--ease)}
.sg .where{display:block;font-size:11.5px;color:var(--muted);margin-bottom:2px}
.sg.hidden,.sg.unseen{border-radius:12px;padding:10px 12px 10px;background:var(--amber-soft);box-shadow:inset 0 0 0 1px var(--amber-line)}
.sg.hidden{background:repeating-linear-gradient(-45deg,var(--amber-soft) 0 10px,color-mix(in srgb,var(--amber-soft) 70%,var(--surface)) 10px 20px)}
.sg.unseen{background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line-2)}
.sg .labels{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px}
.sg.instr{box-shadow:inset 0 0 0 1.5px var(--bad-line),0 0 0 4px color-mix(in srgb,var(--bad) 8%,transparent)}
.sg.instr::before{content:"";position:absolute;inset-block:8px;inset-inline-start:-10px;width:4px;border-radius:4px;background:var(--bad)}
.sg .txt{display:block}
.paper.only-hidden .sg.visible{display:none}
.paper.reader .sg.hidden{display:none}
.paper .empty{padding:20px;text-align:center;color:var(--muted)}
.legend{display:flex;flex-wrap:wrap;gap:12px;padding:10px 16px 14px;font-size:12.5px;color:var(--muted);border-top:1px solid var(--line)}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend i{width:14px;height:14px;border-radius:4px;display:inline-block}
.legend .lh{background:var(--amber-soft);box-shadow:inset 0 0 0 1px var(--amber-line)}
.legend .lu{background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line-2)}
.legend .li{background:var(--bad)}

/* findings */
.finding{display:grid;grid-template-columns:auto 1fr;gap:12px;padding:14px 0;border-top:1px solid var(--line)}
.finding:first-child{border-top:0;padding-top:4px}
.finding .dot{width:34px;height:34px;border-radius:11px;display:grid;place-items:center}
.finding .dot svg{width:19px;height:19px}
.finding.high .dot{background:var(--bad-soft);color:var(--bad)} .finding.medium .dot{background:var(--warn-soft);color:var(--warn)}
.finding.low .dot,.finding.info .dot{background:var(--surface-2);color:var(--muted)}
.finding h3{margin:2px 0 4px;font-size:15.5px}
.finding p{margin:0;color:var(--ink-2);font-size:14.5px}
details.ev{margin-top:8px}
details.ev summary{cursor:pointer;font-size:13px;color:var(--brand);font-weight:600;list-style:none;display:inline-flex;align-items:center;gap:6px}
details.ev summary::-webkit-details-marker{display:none}
details.ev summary svg{width:15px;height:15px;transition:transform var(--t) var(--ease)}
details.ev[open] summary svg{transform:rotate(90deg)}
[dir=rtl] details.ev[open] summary svg{transform:rotate(-90deg)}
.code{font-family:var(--mono);font-size:12.5px;line-height:1.55;background:var(--sunk);border-radius:10px;padding:9px 11px;margin-top:6px;
  direction:ltr;unicode-bidi:plaintext;text-align:left;white-space:pre-wrap;word-break:break-word}
.todo{counter-reset:todo;list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.todo li{counter-increment:todo;display:grid;grid-template-columns:30px 1fr;gap:10px;align-items:start}
.todo li::before{content:counter(todo);width:30px;height:30px;border-radius:10px;display:grid;place-items:center;font-weight:700;font-size:14px;
  background:var(--brand-soft);color:var(--brand-ink)}
.honest{border-radius:var(--r);padding:14px 16px;background:var(--brand-soft);color:var(--brand-ink);font-size:14.5px;display:flex;gap:12px;align-items:flex-start}
.honest svg{width:20px;height:20px;flex:none;margin-top:3px}
.actions{display:flex;flex-wrap:wrap;gap:10px}

/* ------------------------------------------------------------ learn */
.flow{display:grid;gap:12px;counter-reset:st}
@media (min-width:860px){.flow{grid-template-columns:repeat(3,minmax(0,1fr))}}
.step{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-l);padding:16px;box-shadow:var(--sh-1);counter-increment:st}
.step h3{margin-top:14px;display:flex;align-items:center;gap:10px}
.step h3::before{content:counter(st);flex:none;width:26px;height:26px;border-radius:9px;display:grid;place-items:center;font-size:13px;
  background:var(--brand-soft);color:var(--brand-ink)}
.step p{font-size:14.5px;color:var(--ink-2);margin:0}
.mock{border-radius:14px;background:var(--paper);border:1px solid var(--line);padding:12px;min-height:128px;font-size:12.5px;line-height:1.55;overflow:hidden}
.mock .ln{height:7px;border-radius:4px;background:var(--line-2);margin:7px 0}
.mock .ln.s{width:62%} .mock .ln.m{width:84%}
.mock .ghost{color:transparent;background:transparent;border-radius:6px;padding:2px 4px;margin:2px 0;display:block;
  animation:ghost 5s var(--ease) infinite}
@keyframes ghost{0%,35%{color:transparent;box-shadow:none}50%,85%{color:var(--amber);background:var(--amber-soft);box-shadow:inset 0 0 0 1px var(--amber-line)}100%{color:transparent}}
.mock .bubble{display:block;max-width:88%;border-radius:12px;padding:6px 10px;margin:4px 0;background:var(--surface-2)}
.mock .bubble.me{margin-inline-start:auto;background:var(--brand);color:var(--on-brand)}
.mock .act{display:flex;gap:6px;align-items:center;border-radius:10px;padding:6px 8px;margin-top:6px;background:var(--bad-soft);color:var(--bad);font-weight:600}
.mock .act svg{width:15px;height:15px;flex:none}
.places{display:grid;gap:12px}
@media (min-width:720px){.places{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1100px){.places{grid-template-columns:repeat(3,minmax(0,1fr))}}
.place{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start}
.place .ic{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:var(--surface-2);color:var(--brand)}
.place .ic svg{width:22px;height:22px}
.place p{font-size:14.5px;color:var(--ink-2);margin:0}
.habits{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.habits li{display:grid;grid-template-columns:28px 1fr;gap:10px;padding:10px 4px;border-bottom:1px dashed var(--line)}
.habits li:last-child{border-bottom:0}
.habits svg{width:22px;height:22px;color:var(--ok);margin-top:2px}
.habits b{display:block}
.habits span{color:var(--ink-2);font-size:14.5px}
.cant li svg{color:var(--muted)}

/* ------------------------------------------------------------ computer */
.subnav{position:sticky;top:var(--topbar);z-index:10;padding:8px 0 10px;margin:0 0 6px;background:linear-gradient(var(--paper) 75%,transparent)}
.status-hero{display:grid;grid-template-columns:auto 1fr;gap:16px;align-items:center}
.status-hero .vi{width:52px;height:52px;border-radius:16px;display:grid;place-items:center}
.status-hero .vi svg{width:28px;height:28px}
.status-hero.ok .vi{background:var(--ok-soft);color:var(--ok)} .status-hero.warn .vi{background:var(--warn-soft);color:var(--warn)}
.status-hero.bad .vi{background:var(--bad-soft);color:var(--bad)}
.status-hero .cta{grid-column:1/-1}
@media (min-width:720px){.status-hero{grid-template-columns:auto 1fr auto}.status-hero .cta{grid-column:auto}}
.agent{display:flex;flex-direction:column;gap:2px}
.agent header{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.agent header b{font-size:16.5px}
.srv{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;align-items:center;padding:10px 0;border-top:1px solid var(--line)}
.srv code{grid-column:1/-1;font-family:var(--mono);font-size:12px;color:var(--muted);direction:ltr;text-align:left;unicode-bidi:plaintext;word-break:break-all}
.diff{font-family:var(--mono);font-size:12.5px;line-height:1.55;background:var(--sunk);border-radius:12px;padding:10px 0;overflow:auto;max-height:420px;
  direction:ltr;text-align:left;margin-top:10px}
.diff div{padding:0 14px;white-space:pre}
.diff .a{background:var(--ok-soft);color:var(--ok)} .diff .d{background:var(--bad-soft);color:var(--bad)}
.diff .h{color:var(--info)} .diff .m{color:var(--muted)}
.confirm{display:flex;gap:10px;align-items:end;flex-wrap:wrap;background:var(--warn-soft);border:1px solid var(--warn-line);border-radius:var(--r);padding:14px;margin-top:14px}
.confirm .grow{flex:1;min-width:200px}
.check{display:flex;gap:12px;align-items:flex-start;padding:12px;border:1px solid var(--line);border-radius:14px;cursor:pointer;background:var(--surface)}
.check input{width:20px;height:20px;margin-top:3px;accent-color:var(--brand);flex:none}
.hchips{display:flex;flex-wrap:wrap;gap:8px}
.hchip{display:inline-flex;align-items:center;gap:6px;background:var(--surface-2);border:1px solid var(--line);border-radius:999px;padding:3px 6px 3px 12px;
  font-family:var(--mono);font-size:12.5px;direction:ltr}
.hchip button{all:unset;cursor:pointer;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;color:var(--muted)}
.hchip button:hover{background:var(--bad-soft);color:var(--bad)}
table.t{width:100%;border-collapse:collapse;font-size:14px}
table.t th,table.t td{padding:9px 8px;border-bottom:1px solid var(--line);text-align:start;vertical-align:top}
table.t th{color:var(--muted);font-weight:600;font-size:12.5px}
.tablewrap{overflow-x:auto}
.cmd{position:relative;font-family:var(--mono);font-size:13px;line-height:1.65;background:#101614;color:#e6efe9;border-radius:14px;padding:14px 16px;
  direction:ltr;text-align:left;white-space:pre;overflow-x:auto}
.cmd .c{color:#7d8f87}
.copy{position:absolute;top:8px;right:8px;all:unset;cursor:pointer;font-family:var(--font);font-size:12px;font-weight:600;color:#cfe;background:rgba(255,255,255,.08);
  border-radius:8px;padding:4px 10px}
.cmd .copy{position:absolute;top:8px;right:8px}
.os-pick{margin-bottom:12px}

/* ------------------------------------------------------------ about */
.faces{display:grid;gap:12px}
@media (min-width:860px){.faces{grid-template-columns:repeat(3,minmax(0,1fr))}}
.face .ic{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand);margin-bottom:10px}
.face .ic svg{width:24px;height:24px}
.face p{font-size:14.5px;color:var(--ink-2)}
.face .where{font-size:12.5px;color:var(--muted)}
ul.plain{margin:0;padding-inline-start:20px} ul.plain li{margin:4px 0}

/* ------------------------------------------------------------ toast */
.toast{position:fixed;inset-inline:16px;bottom:calc(var(--tabbar) + 14px + env(safe-area-inset-bottom));z-index:50;margin:0 auto;max-width:460px;
  background:var(--ink);color:var(--paper);padding:12px 16px;border-radius:14px;box-shadow:var(--sh-3);font-size:14.5px;
  opacity:0;transform:translateY(12px);transition:opacity var(--t) var(--ease),transform var(--t) var(--ease);pointer-events:none}
.toast.show{opacity:1;transform:none}
.toast.err{background:var(--bad);color:#fff}
@media (min-width:960px){.toast{bottom:22px}}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:1ms!important;animation-iteration-count:1!important;transition-duration:1ms!important;scroll-behavior:auto!important}
  .verdict .vi svg path,.verdict .vi svg circle{stroke-dashoffset:0}
  .mock .ghost{color:var(--amber);background:var(--amber-soft)}
}
@media print{.top,.tabbar,.rail,.actions,.examples{display:none!important}.app{display:block;padding:0}.paper{max-height:none}}
.grow{flex:1;min-width:0}
label{display:block}
.grid>*,.flow>*,.places>*,.faces>*,.hero>*{min-width:0}
.card,.cmd,.diff{max-width:100%}
.srv-wide{grid-column:1/-1}
@media (max-width:520px){.connected .mark small{display:none}}

/* ------------------------------------------------------------ m18 design pass */
/* result: one column on phones; X-ray beside a sticky summary on wide screens */
.rgrid{display:grid;gap:16px}
.rgrid .side{display:flex;flex-direction:column;gap:16px}
@media (min-width:1100px){.rgrid{grid-template-columns:minmax(0,1fr) 340px;align-items:start}
  .rgrid .side{position:sticky;top:calc(var(--topbar) + 14px)}}
.rgrid .side .stats{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (min-width:1100px){.rgrid .side .stats{grid-template-columns:1fr}
  .rgrid .side .stat{display:flex;align-items:baseline;gap:10px}.rgrid .side .stat span{margin:0}}

/* hidden parts: one quiet meta line, brass edge; an order to the assistant gets a red edge */
.sg.hidden,.sg.unseen{border-inline-start:3px solid var(--amber-line);box-shadow:none;border-radius:4px 12px 12px 4px}
[dir=rtl] .sg.hidden,[dir=rtl] .sg.unseen{border-radius:12px 4px 4px 12px}
.sg.unseen{border-inline-start-color:var(--line-2)}
.sg.instr{border-inline-start-color:var(--bad);box-shadow:none}
.sg.instr::before{display:none}
.sg .meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin-bottom:4px;font-size:12.5px;line-height:1.5}
.sg .meta .why{color:var(--amber);font-weight:700}
.sg.unseen .meta .why{color:var(--ink-2)}
.sg .meta .at{color:var(--muted)}
.sg .meta .ord{margin-inline-start:auto;display:inline-flex;align-items:center;gap:5px;color:var(--bad);font-weight:700}
.sg .meta .ord svg{width:15px;height:15px}
.fold{all:unset;cursor:pointer;display:flex;align-items:center;gap:8px;width:100%;box-sizing:border-box;margin:0 0 12px;padding:8px 12px;
  border-radius:10px;border:1px dashed var(--line-2);color:var(--muted);font-size:13.5px;font-weight:600;min-height:40px}
.fold:hover{color:var(--ink);border-color:var(--field-line)}
.fold svg{width:16px;height:16px}
.paper.only-hidden .fold{display:none}

/* the signature moment: hidden text "develops" in brass, once, when a result appears */
.reveal .sg.hidden .txt{animation:develop 900ms var(--ease) both;animation-delay:calc(var(--i,0) * 140ms + 250ms)}
.reveal .sg.hidden{animation:edge 900ms var(--ease) both;animation-delay:calc(var(--i,0) * 140ms + 250ms)}
@keyframes develop{0%{color:transparent;text-shadow:0 0 0 transparent}55%{color:transparent;text-shadow:0 0 14px var(--glow)}100%{color:inherit;text-shadow:none}}
@keyframes edge{0%{background-size:0 100%;border-inline-start-color:transparent}100%{background-size:auto}}

/* stagger the result cards in (once per result, not on every tab switch) */
.result > *{animation:rise 420ms var(--ease) both}
.result > *:nth-child(2){animation-delay:60ms}.result > *:nth-child(3){animation-delay:120ms}.result > *:nth-child(4){animation-delay:180ms}
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* focus: last and strongest, so `all:unset` on controls cannot erase it (WCAG 2.4.7) */
:is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid color-mix(in srgb,var(--brand) 60%,transparent)!important;outline-offset:2px!important}
@media (prefers-reduced-motion:reduce){.reveal .sg.hidden .txt,.reveal .sg.hidden,.result > *{animation:none!important}}
/* phones: the three counts first, then the X-ray, then the rest */
@media (max-width:1099px){
  .rgrid{display:flex;flex-direction:column}
  .rgrid .side{display:contents}
  .rgrid .side .stats{order:-1}
  .rgrid > .stack{order:0}
  .rgrid .side > :not(.stats){order:1}
}
/* Learn, step 1: the hidden line is a faint trace that develops in brass, never an empty strip */
.mock .ghost{color:color-mix(in srgb,var(--ink) 9%,transparent);animation:ghost2 5s var(--ease) infinite}
@keyframes ghost2{0%,30%{color:color-mix(in srgb,var(--ink) 9%,transparent);background:transparent;box-shadow:none}
  45%,85%{color:var(--amber);background:var(--amber-soft);box-shadow:inset 0 0 0 1px var(--amber-line)}
  100%{color:color-mix(in srgb,var(--ink) 9%,transparent)}}
