:root {
  --bg: #f7f3ea;
  --card: #ffffff;
  --ink: #2b333a;
  --ink-2: #3c444b;
  --muted: #7b8086;
  --faint: #a39d92;
  --line: #eae3d6;
  --line-2: #ddd5c7;
  --accent: #424B54;
  --accent-soft: #9B6A6C;
  --tint: #efe9dd;
  --tint-ink: #4a463d;
  --maxw: 600px;
  --fr: ui-serif, 'New York', Georgia, serif;
  --nr: 'New York', ui-serif, Georgia, serif;
  --ss: -apple-system, system-ui, 'SF Pro Text', 'Segoe UI', sans-serif;
  --toph: 62px;
  --tabh: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); height: 100%; overscroll-behavior: none; }
body { color: var(--ink); font-family: var(--nr); line-height: 1.55; -webkit-font-smoothing: antialiased; }
#app { max-width: var(--maxw); margin: 0 auto; }

/* Fixed top bar */
.topbar { position: fixed; top: 0; left: 0; right: 0; max-width: var(--maxw); margin: 0 auto; height: calc(env(safe-area-inset-top) + var(--toph)); padding: env(safe-area-inset-top) 16px 0 18px; display: flex; flex-direction: row; justify-content: space-between; align-items: center; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 30; }
.tb-left { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.tb-gear { background: none; border: none; color: var(--muted); cursor: pointer; padding: 8px; flex: none; }
.tb-top { display: flex; align-items: center; gap: 9px; }
.tb-mark { display: grid; place-items: center; }
.tb-name { font-family: var(--fr); font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.tb-tag { font-family: var(--ss); font-size: 10.5px; letter-spacing: .2px; color: var(--accent-soft); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Scroll area per tab */
main { display: block; padding: calc(env(safe-area-inset-top) + var(--toph) + 6px) 0 calc(env(safe-area-inset-bottom) + var(--tabh) + 16px); min-height: 100vh; }
.pad { padding: 0 20px; }

/* Bottom tab bar */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; max-width: var(--maxw); margin: 0 auto; height: calc(env(safe-area-inset-bottom) + var(--tabh)); padding-bottom: env(safe-area-inset-bottom); display: flex; background: var(--bg); border-top: 1px solid var(--line); z-index: 40; }
.tab { flex: 1; background: none; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); font-family: var(--ss); font-size: 10.5px; font-weight: 600; letter-spacing: .2px; }
.tab.active { color: var(--accent); }

/* ---- TODAY ---- */
.edition { display: flex; justify-content: space-between; align-items: center; font-family: var(--ss); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); padding: 4px 1px 12px; }
.edition .deep { color: var(--accent-soft); font-weight: 600; }
.sentence { margin-top: 16px; }
.sentence .lbl { font-family: var(--ss); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent-soft); font-weight: 600; }
.sentence p { font-family: var(--fr); font-size: 23px; font-weight: 500; color: var(--ink); line-height: 1.3; margin: 8px 0 0; letter-spacing: -.3px; }

.listen { margin-top: 20px; display: flex; flex-direction: column; gap: 11px; }
.lcard { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 15px; padding: 14px 16px; background: var(--card); cursor: pointer; }
.lcard .lk { font-family: var(--ss); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--faint); }
.lcard .lt { font-family: var(--fr); font-size: 18px; font-weight: 600; margin-top: 3px; }
.lcard .ls { font-family: var(--ss); font-size: 12px; color: var(--muted); margin-top: 2px; }
.lcard .deep-status:not(:empty) { font-family: var(--nr); font-size: 12.5px; color: var(--ink-2); line-height: 1.4; margin-top: 6px; max-width: 40ch; }
.lcard.long { background: var(--tint); border-color: #dde6e0; }
.play { flex: none; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--accent); color: var(--bg); font-size: 15px; display: grid; place-items: center; cursor: pointer; }

.featlbl { font-family: var(--ss); font-size: 10px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--faint); font-weight: 600; margin: 26px 0 12px; }
.feat { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 17px 17px 15px; cursor: pointer; }

/* ---- STORIES (section rows + carousels) ---- */
.row { margin-top: 22px; }
.row-h { display: flex; align-items: center; gap: 8px; padding: 0 20px; }
.row-dot { width: 8px; height: 8px; border-radius: 50%; }
.row-h h3 { font-family: var(--ss); font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; margin: 0; }
.row-h .ct { font-family: var(--ss); font-size: 11px; color: var(--faint); }
.carousel { display: flex; gap: 13px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 13px 20px 4px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.scard { scroll-snap-align: start; flex: 0 0 80%; max-width: 290px; min-height: 168px; border: 1px solid var(--line); border-top-width: 3px; border-radius: 15px; background: var(--card); padding: 14px 15px 15px; cursor: pointer; display: flex; flex-direction: column; }
.scard .tag { font-family: var(--ss); font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; }
.scard .imp { font-family: var(--fr); font-size: 18px; font-weight: 600; line-height: 1.24; letter-spacing: -.2px; margin-top: 8px; }
.scard .fact { font-family: var(--ss); font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 8px; }
.scard .more { font-family: var(--ss); font-size: 11.5px; color: var(--accent); margin-top: auto; padding-top: 11px; }

/* ---- Overlay (detail) ---- */
.overlay { position: fixed; inset: 0; z-index: 50; background: var(--bg); max-width: var(--maxw); margin: 0 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; transform: translateY(100%); transition: transform .3s cubic-bezier(.22,.61,.36,1); visibility: hidden; }
.overlay.open { transform: translateY(0); visibility: visible; }
.ov-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top) + 12px) 18px 11px; background: var(--bg); border-bottom: 1px solid var(--line); }
.ov-back { font-family: var(--ss); background: none; border: none; color: var(--accent); font-size: 15px; font-weight: 600; cursor: pointer; padding: 4px 0; }
.ov-listen { font-family: var(--ss); background: var(--accent); color: var(--bg); border: none; border-radius: 999px; font-size: 13px; font-weight: 600; padding: 9px 16px; cursor: pointer; }
.ov-body { padding: 16px 22px 120px; }

