/* Hushkey — design tokens */
:root {
  /* Hushkey brand (hushkey.io): deep night, glass surfaces, periwinkle + mint */
  --bg: #07080c;
  --bg-elev: #0b0c12;
  --panel: #0f1016;
  --panel-2: #14151d;
  --panel-3: #1c1e28;
  --glass: rgba(255, 255, 255, .028);
  --glass-2: rgba(255, 255, 255, .045);
  --glass-3: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --text: #f2f3f7;
  --text-2: #a3a8b9;
  --text-3: #6d7285;
  --brand: #a3adff;
  --brand-2: #b3bcff;
  --brand-strong: #7f8cff;
  --mint: #86dcc2;
  --brand-ink: #07080c;
  --brand-soft: rgba(163, 173, 255, .10);
  --brand-glow: rgba(127, 140, 255, .55);
  --grad: linear-gradient(100deg, #d6dbff 0%, #a3adff 45%, #86dcc2 100%);
  --logo-grad: linear-gradient(135deg, #b3bcff 0%, #5fe0b2 100%);
  --cta-bg: #f2f3f7; --cta-fg: #07080c;
  --sel-bg: #f2f3f7; --sel-fg: #07080c;
  --ok: #86dcc2; --ok-soft: rgba(134, 220, 194, .10);
  --warn: #f0c27a; --warn-soft: rgba(240, 194, 122, .10);
  --bad: #ff8f8f; --bad-soft: rgba(255, 143, 143, .10);
  --r-xl: 28px; --r-lg: 18px; --r-md: 12px; --r-sm: 10px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .8);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --tab-h: 64px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f7fb; --bg-elev: #ffffff; --panel: #ffffff; --panel-2: #f0f1f7; --panel-3: #e6e8f1;
  --glass: rgba(10, 14, 40, .025); --glass-2: rgba(10, 14, 40, .04); --glass-3: rgba(10, 14, 40, .06);
  --line: rgba(10, 14, 40, .08); --line-2: rgba(10, 14, 40, .14);
  --text: #0b0c12; --text-2: #4d5266; --text-3: #8a8fa3;
  --brand: #5b67e8; --brand-2: #4c58d6; --brand-strong: #4652d0; --mint: #1f9f7c; --brand-ink: #ffffff;
  --brand-soft: rgba(91, 103, 232, .09); --brand-glow: rgba(91, 103, 232, .35);
  --grad: linear-gradient(100deg, #5b67e8 0%, #7f8cff 45%, #1f9f7c 100%);
  --cta-bg: #0b0c12; --cta-fg: #f6f7fb; --sel-bg: #0b0c12; --sel-fg: #f6f7fb;
  --ok: #1f8f6f; --ok-soft: rgba(31, 143, 111, .09); --warn: #a8690f; --warn-soft: rgba(168, 105, 15, .10); --bad: #c94545; --bad-soft: rgba(201, 69, 69, .09);
  --shadow: 0 24px 60px -24px rgba(20, 24, 60, .25);
  color-scheme: light;
}
@font-face { font-family: "Geist"; src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
body { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--brand-2); }
[hidden] { display: none !important; }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- shell ---------- */
#root { position: fixed; inset: 0; display: flex; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; }
.view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: calc(var(--sat) + 8px) 16px calc(var(--tab-h) + var(--sab) + 24px); }
.view.noscroll { overflow: hidden; display: flex; flex-direction: column; }
.view.noscroll > .host { flex: 1; min-height: 0; }
.wrap { max-width: 1080px; margin: 0 auto; width: 100%; }
.wrap.narrow { max-width: 720px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tab-h) + var(--sab)); padding-bottom: var(--sab); display: flex; align-items: stretch; background: color-mix(in srgb, var(--bg-elev) 86%, transparent); backdrop-filter: saturate(160%) blur(20px); -webkit-backdrop-filter: saturate(160%) blur(20px); border-top: 1px solid var(--line); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 10.5px; font-weight: 540; letter-spacing: .01em; }
.tab.on { color: var(--text); }
.tab.on svg { color: var(--brand-2); }
.tab svg.i { width: 23px; height: 23px; }
.tab-add { flex: 0 0 76px; display: flex; align-items: center; justify-content: center; }
.tab-add span { width: 50px; height: 50px; border-radius: 17px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), #9a6bff); box-shadow: 0 8px 24px var(--brand-glow); transition: transform .15s; }
.tab-add span:active { transform: scale(.92); }
.tab-add svg.i { width: 24px; height: 24px; stroke-width: 2.4; }

@media (min-width: 960px) {
  .tabbar { display: none; }
  .sidebar { display: flex; flex-direction: column; width: 264px; flex-shrink: 0; border-right: 1px solid var(--line); background: var(--bg-elev); padding: 20px 14px; gap: 2px; overflow-y: auto; }
  .view { padding: 28px 40px 48px; }
  .side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 620; font-size: 18px; letter-spacing: -.02em; }
  .side-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 550; font-size: 14px; text-align: left; width: 100%; }
  @media (hover: hover) { .side-item:hover { background: var(--panel-2); color: var(--text); } }
  .side-item.on { background: var(--brand-soft); color: var(--text); }
  .side-item.on svg { color: var(--brand-2); }
  .side-item .count { margin-left: auto; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
  .side-label { font-size: 11px; font-weight: 620; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; padding: 18px 12px 6px; }
  .side-dot { width: 9px; height: 9px; border-radius: 3px; margin: 0 5px; }
  .side-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
  .side-add { margin: 0 0 14px; }
  .only-mobile { display: none !important; }
}
@media (max-width: 959px) { .only-desktop { display: none !important; } }

/* ---------- type ---------- */
.h-title { font-size: 30px; font-weight: 620; letter-spacing: -.03em; margin: 6px 0 2px; }
.h-sub { color: var(--text-2); font-size: 14px; margin: 0; }
.h-sec { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 12px; }
.h-sec h2 { font-size: 13px; font-weight: 620; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.h-sec button { color: var(--brand-2); font-size: 13px; font-weight: 540; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.mono { font-family: var(--mono); }
.small { font-size: 12.5px; }
.topbar { display: flex; align-items: center; gap: 10px; min-height: 52px; margin-bottom: 6px; }
.topbar .grow { flex: 1; min-width: 0; }
.topbar h1 { font-size: 26px; font-weight: 620; letter-spacing: -.03em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 20px; border-radius: var(--r-md); font-weight: 570; font-size: 15px; transition: transform .12s, background .15s, opacity .15s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.primary { background: linear-gradient(135deg, var(--brand), #8f6bff); color: #fff; box-shadow: 0 8px 24px var(--brand-glow); }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); }
.btn.ghost { color: var(--text-2); height: 42px; }
.btn.danger { background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 25%, transparent); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line); flex-shrink: 0; }
@media (hover: hover) { .icon-btn:hover { color: var(--text); } }
.icon-btn.plain { background: none; border: 0; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 570; color: var(--text-2); margin: 0 0 6px 2px; }
.input, .select, .textarea { width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line-2); outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 15px; background: var(--panel-3); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(20px); }

.search { position: relative; }
.search svg.i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 18px; height: 18px; }
.search .input { padding-left: 42px; height: 46px; border-radius: 14px; background: var(--panel); border-color: var(--line); }
.search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 600 11px var(--font); color: var(--text-3); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 960px) { .chips { margin: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; } }
.chip { flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--panel); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; font-weight: 540; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.chip.on { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.chip .dot { width: 8px; height: 8px; border-radius: 3px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 570; background: var(--panel-2); color: var(--text-2); white-space: nowrap; }
.pill svg.i { width: 14px; height: 14px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.brand { background: var(--brand-soft); color: var(--brand-2); }

/* ---------- cards & lists ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 18px; }
.card + .card { margin-top: 12px; }
.list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); min-height: 60px; }
.row:last-child { border-bottom: 0; }
@media (hover: hover) { button.row:hover, a.row:hover { background: var(--panel-2); } }
.row .body { flex: 1; min-width: 0; }
.row .t { font-weight: 540; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row .chev { color: var(--text-3); width: 16px; height: 16px; }
.ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--panel-2); color: var(--text-2); overflow: hidden; position: relative; }
.ico img { width: 100%; height: 100%; object-fit: cover; }
.ico svg.i { width: 20px; height: 20px; }
.ico.lg { width: 56px; height: 56px; border-radius: 16px; }

.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.tile { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-align: left; display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
@media (hover: hover) { .tile:hover { border-color: var(--line-2); transform: translateY(-1px); } }
.tile .thumb { aspect-ratio: 4 / 3; background: var(--panel-2); display: grid; place-items: center; overflow: hidden; color: var(--text-3); position: relative; }
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.tile .thumb svg.i { width: 34px; height: 34px; stroke-width: 1.4; }
.tile .meta { padding: 10px 12px 12px; }
.tile .t { font-weight: 540; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .s { font-size: 12px; color: var(--text-3); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.tile .badge { position: absolute; top: 8px; left: 8px; }
.tile .fav { position: absolute; top: 8px; right: 8px; color: #fbbf24; }
.ext { position: absolute; bottom: 8px; right: 8px; font: 700 10px var(--font); letter-spacing: .04em; padding: 3px 6px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; text-transform: uppercase; }

.folder-tile { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); text-align: left; min-width: 0; }
@media (hover: hover) { .folder-tile:hover { border-color: var(--line-2); } }
.folder-tile .ico { background: var(--brand-soft); color: var(--brand-2); }
.folder-tile .t { font-weight: 540; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-tile .s { font-size: 12px; color: var(--text-3); }

.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .cat-grid { grid-template-columns: repeat(5, 1fr); } }
.cat { position: relative; text-align: left; padding: 14px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; min-height: 104px; overflow: hidden; }
@media (hover: hover) { .cat:hover { border-color: var(--line-2); } }
.cat .ico { width: 36px; height: 36px; border-radius: 11px; }
.cat b { font-size: 14px; font-weight: 570; }
.cat .n { font-size: 12px; color: var(--text-3); }
.cat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--c); opacity: .08; }

/* ---------- home ---------- */
.hero-ask { margin-top: 18px; display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 6px 6px 16px; height: 58px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line-2); color: var(--text-3); text-align: left; box-shadow: var(--shadow); }
.hero-ask .spark { color: var(--brand-2); }
.hero-ask .go { margin-left: auto; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); }
.status-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.hscroll::-webkit-scrollbar { display: none; }
@media (min-width: 960px) { .hscroll { margin: 0; padding: 0 0 4px; } }
.alert-card { flex: 0 0 250px; text-align: left; padding: 14px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.alert-card .ico { background: var(--warn-soft); color: var(--warn); }
.alert-card.bad .ico { background: var(--bad-soft); color: var(--bad); }
.score { display: flex; align-items: center; gap: 16px; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ring, var(--ok)) calc(var(--p) * 1%), var(--panel-3) 0); flex-shrink: 0; }
.ring b { width: 52px; height: 52px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-size: 17px; font-weight: 620; }
.two-col { display: grid; gap: 0 28px; }
@media (min-width: 1100px) { .two-col { grid-template-columns: 1.6fr 1fr; } }

