/* OsMike web starter — service layer. Loads after tokens.css (canonical, vendored) and theme.css (dark).
   Rule: no colour literals below except the namespaced extension tokens in this first block (design lint). */
:root { --site-yes:#1d7445; --site-no:#b8322a; --site-later:#8a5600; --site-more:#4646c8; --site-yes-bg:rgba(29,116,69,.10); --site-no-bg:rgba(184,50,42,.10); --site-later-bg:rgba(138,86,0,.10); --site-more-bg:rgba(70,70,200,.10); --site-error:#C6402E; --site-sel:rgba(124,124,255,.12); --site-shadow:rgba(23,19,14,.25); --site-rest:rgba(23,19,14,.02); }
html[data-theme="dark"] { --site-yes:#6fd39a; --site-no:#ff8f7a; --site-later:#f0c060; --site-more:#a5a5ff; --site-yes-bg:rgba(111,211,154,.14); --site-no-bg:rgba(255,143,122,.14); --site-later-bg:rgba(240,192,96,.14); --site-more-bg:rgba(165,165,255,.14); --site-error:#ff8f7a; --site-sel:rgba(124,124,255,.22); --site-shadow:rgba(0,0,0,.6); --site-rest:rgba(0,0,0,.2); }

@font-face { font-family:"Fraunces"; src:url("/static/fonts/fraunces.woff2") format("woff2"); font-weight:300 600; font-style:normal; font-display:swap; }
@font-face { font-family:"Manrope"; src:url("/static/fonts/manrope.woff2") format("woff2"); font-weight:400 700; font-style:normal; font-display:swap; }

*, *::before, *::after { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--ink); font:400 17px/1.6 var(--sans); min-height:100vh; display:flex; flex-direction:column; }
img, svg { max-width:100%; }
a { color:var(--ink); text-underline-offset:3px; }
h1, h2, h3 { font-family:var(--disp); font-weight:400; line-height:1.15; margin:0 0 12px; letter-spacing:-.01em; }
p { margin:0 0 12px; }
.muted { color:var(--muted); }
.small { font-size:15px; }
.lede { font-size:17px; max-width:62ch; }
.eyebrow { font-size:14px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin:0 0 4px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.skip { position:absolute; left:16px; top:-60px; background:var(--card); padding:8px 16px; border-radius:12px; z-index:10; }
.skip:focus { top:8px; }

:focus-visible { outline:2px solid var(--ink); outline-offset:2px; }

/* Header */
.top { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; max-width:1120px; width:100%; margin:0 auto; }
.brand { display:inline-flex; align-items:center; gap:10px; text-decoration:none; font-weight:700; min-height:44px; min-width:0; }
.mark { width:22px; height:22px; border-radius:7px; background:var(--grad); flex:none; }
.wordmark { overflow-wrap:anywhere; }
.account { position:relative; }
.account summary { list-style:none; display:flex; align-items:center; gap:8px; min-height:44px; padding:4px 12px 4px 4px; border-radius:999px; border:1px solid var(--muted); cursor:pointer; font-weight:600; font-size:16px; max-width:60vw; }
.account summary::-webkit-details-marker { display:none; }
.who { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.avatar { width:34px; height:34px; border-radius:999px; display:grid; place-items:center; background:var(--ink); color:var(--bg); font-size:15px; flex:none; }
.menu { position:absolute; right:0; top:calc(100% + 8px); background:var(--card); border:1px solid var(--line); border-radius:16px; padding:8px; min-width:240px; box-shadow:0 26px 50px -34px var(--site-shadow); z-index:5; }
.menu a, .menu .linkish { display:flex; align-items:center; min-height:44px; padding:0 12px; border-radius:12px; text-decoration:none; width:100%; font:600 16px var(--sans); color:var(--ink); }
.menu a:hover, .menu .linkish:hover { background:var(--site-sel); }
.menu form { margin:0; }
.menu-id { padding:8px 12px; margin:0 0 4px; border-bottom:1px solid var(--line); display:flex; flex-direction:column; }
.menu-id span { color:var(--muted); font-size:15px; overflow-wrap:anywhere; }
.linkish { background:none; border:0; cursor:pointer; text-align:left; }

/* Layout */
.wrap { flex:1; width:100%; max-width:1120px; margin:0 auto; padding:16px 16px 48px; }
.page-title { font-size:clamp(32px,5vw,44px); }
.card-title { font-size:26px; }
.grid { display:grid; gap:24px; grid-template-columns:minmax(0,1fr); margin-top:24px; }
@media (min-width:850px) { .grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } .wrap { padding:32px 24px 64px; } }
.grid > *, .row, .share-main { min-width:0; }
.card { background:var(--card); border:1px solid var(--line); border-radius:22px; padding:24px; box-shadow:0 1px 0 var(--site-rest); }
@media (min-width:600px) { .card { padding:32px; } }
.narrow { max-width:560px; }
.stack { display:flex; flex-direction:column; gap:8px; }
.stack .btn { align-self:flex-start; margin-top:8px; }
.crumbs { margin:0 0 12px; }
.crumbs a { display:inline-flex; min-height:44px; align-items:center; }
.content { white-space:pre-wrap; overflow-wrap:anywhere; margin:12px 0 24px; }
.actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:0; }
.actions form { margin:0; }

/* Controls */
label { font-weight:600; font-size:16px; }
input, textarea, select { font:400 16px/1.5 var(--sans); color:var(--ink); background:var(--card); border:1px solid var(--muted); border-radius:12px; padding:12px 16px; width:100%; min-height:44px; }
textarea { resize:vertical; }
input[aria-invalid="true"] { border-color:var(--site-error); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:12px 28px; border-radius:999px; font:600 16px/1.2 var(--sans); text-decoration:none; cursor:pointer; border:1px solid var(--ink); }
.btn.primary { background:var(--ink); color:var(--bg); box-shadow:0 10px 30px -12px var(--site-shadow); }
.btn.secondary { background:transparent; color:var(--ink); }
.btn.danger { color:var(--site-error); border-color:var(--site-error); }
.btn.wide { width:100%; margin:12px 0 16px; }
.btn[aria-busy="true"], .btn:disabled { opacity:.65; cursor:progress; }
.error { color:var(--site-error); font-weight:600; display:flex; gap:8px; align-items:baseline; }
.error span { display:inline-grid; place-items:center; width:20px; height:20px; border-radius:999px; border:2px solid currentColor; font-size:13px; flex:none; }
.notice { background:var(--site-sel); border-radius:12px; padding:12px 16px; }
.badge { display:inline-block; font-size:14px; font-weight:600; padding:2px 10px; border-radius:999px; border:1px solid var(--muted); color:var(--muted); }
.badge.live { color:var(--ink); border-color:var(--ink); }

/* Lists */
.rows { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.row { display:flex; flex-direction:column; gap:2px; padding:12px 16px; border-radius:16px; border:1px solid var(--line); text-decoration:none; min-height:44px; }
a.row:hover { background:var(--site-sel); }
.row-title { font-weight:600; overflow-wrap:anywhere; }
.share { gap:12px; }
.share.revoked { opacity:.75; }
.share-main { display:flex; flex-direction:column; gap:6px; align-items:flex-start; }
.share-actions { display:flex; gap:12px; flex-wrap:wrap; }
.share-actions form { margin:0; }
.url { font-size:15px; }
@media (min-width:850px) { .share { flex-direction:row; align-items:flex-end; justify-content:space-between; } .share-main { flex:1; } }
.empty { padding:24px 0 8px; }
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:16px; margin:0; }
.stats dt { color:var(--muted); font-size:15px; } .stats dd { margin:0; font:400 40px/1.1 var(--disp); }

/* Login composition (account-style, warm) */
.auth { max-width:420px; margin:48px auto 0; position:relative; box-shadow:0 26px 50px -34px var(--site-shadow); }
.auth h1 { font-size:32px; }
.dawn { position:fixed; inset:-30vh -10vw auto; height:70vh; background:radial-gradient(60% 60% at 30% 40%, color-mix(in srgb, var(--coral) 22%, transparent), transparent 70%), radial-gradient(50% 50% at 75% 30%, color-mix(in srgb, var(--peri) 18%, transparent), transparent 70%); pointer-events:none; z-index:-1; }

.foot { max-width:1120px; width:100%; margin:0 auto; padding:16px; color:var(--muted); font-size:15px; }
.foot a { color:var(--muted); }

/* ---------------- Decision Deck ---------------- */
.deck { max-width:760px; margin:0 auto; display:flex; flex-direction:column; gap:12px; }
.deck-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; }
.deck-status { margin:0; font-size:15px; color:var(--muted); }
.deck-status.offline { color:var(--site-later); font-weight:600; }
.deck-tools { display:flex; gap:8px; }
.tool { display:inline-flex; align-items:center; gap:6px; min-height:44px; min-width:44px; padding:0 14px; border-radius:999px; border:1px solid var(--muted); background:transparent; color:var(--ink); font:600 15px var(--sans); cursor:pointer; }
.tool[aria-pressed="true"] { background:var(--ink); color:var(--bg); border-color:var(--ink); }
.voice-state { margin:0; font-size:15px; color:var(--site-more); font-weight:600; overflow-wrap:anywhere; }
.voice-state.err { color:var(--site-error); }

