@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/fraunces-latin.woff2') format('woff2');
}

:root {
  --bg: #14121a;
  --bg-2: #1c1926;
  --panel: #211d2e;
  --panel-2: #2a2539;
  --border: #35304a;
  --text: #e9e4f2;
  --muted: #a79fbd;
  --gold: #c8a24a;
  --gold-soft: #d8b968;
  --accent: #8a6fd1;
  --danger: #d1607a;
  --success: #6fae8a;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 70% -10%, #241f33 0%, var(--bg) 55%);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--gold-soft); }
button { font-family: inherit; }

/* ---------- Layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: rgba(20, 18, 26, 0.75); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: block; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px; font-weight: 600; letter-spacing: 0.3px; color: var(--text);
}
.brand-strap {
  color: var(--gold); font-weight: 400; letter-spacing: 0.4px;
  font-size: 11px; margin-top: 2px; text-transform: lowercase;
}
.brand .mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--gold) 0 50%, #1a1622 50% 100%);
  box-shadow: 0 0 0 1px var(--border), inset 0 0 8px rgba(0,0,0,.5);
}

.nav { display: flex; gap: 6px; align-items: center; }
.nav button {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 8px 14px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600;
  white-space: nowrap;
}
.nav button:hover { color: var(--text); background: var(--panel); }
.nav button.active { color: var(--bg); background: var(--gold); }
.nav .who { color: var(--muted); font-size: 13px; margin-right: 6px; }

/* ---------- Cards / panels ---------- */
.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; }
h1 { font-size: 30px; margin: 0 0 6px; }
h2 { font-size: 22px; margin: 0 0 14px; }
h3 { font-size: 17px; margin: 0 0 8px; }
.subtitle { color: var(--muted); margin: 0 0 22px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
input, textarea, select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); padding: 11px 13px; border-radius: 10px; font-size: 15px; font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
textarea { min-height: 200px; resize: vertical; line-height: 1.6; }
.field-error { color: var(--danger); font-size: 13px; margin-top: 5px; min-height: 16px; }