/* ---------- lock / onboarding ---------- */
.auth { position: fixed; inset: 0; z-index: 80; background: var(--bg); overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: calc(var(--sat) + 24px) 20px calc(var(--sab) + 24px); }
.auth::before { content: ""; position: fixed; left: 50%; top: -20vh; width: 140vw; max-width: 900px; height: 70vh; transform: translateX(-50%); background: radial-gradient(closest-side, var(--brand-glow), transparent); opacity: .55; pointer-events: none; }
.auth-inner { position: relative; width: 100%; max-width: 400px; margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.logo { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(145deg, #8a7bff, #5a3df0 60%, #3b22c9); box-shadow: 0 18px 50px var(--brand-glow), inset 0 1px 0 rgba(255,255,255,.25); color: #fff; }
.logo svg { width: 40px; height: 40px; }
.logo.sm { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; }
.logo.sm svg { width: 19px; height: 19px; }
.auth h1 { font-size: 30px; letter-spacing: -.035em; font-weight: 620; margin: 22px 0 8px; }
.auth p.lead { color: var(--text-2); margin: 0 0 26px; font-size: 15px; max-width: 330px; }
.auth .actions { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.features { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 12px; margin: 6px 0 26px; }
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--panel) 80%, transparent); border: 1px solid var(--line); }
.feature .ico { background: var(--brand-soft); color: var(--brand-2); width: 38px; height: 38px; }
.feature b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.feature span { font-size: 13px; color: var(--text-2); }
.dots { display: flex; gap: 14px; justify-content: center; margin: 22px 0 30px; height: 16px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--text-3); transition: all .15s; }
.dots i.on { background: var(--text); border-color: var(--text); transform: scale(1.05); }
.dots.err i { border-color: var(--bad); background: var(--bad); }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 22px; justify-content: center; }
.key { width: 76px; height: 76px; border-radius: 50%; background: var(--panel-2); font-size: 28px; font-weight: 450; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; transition: background .1s, transform .1s; }
.key small { font-size: 9.5px; font-weight: 570; letter-spacing: .14em; color: var(--text-3); margin-top: 3px; }
.key:active { background: var(--panel-3); transform: scale(.94); }
.key.fn { background: none; font-size: 15px; font-weight: 540; color: var(--text-2); }
.key.fn svg.i { width: 26px; height: 26px; }
.auth .err-msg { min-height: 20px; color: var(--bad); font-size: 13.5px; margin: -14px 0 14px; }
.codebox { width: 100%; font: 600 19px/1.6 var(--mono); letter-spacing: .06em; padding: 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px dashed var(--line-2); word-break: break-all; user-select: all; -webkit-user-select: all; }
.check { display: flex; gap: 12px; text-align: left; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; margin: 18px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); margin: 1px 0 0; flex-shrink: 0; }
.steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 26px; }
.steps i { width: 22px; height: 4px; border-radius: 2px; background: var(--panel-3); }
.steps i.on { background: var(--brand); }
.meter { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; margin: -6px 0 14px; }
.meter i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }

/* ---------- sheets / modals ---------- */
.scrim { position: fixed; inset: 0; z-index: 90; background: rgba(4, 4, 10, .62); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--bg-elev); border: 1px solid var(--line); border-bottom: 0; border-radius: 26px 26px 0 0; padding: 10px 20px calc(var(--sab) + 22px); animation: up .26s cubic-bezier(.2, .8, .2, 1); }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--panel-3); margin: 0 auto 14px; }
.sheet h3 { font-size: 20px; margin: 4px 0 6px; letter-spacing: -.02em; }
.sheet p.lead { color: var(--text-2); margin: 0 0 18px; font-size: 14px; }
.sheet .head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sheet .head h3 { flex: 1; margin: 0; }
@media (min-width: 700px) {
  .scrim { align-items: center; padding: 24px; }
  .sheet { border-radius: 24px; border-bottom: 1px solid var(--line); padding-bottom: 22px; max-height: 88vh; }
  .sheet .grab { display: none; }
  .sheet.wide { max-width: 980px; }
}
.sheet.full { max-width: none; height: 100%; max-height: none; border-radius: 0; padding: 0; display: flex; flex-direction: column; }
@media (min-width: 700px) { .sheet.full { max-width: 1100px; height: 92vh; border-radius: 24px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); text-align: left; width: 100%; }
@media (hover: hover) { .menu-item:hover { border-color: var(--line-2); } }
.menu-item .ico { background: var(--brand-soft); color: var(--brand-2); }
.menu-item b { display: block; font-size: 15px; }
.menu-item span { font-size: 12.5px; color: var(--text-2); }
.menu-item.danger { color: var(--bad); }
.menu-item.danger .ico { background: var(--bad-soft); color: var(--bad); }

/* ---------- item detail ---------- */
.detail { display: flex; flex-direction: column; height: 100%; }
.detail-top { display: flex; align-items: center; gap: 8px; padding: calc(var(--sat) + 10px) 12px 10px; border-bottom: 1px solid var(--line); }
@media (min-width: 700px) { .detail-top { padding-top: 12px; } }
.detail-top .grow { flex: 1; min-width: 0; font-weight: 570; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-body { flex: 1; overflow-y: auto; display: grid; }
@media (min-width: 900px) { .detail-body { grid-template-columns: 1fr 380px; } .detail-info { border-left: 1px solid var(--line); } }
.preview { background: var(--panel-2); min-height: 260px; display: flex; align-items: flex-start; justify-content: center; overflow: auto; position: relative; }
.preview img, .preview video { max-width: 100%; max-height: 72vh; display: block; margin: auto; }
.preview audio { width: 90%; margin: 40px auto; }
.preview .pages { display: flex; flex-direction: column; gap: 12px; padding: 16px; align-items: center; width: 100%; }
.preview canvas { max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 4px 20px rgba(0,0,0,.35); background: #fff; }
.preview .txt { white-space: pre-wrap; word-break: break-word; padding: 20px; font-size: 14px; line-height: 1.7; color: var(--text); width: 100%; max-width: 780px; }
.preview .empty-prev { margin: auto; text-align: center; color: var(--text-3); padding: 40px; }
.detail-info { padding: 18px 18px calc(var(--sab) + 24px); }
.actions-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; font-weight: 540; color: var(--text-2); }
@media (hover: hover) { .act:hover { color: var(--text); border-color: var(--line-2); } }
.act.on { color: var(--brand-2); border-color: color-mix(in srgb, var(--brand) 40%, transparent); background: var(--brand-soft); }
@media (hover: hover) { .act.danger:hover { color: var(--bad); } }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }
.ai-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 620; color: var(--brand-2); background: var(--brand-soft); padding: 2px 7px; border-radius: 6px; margin-left: 6px; vertical-align: 1px; }
.ai-tag svg.i { width: 11px; height: 11px; stroke-width: 2.4; }
details.reader { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
details.reader summary { padding: 12px 14px; cursor: pointer; font-size: 13.5px; font-weight: 540; list-style: none; display: flex; align-items: center; gap: 8px; }
details.reader pre { margin: 0; padding: 12px 14px; max-height: 280px; overflow: auto; font: 12.5px/1.6 var(--mono); white-space: pre-wrap; color: var(--text-2); border-top: 1px solid var(--line); background: var(--panel); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--panel-2); font-size: 12.5px; color: var(--text-2); }