.sv-kicker { font-family: var(--ss); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; }
.sv-imp { font-family: var(--fr); font-size: 27px; font-weight: 600; line-height: 1.18; letter-spacing: -.4px; margin: 10px 0 0; }
.sv-fact { font-size: 16px; color: var(--muted); line-height: 1.5; margin: 12px 0 0; }
.sv-detail { margin-top: 20px; }
.sv-detail p { font-size: 16.5px; line-height: 1.62; color: var(--ink-2); margin: 0 0 14px; }
.sv-detail p:first-child .dropcap { font-family: var(--fr); float: left; font-size: 44px; line-height: .8; font-weight: 600; color: var(--accent); padding: 5px 9px 0 0; }
.block { margin-top: 22px; }
.block .lbl { font-family: var(--ss); font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: var(--faint); }
.block p { margin: 7px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.block.why p { color: var(--ink); }
.block.gp { padding-left: 14px; border-left: 2px solid var(--accent-soft); }
.block.gp .lbl { color: var(--accent-soft); }
.block.gp p { font-size: 16px; color: var(--ink); line-height: 1.6; }
.block.sit .q { font-family: var(--fr); font-size: 17px; font-weight: 500; color: var(--ink); line-height: 1.4; margin-top: 7px; }
.facts { list-style: none; padding: 15px 17px; margin: 22px 0 0; display: grid; gap: 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.facts li { position: relative; padding-left: 17px; font-size: 14px; color: var(--ink-2); font-family: var(--ss); }
.facts li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* Your take */
.take { margin-top: 26px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 14px; }
.take .lbl { font-family: var(--ss); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.take textarea { width: 100%; border: none; outline: none; background: none; resize: none; font-family: var(--nr); font-size: 16px; color: var(--ink); line-height: 1.55; margin-top: 9px; min-height: 82px; }
.take textarea::placeholder { color: var(--faint); font-style: italic; }
.take-bar { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.take-bar .saved { font-family: var(--ss); font-size: 11px; color: var(--faint); }
.take-bar button { font-family: var(--ss); font-size: 12.5px; font-weight: 600; color: var(--bg); background: var(--accent); border: none; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.take-bar button:disabled { background: var(--line-2); color: var(--faint); cursor: default; }

.sv-sources { margin-top: 26px; }
.sv-sources .lbl { font-family: var(--ss); font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.srcbtns { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 10px; }
.srcbtn { font-family: var(--ss); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--ink); border: 1px solid var(--line-2); border-radius: 11px; padding: 9px 14px; background: var(--card); }
.srcbtn span { color: var(--faint); }
.srcbtn.nolink { color: var(--muted); background: var(--bg); cursor: default; }
.sv-srcnote { font-family: var(--ss); font-size: 11.5px; color: var(--faint); line-height: 1.45; margin-top: 10px; }

/* Notebook */
.nb-h { padding: 6px 0 0; }
.nb-title { font-family: var(--fr); font-size: 30px; font-weight: 600; margin: 0; }
.nb-sub { font-family: var(--ss); font-size: 12px; color: var(--muted); margin-top: 4px; }
.nb-empty { font-size: 16px; color: var(--muted); line-height: 1.6; margin-top: 24px; font-style: italic; }
.nb-item { border-top: 1px solid var(--line); padding: 16px 0; }
.nb-item .meta { font-family: var(--ss); font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); }
.nb-item .ti { font-family: var(--fr); font-size: 15.5px; font-weight: 600; line-height: 1.3; margin-top: 4px; }
.nb-item .tx { font-size: 15.5px; color: var(--ink-2); line-height: 1.5; margin-top: 6px; }
.nb-export { font-family: var(--ss); width: 100%; margin-top: 22px; background: var(--accent); color: var(--bg); border: none; border-radius: 12px; padding: 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; }

/* ---- TODAY: one take at a time (deck) ---- */
main.deck-mode { padding: 0; min-height: 0; height: 100dvh; overflow: hidden; }
.deckwrap { margin-top: calc(env(safe-area-inset-top) + var(--toph)); height: calc(100dvh - env(safe-area-inset-top) - var(--toph) - env(safe-area-inset-bottom) - var(--tabh)); display: flex; flex-direction: column; }
.deck-progress { flex: none; display: flex; gap: 6px; justify-content: center; align-items: center; padding: 12px 0 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: width .2s ease, background .2s ease; }
.dot.on { background: var(--accent); width: 18px; border-radius: 3px; }
.deck { flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.deck::-webkit-scrollbar { display: none; }
.deck-card { flex: 0 0 100%; height: 100%; overflow-y: auto; scroll-snap-align: center; padding: 22px 26px 26px; display: flex; flex-direction: column; }
.deck-card.center { justify-content: safe center; }
.dk-tag { font-family: var(--ss); font-size: 10px; letter-spacing: 1.8px; text-transform: uppercase; font-weight: 700; }
.dk-imp { font-family: var(--fr); font-size: 30px; font-weight: 600; line-height: 1.16; letter-spacing: -.4px; margin-top: 12px; }
.dk-fact { font-size: 15.5px; color: var(--muted); line-height: 1.5; margin-top: 12px; }
.dk-why { margin-top: 22px; }
.dk-why .lbl { font-family: var(--ss); font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: var(--faint); }
.bullets { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.bullets li { position: relative; padding-left: 18px; font-size: 15.5px; color: var(--ink); line-height: 1.4; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.dk-gp { margin-top: 22px; padding-left: 14px; border-left: 2px solid var(--accent-soft); }
.dk-gp .lbl { font-family: var(--ss); font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: var(--accent-soft); }
.dk-gp p { font-family: var(--nr); font-size: 15.5px; color: var(--ink); line-height: 1.55; margin: 7px 0 0; }
.dk-sit { margin-top: 20px; }
.dk-sit .lbl { font-family: var(--ss); font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: var(--faint); }
.dk-sit .q { font-family: var(--fr); font-size: 17px; font-weight: 500; color: var(--ink); line-height: 1.4; margin-top: 6px; }
.dk-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.dk-btn { font-family: var(--ss); font-size: 13px; font-weight: 600; border-radius: 999px; padding: 10px 16px; cursor: pointer; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); }
.dk-btn.primary { background: var(--accent); color: var(--bg); border: none; }
.dk-swipe { font-family: var(--ss); font-size: 11px; color: var(--faint); text-align: center; margin-top: 20px; }
.dk-eyebrow { font-family: var(--ss); font-size: 10px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--accent-soft); font-weight: 600; }

/* Make the call */
.mk { margin-top: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 15px; }
.mk .lbl { font-family: var(--ss); font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: var(--accent); }
.mk-q { font-family: var(--fr); font-size: 16.5px; font-weight: 500; color: var(--ink); line-height: 1.35; margin-top: 7px; }
.mk-by { font-family: var(--ss); font-size: 10.5px; color: var(--faint); margin-top: 6px; }
.mk-btns { display: flex; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.mk-btn { flex: 1 1 calc(50% - 5px); min-width: 78px; text-align: center; font-family: var(--ss); font-size: 13.5px; font-weight: 600; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 10px 8px; cursor: pointer; }
.mk-btn.on { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.mk-reasonwrap { margin-top: 12px; border: 1px solid var(--line-2); border-radius: 11px; padding: 10px 12px; background: var(--bg); }
.mk-reason-lbl { font-family: var(--ss); font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; color: var(--faint); }
.mk-reason-lbl span { font-weight: 500; letter-spacing: .3px; text-transform: none; color: var(--faint); }
.mk-reason { width: 100%; border: none; outline: none; background: none; resize: none; font-family: var(--nr); font-size: 14.5px; color: var(--ink); line-height: 1.5; margin-top: 6px; min-height: 40px; }
.mk-reason::placeholder { color: var(--faint); font-style: italic; }
.mk-saved { font-family: var(--ss); font-size: 11px; color: var(--accent-soft); margin-top: 9px; }

/* Track record (Calls tab) */
.tr-head { padding: 6px 0 0; }
.tr-cal { background: var(--tint); border-radius: 16px; padding: 16px 17px; margin-top: 14px; }
.tr-cal .big { font-family: var(--fr); font-size: 26px; font-weight: 600; color: var(--tint-ink); }
.tr-cal .by { font-family: var(--ss); font-size: 11.5px; color: var(--accent-soft); margin-top: 5px; }
.tr-sec { font-family: var(--ss); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; color: var(--faint); margin: 24px 0 4px; }
.tr-item { border-top: 1px solid var(--line); padding: 15px 0; }
.tr-q { font-family: var(--fr); font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.tr-meta { font-family: var(--ss); font-size: 11px; color: var(--faint); margin-top: 5px; }
.tr-row { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.pill { font-family: var(--ss); font-size: 11px; font-weight: 600; border-radius: 999px; padding: 4px 10px; }
.pill.pick { background: var(--card); border: 1px solid var(--line-2); color: var(--ink); }
.pill.right { background: #eaf1ec; color: #2f6b4a; }
.pill.wrong { background: #f5ece9; color: #9c4a35; }
.pill.pending { background: var(--card); border: 1px solid var(--line-2); color: var(--muted); }
.tr-note { font-family: var(--nr); font-size: 14px; color: var(--ink-2); line-height: 1.5; margin-top: 9px; }
.tr-note .src { font-family: var(--ss); font-size: 11px; color: var(--faint); }
.nb-empty.tr { margin-top: 22px; }
.dk-sentence { font-family: var(--fr); font-size: 27px; font-weight: 500; line-height: 1.28; letter-spacing: -.3px; margin-top: 10px; }
.dk-edition { font-family: var(--ss); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); margin-top: 18px; }

/* Tagline + deep-read recommendation (cover) */
.dk-tagline { font-family: var(--nr); font-style: italic; font-size: 14px; line-height: 1.4; letter-spacing: .1px; color: var(--muted); margin-bottom: 18px; max-width: 360px; }
.dk-rec { margin-top: 18px; border-radius: 13px; padding: 12px 14px; border: 1px solid var(--line); }
.dk-rec.deep { background: #f5eef0; border-color: #e8d7db; }
.dk-rec.light { background: var(--tint); border-color: #dde6e0; }
.dk-rec-label { font-family: var(--ss); font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.dk-rec.deep .dk-rec-label { color: #9B6A6C; }
.dk-rec.light .dk-rec-label { color: var(--accent-soft); }
.dk-rec-why { font-family: var(--nr); font-size: 13.5px; color: var(--ink-2); line-height: 1.45; margin-top: 4px; }

/* Heart + mark-read toggles */
.dk-marks, .sv-marks { display: flex; gap: 9px; margin-top: 20px; }
.sv-marks { margin-top: 22px; }
.markbtn { font-family: var(--ss); font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-2); background: var(--bg); color: var(--muted); border-radius: 999px; padding: 8px 14px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.markbtn.on { border-color: var(--accent); color: var(--accent); background: var(--tint); }
.markbtn.heart.on { color: #9B6A6C; border-color: #e4cdd0; background: #faf1f2; }

/* Library (catch up + hearted) */
.lib-sec { font-family: var(--ss); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; color: var(--faint); margin: 26px 0 2px; }
.lib-day { border-top: 1px solid var(--line); }
.lib-day-h { width: 100%; text-align: left; background: none; border: none; display: flex; justify-content: space-between; align-items: center; padding: 15px 2px 13px; cursor: pointer; }
.lib-day-h .d { font-family: var(--fr); font-size: 17px; font-weight: 600; color: var(--ink); }
.lib-count { font-family: var(--ss); font-size: 11px; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; }
.lib-count .cv { display: inline-block; transition: transform .15s ease; }
.lib-day.collapsed .lib-count .cv { transform: rotate(-90deg); }
.lib-day.collapsed .lib-day-body { display: none; }
.lib-day-body { padding-bottom: 6px; }
.lib-topic { font-family: var(--ss); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; margin: 12px 0 1px; }
.lib-c { width: 100%; text-align: left; background: none; border: none; padding: 9px 2px; cursor: pointer; display: flex; align-items: baseline; gap: 10px; }
.lc-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; transform: translateY(-2px); }
.lc-imp { font-family: var(--fr); font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); flex: 1; }
.lc-h { color: #9B6A6C; font-size: 13px; }

/* Cover sources line */
.dk-sources { font-family: var(--ss); font-size: 11px; color: var(--faint); margin-top: 18px; line-height: 1.5; }
.dk-sources b { color: var(--muted); font-weight: 600; }
.dk-left { text-align: left; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; max-width: 540px; }
.dk-left .lbl { font-family: var(--ss); font-size: 11px; font-weight: 700; letter-spacing: .3px; color: var(--accent-soft); text-transform: uppercase; }
.dk-left p { font-family: var(--nr); font-size: 14px; color: var(--ink-2); line-height: 1.5; margin-top: 5px; }
.dk-threads { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.thread-chip { font-family: var(--ss); font-size: 10.5px; font-weight: 600; letter-spacing: .2px; color: var(--tint-ink); background: var(--tint); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; }
.sv-threads { margin-top: 16px; }
.sv-threads .threadrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.thread-item { border-top: 1px solid var(--line); padding: 13px 0; }
.th-title { font-family: var(--fr); font-weight: 600; font-size: 16px; color: var(--ink); }
.th-sum { font-family: var(--nr); font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.th-beat { font-family: var(--nr); font-size: 13px; color: var(--ink-2); line-height: 1.45; margin-top: 6px; }
.th-date { color: var(--faint); font-size: 11px; }
.th-count { font-family: var(--ss); font-size: 10.5px; color: var(--faint); margin-top: 5px; }
.ta-wrap { position: relative; }
.ta-wrap textarea { display: block; width: 100%; }
.mic-btn { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
.mic-btn:active { transform: scale(.94); }
.mic-btn.recording { background: var(--accent-soft); color: #fff; border-color: var(--accent-soft); animation: micpulse 1.2s ease-out infinite; }
@keyframes micpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(155, 106, 108, .45); } 50% { box-shadow: 0 0 0 7px rgba(155, 106, 108, 0); } }

/* Settings */
.set-intro { font-size: 15px; color: var(--ink-2); line-height: 1.5; margin: 14px 0 4px; }
.set-sec { font-family: var(--ss); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; color: var(--faint); margin: 24px 0 2px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 14px 2px; }
.set-row .nm { font-family: var(--fr); font-size: 16px; font-weight: 600; color: var(--ink); }
.set-row .sd { font-family: var(--ss); font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.sw-toggle { flex: none; width: 46px; height: 27px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background .16s ease; border: none; }
.sw-toggle.on { background: var(--accent-soft); }
.sw-toggle .knob { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform .16s ease; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.sw-toggle.on .knob { transform: translateX(19px); }
.set-note { font-family: var(--ss); font-size: 12px; color: var(--faint); line-height: 1.55; margin-top: 22px; }

/* Player */
.player { position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + var(--tabh)); max-width: var(--maxw); margin: 0 auto; background: rgba(255,255,255,.97); backdrop-filter: blur(12px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 11px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 35; }
.player.hidden { transform: translateY(160%); transition: transform .25s ease; }
.player-title { font-family: var(--ss); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-status { font-family: var(--ss); font-size: 11px; color: var(--faint); margin-top: 2px; }
.player-controls { display: flex; gap: 8px; flex: none; }
.ctrl { font-family: var(--ss); border: 1px solid var(--line-2); background: var(--card); color: var(--ink); border-radius: 11px; height: 38px; min-width: 42px; font-size: 14px; font-weight: 600; cursor: pointer; }
.ctrl.play { background: var(--accent); color: var(--bg); border: none; width: 46px; }
.ctrl.speed { font-size: 12.5px; letter-spacing: .2px; color: var(--accent-soft); min-width: 48px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.ctrl.speed:active { opacity: .6; }
.spd-wrap { position: relative; flex: none; }
.spd-menu { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 2px; padding: 5px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 8px 26px rgba(40,30,20,.16); z-index: 50; }
.spd-menu.hidden { display: none; }
.spd-opt { font-family: var(--ss); font-size: 13px; font-weight: 600; color: var(--ink); background: none; border: none; border-radius: 8px; padding: 9px 22px; cursor: pointer; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.spd-opt:active { background: var(--line); }
.spd-opt.on { background: var(--accent); color: var(--bg); }

.noscroll { overflow: hidden; }

/* ---- Make the call: confidence + conviction ---- */
.mk-conf-lbl { font-family: var(--ss); font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; color: var(--faint); margin-top: 14px; }
.mk-conf { display: flex; gap: 7px; margin-top: 8px; }
.conf-btn { flex: 1; font-family: var(--ss); font-size: 12.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); background: var(--bg); border-radius: 999px; padding: 8px 6px; cursor: pointer; }
.conf-btn.on { background: var(--accent-soft); color: #fff; border-color: var(--accent-soft); }
.mk-conviction { display: inline-flex; align-items: center; gap: 6px; margin-top: 11px; font-family: var(--ss); font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); background: var(--bg); border-radius: 999px; padding: 8px 13px; cursor: pointer; }
.mk-conviction.on { color: #9a7b27; border-color: #e6d49a; background: #fbf6e6; }
.cv-star { font-size: 13px; line-height: 1; }

/* ---- Judgment Profile ---- */
.jp-hero { display: flex; gap: 10px; margin-top: 16px; }
.jp-stat { flex: 1; background: var(--tint); border-radius: 14px; padding: 14px 10px; text-align: center; }
.jp-num { font-family: var(--fr); font-size: 26px; font-weight: 600; color: var(--tint-ink); }
.jp-lab { font-family: var(--ss); font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: var(--accent-soft); margin-top: 3px; }
.jp-note { font-family: var(--ss); font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 12px; }
.jp-sec { font-family: var(--ss); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; color: var(--faint); margin: 26px 0 8px; display: flex; align-items: center; gap: 8px; }
.jp-badge { font-family: var(--ss); font-size: 10px; font-weight: 700; letter-spacing: 0; color: #fff; background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; }

/* calibration + axes */
.cal { display: grid; gap: 14px; }
.cal-row { display: flex; align-items: center; gap: 10px; }
.cal-k { font-family: var(--ss); font-size: 12.5px; font-weight: 700; color: var(--ink); width: 50px; flex: none; }
.cal-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--line); position: relative; }
.cal-fill { display: block; height: 100%; background: var(--accent-soft); border-radius: 999px; }
/* The range your record supports (shaded), your hit rate (mark), and what your confidence
   claimed (thin line). When the mark and the line diverge, that gap is the whole point. */
.cal-ci { position: absolute; top: 0; bottom: 0; background: var(--accent-soft); opacity: .3; border-radius: 999px; }
.cal-mark { position: absolute; top: -3px; width: 3px; height: 14px; margin-left: -1.5px; background: var(--accent-soft); border-radius: 2px; }
.cal-said { position: absolute; top: -5px; width: 1px; height: 18px; background: var(--ink-2); opacity: .55; }
.cal-row.early .cal-ci { opacity: .2; }
.cal-v { font-family: var(--ss); font-size: 12.5px; font-weight: 700; color: var(--ink); width: 108px; flex: none; text-align: right; }
.cal-n { font-family: var(--ss); font-size: 9.5px; font-weight: 500; color: var(--faint); display: block; line-height: 1.35; }

/* Tells: the profile's conclusions, in words, each earning its place on its own evidence. */
.jp-tells { display: grid; gap: 10px; }
.jp-tell { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; background: var(--card); border: 1px solid var(--line); border-left: 2px solid var(--accent-soft); border-radius: 0 12px 12px 0; padding: 12px 14px; }
.jp-tell b { color: var(--ink); font-weight: 600; }
.cal-row.locked .cal-lock, .ax-lock { font-family: var(--ss); font-size: 11px; color: var(--faint); font-style: italic; }
.cal-row.locked .cal-lock { margin-left: auto; }
.ax { display: grid; gap: 9px; }
.ax-row { display: flex; align-items: center; gap: 10px; }
.ax-k { font-family: var(--nr); font-size: 14px; font-weight: 600; color: var(--ink); flex: 1; }
.ax-v { font-family: var(--ss); font-size: 12.5px; font-weight: 700; color: var(--ink); text-align: right; }
.ax-n { font-family: var(--ss); font-size: 10px; font-weight: 500; color: var(--faint); display: block; }
.ax-bar { width: 70px; flex: none; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ax-fill { display: block; height: 100%; background: var(--line-2); }
.ax-lock { flex: none; width: 56px; text-align: right; }

/* reflections waiting list */
.rf-list { display: grid; gap: 8px; }
.rf-item { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #faf1f2; border: 1px solid #e4cdd0; border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.rf-it-q { font-family: var(--fr); font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.rf-it-go { font-family: var(--ss); font-size: 11.5px; font-weight: 700; color: var(--accent-soft); flex: none; }

/* official record */
.jp-official { background: #fbf6e6; border: 1px solid #ecdfb3; border-radius: 14px; padding: 14px 16px; }
.jp-off-big { font-family: var(--fr); font-size: 20px; font-weight: 600; color: #6f5a1e; }
.jp-off-sub { font-family: var(--ss); font-size: 11.5px; color: #9a7b27; margin-top: 4px; }

/* principles */
.prin-list { display: grid; gap: 10px; }
.prin { border-left: 2px solid var(--accent-soft); padding-left: 13px; }
.prin-l { font-family: var(--nr); font-size: 15.5px; color: var(--ink); line-height: 1.45; }
.prin-q { font-family: var(--ss); font-size: 11px; color: var(--faint); margin-top: 3px; }

/* reasoning synthesis */
.jp-synth { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.jp-synth-intro { font-size: 14px; color: var(--ink-2); line-height: 1.5; margin: 0; }
.jp-synth-btn { font-family: var(--ss); width: 100%; margin-top: 13px; background: var(--accent); color: var(--bg); border: none; border-radius: 12px; padding: 13px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.jp-synth-btn:disabled { background: var(--line-2); color: var(--faint); }
.jp-synth-lock { font-family: var(--ss); font-size: 12px; color: var(--faint); font-style: italic; margin-top: 13px; text-align: center; }
.jp-synth-wait { font-family: var(--ss); font-size: 13px; color: var(--muted); font-style: italic; margin-top: 12px; }
.jp-synth-err { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-top: 12px; }
.jp-synth-out { margin-top: 12px; }
.jp-synth-out p { font-size: 15px; color: var(--ink); line-height: 1.6; margin: 0 0 11px; }

.tr-reflect { font-family: var(--ss); font-size: 12px; font-weight: 700; color: var(--accent-soft); background: none; border: none; padding: 8px 0 0; cursor: pointer; }

/* ---- Reflective card (modal) ---- */
.reflect-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(43,51,58,.42); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; }
.reflect-card { width: 100%; max-width: var(--maxw); max-height: 92vh; overflow-y: auto; background: var(--bg); border-radius: 20px 20px 0 0; padding: 22px 22px calc(env(safe-area-inset-bottom) + 22px); -webkit-overflow-scrolling: touch; }
.rf-eyebrow { font-family: var(--ss); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; color: var(--accent-soft); }
.rf-q { font-family: var(--fr); font-size: 21px; font-weight: 600; line-height: 1.22; letter-spacing: -.3px; margin: 8px 0 4px; }
.rf-beat { border-top: 1px solid var(--line); padding: 14px 0 2px; }
.rf-lbl { font-family: var(--ss); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 700; color: var(--faint); }
.rf-beat p { font-size: 15px; color: var(--ink); line-height: 1.55; margin: 7px 0 0; }
.rf-reason { font-style: italic; color: var(--ink-2); }
.rf-src { font-family: var(--ss); font-size: 11px; color: var(--faint); }
.rf-verdict { font-family: var(--ss); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 11px; margin-top: 9px; display: inline-block; }
.rf-verdict.right { background: #eaf1ec; color: #2f6b4a; }
.rf-verdict.wrong { background: #f5ece9; color: #9c4a35; }
.rf-sound { display: flex; gap: 8px; margin-top: 9px; }
.rf-sound button { flex: 1; font-family: var(--ss); font-size: 12.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 9px 6px; cursor: pointer; }
.rf-sound button.on { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.rf-lesson { width: 100%; border: none; outline: none; background: none; resize: none; font-family: var(--nr); font-size: 15px; color: var(--ink); line-height: 1.55; margin-top: 8px; min-height: 56px; }
.rf-lesson::placeholder { color: var(--faint); font-style: italic; }
.rf-beat .ta-wrap { border: 1px solid var(--line-2); border-radius: 11px; padding: 8px 12px; background: var(--card); margin-top: 8px; }
.rf-actions { display: flex; gap: 10px; margin-top: 20px; }
.rf-skip { flex: none; font-family: var(--ss); font-size: 13px; font-weight: 600; color: var(--muted); background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 12px 18px; cursor: pointer; }
.rf-save, .rf-edit { flex: 1; font-family: var(--ss); font-size: 13.5px; font-weight: 600; color: var(--bg); background: var(--accent); border: none; border-radius: 999px; padding: 12px; cursor: pointer; }
.rf-save:disabled { opacity: .38; cursor: default; }
.rf-deep-out { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line-2); }
.rf-deep-out:empty { margin: 0; padding: 0; border: none; }
.rf-deep-eyebrow { font-family: var(--ss); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.rf-deep-wait { font-family: var(--ss); font-size: 13px; color: var(--muted); font-style: italic; margin-top: 11px; }
.rf-deep-retry { font-family: var(--ss); font-size: 12.5px; font-weight: 600; color: var(--accent-soft); background: none; border: none; border-bottom: 1.5px solid #e2c9cd; padding: 2px 1px 3px; margin-left: 4px; cursor: pointer; font-style: normal; }
.rf-storylink, .cd-storylink { font-family: var(--ss); font-size: 12.5px; font-weight: 600; letter-spacing: .2px; color: var(--accent-soft); background: none; border: none; border-bottom: 1.5px solid #e2c9cd; border-radius: 0; padding: 4px 1px 5px; cursor: pointer; transition: opacity .15s ease; }
.rf-storylink:active, .cd-storylink:active { opacity: .55; }
.rf-storylink { margin: 3px 0 6px; }
.cd-storylink { display: block; margin-top: 22px; }
.rf-deep-body { margin-top: 13px; }
.rf-deep-body p { font-size: 14.5px; color: var(--ink); line-height: 1.62; margin: 0 0 13px; }
.rf-deep-body p:last-child { margin-bottom: 2px; }
.rf-deep-body b { font-family: var(--ss); font-size: 11px; letter-spacing: .8px; text-transform: uppercase; font-weight: 700; color: var(--accent-soft); }

/* ---- IA refactor: shared ---- */
.ov-title { font-family: var(--ss); font-size: 13px; font-weight: 600; color: var(--muted); }
.thread-chip { cursor: pointer; }
.tc-n { font-weight: 700; color: var(--accent-soft); margin-left: 3px; }

/* Today: tappable edition date + developing chips + filter bar */
.dk-edition { background: none; border: 0; cursor: pointer; padding: 6px 0 0; display: inline-flex; align-items: center; gap: 6px; }
.dk-edition::after { content: "›"; color: var(--line-2); font-size: 13px; }
.dk-edition-static { font-family: var(--ss); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); margin-top: 16px; }
.dk-developing { margin-top: 20px; width: 100%; max-width: 460px; }
.dvl { font-family: var(--ss); font-size: 9.5px; letter-spacing: 1.8px; text-transform: uppercase; font-weight: 700; color: var(--faint); margin-bottom: 8px; }
.dv-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.deck-filter { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 18px; background: var(--tint); border-bottom: 1px solid var(--line); font-family: var(--ss); font-size: 12px; color: var(--tint-ink); }
.deck-filter button { font-family: var(--ss); font-size: 12px; font-weight: 600; color: var(--accent-soft); background: none; border: none; cursor: pointer; }

/* Calls ledger */
.cl-sec { font-family: var(--ss); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; color: var(--faint); margin: 24px 0 6px; }
.cl-row { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 14px 15px; cursor: pointer; margin-bottom: 8px; }
.cl-q { font-family: var(--fr); font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.cl-right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cl-sub { font-family: var(--ss); font-size: 10px; font-weight: 700; letter-spacing: .3px; color: var(--accent-soft); }
.cl-pill { flex: none; font-family: var(--ss); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 4px 11px; }
.cl-pill.pending { background: var(--tint); color: var(--muted); }
.cl-pill.right { background: #eaf1ec; color: #2f6b4a; }
.cl-pill.wrong { background: #f5ece9; color: #9c4a35; }
.cl-pill.somewhat { background: #f6efe2; color: #8a6d3b; }
.cl-pill.reflect { background: #efe6e6; color: var(--accent-soft); }

/* Call detail */
.cd-q { font-family: var(--fr); font-size: 22px; font-weight: 600; line-height: 1.24; letter-spacing: -.3px; }
.cd-meta { font-family: var(--ss); font-size: 11.5px; color: var(--faint); margin-top: 8px; }
.cd-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cd-opt { font-family: var(--ss); font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); background: var(--bg); border-radius: 999px; padding: 8px 14px; }
.cd-opt.on { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.cd-rows { margin-top: 20px; border-top: 1px solid var(--line); }
.cd-row { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 12px 2px; }
.cd-k { font-family: var(--ss); font-size: 12px; color: var(--muted); }
.cd-v { font-family: var(--ss); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.cd-reason-lbl { font-family: var(--ss); font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: var(--faint); margin-top: 22px; }
.cd-reason { font-family: var(--nr); font-size: 16px; line-height: 1.6; color: var(--ink); margin-top: 8px; }
.cd-empty { color: var(--faint); font-style: italic; }

/* thread-aware: read-only "you called this", revisit affordance, update trail, drift tell */
.callfollow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); }
.cf-txt { font-family: var(--ss); font-size: 12.5px; color: var(--muted); }
.cf-view { font-family: var(--ss); font-size: 12.5px; font-weight: 600; color: var(--accent-soft); background: none; border: none; cursor: pointer; padding: 0; }
.revisit { margin-top: 18px; padding: 13px 15px; border: 1px solid var(--line-2); border-left: 2px solid var(--accent-soft); border-radius: 13px; background: var(--card); }
.rv-cue { font-family: var(--nr); font-size: 14px; color: var(--ink-2); }
.rv-btn { margin-top: 7px; font-family: var(--ss); font-size: 12.5px; font-weight: 600; color: var(--accent-soft); background: none; border: none; border-bottom: 1.5px solid #e2c9cd; padding: 3px 1px 4px; cursor: pointer; }
.upd-cur { font-family: var(--nr); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin: 4px 0 14px; }
.rf-req { font-family: var(--ss); font-size: 10px; letter-spacing: .4px; text-transform: uppercase; color: var(--accent-soft); font-weight: 700; }
.cd-trail { margin-top: 22px; }
.cd-tl { margin-top: 8px; border-left: 2px solid var(--line-2); padding-left: 14px; display: flex; flex-direction: column; gap: 12px; }
.cd-tl-row { display: flex; flex-direction: column; gap: 2px; position: relative; }
.cd-tl-row::before { content: ""; position: absolute; left: -19px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.cd-tl-row.rev::before { background: var(--accent-soft); }
.cd-tl-when { font-family: var(--ss); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.cd-tl-pos { font-family: var(--nr); font-size: 14.5px; font-weight: 600; color: var(--ink); }
.cd-tl-what { font-family: var(--nr); font-size: 13.5px; font-style: italic; color: var(--ink-2); line-height: 1.45; }
.cd-tl-note { font-family: var(--ss); font-size: 11.5px; color: var(--faint); margin-top: 10px; line-height: 1.4; }
.cd-revisit { display: block; width: 100%; margin-top: 20px; font-family: var(--ss); font-size: 13px; font-weight: 600; color: var(--ink); background: var(--card); border: 1px solid var(--line-2); border-radius: 999px; padding: 12px; cursor: pointer; }
.jp-drift { font-family: var(--nr); font-size: 13.5px; line-height: 1.55; color: var(--ink-2); padding: 13px 15px; border: 1px solid var(--line-2); border-radius: 13px; background: var(--card); margin-top: 4px; }

/* You hub */
.you-list { display: grid; gap: 10px; margin-top: 16px; }
.you-card { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 16px 17px; cursor: pointer; }
.yc-main { display: flex; flex-direction: column; gap: 3px; }
.yc-t { font-family: var(--fr); font-size: 17px; font-weight: 600; color: var(--ink); }
.yc-h { font-family: var(--ss); font-size: 12px; color: var(--faint); }
.yc-go { font-size: 22px; color: var(--line-2); flex: none; }

/* Calendar archive */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.cal-nav button { font-size: 20px; color: var(--accent); background: none; border: none; cursor: pointer; padding: 6px 12px; }
.cal-mn { font-family: var(--fr); font-size: 18px; font-weight: 600; color: var(--ink); }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 14px; }
.cal-dow span { text-align: center; font-family: var(--ss); font-size: 10px; letter-spacing: .4px; color: var(--faint); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 6px; }
.cal-cell { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; font-family: var(--ss); font-size: 13px; color: var(--faint); border-radius: 10px; }
.cal-cell.empty { visibility: hidden; }
.cal-cell.has { color: var(--bg); background: var(--accent); font-weight: 700; border: none; cursor: pointer; }

/* Past-edition deck inside the overlay */
.pastdeck { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; height: calc(100dvh - env(safe-area-inset-top) - 58px); }
.pastdeck::-webkit-scrollbar { display: none; }

/* Thread page */
.thb-list { display: grid; gap: 0; }
.thb { display: flex; gap: 10px; border-top: 1px solid var(--line); padding: 11px 0; }
.thb-d { flex: none; font-family: var(--ss); font-size: 11px; color: var(--faint); width: 78px; }
.thb-n { font-family: var(--nr); font-size: 14.5px; color: var(--ink); line-height: 1.45; }
.th-filter { margin-top: 16px; }

/* One-line tagline above the swipe dots */
.dk-toptag { flex: none; text-align: center; font-family: var(--nr); font-style: italic; color: var(--muted); white-space: nowrap; overflow: hidden; font-size: clamp(8px, 2.5vw, 11.5px); letter-spacing: .1px; padding: 9px 10px 1px; }

/* Condensed inline call on the deck (expanded, prominent) */
.mk.compact { margin-top: 18px; padding: 13px 14px; border-color: var(--accent-soft); }
.mk.compact .mk-q { font-size: 15px; margin-top: 6px; }
.mk.compact .mk-btns { margin-top: 10px; }
.mk.compact .mk-conf-lbl { margin-top: 10px; }
.mk.compact .mk-conf { margin-top: 6px; }
.mk.compact .mk-conviction { margin-top: 9px; }
.mk.compact .mk-reasonwrap { margin-top: 10px; }
.mk.compact .mk-reason { min-height: 30px; }

/* You page: grouped sections + icons */
.you-sec { font-family: var(--ss); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; color: var(--faint); margin: 26px 0 10px; }
.you-sec:first-of-type { margin-top: 18px; }
.you-card { gap: 13px; }
.yc-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--tint); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.yc-main { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.you-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.you-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 16px 15px; cursor: pointer; text-align: left; }
.yt-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--tint); color: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; }
.yt-t { font-family: var(--fr); font-size: 16px; font-weight: 600; color: var(--ink); }
.yt-h { font-family: var(--ss); font-size: 11.5px; color: var(--faint); line-height: 1.35; }

/* Confidence slider (probability) */
.conf-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 999px; background: var(--line-2); margin: 12px 0 6px; touch-action: none; }
.conf-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); border: 2px solid var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: pointer; }
.conf-slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); border: 2px solid var(--card); cursor: pointer; }
.conf-val { color: var(--accent-soft); font-weight: 700; }
.conf-ends { display: flex; justify-content: space-between; font-family: var(--ss); font-size: 10px; color: var(--faint); }
.mk.compact .conf-slider { margin: 10px 0 5px; }
.conf-ticks { display: flex; font-family: var(--ss); font-size: 10px; color: var(--faint); margin-top: 1px; }
.conf-ticks span { flex: 1; }
.conf-ticks span:nth-child(2) { text-align: center; }
.conf-ticks span:last-child { text-align: right; }

/* deck card icon marks (heart + auto-read), top-right corner */
.deck-card.story { position: relative; }
.deck-card.story .dk-tag { padding-right: 50px; }
.deck-card.story .card-dot { position: absolute; top: 27px; left: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-soft); display: none; }
.deck-card.story.unread .card-dot { display: block; }
.card-marks { position: absolute; top: 13px; right: 13px; display: flex; gap: 1px; z-index: 3; }
.card-mk { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: none; background: transparent; color: var(--line-2); cursor: pointer; border-radius: 999px; transition: transform .12s ease, color .18s ease; }
.card-mk:active { transform: scale(.84); }
.card-mk.heart.on { color: var(--accent-soft); }

/* cover call-to-action */
.dk-cta { font-family: var(--ss); font-size: 13px; font-weight: 600; letter-spacing: .2px; color: var(--accent-soft); background: none; border: none; border-bottom: 1.5px solid #e2c9cd; border-radius: 0; padding: 4px 2px 5px; margin-top: 18px; cursor: pointer; align-self: center; transition: opacity .15s ease; }
.dk-cta:active { opacity: .55; }
.markbtn svg { width: 16px; height: 16px; }
.cal-k { width: 64px; }

/* Settings: about + data */
.set-rowmain { flex: 1; min-width: 0; }
.set-about { font-size: 15px; color: var(--ink-2); line-height: 1.6; margin: 12px 0 4px; }
.set-btn { width: 100%; font-family: var(--ss); font-size: 13.5px; font-weight: 600; border-radius: 12px; padding: 13px; cursor: pointer; margin-top: 10px; background: var(--card); border: 1px solid var(--line-2); color: var(--ink); }
.set-btn.danger { color: #9c4a35; border-color: #e3c9c2; }

/* The Method — read-only editorial page behind the gear */
.mth-lede { margin: 18px 0 6px; }
.mth-lede p { font-family: var(--nr); font-size: 16.5px; color: var(--ink-2); line-height: 1.66; margin: 0 0 14px; }
.mth-det { border-top: 1px solid var(--line); }
.mth-det summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 2px; font-family: var(--fr); font-size: 17px; font-weight: 600; color: var(--ink); }
.mth-det summary::-webkit-details-marker { display: none; }
.mth-det summary::after { content: "+"; font-family: var(--ss); font-size: 19px; font-weight: 400; color: var(--faint); line-height: 1; }
.mth-det[open] summary::after { content: "−"; }
.mth-body { padding: 2px 2px 18px; }
.mth-intro { font-family: var(--nr); font-size: 15px; color: var(--muted); line-height: 1.55; margin: 0 0 14px; }
.mth-dl { display: grid; gap: 13px; margin: 0; }
.mth-row dt { font-family: var(--fr); font-size: 15.5px; font-weight: 600; color: var(--ink); }
.mth-row dd { font-family: var(--ss); font-size: 13px; color: var(--muted); line-height: 1.5; margin: 3px 0 0; }
.mth-sub { font-family: var(--ss); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; color: var(--faint); margin: 18px 0 9px; }
.mth-sub:first-child { margin-top: 2px; }
.mth-note { font-family: var(--nr); font-size: 14px; color: var(--muted); line-height: 1.55; margin: 0; }
.mth-bars { display: grid; gap: 9px; margin: 0; }
.mth-bar { display: flex; align-items: center; gap: 11px; }
.mb-k { flex: none; width: 9.5em; font-family: var(--ss); font-size: 12.5px; color: var(--ink-2); }
.mb-track { flex: 1; height: 7px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.mb-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent-soft); }
.mb-n { flex: none; font-family: var(--ss); font-size: 11.5px; color: var(--faint); min-width: 1.4em; text-align: right; }
.mth-foot { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 4px; }
.mth-voice { font-family: var(--ss); font-size: 13px; color: var(--ink-2); margin: 12px 0 12px; }
.mth-spd { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.mth-spdopt { font-family: var(--ss); font-size: 13px; font-weight: 600; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 8px 15px; cursor: pointer; }
.mth-spdopt.on { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* Reflection reframe — outcome is neutral information; reasoning is the verdict */
.rf-outcome { font-family: var(--ss); font-size: 12.5px; color: var(--ink-2); margin-top: 9px; line-height: 1.5; }
.rf-outcome b { font-weight: 700; color: var(--ink); }
.rf-outcome.match { color: #2f6b4a; }
.rf-beat-verdict { background: var(--tint); border: none; border-radius: 13px; padding: 14px 14px 13px; margin-top: 14px; }
.rf-beat-verdict .rf-lbl { color: var(--accent); }
.rf-verdict-note { font-family: var(--ss); font-size: 12px; color: var(--muted); line-height: 1.5; margin: 7px 0 0; }
.rf-indep { font-family: var(--ss); font-size: 12.5px; line-height: 1.5; color: var(--ink-2); background: var(--card); border: 1px solid var(--line-2); border-radius: 11px; padding: 10px 12px; margin: 11px 0; }
.rf-indep b { color: var(--ink); }
.rf-indep.agree { border-color: #cfe0d4; }
.rf-indep.diverge { border-color: var(--accent-soft); }
.rf-net { font-family: var(--ss); font-size: 12.5px; line-height: 1.5; border-radius: 10px; padding: 9px 12px; margin-top: 11px; }
.rf-net b { font-weight: 700; }
.rf-net-right { background: #eaf1ec; color: #2f6b4a; }
.rf-net-somewhat { background: #f6efe2; color: #8a6d3b; }
.rf-net-missed { background: #f5ece9; color: #9c4a35; }
/* Process axis + outcome×reasoning 2x2 */
.pr-dist { display: flex; gap: 8px; margin: 2px 0 4px; }
.pr-dist-cell { flex: 1; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 10px 6px; }
.pr-dist-n { font-family: var(--fr); font-size: 22px; font-weight: 600; color: var(--ink); }
.pr-dist-l { font-family: var(--ss); font-size: 10.5px; letter-spacing: .3px; color: var(--muted); margin-top: 2px; }
.pr-2x2-lbl { font-family: var(--ss); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 700; color: var(--faint); margin: 15px 0 8px; }
.pr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pr-cell { border-radius: 12px; padding: 12px; border: 1px solid var(--line); background: var(--card); }
.pr-cell.good { background: #eaf1ec; border-color: #cfe0d4; }
.pr-cell.warn { background: #f6f1e8; border-color: #e7dcc8; }
.pr-cell.bad { background: #f5ece9; border-color: #e6d2cb; }
.pr-n { font-family: var(--fr); font-size: 21px; font-weight: 600; color: var(--ink); line-height: 1; }
.pr-cl { font-family: var(--ss); font-size: 12.5px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.pr-cd { font-family: var(--ss); font-size: 10.5px; color: var(--muted); margin-top: 1px; }
/* Thread curation — momentum chip + collapsed older beats */
.dk-repnote { font-family: var(--nr); font-size: 13.5px; line-height: 1.55; color: var(--muted); max-width: 32ch; margin: 10px auto 0; }
.tc-new { font-family: var(--ss); font-size: 8.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--accent-soft); margin-left: 5px; vertical-align: middle; }
.th-older-btn { font-family: var(--ss); font-size: 12px; font-weight: 600; color: var(--accent); background: none; border: none; cursor: pointer; padding: 9px 0 2px; }
.th-older { display: grid; gap: 0; }

.hidden { display: none !important; }

/* Update toast: appears only when a newer version has installed under a running page. */
.update-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + var(--tabh) + 12px); z-index: 60; background: var(--card); color: var(--accent); border: 1px solid var(--line-2); border-radius: 99px; padding: 9px 16px; font-family: var(--ss); font-size: 12px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px -12px rgba(43,51,58,.35); }
