/* The Atlas page, in the app's own design language (the "Atlas — Finder alternative" and "Atlas
   Settings" designs): near-black ground, panels split by 1px lines, mono uppercase labels, coloured
   tiles with dark glyphs, mono values and status dots. Colours are the app's (Core/Theme.swift),
   file-type tile colours are FileCategory.hex. Loaded after /styles.css, which gives the top bar and
   footer. */

:root {
  --ground: #0c0e12;
  --bg: #16181d;
  --panel: #1d2027;
  --field: #12141a;
  --idle: #2d3340;
  --line: #2e333d;
  --text: #eceef2;
  --muted: #9aa1ae;
  --accent: #6c8cff;
  --on-tile: #10131a;
  --green: #5ed48c;
  --amber: #ffb155;
  --sky: #4fc3f7;
  --violet: #b48cff;
  --win-shadow: 0 40px 120px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03);
  --scrim: rgba(5, 7, 12, 0.5);
  /* The terminal, as the app draws it: its own background (termBg) per theme. */
  --term-bg: #0c0e12;
  --term-text: #d7dbe3;
  --term-dim: #9aa1ae;
  --term-amber: #ffb155;
  --term-sky: #4fc3f7;
}

/* Light, by toggle or by system (see styles.css for why it's written twice). */
:root[data-theme="light"] {
  --ground: #eceff4; --bg: #f6f7fa; --panel: #ffffff; --field: #eef0f5; --idle: #e3e7ef;
  --line: #dfe3ea; --text: #1a1d24; --muted: #5a6270;
  --win-shadow: 0 40px 100px rgba(20, 30, 60, 0.18), 0 0 0 1px rgba(20, 30, 60, 0.04);
  --scrim: rgba(30, 40, 70, 0.2);
  --term-bg: #ebeef4; --term-text: #1a1d24; --term-dim: #4a5160; --term-amber: #b4650a; --term-sky: #0b78a8;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #eceff4; --bg: #f6f7fa; --panel: #ffffff; --field: #eef0f5; --idle: #e3e7ef;
    --line: #dfe3ea; --text: #1a1d24; --muted: #5a6270;
    --win-shadow: 0 40px 100px rgba(20, 30, 60, 0.18), 0 0 0 1px rgba(20, 30, 60, 0.04);
    --scrim: rgba(30, 40, 70, 0.2);
    --term-bg: #ebeef4; --term-text: #1a1d24; --term-dim: #4a5160; --term-amber: #b4650a; --term-sky: #0b78a8;
  }
}

body.atlas { background: var(--ground); }
body.atlas .top.scrolled { background: color-mix(in srgb, var(--ground) 72%, transparent); }

.mono { font-family: var(--mono); }

/* ── Hero ────────────────────────────────────────────────── */

.a-hero { padding: 84px 0 40px; text-align: center; position: relative; }
.a-hero::before {
  content: ""; position: absolute; left: 50%; top: -120px; width: 900px; height: 600px; translate: -50% 0; z-index: -1;
  background: radial-gradient(closest-side, rgba(108, 140, 255, 0.22), transparent);
}
.a-hero .mark { width: 96px; height: 96px; margin: 0 auto 26px; display: block; filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.45)); }
.a-hero h1 { font: 700 clamp(40px, 6.6vw, 66px)/1.03 var(--display); letter-spacing: -0.04em; margin: 0 0 18px; }
.a-hero h1 em { font-style: normal; color: var(--accent); }
.a-hero .lede { margin: 0 auto; max-width: 600px; }

.status-row {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 30px;
  height: 36px; padding: 0 14px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line);
  font: 12.5px var(--mono); color: var(--muted);
}
.status-row b { color: var(--text); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(108, 140, 255, 0.18); flex: none; }

/* The download button that replaces "Coming soon" once a release exists. */
.get { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 30px; }
.get .status-row { margin-top: 0; }
.download {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px; border-radius: 12px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15.5px;
  box-shadow: 0 10px 30px rgba(108, 140, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.download:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(108, 140, 255, 0.45); }
.download svg { width: 18px; height: 18px; }
.download-meta { font: 12px var(--mono); color: var(--muted); }

.kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 6px; background: var(--idle); border: 1px solid var(--line); border-bottom-width: 2px;
  font: 600 11.5px var(--mono); color: var(--text); vertical-align: middle;
}

/* ── The window ──────────────────────────────────────────── */

.stage { padding: 30px 0 70px; }
.window {
  position: relative; border-radius: 14px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line);
  box-shadow: var(--win-shadow);
  font-size: 13px; color: var(--text);
  user-select: none;
}