/* ---------- ask ---------- */
.ask-wrap { display: flex; flex-direction: column; height: 100%; max-width: 820px; margin: 0 auto; width: 100%; }
.chat { flex: 1; overflow-y: auto; padding: 6px 0 16px; display: flex; flex-direction: column; gap: 14px; }
.msg-u { align-self: flex-end; max-width: 85%; background: var(--brand); color: #fff; padding: 11px 15px; border-radius: 20px 20px 6px 20px; font-size: 15px; }
.msg-a { align-self: flex-start; max-width: 92%; display: flex; gap: 10px; }
.msg-a .av { width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0; }
.msg-a .bubble { background: var(--panel); border: 1px solid var(--line); padding: 12px 15px; border-radius: 6px 20px 20px 20px; font-size: 15px; min-width: 0; }
.bubble .quote { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--panel-2); border-radius: 0 10px 10px 0; font-size: 13.5px; color: var(--text-2); }
.bubble .gen { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); font-size: 14px; }
.bubble .alist { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.bubble .aitem { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 12px; background: var(--panel-2); width: 100%; }
.bubble .aitem .t { font-weight: 540; font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble .aitem .m { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.srcs { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; scrollbar-width: none; }
.src { flex: 0 0 210px; text-align: left; padding: 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.src b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; color: var(--text-2); margin-top: 4px; }
.foot-note { font-size: 11.5px; color: var(--text-3); margin-top: 8px; display: flex; align-items: center; gap: 5px; }
.foot-note svg.i { width: 12px; height: 12px; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow); margin-bottom: 4px; }
.composer textarea { flex: 1; border: 0; outline: none; background: none; resize: none; max-height: 140px; min-height: 24px; padding: 8px 6px; line-height: 1.4; }
.send { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--brand); color: #fff; flex-shrink: 0; }
.send[disabled] { opacity: .35; }
.sugs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sug { padding: 9px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); text-align: left; }
@media (hover: hover) { .sug:hover { color: var(--text); border-color: var(--line-2); } }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ai-empty { text-align: center; margin: auto 0; padding: 30px 0; }
.ai-orb { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 24px; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 30%, #b3a8ff, #6a4cff 55%, #3a1fd0); box-shadow: 0 16px 50px var(--brand-glow); }
.ai-orb svg.i { width: 32px; height: 32px; }

/* ---------- agents ---------- */
.agents-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 26px 22px; background: radial-gradient(120% 140% at 0% 0%, rgba(123,107,255,.35), transparent 60%), var(--panel); border: 1px solid var(--line); }
.agents-hero h2 { font-size: 24px; margin: 12px 0 8px; letter-spacing: -.02em; }
.agents-hero p { color: var(--text-2); margin: 0; max-width: 560px; }
.flow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.flow .card { padding: 14px; }
.flow .n { width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-2); display: grid; place-items: center; font-weight: 620; font-size: 13px; margin-bottom: 8px; }
.agent { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); text-align: left; width: 100%; }
@media (hover: hover) { .agent:hover { border-color: var(--line-2); } }
.agent .ico { width: 48px; height: 48px; border-radius: 14px; }
.agent b { display: block; font-size: 15px; }
.agent span { font-size: 13px; color: var(--text-2); }
.agents-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.perm { padding: 16px; border-radius: var(--r-lg); background: var(--panel-2); border: 1px solid var(--line); text-align: left; }
.perm-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.perm-row:last-child { border-bottom: 0; }

/* ---------- misc ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--sab) + 18px); transform: translateX(-50%); z-index: 120; background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 540; box-shadow: var(--shadow); animation: up .2s; max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 8px; }
@media (min-width: 960px) { .toast { bottom: 28px; } }
.progress { position: fixed; top: calc(var(--sat) + 10px); right: 16px; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 12.5px; max-width: min(360px, calc(100vw - 32px)); }
.progress span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand-soft); border-top-color: var(--brand-2); animation: rot .8s linear infinite; flex-shrink: 0; }
@keyframes rot { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 48px 20px; color: var(--text-2); }
.empty .ico { margin: 0 auto 14px; width: 60px; height: 60px; border-radius: 18px; background: var(--brand-soft); color: var(--brand-2); }
.empty .ico svg.i { width: 28px; height: 28px; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }
.dropzone { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(10, 8, 30, .78); backdrop-filter: blur(6px); }
.dropzone div { padding: 50px 70px; border-radius: 28px; border: 2px dashed var(--brand-2); text-align: center; font-size: 18px; font-weight: 570; color: #fff; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--text-2); flex-wrap: wrap; margin: 4px 0 12px; }
.crumbs button { color: var(--text-2); font-weight: 540; padding: 4px 6px; border-radius: 8px; }
@media (hover: hover) { .crumbs button:hover { background: var(--panel-2); color: var(--text); } }
.crumbs .cur { color: var(--text); font-weight: 570; padding: 4px 6px; }
.toolbar { display: flex; gap: 8px; align-items: center; margin: 14px 0; }
.toolbar .search { flex: 1; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.seg button { width: 36px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--text-3); }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.seg svg.i { width: 18px; height: 18px; }
.settings-group { margin-bottom: 26px; }
.settings-group > h2 { font-size: 13px; font-weight: 620; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px 4px; }
.row .ico.c-brand { background: var(--brand-soft); color: var(--brand-2); }
.row .ico.c-ok { background: var(--ok-soft); color: var(--ok); }
.row .ico.c-warn { background: var(--warn-soft); color: var(--warn); }
.row .ico.c-bad { background: var(--bad-soft); color: var(--bad); }
.note-box { padding: 12px 14px; border-radius: var(--r-md); font-size: 13px; line-height: 1.5; background: var(--panel-2); color: var(--text-2); border: 1px solid var(--line); }
.note-box.warn { background: var(--warn-soft); color: var(--text); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.note-box.brand { background: var(--brand-soft); color: var(--text); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.test-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.test-row:last-child { border-bottom: 0; }
.test-row .r { margin-left: auto; flex-shrink: 0; }
.bar { height: 8px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #a07bff); border-radius: 4px; }
.beta-tag { font-size: 10px; font-weight: 620; letter-spacing: .08em; padding: 3px 6px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-2); vertical-align: 3px; margin-left: 6px; }
.fab { position: fixed; right: 28px; bottom: 28px; z-index: 30; }
.mt0 { margin-top: 0 !important; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.flex { display: flex; align-items: center; gap: 10px; } .between { justify-content: space-between; } .wrapf { flex-wrap: wrap; }
.center { text-align: center; }

@media (min-width: 900px) { .flow { grid-template-columns: repeat(4, 1fr); } }

.two-col > div { min-width: 0; }
@media (max-width: 959px) {
  .progress { top: auto; bottom: calc(var(--tab-h) + var(--sab) + 12px); right: 50%; transform: translateX(50%); }
  .toast { bottom: calc(var(--tab-h) + var(--sab) + 64px); }
}
@media (max-height: 860px) and (max-width: 600px) {
  .auth h1 { margin: 16px 0 6px; }
  .auth p.lead { margin-bottom: 18px; }
  .logo { width: 64px; height: 64px; border-radius: 20px; }
  .features { gap: 8px; margin-bottom: 18px; }
  .feature { padding: 11px 12px; }
  .feature span { font-size: 12.5px; }
}


/* ---------- touch & performance pass ---------- */
html { touch-action: manipulation; }
button, a, label, .tab, .key, [data-open], [data-nav] { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.view { overscroll-behavior-y: contain; }
.sheet { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; will-change: transform; }
.detail-body, .preview, .chat { overscroll-behavior: contain; }
/* instant press feedback on everything tappable */
.tile, .row, .folder-tile, .cat, .menu-item, .agent, .chip, .act, .sug, .tab, .attn, .icon-btn, .side-item, .crumbs button, .seg button { transition: transform .1s ease, background-color .12s ease, border-color .12s ease; }
.tile:active, .folder-tile:active, .cat:active, .menu-item:active, .agent:active, .attn:active { transform: scale(.975); }
.row:active, .side-item:active { background: var(--panel-2); }
.chip:active, .act:active, .sug:active, .icon-btn:active, .seg button:active { transform: scale(.94); }
.tab:active svg { transform: scale(.88); }
.tab svg { transition: transform .1s ease; }
.key.down { background: var(--panel-3); transform: scale(.94); transition: none; }
/* touch devices: drop expensive blur, keep it crisp */
@media (hover: none) {
  .tabbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg-elev); }
  .tile:hover { transform: none; }
}
/* long lists only paint what is on screen */
.list > .row { content-visibility: auto; contain-intrinsic-size: auto 64px; }
.grid > .tile { content-visibility: auto; contain-intrinsic-size: auto 200px; }
/* screen transitions */
.host.enter { animation: hostIn .16s ease-out; }
@keyframes hostIn { from { opacity: 0; transform: translateY(4px); } }
.scrim.out { animation: fadeOut .17s ease-in forwards; pointer-events: none; }
.scrim.out .sheet { animation: down .17s ease-in forwards; }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes down { to { transform: translateY(60px); opacity: .4; } }
.sheet.dragging { transition: none !important; animation: none; }
.sheet.snap { transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.preview .page-ph { background: #fff; border-radius: 6px; box-shadow: 0 4px 20px rgba(0,0,0,.35); max-width: 100%; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- home: attention, pinned, categories ---------- */
.attn-list { display: flex; flex-direction: column; gap: 8px; }
.attn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); text-align: left; }
.attn .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--warn-soft); color: var(--warn); }
.attn.bad .ico { background: var(--bad-soft); color: var(--bad); }
.attn.brand .ico { background: var(--brand-soft); color: var(--brand-2); }
.attn.ok .ico { background: var(--ok-soft); color: var(--ok); }
.attn .body { flex: 1; min-width: 0; }
.attn .t { font-weight: 540; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attn .s { font-size: 12.5px; color: var(--text-2); }
.attn.bad .s { color: var(--bad); }
.attn .chev { color: var(--text-3); width: 18px; height: 18px; }
.pin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 640px) { .pin-grid { grid-template-columns: repeat(4, 1fr); } }
.pin-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); min-width: 0; transition: transform .1s ease; }
.pin-tile:active { transform: scale(.95); }
.pin-tile .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.pin-tile .t { font-size: 12.5px; font-weight: 540; text-align: center; width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; word-break: break-word; }
.pin-empty { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); color: var(--text-2); font-size: 13.5px; }
.pin-empty svg { color: var(--brand-2); flex-shrink: 0; }
.cat-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 520px) { .cat-mini { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .cat-mini { grid-template-columns: repeat(3, 1fr); } }
.cat-mini.compact { margin-bottom: 14px; }
.cm { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); text-align: left; min-width: 0; transition: transform .1s ease; }
.cm:active { transform: scale(.96); }
.cm .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.cm .ico svg.i { width: 17px; height: 17px; }
.cm .body { min-width: 0; display: flex; flex-direction: column; }
.cm b { font-size: 13.5px; font-weight: 540; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm span { font-size: 11.5px; color: var(--text-3); }
.cm.zero { opacity: .55; }
.chip.zero { opacity: .6; }
.name-edit { display: flex; gap: 8px; align-items: center; }
.name-edit .input { height: 44px; }
.added-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.added-row:last-child { border-bottom: 0; }
.added-row .meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--text-3); margin-top: 6px; }
.rename-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--panel-2); color: var(--text-2); font-size: 12.5px; font-weight: 540; }
.rename-btn svg.i { width: 15px; height: 15px; }
.afacts { margin: 10px 0 2px; }
.afacts dd { display: flex; align-items: center; gap: 6px; word-break: break-word; }
.copy-mini { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--text-3); background: var(--panel-2); flex-shrink: 0; }
.copy-mini svg.i { width: 14px; height: 14px; }
.sugs.left { justify-content: flex-start; }

