/* ============================================================================
   Compendium: a nocturne.
   The interface is a lamp-lit desk at night: deep warm ink, low-contrast
   paper-white text, a single muted ember accent. Calm, unhurried, literary.
   ============================================================================ */

/* Literata: an open-licensed serif designed for immersive reading. Self-hosted
   (see fonts/, OFL in fonts/OFL.txt) so the literary character holds on every
   machine, with no network request. */
@font-face {
  font-family: 'Literata'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Literata'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('../fonts/latin-400-italic.woff2') format('woff2');
}

:root {
  /* ink: never pure black; a warm blue-charcoal, like a dim room */
  --ink:        #15171d;
  --ink-soft:   #1c1f27;
  --ink-line:   #2a2e38;

  /* paper: warm off-white, legible on ink but a touch below pure white so it
     never glares. Secondary tones lifted so labels and dates stay readable. */
  --paper:      #f1ece2;
  --paper-dim:  #b4ae9f;
  --paper-faint:#857f73;

  /* ember: the one accent. the "today" marker, the cursor, the saved-breath. */
  --ember:      #c98a4b;
  --ember-soft: #8a6238;

  /* type */
  --serif: 'Literata', 'Iowan Old Style', 'Palatino Linotype', 'Palatino', Georgia, 'Times New Roman', serif;
  --label: 'Avenir Next', 'Optima', 'Gill Sans', ui-sans-serif, sans-serif;

  --measure: 46rem; /* one consistent content width across every screen */
}

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

/* the hidden attribute must win over .screen's display:flex, or a hidden
   screen stays in the page (off-screen) and its fields remain tabbable */
[hidden] { display: none !important; }

/* a clear, on-brand focus ring for keyboard users on every interactive control
   (the writing textarea keeps its caret instead, so it is excluded) */
.nav-link:focus-visible, .nav-cta:focus-visible, .begin-btn:focus-visible,
.tip-dismiss:focus-visible, .cell:focus-visible, .tdot:focus-visible,
.dob-field:focus-visible, .themes-more:focus-visible, .tl-label:focus-visible {
  outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px;
}

html, body { height: 100%; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden; /* the ritual is a single still surface */
}

/* ── atmosphere: a faint lamp glow from above, and a film of grain ─────────── */
.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    /* lamp glow: many low-opacity stops with a long falloff, so it fades
       smoothly instead of banding into a hard-edged semicircle */
    radial-gradient(150% 115% at 50% -25%,
      rgba(201,138,75,0.06) 0%,
      rgba(201,138,75,0.035) 22%,
      rgba(201,138,75,0.018) 42%,
      rgba(201,138,75,0.006) 60%,
      transparent 78%),
    radial-gradient(140% 120% at 50% 50%, transparent 40%, rgba(0,0,0,0.45) 100%);
}
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── screens ───────────────────────────────────────────────────────────────── */
.screen {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding: clamp(2rem, 6vh, 5rem) clamp(1.5rem, 6vw, 4rem);
  animation: settle 1.2s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
@keyframes settle {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ── onboarding ──────────────────────────────────────────────────────────── */
#onboarding, #vault-setup { justify-content: center; }
.onboarding-inner { max-width: var(--measure); margin: 0 auto; text-align: center; }
.kicker {
  font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ember); margin-bottom: 1.6rem;
}
.onboarding-title {
  font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.25;
  letter-spacing: -0.01em; margin-bottom: 1.2rem;
}
.onboarding-body { color: var(--paper-dim); margin: 0 auto 2.4rem; max-width: 30rem; }

.birthdate-form {
  display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
  max-width: 18rem; margin: 0 auto;
}
.field-label {
  font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--paper-faint);
}
/* date of birth: three typed fields you can fill from memory, no scrolling */
.dob {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--ink-soft); border: 1px solid var(--ink-line); border-radius: 2px;
  padding: 0.55rem 0.9rem; width: fit-content;
  transition: border-color 0.4s ease;
}
.dob:focus-within { border-color: var(--ember-soft); }
.dob-field {
  background: none; border: none; color: var(--paper);
  font-family: var(--serif); font-size: 1.3rem; letter-spacing: 0.04em;
  text-align: center; padding: 0.15rem 0;
}
.dob-field:focus { outline: none; }
.dob-field::placeholder { color: var(--paper-faint); letter-spacing: 0.04em; }
.dob-dd, .dob-mm { width: 3.2ch; }
.dob-yyyy { width: 5.6ch; }
.dob-sep { color: var(--ink-line); font-size: 1.2rem; }
/* strip number-spinner chrome where browsers add it */
.dob-field::-webkit-outer-spin-button,
.dob-field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.dob-error {
  font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--ember); margin-top: 0.1rem; min-height: 1em;
}
.begin-btn {
  align-self: center; margin-top: 0.4rem;
  background: none; border: 1px solid var(--ember-soft); color: var(--ember);
  font-family: var(--label); font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; padding: 0.7rem 1.6rem; border-radius: 2px;
  cursor: pointer; transition: background 0.4s ease, color 0.4s ease;
}
.begin-btn:hover { background: var(--ember); color: var(--ink); }

