/* Khazana — premium app UI.
   Light-first: white cards on a cool grey canvas, one dark hero card, an emerald brand colour used only for actions and active states.
   Each folder has its own soft colour (like sub-brands), used for icons and thumbnails. Layout: phone = one column + bottom tabs; ≥960px = sidebar + content + right panel. */
:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f8f9fa; --surface-3: #eef0f3;
  --line: #e7e9ed; --line-2: #d6dae0;
  --ink: #101318; --ink-2: #353b44; --muted: #687079; --faint: #9aa1aa;
  --brand: #0e7c5a; --brand-hover: #0b6a4c; --brand-ink: #ffffff; --brand-soft: #e7f4ee; --brand-text: #0b6a4c;
  --good: #0f7b53; --good-soft: #e6f4ec; --warn: #9a5b06; --warn-soft: #fff3e1; --bad: #c2352b; --bad-soft: #fdecea; --info: #2556c4; --info-soft: #ecf1fd;
  --hero: #13171c; --hero-2: #1c222a; --hero-ink: #f4f6f8; --hero-muted: #a3abb6; --hero-line: rgba(255, 255, 255, .12);
  --mark: #fff1bd; --mark-ink: #463800; --mark-line: #ecd684;
  --sh-1: 0 1px 2px rgba(16, 19, 24, .05);
  --sh-2: 0 1px 2px rgba(16, 19, 24, .04), 0 6px 18px rgba(16, 19, 24, .06);
  --sh-3: 0 22px 50px rgba(16, 19, 24, .18), 0 2px 8px rgba(16, 19, 24, .06);
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-s: 10px; --r-m: 14px; --r-l: 18px; --r-xl: 26px;
  --pad: 16px;
  --cat-bg: 11%; --cat-lift: #000; --cat-lift-pct: 0%;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.32, 1.25, .6, 1);
  color-scheme: light;
}
/* accents the viewer can pick in Appearance */
:root[data-accent="indigo"] { --brand: #3b4fd8; --brand-hover: #3243bd; --brand-soft: #eef0fe; --brand-text: #3243bd; }
:root[data-accent="saffron"] { --brand: #b95207; --brand-hover: #a14706; --brand-soft: #fff1e5; --brand-text: #a14706; }
:root[data-accent="rose"] { --brand: #c92a62; --brand-hover: #ad2354; --brand-soft: #fdebf2; --brand-text: #a8214f; }
:root[data-accent="graphite"] { --brand: #1f2937; --brand-hover: #111827; --brand-soft: #eef0f3; --brand-text: #1f2937; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0e11; --surface: #15181d; --surface-2: #1a1e24; --surface-3: #232830;
    --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13);
    --ink: #f2f4f7; --ink-2: #c9ced6; --muted: #959da8; --faint: #687079;
    --brand: #33b98a; --brand-hover: #43c896; --brand-ink: #05140e; --brand-soft: rgba(51, 185, 138, .14); --brand-text: #4ccb9c;
    --good: #45c995; --good-soft: rgba(69, 201, 149, .13); --warn: #f0b04b; --warn-soft: rgba(240, 176, 75, .13); --bad: #ff6b60; --bad-soft: rgba(255, 107, 96, .13); --info: #82a8ff; --info-soft: rgba(130, 168, 255, .13);
    --hero: #1b2027; --hero-2: #232a33; --hero-line: rgba(255, 255, 255, .1);
    --mark: rgba(255, 214, 90, .16); --mark-ink: #ffe08a; --mark-line: rgba(255, 214, 90, .3);
    --sh-1: 0 0 0 1px rgba(255, 255, 255, .02); --sh-2: 0 0 0 1px rgba(255, 255, 255, .02), 0 8px 24px rgba(0, 0, 0, .35); --sh-3: 0 24px 60px rgba(0, 0, 0, .6);
    --cat-bg: 18%; --cat-lift: #fff; --cat-lift-pct: 38%;
    color-scheme: dark;
  }
  :root:not([data-theme="light"])[data-accent="indigo"] { --brand: #8d9bff; --brand-hover: #a1adff; --brand-ink: #0b0f2e; --brand-soft: rgba(141, 155, 255, .15); --brand-text: #a1adff; }
  :root:not([data-theme="light"])[data-accent="saffron"] { --brand: #ff9d45; --brand-hover: #ffad63; --brand-ink: #1f0f00; --brand-soft: rgba(255, 157, 69, .15); --brand-text: #ffad63; }
  :root:not([data-theme="light"])[data-accent="rose"] { --brand: #ff7aa8; --brand-hover: #ff93b9; --brand-ink: #2a0614; --brand-soft: rgba(255, 122, 168, .15); --brand-text: #ff93b9; }
  :root:not([data-theme="light"])[data-accent="graphite"] { --brand: #e5e7eb; --brand-hover: #ffffff; --brand-ink: #111827; --brand-soft: rgba(229, 231, 235, .12); --brand-text: #e5e7eb; }
}
:root[data-theme="dark"] {
  --bg: #0c0e11; --surface: #15181d; --surface-2: #1a1e24; --surface-3: #232830;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13);
  --ink: #f2f4f7; --ink-2: #c9ced6; --muted: #959da8; --faint: #687079;
  --brand: #33b98a; --brand-hover: #43c896; --brand-ink: #05140e; --brand-soft: rgba(51, 185, 138, .14); --brand-text: #4ccb9c;
  --good: #45c995; --good-soft: rgba(69, 201, 149, .13); --warn: #f0b04b; --warn-soft: rgba(240, 176, 75, .13); --bad: #ff6b60; --bad-soft: rgba(255, 107, 96, .13); --info: #82a8ff; --info-soft: rgba(130, 168, 255, .13);
  --hero: #1b2027; --hero-2: #232a33; --hero-line: rgba(255, 255, 255, .1);
  --mark: rgba(255, 214, 90, .16); --mark-ink: #ffe08a; --mark-line: rgba(255, 214, 90, .3);
  --sh-1: 0 0 0 1px rgba(255, 255, 255, .02); --sh-2: 0 0 0 1px rgba(255, 255, 255, .02), 0 8px 24px rgba(0, 0, 0, .35); --sh-3: 0 24px 60px rgba(0, 0, 0, .6);
  --cat-bg: 18%; --cat-lift: #fff; --cat-lift-pct: 38%;
  color-scheme: dark;
}
:root[data-theme="dark"][data-accent="indigo"] { --brand: #8d9bff; --brand-hover: #a1adff; --brand-ink: #0b0f2e; --brand-soft: rgba(141, 155, 255, .15); --brand-text: #a1adff; }
:root[data-theme="dark"][data-accent="saffron"] { --brand: #ff9d45; --brand-hover: #ffad63; --brand-ink: #1f0f00; --brand-soft: rgba(255, 157, 69, .15); --brand-text: #ffad63; }
:root[data-theme="dark"][data-accent="rose"] { --brand: #ff7aa8; --brand-hover: #ff93b9; --brand-ink: #2a0614; --brand-soft: rgba(255, 122, 168, .15); --brand-text: #ff93b9; }
:root[data-theme="dark"][data-accent="graphite"] { --brand: #e5e7eb; --brand-hover: #ffffff; --brand-ink: #111827; --brand-soft: rgba(229, 231, 235, .12); --brand-text: #e5e7eb; }

/* folder colours: soft background + strong glyph */
.c-AI { --c: #4f5bd5; } .c-Video { --c: #d2445b; } .c-Design { --c: #8b4fd1; } .c-Coding { --c: #1b7fa6; } .c-Marketing { --c: #1e8452; } .c-Learning { --c: #b7700f; }
.c-Fitness { --c: #3f8a1e; } .c-Money { --c: #2a5db0; } .c-Travel { --c: #c2410c; } .c-Food { --c: #b4232a; } .c-Gear { --c: #4b5563; } .c-Other { --c: #64748b; } .c-Inbox { --c: #64748b; }
.cat { --cs: color-mix(in srgb, var(--c, #64748b) var(--cat-bg), var(--surface)); --ct: color-mix(in srgb, var(--c, #64748b), var(--cat-lift) var(--cat-lift-pct)); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; overflow-wrap: break-word; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -.02em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mono { font-family: var(--mono); }
kbd { font: 500 11px/1 var(--mono); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); background: var(--surface-2); }

/* ---------- shell ---------- */
.app { min-height: 100%; }
.main { min-width: 0; outline: none; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.appbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px; height: calc(60px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0 16px; background: var(--bg); transition: box-shadow .2s; }
.appbar.edge { box-shadow: 0 1px 0 var(--line); background: var(--surface); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.03em; text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.logo-mark svg { width: 18px; height: 18px; stroke-width: 2; }
.ibtn { position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink); text-decoration: none; }
.ibtn:hover { background: var(--surface-3); }
.ibtn.dot::after { content: ""; position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; text-decoration: none; }
.avatar.xl { width: 58px; height: 58px; font-size: 23px; background: var(--brand); color: var(--brand-ink); }
.side { display: none; }

/* bottom tabs (phone) */
.nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 52px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.nav a svg { width: 23px; height: 23px; }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] svg { fill: currentColor; stroke: currentColor; }
.nav a[aria-current="page"] svg .nofill { fill: none; }
.nav .add-tab .plus { width: 46px; height: 34px; border-radius: 11px; background: var(--ink); color: var(--surface); display: grid; place-items: center; }
.nav .add-tab .plus svg { width: 20px; height: 20px; stroke-width: 2.2; fill: none !important; }
.nav .add-tab[aria-current="page"] .plus { background: var(--brand); color: var(--brand-ink); }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }

@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: 252px minmax(0, 1fr); transition: padding-right .3s var(--ease); }
  .appbar, .nav { display: none; }
  .main { padding-bottom: 48px; }
  .side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; background: var(--surface); border-right: 1px solid var(--line); }
  .side .logo { padding: 2px 8px 14px; }
  .side-search { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; margin-bottom: 8px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 14px; text-align: left; }
  .side-search svg { width: 17px; height: 17px; }
  .side .nv { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 10px; border-radius: 11px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14.5px; }
  .side .nv:hover { background: var(--surface-3); }
  .side .nv[aria-current="page"] { background: var(--surface-3); color: var(--ink); }
  .side .nv[aria-current="page"] svg { fill: currentColor; }
  .side .nv[aria-current="page"] svg .nofill { fill: none; }
  .side .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; }
  .side .side-cta { margin: 10px 0 6px; }
  .side .side-sec { margin: 16px 10px 4px; font-size: 12px; font-weight: 700; color: var(--faint); }
  .side .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
  .side .me { display: flex; align-items: center; gap: 10px; text-decoration: none; }
  .side .me b { display: block; font-size: 14px; }
  .side .me small { display: block; font-size: 12px; color: var(--muted); }
}
@media (min-width: 1280px) { .app.panel-open { padding-right: 460px; } }

/* ---------- page ---------- */
.view { max-width: 1200px; margin: 0 auto; padding: 4px 16px 0; }
.view.enter { animation: viewin .22s var(--ease) both; }
@keyframes viewin { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (min-width: 960px) { .view { padding: 28px 36px 0; } }
.view[data-r="you"], .view[data-r="sources"], .view[data-r="autopilot"], .view[data-r="notify"], .view[data-r="privacy"], .view[data-r="look"], .view[data-r="about"], .view[data-r="arrange"] { max-width: 880px; }
.phead { display: flex; align-items: center; gap: 12px; margin: 6px 0 18px; }
.phead h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.phead p { color: var(--muted); font-size: 14px; margin-top: 2px; }
@media (min-width: 960px) { .phead h1 { font-size: 30px; } }
.back { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink); }
.sh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 12px; }
.sh h2 { font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
.sh .sub { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.sh .link { flex: none; }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-text); font-weight: 650; font-size: 14px; text-decoration: none; border: 0; background: none; padding: 0; cursor: pointer; }
.link svg { width: 16px; height: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--sh-1); min-width: 0; }
.card.pad { padding: var(--pad); }
.sec { margin-top: 28px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 18px; text-align: center; color: var(--muted); font-size: 14px; }
.empty b { color: var(--ink); font-size: 15.5px; }
.empty .art { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); margin-bottom: 4px; }
.empty .art svg { width: 28px; height: 28px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 14.5px; font-weight: 650; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, transform .12s; }
.btn:hover { border-color: color-mix(in srgb, var(--ink) 28%, transparent); }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-text); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn.xs { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn.xs svg { width: 14px; height: 14px; }
.btn.lg { height: 52px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.live { background: var(--bad); border-color: var(--bad); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 13.5px; font-weight: 600; box-shadow: var(--sh-1); }
.chip svg { width: 16px; height: 16px; }
.chip .c { font-weight: 500; color: var(--faint); font-size: 12px; }
.chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.chip[aria-pressed="true"] .c { color: var(--brand-text); opacity: .75; }
.chip.dash { border-style: dashed; box-shadow: none; }
.spg { display: inline-flex; flex: none; }
.spg .chip:first-child { border-radius: 10px 0 0 10px; }
.spg .chip + .chip { border-radius: 0 10px 10px 0; border-left: 0; padding: 0 9px; }
.spg .chip + .chip svg { width: 13px; height: 13px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-3); }
.seg button { height: 36px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-2); }
.tabsx { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabsx::-webkit-scrollbar { display: none; }
.tabsx button { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 12px; border: 0; background: none; font-weight: 650; font-size: 14.5px; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.tabsx button svg { width: 17px; height: 17px; }
.tabsx button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
.input { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 15px; }
.input::placeholder { color: var(--faint); }
textarea.input { height: auto; min-height: 112px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
select.input { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
.field small { font-weight: 500; color: var(--muted); }
.search { position: relative; display: block; }
.search > svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 46px; padding-right: 52px; height: 52px; border-radius: 14px; border-color: var(--line); box-shadow: var(--sh-2); font-size: 15.5px; }
.search .in-mic { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.searchbar { display: flex; align-items: center; gap: 12px; width: 100%; height: 52px; padding: 0 6px 0 15px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-2); color: var(--muted); font-size: 15px; text-align: left; }
.searchbar > svg { width: 19px; height: 19px; color: var(--ink-2); }
.searchbar .ph { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.searchbar .ph b { color: var(--ink-2); font-weight: 600; }
.searchbar .sb-main { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.searchbar .sb-main > svg { width: 19px; height: 19px; color: var(--ink-2); }
.searchbar .sb-mic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0; border: 0; border-left: 1px solid var(--line); background: none; color: var(--brand-text); }
.searchbar .sb-mic svg { width: 20px; height: 20px; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .2s, border-color .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .28); transition: transform .25s var(--spring); }
.switch input:checked + span { background: var(--brand); border-color: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* pills, badges, proof */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill.free { background: var(--good-soft); color: var(--good); }
.pill.freemium { background: var(--surface-3); color: var(--ink-2); }
.pill.paid { background: var(--warn-soft); color: var(--warn); }
.pill.unknown { background: var(--surface-3); color: var(--muted); }
.pill.down { background: var(--bad-soft); color: var(--bad); }
.pill.rise { background: var(--info-soft); color: var(--info); }
.pill.ai { background: var(--surface-3); color: var(--ink-2); }
.pill.pro { background: var(--ink); color: var(--surface); }
.pill.st-new { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.pill.st-tried { background: var(--warn-soft); color: var(--warn); }
.pill.st-using { background: var(--brand-soft); color: var(--brand-text); }
.pill.st-skip { color: var(--faint); text-decoration: line-through; }
.sg { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 7px; border-radius: 7px; font-weight: 750; font-size: 13px; font-variant-numeric: tabular-nums; background: var(--good); color: #fff; flex: none; }
.sg svg { width: 12px; height: 12px; stroke-width: 2.4; }
.sg.mid { background: var(--good-soft); color: var(--good); }
.sg.low { background: var(--surface-3); color: var(--muted); }
:root[data-theme="dark"] .sg:not(.mid):not(.low) { color: #05140e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sg:not(.mid):not(.low) { color: #05140e; } }
.mk { display: inline-flex; align-items: center; max-width: 100%; padding: 2px 7px; border-radius: 6px; background: var(--mark); color: var(--mark-ink); box-shadow: inset 0 0 0 1px var(--mark-line); font: 500 12.5px/1.45 var(--mono); overflow-wrap: anywhere; }
.via { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.via svg { width: 14px; height: 14px; }
.ti { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--cs); color: var(--ct); font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.ti.s { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
.ti.l { width: 58px; height: 58px; border-radius: 16px; font-size: 24px; }
.ti.xs { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
.tchip { display: inline-flex; align-items: center; gap: 5px; padding: 0 7px 0 3px; margin: 0 1px; height: 24px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface); font: 650 13.5px/1 var(--font); color: var(--ink); vertical-align: baseline; }
.tchip .ti { width: 18px; height: 18px; border-radius: 5px; font-size: 10px; }

/* cover: a small product shot of what was saved (browser window with the address, a place, a dish, gear, a screenshot) */
.cover { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--cs); padding: 9% 9% 8%; display: flex; flex-direction: column; gap: 7%; container-type: inline-size; isolation: isolate; }
.cover .cv-top { display: flex; align-items: center; gap: 5px; font-size: clamp(8px, 7cqi, 11px); font-weight: 650; color: var(--ct); min-width: 0; }
.cover .cv-top span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover .cv-av { width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--ct); color: var(--surface); font-size: .85em; display: grid; place-items: center; flex: none; font-weight: 800; }
.cover .cv-win { flex: 1; min-height: 0; background: var(--surface); border-radius: 8px; box-shadow: 0 6px 16px rgba(16, 19, 24, .12); overflow: hidden; display: flex; flex-direction: column; }
.cover .cv-bar { display: flex; align-items: center; gap: 3px; padding: 6% 6% 5%; border-bottom: 1px solid var(--line); min-width: 0; }
.cover .cv-bar i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); flex: none; }
.cover .cv-bar span { margin-left: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--mark); color: var(--mark-ink); padding: 1px 4px; border-radius: 3px; font: 600 clamp(7px, 6.4cqi, 10px)/1.3 var(--mono); }
.cover .cv-body { padding: 8%; display: flex; flex-direction: column; gap: 7%; flex: 1; }
.cover .cv-body b { display: block; height: 9%; min-height: 6px; width: 72%; border-radius: 3px; background: var(--ct); opacity: .9; }
.cover .cv-body s { display: block; height: 6%; min-height: 4px; border-radius: 3px; background: var(--surface-3); text-decoration: none; }
.cover .cv-body s:nth-of-type(2) { width: 86%; } .cover .cv-body s:nth-of-type(3) { width: 64%; }
.cover .cv-cap { font-size: clamp(9.5px, 9.2cqi, 15px); font-weight: 800; line-height: 1.2; color: var(--ink); letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover .cv-dur { position: absolute; top: 6%; right: 6%; font-size: clamp(8px, 6.5cqi, 10.5px); font-weight: 700; background: rgba(16, 19, 24, .74); color: #fff; padding: 2px 6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 3px; }
.cover .cv-dur svg { width: 1em; height: 1em; fill: currentColor; stroke: none; }
.cover .cv-glyph { flex: 1; min-height: 0; background: var(--surface); border-radius: 8px; box-shadow: 0 6px 16px rgba(16, 19, 24, .12); display: grid; place-items: center; color: var(--ct); position: relative; overflow: hidden; }
.cover .cv-glyph svg { width: 42%; height: 42%; stroke-width: 1.4; }
.cover .cv-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover .cv-phone { flex: 1; min-height: 0; align-self: center; width: 62%; background: var(--surface); border-radius: 10px; box-shadow: 0 6px 16px rgba(16, 19, 24, .12); padding: 9% 8%; display: flex; flex-direction: column; gap: 8%; }
.cover .cv-phone s { display: block; height: 5%; min-height: 4px; border-radius: 3px; background: var(--surface-3); text-decoration: none; }
.cover .cv-phone em { display: block; height: 9%; min-height: 6px; border-radius: 3px; background: var(--mark); box-shadow: inset 0 0 0 1px var(--mark-line); }
.cover.gone::after { content: "Removed from Instagram · copy kept"; position: absolute; left: 6%; right: 6%; bottom: 5%; z-index: 2; padding: 5px 6px; border-radius: 7px; background: rgba(16, 19, 24, .82); color: #fff; font-size: clamp(8px, 6.4cqi, 10.5px); font-weight: 600; text-align: center; }

/* ---------- home ---------- */
.home { display: grid; gap: 22px; margin-top: 4px; }
.home > section { min-width: 0; }
@media (min-width: 960px) {
  .home { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 28px 24px; grid-auto-flow: row dense; }
  .home > .w12 { grid-column: span 12; } .home > .w8 { grid-column: span 8; } .home > .w7 { grid-column: span 7; } .home > .w6 { grid-column: span 6; } .home > .w5 { grid-column: span 5; } .home > .w4 { grid-column: span 4; }
}
.greet { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 14px; }
.greet h1 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.greet p { color: var(--muted); font-size: 14px; }
@media (min-width: 960px) { .greet h1 { font-size: 30px; } }
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); background: linear-gradient(160deg, var(--hero-2), var(--hero) 55%); color: var(--hero-ink); padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 14px; min-height: 100%; }
.hero .dial { position: absolute; right: -46px; top: -46px; width: 210px; height: 210px; color: var(--hero-line); pointer-events: none; }
.hero .dial svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.2; }
.hero .h-top { position: relative; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--hero-muted); font-weight: 600; }
.hero .h-top button.ai { border: 0; cursor: pointer; font-weight: 650; font-family: inherit; }
.hero .h-top button.ai:hover { background: rgba(255, 255, 255, .14); }
.hero .h-top button.ai svg { width: 13px; height: 13px; }
.hero .h-top .ai { margin-left: auto; height: 24px; padding: 0 9px; border-radius: 7px; background: rgba(255, 255, 255, .08); color: var(--hero-ink); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.hero h2 { position: relative; font-size: 22px; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; max-width: 22ch; }
.hero .brief { position: relative; font-size: 15.5px; line-height: 1.6; color: #e3e7ec; max-width: 64ch; }
.hero .tchip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.hero .row { position: relative; margin-top: 2px; }
.hero .btn:not(.primary) { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.hero .btn:not(.primary):hover { background: rgba(255, 255, 255, .14); }
@media (min-width: 960px) { .hero { padding: 26px 26px 24px; } .hero h2 { font-size: 26px; } }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--sh-1); min-width: 0; text-align: left; }
button.kpi { cursor: pointer; }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .l svg { width: 15px; height: 15px; }
.kpi .v { font-size: 27px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 4px; }
.kpi .d { font-size: 12.5px; font-weight: 650; color: var(--good); }
.kpi .d.flat { color: var(--muted); }
.kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.deck { position: relative; padding-bottom: 12px; }
.deck::before, .deck::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 30px; border-radius: 0 0 var(--r-l) var(--r-l); background: var(--surface); border: 1px solid var(--line); border-top: 0; }
.deck::after { left: 26px; right: 26px; bottom: 0; opacity: .7; }
.deck.single::before, .deck.single::after { display: none; }
.rv { position: relative; z-index: 1; display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 14px; padding: 14px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); transition: transform .22s var(--ease), opacity .22s; touch-action: pan-y; will-change: transform; }
.rv > * { min-width: 0; }
.rv.out-r { transform: translateX(110%) rotate(5deg); opacity: 0; }
.rv.out-l { transform: translateX(-110%) rotate(-5deg); opacity: 0; }
.rv h3 { font-size: 17px; font-weight: 750; line-height: 1.3; }
.rv .by { font-size: 13px; color: var(--muted); margin-top: 3px; }
.rv .sum { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.rv .found { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rv .chips { margin-top: 12px; }
.rv .chips .chip { height: 32px; font-size: 13px; }
.rv .acts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.rv[data-swipe]::after { content: attr(data-swipe); position: absolute; top: 16px; right: 16px; z-index: 4; padding: 6px 12px; border-radius: 8px; font-weight: 800; font-size: 14px; text-transform: capitalize; border: 2px solid currentColor; background: var(--surface); opacity: 0; transform: rotate(8deg); pointer-events: none; }
.rv[data-swipe="keep"]::after { opacity: 1; color: var(--good); }
.rv[data-swipe="later"]::after { opacity: 1; color: var(--warn); left: 16px; right: auto; transform: rotate(-8deg); }
.cv-btn { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: 14px; align-self: start; }
.kbd-hint { display: none; }
@media (min-width: 960px) { .kbd-hint { display: flex; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); } .rv { grid-template-columns: 132px minmax(0, 1fr); } }
@media (max-width: 400px) { .rv { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; } .rv .acts .btn { padding: 0 8px; } .rv .acts .btn svg { display: none; } }
.cats { display: grid; grid-auto-flow: column; grid-auto-columns: 74px; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.cats::-webkit-scrollbar { display: none; }
.catb { display: flex; flex-direction: column; align-items: center; gap: 7px; border: 0; background: none; padding: 0; color: var(--ink-2); font-size: 13px; font-weight: 650; }
.catb .ci { width: 64px; height: 64px; border-radius: 50%; background: var(--cs); color: var(--ct); display: grid; place-items: center; transition: transform .15s; }
.catb:hover .ci { transform: translateY(-2px); }
.catb .ci svg { width: 28px; height: 28px; stroke-width: 1.6; }
.catb small { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: -5px; }
@media (min-width: 960px) { .cats { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); overflow: visible; } }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: min(80%, 300px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 2px 8px; margin: -2px; }
.hscroll::-webkit-scrollbar { display: none; }
@media (min-width: 960px) { .hscroll { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; } }
.tcard { scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); min-width: 0; }
.tcard .top { display: flex; gap: 12px; align-items: center; border: 0; background: none; padding: 0; text-align: left; color: inherit; }
.tcard .top b { display: block; font-size: 16px; font-weight: 750; }
.tcard .when { display: block; font-size: 12.5px; color: var(--muted); }
.tcard p { font-size: 14px; color: var(--ink-2); flex: 1; }
.tcard .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; }
.trk .s { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; color: var(--muted); text-align: center; }
.trk .s i { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); display: grid; place-items: center; }
.trk .s i svg { width: 10px; height: 10px; stroke-width: 3.2; }
.trk .s::before { content: ""; position: absolute; top: 8px; right: 50%; width: 100%; height: 2px; background: var(--line-2); }
.trk .s:first-child::before { display: none; }
.trk .done i { background: var(--good); border-color: var(--good); color: #fff; }
.trk .done::before { background: var(--good); }
.trk .now { color: var(--ink); }
.trk .now i { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.trk .now::before { background: linear-gradient(90deg, var(--good), var(--line-2)); }
.trk .off i { border-style: dashed; }
.hunt { display: block; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.hunt:last-child { border-bottom: 0; }
.hunt .hh { display: flex; gap: 12px; align-items: center; }
.hunt .tt { display: block; font-weight: 700; font-size: 14.5px; }
.hunt .sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.week { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.ring { --p: 0; position: relative; width: 108px; height: 108px; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; }
.ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.ring small { position: absolute; bottom: 30px; font-size: 11px; font-weight: 600; color: var(--muted); }
.streak { display: flex; gap: 5px; margin-top: 12px; align-items: flex-end; height: 36px; }
.streak i { flex: 1; max-width: 22px; border-radius: 5px; background: var(--surface-3); }
.streak i.on { background: var(--brand); }
.streak i.now { box-shadow: inset 0 0 0 2px var(--brand); background: var(--brand-soft); }
.streak i.now.on { background: var(--brand); }
.alerts { display: flex; flex-direction: column; gap: 10px; }
.alert { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.alert .ai-c { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--bad-soft); color: var(--bad); }
.alert.ok .ai-c { background: var(--good-soft); color: var(--good); }
.alert.info .ai-c { background: var(--info-soft); color: var(--info); }
.alert b { display: block; font-size: 14.5px; }
.alert p { font-size: 13.5px; color: var(--muted); margin: 3px 0 10px; overflow-wrap: anywhere; }
.ck .bar, .bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); transition: width .4s var(--ease); }
.ck ul { list-style: none; margin: 12px 0 0; padding: 0; }
.ck li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ck li .dt { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; }
.ck li.ok .dt { background: var(--good); border-color: var(--good); color: #fff; }
.ck li.ok .dt svg { width: 12px; height: 12px; stroke-width: 3; }
.ck li.ok span { color: var(--muted); }
.ck li.ok b { text-decoration: line-through; text-decoration-color: var(--faint); }
.ck li button { margin-left: auto; }
.rise-l { display: flex; flex-direction: column; }
.rise-l button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; width: 100%; }
.rise-l button:last-child { border-bottom: 0; }
.rise-l b { display: block; font-size: 14.5px; } .rise-l small { display: block; font-size: 12.5px; color: var(--muted); }

/* ---------- vault ---------- */
.vtools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--sh-1); }
.tl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; padding: 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; transition: background .15s; }
.tl:last-child { border-bottom: 0; }
.tl:hover { background: var(--surface-2); }
.tl .nm { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 750; min-width: 0; }
.tl .nm span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl .u { display: block; font-size: 13.5px; color: var(--ink-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.tl .meta .dotsep::before { content: "·"; margin-right: 10px; color: var(--faint); }
.tl .end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tl.dead .nm span:first-child { color: var(--muted); }
.tl[aria-pressed] .ti { position: relative; }
.tl[aria-pressed="true"] { background: var(--brand-soft); }
.tl[aria-pressed="true"] .ti::after { content: "✓"; position: absolute; inset: 0; border-radius: inherit; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: 18px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.svc { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; text-align: left; color: inherit; }
.svc .t { font-weight: 750; font-size: 14.5px; line-height: 1.3; }
.svc .m { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12.5px; color: var(--muted); align-items: center; }
.svc .tick { position: absolute; top: 8px; left: 8px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(16, 19, 24, .35); display: grid; place-items: center; }
.svc .tick svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; opacity: 0; }
.svc[aria-pressed="true"] .tick { background: var(--brand); border-color: var(--brand); }
.svc[aria-pressed="true"] .tick svg { opacity: 1; }
.svc[aria-pressed="true"] .cover { outline: 3px solid var(--brand); outline-offset: 2px; }
.bulk { position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 15; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 14px; border-radius: 14px; background: var(--ink); color: var(--surface); box-shadow: var(--sh-3); }
.bulk .btn { background: transparent; color: var(--surface); border-color: color-mix(in srgb, var(--surface) 30%, transparent); }
.bulk select.input { width: auto; height: 36px; padding: 0 30px 0 10px; font-size: 13.5px; background-color: transparent; color: var(--surface); border-color: color-mix(in srgb, var(--surface) 30%, transparent); }
.bulk select.input option { color: #111; }
@media (min-width: 960px) { .bulk { top: 12px; } }
.cols { display: grid; gap: 14px; }
@media (min-width: 900px) { .cols.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.prompt { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.prompt .hd { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.prompt .hd b { font-size: 15.5px; }
.prompt pre { margin: 0; white-space: pre-wrap; font: 500 13px/1.6 var(--mono); padding: 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.proj { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.steps-list label { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px; }
.steps-list input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.steps-list li.done span { color: var(--muted); text-decoration: line-through; }
.colc { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); text-align: left; color: inherit; width: 100%; }
.mos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.mos .ti { width: 100%; height: auto; aspect-ratio: 1; font-size: 17px; }
.colc b { font-size: 16px; font-weight: 750; } .colc small { font-size: 13px; color: var(--muted); }
.colc.new { align-items: center; justify-content: center; min-height: 220px; border-style: dashed; box-shadow: none; color: var(--brand-text); font-weight: 700; }
.rewind { position: relative; display: flex; flex-direction: column; gap: 22px; padding-left: 22px; }
.rewind::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; border-radius: 1px; background: var(--line-2); }
.rw-g { position: relative; display: flex; flex-direction: column; gap: 8px; }
.rw-g::before { content: ""; position: absolute; left: -22px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.rw-h { display: flex; justify-content: space-between; gap: 10px; padding: 0 2px 2px; font-size: 14px; font-weight: 750; }
.rw-h span:last-child { color: var(--muted); font-weight: 500; font-size: 13px; }
.rw { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; width: 100%; }
.rw:hover { border-color: var(--line-2); }
.rw .cover { width: 48px; padding: 5px; border-radius: 9px; }
.rw b { display: block; font-size: 14.5px; font-weight: 700; }
.rw small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-t { font-size: 12.5px; color: var(--faint); font-weight: 600; }
.map { position: relative; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--sh-1); }
.map svg { display: block; width: 100%; height: auto; max-height: 76vh; }
.map .lg { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.map .lg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.map [role="button"] { cursor: pointer; }
.map [role="button"]:focus-visible { outline: none; }
.map [role="button"]:hover .node, .map [role="button"]:focus-visible .node { stroke: var(--ink); stroke-width: 2.5; }
.cmp { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px 12px; font-size: 13.5px; }
.cmp-h { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cmp-h b { font-size: 15px; }
.cmp-l { grid-column: 1 / -1; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cmp-c { min-width: 0; overflow-wrap: anywhere; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

/* ---------- capture, import, bulk review ---------- */
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .ways { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.way { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); text-align: left; box-shadow: var(--sh-1); color: inherit; text-decoration: none; }
.way:hover { border-color: var(--line-2); }
.way .wi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.way b { font-size: 15px; } .way small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.drop { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px; border: 1.5px dashed var(--line-2); border-radius: var(--r-m); background: var(--surface-2); transition: border-color .2s, background .2s; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop > svg { width: 28px; height: 28px; color: var(--brand-text); }
.drop b { display: block; font-size: 14.5px; } .drop small { display: block; color: var(--muted); font-size: 13px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; grid-column: 1 / -1; }
.thumbs:empty { display: none; }
.thumbs img { width: 60px; height: 78px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-2); }
.aist { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface-3); }
.aist i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.aist.on i { background: var(--good); }
.prog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.prog li { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; font-size: 14px; }
.prog li + li::before { content: ""; position: absolute; left: 11px; top: -10px; height: 20px; width: 2px; background: var(--line-2); }
.prog i { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); display: grid; place-items: center; }
.prog i svg { width: 12px; height: 12px; stroke-width: 3; }
.prog .done i { background: var(--good); border-color: var(--good); color: #fff; }
.prog .run i { border-color: var(--brand); border-top-color: transparent; animation: spin .8s linear infinite; }
.prog .skip { color: var(--faint); }
.prog em { font-style: normal; font-size: 12.5px; color: var(--muted); text-align: right; }
@keyframes spin { to { transform: rotate(360deg); } }
.res { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.res:last-child { border-bottom: 0; }
.res input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); }
.res b { font-size: 14.5px; }
.res .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.skel { border-radius: 8px; background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shim 1.2s linear infinite; }
@keyframes shim { to { background-position: -200% 0; } }
.howto { counter-reset: s; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.howto li { counter-increment: s; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; font-size: 14px; color: var(--ink-2); }
.howto li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--ink); }
.bq { display: grid; gap: 16px; }
@media (min-width: 900px) { .bq { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.bimg { position: relative; border-radius: var(--r-l); overflow: hidden; background: var(--surface-3); border: 1px solid var(--line); aspect-ratio: 3 / 4; max-height: 62vh; display: grid; place-items: center; }
.bimg img { width: 100%; height: 100%; object-fit: contain; }
.bimg .bpos { position: absolute; top: 10px; left: 10px; height: 26px; padding: 0 9px; border-radius: 8px; background: rgba(16, 19, 24, .72); color: #fff; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; }

/* ---------- ask ---------- */
.chat { display: flex; flex-direction: column; gap: 20px; margin-top: 8px; }
.msg.me { align-self: flex-end; max-width: 86%; padding: 11px 15px; border-radius: 18px 18px 6px 18px; background: var(--ink); color: var(--surface); font-size: 15px; }
.msg.ai { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.msg.ai .who { width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; }
.msg.ai .who svg { width: 17px; height: 17px; stroke-width: 2; }
.msg.ai .body { font-size: 15.5px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.ai .srcs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; align-items: center; }
.msg.ai .srcs > span { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.msg.ai .media { display: grid; grid-auto-flow: column; grid-auto-columns: 108px; gap: 10px; overflow-x: auto; margin-top: 12px; scrollbar-width: none; padding-bottom: 2px; }
.msg.ai .media button { display: flex; flex-direction: column; gap: 6px; border: 0; background: none; padding: 0; text-align: left; font-size: 12.5px; font-weight: 650; }
.typing-dots { display: inline-flex; gap: 4px; padding: 8px 0; }
.typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; } .typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.composer { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 10; display: flex; gap: 6px; align-items: center; margin-top: 18px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--sh-3); }
.composer .input { border: 0; background: transparent; height: 44px; box-shadow: none; }
.composer .btn { width: 44px; padding: 0; flex: none; }
@media (min-width: 960px) { .composer { bottom: 20px; } }
.sugg { display: grid; gap: 10px; }
@media (min-width: 720px) { .sugg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sugg button { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); text-align: left; box-shadow: var(--sh-1); }
.sugg button .si { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.sugg b { display: block; font-size: 14.5px; } .sugg small { display: block; font-size: 12.5px; color: var(--muted); }

/* ---------- you ---------- */
.prof { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r-xl); background: linear-gradient(160deg, var(--hero-2), var(--hero) 60%); color: var(--hero-ink); }
.prof b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.prof small { display: block; font-size: 13px; color: var(--hero-muted); }
.prof .btn { margin-left: auto; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.mg { margin-top: 22px; }
.mg > h3 { font-size: 13.5px; font-weight: 700; color: var(--muted); margin: 0 4px 8px; }
.menu { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--sh-1); }
.mi { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 13px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; text-decoration: none; color: inherit; }
.mi:last-child { border-bottom: 0; }
a.mi:hover, button.mi:hover { background: var(--surface-2); }
.mi .mic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.mi b { display: block; font-size: 15px; font-weight: 650; }
.mi small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.mi .end { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 13px; font-weight: 600; }
.mi .end svg { width: 18px; height: 18px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font: 500 11px var(--font); }
.chart .bs { fill: var(--surface-3); }
.chart .bt { fill: var(--brand); }
.chart .lbl { fill: var(--ink); font: 700 11.5px var(--font); }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.swatch i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.swatch[aria-pressed="true"] i { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.swatch i svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 3; opacity: 0; }
.swatch[aria-pressed="true"] i svg { opacity: 1; }
.cust { display: flex; flex-direction: column; }
.cust li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.cust li:last-child { border-bottom: 0; }
.cust li.off b { color: var(--faint); }
.cust li.drag { opacity: .5; }
.cust li.over { box-shadow: inset 0 2px 0 var(--brand); }
.cust .grip { color: var(--faint); cursor: grab; display: grid; place-items: center; }
.cust ul { list-style: none; margin: 0; padding: 0; }
.plans { display: grid; gap: 14px; }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.plan.pro { background: linear-gradient(160deg, var(--hero-2), var(--hero) 60%); color: var(--hero-ink); border-color: transparent; }
.plan .price { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.plan .price small { font-size: 14px; font-weight: 600; opacity: .7; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg { width: 18px; height: 18px; color: var(--good); stroke-width: 2.4; margin-top: 1px; }
.plan.pro li svg { color: #4ccb9c; }
.integ { display: grid; gap: 12px; }
@media (min-width: 760px) { .integ { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ig { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.ig .hd { display: flex; gap: 12px; align-items: center; }
.ig .hd .mic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); }
.ig b { font-size: 15px; } .ig p { font-size: 13.5px; color: var(--muted); }
.ig pre { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font: 500 12px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }

/* widgets: a home screen with live widgets */
.screen { position: relative; border-radius: 30px; padding: 20px 18px 26px; background: linear-gradient(170deg, #dfe8e3, #cfd9e6); }
:root[data-theme="dark"] .screen { background: linear-gradient(170deg, #1d262b, #141920); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .screen { background: linear-gradient(170deg, #1d262b, #141920); } }
.screen .wclock { text-align: center; color: rgba(16, 19, 24, .78); font-size: 13px; font-weight: 650; margin-bottom: 12px; }
:root[data-theme="dark"] .screen .wclock { color: rgba(255, 255, 255, .8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .screen .wclock { color: rgba(255, 255, 255, .8); } }
.wgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 420px; margin: 0 auto; }
.wd { grid-column: span 2; aspect-ratio: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 22px; background: var(--surface); box-shadow: 0 8px 24px rgba(16, 19, 24, .14); border: 0; text-align: left; color: inherit; min-width: 0; overflow: hidden; }
.wd.m { grid-column: span 4; aspect-ratio: 2.15 / 1; }
.wd .wh { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.wd .wh .logo-mark { width: 18px; height: 18px; border-radius: 5px; }
.wd .wh .logo-mark svg { width: 11px; height: 11px; }
.wd .big { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.wd .wl { display: flex; flex-direction: column; gap: 6px; flex: 1; justify-content: center; }
.wd .wl div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; font-weight: 650; }
.wd .wl div span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lockw { display: flex; justify-content: center; gap: 14px; margin: 4px 0 18px; }
.lockw .lw { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .5); backdrop-filter: blur(10px); color: #101318; font-size: 13px; font-weight: 800; position: relative; }
:root[data-theme="dark"] .lockw .lw { background: rgba(255, 255, 255, .12); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lockw .lw { background: rgba(255, 255, 255, .12); color: #fff; } }
.lockw .lw small { position: absolute; bottom: 9px; font-size: 8.5px; font-weight: 700; opacity: .7; }
.lockw .lw svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.lockw .lw circle { fill: none; stroke-width: 4; }

/* ---------- sheet / right panel ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(16, 19, 24, .42); opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 92%; display: flex; flex-direction: column; background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: 0 -18px 50px rgba(0, 0, 0, .22); transform: translateY(105%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s linear .3s; }
.sheet.on { transform: none; visibility: visible; transition: transform .38s var(--spring); }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 0; flex: none; }
.sheet .sh-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px 6px 18px; flex: none; }
.sheet .sh-top h2 { flex: 1; min-width: 0; font-size: 19px; font-weight: 750; letter-spacing: -.025em; overflow-wrap: anywhere; }
.sheet .sh-body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 18px 24px; overscroll-behavior: contain; }
.sheet .sh-foot { flex: none; display: flex; gap: 8px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet .sh-foot .btn { flex: 1; }
.sheet .sh-foot:empty { display: none; }
@media (min-width: 960px) {
  .sheet { left: auto; top: 0; width: 460px; max-height: none; height: 100%; border-radius: 0; border-left: 1px solid var(--line); box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .3); transform: translateX(105%); }
  .sheet.on { transition: transform .34s var(--ease); }
  .sheet .grab { display: none; }
  .sheet .sh-top { padding: 20px 16px 8px 24px; }
  .sheet .sh-body { padding: 6px 24px 28px; }
  .sheet .sh-foot { padding: 14px 24px; }
}
@media (min-width: 1280px) { .scrim.on.panel { opacity: 0; pointer-events: none; } }
.dl { display: flex; flex-direction: column; gap: 20px; }
.blk { display: flex; flex-direction: column; gap: 10px; }
.blk > h4 { font-size: 13.5px; font-weight: 750; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.idrow { display: flex; gap: 14px; align-items: center; }
.idrow b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.frame { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.frame .fw { border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); overflow: hidden; }
.frame .fw .fb { display: flex; align-items: center; gap: 4px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.frame .fw .fb i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.frame .fw .fc { padding: 14px 12px; display: flex; justify-content: center; }
.frame .fw .fc .mk { font-size: 15px; padding: 4px 10px; }
.frame .fm { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.frame .fm b { color: var(--ink); font-weight: 650; }
.src { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; }
.sigbox { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.sigbox .sv { font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--good); font-variant-numeric: tabular-nums; line-height: 1; }
.sigbox small { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.ts { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ts button { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; font-size: 14px; }
.ts button:last-child { border-bottom: 0; }
.ts b { font-size: 12.5px; color: var(--brand-text); font-variant-numeric: tabular-nums; }
.ts mark { background: var(--mark); color: var(--mark-ink); border-radius: 3px; padding: 0 2px; }
.kv { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.kv > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv > div:last-child { border-bottom: 0; }
.kv small { display: block; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.feed { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ev { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; font-size: 14px; width: 100%; }
.ev:last-child { border-bottom: 0; }
.ev small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.ev .gi { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.ev .gi svg { width: 17px; height: 17px; }
.ev.new { background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.ev.new b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-left: 6px; vertical-align: 2px; }
.ev.good .gi { background: var(--good-soft); color: var(--good); }
.ev.bad .gi { background: var(--bad-soft); color: var(--bad); }

/* ---------- search overlay ---------- */
.so { position: fixed; inset: 0; z-index: 60; display: none; align-items: flex-start; justify-content: center; padding: 9vh 16px 16px; background: rgba(16, 19, 24, .45); }
.so.on { display: flex; }
.sbox { width: min(680px, 100%); max-height: 80vh; display: flex; flex-direction: column; border-radius: 20px; background: var(--surface); box-shadow: var(--sh-3); overflow: hidden; animation: pop .24s var(--spring); }
@keyframes pop { from { transform: translateY(-6px) scale(.985); opacity: .6; } }
@media (max-width: 640px) { .so { padding: 0; } .sbox { width: 100%; max-height: none; height: 100%; border-radius: 0; animation: none; } }
.sin { display: flex; align-items: center; gap: 6px; height: 62px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--line); flex: none; }
.sin > svg { color: var(--muted); }
.sin input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: 17px; padding: 0 6px; }
.slist { overflow-y: auto; padding: 8px; flex: 1; min-height: 0; }
.sgrp { font-size: 12.5px; font-weight: 750; color: var(--muted); padding: 12px 10px 6px; }
.sitem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 54px; padding: 6px 10px; border: 0; border-radius: 12px; background: none; text-align: left; }
.sitem[aria-selected="true"] { background: var(--surface-3); }
.sitem b { display: block; font-size: 14.5px; font-weight: 650; }
.sitem small { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitem small mark { background: var(--mark); color: var(--mark-ink); border-radius: 3px; padding: 0 2px; }
.sitem .gi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.sitem .gi svg { width: 18px; height: 18px; }
.sitem .k { font-size: 11.5px; font-weight: 700; color: var(--faint); }
.sfoot { display: flex; gap: 16px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); flex: none; }
@media (max-width: 640px) { .sfoot { display: none; } }
.srec { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 10px 8px; }

/* ---------- try session ---------- */
.try { position: fixed; inset: 0; z-index: 66; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(16, 19, 24, .5); }
.try.on { display: flex; }
.try-box { width: min(440px, 100%); max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 26px; background: var(--surface); box-shadow: var(--sh-3); animation: pop .3s var(--spring); }
.try-top { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.clock { position: relative; width: 196px; height: 196px; margin: 4px auto; flex: none; }
.clock svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.clock .tr { fill: none; stroke: var(--surface-3); stroke-width: 8; }
.clock .tp { fill: none; stroke: var(--brand); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.try.done .clock .tp { stroke: var(--good); }
.clock b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.clock small { position: absolute; left: 0; right: 0; bottom: 52px; text-align: center; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.try-out { display: grid; gap: 8px; }

/* ---------- notification banner, share demo ---------- */
.nb { position: fixed; z-index: 80; top: calc(10px + env(safe-area-inset-top)); left: 50%; width: min(420px, calc(100% - 20px)); transform: translate(-50%, -150%); visibility: hidden; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 12px 14px; border-radius: 22px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); box-shadow: var(--sh-3); text-align: left; transition: transform .45s var(--ease), visibility 0s linear .45s; }
.nb.on { transform: translate(-50%, 0); visibility: visible; transition: transform .55s var(--spring); }
.nb .logo-mark { width: 40px; height: 40px; border-radius: 11px; }
.nb .nt { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.nb b { display: block; font-size: 14.5px; margin-top: 1px; }
.nb p { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.demo { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(16, 19, 24, .55); }
.demo.on { display: flex; }
.phone { position: relative; width: min(340px, 100%); height: min(690px, calc(100vh - 32px)); border-radius: 40px; background: #0b0c0e; padding: 10px; box-shadow: var(--sh-3); }
.phone .scr { position: relative; width: 100%; height: 100%; border-radius: 31px; overflow: hidden; background: #000; color: #fff; }
.phone .x { position: absolute; top: -12px; right: -12px; z-index: 5; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); display: grid; place-items: center; box-shadow: var(--sh-2); }
.feedv { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; background: linear-gradient(180deg, #2b3440 0%, #12161b 70%); }
.feedv .vtitle { font-size: 20px; font-weight: 800; line-height: 1.2; margin-bottom: 10px; }
.feedv .vby { font-size: 13px; opacity: .8; margin-bottom: 10px; }
.feedv .rail { position: absolute; z-index: 2; right: 12px; bottom: 120px; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.feedv > :not(.rail) { margin-right: 58px; }
.feedv .rail button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }
.feedv .rail small { display: block; font-size: 10.5px; margin-top: 4px; text-align: center; }
.osheet { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 14px 14px 20px; border-radius: 22px 22px 0 0; background: #f2f2f4; color: #111; transform: translateY(105%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s; }
.osheet.on { transform: none; visibility: visible; transition: transform .35s var(--ease); }
.osheet .apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.osheet .apps button { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; font-size: 11px; color: #222; }
.osheet .apps i { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: #444; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.osheet .apps .k i { background: var(--brand); color: var(--brand-ink); }
.qsave { position: absolute; z-index: 4; left: 10px; right: 10px; bottom: 10px; padding: 16px; border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: var(--sh-3); transform: translateY(calc(100% + 24px)); visibility: hidden; transition: transform .4s var(--spring), visibility 0s linear .4s; }
.qsave.on { transform: none; visibility: visible; transition: transform .4s var(--spring); }

/* ---------- toast ---------- */
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); display: flex; align-items: center; gap: 14px; max-width: calc(100% - 28px); padding: 10px 10px 10px 16px; border-radius: 14px; background: #1a1d22; color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--sh-3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .3s var(--spring); }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 0; border-radius: 9px; padding: 7px 12px; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 700; font-size: 13px; }
@media (min-width: 960px) { .toast { bottom: 28px; left: calc(50% + 126px); } }

/* ---------- density ---------- */
:root[data-density="compact"] { --pad: 12px; }
:root[data-density="compact"] .tl { padding: 10px 12px; }
:root[data-density="compact"] .rv { padding: 12px; }
:root[data-density="compact"] .kpi { padding: 10px 12px; }
:root[data-density="compact"] .mi { padding: 10px 12px; }
:root[data-density="compact"] .home { gap: 16px; }
:root[data-density="compact"] .btn { height: 40px; }

/* ---------- additions for panels, insights, public page ---------- */
.wchart { padding: 18px 4px 0 30px; }
.wc-plot { position: relative; height: 180px; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; align-items: end; }
.wc-gl { position: absolute; left: -30px; right: 0; height: 0; border-top: 1px solid var(--line); pointer-events: none; }
.wc-gl b { position: absolute; left: 0; top: -9px; width: 22px; text-align: right; font: 500 11px var(--font); color: var(--muted); }
.wc-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.wc-col .s { position: relative; width: min(100%, 46px); min-height: 3px; border-radius: 6px 6px 0 0; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); }
.wc-col .t { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(58%, 26px); min-height: 0; border-radius: 4px 4px 0 0; background: var(--brand); }
.wc-col em { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); font: 700 12px var(--font); font-style: normal; color: var(--ink); white-space: nowrap; }
.wc-col:hover .s { box-shadow: inset 0 0 0 1px var(--line-2); }
.wc-col:last-child em { left: auto; right: 0; transform: none; }
.wc-x { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; margin-top: 8px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; }
.wc-x .now { color: var(--ink); }
.scr.saving .rail { opacity: 0; transition: opacity .2s; }
label.btn { cursor: pointer; }
.ibtn.live, .btn.ghost.live { background: var(--bad); color: #fff; }
.cover .cv-glyph svg.cv-map { width: 100%; height: 100%; }
.cover .cv-glyph svg.over { position: relative; z-index: 1; }
.itop { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 380px) { .itop { grid-template-columns: 88px minmax(0, 1fr); } }
.pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 500 13px/1.6 var(--mono); padding: 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.pre mark, .tl .u mark, .svc mark { background: var(--mark); color: var(--mark-ink); border-radius: 3px; padding: 0 2px; }
button.src, button.frame { width: 100%; text-align: left; color: inherit; cursor: pointer; }
button.src:hover, button.frame:hover { border-color: var(--line-2); }
.src .grow b { display: block; font-size: 14px; }
.src .grow small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; overflow-wrap: anywhere; }
.src > svg:last-child { color: var(--faint); }
.frame .fw { display: block; }
.ts > div { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.ts > div:last-child { border-bottom: 0; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hb { display: grid; grid-template-columns: minmax(84px, 120px) minmax(0, 1fr) 30px; gap: 12px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.hb > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb .tr { display: block; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.hb .tr i { display: block; height: 100%; border-radius: 5px; background: var(--ink-2); }
.hb.cat .tr i { background: var(--ct); }
.hb b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.lockw .lw { border: 0; cursor: pointer; }
.feedv .rail span { display: flex; flex-direction: column; align-items: center; }
.feedv .rail svg { width: 26px; height: 26px; }
.mi[aria-pressed="true"] b { color: var(--brand-text); }
.pub { border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; background: var(--surface); box-shadow: var(--sh-1); }
.pub .pb-top { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.pub .pb-url { font: 500 12px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.pub .pb-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pub .pb-row b { display: block; font-size: 14.5px; }
.pub .pb-row small { display: block; font-size: 12.5px; color: var(--muted); }
.pub .pb-foot { padding: 12px 16px; font-size: 12.5px; color: var(--faint); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