/* ---------- visual audit fixes ---------- */
.hero-ask .ph { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast.top { bottom: auto; top: calc(var(--sat) + 14px); }
.added-row .meta svg.i { width: 14px; height: 14px; color: var(--brand-2); }
.added-row .meta b { color: var(--text-2); }
#vres > .cat-mini { margin-top: 12px; }
.cm .ico, .pin-tile .ico, .attn .ico { flex-shrink: 0; }
.h-sec { min-height: 22px; }
.attn-list + .h-sec, .pin-grid + .h-sec, .pin-empty + .h-sec { margin-top: 26px; }
.toast { animation: toastIn .2s cubic-bezier(.2, .8, .2, 1); width: max-content; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- voice + document answers ---------- */
.composer .mic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line); flex-shrink: 0; transition: color .15s, background .15s; }
.composer .mic:hover { color: var(--brand-2); }
.composer .mic.cancel { color: var(--text-2); }
.composer.rec { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow); }
.recbar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 6px; }
.recbar.busy { justify-content: center; color: var(--text-2); }
.recbar .dot { width: 10px; height: 10px; border-radius: 50%; background: #f43f5e; flex-shrink: 0; animation: recpulse 1.2s ease-in-out infinite; }
@keyframes recpulse { 50% { opacity: .35; transform: scale(.8); } }
.recbar .lvl { flex: 1; min-width: 0; height: 28px; display: flex; align-items: center; gap: 3px; overflow: hidden; }
.recbar .lvl b { flex: 1; min-width: 2px; max-width: 5px; height: 100%; border-radius: 3px; background: var(--brand-2); transform: scaleY(.12); transition: transform .08s linear; }
.recbar .rtime { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vn .recbar { height: 64px; padding: 0 14px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); }
.vn .recbar .lvl { height: 40px; }
.msg-u .vmark { display: inline-grid; vertical-align: -2px; margin-right: 6px; opacity: .8; }
.msg-u .vmark svg.i { width: 14px; height: 14px; }
.icon-btn.on { color: var(--brand-2); background: var(--brand-soft); border-color: transparent; }
.foot-note .say { margin-left: auto; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3); }
.foot-note .say:hover { color: var(--brand-2); background: var(--panel-2); }
.foot-note .say svg.i { width: 15px; height: 15px; }
.dcards { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.dcard { border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel-2); overflow: hidden; }
.dcard .dhead { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left; }
.dcard .dhead .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.dcard .dt { flex: 1; min-width: 0; }
.dcard .dt b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcard .dt span { display: block; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcard .dacts { display: flex; border-top: 1px solid var(--line); }
.dcard .dacts button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; font-size: 13px; font-weight: 540; color: var(--text-2); }
.dcard .dacts button + button { border-left: 1px solid var(--line); }
.dcard .dacts button.on { color: var(--brand-2); background: var(--brand-soft); }
.dcard .dacts svg.i { width: 16px; height: 16px; }
.space-tag { display: inline-block; font-size: 10.5px; font-weight: 620; letter-spacing: .02em; padding: 2px 7px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-2); flex-shrink: 0; }
.src .space-tag { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .recbar .dot { animation: none; } .recbar .lvl b { transition: none; } }

