/* Triage for Photos site. Palette and radii mirror the app's asset catalog and Theme.swift (dark appearance). */
:root {
  --base: #0B0B0F;
  --raised: #15151C;
  --sunken: #08080B;
  --card: #1B1B24;
  --hairline: rgba(255, 255, 255, 0.09);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --ink: #F4F4F8;
  --ink2: rgba(244, 244, 248, 0.72);
  --ink3: rgba(244, 244, 248, 0.55);
  --accent: #8B7CFF;
  --accent-alt: #4FD6E8;
  --trash: #FF6B6B;
  --undecided: #FFC44D;
  --keep: #4ADE9B;
  --aurora: linear-gradient(135deg, #8B7CFF, #4FD6E8);
  --r-card: 22px;
  --r-panel: 18px;
  --r-control: 12px;
  --r-thumb: 10px;
  --max: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--base); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent-alt); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--base); padding: 8px 14px; border-radius: 999px; font-weight: 700; z-index: 50; }
.skip:focus { left: 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Ambient field, like AmbientBackground in the app */
.ambient { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ambient::before, .ambient::after { content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.42; }
.ambient::before { width: 720px; height: 720px; left: -240px; top: -260px; background: radial-gradient(closest-side, rgba(139, 124, 255, 0.8), transparent); }
.ambient::after { width: 640px; height: 640px; right: -200px; bottom: -300px; background: radial-gradient(closest-side, rgba(79, 214, 232, 0.7), transparent); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(11, 11, 15, 0.78); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--hairline); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: -0.2px; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink2); font-size: 15px; font-weight: 600; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a.btn { color: var(--base); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 16px; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--aurora); color: var(--base); border-color: rgba(255, 255, 255, 0.14); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: rgba(21, 21, 28, 0.7); color: var(--ink); border-color: var(--hairline-strong); }
.btn-ghost:hover { background: var(--card); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

/* Type */
.label { font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; font-stretch: expanded; color: var(--accent-alt); margin: 0 0 14px; }
h1 { font-size: clamp(44px, 7vw, 78px); line-height: 1.02; letter-spacing: -2.4px; font-weight: 700; margin: 18px 0 18px; }
.grad { background: var(--aurora); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.06; letter-spacing: -1.4px; font-weight: 700; margin: 0 0 16px; }
h3 { font-size: 19px; letter-spacing: -0.2px; font-weight: 600; margin: 0 0 8px; }
.lede { font-size: clamp(18px, 2.1vw, 21px); color: var(--ink2); max-width: 32em; margin: 0 0 32px; }
.section-lede { color: var(--ink2); font-size: 19px; max-width: 40em; margin: 0 0 48px; }
.fine { color: var(--ink3); font-size: 14px; margin-top: 18px; }
section { padding: 96px 0; position: relative; }
.divider { border-top: 1px solid var(--hairline); }

/* Hero */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero .wrap { position: relative; }
.hero-copy { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.hero-copy .hero-icon { margin: 0 auto 18px; }
.hero-copy .lede { margin-left: auto; margin-right: auto; }
.hero-copy .cta-row { justify-content: center; }
.hero-icon { width: 112px; height: 112px; margin: 0 0 18px -8px; filter: drop-shadow(0 16px 36px rgba(139, 124, 255, 0.35)); }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(79, 214, 232, 0.10); border: 1px solid rgba(79, 214, 232, 0.28); color: var(--accent-alt); font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-alt); box-shadow: 0 0 10px var(--accent-alt); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Detector demo */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { background: var(--raised); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 26px; }
.panel label, .field-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink3); margin: 0 0 10px; }
textarea { width: 100%; min-height: 128px; resize: vertical; font: inherit; font-size: 19px; line-height: 1.5; color: var(--ink); background: var(--sunken); border: 1px solid var(--hairline-strong); border-radius: var(--r-panel); padding: 14px 16px; }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 124, 255, 0.25); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { font: inherit; font-size: 14px; font-weight: 500; color: var(--ink2); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hairline); border-radius: 999px; padding: 7px 13px; cursor: pointer; }
.chip:hover { color: var(--ink); border-color: var(--hairline-strong); }
.toggle { display: flex; align-items: center; gap: 12px; margin-top: 20px; cursor: pointer; font-size: 15px; color: var(--ink2); }
.toggle input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); position: relative; cursor: pointer; margin: 0; flex: none; transition: background .2s; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked { background: var(--keep); }
.toggle input:checked::after { transform: translateX(18px); }
.toggle input:focus-visible { outline: 2px solid var(--accent-alt); outline-offset: 3px; }
.results { display: grid; gap: 10px; }
.result { display: flex; gap: 12px; align-items: flex-start; background: var(--raised); border: 1px solid var(--hairline); border-radius: var(--r-panel); padding: 14px 16px; }
.result .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 8px; background: var(--ink3); }
.result.yes .dot { background: var(--keep); box-shadow: 0 0 10px rgba(91, 224, 155, 0.6); }
.result .txt { flex: 1; min-width: 0; }
.result .s { display: block; color: var(--ink2); font-size: 15px; }
.result .v { display: block; font-weight: 600; font-size: 16px; margin-top: 2px; }
.result.yes .v { color: var(--keep); }
.result .why { display: block; color: var(--ink3); font-size: 13px; margin-top: 2px; }
.empty-note { color: var(--ink3); font-size: 15px; padding: 14px 2px; }