.w-bar { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.lights { display: flex; gap: 8px; flex: none; }
.lights i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.lights i:nth-child(1) { background: #ff5f57; } .lights i:nth-child(2) { background: #febc2e; } .lights i:nth-child(3) { background: #28c840; }
.chev { color: var(--muted); display: flex; gap: 6px; flex: none; }
.chev svg { width: 16px; height: 16px; }
.path {
  flex: 1; min-width: 0; height: 32px; display: flex; align-items: center; gap: 2px; padding: 0 10px;
  background: var(--field); border: 1px solid var(--line); border-radius: 8px;
  font: 12px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden;
}
.path span { padding: 0 4px; } .path .here { color: var(--text); }
.find {
  width: 230px; height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; flex: none;
  background: var(--field); border: 1px solid var(--line); border-radius: 8px; color: var(--muted);
}
.find svg { width: 14px; height: 14px; } .find span:first-of-type { flex: 1; }
.views { display: flex; gap: 2px; padding: 2px; background: var(--field); border: 1px solid var(--line); border-radius: 8px; flex: none; }
.views i { width: 28px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); }
.views i.on { background: var(--accent); color: #fff; }
.views svg { width: 14px; height: 14px; }

.w-body { display: grid; grid-template-columns: 216px 1fr 268px; height: 640px; }

.side { background: var(--panel); border-right: 1px solid var(--line); padding: 14px 8px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.side h6 { margin: 12px 0 6px 10px; font: 600 11px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.side h6:first-child { margin-top: 2px; }
.srow { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; border-radius: 6px; white-space: nowrap; }
.srow.on { background: var(--idle); }
.srow small { margin-left: auto; font: 10.5px var(--mono); color: var(--muted); }
.tile { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: none; color: var(--on-tile); }
.tile svg { width: 13px; height: 13px; }

.list { display: flex; flex-direction: column; min-width: 0; }
.lhead, .lrow { display: grid; grid-template-columns: 1fr 120px 70px; align-items: center; gap: 12px; padding: 0 16px; }
.lhead { height: 34px; font: 600 10.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.lrow { height: 44px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.lrow.on { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.lrow .n { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lrow .n > span:not(.ext):not(.git) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .m, .lrow .s { font: 11.5px var(--mono); color: var(--muted); }
.lrow .s { text-align: right; }
.ext { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; flex: none; font: 700 8.5px var(--mono); color: var(--on-tile); letter-spacing: -0.02em; }
.folder { width: 24px; height: 24px; flex: none; color: #5aa9ff; }
.git { font: 700 10.5px var(--mono); padding: 1px 5px; border-radius: 4px; }
.git.m { color: var(--amber); background: rgba(255, 177, 85, 0.14); }
.git.a { color: var(--green); background: rgba(94, 212, 140, 0.14); }
.git.u { color: var(--sky); background: rgba(79, 195, 247, 0.14); }
.cloud { color: var(--muted); width: 13px; height: 13px; flex: none; }

.insp { border-left: 1px solid var(--line); background: var(--bg); padding: 18px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.insp .head { display: flex; gap: 12px; align-items: center; }
.insp .head .ext { width: 40px; height: 40px; border-radius: 10px; font-size: 11px; }
.insp .head b { display: block; font-size: 13.5px; }
.insp .head div > span { font-size: 11.5px; color: var(--muted); }
.paper { border-radius: 10px; background: var(--field); border: 1px solid var(--line); padding: 14px; font: 10.5px/1.75 var(--mono); color: var(--muted); }
.paper b { color: var(--text); font-weight: 600; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 11.5px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }

.w-status { display: flex; align-items: center; gap: 18px; height: 28px; padding: 0 16px; background: var(--panel); border-top: 1px solid var(--line); font: 11px var(--mono); color: var(--muted); }
.w-status .sp { flex: 1; }
.w-status .ring { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); border-right-color: var(--accent); }

/* The ⌘K palette, open over the window. */
.scrim { position: absolute; inset: 52px 0 28px; background: var(--scrim); display: flex; justify-content: center; padding-top: 72px; }
.palette { width: min(620px, 92%); align-self: flex-start; border-radius: 14px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.p-in { display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 18px; border-bottom: 1px solid var(--line); font-size: 17px; }
.p-in svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.p-in .caret { width: 2px; height: 20px; background: var(--accent); margin-left: -8px; animation: blink 1.1s steps(1) infinite; }
.p-in .esc { margin-left: auto; font: 11px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px; }
.understood { display: flex; gap: 10px; align-items: baseline; padding: 9px 18px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.understood b { color: var(--violet); font-weight: 600; white-space: nowrap; }
.p-list { padding: 10px; }
.p-list h6 { margin: 10px 10px 8px; font: 600 11px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.prow { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 8px; }
.prow.on { background: var(--idle); }
.prow div { min-width: 0; }
.prow b { display: block; font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The reason line only; the file tile beside it keeps its own centred layout. */
.prow div > span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow em { font-style: normal; color: var(--text); }
.prow .ext { width: 30px; height: 30px; border-radius: 7px; font-size: 9px; }
.p-foot { display: flex; justify-content: flex-end; gap: 16px; height: 38px; align-items: center; padding: 0 14px; border-top: 1px solid var(--line); font-size: 12px; }
.p-foot span { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.p-foot .kbd { height: 18px; min-width: 18px; font-size: 10.5px; border-bottom-width: 1px; }

@keyframes blink { 50% { opacity: 0; } }

/* ── A closer look: one drawn screen per feature ─────────── */

.closer { padding: 40px 0 10px; }
.closer > .wrap > h2 { text-align: center; }
.closer > .wrap > .sub { text-align: center; margin: 0 auto 50px; }
.shot { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: center; padding: 34px 0; }
.shot.flip { grid-template-columns: 1.2fr 0.8fr; }
.shot.flip .copy { order: 2; }
.shot .copy h6 { margin: 0 0 12px; font: 600 11px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.shot .copy h3 { margin: 0 0 12px; font: 700 clamp(24px, 3vw, 30px)/1.15 var(--display); letter-spacing: -0.025em; }
.shot .copy p { margin: 0; color: var(--muted); }
.shot .copy p + p { margin-top: 12px; }

/* Shared pieces of the drawn screens */
.pillbox { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; background: var(--field); border: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.pillbox::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.pillbox.plain::after { display: none; }
.btn { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; white-space: nowrap; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg2 { display: inline-flex; gap: 2px; padding: 2px; background: var(--field); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.seg2 span { height: 24px; padding: 0 10px; border-radius: 6px; display: inline-flex; align-items: center; color: var(--muted); }
.seg2 span.on { background: var(--idle); color: var(--text); font-weight: 600; }

/* Search screen */
/* The drawn screens size their contents to their own width, not the page's. */
.shot .window { container-type: inline-size; }

.s-head { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg); white-space: nowrap; }
.s-head > * { flex: none; }
.s-head b { font-size: 16px; font-weight: 600; }
.s-head .count { margin-left: auto; font: 11.5px var(--mono); color: var(--muted); }
.s-head .btn { margin-left: 4px; }
@container (max-width: 640px) { .s-head .count { display: none; } .s-head .btn { margin-left: auto; } }
@container (max-width: 520px) { .s-head .pillbox { display: none; } }
.seg2 span { white-space: nowrap; }
.s-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.qbar { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 8px; background: var(--field); border: 1px solid var(--accent); font: 12.5px var(--mono); }
.qbar svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.qbar .k { color: var(--accent); }
.rules { border-radius: 12px; background: var(--panel); border: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; }
.rules .rh { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.rules .rh .sp { flex: 1; }
.rule { display: flex; align-items: center; gap: 8px; font-size: 12px; }
/* A fixed connector column, as in the app (64 pt): "Where" and the and/or pills line up the rules after them. */
.rule .conn { width: 64px; flex: none; display: flex; align-items: center; color: var(--muted); }
.rule .val { height: 26px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 7px; background: var(--field); border: 1px solid var(--line); min-width: 56px; }
.rule .unit { color: var(--muted); }
.rule .minus { margin-left: auto; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--muted); position: relative; opacity: 0.7; }
.rule .minus::after { content: ""; position: absolute; left: 3px; right: 3px; top: 5.5px; height: 1.5px; background: var(--muted); }

/* Quick Look */
.ql { background: var(--panel); }
.ql-head { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.ql-head .ext { width: 30px; height: 30px; border-radius: 7px; }
.ql-head .t { min-width: 0; margin-right: auto; }
.ql-head .t b { display: block; font-size: 13px; }
.ql-head .t span { font-size: 11.5px; color: var(--muted); }
.photo {
  margin: 14px; height: 300px; border-radius: 10px; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 70% 62%, #ffd27a 0 7%, transparent 7.5%),
    linear-gradient(180deg, #1b2a4a 0%, #6a4a8c 38%, #e9826b 62%, #f6b06b 70%, #2c3e62 70.5%, #1b2a40 100%);
}
.photo::before { content: ""; position: absolute; left: -5%; right: -5%; bottom: 30%; height: 70px; background: #1d2233; clip-path: polygon(0 100%, 12% 40%, 22% 70%, 36% 20%, 50% 65%, 63% 35%, 78% 72%, 90% 30%, 100% 60%, 100% 100%); }
.photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: repeating-linear-gradient(180deg, rgba(255, 210, 122, 0.18) 0 2px, transparent 2px 9px); }
.menu {
  position: absolute; z-index: 2; top: 44px; left: 200px; width: 150px; padding: 5px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); font-size: 12.5px;
}
.menu div { padding: 6px 10px; border-radius: 6px; }
.menu div.on { background: var(--accent); color: #fff; }

/* Terminal dock */
.t-list .lrow { height: 38px; }
.dock-head { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dock-head .tab { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 6px; background: var(--term-bg); color: var(--term-text); font-size: 12px; font-weight: 600; }
.dock-head .tab i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.dock-head .cwd { font: 11px var(--mono); color: var(--muted); }
.dock-head .sp { flex: 1; }
.dock-head .tool { width: 22px; height: 22px; display: grid; place-items: center; color: var(--muted); }
.dock-head .tool svg { width: 13px; height: 13px; }
.term { background: var(--term-bg); color: var(--term-text); font: 12px/1.75 var(--mono); padding: 12px 14px; height: 196px; overflow: hidden; }
.pl { display: inline-flex; align-items: stretch; height: 19px; vertical-align: -4px; margin-right: 8px; font-size: 11.5px; }
.pl span { display: inline-flex; align-items: center; padding: 0 8px; }
.pl .d { background: #3b6fd8; color: #fff; }
.pl .g { background: #5ed48c; color: #10131a; }
.term .o { color: var(--term-dim); }
.term .m { color: var(--term-amber); } .term .q { color: var(--term-sky); }
.term .cur { display: inline-block; width: 8px; height: 15px; background: currentColor; vertical-align: -3px; animation: blink 1.1s steps(1) infinite; }

/* Smart rename */
.sr-head { display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.sr-head b { color: var(--violet); font-size: 13px; }
.sr-head .path2 { font: 12px var(--mono); color: var(--muted); margin-right: auto; }
.sr-opts { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.sr-opts .field2 { width: 110px; height: 28px; border-radius: 8px; background: var(--field); border: 1px solid var(--line); }
.sr-opts .sp { flex: 1; }
.sr-list { padding: 8px; }
.sr-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px; border-radius: 8px; }
.sr-row .box { width: 15px; height: 15px; border-radius: 4px; background: var(--accent); position: relative; flex: none; }
.sr-row .box::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }
.sr-row .names { min-width: 0; flex: 1; }
.sr-row s { display: block; font: 11.5px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-row b { display: block; font: 500 12.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.why { flex: none; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; color: var(--violet); }
.why.pattern { color: var(--amber); }
.sr-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.sr-foot .sp { flex: 1; }

/* Overview */
.ov { padding: 18px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
.ov > b { font-size: 20px; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { padding: 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.stat small { display: block; font-size: 11px; color: var(--muted); }
.stat b { display: block; margin: 4px 0 2px; font: 600 18px var(--sans); letter-spacing: -0.01em; }
.stat span { font: 10.5px var(--mono); color: var(--muted); }
.stat i { display: block; width: 18px; height: 3px; border-radius: 2px; margin-bottom: 8px; }
.ov-cards { display: flex; flex-direction: column; gap: 10px; }
.ov-card { padding: 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; }
.ov-card > b { display: block; font-size: 13px; margin-bottom: 10px; }
/* Storage by kind: one stacked bar and a legend, as the app draws it. */
.stackbar { display: flex; gap: 2px; height: 14px; border-radius: 999px; overflow: hidden; margin: 4px 0 12px; }
.stackbar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; }
.legend em { font: normal 11px var(--mono); color: var(--muted); }
.ov-dup { display: flex; align-items: center; gap: 14px; }
.ov-dup div { flex: 1; }
.ov-dup div b { display: block; font-size: 13px; margin-bottom: 4px; }
.ov-dup div span { color: var(--muted); }

@media (max-width: 900px) {
  .shot, .shot.flip { grid-template-columns: 1fr; gap: 24px; }
  .shot.flip .copy { order: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .ql-head .btn:not(.accent) { display: none; }
  .menu { display: none; }
}

/* ── Feature groups, like Settings ───────────────────────── */

.groups { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 22px; padding: 30px 0 20px; }
/* Panels side by side are the same height: each group fills its grid row, its card fills the group, and
   the rows share the card's height, so a pair with three rows and four rows still ends level. */
.group { display: flex; flex-direction: column; }
.group h2 { margin: 0 0 6px 4px; font: 600 11px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.group > p { margin: 0 0 14px 4px; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; color: var(--text); }
.card { flex: 1; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.row { flex: 1; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; }
.row + .row { border-top: 1px solid var(--line); }
.row .tile { width: 32px; height: 32px; border-radius: 8px; }
.row .tile svg { width: 16px; height: 16px; }
.row .txt { flex: 1; min-width: 0; }
.row .txt b { display: block; font-weight: 600; font-size: 14.5px; }
/* Only the description line: inline marks inside it (a `cd`) stay inline. */
.row .txt > span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.row .txt .mono { color: var(--text); font-size: 12px; }
.row .val { font: 11.5px var(--mono); color: var(--muted); white-space: nowrap; text-align: right; }
.row .val .on { color: var(--green); }
.row .val code { color: var(--text); background: var(--field); border: 1px solid var(--line); padding: 3px 7px; border-radius: 6px; font: inherit; }

.wide { grid-column: 1 / -1; }

/* Privacy */
.private {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
  margin: 30px 0; padding: 22px 24px; border-radius: 14px;
  background: linear-gradient(120deg, rgba(108, 140, 255, 0.16), transparent 60%), var(--panel);
  border: 1px solid var(--line);
}
.private .tile { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #fff; }
.private .tile svg { width: 22px; height: 22px; }
.private b { display: block; font-size: 17px; letter-spacing: -0.01em; }
.private span { color: var(--muted); font-size: 14px; }
.private .val { display: flex; align-items: center; gap: 8px; font: 12px var(--mono); color: var(--green); white-space: nowrap; }
.private .val i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* ── Motion (site.js) ────────────────────────────────────── */

/* The hero arrives on load. */
.js .a-hero .mark, .js .a-hero h1, .js .a-hero .lede, .js .a-hero .get { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.js .a-hero h1 { animation-delay: 0.08s; }
.js .a-hero .lede { animation-delay: 0.16s; }
.js .a-hero .get { animation-delay: 0.24s; }
.js .a-hero .mark { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both, float 7s ease-in-out 1s infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translateY(-8px); } }

/* Inside a drawn screen ([data-scene]): steps appear one after another once it's in view. "shown", not
   "on": .on already means "selected" in the drawn screens (a highlighted row, the active view). */
.js [data-scene] .step { opacity: 0; transform: translateY(6px); transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js [data-scene] .step.shown { opacity: 1; transform: none; }
.js [data-scene] .menu.step { transform: translateY(-6px) scale(0.96); transform-origin: top left; }
.js [data-scene] .menu.step.shown { transform: none; }
/* Storage by kind fills from the left. */
.js [data-scene] .stackbar { transform: scaleX(0); transform-origin: left; transition: transform 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s; }
.js [data-scene].played .stackbar { transform: none; }
/* Replay: a small muted arrow under the window's bottom-right corner, there if wanted and easy to miss.
   Hidden while the scene is still playing. */
.scene-holder { position: relative; }
.replay {
  position: absolute; right: 2px; bottom: -36px;
  width: 28px; height: 28px; padding: 0; display: grid; place-items: center; cursor: pointer;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  opacity: 0.45; transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.replay svg { width: 15px; height: 15px; }
.replay:hover, .replay:focus-visible { opacity: 1; color: var(--text); background: color-mix(in srgb, var(--panel) 80%, transparent); }
.scene-holder:has([data-scene][data-playing]) .replay { opacity: 0; pointer-events: none; }
.js [data-scene].resetting, .js [data-scene].resetting * { transition: none !important; }

/* The caret while text is typed; the palette's own caret waits until typing is done. */
.typing + .caret { display: none; }
.typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; background: var(--accent); vertical-align: -0.15em; animation: blink 1.1s steps(1) infinite; }

/* ── Small screens ───────────────────────────────────────── */

@media (max-width: 980px) {
  .w-body { grid-template-columns: 200px 1fr; }
  .insp { display: none; }
  .find { width: 170px; }
}
@media (max-width: 760px) {
  .w-body { grid-template-columns: 1fr; height: 520px; }
  .side, .views, .find, .lhead .m, .lrow .m { display: none; }
  .lhead, .lrow { grid-template-columns: 1fr 64px; }
  .groups { grid-template-columns: 1fr; }
  .private { grid-template-columns: auto 1fr; }
  .private .val { grid-column: 2; }
  .understood { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .p-in .caret, .typing::after, .term .cur { animation: none; }
  .js .a-hero .mark, .js .a-hero h1, .js .a-hero .lede, .js .a-hero .get, .js .get .download { animation: none; }
  .js [data-scene] .step, .js [data-scene] .stackbar { opacity: 1; transform: none; transition: none; }
}