/* ── ritual: the writing surface ───────────────────────────────────────────── */
#ritual { justify-content: flex-start; }

.ritual-head { max-width: var(--measure); margin: 0 auto 0; width: 100%; }
.dateline {
  font-family: var(--label); font-size: 0.74rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--paper-faint);
  display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap;
}
.dot-sep { color: var(--ink-line); }
.age { margin-left: auto; color: var(--ember-soft); }
.ritual-note {
  margin-top: 0.6rem;
  font-family: var(--label); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--paper-faint);
}

.prompt-wrap {
  max-width: var(--measure); margin: 0 auto; width: 100%;
  flex: 1; display: flex; flex-direction: column; padding-top: clamp(2rem, 8vh, 5rem);
}
.prompt {
  font-weight: 400; font-style: italic; font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.3; color: var(--paper); margin-bottom: 1.8rem; letter-spacing: -0.01em;
  transition: opacity 0.8s ease;
}
/* once the entry has text, the prompt recedes so the words own the room */
#ritual.writing .prompt { opacity: 0.28; }

/* a quiet guidance note, like a margin annotation; recedes once you write */
.tip {
  border-left: 2px solid var(--ember-soft);
  padding: 0.1rem 0 0.2rem 1.1rem;
  margin-bottom: 2rem;
  transition: opacity 0.8s ease;
}
.tip-text { color: var(--paper-dim); font-size: 0.98rem; line-height: 1.6; }
.tip-dismiss {
  margin-top: 0.7rem; padding: 0; background: none; border: none; cursor: pointer;
  font-family: var(--label); font-size: 0.66rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--paper-faint); transition: color 0.4s ease;
}
.tip-dismiss:hover { color: var(--ember); }
#ritual.writing .tip { opacity: 0.28; }

/* sealing: the deliberate "done for today" that locks the entry */
.seal-row { margin-top: 1.6rem; display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.seal-confirm { display: inline-flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.seal-warn {
  font-family: var(--label); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--paper-faint);
}

/* the sealed state: the countdown sits near the entry with real presence */
.sealed-note { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--ink-line); }
.sealed-tag {
  font-family: var(--label); font-size: 0.64rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ember); margin-bottom: 0.6rem;
}
.sealed-count { font-family: var(--serif); font-size: 1.18rem; color: var(--paper-dim); }
.sealed-time { color: var(--ember); }

.entry {
  flex: 1; width: 100%; resize: none; border: none; background: none;
  color: var(--paper); font-family: var(--serif); font-size: 1.18rem; line-height: 1.85;
  caret-color: var(--ember); padding: 0 0 2rem;
}
.entry:focus { outline: none; }
.entry::placeholder { color: var(--paper-faint); font-style: italic; }

/* read-back state: a finished entry is calm and uneditable */
#ritual.done .entry { color: var(--paper-dim); }
#ritual.done .prompt { opacity: 0.28; }

.ritual-foot {
  max-width: var(--measure); margin: 0 auto; width: 100%;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--label); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--paper-faint);
}
.status { color: var(--ember-soft); transition: opacity 0.6s ease; }
.status.breath { animation: breath 2.4s ease both; }
@keyframes breath { 0%,100% { opacity: 0; } 30%,60% { opacity: 1; } }
.count { color: var(--paper-faint); }

@media (prefers-reduced-motion: reduce) {
  .screen, .status.breath { animation: none; }
}