/* Steps / cards */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { background: rgba(21, 21, 28, 0.72); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 26px; }
.card p { color: var(--ink2); margin: 0; font-size: 16px; }
.n { width: 38px; height: 38px; border-radius: 50%; background: rgba(139, 124, 255, 0.14); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-family: var(--rounded); margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ic { width: 44px; height: 44px; border-radius: var(--r-control); background: rgba(139, 124, 255, 0.12); border: 1px solid rgba(139, 124, 255, 0.22); display: grid; place-items: center; margin-bottom: 18px; color: var(--accent); }
.ic svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic.teal { background: rgba(79, 214, 232, 0.10); border-color: rgba(79, 214, 232, 0.22); color: var(--accent-alt); }
.ic.hot { background: rgba(255, 107, 107, 0.10); border-color: rgba(255, 107, 107, 0.22); color: var(--trash); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.rules { display: grid; gap: 12px; }
.rule { background: rgba(21, 21, 28, 0.72); border: 1px solid var(--hairline); border-radius: var(--r-panel); padding: 16px 18px; }
.rule b { display: block; font-weight: 600; }
.rule span { display: block; color: var(--ink2); font-size: 15px; }
.rule em { color: var(--accent-alt); font-style: normal; }
.rule.no em { color: var(--trash); }

/* Closing */
.closing { text-align: center; overflow: hidden; }
.closing .wrap { position: relative; }
.closing img { width: 104px; height: 104px; margin: 0 auto 20px; filter: drop-shadow(0 16px 36px rgba(139, 124, 255, 0.35)); }
.closing .cta-row { justify-content: center; }
.closing .section-lede { margin-left: auto; margin-right: auto; }

footer { border-top: 1px solid var(--hairline); padding: 36px 0 48px; color: var(--ink3); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
footer a { color: var(--ink2); }
footer a:hover { color: var(--ink); }

/* Doc pages */
.doc { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; position: relative; }
.doc h1 { font-size: clamp(38px, 6vw, 56px); letter-spacing: -1.6px; margin: 0 0 8px; }
.doc .updated { color: var(--ink3); font-size: 15px; margin: 0 0 40px; }
.doc h2 { font-size: 24px; letter-spacing: -0.4px; margin: 44px 0 10px; }
.doc p, .doc li { color: rgba(244, 244, 248, 0.82); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.faq details { background: var(--raised); border: 1px solid var(--hairline); border-radius: var(--r-panel); padding: 18px 22px; margin: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-alt); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; }
.contact-card { background: var(--raised); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 26px; margin: 8px 0 32px; }
.contact-card p { margin: 0 0 16px; }
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px 16px; position: relative; }
.notfound .big { font-size: clamp(80px, 16vw, 140px); font-weight: 700; letter-spacing: -4px; line-height: 1; font-family: var(--rounded); }

/* Phone menu */
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hairline-strong); background: rgba(21, 21, 28, 0.8); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; padding: 0; }
.menu-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.menu-btn[aria-expanded="true"] { color: var(--accent-alt); border-color: rgba(79, 214, 232, 0.5); }
.menu-panel { position: absolute; left: 12px; right: 12px; top: 70px; background: #15151C; border: 1px solid var(--hairline-strong); border-radius: var(--r-card); padding: 10px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6); }
.menu-panel a:not(.btn) { display: block; padding: 14px 16px; border-radius: var(--r-control); color: var(--ink); font-weight: 600; font-size: 17px; }
.menu-panel a:not(.btn):hover { background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.menu-panel .btn { width: 100%; margin-top: 8px; }
@media (max-width: 760px) { .menu-btn { display: inline-flex; } .nav-links { display: none; } }
@media (min-width: 761px) { .menu-panel { display: none !important; } }

/* Jump button */
.jump { position: fixed; right: calc(16px + env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 30; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--hairline-strong); background: rgba(21, 21, 28, 0.9); color: var(--accent-alt); display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 22px rgba(139, 124, 255, 0.25); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility 0s .2s; padding: 0; }
.jump.show { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s; }
.jump svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.jump:hover { background: var(--card); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .jump, .jump.show { transition: none; transform: none; } }

@media (max-width: 980px) {
  .split, .demo { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 48px 0 64px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  section { padding: 72px 0; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .hero-icon { width: 80px; height: 80px; border-radius: 18px; }
  h1 { letter-spacing: -1.6px; }
  .panel { padding: 20px; }
  .cta-row .btn { flex: 1 1 auto; }
  .where { padding: 4px 18px; }
}
@media (max-width: 380px) { .phone { width: 100%; } }
.panel label.toggle { display: flex; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 500; color: var(--ink2); margin: 20px 0 0; }

/* Mac window illustration */
.window { position: relative; max-width: 1100px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: var(--base); border: 1px solid var(--hairline-strong); box-shadow: 0 50px 120px rgba(0, 0, 0, 0.6), 0 0 120px rgba(139, 124, 255, 0.14); }
.titlebar { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: rgba(21, 21, 28, 0.9); border-bottom: 1px solid var(--hairline); }
.titlebar i { width: 12px; height: 12px; border-radius: 50%; background: #FF5F57; }
.titlebar i:nth-child(2) { background: #FEBC2E; }
.titlebar i:nth-child(3) { background: #28C840; }
.titlebar span { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink2); margin-right: 52px; }
.win-body { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.win-body .ambient::before { width: 520px; height: 520px; left: -160px; top: -200px; }
.win-body .ambient::after { width: 460px; height: 460px; right: -140px; bottom: -220px; }
.side { position: relative; padding: 14px 10px; border-right: 1px solid var(--hairline); background: rgba(8, 8, 11, 0.55); }
.side .lab { font-size: 10px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink3); padding: 10px 10px 6px; }
.side .row { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 8px; font-size: 13px; color: var(--ink2); }
.side .row svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side .row b { margin-left: auto; font-weight: 500; font-size: 12px; color: var(--ink3); font-family: var(--rounded); }
.side .row.on { background: rgba(139, 124, 255, 0.18); color: var(--ink); }
.side .row.k svg { color: var(--keep); }
.side .row.t svg { color: var(--trash); }
.side .row.s svg { color: var(--accent); }
.main { position: relative; padding: 16px 18px 18px; min-width: 0; }
.search { display: flex; align-items: center; gap: 10px; background: rgba(21, 21, 28, 0.85); border: 1px solid var(--hairline-strong); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.search svg { width: 16px; height: 16px; stroke: var(--ink3); fill: none; stroke-width: 2; stroke-linecap: round; flex: none; }
.search .caret { width: 2px; height: 18px; background: var(--accent); margin-left: -6px; }
.search .count { margin-left: auto; font-size: 12px; color: var(--ink3); white-space: nowrap; }
.albumbar { display: flex; align-items: center; gap: 10px; margin: 10px 0 14px; font-size: 13px; color: var(--ink2); flex-wrap: wrap; }
.albumbar .field { background: var(--sunken); border: 1px solid var(--hairline); border-radius: 8px; padding: 5px 10px; color: var(--ink); }
.albumbar .hint { color: var(--accent-alt); font-size: 12px; }
.albumbar .file { margin-left: auto; background: var(--aurora); color: var(--base); font-weight: 600; border-radius: 999px; padding: 5px 14px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { min-width: 0; }
.thumb { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-thumb); overflow: hidden; border: 1px solid var(--hairline); background: #1d1d25; }
.thumb.sel { outline: 2px solid var(--accent); outline-offset: 2px; }
.thumb .check { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.thumb .check svg { width: 10px; height: 10px; stroke: #fff; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.receipt { position: absolute; inset: 10% 18% 0; background: #F2EFE8; border-radius: 3px 3px 0 0; padding: 10% 9%; transform: rotate(-3deg); box-shadow: 0 8px 20px rgba(0,0,0,.5); }
.receipt.r2 { transform: rotate(2deg); inset: 8% 14% 0; }
.receipt i { display: block; height: 3px; background: #B9B4AA; border-radius: 2px; margin: 0 0 7%; }
.receipt i.w { width: 55%; margin-left: auto; margin-right: auto; background: #6B675F; height: 4px; }
.receipt i.s { width: 70%; }
.receipt i.t { background: #3A3833; height: 4px; margin-top: 14%; }
.table-bg { position: absolute; inset: 0; background: linear-gradient(160deg, #5B4636, #2E241C); }
.table-bg.b { background: linear-gradient(160deg, #3C4A58, #1E2630); }
.table-bg.c { background: linear-gradient(160deg, #4A3F55, #231E2B); }
.shot { position: absolute; inset: 0; background: #F4F4F8; padding: 12% 10%; }
.shot i { display: block; height: 7%; border-radius: 6px; background: #E1E1EA; margin-bottom: 6%; width: 70%; }
.shot i.me { background: #8B7CFF; margin-left: auto; width: 60%; }
.shot i.b { background: #1f2330; height: 4%; width: 40%; margin-bottom: 10%; }
.caption { font-size: 11px; color: var(--ink3); margin-top: 6px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caption b { color: var(--ink2); font-weight: 500; }
.illus-row { text-align: center; margin-top: 14px; }

/* Deck */
.deck { position: relative; background: rgba(21, 21, 28, 0.72); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 22px; }
.deck .card-photo { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-panel); overflow: hidden; border: 1px solid var(--hairline-strong); }
.scene { position: absolute; inset: 0; background: linear-gradient(180deg, #A290FF 0%, #7DB6F0 45%, #5AD2E6 62%, #3E9DB0 62%, #2E7F90 100%); }
.scene .sun { position: absolute; width: 16%; aspect-ratio: 1; border-radius: 50%; background: #FFEFA6; right: 22%; top: 30%; }
.scene.soft { filter: blur(3px); }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.reason { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: rgba(255, 196, 77, 0.12); color: var(--undecided); border: 1px solid rgba(255, 196, 77, 0.25); }
.reason.plain { background: rgba(255, 255, 255, 0.05); color: var(--ink2); border-color: var(--hairline); }
.verdicts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.verdicts span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; font-weight: 600; font-size: 14px; border: 1px solid var(--hairline); background: rgba(255, 255, 255, 0.03); }
.verdicts small { font-size: 11px; color: var(--ink3); font-weight: 500; }
.verdicts .del { color: var(--trash); border-color: rgba(255, 107, 107, 0.3); }
.verdicts .later { color: var(--undecided); border-color: rgba(255, 196, 77, 0.3); }
.verdicts .keep { color: var(--keep); border-color: rgba(74, 222, 155, 0.3); }

/* Query table + reader */
.qtable { width: 100%; border-collapse: collapse; font-size: 15px; }
.qtable td { padding: 11px 12px; border-top: 1px solid var(--hairline); vertical-align: top; color: var(--ink2); }
.qtable tr:first-child td { border-top: 0; }
.qtable code, .kbd, code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em; background: rgba(139, 124, 255, 0.12); color: #C9C1FF; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.qtable td:first-child { width: 42%; }
.qinput { width: 100%; font: inherit; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 16px; color: var(--ink); background: var(--sunken); border: 1px solid var(--hairline-strong); border-radius: 12px; padding: 13px 14px; }
.qinput:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 124, 255, 0.25); }
.parsed { display: grid; gap: 10px; margin-top: 16px; }
.pgroup { background: var(--sunken); border: 1px solid var(--hairline); border-radius: 14px; padding: 12px 14px; }
.pgroup small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink3); margin-bottom: 6px; }
.ptoken { display: inline-block; font-size: 14px; padding: 3px 10px; border-radius: 999px; margin: 3px 4px 3px 0; background: rgba(139, 124, 255, 0.14); color: #D3CCFF; border: 1px solid rgba(139, 124, 255, 0.3); }
.ptoken.ex { background: rgba(255, 107, 107, 0.12); color: #FFB3B3; border-color: rgba(255, 107, 107, 0.3); }
.ptoken.f { background: rgba(79, 214, 232, 0.12); color: #A8EEF7; border-color: rgba(79, 214, 232, 0.3); }
.and { color: var(--ink3); font-size: 12px; margin: 0 4px 0 0; }
.or { display: block; color: var(--ink3); font-size: 12px; margin: 4px 0; letter-spacing: 1px; }

.buckets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bucket { display: flex; gap: 14px; background: rgba(21, 21, 28, 0.72); border: 1px solid var(--hairline); border-radius: var(--r-panel); padding: 16px 18px; }
.bucket svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; margin-top: 3px; }
.bucket b { display: block; font-weight: 600; }
.bucket span { display: block; color: var(--ink2); font-size: 15px; }
.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin-top: 18px; font-size: 15px; color: var(--ink2); }
.keys div { display: flex; gap: 10px; align-items: baseline; }
.keys .kbd { flex: none; min-width: 64px; text-align: center; }
.stat { font-family: var(--rounded); font-size: 44px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.stats p { margin: 6px 0 0; color: var(--ink2); font-size: 15px; }

@media (max-width: 980px) {
  .win-body { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles .tile:nth-child(4) { display: none; }
  .buckets, .stats { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles .tile:nth-child(3) { display: none; }
  .win-body { min-height: 0; }
  .albumbar .file { margin-left: 0; }
  .keys { grid-template-columns: minmax(0, 1fr); }
  .qtable td:first-child { width: auto; }
  .qtable, .qtable tbody, .qtable tr, .qtable td { display: block; }
  .qtable td { border-top: 0; padding: 2px 0; }
  .qtable tr { border-top: 1px solid var(--hairline); padding: 10px 0; }
  .qtable tr:first-child { border-top: 0; }
  .titlebar span { margin-right: 0; font-size: 12px; }
}