.btn {
  background: var(--gold); color: #1a1520; border: none; padding: 11px 20px;
  border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 15px;
}
.btn:hover { background: var(--gold-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.danger:hover { background: rgba(209, 96, 122, .12); }
.btn.small { padding: 7px 13px; font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

/* ---------- Auth ---------- */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tabs button {
  flex: 1; background: var(--bg-2); border: 1px solid var(--border); color: var(--muted);
  padding: 10px; border-radius: 10px; cursor: pointer; font-weight: 600;
}
.auth-tabs button.active { background: var(--gold); color: #1a1520; border-color: var(--gold); }
.hero-quote { font-family: var(--serif); font-style: italic; color: var(--muted); text-align: center; margin: 0 0 24px; }

/* ---------- Prompts ---------- */
.cat { margin-bottom: 22px; }
.cat h3 { color: var(--gold-soft); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.prompt-card {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s, transform .1s;
}
.prompt-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.prompt-card .pt { font-weight: 700; margin-bottom: 6px; }
.prompt-card .pb { color: var(--muted); font-size: 14px; }

/* ---------- Entries ---------- */
.entry-item {
  border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px;
  background: var(--panel-2); cursor: pointer;
}
.entry-item:hover { border-color: var(--accent); }
.entry-item .meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.entry-item .body-preview { color: var(--muted); font-size: 14px; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pill { background: var(--bg); border: 1px solid var(--border); color: var(--muted);
  padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.pill.tag { color: var(--gold-soft); border-color: rgba(200,162,74,.4); }
.mood-dot { display: inline-flex; gap: 3px; }
.mood-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); display: inline-block; }
.mood-dot i.on { background: var(--gold); }

.tags-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg-2); }
.tags-input input { border: none; background: transparent; flex: 1; min-width: 120px; padding: 4px; }
.tags-input input:focus { outline: none; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel);
  border: 1px solid var(--border); padding: 4px 8px; border-radius: 999px; font-size: 13px; color: var(--gold-soft); }
.tag-chip button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0; }

/* mood selector */
.mood-select { display: flex; gap: 8px; }
.mood-select button {
  flex: 1; background: var(--bg-2); border: 1px solid var(--border); color: var(--muted);
  padding: 10px 0; border-radius: 10px; cursor: pointer; font-weight: 700;
}
.mood-select button.sel { background: var(--gold); color: #1a1520; border-color: var(--gold); }

/* ---------- Insights ---------- */
.stat { text-align: center; padding: 18px; }
.stat .n { font-family: var(--serif); font-size: 36px; color: var(--gold-soft); line-height: 1; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 6px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars .bar { flex: 1; background: linear-gradient(180deg, var(--gold), var(--accent)); border-radius: 6px 6px 0 0; min-height: 4px; position: relative; }
.bars .bar .cap { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); white-space: nowrap; }
.taglist { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Misc ---------- */
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty .big { font-size: 40px; margin-bottom: 10px; opacity: .6; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); opacity: 0;
  transition: opacity .2s, transform .2s; pointer-events: none; z-index: 100; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--danger); }
.toast.success { border-color: var(--success); }
.hidden { display: none !important; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center;
  padding: 24px; z-index: 50;
}
.modal {
  width: 100%; max-width: 680px; max-height: 88vh; overflow: auto;
  background: var(--surface, #16161c); color: var(--text, #e8e8ea);
  border: 1px solid var(--border, #2a2a33); border-radius: 14px;
  padding: 22px; box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.loading { text-align: center; color: var(--muted); padding: 60px; }
.spin { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--gold);
  border-radius: 50%; animation: sp 0.8s linear infinite; margin: 0 auto 12px; }
@keyframes sp { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.reflection { font-family: var(--serif); line-height: 1.7; white-space: pre-wrap; }

/* ---------- Sober clock ---------- */
.sober-clock { display: flex; justify-content: center; gap: 18px; margin: 18px 0 6px; flex-wrap: wrap; }
.clock-unit { display: flex; flex-direction: column; align-items: center; min-width: 70px; }
.clock-unit .cn {
  font-family: var(--serif); font-size: 48px; line-height: 1; color: var(--gold-soft);
  font-variant-numeric: tabular-nums; text-shadow: 0 0 24px rgba(200,162,74,.25);
}
.clock-unit .cl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }
@media (max-width: 520px) { .clock-unit .cn { font-size: 34px; } .clock-unit { min-width: 54px; } }

/* --- SAIS attribution ------------------------------------------------- */
.site-attribution {
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  opacity: 0.55;
  font-size: 0.8125rem;
}
.site-attribution a { color: inherit; text-decoration: underline; }
.site-attribution a:hover { opacity: 1; }

/* Practice body text. Rendered in full and never truncated — the breathwork
   contraindications live inside this text, and a "read more" fold is exactly
   where someone in distress stops reading. */
.practice-body {
  margin: 12px 0 4px;
  padding: 14px 16px;
  background: var(--panel-2, rgba(255, 255, 255, 0.03));
  border-left: 3px solid var(--accent, #6ea8fe);
  border-radius: 6px;
  max-width: 70ch;
}
.practice-body p {
  margin: 0 0 12px;
  line-height: 1.65;
}
.practice-body p:last-child { margin-bottom: 0; }
.practice-body strong { font-weight: 600; }

/* Active state on the level/kind filter buttons. */
.btn.ghost.active {
  border-color: var(--accent, #6ea8fe);
  color: var(--accent, #6ea8fe);
}

/* "or" divider between password and social sign-in. */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  color: var(--muted, #8b8397);
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}
.btn.social { font-weight: 500; }

/* ======================= CRISIS SUPPORT ======================= */
/* Deliberately high-contrast and always visible. This is the one control in
   the product that someone may need to find while distressed, so it does not
   hide, collapse or scroll away. */
.crisis-trigger {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 900;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #7a1f2b;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.crisis-trigger:hover { background: #942634; }
.crisis-trigger:focus-visible { outline: 3px solid #f0c674; outline-offset: 2px; }

.crisis-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 16px;
}
.crisis-panel {
  background: #1a1622;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  max-width: 620px;
  width: 100%;
  padding: 20px 22px 24px;
}
.crisis-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crisis-head h2 { margin: 0; font-size: 22px; }

.crisis-emergency {
  margin: 14px 0 6px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(122, 31, 43, 0.28);
  border: 1px solid rgba(200, 80, 96, 0.5);
}
.crisis-999 {
  display: inline-block;
  margin: 10px 0 6px;
  background: #7a1f2b;
  color: #fff;
  text-decoration: none;
}
.crisis-group {
  margin: 20px 0 8px;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #b9b0c6;
}
.crisis-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.crisis-item:last-of-type { border-bottom: none; }
.crisis-item .btn { text-decoration: none; white-space: nowrap; }
.crisis-item p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; }
.crisis-footer { margin-top: 18px; font-size: 13px; }

/* ======================= RESPONSIVE ======================= */
/* Phone is the primary device for this product — someone logs a craving at
   11pm on a phone, not at a desk. The nav is eight items, so below 900px it
   wraps and scrolls horizontally rather than overflowing off-screen. */
@media (max-width: 1024px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }
  .topbar .brand { justify-content: center; }
  .brand-strap { display: none; }

  /* Mobile nav behaviour is defined by the hamburger block lower in this
     file (.nav collapses, .nav.open expands). The old horizontal-scroll nav
     was removed — a scroll strip with no affordance was undiscoverable. */

  .wrap { padding: 12px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .panel { padding: 14px; }

  /* Inputs at 16px or larger, otherwise iOS Safari zooms the page on focus. */
  input, textarea, select { font-size: 16px; }

  .row { flex-wrap: wrap; }
  .btn { min-height: 44px; }

  .crisis-trigger { left: 16px; right: 16px; bottom: 12px; text-align: center; }
  .crisis-panel { padding: 16px; }
  .crisis-item .row { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
  .auth-card { padding: 18px 16px; }
  .hero-quote { font-size: 14px; }
  .practice-body { padding: 12px; }
  .section-title { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Respect users who have asked for less motion. */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ======================= PLANNER ======================= */
/* Capture is the widest, most obvious control on the screen. A thought that
   takes effort to record is a thought lost. */
.capture-input {
  width: 100%;
  font-size: 16px;
  padding: 14px 16px;
  margin-top: 8px;
}

/* The frog is visually singular — one box, on its own, above everything. */
.frog-panel {
  border: 1px solid rgba(200, 162, 74, 0.45);
  background: rgba(200, 162, 74, 0.07);
}
.frog-title { font-size: 19px; font-weight: 600; margin: 8px 0 0; line-height: 1.4; }

.task-row { gap: 10px; align-items: flex-start; }
.task-check {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #c8a24a;
  cursor: pointer;
  font-size: 15px; line-height: 1;
}
.task-check:hover { border-color: #c8a24a; }
.task-title { line-height: 1.45; }
.task-done .task-title { text-decoration: line-through; opacity: 0.55; }

/* Focus bar sits above the crisis button, never covering it. */
.focus-bar {
  position: fixed;
  left: 16px; right: 16px; bottom: 76px;
  z-index: 850;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #241f30;
  border: 1px solid rgba(200, 162, 74, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.focus-clock { font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 600; color: #c8a24a; }

@media (min-width: 1025px) {
  .focus-bar { left: auto; right: 24px; width: 380px; bottom: 84px; }
}

/* ======================= DASHBOARD ======================= */
.dash-hero { border: 1px solid rgba(200, 162, 74, 0.3); }
.dash-greeting { margin: 0 0 10px; font-size: 24px; }
.dash-line { margin: 0; font-size: 17px; line-height: 1.55; color: #e6e1ee; }
.dash-line-src { margin: 6px 0 0; font-size: 13px; color: #9a92a8; }
.hero-sub { margin: 6px 0 0; font-size: 13px; color: #9a92a8; text-align: center; line-height: 1.5; }

.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.dash-stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer; text-align: left; color: inherit;
}
.dash-stat:hover { border-color: rgba(200, 162, 74, 0.5); }
.dash-stat-value { font-size: 26px; font-weight: 600; color: #c8a24a; line-height: 1.1; }
.dash-stat-label { font-size: 14px; }
.dash-stat-sub { font-size: 12px; color: #9a92a8; }

.dash-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.dash-action {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px; border-radius: 10px; text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer; color: inherit; min-height: 64px;
}
.dash-action:hover { border-color: rgba(200, 162, 74, 0.5); }
.dash-action .muted { font-size: 13px; }

.soon-item { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.soon-item:last-child { border-bottom: none; }
.soon-item p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; }

/* ======================= ONBOARDING & EXPLAINERS ======================= */
.onboard-panel { max-width: 460px; }
.onboard-body { font-size: 16px; line-height: 1.6; margin: 12px 0 0; }
.onboard-dots { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.onboard-dots .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.onboard-dots .dot.on { background: #c8a24a; }

.explainer { margin-top: 10px; }
.explainer-body {
  margin-top: 8px; padding: 12px 14px;
  border-left: 2px solid rgba(200, 162, 74, 0.5);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 6px 6px 0;
  max-width: 65ch;
}
.explainer-body p { margin: 0 0 10px; font-size: 14px; line-height: 1.6; }
.explainer-body p:last-child { margin-bottom: 0; }

/* ======================= COURSES ======================= */
.course-framework { margin: 8px 0 0; font-size: 12px; color: #9a92a8; font-style: italic; }
.lesson-read { border-color: rgba(200, 162, 74, 0.35); }
.try-this {
  margin-top: 14px; padding: 12px 14px;
  background: rgba(200, 162, 74, 0.1);
  border-radius: 6px; font-size: 14px; line-height: 1.6;
}

/* ======================= EXERCISE HOW-TO ======================= */
.exercise-item { border-bottom: 1px solid rgba(255, 255, 255, 0.06); padding-bottom: 4px; }
.exercise-item:last-child { border-bottom: none; }
.exercise-name-btn {
  text-align: left; background: none; border: none; color: inherit;
  cursor: pointer; font-size: inherit; padding: 0;
}
.exercise-name-btn:hover { color: #c8a24a; }
.exercise-how-hint { font-size: 12px; color: #9a92a8; }
.exercise-howto {
  margin: 4px 0 10px 22px; padding: 10px 14px;
  border-left: 2px solid rgba(200, 162, 74, 0.4);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 6px 6px 0; max-width: 62ch;
}
.exercise-howto p { margin: 0 0 6px; font-size: 14px; line-height: 1.55; }
.exercise-targets { color: #9a92a8; font-size: 12px !important; text-transform: uppercase; letter-spacing: 0.03em; }
.exercise-cue { color: #d8cfa0; }
.exercise-mistake { color: #d7a99a; }
.exercise-ladder { font-size: 13px !important; color: #9a92a8; }

/* ======================= MOBILE NAV (hamburger) ======================= */
.brand-row { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-toggle {
  display: none; /* desktop: hidden, nav is always shown */
  font-size: 22px; line-height: 1;
  background: none; border: 1px solid rgba(255,255,255,0.2);
  color: inherit; border-radius: 8px; padding: 6px 12px; cursor: pointer;
  min-height: 44px; min-width: 44px;
}

@media (max-width: 1024px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 14px; }
  .nav-toggle { display: block; }

  /* Collapsed by default on mobile; the hamburger toggles .open */
  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 10px;
    overflow: visible;
  }
  .nav.open { display: flex; }
  .nav button {
    width: 100%;
    text-align: left;
    min-height: 48px;
    font-size: 16px;
    border-radius: 8px;
  }
  .nav .who { display: none; }
}

/* ======================= DAILY LINE (quote styling) ======================= */
.dash-line {
  font-size: 17px; line-height: 1.55; color: #e8e2d0;
  border-left: 3px solid rgba(200, 162, 74, 0.55);
  padding-left: 14px; margin: 6px 0 0; font-style: italic;
}
.dash-line-src { padding-left: 14px; }

/* ======================= DASHBOARD LINE "ANOTHER" ======================= */
.dash-line-more {
  margin-top: 10px; background: none; border: none;
  color: #9a92a8; font-size: 13px; cursor: pointer; padding: 2px 0;
}
.dash-line-more:hover { color: #c8a24a; }

/* ======================= MODULE EPIGRAPH ======================= */
/* The strapline atop the shadow-work module. Quiet, not shouting. */
.module-epigraph {
  margin: 0 0 16px; padding: 0 0 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-style: italic; color: #c9c1d0; font-size: 15px; line-height: 1.55;
}
.module-epigraph-src { font-style: normal; color: #9a92a8; font-size: 13px; }

/* ======================= BRAND MARK ======================= */
.brand-mark { display: block; flex: 0 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; }
.auth-wordmark {
  display: block; width: 100%; max-width: 300px; height: auto;
  margin: 4px auto 10px;
}

/* Between the hamburger threshold and wide desktop, hide the strapline
   subtitle on the top bar so eight nav items never crowd against it. */
@media (max-width: 1200px) {
  .brand-strap { display: none; }
}

/* ======================= PROFILE & NEEDS ======================= */
.field { display: block; margin: 10px 0; }
.field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.toggle-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; cursor: pointer; }
.toggle-row input { width: 18px; height: 18px; }
.muted-link { color: var(--muted); font-size: 14px; text-decoration: underline; }
.muted-link:hover { color: var(--gold); }

.needs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 6px; }
.need-chip {
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 14px 16px; border-radius: 10px; cursor: pointer; color: inherit;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
}
.need-chip:hover { border-color: rgba(200,162,74,0.5); }
.need-chip.on { border-color: var(--gold); background: rgba(200,162,74,0.1); }
.need-chip.urgent { border-color: rgba(200,80,96,0.5); }
.need-chip.urgent:hover { border-color: #c85060; background: rgba(122,31,43,0.2); }
.need-blurb, .need-cta { font-size: 13px; color: var(--muted); }
.need-cta { color: var(--gold); }
.need-picker { border: 1px solid rgba(200,162,74,0.25); }

/* ======================= BRAND AS BUTTON + GOLD HAMBURGER ======================= */
.who-btn {
  background: none; border: 1px solid transparent; cursor: pointer;
  font: inherit; color: var(--gold); font-weight: 600; padding: 8px 12px;
  border-radius: 10px;
}
.who-btn:hover { border-color: var(--gold); background: rgba(200,162,74,0.1); }
.nav-toggle {
  color: var(--gold);
  border-color: var(--gold);
}
.nav-toggle:hover { background: rgba(200, 162, 74, 0.12); }

/* ======================= SUPPORT HUB ======================= */
.support-path {
  padding: 16px; margin: 12px 0; border-radius: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
}
.support-path h3 { margin: 0 0 6px; }
.support-path .btn { margin-top: 6px; }
.support-crisis { border-color: rgba(200,80,96,0.4); }

/* ======================= REGISTER INTEREST + HOBBIES ======================= */
.soon-open {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 14px; margin-bottom: 10px;
  color: inherit; font: inherit; transition: border-color .15s, background .15s;
}
.soon-open:hover { border-color: var(--gold); background: rgba(200,162,74,0.08); }
.soon-open .pill { color: var(--gold); white-space: nowrap; }
.hobby-item {
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.hobby-item:last-child { border-bottom: none; }
.hobby-item strong { display: block; margin-bottom: 2px; }
.btn.ghost.small.active { border-color: var(--gold); color: var(--gold); }

/* ======================= IN-APP REMINDERS ======================= */
.reminders { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; }
.reminder {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 10px;
  background: rgba(200,162,74,0.08); border: 1px solid rgba(200,162,74,0.28);
}
.reminder .grow { flex: 1; }
.reminder-x {
  background: none; border: none; color: var(--muted, #9a93a6);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.reminder-x:hover { color: var(--gold); }

/* ======================= INSIGHTS — OBSERVATIONS + DOW ======================= */
.insight-obs .obs {
  padding: 12px 14px; margin: 8px 0; border-radius: 8px;
  background: rgba(255,255,255,0.03); border-left: 3px solid var(--gold);
  line-height: 1.5;
}
.insight-obs .obs-trend-down { border-left-color: #c08; }
.insight-obs .obs-trend-up { border-left-color: #6a4; }
.dow-grid { display: flex; gap: 8px; align-items: flex-end; height: 120px; margin-top: 12px; }
.dow-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.dow-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.dow-bar { width: 100%; background: var(--gold); border-radius: 4px 4px 0 0; min-height: 4px; }
.dow-label { margin-top: 6px; font-size: 12px; color: var(--muted, #9a93a6); }

/* ======================= OFFLINE / SYNC STATUS ======================= */
.sync-status {
  position: fixed; left: 16px; bottom: 16px; z-index: 40;
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.sync-status.hidden { display: none; }
.sync-status.offline { background: #3a2a2a; color: #e8b; border: 1px solid #c08; }
.sync-status.syncing { background: rgba(200,162,74,0.15); color: var(--gold); border: 1px solid var(--gold); }

/* ======================= SECURITY: MFA + BIOMETRIC ======================= */
.mfa-input {
  font-size: 24px; letter-spacing: 6px; text-align: center;
  width: 100%; max-width: 220px; padding: 10px; border-radius: 8px;
}
.mfa-secret { margin: 8px 0; }
.mfa-key {
  display: inline-block; margin-top: 6px; padding: 8px 10px;
  background: var(--bg-2, #1a1a1f); border-radius: 6px;
  font-family: monospace; font-size: 15px; letter-spacing: 2px; word-break: break-all;
}
.sec-slot { margin-bottom: 6px; }

/* Biometric lock screen — full-cover, above everything except crisis. */
.bio-lock {
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg, #0f0f12); display: flex; align-items: center; justify-content: center;
}
.bio-lock-card { text-align: center; padding: 32px; max-width: 340px; }
.bio-lock-mark { font-size: 44px; margin-bottom: 8px; }

/* ============================ POMODORO BREAK ============================ */
.break-modal { text-align: center; max-width: 380px; }
.break-mark { font-size: 40px; margin-bottom: 4px; }
.break-clock {
  font-size: 46px; font-variant-numeric: tabular-nums; font-weight: 600;
  margin: 12px 0 4px; letter-spacing: 2px;
}

/* task reminder picker */
.reminder-dt { width: 100%; padding: 8px; border-radius: 8px; font-size: 15px; }

/* ============================ ADHD TRAITS ============================ */
.trait-card { }
.trait-also {
  margin: -4px 0 8px; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted, #8a8a94);
}
.trait-feels { margin: 0 0 10px; }
.trait-tips { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.trait-tips li { line-height: 1.45; }
.trait-try {
  display: inline; background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent, #7aa2f7); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.trait-try:hover { text-decoration: underline; }

/* ============================ CALENDAR ============================ */
.cal-header { display: flex; align-items: center; gap: 10px; }
.cal-title { margin: 0; font-size: 20px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-wd {
  text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted, #8a8a94); padding-bottom: 4px;
}
.cal-cell {
  min-height: 62px; border: 1px solid var(--border, #2a2a33); border-radius: 10px;
  background: var(--surface, #16161c); padding: 6px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; color: inherit; font: inherit;
  transition: border-color .15s, background .15s;
}
.cal-cell:hover { border-color: var(--gold, #c9a24b); }
.cal-cell.empty { background: transparent; border: none; cursor: default; }
.cal-cell.today { border-color: var(--gold, #c9a24b); }
.cal-cell.selected { background: var(--surface-2, #1e1e26); border-color: var(--gold, #c9a24b); }
.cal-daynum { font-size: 13px; font-weight: 600; }
.cal-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; }
.cal-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot-task { background: #7aa2f7; }
.dot-due { background: #e0a458; }
.dot-journal { background: #b48ead; }
.dot-sober { background: #8fbf9f; }
.dot-sleep { background: #6c7a96; }
.dot-practice { background: #d9b36b; }
.dot-note { background: #c9a24b; }
.cal-daylist { display: grid; gap: 8px; }
.cal-item { display: flex; align-items: center; gap: 10px; }
.cal-item .cal-dot { flex: 0 0 auto; }
.cal-item .grow { flex: 1 1 auto; }
@media (max-width: 560px) {
  .cal-cell { min-height: 48px; padding: 4px; }
  .cal-daynum { font-size: 12px; }
}

/* about-you slots */
.about-slot { padding: 4px 0; }

/* task meta pills + priority */
.task-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pill.soft { background: var(--surface-2, #1e1e26); color: var(--muted, #8a8a94); font-size: 12px; }
.pill.tag { background: rgba(201,162,75,.15); color: var(--gold, #c9a24b); font-size: 12px; }
.prio-flag.high { color: #e0645c; }
.prio-flag.low { color: #6c7a96; }
.file-list { display: grid; gap: 6px; margin: 8px 0; }
.file-row { align-items: center; }

/* ===== task card layout (head row + clickable sub-row) ===== */
.task-card {
  border: 1px solid var(--border, #2a2a33); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 8px; background: var(--surface, #16161c);
}
.task-card.task-done { opacity: .6; }
.task-head { display: flex; align-items: flex-start; gap: 10px; }
.task-head .grow { flex: 1 1 auto; min-width: 0; }
/* Actions keep a stable width and never shrink, so the title area absorbs any
   length change by wrapping rather than squeezing the buttons. */
.task-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.task-title { font-weight: 500; overflow-wrap: anywhere; word-break: break-word; }
.task-subrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-left: 34px; }

/* chips — clickable, in the sub-row and the filter bar */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; line-height: 1; padding: 5px 9px; border-radius: 999px;
  border: 1px solid var(--border, #2a2a33); background: var(--surface-2, #1e1e26);
  color: var(--text, #e8e8ea); cursor: pointer; white-space: nowrap;
}
button.chip:hover { border-color: var(--gold, #c9a24b); }
.chip-frog.on { background: rgba(143,191,159,.18); border-color: #8fbf9f; }
.chip-tag { background: rgba(201,162,75,.15); color: var(--gold, #c9a24b); border-color: transparent; }
.chip-tag.on { background: var(--gold, #c9a24b); color: #1a1a1f; }
.chip-remind.off, .chip-loc { color: var(--muted, #8a8a94); cursor: default; }
.chip-loc { cursor: default; }

/* filter bar above the list */
.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

/* chip input in the editor */
.chip-input {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  border: 1px solid var(--border, #2a2a33); border-radius: 8px; padding: 6px 8px;
  min-height: 40px;
}
.chip-input input { border: 0; outline: 0; background: transparent; color: inherit; flex: 1 1 80px; min-width: 80px; font-size: 14px; }
.chip.editable { cursor: default; }
.chip-x { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 11px; padding: 0 0 0 2px; opacity: .7; }
.chip-x:hover { opacity: 1; }

/* Sleep wind-down timer — calm, centred, no urgency. */
.sleep-winddown { border-left: 3px solid var(--accent, #6b8f71); }
.sleep-timer-backdrop { align-items: center; justify-content: center; }
.sleep-timer { max-width: 320px; text-align: center; }
.sleep-timer-count { font-size: 48px; font-variant-numeric: tabular-nums; letter-spacing: 2px; margin: 8px 0; opacity: .9; }

/* Recovery support (KINT-19) — expandable coping cards. */
.recovery-card { border: 1px solid var(--line, #2a2a33); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.recovery-card.urgent { border-color: var(--accent, #6b8f71); }
.recovery-head { width: 100%; text-align: left; background: transparent; border: 0; color: inherit; padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.recovery-head strong { font-size: 15px; }
.recovery-head:hover { background: rgba(255,255,255,.03); }
.recovery-body { padding: 0 16px 16px; }
.recovery-body p { margin: 8px 0; line-height: 1.55; }

/* Finance (ADHD & money) — clean itemised guidance. */
.finance-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.finance-item strong { display: block; margin-bottom: 2px; }
.finance-item p { margin: 2px 0; line-height: 1.5; }
.finance-contact { font-size: 13px; opacity: .85; margin-top: 2px; }

/* Grief — gentle spacing. */
.grief-word { line-height: 1.6; margin: 10px 0; opacity: .95; }