/* ---------- spaces, companies, add menu, records ---------- */
.space-switch { display: flex; padding: 3px; gap: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; margin: 4px 0 12px; }
.space-switch button { flex: 1; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 570; font-size: 14px; color: var(--text-2); transition: background-color .15s, color .15s; }
.space-switch button svg.i { width: 17px; height: 17px; }
.space-switch button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.sidebar .space-switch { margin: 0 4px 14px; }
.company-bar { margin-bottom: 12px; }
.chip.add { color: var(--brand-2); border-style: dashed; }
.chip svg.i { width: 15px; height: 15px; }
.tagchip { color: var(--text-2); }
.add-sheet { max-width: 640px; }
.add-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 520px) { .add-grid { grid-template-columns: repeat(4, 1fr); } }
.add-grid.main { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 520px) { .add-grid.main { grid-template-columns: repeat(4, 1fr); } }
.add-tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 7px; padding: 14px 6px 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-align: center; min-width: 0; transition: transform .1s ease, background-color .12s; }
.add-tile:active { transform: scale(.95); background: var(--panel-2); }
@media (hover: hover) { .add-tile:hover { border-color: var(--line-2); } }
.add-tile .ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); }
.add-tile b { font-size: 12.5px; font-weight: 540; line-height: 1.25; }
.add-tile span { font-size: 11px; color: var(--text-3); line-height: 1.3; }
.add-grid.main .add-tile { flex-direction: row; justify-content: flex-start; text-align: left; padding: 12px; }
.add-grid.main .add-tile > b, .add-grid.main .add-tile > span { display: block; }
.add-grid.main .add-tile { display: grid; grid-template-columns: 42px 1fr; column-gap: 10px; align-items: center; }
.add-grid.main .add-tile .ico { grid-row: span 2; }
.add-sec { font-size: 11.5px; font-weight: 620; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 18px 2px 8px; }
.secret-wrap { position: relative; }
.secret-wrap .input { padding-right: 48px; }
.secret-wrap .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; }
.secret-in { font-family: var(--mono); -webkit-text-security: disc; }
.secret-in:focus { -webkit-text-security: none; }
.lock-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text-3); font-weight: 540; margin-left: 4px; }
.lock-tag svg.i { width: 12px; height: 12px; }
.rec { width: 100%; max-width: 560px; margin: 0 auto; padding: 16px; }
.rec-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.rec-head .ico { background: var(--brand-soft); color: var(--brand-2); }
.rec-fields { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.rf { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "k acts" "v acts"; column-gap: 8px; padding: 11px 10px 11px 14px; border-bottom: 1px solid var(--line); align-items: center; }
.rf:last-child { border-bottom: 0; }
.rf .k { grid-area: k; font-size: 12px; color: var(--text-3); font-weight: 540; }
.rf .v { grid-area: v; font-size: 15px; word-break: break-word; min-width: 0; }
.rf .v.multi { white-space: pre-wrap; }
.rf.secret .v { font-family: var(--mono); letter-spacing: .04em; }
.rf .acts { grid-area: acts; display: flex; gap: 2px; }
.rf .acts .icon-btn { width: 38px; height: 38px; }
.drop-on { outline: 2px dashed var(--brand); outline-offset: 2px; background: var(--brand-soft) !important; }
.dragging-item .folder-tile, .dragging-item .crumbs button { transition: background-color .1s; }
.menu-item.on { border-color: var(--brand); }
.menu-item.danger b, .menu-item.danger .ico { color: var(--bad); }
.added-cat { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.added-cat .select.sm { width: auto; max-width: 100%; height: 36px; font-size: 13px; padding: 0 30px 0 12px; }
.sug-space .rename-btn { color: var(--brand-2); background: var(--brand-soft); }
.subchips { margin-top: -4px; }
  .cm.more .ico { background: var(--panel-2); color: var(--text-2); }
@media (max-width: 519px) { .add-grid.main > :last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* ---------- splash (static in index.html, so it paints before any script runs) ---------- */
#splash { position: fixed; inset: 0; z-index: 400; background: var(--bg); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(var(--sat) + 24px) 24px calc(var(--sab) + 28px); overflow: hidden; animation: spFailsafe .6s ease 9s forwards; }
#splash .sp-glow { position: absolute; left: 50%; top: 42%; width: 120vmax; height: 120vmax; max-width: 900px; max-height: 900px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, var(--brand-glow), transparent 70%); opacity: .7; pointer-events: none; animation: spGlow 2.4s ease-in-out infinite alternate; }
#splash .sp-center { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; margin: auto 0; }
#splash .sp-logo { width: 88px; height: 88px; border-radius: 28px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #8a7bff, #5a3df0 60%, #3b22c9); box-shadow: 0 22px 60px var(--brand-glow), inset 0 1px 0 rgba(255,255,255,.25); animation: spLogo .6s cubic-bezier(.2, .8, .2, 1) both; }
#splash .sp-logo svg { width: 46px; height: 46px; }
#splash .sp-name { margin-top: 22px; font-size: 32px; font-weight: 620; letter-spacing: -.035em; animation: spUp .5s .12s cubic-bezier(.2, .8, .2, 1) both; }
#splash .sp-tag { margin-top: 6px; font-size: 15px; color: var(--text-2); animation: spUp .5s .2s cubic-bezier(.2, .8, .2, 1) both; }
#splash .sp-bar { margin-top: 30px; width: 120px; height: 3px; border-radius: 3px; background: var(--panel-3, rgba(127,127,127,.2)); overflow: hidden; animation: spUp .4s .3s both; }
#splash .sp-bar i { display: block; width: 40%; height: 100%; border-radius: 3px; background: var(--brand); animation: spBar 1.1s ease-in-out infinite; }
#splash .sp-foot { position: relative; display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); font-weight: 550; animation: spUp .5s .3s both; }
#splash .sp-foot svg { width: 14px; height: 14px; flex-shrink: 0; }
#splash.out { opacity: 0; transition: opacity .8s cubic-bezier(.4, 0, .2, 1); pointer-events: none; }
#splash.out .sp-center { transform: scale(1.08); opacity: 0; transition: transform .8s cubic-bezier(.4, 0, .2, 1), opacity .5s ease; }
#splash.out .sp-foot { opacity: 0; transition: opacity .3s ease; }
body.splash-reveal #root .auth-inner { animation: spReveal .9s .15s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes spReveal { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes spLogo { from { opacity: 0; transform: scale(.82); } }
@keyframes spUp { from { opacity: 0; transform: translateY(8px); } }
@keyframes spGlow { to { opacity: .45; transform: translate(-50%, -50%) scale(.92); } }
@keyframes spBar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes spFailsafe { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  #splash .sp-glow, #splash .sp-logo, #splash .sp-name, #splash .sp-tag, #splash .sp-bar, #splash .sp-foot { animation: none; }
  #splash .sp-bar i { animation: none; width: 100%; opacity: .5; }
  #splash.out { transition-duration: .4s; } #splash.out .sp-center { transform: none; } body.splash-reveal #root .auth-inner { animation: none; }
}


/* =====================================================================
   Hushkey brand layer (beta.11), matched to hushkey.io:
   night background with soft periwinkle/mint light, glass surfaces, hairlines,
   Geist type, serif-italic gradient accent words, white pill CTAs, mono labels.
   ===================================================================== */
html, body { font-feature-settings: "ss01"; letter-spacing: -.011em; }
body { background: var(--bg); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60vmax 40vmax at 50% -12%, rgba(127, 140, 255, .16), transparent 70%), radial-gradient(40vmax 40vmax at 108% 55%, rgba(95, 224, 178, .06), transparent 70%); }
:root[data-theme="light"] body::before { background: radial-gradient(60vmax 40vmax at 50% -12%, rgba(91, 103, 232, .10), transparent 70%), radial-gradient(40vmax 40vmax at 108% 55%, rgba(31, 159, 124, .06), transparent 70%); }
::selection { background: rgba(163, 173, 255, .3); }
.mono, .h-sec h2, .settings-group > h2, .add-sec, .h-sub, .tile .s, .row .s, .cm span, .attn .s, .beta-tag, .pill, .tab, .sp-tag { font-variant-numeric: tabular-nums; }

/* headings: Geist 600, tight; <em> = Instrument Serif italic with brand gradient */
h1, h2, h3, .h-title, .topbar h1, .auth h1, .sheet h3, .side-brand, #splash .sp-name, .empty b, .rec-head b { font-family: var(--font); font-weight: 600; letter-spacing: -.04em; }
h1 em, h2 em, h3 em, .sp-name em { font-family: var(--display); font-style: italic; font-weight: 400; letter-spacing: -.01em; padding-right: .06em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar h1 { font-size: 32px; line-height: 1.08; }
.topbar h1 em { font-size: 1.12em; }
.auth h1 { font-size: 40px !important; line-height: 1.02; margin: 28px 0 12px; letter-spacing: -.05em; }
.auth h1 em { font-size: 1.12em; }
.auth p.lead { color: var(--text-2); font-size: 16px; line-height: 1.5; }
.sheet h3 { font-size: 22px; letter-spacing: -.035em; }
.sheet h3 em { font-size: 1.15em; }
.empty b { font-size: 20px; }
.h-sub { font-family: var(--mono); color: var(--brand); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; margin-bottom: 4px; }

/* labels: mono, periwinkle, tracked */
.h-sec h2, .settings-group > h2, .add-sec { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; color: var(--brand); text-transform: uppercase; }
.h-sec button { color: var(--text-2); font-weight: 500; font-size: 13px; }
.beta-tag { font-family: var(--mono); background: rgba(134, 220, 194, .12); color: var(--mint); border: 0; font-weight: 600; letter-spacing: .1em; font-size: 9.5px; border-radius: 999px; padding: 3px 8px; }
.faint, .tile .s, .row .s, .attn .s, .cm span { color: var(--text-3); }

/* logo: gradient square, black keyhole */
.logo, #splash .sp-logo, .ai-orb, .msg-a .av { background: var(--logo-grad) !important; color: #06070b !important; border: 0; box-shadow: 0 18px 50px -12px rgba(127, 140, 255, .55) !important; }
.logo { width: 72px; height: 72px; border-radius: 20px; }
.logo svg, .ai-orb svg { width: 44px; height: 44px; }
.logo.sm { width: 28px; height: 28px; border-radius: 8px; box-shadow: none !important; }
.logo.sm svg { width: 20px; height: 20px; }
.auth::before { background: radial-gradient(closest-side, rgba(127, 140, 255, .28), transparent); opacity: .8; }

/* buttons: white pills with periwinkle under-glow */
.btn { height: 48px; border-radius: 999px; font-weight: 550; letter-spacing: -.01em; padding: 0 22px; }
.btn.primary { background: var(--cta-bg); color: var(--cta-fg); box-shadow: 0 10px 30px -12px var(--brand-glow); }
.btn.primary:active { transform: scale(.98); }
@media (hover: hover) { .btn.primary:hover { box-shadow: 0 16px 40px -12px var(--brand-glow); } }
.btn.sec, .btn.secondary, .btn.ghost { border-radius: 999px; }
.btn.sec, .btn.secondary { background: var(--glass-2); border: 1px solid var(--line-2); }
.icon-btn { border-radius: 50%; background: var(--glass-2); border: 1px solid var(--line); color: var(--text-2); }
.icon-btn.plain { background: none; border: 0; }
.input, .select, .textarea { background: var(--glass-2); border: 1px solid var(--line-2); border-radius: 14px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* glass surfaces, hairlines */
.card, .tile, .folder-tile, .cat, .cm, .attn, .pin-tile, .menu-item, .add-tile, .rec-fields, .msg-a .bubble, .agent, .feature { background: var(--glass) ; border: 1px solid var(--line); box-shadow: none; }
:root[data-theme="light"] .card, :root[data-theme="light"] .tile, :root[data-theme="light"] .folder-tile, :root[data-theme="light"] .cat, :root[data-theme="light"] .cm, :root[data-theme="light"] .attn, :root[data-theme="light"] .pin-tile, :root[data-theme="light"] .menu-item, :root[data-theme="light"] .add-tile, :root[data-theme="light"] .rec-fields, :root[data-theme="light"] .msg-a .bubble { background: var(--panel); }
.cat::after { display: none; }
.card { border-radius: var(--r-xl); }
.tile, .attn, .pin-tile, .menu-item, .folder-tile, .cat { border-radius: var(--r-lg); }
.cm { border-radius: 16px; padding: 12px; }
.tile .thumb { background: var(--glass-2) !important; }
.tile .fav { color: var(--brand); }
@media (hover: hover) { .tile:hover, .cm:hover, .attn:hover, .menu-item:hover, .add-tile:hover, .folder-tile:hover { border-color: var(--line-2); background: var(--glass-2); } }

/* icon boxes: 44px glass, thin line icons in brand tones */
.ico { background: var(--glass-2); border: 1px solid var(--line); color: var(--brand); border-radius: 12px; }
.attn .ico, .menu-item .ico, .add-tile .ico, .folder-tile .ico, .empty .ico, .rec-head .ico, .flow .n { background: var(--glass-2); border: 1px solid var(--line); color: var(--brand); }
.attn .ico { color: var(--warn); } .attn.ok .ico { color: var(--mint); background: var(--glass-2); } .attn.bad .ico { color: var(--bad); } .attn.brand .ico { color: var(--brand); }
.row .ico.c-brand, .row .ico.c-ok, .row .ico.c-warn, .row .ico.c-bad { background: var(--glass-2); border: 1px solid var(--line); }
.cm .ico, .pin-tile .ico, .cat .ico { border: 1px solid var(--line); }
.add-tile .ico { width: 44px; height: 44px; border-radius: 12px; }
svg.i { stroke-width: 1.6; }

/* hero ask: the site's search pill */
.hero-ask { height: 58px; border-radius: 999px; padding: 6px 6px 6px 20px; background: var(--glass-2); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -30px rgba(127, 140, 255, .45); }
.hero-ask .spark { color: var(--brand); }
.hero-ask .go { width: 46px; height: 46px; border-radius: 50%; background: var(--cta-bg); color: var(--cta-fg); }

/* chips, switches, segmented */
.chip { height: 34px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line-2); color: var(--text-2); font-weight: 500; }
.chip.on { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; }
.space-switch { background: var(--glass); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px; }
.space-switch button { border-radius: 999px; height: 36px; font-weight: 550; color: var(--text-2); }
.space-switch button.on { background: var(--sel-bg); color: var(--sel-fg); box-shadow: 0 8px 24px -12px var(--brand-glow); }
.seg { border-radius: 999px; background: var(--glass); border: 1px solid var(--line-2); }
.seg button { border-radius: 999px; }
.seg button.on { background: var(--glass-3); box-shadow: none; color: var(--text); }
.pill { border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: .02em; }
.pill.ok { color: var(--mint); background: rgba(134, 220, 194, .1); border-color: transparent; }
.pill.brand { color: var(--brand); }

/* navigation */
.tabbar { background: rgba(7, 8, 12, .82); border-top: 1px solid var(--line); }
:root[data-theme="light"] .tabbar { background: rgba(246, 247, 251, .9); }
.tab { font-weight: 500; color: var(--text-3); }
.tab.on { color: var(--text); }
.tab.on svg { color: var(--brand); }
.tab-add span { width: 50px; height: 50px; border-radius: 50%; background: var(--cta-bg); color: var(--cta-fg); box-shadow: 0 10px 30px -10px var(--brand-glow); }
.tab-add svg.i { stroke-width: 2; }
.sidebar { background: rgba(11, 12, 18, .6); border-right: 1px solid var(--line); }
:root[data-theme="light"] .sidebar { background: var(--bg-elev); }
.side-brand { font-size: 17px; letter-spacing: -.03em; }
.side-add { border-radius: 999px !important; }
.side-item { border-radius: 12px; }
.side-item.on { background: var(--glass-3); color: var(--text); }
.side-item.on svg { color: var(--brand); }
.side-dot { border-radius: 50% !important; width: 6px !important; height: 6px !important; }

/* sheets: glass panel that rises in */
.scrim { background: rgba(3, 4, 8, .6); }
.sheet { background: #0d0e15; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 28px 28px 0 0; box-shadow: 0 -30px 80px -30px rgba(127, 140, 255, .25); }
:root[data-theme="light"] .sheet { background: #ffffff; }
@media (min-width: 720px) { .sheet { border-radius: 28px; border-bottom: 1px solid var(--line-2); } }
.sheet .grab { width: 36px; height: 4px; background: var(--line-2); }
.add-tile { border-radius: 18px; }
.add-tile b { font-weight: 550; }

/* PIN pad: glass keys */
.key { background: var(--glass-2); border: 1px solid var(--line); font-weight: 400; font-size: 28px; letter-spacing: -.02em; }
.key small { font-family: var(--mono); letter-spacing: .16em; }
.key:active, .key.down { background: var(--glass-3); }
.key.fn { background: none; border: 0; }
.dots i { width: 12px; height: 12px; border: 1px solid var(--text-3); }
.dots i.on { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 12px rgba(163, 173, 255, .6); }

/* Ask */
.msg-u { background: var(--cta-bg); color: var(--cta-fg); border-radius: 20px 20px 6px 20px; }
.msg-a .bubble { border-radius: 6px 20px 20px 20px; background: var(--glass-2); }
.bubble .quote { border-left-color: var(--brand); background: var(--glass); }
.composer { border-radius: 26px; background: var(--glass-2); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -30px rgba(127, 140, 255, .4); }
.bar i { background: var(--grad); }
.agents-hero { background: radial-gradient(120% 140% at 0% 0%, rgba(127, 140, 255, .18), transparent 60%), var(--glass); border: 1px solid var(--line); }

/* toasts: dark glass pill with mint tick */
.toast { border-radius: 999px; background: #14151d; color: var(--text); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -16px rgba(0, 0, 0, .7); font-weight: 500; }
:root[data-theme="light"] .toast { background: #0b0c12; color: #f2f3f7; }
.toast svg.i { color: var(--mint); }

/* motion: sheets rise with the brand ease */
.scrim .sheet { animation-timing-function: var(--ease); }

/* splash = the launch-film title card */
#splash { background: #07080c; color: #f2f3f7; }
#splash .sp-glow { background: radial-gradient(closest-side, rgba(127, 140, 255, .35), transparent 70%); opacity: .9; }
#splash .sp-logo { width: 84px; height: 84px; border-radius: 22px; }
#splash .sp-logo svg { width: 52px; height: 52px; }
#splash .sp-name { font-size: 40px; margin-top: 30px; letter-spacing: -.05em; color: #f2f3f7; }
#splash .sp-name em { font-size: 1.15em; }
#splash .sp-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: #a3adff; margin-top: 12px; }
#splash .sp-bar { height: 2px; width: 72px; margin-top: 34px; background: rgba(255, 255, 255, .08); }
#splash .sp-bar i { background: linear-gradient(90deg, #a3adff, #86dcc2); }
#splash .sp-foot { color: #6d7285; font-weight: 450; }
#splash .sp-foot svg { color: #86dcc2; }
.switch i { background: var(--glass-3); border: 1px solid var(--line); }
.switch input:checked + i { background: var(--mint); border-color: transparent; }
.switch i::after { background: #07080c; box-shadow: none; }
.switch input:not(:checked) + i::after { background: var(--text-3); }
.composer .send, .composer button[type=submit] { border-radius: 50%; }

/* exact hushkey.io mark: keyhole fills the tile at the site's proportions */
.logo svg, .logo.sm svg, #splash .sp-logo svg { width: 100% !important; height: 100% !important; }
.logo { border-radius: 28%; } .logo.sm { border-radius: 28%; } #splash .sp-logo { border-radius: 28%; }
.side-brand .labs { color: var(--text-3); font-weight: 450; margin-left: 4px; }
.recbar.live .livetext { flex: 1; min-width: 0; font-size: 15px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recbar.live .livetext.heard { color: var(--text); }
.recbar .vmode { flex-shrink: 0; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 11.5px; font-weight: 650; color: var(--brand-2); background: var(--brand-soft); }
.vn .vn-text { margin-top: 10px; min-height: 96px; max-height: 40vh; overflow-y: auto; padding: 12px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); font-size: 16px; line-height: 1.5; white-space: pre-wrap; }
.vn .vn-text:empty::before { content: 'Your words will appear here…'; color: var(--text-3); }
.vn .recbar.live { height: 40px; }

/* assistant answers: steps, notes and action buttons (beta.15) */
.asteps { margin: 10px 0 2px; padding-left: 0; list-style: none; counter-reset: st; display: grid; gap: 8px; }
.asteps li { counter-increment: st; position: relative; padding-left: 32px; line-height: 1.45; }
.asteps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft, rgba(212,175,95,.16)); color: var(--brand-2, var(--brand)); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.anote { margin-top: 10px; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.aacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.vlist .menu-item.on { border-color: var(--brand); }
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 90; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line, rgba(255,255,255,.08)); box-shadow: 0 12px 40px rgba(0,0,0,.35); font-size: 14px; max-width: calc(100vw - 32px); }
.update-bar svg.i { width: 16px; height: 16px; color: var(--brand-2); flex: none; }
@media (min-width: 900px) { .update-bar { bottom: 24px; } }

/* ---------- beta.17: calmer mobile ---------- */
.filterbar { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; min-width: 0; }
.fpill { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line-2); color: var(--text-2); font-size: 14px; font-weight: 550; min-width: 0; max-width: 62%; flex: 0 1 auto; transition: background-color .15s, border-color .15s; }
.fpill.on { background: var(--glass-3); color: var(--text); border-color: rgba(163, 173, 255, .32); }
.fpill .fl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fpill .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.fpill svg.i { width: 15px; height: 15px; flex: none; color: var(--text-3); }
.fpill select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: pointer; appearance: none; -webkit-appearance: none; border: 0; }
.fpill:active { background: var(--glass-2); }
.fpill:has(select:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.fclear { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); border: 1px solid var(--line); margin-left: auto; }
.fclear svg.i { width: 16px; height: 16px; }

@media (max-width: 959px) {
  :root { --tab-h: 78px; }
  .crumbs.at-root { display: none; }
  .topbar { min-height: 46px; margin-bottom: 2px; }
  .topbar h1 { font-size: 30px; }
  .space-switch { margin: 2px 0 10px; border-radius: 999px; }
  .space-switch button { height: 34px; border-radius: 999px; font-size: 13.5px; }
  .toolbar { margin: 10px 0 12px; }

  /* footer: a solid floating capsule that sits above the home indicator */
  .tabbar { left: 12px; right: 12px; bottom: calc(var(--sab) + 10px); height: 64px; padding: 0 6px; border-radius: 32px; align-items: center;
    background: #111219; border: 1px solid rgba(255, 255, 255, .08); border-top: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 20px 44px -14px rgba(0, 0, 0, .85), 0 2px 10px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
    backdrop-filter: none; -webkit-backdrop-filter: none; }
  :root[data-theme="light"] .tabbar { background: #ffffff; border-color: rgba(12, 14, 24, .08); box-shadow: 0 16px 40px -14px rgba(20, 24, 50, .28), 0 1px 4px rgba(20, 24, 50, .08); }
  .tab { height: 52px; border-radius: 26px; gap: 4px; font-size: 10.5px; letter-spacing: .02em; }
  .tab svg.i { width: 22px; height: 22px; stroke-width: 1.7; }
  .tab.on { color: var(--text); }
  .tab.on svg.i { stroke-width: 2; }
  .tab-add { flex: 0 0 64px; }
  .tab-add button { display: grid; place-items: center; }
  .tab-add span { width: 46px; height: 46px; box-shadow: 0 8px 22px -8px rgba(163, 173, 255, .6), 0 0 0 1px rgba(255, 255, 255, .5) inset; }
  .tab-add svg.i { width: 22px; height: 22px; }
  /* content fades out under the capsule instead of being cut by it */
  .main::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--sab) + 96px); pointer-events: none; z-index: 39;
    background: linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 85%, transparent) 45%, transparent 100%); }
}
@media (min-width: 960px) { .main::after { display: none; } }

