/* =========================================================
   BRAIN DUMP — styles (Journal + Ask)
   ========================================================= */
:root {
  --ink: #1C1C1A;
  --ink-2: #2E2E2B;
  --ink-3: #3A3A35;
  --muted: #55554F;
  --faint: #6A6A63;
  --line: #EEEEEA;
  --line-2: #E2E2DC;
  --band: #FAFAF7;
  --chip: #F3F3F0;
  --soft: #F6F6F3;
  --accent: #1F6F43;
  --accent-dark: #175534;
  --accent-soft: #E5F1E9;
  --warn: #9A3412;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
main:focus { outline: none; }
button, input { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Top bar ---------- */
.topbar {
  height: 56px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 24px; padding: 0 32px;
  position: sticky; top: 0; background: #FFFFFF; z-index: 10;
}
.brand { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.topnav { display: flex; gap: 4px; font-size: 14px; }
.topnav a { padding: 6px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.topnav a.active { background: var(--chip); color: var(--ink); font-weight: 500; }
.sync { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); text-decoration: none; }
.sync:hover { color: var(--ink); }
.dot { width: 6px; height: 6px; border-radius: 999px; background: #1F8A4C; }
.dot.warn { background: #C2410C; }

/* ---------- Ask band ---------- */
.ask-band {
  background: var(--band); border-bottom: 1px solid var(--line);
  padding: 48px 32px 40px; display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.ask-band.compact { padding: 32px 32px 28px; gap: 14px; }
.ask-band h1 { margin: 0; font-family: var(--serif); font-size: 34px; font-weight: 500; letter-spacing: -0.01em; text-align: center; }
.ask-box {
  width: 100%; max-width: 680px; background: #FFFFFF; border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: 0 8px 28px rgba(28,28,26,0.07); overflow: hidden;
}
.ask-band.compact .ask-box { max-width: 760px; }
.ask-input { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 18px; }
.ask-input svg { color: var(--faint); flex: 0 0 18px; }
.ask-input input { flex: 1 1 auto; min-width: 0; border: none; outline: none; background: transparent; font-size: 16px; }
kbd { font-family: var(--sans); font-size: 11px; color: var(--faint); border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 6px; }
.suggestions { border-top: 1px solid #F0F0EC; padding: 8px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.suggestions .label { padding: 6px 10px; font-size: 11px; font-weight: 600; color: var(--faint); letter-spacing: 0.06em; text-transform: uppercase; }
.suggestions a { display: flex; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--ink-3); text-decoration: none; }
.suggestions a:hover, .suggestions a:focus-visible { background: var(--chip); color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pill {
  height: 32px; padding: 0 12px; border: 1px solid #DCDCD5; background: #FFFFFF; color: var(--ink-3);
  border-radius: 999px; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
}
.pill.on { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }

/* ---------- Page layout ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 44px 32px 64px; display: flex; flex-wrap: wrap; gap: 56px; }
.page.narrow { max-width: 760px; display: block; }
.col-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.col-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 28px; padding-top: 8px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; color: var(--faint); }
.day-title { margin: 0; font-family: var(--serif); font-size: 32px; font-weight: 500; letter-spacing: -0.01em; }
.section-label { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.back { font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.back svg { width: 15px; height: 15px; }

/* ---------- Journal entries ---------- */
.day-group { display: flex; flex-direction: column; gap: 30px; }
.entry { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; }
.entry-time { font-size: 13px; color: var(--faint); padding-top: 6px; }
.entry-body { display: flex; flex-direction: column; gap: 10px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.entry h3 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 500; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.entry h3 a { color: var(--ink); text-decoration: none; }
.entry h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.badge { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--accent-dark); background: var(--accent-soft); padding: 2px 7px; border-radius: 999px; }
.badge.warn { color: var(--warn); background: #FFF1E6; }
.meta { margin: 0; font-size: 13px; color: var(--faint); }
.prose { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.prose strong { font-weight: 600; }
.todo-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }

/* ---------- Checkboxes / to-dos ---------- */
.todo { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.todo input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--accent); flex: 0 0 16px; cursor: pointer; }
.todo .sub { display: block; font-size: 12px; color: var(--faint); }
.todo .sub.overdue { color: var(--warn); font-weight: 600; }
.todo.done .text { color: var(--faint); text-decoration: line-through; }
.todo-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #F0F0EC; font-size: 15px; cursor: pointer; }
.todo-row:last-child { border-bottom: none; }
.todo-row input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.todo-row .text { flex: 1 1 auto; }
.todo-row .who { font-size: 13px; color: var(--faint); white-space: nowrap; }
.todo-row .who.overdue { color: var(--warn); font-weight: 600; }
.todo-row.done .text { color: var(--faint); text-decoration: line-through; }

/* ---------- Side cards ---------- */
.side-section { display: flex; flex-direction: column; gap: 12px; }
.card-soft { padding: 16px; background: var(--soft); border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
.card-soft h2 { margin: 0; font-size: 14px; font-weight: 600; }
.card-soft p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.card-soft a { font-size: 13px; font-weight: 600; }
.side-link { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid #F0F0EC; text-decoration: none; color: var(--ink); }
.side-link:last-child { border-bottom: none; }
.side-link .t { font-family: var(--serif); font-size: 17px; }
.side-link .s { font-size: 12px; color: var(--faint); }
.btn-row { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.btn {
  height: 34px; padding: 0 12px; border: 1px solid #DCDCD5; background: #FFFFFF; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.btn-primary {
  height: 50px; border: none; border-radius: 10px; background: var(--ink); color: #FFFFFF;
  font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; width: 100%;
}
.btn-primary:hover { background: #000000; }
.btn-secondary {
  height: 46px; border: 1px solid #DCDCD5; border-radius: 10px; background: #FFFFFF; color: var(--ink);
  font-size: 14px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; width: 100%;
}

/* ---------- Meeting detail ---------- */
.meeting-head { display: flex; flex-direction: column; gap: 10px; }
.meeting-head h1 { margin: 0; font-family: var(--serif); font-size: 42px; line-height: 1.1; font-weight: 500; letter-spacing: -0.015em; }
.lead { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.65; color: var(--ink-2); }
.decision { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.5; padding-left: 18px; border-left: 2px solid var(--accent); }
.raw { border-top: 1px solid var(--line); padding-top: 20px; }
.raw summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); }
.raw pre {
  margin: 14px 0 12px; padding: 18px 20px; background: var(--band); border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--mono); font-size: 13px; line-height: 1.75; color: var(--ink-3); white-space: pre-wrap;
}

/* ---------- Ask results ---------- */
.answer { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.answer .section-label { color: var(--accent); }
.answer-text { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { font-size: 13px; color: var(--ink); background: var(--chip); padding: 5px 12px; border-radius: 999px; text-decoration: none; }
.result { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.result .d { font-size: 13px; color: var(--faint); padding-top: 4px; }
.result .t { display: block; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.result .x { display: block; margin-top: 6px; font-size: 14px; line-height: 1.55; color: var(--ink-3); }
mark { background: var(--accent-soft); color: #14462B; padding: 0 2px; border-radius: 3px; }
.empty { font-family: var(--serif); font-size: 18px; color: var(--muted); }

/* ---------- Welcome ---------- */
.welcome { max-width: 1120px; margin: 0 auto; padding: 64px 32px; display: flex; flex-wrap: wrap; gap: 64px; align-items: flex-start; }
.welcome-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.welcome-copy h1 { margin: 0; font-family: var(--serif); font-size: 52px; line-height: 1.08; font-weight: 500; letter-spacing: -0.015em; }
.welcome-copy .intro { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.6; color: var(--ink-2); max-width: 520px; }
.note { margin: 12px 0 0; padding: 0 0 0 20px; border-left: 2px solid #D9D9D2; max-width: 500px; }
.note blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.6; color: var(--ink-3); }
.note figcaption { margin-top: 8px; font-size: 13px; color: var(--faint); }
.connect { flex: 1 1 400px; min-width: 0; background: var(--band); border: 1px solid var(--line); border-radius: 14px; padding: 32px; display: flex; flex-direction: column; gap: 22px; }
.connect h2 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 500; }
.connect .sub { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.steps .n { font-family: var(--serif); font-size: 20px; color: var(--accent); }
.steps p { margin: 0; }
.steps .h { font-size: 15px; font-weight: 600; }
.steps .d { margin-top: 3px; font-size: 14px; color: var(--muted); }
.or { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--faint); }
.or::before, .or::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line-2); }
.privacy { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--muted); }
.privacy svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #FFFFFF; font-size: 14px; padding: 12px 16px; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18); z-index: 50; max-width: calc(100% - 32px);
}

/* ---------- People ---------- */
.people-list { display: flex; flex-direction: column; }
.person { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--chip); color: var(--ink-3); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.person .n { font-family: var(--serif); font-size: 19px; }
.person .s { font-size: 13px; color: var(--faint); }

/* ---------- Mobile tab bar ---------- */
.tabbar { display: none; }

@media (max-width: 720px) {
  .topbar { padding: 0 20px; height: 52px; }
  .topnav { display: none; }
  .ask-band { padding: 28px 20px 24px; }
  .ask-band h1 { font-size: 24px; line-height: 1.2; }
  .ask-input { height: 50px; }
  .ask-input kbd { display: none; }
  .page { padding: 28px 20px 96px; gap: 32px; }
  .page.narrow { padding-bottom: 96px; }
  .day-title { font-size: 24px; }
  .entry { grid-template-columns: 1fr; gap: 4px; }
  .entry-time { padding-top: 0; }
  .entry h3 { font-size: 20px; }
  .prose { font-size: 16px; }
  .meeting-head h1 { font-size: 30px; }
  .lead { font-size: 18px; }
  .welcome { padding: 32px 20px 96px; gap: 32px; }
  .welcome-copy h1 { font-size: 36px; }
  .connect { padding: 24px; }
  .result { grid-template-columns: 1fr; gap: 4px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; height: 68px;
    background: #FFFFFF; border-top: 1px solid var(--line); z-index: 20;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: var(--faint); text-decoration: none; }
  .tabbar a.active { color: var(--ink); font-weight: 600; }
  .tabbar svg { width: 20px; height: 20px; }
}
