/* Ask Me Beta Diary — shared styles.
   Layout: a field notebook for a product beta. Participants get a dot-grid "diary cover" hero and one
   working column; the admin dashboard gets a sticky app bar with tabs. Entries carry a date gutter. */
:root {
  --bg: #f3f5f8;
  --surface: #fcfcfd;
  --surface-2: #eef1f5;
  --ink: #121a26;
  --ink-2: #4a5464;
  --muted: #6f7988;
  --line: #dde2e9;
  --line-2: #c5ccd7;
  --accent: #0f5257;
  --accent-ink: #ffffff;
  --accent-soft: #dcecec;
  --hero: #0f4b50;
  --hero-ink: #f2fafa;
  --hero-soft: rgba(255,255,255,.13);
  --hero-dot: rgba(255,255,255,.12);
  --hl: #fff0a8;
  --hl-ink: #4a3b00;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s-other: #8a93a1;
  --good: #0ca30c;
  --warn: #fab219;
  --serious: #ec835a;
  --crit: #d03b3b;
  --div-2: #256abf;
  --div-1: #86b6ef;
  --div-0: #a3abb7;
  --good-ink: #006300;
  --crit-ink: #b42323;
  --shadow: 0 1px 2px rgba(18,26,38,.06), 0 4px 16px rgba(18,26,38,.05);
  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117; --surface: #161b22; --surface-2: #1d242e; --ink: #e8ecf2; --ink-2: #b4bcc8; --muted: #8a93a1;
    --line: #262f3b; --line-2: #36414f; --accent: #5fbfc0; --accent-ink: #062224; --accent-soft: #173336;
    --hero: #123a3e; --hero-ink: #eaf6f6; --hero-soft: rgba(255,255,255,.09); --hero-dot: rgba(255,255,255,.08);
    --hl: #4a3f12; --hl-ink: #ffe9a3; --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s-other: #7d8694;
    --good-ink: #3ccf3c; --crit-ink: #f07a7a; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
img, video { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; line-height: 1.15; font-weight: 700; }
h2 { font-size: 1.2rem; line-height: 1.25; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1140px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 780px; }
.center { margin-inline: auto; }
.eyebrow { font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* App bar */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.brand svg { flex: none; color: var(--accent); }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; line-height: 1.1; }
.brand-sub { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .88rem; }
.who { display: inline-flex; gap: 8px; align-items: center; color: var(--ink-2); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { appearance: none; background: none; border: 0; padding: 10px 12px 11px; border-bottom: 2px solid transparent; color: var(--ink-2); cursor: pointer; white-space: nowrap; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab .count { font-family: var(--f-mono); font-size: .7rem; background: var(--surface-2); border-radius: 99px; padding: 1px 7px; color: var(--ink-2); }

main { padding-block: 24px 64px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }

/* Buttons */
.btn { appearance: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 8px; line-height: 1.2; text-decoration: none; }
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.small { padding: 5px 10px; font-size: .82rem; }
.btn.danger { color: var(--crit-ink); }
.btn.armed { background: var(--crit); border-color: var(--crit); color: #fff; }
.linkish { appearance: none; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head p { color: var(--muted); font-size: .85rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.banner { border-radius: var(--r); padding: 12px 14px; background: var(--hl); color: var(--hl-ink); display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: .9rem; }
.banner.info { background: var(--accent-soft); color: var(--ink); }
.empty { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 22px; color: var(--ink-2); background: var(--surface); }
.empty h3 { margin-bottom: 4px; color: var(--ink); }
.loading { padding: 48px 0; color: var(--muted); }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--surface); padding: 14px 16px; min-width: 0; }
.kpi-label { font-size: .78rem; color: var(--muted); font-weight: 500; }
.kpi-value { font-family: var(--f-display); font-size: 1.85rem; font-weight: 600; line-height: 1.1; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.kpi-value small { font-family: var(--f-body); font-size: .85rem; color: var(--muted); font-weight: 500; }
.kpi-sub { font-size: .78rem; color: var(--ink-2); margin-top: 2px; }

/* Chips & pills */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.team-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--s-other)); }
.type-chip { font-family: var(--f-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; background: transparent; }
.chip.flag { background: transparent; border-color: var(--crit); color: var(--crit-ink); font-weight: 600; }
.chip.thanks { background: var(--accent-soft); color: var(--ink); border-color: transparent; }
.chip.due { background: var(--hl); color: var(--hl-ink); border-color: transparent; font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 500; color: var(--ink); white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--s-other)); flex: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; padding: 2px 4px 2px 9px; border-radius: 6px; background: var(--hl); color: var(--hl-ink); }
.tag button { appearance: none; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 4px; font-size: .9rem; line-height: 1; opacity: .7; }
.tag button:hover { opacity: 1; }
.av { width: 26px; height: 26px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; color: #fff; font-size: .66rem; font-weight: 700; letter-spacing: .02em; background: var(--c, var(--s-other)); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .field > .label { font-weight: 600; font-size: .95rem; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: -4px; }
.input, textarea.input, select.input { width: 100%; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); padding: 9px 11px; min-width: 0; }
textarea.input { min-height: 84px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 99px; padding: 7px 13px; font-size: .88rem; cursor: pointer; background: var(--surface); }
.choice input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.faces { display: flex; gap: 6px; flex-wrap: wrap; }
.faces .choice span { flex-direction: column; border-radius: 10px; padding: 8px 10px 6px; gap: 2px; min-width: 76px; font-size: .74rem; color: var(--ink-2); }
.faces .choice input:checked + span { color: var(--accent-ink); }
.nps { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
.nps .choice span { justify-content: center; border-radius: 6px; padding: 8px 0; width: 100%; }
.nps-ends { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); }
.form-error { color: var(--crit-ink); font-size: .86rem; font-weight: 500; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--accent); }
.warn-note { font-size: .82rem; color: var(--hl-ink); background: var(--hl); border-radius: 6px; padding: 6px 10px; }
.remove-req { font-size: .85rem; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Attachments */
.attach { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r); padding: 16px; margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.attach legend { font-weight: 600; padding: 0 6px; margin-left: -6px; font-size: .95rem; }
.drop { position: relative; border: 1.5px dashed var(--line-2); border-radius: 10px; background: var(--surface); padding: 16px; display: flex; gap: 14px; align-items: center; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.drop b { display: block; }
.drop span { font-size: .82rem; color: var(--muted); }
.att-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.att-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.att-list .pv { width: 64px; height: 44px; border-radius: 5px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.att-list .pv img, .att-list .pv video { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-list .nm { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.att-list .sz { font-size: .74rem; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-add { display: flex; gap: 8px; }
.link-add .input { flex: 1; }
.att-msg { font-size: .84rem; color: var(--crit-ink); }

/* Participant: hero */
.hero { border-radius: 16px; padding: 22px; color: var(--hero-ink); background-color: var(--hero); background-image: radial-gradient(var(--hero-dot) 1.2px, transparent 1.6px); background-size: 16px 16px; display: flex; flex-direction: column; gap: 18px; }
.hero .eyebrow { color: var(--hero-ink); opacity: .78; }
.hero h1 { font-size: 1.9rem; }
.hero p { color: var(--hero-ink); opacity: .88; }
.qf-label { font-size: .85rem; font-weight: 600; opacity: .95; }
.quick-faces { display: flex; gap: 8px; margin-top: 8px; }
.qf { appearance: none; flex: 1 1 0; min-width: 0; border: 1px solid rgba(255,255,255,.22); background: var(--hero-soft); color: var(--hero-ink); border-radius: 12px; padding: 9px 4px 7px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font-size: .7rem; text-align: center; overflow-wrap: anywhere; transition: transform .15s, background .15s; }
.qf:hover { transform: translateY(-2px); background: rgba(255,255,255,.22); }
.qf:focus-visible { outline: 2px solid var(--hero-ink); }
@media (max-width: 480px) { .qf-t { display: none; } .qf { padding: 10px 4px; } }
.journey { display: flex; align-items: flex-start; }
.jstep { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; font-size: .72rem; font-family: var(--f-mono); }
.jstep::before { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: rgba(255,255,255,.25); }
.jstep:first-child::before { display: none; }
.jstep.past::before, .jstep.now::before { background: var(--hero-ink); }
.jdot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); background: var(--hero); position: relative; z-index: 1; display: grid; place-items: center; }
.jstep.now .jdot { border-color: var(--hero-ink); box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
.jstep.now .jdot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hero-ink); }
.jstep .here { font-family: var(--f-body); font-weight: 600; font-size: .7rem; }
.jstep.done .jdot { background: var(--hero-ink); border-color: var(--hero-ink); color: var(--hero); }
.jstep.now.done .jdot::after { display: none; }
.jstep.missed .jdot { background: var(--hero); border-style: dashed; border-color: rgba(255,255,255,.6); }

/* Participant: stats, actions, badges, entries */
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .stats3 { grid-template-columns: minmax(0, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; gap: 12px; align-items: center; min-width: 0; }
.stat .big { font-family: var(--f-display); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.stat .lbl { font-size: .8rem; color: var(--ink-2); }
.stat .ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--accent); }
.stat .ico.hot { background: var(--hl); color: var(--hl-ink); }
.ring { transform: rotate(-90deg); }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .actions { grid-template-columns: minmax(0, 1fr); } }
.action { appearance: none; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); min-width: 0; transition: transform .15s, border-color .15s; color: inherit; }
.action:hover { border-color: var(--ink-2); transform: translateY(-1px); }
.action.main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.action.main .ink2 { color: var(--accent-ink); opacity: .85; }
.action.wide { grid-column: 1 / -1; }
.action-title { font-family: var(--f-display); font-size: 1.15rem; font-weight: 600; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.memo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; gap: 12px; }
.memo .ico { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.memo p { white-space: pre-wrap; overflow-wrap: anywhere; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 10px; }
.badge { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px 10px 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.badge .medal { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 2px solid var(--accent); }
.badge b { font-size: .86rem; }
.badge span { font-size: .74rem; color: var(--muted); line-height: 1.3; }
.badge.locked { border-style: dashed; background: transparent; }
.badge.locked .medal { background: transparent; color: var(--muted); border: 2px dashed var(--line-2); }
.badge.locked b { color: var(--ink-2); }
.mini-entry { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.mini-entry:first-child { border-top: 0; }
.mini-entry .when { font-family: var(--f-mono); font-size: .74rem; color: var(--muted); padding-top: 2px; }
.mini-entry .what { min-width: 0; overflow-wrap: anywhere; }
.mini-entry .row { gap: 6px; margin-top: 6px; }
@media (max-width: 480px) { .mini-entry { grid-template-columns: minmax(0, 1fr) auto; } .mini-entry .when { grid-column: 1 / -1; } }
.diary-head { display: flex; flex-direction: column; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }

/* Celebration */
.celebrate { position: relative; overflow: hidden; text-align: center; padding: 40px 20px 32px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.celebrate .tick { width: 76px; height: 76px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; animation: pop .45s cubic-bezier(.2,1.6,.4,1) both; }
.celebrate h1 { font-size: 2rem; }
.celebrate .new-badge { display: flex; gap: 12px; align-items: center; text-align: left; background: var(--hl); color: var(--hl-ink); border-radius: 12px; padding: 10px 14px; animation: rise .5s .25s both; }
.celebrate .new-badge .medal { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--accent); flex: none; }
.cf { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; background: var(--c); animation: fall var(--d) var(--delay) ease-in both; pointer-events: none; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(420px) rotate(var(--rot)); opacity: 0; } }

/* Entries feed (admin) */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.filters select.input, .filters input.input { width: auto; padding: 6px 9px; font-size: .86rem; }
.filters input[type="search"] { flex: 1 1 180px; min-width: 140px; }
.entry { display: grid; grid-template-columns: 104px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.entry-gutter { padding: 14px 12px; border-right: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); }
.entry-gutter .d { font-family: var(--f-display); font-weight: 600; font-size: .95rem; }
.entry-gutter .t, .entry-gutter .w { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.entry-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.e-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.e-name { font-weight: 600; }
.e-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--ink-2); }
.e-meta .face { color: var(--ink-2); }
.qa { display: grid; gap: 8px; margin: 0; }
.qa dt { font-size: .8rem; color: var(--muted); font-weight: 500; }
.qa dd { margin: 0 0 4px; }
.media-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.thumb { appearance: none; border: 1px solid var(--line); border-radius: 6px; padding: 0; background: var(--surface-2); cursor: zoom-in; width: 132px; height: 84px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid { width: 100%; max-width: 340px; border-radius: 8px; background: #000; display: block; }
.linkcard { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--ink); text-decoration: none; font-size: .84rem; background: var(--surface-2); }
.linkcard:hover { border-color: var(--accent); }
.linkcard span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.linkcard svg { flex: none; color: var(--accent); }
.e-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.e-tools input.input { width: 150px; padding: 4px 8px; font-size: .82rem; }
.star { appearance: none; border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px; margin-left: auto; display: inline-flex; }
.star[aria-pressed="true"] { color: #d99a00; }
@media (max-width: 560px) {
  .entry { grid-template-columns: minmax(0, 1fr); }
  .entry-gutter { flex-direction: row; gap: 10px; align-items: baseline; border-right: 0; border-bottom: 1px dashed var(--line-2); padding: 8px 14px; }
}

/* Tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: .76rem; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.person { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.wk { display: inline-flex; gap: 3px; }
.wk i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line-2); display: inline-block; }
.wk i.on { background: var(--accent); border-color: var(--accent); }
.wk i.future { border-style: dashed; opacity: .5; }

/* Charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-family: var(--f-body); font-size: 11px; }
.chart .lbl { fill: var(--ink-2); font-weight: 600; }
.grid-line { stroke: var(--line); stroke-width: 1; }
.base-line { stroke: var(--line-2); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); display: inline-block; }
.legend i.line { height: 3px; border-radius: 2px; width: 14px; }
.stackrows { display: flex; flex-direction: column; gap: 12px; }
.stackrow { display: grid; grid-template-columns: 110px minmax(0, 1fr) 84px; gap: 10px; align-items: center; font-size: .85rem; }
.stackbar { display: flex; gap: 2px; height: 22px; }
.stackbar span { background: var(--c); border-radius: 2px; min-width: 3px; }
.stackbar span:first-child { border-radius: 4px 2px 2px 4px; }
.stackbar span:last-child { border-radius: 2px 4px 4px 2px; }
.stackrow .lead { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.daychart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; font-size: .75rem; color: var(--muted); }
.dc-y { display: flex; flex-direction: column; justify-content: space-between; height: 140px; text-align: right; line-height: 1; }
.dc-plot { min-width: 0; }
.dc-bars { display: flex; align-items: flex-end; gap: 2px; height: 140px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-2); }
.dc-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.dc-col i { display: block; width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; }
.dc-col i.zero { height: 2px !important; background: var(--line-2); border-radius: 1px; }
.dc-col i.future { height: 0 !important; }
.dc-col:hover i.on { filter: brightness(1.15); }
.dc-x { display: flex; justify-content: space-between; margin-top: 6px; }
.chart-empty { display: grid; place-items: center; min-height: 160px; color: var(--muted); font-size: .88rem; border: 1px dashed var(--line); border-radius: 8px; text-align: center; padding: 16px; }
@media (max-width: 480px) { .stackrow { grid-template-columns: 76px minmax(0, 1fr) 64px; } }

/* Insights */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 280px); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.col { background: var(--surface-2); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.col-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: .84rem; overflow-wrap: anywhere; }
.note .who { font-size: .74rem; color: var(--muted); margin-top: 4px; }
details.qblock { border-top: 1px solid var(--line); padding: 10px 0; }
details.qblock:first-of-type { border-top: 0; }
details.qblock summary { cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; gap: 10px; }
.answers { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.answers li { font-size: .9rem; padding-left: 12px; border-left: 2px solid var(--line-2); overflow-wrap: anywhere; }
.answers li .who { font-size: .76rem; color: var(--muted); }
.stat-line { display: flex; gap: 24px; flex-wrap: wrap; }
.stat-line div { display: flex; flex-direction: column; }
.stat-line b { font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; }
.stat-line span { font-size: .78rem; color: var(--muted); }

/* Interviews */
.split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.plist { display: flex; flex-direction: column; gap: 2px; }
.pitem { appearance: none; border: 0; background: transparent; text-align: left; padding: 9px 10px; border-radius: 8px; display: flex; gap: 10px; align-items: center; cursor: pointer; width: 100%; color: inherit; }
.pitem:hover { background: var(--surface-2); }
.pitem[aria-current="true"] { background: var(--accent-soft); }
.pitem .meta { font-size: .76rem; color: var(--muted); }
.guide { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--ink-2); }
.timeline { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow: auto; }

/* Sign-in page */
.login-shell { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-block: 24px; }
.welcome { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 1000px; width: 100%; margin-inline: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.welcome-art { background-color: var(--accent-soft); background-image: radial-gradient(var(--line-2) 1.1px, transparent 1.5px); background-size: 18px 18px; padding: 40px 36px 28px; display: flex; flex-direction: column; gap: 14px; }
.welcome-art .eyebrow, .welcome-main .eyebrow { color: var(--accent); font-weight: 500; }
.welcome-art h2 { font-size: 2.5rem; line-height: 1.05; font-weight: 700; color: var(--accent); }
.welcome-art p { color: var(--ink-2); max-width: 34ch; }
.welcome-art svg.art { width: 100%; max-width: 380px; height: auto; margin: 8px auto 0; display: block; }
.welcome-art .foot { display: flex; gap: 8px; justify-content: center; align-items: center; font-size: .82rem; color: var(--ink-2); margin-top: auto; }
.welcome-main { padding: 56px 48px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.welcome-main h1 { font-size: 2.4rem; line-height: 1.08; }
.welcome-main p.lead { color: var(--ink-2); max-width: 40ch; }
.ms-btn { display: flex; width: 100%; justify-content: center; align-items: center; gap: 12px; padding: 14px 18px; font-size: 1.02rem; font-weight: 600; border-radius: 10px; background: var(--accent); color: var(--accent-ink); text-decoration: none; border: 0; }
.ms-btn:hover { filter: brightness(1.08); }
.ms-logo { width: 26px; height: 26px; border-radius: 4px; background: #fff; display: grid; place-items: center; flex: none; }
.secure { display: flex; gap: 6px; align-items: center; justify-content: center; font-size: .8rem; color: var(--muted); text-align: center; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 20px; margin-top: auto; text-align: center; }
.features div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-2); }
.features svg { color: var(--accent); }
.welcome-tag { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 18px; }
.login-error { background: var(--hl); color: var(--hl-ink); border-radius: 8px; padding: 10px 12px; font-size: .88rem; }
@media (max-width: 820px) {
  .welcome { grid-template-columns: minmax(0, 1fr); }
  .welcome-art { padding: 26px 22px 18px; }
  .welcome-art h2 { font-size: 1.9rem; }
  .welcome-art svg.art { max-width: 260px; }
  .welcome-main { padding: 28px 22px 22px; }
  .welcome-main h1 { font-size: 1.9rem; }
}

/* Overlays */
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--bg); font-size: .78rem; padding: 6px 9px; border-radius: 6px; max-width: 260px; box-shadow: var(--shadow); }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 500; font-size: .9rem; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(5,8,12,.82); display: grid; place-items: center; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 8px; background: #fff; }
.lightbox .btn { position: absolute; top: 14px; right: 14px; }
.copybox { width: 100%; min-height: 150px; }
@media (prefers-reduced-motion: reduce) {
  .toast, .qf, .action { transition: none; }
  .celebrate .tick, .celebrate .new-badge { animation: none; }
  .cf { display: none; }
}