/* ---------- beta.18: sheets on phones ---------- */
/* Sheets stop below the status bar / notch, and the floating footer steps aside while one is open. */
.sheet { max-height: calc(100vh - var(--sat) - 16px); max-height: calc(100dvh - var(--sat) - 16px); }
body:has(.scrim) .tabbar, body:has(.scrim) .main::after { opacity: 0; visibility: hidden; transition: opacity .15s, visibility 0s .15s; }
.sheet-top { position: sticky; top: -10px; z-index: 2; display: flex; align-items: center; gap: 10px; margin: -10px -20px 6px; padding: 14px 14px 10px 20px; background: inherit; border-radius: 28px 28px 0 0; }
.sheet-top h3 { flex: 1; margin: 0; min-width: 0; }
.sheet-top .close-x { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--glass-2); border: 1px solid var(--line); }
.sheet-top .close-x svg.i { width: 18px; height: 18px; }
.add-sheet .grab { margin-bottom: 0; }
.add-grid.recs > .extra { display: none !important; }
.add-grid.recs.all > .extra { display: contents !important; }
.more-types { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 40px; margin-top: 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; font-weight: 550; }
.more-types svg.i { width: 15px; height: 15px; }
@media (max-width: 519px) {
  .add-grid.recs .add-tile { padding: 11px 6px 10px; gap: 6px; }
  .add-grid.recs .add-tile .ico { width: 36px; height: 36px; border-radius: 11px; }
  .add-grid.main .add-tile { padding: 10px 12px; }
}

/* ---------- beta.19: records, custom fields, folders ---------- */
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.linkish { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
input.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--glass-3); border: 1px solid var(--line-2); position: relative; flex: none; cursor: pointer; transition: background .18s; margin: 0; }
input.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-3); transition: transform .18s, background .18s; }
input.switch:checked { background: var(--mint); border-color: transparent; }
input.switch:checked::after { transform: translateX(18px); background: #07080c; }
.switch-row { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; color: var(--text-2); }
.editor-sheet { padding-bottom: 0 !important; }
.editor-sheet form { display: block; }
.ed-foot { position: sticky; bottom: 0; margin: 18px -20px 0; padding: 12px 20px calc(var(--sab) + 14px); background: linear-gradient(to top, #0d0e15 70%, transparent); }
:root[data-theme="light"] .ed-foot { background: linear-gradient(to top, #fff 70%, transparent); }
.field .flabel { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.field .req { color: var(--brand); font-style: normal; margin-left: 2px; }
.fmenu { margin-left: auto; width: 30px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3); }
.fmenu svg.i { width: 16px; height: 16px; }
.field .help { display: block; margin-top: 5px; font-size: 12px; color: var(--text-3); }
.field .err { display: block; margin-top: 5px; font-size: 12.5px; color: var(--bad); }
.field.has-err .input, .field.has-err .select, .field.has-err .textarea { border-color: var(--bad); }
.field.is-hidden { opacity: .6; }
.ai-tag.conf-mid { color: var(--warn); background: var(--warn-soft); }
.ai-tag.conf-lo { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.more-fields { margin: 4px 0 12px; }
.more-fields > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; font-weight: 560; color: var(--text-2); }
.more-fields > summary::-webkit-details-marker { display: none; }
.more-fields > summary::after { content: "+"; margin-left: auto; font-size: 18px; color: var(--text-3); }
.more-fields[open] > summary::after { content: "–"; }
.ed-sec { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.ed-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ed-h b { font-size: 14.5px; font-weight: 600; }
.ed-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; gap: 0; } }
.multi { display: flex; flex-wrap: wrap; gap: 6px; }
.mchip { position: relative; }
.mchip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mchip span { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); }
.mchip input:checked + span { background: var(--glass-3); color: var(--text); border-color: rgba(163, 173, 255, .4); }
.link-field { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lchip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 32px; padding: 0 6px 0 10px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); font-size: 13px; color: var(--text); }
.lchip svg.i { width: 14px; height: 14px; color: var(--brand); flex: none; }
.lchip button { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); }
.lchip button svg.i { color: inherit; width: 12px; height: 12px; }
button.lchip { padding-right: 12px; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.lrow { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.lrow .input { min-width: 110px; flex: 1; height: 40px; font-size: 14px; }
.att-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.att { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); font-size: 13.5px; text-align: left; width: 100%; }
.att .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att svg.i { width: 18px; height: 18px; color: var(--brand); flex: none; }
.tbl-wrap { overflow-x: auto; max-width: 100%; }
.tbl { border-collapse: collapse; font-size: 13px; width: 100%; }
.tbl th, .tbl td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { color: var(--text-3); font-weight: 500; font-size: 12px; }
.hist { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.hist span:first-child { flex: 1; }
.suggest-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border-radius: 16px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.suggest-card .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--glass-3); color: var(--brand); flex: none; }
.suggest-card .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.suggest-card b { font-size: 14.5px; } .suggest-card span span { font-size: 12.5px; color: var(--text-2); }
.suggest-card > svg.i { color: var(--text-3); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { position: relative; }
.sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sw i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; }
.sw.ic i { border-radius: 11px; background: var(--glass-2); color: var(--text-2); }
.sw.ic i svg.i { width: 17px; height: 17px; }
.sw input:checked + i { border-color: var(--text); }
.secret-wrap textarea.secret-in:not(.masked) { -webkit-text-security: none; }
.add-grid.two { grid-template-columns: 1fr 1fr !important; }
.rec-head .pill { height: 26px; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; }
.rec-head .pill svg.i { width: 13px; height: 13px; }

/* Ask welcome */
.ai-empty .ai-hi { margin: 0 0 4px; font-size: 26px; letter-spacing: -.035em; line-height: 1.15; }
.ai-empty .ai-by { margin: 0 0 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); }
.ai-empty .ai-line { margin: 0 auto 6px; max-width: 400px; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.ai-empty .ai-tag-line { margin: 0 auto 16px; font-size: 15px; font-weight: 560; color: var(--text); }
.ai-empty .ai-hi em, .ai-empty .ai-tag-line em { font-family: var(--display); font-style: italic; font-weight: 400; font-size: 1.15em; background: linear-gradient(90deg, #d6dbff, #a3adff, #86dcc2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-trust { display: flex; align-items: flex-start; gap: 10px; max-width: 420px; margin: 0 auto 18px; padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); text-align: left; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.ai-trust svg.i { width: 16px; height: 16px; color: var(--mint); flex: none; margin-top: 1px; }
.ai-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 520px; margin: 0 auto 20px; padding: 0; text-align: left; }
.ai-steps li { counter-increment: s; padding: 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ai-steps li::before { content: "0" counter(s); font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--brand); }
.ai-steps b { font-size: 13.5px; font-weight: 600; }
.ai-steps span { font-size: 12px; line-height: 1.4; color: var(--text-3); }
@media (max-width: 520px) { .ai-steps { gap: 6px; margin-bottom: 16px; } .ai-steps li { padding: 10px; } .ai-steps b { font-size: 12.5px; line-height: 1.25; } .ai-steps span { display: none; } .ai-empty .ai-hi { font-size: 23px; } .ai-trust { font-size: 12.5px; padding: 10px 12px; margin-bottom: 14px; } .ai-empty .sugs .sug:nth-child(n+4) { display: none; } }
@media (max-width: 520px) { .ai-empty { padding: 6px 0 12px; } .ai-empty .ai-orb { width: 52px; height: 52px; margin-bottom: 12px; border-radius: 18px; } .ai-empty .ai-orb svg { width: 30px; height: 30px; } .ai-empty .ai-line { font-size: 14px; } .ai-empty .ai-tag-line { margin-bottom: 12px; } }


/* =====================================================================
   Quiet vault (Obsidian Seal), 2026-11: replaces the glass/periwinkle layer.
   Flat surfaces, hairlines, bone on obsidian, seal emerald for "sealed / yours",
   husky blue (#1F78D1) only in the husky's eyes. No gradients, glows or blur.
   Visual layer only.
   ===================================================================== */
:root {
  --bg: #0C0C0D; --bg-elev: #151517; --panel: #151517; --panel-2: #1A1A1D; --panel-3: #1E1E21;
  --glass: #151517; --glass-2: #1A1A1D; --glass-3: #232327;
  --line: #2A2A2E; --line-2: #35353A;
  --text: #ECE7DE; --text-2: #A39E95; --text-3: #85807A;
  --brand: #3FB27F; --brand-2: #4FC08D; --brand-strong: #3FB27F; --mint: #3FB27F; --brand-ink: #0C0C0D;
  --brand-soft: rgba(63, 178, 127, .12); --brand-glow: transparent;
  --grad: none; --logo-grad: #0C0C0D;
  --cta-bg: #ECE7DE; --cta-fg: #0C0C0D; --sel-bg: #ECE7DE; --sel-fg: #0C0C0D;
  --ok: #3FB27F; --ok-soft: rgba(63, 178, 127, .12);
  --warn: #D9A441; --warn-soft: rgba(217, 164, 65, .12);
  --bad: #E5675B; --bad-soft: rgba(229, 103, 91, .12);
  --husky: #1F78D1;
  --r-xl: 24px; --r-lg: 16px; --r-md: 10px; --r-sm: 6px;
  --shadow: 0 16px 40px -16px rgba(0, 0, 0, .7);
  --display: var(--font);
}
:root[data-theme="light"] {
  --bg: #F4F1EB; --bg-elev: #FFFFFF; --panel: #FFFFFF; --panel-2: #ECE8E0; --panel-3: #E4DFD5;
  --glass: #FFFFFF; --glass-2: #F7F5F0; --glass-3: #ECE8E0;
  --line: #DDD7CC; --line-2: #CFC8BB;
  --text: #141414; --text-2: #57534D; --text-3: #6B665F;
  --brand: #1E7A52; --brand-2: #1E7A52; --brand-strong: #1E7A52; --mint: #1E7A52; --brand-ink: #FFFFFF;
  --brand-soft: rgba(30, 122, 82, .10); --brand-glow: transparent;
  --cta-bg: #141414; --cta-fg: #F4F1EB; --sel-bg: #141414; --sel-fg: #F4F1EB;
  --ok: #1E7A52; --ok-soft: rgba(30, 122, 82, .10);
  --warn: #8A5A06; --warn-soft: rgba(138, 90, 6, .10);
  --bad: #B3392F; --bad-soft: rgba(179, 57, 47, .10);
  --shadow: 0 16px 40px -20px rgba(20, 20, 20, .22);
}
html, body { font-feature-settings: normal; letter-spacing: -.006em; }
body::before, :root[data-theme="light"] body::before, .auth::before { display: none; }
::selection { background: rgba(63, 178, 127, .28); }
.tabbar, .dropzone { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.tabbar { background: var(--bg); border-top: 1px solid var(--line); }

/* headings: Geist only; <em> is plain emphasis, no serif, no gradient text */
h1 em, h2 em, h3 em, .sp-name em, .ai-empty .ai-hi em, .ai-empty .ai-tag-line em { font-family: var(--font); font-style: normal; font-weight: inherit; font-size: 1em !important; letter-spacing: inherit; padding: 0; background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--text-2); }
h1, h2, h3, .h-title, .topbar h1, .auth h1, .sheet h3, .side-brand, #splash .sp-name, .empty b, .rec-head b { letter-spacing: -.025em; }
.topbar h1 { font-size: 30px; }
.auth h1 { font-size: 32px !important; line-height: 1.12; letter-spacing: -.03em; }
.h-sub, .h-sec h2, .settings-group > h2, .add-sec { color: var(--text-3); }
.beta-tag { background: var(--brand-soft); color: var(--brand); }

/* the husky: bone face on an obsidian tile, in both themes */
.logo, #splash .sp-logo, .ai-orb, .msg-a .av { background: #0C0C0D !important; color: #ECE7DE !important; border: 1px solid #2A2A2E !important; box-shadow: none !important; }
.logo { border-radius: 20px; }
.logo.sm { border-radius: 8px; }
.logo svg .hk-eye, .ai-orb svg .hk-eye, #splash svg .hk-eye, .side-brand .hk-eye { fill: var(--husky); }
.hk-eye { transform-box: fill-box; transform-origin: center; }
.auth .logo:not(.sm) .hk-eye, #splash .hk-eye, .ai-orb .hk-eye { animation: hkBlink 4.8s ease-in-out infinite; }
@keyframes hkBlink { 0%, 45%, 49%, 100% { transform: scaleY(1); } 47% { transform: scaleY(.08); } }
#splash .sp-glow { display: none; }
#splash .sp-bar i { background: var(--brand); }
@media (prefers-reduced-motion: reduce) { .hk-eye { animation: none !important; } }

/* buttons: bone pill on obsidian (ink on bone in light); no glow */
.btn.primary, .btn.primary:hover { background: var(--cta-bg); color: var(--cta-fg); box-shadow: none !important; }
.btn.danger { box-shadow: none; }
.tab-add span, .space-switch button.on { box-shadow: none !important; }
.hero-ask, .composer { box-shadow: none !important; }
.agents-hero { background: var(--glass) !important; }
.bar i { background: var(--brand) !important; }
.fpill.on, .mchip input:checked + span { border-color: var(--line-2); }
.ed-foot { background: var(--bg-elev) !important; border-top: 1px solid var(--line); }
.sheet, .menu, .toast { box-shadow: var(--shadow); }
.card, .tile, .folder-tile, .cat, .cm, .attn, .pin-tile, .menu-item, .add-tile, .rec-fields, .msg-a .bubble, .agent, .feature { box-shadow: none; }
:focus-visible { outline-color: var(--brand); }
.dots i.on { background: var(--text); border-color: var(--text); box-shadow: none; }

/* Ask (2026-11 spec): one headline, one input, one line of trust */
.ask-empty { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 16px; min-height: 100%; padding: 24px 2px 12px; text-align: left; }
.ask-empty .ai-hi { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -.03em; font-weight: 600; color: var(--text); }
.ask-empty .sugs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; margin: 0; }
.ask-empty .sug { background: var(--glass); border: 1px solid var(--line-2); color: var(--text); border-radius: 999px; padding: 9px 14px; font-size: 14px; }
.ask-trust { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 8px 0 0; font-size: 12.5px; color: var(--text-3); }
.ask-trust svg.i { width: 13px; height: 13px; }
.foot-note:not(:has(button)) { display: none; }
.foot-note { justify-content: flex-end; }

/* unlock moment: husky wakes, blinks, the vault opens */
.unlock-reveal { position: fixed; inset: 0; z-index: 500; pointer-events: none; background: #0C0C0D; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; animation: urOut .4s 1.25s cubic-bezier(.4, 0, .2, 1) both; }
.unlock-reveal .ur-mark { width: 112px; height: 112px; animation: urMark .45s cubic-bezier(.2, .8, .2, 1) both; }
.unlock-reveal .ur-mark svg { width: 100%; height: 100%; }
.unlock-reveal .ur-eye { transform-box: fill-box; transform-origin: center; animation: urEye 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.unlock-reveal .ur-line { margin: 0; font-size: 15px; color: #A39E95; animation: urLine .5s .3s ease-out both; }
@keyframes urOut { to { opacity: 0; } }
@keyframes urMark { from { opacity: 0; transform: scale(.94); } }
@keyframes urEye { 0%, 8% { transform: scaleY(.08); } 30% { transform: scaleY(1); } 62% { transform: scaleY(1); } 68% { transform: scaleY(.08); } 76%, 100% { transform: scaleY(1); } }
@keyframes urLine { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .unlock-reveal { display: none; } }

/* beta.24: the strip under the floating tab bar is solid, so nothing scrolls into view below it
   (on home-indicator iPhones the old 85% fade let cards and buttons show through as a ghost). */
@media (max-width: 959px) {
  .main::after { height: calc(var(--sab) + 104px);
    background: linear-gradient(to top, var(--bg) 0, var(--bg) calc(var(--sab) + 42px), transparent 100%); }
}
