/* ---------- floating glass island nav ---------- */
.island {
  position: fixed; z-index: 30; top: 16px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px;
  width: max-content; max-width: calc(100vw - 24px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow: inset 0 0 0 1px var(--hair), 0 18px 40px -22px rgba(16, 24, 40, 0.25);
  animation: island-in 900ms var(--spring) both;
}
@keyframes island-in { from { opacity: 0; transform: translate(-50%, -20px) scale(0.96); } }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 650; letter-spacing: -0.02em; padding-right: 6px; }
.tabs { position: relative; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(15, 23, 42, 0.045); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: color 300ms var(--out), transform 450ms var(--spring); }
.tabs a::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 6px 16px -6px rgba(16,24,40,.18); opacity: 0; transform: scale(.86); transition: opacity 350ms var(--out), transform 600ms var(--spring); }
.tabs a:hover { color: var(--ink); }
.tabs a:active { transform: scale(.96); }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"]::before { opacity: 1; transform: none; }
.tab-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--crit); color: #fff; font-size: 11px; display: inline-grid; place-items: center; }
.account { position: relative; }
.avatar { width: 38px; height: 38px; border: 0; border-radius: 999px; background: linear-gradient(140deg, #1a1a22, #3a3a48); color: #fff; font-weight: 650; font-size: 13px; letter-spacing: 0.02em; transition: transform 450ms var(--spring); }
.avatar:active { transform: scale(0.94); }
.menu { position: absolute; right: 0; top: calc(100% + 10px); width: 240px; padding: 6px; border-radius: 20px; background: rgba(255,255,255,.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px var(--hair), var(--shadow-2); transform-origin: top right; animation: menu-in 450ms var(--spring) both; }
@keyframes menu-in { from { opacity: 0; transform: scale(0.92) translateY(-6px); } }
.menu-head { padding: 10px 12px 12px; display: grid; gap: 2px; font-size: 13px; border-bottom: 1px solid var(--hair); margin-bottom: 6px; }
.menu-head b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.menu-item { width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 550; color: var(--crit-ink); transition: background 300ms var(--out); }
.menu-item:hover { background: var(--crit-soft); }

/* ---------- page frame ---------- */
.page { position: relative; z-index: 1; width: min(1240px, 100%); margin: 0 auto; padding: 112px 24px 96px; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.page-enter { animation: page-in 700ms var(--spring) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.bento > *, .pair > *, .list > * { min-width: 0; }
.span-8 { grid-column: span 8; } .span-6 { grid-column: span 6; } .span-4 { grid-column: span 4; } .span-12 { grid-column: span 12; }
.row-2 { grid-row: span 2; }
.widget-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.widget-title { font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: -0.005em; display: flex; align-items: center; gap: 8px; }
.widget-title svg { width: 16px; height: 16px; color: var(--ink-3); }
.hero-num { font-size: clamp(40px, 4vw, 56px); font-weight: 650; letter-spacing: -0.045em; line-height: 1; }
.hero-num small { font-size: 17px; color: var(--ink-3); font-weight: 550; letter-spacing: -0.01em; margin-left: 6px; }
.kv { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; font-size: 14px; }
.kv + .kv { border-top: 1px solid var(--hair); }
.kv .k { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.kv .v { font-weight: 640; font-variant-numeric: tabular-nums; }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .bar { fill: var(--series-1); transition: opacity 300ms var(--out); }
.chart .bar-hit { fill: transparent; cursor: default; }
.chart .grid { stroke: rgba(15,23,42,.06); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart.dim .bar { opacity: 0.35; }
.chart .bar.hot { opacity: 1 !important; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .area { fill: url(#spark-fill); }
.grow { transform-box: fill-box; transform-origin: bottom; animation: grow 1100ms var(--spring) both; animation-delay: var(--d, 0ms); }
@keyframes grow { from { transform: scaleY(0.02); } }
.statusbar { display: flex; gap: 2px; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(15,23,42,.05); margin: 4px 0 18px; }
.statusbar span { height: 100%; transform-origin: left; animation: grow-x 1100ms var(--spring) both; }
@keyframes grow-x { from { transform: scaleX(0); } }
.tooltip { position: fixed; z-index: 45; pointer-events: none; padding: 9px 12px; border-radius: 14px; background: rgba(255,255,255,.95); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px var(--hair), var(--shadow-2); font-size: 12.5px; opacity: 0; transform: translateY(4px) scale(.98); transition: opacity 200ms var(--out), transform 300ms var(--spring); }
.tooltip.on { opacity: 1; transform: none; }
.tooltip b { display: block; font-size: 12px; color: var(--ink-3); font-weight: 550; margin-bottom: 4px; }
.tooltip .tl { display: flex; justify-content: space-between; gap: 16px; }

/* ---------- live lab ---------- */
/* Two columns: a compact device stage that stays in view, and a numbered flow on the right.
   min-width:0 on grid children stops long content (sample strip, tables) from widening a track. */
.lab { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.lab > * { min-width: 0; }
.lab-stage { position: sticky; top: 96px; display: grid; justify-items: center; gap: 14px; }
.lab-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.stage-caption { margin: 0; max-width: 260px; text-align: center; font-size: 12.5px; color: var(--ink-3); line-height: 1.4; min-height: 18px; }
.step-no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 650; }

.phone {
  position: relative; height: min(560px, calc(100dvh - 190px)); aspect-ratio: 1170 / 2532; border-radius: 44px; padding: 9px;
  background: linear-gradient(150deg, #f6f6f8, #dcdde3);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.95), 0 30px 60px -32px rgba(16,24,40,.42), 0 0 0 1px rgba(15,23,42,.08);
}
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #cfd0d6; }
.phone::before { left: -3px; top: 22%; height: 9%; }
.phone::after { right: -3px; top: 28%; height: 13%; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #f4f5f7; }
.phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; opacity: 0; transition: opacity 600ms var(--out); }
.phone-screen img.on { opacity: 1; }
.phone-island { position: absolute; z-index: 3; top: 10px; left: 50%; width: 78px; height: 22px; border-radius: 999px; background: #0b0b0f; transform: translateX(-50%); transition: width 600ms var(--spring); display: flex; align-items: center; justify-content: center; gap: 6px; color: #fff; font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.phone-island.wide { width: 172px; }
.phone-island .spinner { width: 10px; height: 10px; border-width: 1.5px; border-color: rgba(255,255,255,.25); border-top-color: #fff; flex: none; }
.phone-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; padding: 32px; color: var(--ink-3); font-size: 13px; }
.scan { position: absolute; z-index: 2; left: 0; right: 0; height: 22%; top: -22%; background: linear-gradient(180deg, transparent, rgba(10,108,255,.10) 60%, rgba(10,108,255,.5) 98%, transparent); opacity: 0; pointer-events: none; }
.scan.on { opacity: 1; animation: scan 1.8s var(--spring) infinite; }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(560%); } }
.boxes { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.fbox { position: absolute; border-radius: 5px; box-shadow: 0 0 0 2px var(--crit), 0 0 0 5px rgba(208,59,59,.18); animation: fbox-in 700ms var(--spring) both; }
.fbox.warn { box-shadow: 0 0 0 2px var(--warn), 0 0 0 5px rgba(250,178,25,.22); }
.fbox.pulse { animation: fbox-in 700ms var(--spring) both, fbox-pulse 1.2s var(--out) 2; }
@keyframes fbox-in { from { opacity: 0; transform: scale(1.25); } }
@keyframes fbox-pulse { 50% { box-shadow: 0 0 0 2px var(--crit), 0 0 0 11px rgba(208,59,59,.08); } }
.doc-switch:empty { display: none; }

.samples { display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.sample { flex: none; width: 96px; border: 0; padding: 0; background: transparent; text-align: left; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; }
.sample .thumb { width: 96px; height: 132px; border-radius: 16px; overflow: hidden; background: #f1f2f4; box-shadow: inset 0 0 0 1px var(--hair); transition: transform 500ms var(--spring), box-shadow 400ms var(--out); }
.sample .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.sample:hover .thumb { transform: translateY(-3px); }
.sample[aria-pressed="true"] .thumb { box-shadow: 0 0 0 2px var(--accent), 0 10px 22px -12px rgba(10,108,255,.6); }
.sample span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: calc(2 * 1.3em); font-size: 11.5px; line-height: 1.3; margin-top: 8px; color: var(--ink); font-weight: 560; }
.sample i { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 10.5px; font-weight: 600; margin-top: 2px; }
.sample i::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.sample i.genuine { color: var(--good-ink); }
.sample i.tampered { color: var(--crit-ink); }

.drop {
  position: relative; display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px 12px 12px 14px;
  border-radius: 18px; background: var(--bg-tint); box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--ink-2); font-size: 13px; cursor: pointer;
  transition: box-shadow 350ms var(--out), transform 450ms var(--spring), background 350ms var(--out);
}
.drop:hover { background: #f0f2f5; }
.drop.over { background: #fff; box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 6px var(--accent-soft); transform: scale(1.01); }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop .drop-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink-2); }
.drop .drop-ic .ic { width: 18px; height: 18px; margin: 0; }
.drop .drop-text { flex: 1; min-width: 0; line-height: 1.35; }
.drop .drop-text b { display: block; color: var(--ink); font-weight: 600; font-size: 13.5px; }
.drop .drop-text span { color: var(--ink-3); font-size: 12px; }
.drop .browse { flex: none; height: 32px; padding: 0 14px; border-radius: 999px; display: inline-grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1px var(--hair-2); color: var(--ink); font-weight: 600; font-size: 12.5px; }
.flow-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.flow-foot .faint { font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }

/* Pipeline: the connector runs from the bottom of one marker to the top of the next, whatever the row height. */
.pipeline { display: grid; }
.step { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; padding: 12px 4px; align-items: start; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 20px; width: 2px; top: 52px; bottom: -8px; border-radius: 2px; background: rgba(15,23,42,.08); transition: background 500ms var(--out); }
.step.done:not(:last-child)::after, .step.warn:not(:last-child)::after { background: linear-gradient(rgba(12,163,12,.55), rgba(15,23,42,.08)); }
.marker { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1.5px rgba(15,23,42,.12); color: var(--ink-2); transition: box-shadow 450ms var(--out), background 450ms var(--out), color 450ms var(--out); }
.marker .ic { width: 16px; height: 16px; }
.step.run .marker { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 6px var(--accent-soft); color: var(--accent); }
.step.run .marker::after { content: ""; position: absolute; inset: -1px; border-radius: 999px; border: 2px solid transparent; border-top-color: var(--accent); animation: spin 900ms linear infinite; }
.step.done .marker { background: var(--good); box-shadow: 0 6px 14px -6px rgba(12,163,12,.6); color: #fff; }
.step.err .marker { background: var(--crit); color: #fff; }
.step.warn .marker { background: var(--warn); color: #3b2a00; }
.check-draw path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 600ms var(--spring) 120ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.step h4 { margin: 7px 0 0; font-size: 14.5px; letter-spacing: -0.015em; font-weight: 620; }
.step p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-2); }
.step .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.step .meta .chip { animation: chip-in 600ms var(--spring) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes chip-in { from { opacity: 0; transform: translateY(6px) scale(.96); } }
.step .ms { font-size: 12px; color: var(--ink-3); padding-top: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.step.idle h4, .step.idle p { color: var(--ink-3); }

.verdict { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; }
.ring { position: relative; width: 112px; height: 112px; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: rgba(15,23,42,.07); }
.ring .val { transition: stroke-dashoffset 1400ms var(--spring); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 650; letter-spacing: -0.04em; }
.ring b small { display: block; font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; font-weight: 600; text-align: center; margin-top: -2px; }
.decision { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px 0 8px; border-radius: 999px; font-weight: 650; font-size: 16px; letter-spacing: -0.015em; }
.decision .di { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: #fff; }
.decision.good { background: var(--good-soft); color: var(--good-ink); }
.decision.warn { background: var(--warn-soft); color: var(--warn-ink); }
.decision.crit { background: var(--crit-soft); color: var(--crit-ink); }
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 20px; background: rgba(245,246,248,.9); box-shadow: inset 0 0 0 1px var(--hair); margin-top: 16px; }
.notif .app { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(150deg, #19c37d, #0a9f63); flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
.notif b { font-size: 13px; } .notif p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink); }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.reasons li { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.45; padding: 11px 13px; border-radius: 14px; background: var(--bg-tint); animation: chip-in 600ms var(--spring) both; animation-delay: calc(var(--i, 0) * 50ms); }
.reasons li .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--ink-3); }
.reasons li.crit .ic { color: var(--crit); }
.reasons li.warn .ic { color: var(--warn-ink); }
.finding { cursor: pointer; transition: transform 400ms var(--spring), background 300ms var(--out); }
.finding:hover { transform: translateX(3px); background: #eef1f6; }
.finding .obs { display: block; margin-top: 3px; color: var(--ink-2); font-size: 12.5px; }

/* Side-by-side field comparison: one card per element, golden left / upload right. */
.cmp-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cmp-list { display: grid; gap: 10px; }
.cmp { border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair); padding: 14px 16px; animation: chip-in 600ms var(--spring) both; animation-delay: calc(var(--i, 0) * 45ms); }
.cmp.dev { box-shadow: inset 0 0 0 1px rgba(208,59,59,.22); background: linear-gradient(0deg, rgba(208,59,59,.025), rgba(208,59,59,.025)), #fff; }
.cmp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cmp-name { font-weight: 620; font-size: 14px; letter-spacing: -0.01em; margin-right: auto; }
.src { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.src i { width: 7px; height: 7px; border-radius: 999px; background: rgba(15,23,42,.18); }
.src.deviate i { background: var(--crit); } .src.deviate { color: var(--crit-ink); }
.src.match i { background: var(--good); } .src.match { color: var(--good-ink); }
.cmp-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.cmp-cols > div { border-radius: 12px; padding: 10px 12px; background: var(--bg-tint); font-size: 13px; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.cmp-cols label { display: block; font-size: 10.5px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.cmp.dev .cmp-cols > div:last-child { background: rgba(208,59,59,.06); }
.cmp-note { margin: 10px 2px 0; font-size: 12.5px; color: var(--crit-ink); line-height: 1.45; }
.cmp-more { margin-top: 4px; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--hair); background: #fff; }
.cmp-more summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 16px; font-size: 13.5px; font-weight: 600; }
.cmp-more summary::-webkit-details-marker { display: none; }
.cmp-more summary .ic { color: var(--good); }
.cmp-more summary .chev { margin-left: auto; color: var(--ink-3); transition: transform 450ms var(--spring); }
.cmp-more[open] summary .chev { transform: rotate(90deg); }
.cmp-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; padding: 10px 16px; border-top: 1px solid var(--hair); font-size: 13px; }
.cmp-row b { font-weight: 600; }
.cmp-row span { color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------- analyses list ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 1.3fr 1fr 0.9fr 0.8fr 0.5fr 24px; gap: 16px; align-items: center; padding: 14px 18px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair), var(--shadow-1); border: 0; width: 100%; text-align: left; transition: transform 500ms var(--spring), box-shadow 400ms var(--out); animation: chip-in 600ms var(--spring) both; animation-delay: calc(var(--i, 0) * 35ms); }
.item:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--hair-2), var(--shadow-2); }
.item .id { font-weight: 620; letter-spacing: -0.01em; }
.item .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.bar-mini { height: 6px; border-radius: 999px; background: rgba(15,23,42,.06); overflow: hidden; }
.bar-mini span { display: block; height: 100%; border-radius: 999px; background: var(--series-1); transform-origin: left; animation: grow-x 900ms var(--spring) both; }
.empty { text-align: center; padding: 64px 24px; color: var(--ink-3); }
.pager { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }

/* ---------- sheet (detail drawer) ---------- */
.sheet-backdrop { position: fixed; z-index: 35; inset: 0; background: rgba(15,23,42,.18); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity 500ms var(--out); }
.sheet-backdrop.on { opacity: 1; }
.sheet { position: fixed; z-index: 36; top: 12px; right: 12px; bottom: 12px; width: min(860px, calc(100vw - 24px)); border-radius: 32px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair), 0 40px 100px -30px rgba(16,24,40,.45); overflow-y: auto; transform: translateX(105%); transition: transform 700ms var(--spring); overscroll-behavior: contain; }
.sheet.on { transform: none; }
.sheet-head { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; background: rgba(255,255,255,.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--hair); }
.sheet-body { padding: 24px 26px 40px; display: grid; gap: 22px; }
.close { width: 36px; height: 36px; border-radius: 999px; border: 0; background: rgba(15,23,42,.05); display: grid; place-items: center; transition: transform 450ms var(--spring); }
.close:hover { transform: rotate(90deg); }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.pane { margin: 0; padding: 12px; border-radius: 22px; background: var(--bg-tint); box-shadow: inset 0 0 0 1px var(--hair); display: grid; gap: 10px; min-width: 0; }
.pane figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pane-frame { height: 460px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair); display: grid; place-items: center; overflow: hidden; padding: 10px; }
.shot { position: relative; width: 100%; height: 100%; }
.shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shot .boxes { position: absolute; inset: 0; pointer-events: none; }
.section-title { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; margin: 0 0 10px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.timeline li { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; font-size: 13px; }
.timeline li::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--series-1); }
.verdict-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- AI-provenance gate ---------- */
.gate { border-radius: 24px; padding: 18px; display: grid; gap: 14px; background: linear-gradient(180deg, rgba(250,178,25,.08), rgba(250,178,25,.015) 60%), #fff; box-shadow: inset 0 0 0 1px rgba(250,178,25,.38); animation: chip-in 600ms var(--spring) both; }
.gate[data-gate="rejected"] { background: linear-gradient(180deg, rgba(208,59,59,.07), rgba(208,59,59,.01) 60%), #fff; box-shadow: inset 0 0 0 1px rgba(208,59,59,.26); }
.gate[data-gate="continued"] { background: linear-gradient(180deg, rgba(10,108,255,.06), rgba(10,108,255,.01) 60%), #fff; box-shadow: inset 0 0 0 1px rgba(10,108,255,.2); }
.gate-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.gate-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn-ink); }
.gate[data-gate="rejected"] .gate-ic { background: var(--crit-soft); color: var(--crit-ink); }
.gate[data-gate="continued"] .gate-ic { background: var(--accent-soft); color: var(--accent); }
.gate-ic .ic { width: 22px; height: 22px; }
.gate h3 { margin: 3px 0 4px; font-size: 18px; letter-spacing: -0.02em; }
.gate-head p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.eyebrow-sm { font-size: 10.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.proof { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair); }
.proof:has(.proof-thumb) { grid-template-columns: 76px minmax(0, 1fr); }
.proof-thumb { width: 76px; height: 140px; object-fit: cover; object-position: top; border-radius: 12px; background: var(--bg-tint); box-shadow: 0 0 0 1px var(--hair); }
.proof-title { font-weight: 640; font-size: 13.5px; margin-bottom: 8px; }
.proof-rows { margin: 0; display: grid; gap: 6px; }
.proof-rows div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; font-size: 13px; line-height: 1.4; }
.proof-rows dt { color: var(--ink-3); }
.proof-rows dd { margin: 0; font-weight: 560; overflow-wrap: anywhere; }
.proof-code { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; color: var(--ink-3); }
.proof-more { margin-top: 10px; }
.proof-more summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.proof-more summary::-webkit-details-marker { display: none; }
.proof-more .chev { display: inline-flex; transition: transform 450ms var(--spring); }
.proof-more .chev .ic { width: 13px; height: 13px; }
.proof-more[open] .chev { transform: rotate(90deg); }
.proof-more ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.proof-more li { display: grid; gap: 3px; padding: 9px 11px; border-radius: 11px; background: var(--bg-tint); font-size: 12.5px; animation: chip-in 500ms var(--spring) both; }
.proof-more li b { font-weight: 600; line-height: 1.4; }
.proof-more li .mono { font-size: 11px; color: var(--ink-3); overflow-wrap: anywhere; }
.proof-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--accent); text-decoration: none; }
.proof-link .ic { width: 13px; height: 13px; transition: transform 400ms var(--spring); }
.proof-link:hover .ic { transform: translate(2px, -2px); }
.gate-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.gate-actions .btn.armed { background: var(--crit); color: #fff; box-shadow: none; }
.gate-hint { margin: -4px 0 0; font-size: 12px; text-align: right; }
.gate-note { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 13px; color: var(--ink-2); }
.gate-note .ic { width: 15px; height: 15px; color: var(--ink-3); }
.gate-live { margin: 10px 0 0; font-size: 12.5px; }
.gate-ring { width: 112px; height: 112px; border-radius: 999px; display: grid; place-content: center; justify-items: center; gap: 4px; background: var(--warn-soft); color: var(--warn-ink); flex: none; }
.gate-ring .ic { width: 34px; height: 34px; }
.gate-ring small { font-size: 10.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- models ---------- */
.chain { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.model .core { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.model-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rank { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.rank b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; letter-spacing: 0; }
.rank.primary b { background: var(--accent); }
.model h4 { margin: 0; font-size: 16px; letter-spacing: -0.02em; }
.model-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.model-stats div { border-radius: 12px; background: var(--bg-tint); padding: 8px 10px; }
.model-stats span { display: block; font-size: 11px; color: var(--ink-3); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.model-stats b { font-size: 17px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.model .btn { align-self: flex-start; margin-top: auto; }
.arn { display: flex; gap: 6px; align-items: center; }
.arn code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11px; color: var(--ink-2); background: var(--bg-tint); padding: 7px 9px; border-radius: 9px; }
.icon-btn { flex: none; width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgba(15,23,42,.05); display: grid; place-items: center; color: var(--ink-2); transition: transform 400ms var(--spring), background 300ms var(--out); }
.icon-btn:hover { background: rgba(15,23,42,.09); }
.icon-btn:active { transform: scale(.9); }
.icon-btn .ic { width: 14px; height: 14px; }
.test-out { font-size: 12.5px; line-height: 1.45; padding: 9px 11px; border-radius: 12px; background: var(--bg-tint); animation: chip-in 500ms var(--spring) both; overflow-wrap: anywhere; }
.test-out.bad { background: var(--crit-soft); color: var(--crit-ink); }
.test-out.good { background: var(--good-soft); color: var(--good-ink); }

/* ---------- incidents ---------- */
.incident { border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair), var(--shadow-1); padding: 16px 18px; animation: chip-in 600ms var(--spring) both; animation-delay: calc(var(--i, 0) * 40ms); }
.incident summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; cursor: pointer; }
.incident summary::-webkit-details-marker { display: none; }
.incident pre { margin: 14px 0 0; padding: 14px; border-radius: 14px; background: #0f1115; color: #d6dae3; font-family: var(--mono); font-size: 11.5px; overflow-x: auto; max-height: 340px; }
.incident .ctx { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }

@media (max-width: 980px) {
  .bento { grid-template-columns: 1fr; }
  .span-8, .span-6, .span-4, .span-12 { grid-column: span 1; }
  .row-2 { grid-row: auto; }
  .lab { grid-template-columns: 1fr; }
  .lab-stage { position: static; }
  .phone { height: min(520px, 72dvh); }
  .item { grid-template-columns: 1fr auto; }
  .item .hide-sm { display: none; }
}
.tabbar { display: none; }
@media (max-width: 720px) {
  .page { padding: 92px 16px 120px; }
  .island { left: 12px; right: 12px; width: auto; max-width: none; transform: none; justify-content: space-between; padding: 6px 6px 6px 12px; animation-name: island-in-m; }
  @keyframes island-in-m { from { opacity: 0; transform: translateY(-16px); } }
  .island .tabs { display: none; }
  .tabbar {
    position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 6px; border-radius: 26px;
    background: rgba(255,255,255,.84); backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow: inset 0 0 0 1px var(--hair), 0 18px 40px -18px rgba(16,24,40,.35);
    animation: tabbar-in 800ms var(--spring) both;
  }
  @keyframes tabbar-in { from { opacity: 0; transform: translateY(24px); } }
  .tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 7px 2px 6px; border-radius: 18px; color: var(--ink-3); text-decoration: none; font-size: 10.5px; font-weight: 600; transition: color 300ms var(--out), transform 400ms var(--spring); }
  .tabbar a:active { transform: scale(.94); }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
  .tabbar .tab-badge { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 16px; height: 16px; font-size: 10px; }
  .phone { height: min(400px, 50dvh); border-radius: 36px; padding: 7px; }
  .phone-screen { border-radius: 29px; }
  .core { padding: 16px; }
  .widget-head { flex-wrap: wrap; row-gap: 10px; }
  .widget-head .btn { white-space: nowrap; }
  .row label { min-width: 0; flex: none; }
  .row input[type="datetime-local"], .row input[type="date"] { font-size: 14px; }
  .cmp-name { flex-basis: 100%; }
  .gate-head { grid-template-columns: auto minmax(0, 1fr); }
  .gate-head > .chip { grid-column: 1 / -1; justify-self: start; }
  .proof-rows div { grid-template-columns: 80px minmax(0, 1fr); }
  .gate-actions { flex-direction: column-reverse; }
  .gate-actions .btn { width: 100%; justify-content: space-between; white-space: nowrap; }
  .gate-hint { text-align: left; }
  .gate-ring { width: 88px; height: 88px; }
  .pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .pane { padding: 6px; gap: 6px; border-radius: 18px; }
  .pane figcaption .chip { font-size: 11px; padding: 4px 8px; white-space: normal; }
  .pane figcaption .faint { display: none; }
  .pane-frame { height: 320px; padding: 4px; border-radius: 13px; }
  .cmp { padding: 12px; }
  .cmp-row { grid-template-columns: 1fr; gap: 2px; }
  .sheet { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 88dvh; transform: translateY(105%); }
}