/* ── app navigation: a quiet bar shared by the writing and archive screens ─── */
.app-nav {
  width: 100%; max-width: var(--measure); margin: 0 auto 1.6rem;
  display: flex; justify-content: space-between; align-items: center;
}
.wordmark {
  font-family: var(--label); font-size: 0.78rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--paper-dim);
}
.nav-link {
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--paper-faint); transition: color 0.4s ease;
}
.nav-link:hover { color: var(--ember); }
.nav-group { display: flex; align-items: center; gap: 1.4rem; }

/* "Write today" is a primary action: a clear, tappable button rather than a
   faint text link. Shared by the archive, thread, and reader screens. */
.nav-cta {
  background: transparent; /* explicit, or buttons inherit the OS grey fill */
  color: var(--ember);
  border: 1px solid var(--ember-soft);
  border-radius: 2px;
  padding: 0.55rem 1.25rem;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.nav-cta:hover {
  background: var(--ember);
  border-color: var(--ember);
  color: var(--ink);
}

/* ── the archive: heatmap of a writing life ─────────────────────────────────── */
#archive { justify-content: flex-start; overflow: auto; }
.archive-body { width: 100%; max-width: var(--measure); margin: 1.5rem auto 0; }
.archive-kicker { margin-bottom: 2rem; }
.archive-empty {
  max-width: 30rem; font-style: italic; color: var(--paper-dim);
  font-size: 1.1rem; line-height: 1.7;
}

/* themes: the words you keep returning to */
.themes:not(:empty) { margin-bottom: 3rem; }
.themes-label {
  font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ember); margin-bottom: 1.2rem;
}
.themes-hint { color: var(--paper-dim); font-style: italic; max-width: 32rem; line-height: 1.6; }

/* ranked magnitude bars: width encodes the number of days, scales down the
   list, and stays scannable however many words gather. Click a row to read. */
.theme-bars { display: flex; flex-direction: column; gap: 0.55rem; max-width: 38rem; }
.theme {
  display: grid; grid-template-columns: minmax(5.5rem, 10rem) 1fr auto;
  align-items: center; gap: 1.1rem; width: 100%; text-align: left;
  background: none; border: none; padding: 0.35rem 0; cursor: pointer;
}
.tb-word {
  font-family: var(--serif); font-size: 1.05rem; color: var(--paper-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.25s ease;
}
.theme:hover .tb-word { color: var(--ember); }
.tb-track { height: 8px; background: var(--ink-soft); border-radius: 2px; overflow: hidden; }
.tb-fill {
  display: block; height: 100%; background: var(--ember-soft); border-radius: 2px;
  transition: background 0.25s ease;
}
.theme:hover .tb-fill { background: var(--ember); }
.tb-count {
  font-family: var(--label); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--paper-faint); white-space: nowrap;
}

/* "see them over time": the entry point from the bars into the timeline */
.themes-more {
  margin-top: 1.4rem; background: none; border: none; cursor: pointer;
  font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--paper-faint); transition: color 0.25s ease;
}
.themes-more:hover { color: var(--ember); }

/* ── the timeline: recurring thoughts, over time ────────────────────────────── */
#timeline-view { justify-content: flex-start; }
.timeline-body { width: 100%; max-width: var(--measure); margin: 1.5rem auto 0; }
.timeline-sub {
  font-family: var(--serif); font-style: italic; color: var(--paper-dim);
  line-height: 1.6; max-width: 34rem; margin: 0.6rem 0 2.4rem;
}
.tl { display: flex; flex-direction: column; }
.tl-empty { color: var(--paper-dim); font-style: italic; max-width: 32rem; line-height: 1.6; }

/* a shared month axis, offset to align with the tracks */
.tl-axis { display: flex; margin-bottom: 1rem; }
.tl-spacer { width: 8rem; flex: none; }
.tl-axisline {
  position: relative; flex: 1; height: 0.8rem;
  font-family: var(--label); font-size: 0.58rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--paper-faint);
}
.tl-axisline span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }

.tl-row { display: flex; align-items: center; padding: 0.45rem 0; border-radius: 4px; transition: background 0.15s ease; }
.tl-row:hover { background: var(--ink-soft); }
.tl-label { width: 8rem; flex: none; text-align: right; padding-right: 1.1rem; background: none; border: none; cursor: pointer; }
.tl-word { font-family: var(--serif); font-size: 1.05rem; color: var(--paper-dim); transition: color 0.25s ease; }
.tl-label:hover .tl-word { color: var(--ember); }
.tl-count {
  display: block; margin-top: 0.15rem; font-family: var(--label); font-size: 0.56rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper-faint);
}

.tl-track { position: relative; flex: 1; height: 22px; }
.tl-track::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--ink-line); }
.tl-span {
  position: absolute; top: 50%; transform: translateY(-50%); height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(201,138,75,0.05), rgba(201,138,75,0.18), rgba(201,138,75,0.05));
}
.tl-dot {
  position: absolute; top: 50%; width: 7px; height: 7px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--ember); opacity: 0.6;
  cursor: pointer; transition: opacity 0.12s ease, transform 0.12s ease;
}
.tl-dot:hover { opacity: 1; transform: translate(-50%, -50%) scale(1.7); box-shadow: 0 0 8px rgba(201,138,75,0.55); }

.tl-tip {
  position: fixed; z-index: 60; pointer-events: none;
  background: #0e0f13; border: 1px solid var(--ink-line); border-radius: 7px;
  padding: 6px 10px; font-family: var(--label); font-size: 0.72rem; color: var(--paper);
  white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity 0.12s ease;
}
.tl-tip.on { opacity: 1; transform: translateY(0); }

/* ── theme view: every day you wrote about one theme ────────────────────────── */
#theme-view { justify-content: flex-start; }
.theme-view-body { width: 100%; max-width: var(--measure); margin: 1.5rem auto 0; }
.theme-view-title {
  font-family: var(--serif); font-weight: 400; font-size: 2rem; color: var(--paper);
  margin: 0.6rem 0 0.4rem; letter-spacing: -0.01em;
}
.theme-view-sub { color: var(--paper-dim); font-style: italic; margin-bottom: 2rem; }

.theme-entries { display: flex; flex-direction: column; gap: 0.9rem; }
.theme-entry {
  text-align: left; cursor: pointer; width: 100%;
  background: var(--ink-soft); border: 1px solid var(--ink-line); border-radius: 3px;
  padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: 0.55rem;
  transition: border-color 0.3s ease;
}
.theme-entry:hover { border-color: var(--ember-soft); }
.te-date {
  font-family: var(--label); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--paper-faint);
}
.te-age { color: var(--ember-soft); margin-left: 0.6rem; }
.te-snippet { font-family: var(--serif); color: var(--paper-dim); line-height: 1.65; }
.te-snippet mark { background: none; color: var(--ember); }

.heatmap { display: flex; flex-direction: column; gap: 2.2rem; }
.year-block { display: flex; align-items: flex-start; gap: 1.1rem; }
.year-label { width: 3.6rem; flex: none; padding-top: 1.25rem; text-align: right; }
.yl-year { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--paper); line-height: 1; }
.yl-age {
  display: block; margin-top: 0.35rem;
  font-family: var(--label); font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ember-soft);
}

.grid-col { display: flex; flex-direction: column; gap: 0.45rem; }
.month-axis {
  display: grid; grid-auto-columns: 10px; gap: 2px; height: 0.7rem;
  font-family: var(--label); font-size: 0.56rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--paper-faint);
}
.ma-label { grid-row: 1; white-space: nowrap; line-height: 1; }

.year-grid {
  display: grid; grid-template-rows: repeat(7, 10px); grid-auto-columns: 10px; gap: 2px;
}