.stage { position:relative; min-height:320px; }
.ghost { position:absolute; inset:12px 14px -10px; background:var(--card); border:1px solid var(--line); border-radius:22px; opacity:.6; }
.dcard { position:relative; background:var(--card); border:1px solid var(--line); border-radius:22px; padding:20px 20px 16px; box-shadow:0 26px 50px -34px var(--site-shadow);
  touch-action:none; user-select:none; -webkit-user-select:none; cursor:grab; display:flex; flex-direction:column; gap:10px; min-height:320px; overflow:hidden;
  transition:transform .14s ease-out, opacity .14s ease-out; will-change:transform; }
.dcard:focus { outline:none; }
.dcard:focus-visible { outline:2px solid var(--ink); outline-offset:2px; }
.dcard.dragging { transition:none; cursor:grabbing; }
.dcard.risk { border:2px solid var(--site-error); }
.dcard.enter { animation:deck-in .12s ease-out; }
@keyframes deck-in { from { opacity:0; transform:translateY(8px) scale(.985); } to { opacity:1; transform:none; } }
@media (min-width:600px) { .dcard { padding:28px 32px 20px; min-height:360px; } }
.dir-hint { position:absolute; inset:0; border-radius:inherit; pointer-events:none; opacity:0; display:flex; align-items:flex-start; justify-content:center; padding-top:14px; font:700 18px var(--sans); transition:opacity .1s; }
.dcard[data-dir] .dir-hint { opacity:1; }
.dcard[data-dir="yes"] .dir-hint { background:var(--site-yes-bg); color:var(--site-yes); box-shadow:inset 0 0 0 3px var(--site-yes); }
.dcard[data-dir="no"] .dir-hint { background:var(--site-no-bg); color:var(--site-no); box-shadow:inset 0 0 0 3px var(--site-no); }
.dcard[data-dir="later"] .dir-hint { background:var(--site-later-bg); color:var(--site-later); box-shadow:inset 0 0 0 3px var(--site-later); }
.dcard[data-dir="more"] .dir-hint { background:var(--site-more-bg); color:var(--site-more); box-shadow:inset 0 0 0 3px var(--site-more); }
.dcard-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.from { display:flex; flex-direction:column; min-width:0; }
.from-label { font-size:13px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.from-who { font-weight:700; font-size:19px; color:var(--accent); overflow-wrap:anywhere; line-height:1.3; }
.from-topic { font-size:14px; color:var(--muted); }
.count { font-size:14px; color:var(--muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
.risk-note { margin:0; color:var(--site-error); font-weight:600; font-size:15px; display:flex; gap:8px; align-items:baseline; }
.risk-note span { display:inline-grid; place-items:center; width:20px; height:20px; border-radius:999px; border:2px solid currentColor; font-size:13px; flex:none; }
.headline { font-family:var(--disp); font-size:clamp(26px,6.4vw,38px); line-height:1.15; margin:4px 0 0; overflow-wrap:anywhere; }
.dcard.compact .headline { font-size:clamp(23px,5.4vw,30px); }
.why { font-size:18px; margin:0; overflow-wrap:anywhere; }
.detail { font-size:15px; color:var(--muted); margin:0; white-space:pre-wrap; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:7; -webkit-box-orient:vertical; overflow:hidden; }
.detail:empty, .why:empty { display:none; }
.qa { display:flex; flex-direction:column; gap:8px; }
.qa:empty { display:none; }
.qa-item { border-left:3px solid var(--site-more); padding:4px 0 4px 12px; }
.qa-q { margin:0; color:var(--site-more); font-size:15px; font-weight:600; overflow-wrap:anywhere; }
.qa-a { margin:2px 0 0; font-size:16px; white-space:pre-wrap; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:8; -webkit-box-orient:vertical; overflow:hidden; }
.qa-a.waiting { color:var(--muted); font-style:italic; }
.hints { display:none; margin-top:auto; padding-top:12px; font-weight:700; font-size:16px; align-items:flex-end; justify-content:space-between; gap:12px; }
@media (min-width:700px) { .hints { display:flex; } }
.h-no { color:var(--site-no); } .h-yes { color:var(--site-yes); text-align:right; }
.h-mid { display:flex; flex-direction:column; align-items:center; gap:2px; font-weight:600; font-size:14px; }
.h-later { color:var(--site-later); } .h-more { color:var(--site-more); }

.comment-row { display:flex; align-items:center; gap:8px; background:var(--card); border:1px solid var(--muted); border-radius:12px; padding:0 0 0 14px; }
.comment-row:focus-within { outline:2px solid var(--ink); outline-offset:2px; }
.comment-row.has-text { border-color:var(--site-more); }
.comment-row input { border:0; background:transparent; padding:12px 12px 12px 0; min-height:48px; }
.comment-row input:focus { outline:none; }
.pen { color:var(--muted); }
.small-btn { min-height:40px; padding:8px 16px; margin-right:4px; white-space:nowrap; }
.comment-hint { margin:-4px 0 0; min-height:1.4em; }

.actions-row { display:grid; grid-template-columns:1fr 1fr 1fr 1fr; gap:8px; }
.act { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:64px; padding:8px 6px; border-radius:16px; border:1px solid currentColor; background:transparent; font:600 15px/1.2 var(--sans); cursor:pointer; position:relative; overflow:hidden; text-align:center; touch-action:manipulation; }
.act > span[aria-hidden] { font-size:20px; line-height:1; }
.act-label { overflow-wrap:anywhere; }
.act-no { color:var(--site-no); } .act-later { color:var(--site-later); } .act-more { color:var(--site-more); } .act-yes { color:var(--site-yes); }
.act:hover { background:var(--site-sel); }
.act:disabled { opacity:.45; cursor:default; }
.hold-fill { position:absolute; inset:0; background:var(--site-yes-bg); transform:scaleX(0); transform-origin:left; pointer-events:none; }
.act-yes.holding .hold-fill { transform:scaleX(1); transition:transform 1s linear; }
@media (min-width:600px) { .act { flex-direction:row; gap:8px; min-height:52px; } }

.toast { position:sticky; bottom:12px; display:flex; align-items:center; justify-content:center; gap:12px; flex-wrap:wrap; background:var(--ink); color:var(--bg); border-radius:999px; padding:10px 18px; font-size:15px; box-shadow:0 10px 30px -12px var(--site-shadow); z-index:4; }
.toast span { overflow-wrap:anywhere; }
.toast-undo { color:var(--bg); font:700 15px var(--sans); text-decoration:underline; min-height:44px; padding:0 8px; cursor:pointer; }
.deck-foot { text-align:center; font-size:14px; color:var(--muted); margin:4px 0 0; font-variant-numeric:tabular-nums; }

.deck-empty { background:var(--card); border:1px solid var(--line); border-radius:22px; padding:48px 24px; text-align:center; }
.empty-title { font-family:var(--disp); font-size:32px; margin:0 0 8px; }

.history { background:var(--card); border:1px solid var(--line); border-radius:22px; padding:20px; }
@media (min-width:600px) { .history { padding:28px; } }
.hist-list { list-style:none; margin:12px 0 0; padding:0; display:flex; flex-direction:column; gap:6px; max-height:60vh; overflow:auto; }
.hist-row { display:grid; grid-template-columns:auto minmax(0,1fr); gap:4px 12px; width:100%; padding:10px 12px; border-radius:12px; border:1px solid var(--line); background:transparent; color:var(--ink); text-align:left; font:400 15px var(--sans); cursor:pointer; min-height:44px; }
.hist-row[aria-current="true"] { background:var(--site-sel); border-color:var(--site-more); }
.hist-dec { font-weight:700; } .hist-dec.yes { color:var(--site-yes); } .hist-dec.no { color:var(--site-no); }
.hist-head { overflow-wrap:anywhere; }
.hist-meta { grid-column:2; color:var(--muted); font-size:14px; }

@media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }
