/* Focus — a calm, glanceable surface. Dark by default, mobile-first.
   The register is Rivendell: a refuge, not a cockpit. Whitespace is a feature. */

:root {
  --bg: #0e1014;
  --surface: #171a21;
  --surface-2: #1e222b;
  --border: #2a2f3a;
  --text: #e7e3d8;        /* warm parchment, not stark white */
  --text-dim: #9aa1ac;
  --text-faint: #6b727d;
  --accent: #c9a86a;      /* candlelight gold */
  --accent-soft: #8fb09a; /* sage */
  --done: #5b6470;
  --radius: 14px;
  --maxw: 720px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f1e9;
    --surface: #fffdf7;
    --surface-2: #f0ece1;
    --border: #e0d9c8;
    --text: #2b2a26;
    --text-dim: #6c685e;
    --text-faint: #9a958a;
    --accent: #9c7d3a;
    --accent-soft: #5d7d68;
    --done: #b3ad9f;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-serif, Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  line-height: 1.55;
  font-size: 17px;
  padding: clamp(1rem, 4vw, 2.5rem);
  min-height: 100vh;
}

#app { max-width: var(--maxw); margin: 0 auto; }

.page-head { margin-bottom: 1.75rem; }
.page-head h1 {
  font-family: ui-sans-serif, -apple-system, system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: var(--accent);
}
.meta {
  font-family: ui-sans-serif, -apple-system, system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 0.25rem;
}

/* Blocks */
.block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1.25rem;
  margin-bottom: 1rem;
}
.block-title {
  font-family: ui-sans-serif, -apple-system, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Communication blocks — the heart. Prose in the household's voice, with a
   small "kicker" naming what it asks of attention, and a per-kind accent. */
.kicker {
  font-family: ui-sans-serif, -apple-system, system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-bottom: 0.55rem;
}
.comm-title {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.45rem;
  color: var(--text);
}
.block .prose { font-size: 1.02rem; }

/* Signature — who, of all of them, left this message. */
.byline {
  margin-top: 0.7rem;
  text-align: right;
  font-family: ui-sans-serif, -apple-system, system-ui, sans-serif;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-faint);
}

/* A plain message reads like a note on the desk — no card chrome. */
.block--message, .block--note, .block--markdown {
  background: transparent;
  border: none;
  padding: 0.25rem 0.25rem 0.75rem;
}

/* "needs you" — a decision or answer the household is waiting on. */
.block--ask { border-left: 3px solid var(--accent); }
.block--ask .kicker { color: var(--accent); }

/* "heads-up" — time-sensitive, something it's telling you. */
.block--headsup .kicker { color: var(--accent-soft); }

/* "noticed" — an observation or offering; the commons made visible. */
.block--noticed { background: var(--surface-2); }
.block--noticed .kicker { color: var(--text-dim); }

/* focus / generic item lists */
ul.items { list-style: none; }
ul.items li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
ul.items li:last-child { border-bottom: none; }
.tick { color: var(--accent-soft); flex: 0 0 auto; width: 1.1em; }
.tick.empty { color: var(--text-faint); }
.item-body { flex: 1; }
.item-text { color: var(--text); }
.item-note {
  display: block;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}
li.done .item-text { color: var(--done); text-decoration: line-through; }

/* reminders */
.when {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--accent-soft);
  flex: 0 0 auto;
  min-width: 5.5em;
}

/* projects */
.proj-name { font-weight: 600; color: var(--text); }
.proj-status { color: var(--text-dim); }

/* prose / note / markdown */
.prose { color: var(--text); }
.prose p { margin: 0.5rem 0; }
.prose p:first-child { margin-top: 0; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0.5rem 0 0.5rem 1.25rem; }
.prose li { margin: 0.2rem 0; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose h1, .prose h2, .prose h3 { font-size: 1.05rem; margin: 0.75rem 0 0.35rem; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}
.prose blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 0.9rem;
  color: var(--text-dim);
  margin: 0.5rem 0;
}

.page-foot {
  margin-top: 2rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: center;
}

.fallback {
  text-align: center;
  color: var(--text-dim);
  padding: 2rem 1rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.95rem;
}