/* intensity buckets, shared by cells and the legend swatches */
.lvl-0 { background: #1d2129; }
.lvl-1 { background: rgba(201, 138, 75, 0.28); }
.lvl-2 { background: rgba(201, 138, 75, 0.50); }
.lvl-3 { background: rgba(201, 138, 75, 0.72); }
.lvl-4 { background: rgba(201, 138, 75, 0.95); }

.cell {
  width: 10px; height: 10px; padding: 0; border: none; border-radius: 2px;
  cursor: default; transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.cell:not(.lvl-0) { cursor: pointer; }
.cell:not(.lvl-0):hover { transform: scale(1.4); }
.cell.is-today {
  cursor: pointer;
  box-shadow: 0 0 0 1.5px var(--ember), 0 0 7px rgba(201, 138, 75, 0.55);
}

.legend {
  display: flex; align-items: center; gap: 5px; margin-top: 2.2rem;
  font-family: var(--label); font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--paper-faint);
}
.legend .lvl { width: 10px; height: 10px; border-radius: 2px; }
.legend span:first-child { margin-right: 0.3rem; }
.legend span:last-child { margin-left: 0.3rem; }

/* ── settings ───────────────────────────────────────────────────────────────── */
#settings { justify-content: flex-start; }
.settings-body { width: 100%; max-width: var(--measure); margin: 1.5rem auto 0; }
.setting-block { margin-top: 1.5rem; }
.setting-label {
  font-family: var(--serif); font-weight: 400; font-size: 1.35rem; color: var(--paper);
  margin-bottom: 0.8rem;
}
.setting-note { color: var(--paper-dim); max-width: 34rem; line-height: 1.7; margin-bottom: 1.6rem; }

/* export/import controls (live in settings) */
.backup-actions { display: flex; align-items: center; gap: 1.2rem; }
.backup-import { cursor: pointer; display: inline-flex; align-items: center; }
.backup-status {
  margin-top: 1.2rem; min-height: 1em;
  font-family: var(--label); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ember-soft);
}

/* buttons: a filled primary (high contrast) and an outline secondary */
.btn-primary {
  background: var(--ember); color: var(--ink); border: 1px solid var(--ember);
  font-family: var(--label); font-size: 0.74rem; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 0.62rem 1.4rem; border-radius: 2px; cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.btn-primary:hover { background: var(--ember-soft); border-color: var(--ember-soft); }
.btn-secondary {
  background: transparent; color: var(--paper-dim); border: 1px solid var(--ink-line);
  font-family: var(--label); font-size: 0.74rem; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 0.62rem 1.4rem; border-radius: 2px; cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.btn-secondary:hover { color: var(--paper); border-color: var(--ember-soft); }

/* ── reader: a single past day, read-only ───────────────────────────────────── */
#reader { justify-content: flex-start; }
.reader-body { width: 100%; max-width: var(--measure); margin: 2rem auto 0; }
.reader-text {
  white-space: pre-wrap; margin-top: 1.6rem;
  font-size: 1.18rem; line-height: 1.85; color: var(--paper);
}

/* ── the thread: one month, day by day (round beads, distinct from the heatmap) ── */
#thread { justify-content: flex-start; }
.thread-body { width: 100%; max-width: var(--measure); margin: 1.5rem auto 0; }
.thread-title {
  font-family: var(--serif); font-weight: 400; font-size: 1.6rem;
  color: var(--paper); letter-spacing: -0.01em;
}
.thread-age {
  font-family: var(--label); font-size: 0.66rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ember-soft); margin-left: 0.6rem;
  vertical-align: middle;
}

.thread-track {
  display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 2px;
  margin: 2rem 0 2.4rem; padding-top: 5px; /* room for today's glow ring, no clipping */
}
.tday { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.tdot {
  width: 16px; height: 16px; padding: 0; border: none; border-radius: 50%;
  cursor: default; transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.tdot:not(.lvl-0) { cursor: pointer; }
.tdot:not(.lvl-0):hover { transform: scale(1.3); }
.tdot.is-today {
  cursor: pointer;
  box-shadow: 0 0 0 1.5px var(--ember), 0 0 7px rgba(201, 138, 75, 0.55);
}
.tdot.is-future { opacity: 0.3; }
.tnum {
  font-family: var(--label); font-size: 0.58rem; letter-spacing: 0.03em;
  color: var(--paper-faint);
}

.thread-preview {
  min-height: 6rem; border-top: 1px solid var(--ink-line); padding-top: 1.5rem;
}
.pv-date {
  font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--paper-dim);
}
.pv-age { color: var(--ember-soft); margin-left: 0.6rem; }
.pv-snip {
  font-family: var(--serif); font-size: 1.08rem; line-height: 1.7;
  color: var(--paper); margin-top: 0.7rem;
}
.pv-meta {
  font-family: var(--label); font-size: 0.64rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--paper-faint); margin-top: 0.8rem;
}
.pv-empty, .pv-hint {
  font-family: var(--serif); font-style: italic; color: var(--paper-faint);
  margin-top: 0.5rem;
}
