/* Solace — component layer. Every value comes from tokens.css.
   State aliases (.is-hover / .is-active / .is-focus) exist so the
   styleguide can show states statically; they're harmless in production. */
@import url("tokens.4857e7d0ac9a.css");

/* ── Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { min-width: 0; }
[hidden] { display: none !important; }
html { background: var(--bg); color-scheme: light; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: var(--text-md); line-height: var(--leading-md);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-strong); text-decoration-color: var(--border-strong); text-underline-offset: 3px; transition: color var(--duration) var(--ease), text-decoration-color var(--duration) var(--ease); }
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
::selection { background: var(--selection); color: var(--accent-900); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-xs); }
.is-focus { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: var(--weight-medium); letter-spacing: var(--tracking-tight); margin: 0; color: var(--text); text-wrap: balance; }
h1 { font-size: var(--text-2xl); line-height: var(--leading-2xl); }
h2 { font-size: var(--text-xl); line-height: var(--leading-xl); }
h3 { font-size: var(--text-lg); line-height: var(--leading-lg); }
p { margin: 0 0 var(--space-2); }

.eyebrow { font-family: var(--font-sans); font-size: var(--text-xs); line-height: var(--leading-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--text-muted); }
.mono { font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text-muted); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: var(--text-sm); line-height: var(--leading-sm); }
.prose { font-family: var(--font-serif); font-size: var(--text-prose); line-height: var(--leading-prose); max-width: var(--width-reading); }
.prose p { margin: 0 0 1em; }
.prose blockquote { margin: 1.2em 0; padding-left: var(--space-2); border-left: 2px solid var(--accent); color: var(--text-muted); font-style: italic; }
.prose code { font-family: var(--font-mono); font-size: 0.85em; background: var(--surface); padding: 0.1em 0.35em; border-radius: var(--radius-xs); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--surface-inverse); color: var(--text-inverse); padding: var(--space-1) var(--space-2); border-radius: var(--radius-xs); }
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

/* ── Header / nav ─────────────────────────────────────────────────── */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header__inner { max-width: var(--width-page); margin: 0 auto; padding: 0 var(--space-3); height: var(--header-height); display: flex; align-items: center; gap: var(--space-4); }
.brand { font-family: var(--font-serif); font-weight: var(--weight-medium); font-size: var(--text-lg); color: var(--text); text-decoration: none; display: flex; align-items: center; gap: var(--space-1); white-space: nowrap; }
.brand__mark { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--accent); }
.main-nav { display: flex; gap: var(--space-3); flex: 1; }
.main-nav a { color: var(--text-muted); text-decoration: none; font-size: var(--text-sm); line-height: var(--leading-sm); font-weight: var(--weight-medium); padding: 6px 0; border-bottom: 2px solid transparent; transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease); }
.main-nav a:hover, .main-nav a.is-hover { color: var(--text); }
.main-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.user-menu { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text-muted); white-space: nowrap; }
.user-menu__name { font-family: var(--font-mono); color: var(--text); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-strong); cursor: pointer; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.link-button:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
.nav-toggle { display: none; }
.nav-toggle-label { display: none; margin-left: auto; color: var(--text); cursor: pointer; padding: var(--space-1); margin-right: calc(var(--space-1) * -1); }

/* ── Page layout ──────────────────────────────────────────────────── */
.page { max-width: var(--width-page); margin: 0 auto; padding: var(--space-5) var(--space-3) var(--space-10); }
.page--reading { max-width: var(--width-reading); margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-5); flex-wrap: wrap; }
.page-head__text { display: flex; flex-direction: column; gap: var(--space-0-5); }
.page-head__meta { color: var(--text-muted); font-size: var(--text-sm); line-height: var(--leading-sm); max-width: 38rem; text-wrap: pretty; }
.page-head__actions { display: flex; gap: var(--space-1); flex-wrap: wrap; align-items: center; }
.page-head__actions--stack { flex-direction: column; align-items: flex-end; }
.section { margin-top: var(--space-6); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); margin-bottom: var(--space-2); flex-wrap: wrap; }
.section-head__hint { color: var(--text-muted); font-size: var(--text-sm); line-height: var(--leading-sm); }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1);
  font-family: var(--font-sans); font-weight: var(--weight-medium); font-size: var(--text-sm); line-height: var(--leading-sm);
  padding: 6px var(--space-2); min-height: 36px; border-radius: var(--radius-xs); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--text-inverse); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:active, .btn-primary.is-active { background: var(--accent-900); border-color: var(--accent-900); }
.btn-secondary { background: var(--surface-raised); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover, .btn-secondary.is-hover { border-color: var(--neutral-500); background: var(--neutral-50); }
.btn-secondary:active, .btn-secondary.is-active { background: var(--surface); }
.btn-quiet { background: transparent; color: var(--text-muted); padding-inline: var(--space-1); }
.btn-quiet:hover, .btn-quiet.is-hover { color: var(--text); background: var(--surface); }
.btn-quiet:active, .btn-quiet.is-active { background: var(--neutral-300); }
.btn-danger { background: transparent; border-color: var(--danger-300); color: var(--danger-text); }
.btn-danger:hover, .btn-danger.is-hover { background: var(--danger-wash); border-color: var(--danger); }
.btn-danger:active, .btn-danger.is-active { background: var(--danger-200); }
.btn-sm { min-height: 28px; padding: 2px var(--space-1-5); font-size: var(--text-xs); line-height: var(--leading-xs); }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn-group { display: flex; gap: var(--space-1); flex-wrap: wrap; align-items: center; }

/* ── Forms ────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: var(--space-0-5); margin-bottom: var(--space-2); }
.field:last-child { margin-bottom: 0; }
.field > label, .label { font-size: var(--text-sm); line-height: var(--leading-sm); font-weight: var(--weight-medium); color: var(--text); }
.label__optional { color: var(--text-muted); font-weight: var(--weight-regular); }
.field-hint { font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text-muted); }
.field-error { font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--danger-text); display: flex; gap: var(--space-0-5); align-items: center; }
.input, select.input, textarea.input {
  width: 100%; font: inherit; font-size: var(--text-md); line-height: var(--leading-md); color: var(--text);
  padding: 5px var(--space-1-5); min-height: 36px; background: var(--surface-raised);
  border: 1px solid var(--border-strong); border-radius: var(--radius-xs); caret-color: var(--accent);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.input::placeholder { color: var(--text-faint); }
.input:hover, .input.is-hover { border-color: var(--neutral-500); }
.input:focus, .input.is-focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash-2); }
.input[disabled] { opacity: 0.45; cursor: not-allowed; background: var(--surface); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--danger-wash); }
textarea.input { min-height: 96px; resize: vertical; }
select.input { appearance: none; padding-right: var(--space-4); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23645c50' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right var(--space-1-5) center; }
.input-row { display: flex; gap: var(--space-1); align-items: center; }
.input-row__sep { color: var(--text-faint); white-space: nowrap; }
.input--sm { min-height: 28px; padding: 2px var(--space-1); font-size: var(--text-sm); line-height: var(--leading-sm); }
.check { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-sm); line-height: var(--leading-sm); cursor: pointer; }
.check input { accent-color: var(--accent-strong); width: 16px; height: 16px; margin: 0; }
.form-actions { display: flex; gap: var(--space-1); align-items: center; margin-top: var(--space-3); }
.form-actions .btn-primary { order: -1; }

/* filter panel */
.filter-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3) var(--space-3); margin-bottom: var(--space-3); }
.filter-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-end; }
.filter-bar + .filter-bar { margin-top: var(--space-2); }
.filter-bar .field { margin: 0; min-width: 9rem; }
.filter-bar .field--grow { flex: 1 1 14rem; }
.filter-bar .input-row .input { width: 8rem; }
.filter-bar .input-row .input[type="number"] { width: 5rem; }
.filter-active { display: flex; align-items: center; gap: var(--space-1); flex-wrap: wrap; margin-bottom: var(--space-3); }
.filter-active__count { font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text-muted); margin-right: var(--space-0-5); }
.chip-remove { display: inline-flex; align-items: center; gap: var(--space-0-5); font-size: var(--text-xs); line-height: var(--leading-xs); padding: 2px var(--space-0-5) 2px var(--space-1); border-radius: var(--radius-full); background: var(--surface-raised); border: 1px solid var(--border-strong); color: var(--text); text-decoration: none; }
.chip-remove:hover { border-color: var(--neutral-500); }
.chip-remove__x { font-size: 14px; line-height: 1; color: var(--text-muted); padding: 0 2px; }
@media (max-width: 760px) { .filter-panel { padding: var(--space-2); } .filter-bar .field { min-width: 0; flex: 1 1 100%; } .filter-bar .input-row .input { width: auto; flex: 1; } }

/* ── Surfaces ─────────────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--space-3); }
.panel--raised { background: var(--surface-raised); box-shadow: var(--shadow-md); }
.panel + .panel { margin-top: var(--space-2); }
.card-kicker { font-size: var(--text-xs); line-height: var(--leading-xs); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--accent-strong); font-weight: var(--weight-semibold); }
.card-title { font-family: var(--font-serif); font-size: var(--text-lg); line-height: var(--leading-lg); margin: var(--space-0-5) 0 var(--space-1); }
.card-body { color: var(--text-muted); font-size: var(--text-sm); line-height: var(--leading-sm); margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.stat-card { background: var(--surface-raised); padding: var(--space-2); display: flex; flex-direction: column; gap: var(--space-0-5); }
.stat-card__value { font-family: var(--font-serif); font-size: var(--text-xl); line-height: var(--leading-xl); color: var(--text); }
.stat-card__note { font-family: var(--font-mono); font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-muted); }

.chart-wrap { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--space-3); }
.chart-wrap h3 { font-family: var(--font-sans); font-size: var(--text-sm); line-height: var(--leading-sm); font-weight: var(--weight-semibold); margin-bottom: var(--space-2); }

/* ── Badges ───────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: var(--space-0-5); font-size: var(--text-xs); line-height: var(--leading-xs); font-weight: var(--weight-medium); padding: 2px var(--space-1); border-radius: var(--radius-full); border: 1px solid transparent; white-space: nowrap; }
.badge--complete { background: var(--success-wash); color: var(--success-text); }
.badge--draft { background: var(--warn-wash); color: var(--warn-text); }
.badge--danger { background: var(--danger-wash); color: var(--danger-text); }
.badge--neutral { background: var(--surface); color: var(--text-muted); }
.badge--tag { background: transparent; border-color: var(--border-strong); color: var(--text-muted); }
.badge__dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: currentColor; }
.rating-dial { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-full); font-family: var(--font-mono); font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--accent-strong); background: var(--accent-wash); flex-shrink: 0; }

/* ── Entry detail: facts sidebar + rating bar ─────────────────────── */
.entry-layout { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; grid-template-rows: auto auto; gap: var(--space-6); align-items: start; }
.entry-layout > article { grid-column: 1; grid-row: 1; }
.entry-layout > .facts { grid-column: 2; grid-row: 1; }
.entry-layout__map-row { grid-column: 1 / -1; grid-row: 2; }
@media (max-width: 760px) {
  .entry-layout { grid-template-columns: 1fr; gap: var(--space-4); }
  .entry-layout > article, .entry-layout > .facts, .entry-layout__map-row { grid-column: 1; grid-row: auto; }
  .entry-layout .facts { order: -1; }
}
.facts { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding-top: var(--space-0-5); }
.facts__row { display: flex; flex-direction: column; gap: var(--space-0-5); padding-bottom: var(--space-2); border-bottom: 1px solid var(--border); }
.facts__row:last-child { border-bottom: none; padding-bottom: 0; }
.facts__row dt { font-size: var(--text-xs); line-height: var(--leading-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--text-muted); }
.facts__row dd { margin: 0; font-size: var(--text-md); line-height: var(--leading-md); color: var(--text); }
.facts__row dd.is-empty { color: var(--text-faint); }
.rating { display: flex; flex-direction: column; gap: var(--space-0-5); }
.rating__value { font-family: var(--font-serif); font-size: var(--text-xl); line-height: var(--leading-xl); }
.rating__value small { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text-muted); margin-left: 2px; }
.rating__bar { height: 6px; border-radius: var(--radius-full); background: var(--neutral-300); overflow: hidden; }
.rating__fill { height: 100%; border-radius: var(--radius-full); background: var(--accent); }
.chips { display: flex; gap: var(--space-0-5); flex-wrap: wrap; }
.map-container { height: 360px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }

/* ── Menu (native details dropdown) ───────────────────────────────── */
.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); margin-left: 2px; }
.menu[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.menu__panel { position: absolute; top: calc(100% + var(--space-0-5)); right: 0; z-index: 20; min-width: 12rem; padding: var(--space-0-5); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); display: flex; flex-direction: column; }
.menu__panel--left { right: auto; left: 0; }
.menu__item { display: block; padding: var(--space-1) var(--space-1-5); border-radius: var(--radius-xs); font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text); text-decoration: none; background: none; border: 0; text-align: left; font-family: inherit; cursor: pointer; }
.menu__item:hover { background: var(--surface); }

/* ── Entry form ───────────────────────────────────────────────────── */
.facts-band { display: grid; grid-template-columns: 11rem minmax(0, 1fr) 9rem; gap: var(--space-2) var(--space-3); align-items: start; padding-bottom: var(--space-2); }
.facts-band .input-row .input { width: 5.5rem; }
.facts-band .field { margin: 0; }
@media (max-width: 760px) { .facts-band { grid-template-columns: 1fr 1fr; } .facts-band .field--span { grid-column: 1 / -1; } }
.place-list { display: flex; flex-direction: column; gap: var(--space-1); }
.place-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: var(--space-1); align-items: center; }
@media (max-width: 760px) { .place-row { grid-template-columns: 1fr auto; } .place-row .input--note { grid-column: 1 / -1; } }
.loc-input { display: flex; align-items: center; gap: var(--space-0-5); flex-wrap: nowrap; height: 36px; padding: 0 var(--space-1); background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: var(--radius-xs); cursor: text; overflow: hidden; }
.loc-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash-2); }
.loc-input input { flex: 1 1 2rem; min-width: 2rem; height: 34px; border: 0; background: none; font: inherit; font-size: var(--text-md); line-height: var(--leading-md); padding: 0 var(--space-0-5); color: var(--text); outline: none; }
.loc-input input::placeholder { color: var(--text-faint); }
.loc-chip { display: inline-flex; align-items: center; gap: 2px; flex: 0 1 auto; min-width: 0; height: 24px; padding: 0 2px 0 var(--space-1); border-radius: var(--radius-full); background: var(--accent-wash); color: var(--accent-900); font-size: var(--text-sm); line-height: var(--leading-sm); }
.loc-chip__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-chip__clear { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: var(--radius-full); border: 0; background: none; color: var(--accent-strong); font-size: 14px; line-height: 1; cursor: pointer; }
.loc-chip__clear:hover { background: var(--accent-wash-2); }
@media (max-width: 760px) { .loc-input { height: 44px; } .loc-input input { height: 42px; } }

.editor { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-raised); overflow: hidden; }
.editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash-2); }
.editor__toolbar { display: flex; align-items: center; gap: 2px; padding: var(--space-0-5) var(--space-1); border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.editor__group { display: flex; gap: 2px; }
.editor__group + .editor__group { margin-left: var(--space-1); padding-left: var(--space-1); border-left: 1px solid var(--border-strong); }
.tool { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border: 0; border-radius: var(--radius-xs); background: none; color: var(--text-muted); font-family: var(--font-sans); font-size: var(--text-sm); line-height: 1; cursor: pointer; }
.tool:hover { background: var(--neutral-300); color: var(--text); }
.tool[aria-pressed="true"] { background: var(--surface-raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.tool svg { width: 16px; height: 16px; }
.editor__body { padding: var(--space-3) var(--space-4); min-height: 16rem; outline: none; }
.editor__body p { margin: 0 0 1em; }
.editor__body p:last-child { margin-bottom: 0; }
.editor__body:empty::before { content: attr(data-placeholder); color: var(--text-faint); }
@media (max-width: 760px) { .editor__body { padding: var(--space-2); min-height: 12rem; } .tool { min-width: 36px; height: 36px; } }

.tags-field { display: flex; align-items: center; gap: var(--space-1); }
.tags-field .input { max-width: 20rem; }

.action-bar { position: sticky; bottom: 0; z-index: 10; margin-top: var(--space-4); padding: var(--space-1-5) 0; background: var(--bg); border-top: 1px solid var(--border); display: flex; align-items: center; gap: var(--space-1); }
.action-bar__spacer { flex: 1; }
.action-bar__status { font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text-muted); }
@media (max-width: 760px) { .action-bar { flex-wrap: wrap; } .action-bar .btn-primary { flex: 1 1 100%; order: -1; } .action-bar__status { display: none; } }

/* ── On this day ──────────────────────────────────────────────────── */
.date-picker { display: flex; align-items: flex-end; gap: var(--space-1); margin-bottom: var(--space-5); }
.date-picker .field { margin: 0; }
.date-picker .input { width: 11rem; }
.today-card { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-2); align-items: center; padding: var(--space-2) var(--space-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; color: inherit; margin-bottom: var(--space-6); }
.today-card:hover { border-color: var(--border-strong); }
.today-card__kicker { font-size: var(--text-xs); line-height: var(--leading-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--accent-strong); }
.today-card__title { font-family: var(--font-serif); font-size: var(--text-lg); line-height: var(--leading-lg); }
.today-card__sub { font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text-muted); }
.today-card__arrow { color: var(--text-muted); font-size: var(--text-lg); }
@media (max-width: 760px) { .today-card { grid-template-columns: 1fr auto; } .today-card__kicker { grid-column: 1 / -1; } }
.otd-row--empty { color: var(--text-faint); }
.otd-row--empty:hover { background: none; }

/* ── Alerts ───────────────────────────────────────────────────────── */
.alert { display: flex; gap: var(--space-1-5); align-items: flex-start; padding: var(--space-1-5) var(--space-2); border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-raised); font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text); }
.alert__icon { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--neutral-500); margin-top: 6px; flex-shrink: 0; }
.alert__body { flex: 1; }
.alert__title { font-weight: var(--weight-semibold); }
.alert__close { margin-left: auto; }
.alert--success { background: var(--success-wash); border-color: var(--success-300); color: var(--success-text); }
.alert--success .alert__icon { background: var(--success); }
.alert--warn { background: var(--warn-wash); border-color: var(--warn-300); color: var(--warn-text); }
.alert--warn .alert__icon { background: var(--warn); }
.alert--danger { background: var(--danger-wash); border-color: var(--danger-300); color: var(--danger-text); }
.alert--danger .alert__icon { background: var(--danger); }
.messages { display: flex; flex-direction: column; gap: var(--space-1); max-width: var(--width-page); margin: var(--space-2) auto 0; padding: 0 var(--space-3); }

/* ── Tables ───────────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); line-height: var(--leading-sm); }
.table th { text-align: left; padding: var(--space-1) var(--space-1); border-bottom: 1px solid var(--border-strong); font-size: var(--text-xs); line-height: var(--leading-xs); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--text-muted); font-weight: var(--weight-semibold); vertical-align: bottom; }
.table td { padding: var(--space-1-5) var(--space-1); border-bottom: 1px solid var(--border); vertical-align: top; }
.table td.is-muted { color: var(--text-muted); }
.table td.is-num, .table th.is-num { text-align: right; font-family: var(--font-mono); }
.table td.is-actions { text-align: right; white-space: nowrap; }
.table td.is-actions .btn-group { flex-wrap: nowrap; justify-content: flex-end; }
.table tbody tr:hover { background: var(--surface); }
.table tr:last-child td { border-bottom: none; }

/* ── Lists (entries, grouped by month) ────────────────────────────── */
.month-group { margin-top: var(--space-4); }
.month-group:first-child { margin-top: 0; }
.month-group__head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: var(--space-1); border-bottom: 1px solid var(--border-strong); }
.month-group__head h3 { font-size: var(--text-md); line-height: var(--leading-md); font-weight: var(--weight-medium); }
.entry-row { display: grid; grid-template-columns: 3.5rem 3.25rem 1fr auto; gap: var(--space-2); align-items: baseline; padding: var(--space-1-5) var(--space-0-5); border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; transition: background-color var(--duration) var(--ease); }
.entry-row__rating {
  align-self: stretch; display: flex; align-items: center; justify-content: center;
  background: var(--accent-wash); color: var(--accent-strong); border-radius: var(--radius-full);
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-medium);
  white-space: nowrap; padding: 0 var(--space-0-5); text-align: center;
}
.entry-row__rating.is-empty { background: none; color: var(--text-faint); }
.entry-list { border-top: 1px solid var(--border-strong); }
.entry-row__main { display: flex; flex-direction: column; gap: 2px; }
.entry-row__sub { font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text-muted); }
.entry-row__title--date { font-family: var(--font-serif); font-size: var(--text-lg); line-height: var(--leading-lg); }
.entry-row__year { font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text-muted); }
.entry-row:hover, .entry-row.is-hover { background: var(--surface); }
.entry-row__date { font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text-muted); white-space: nowrap; }
.entry-row__title { font-family: var(--font-serif); font-size: var(--text-lg); line-height: var(--leading-lg); }
.entry-row__meta { display: flex; gap: var(--space-0-5); flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) { .entry-row { grid-template-columns: 1fr; gap: var(--space-0-5); } .entry-row__meta { justify-content: flex-start; } }

.otd-row { display: grid; grid-template-columns: 3.5rem 1fr; gap: var(--space-2); align-items: baseline; padding: var(--space-1-5) 0; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.otd-row:hover { background: var(--surface); }
.otd-row__year { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-muted); }

/* ── Pagination ───────────────────────────────────────────────────── */
.pagination { display: flex; gap: var(--space-2); justify-content: space-between; align-items: center; margin-top: var(--space-4); padding-top: var(--space-2); border-top: 1px solid var(--border); }
.pagination__status { font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text-muted); }
.pagination__pages { display: flex; gap: var(--space-0-5); }
.page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 var(--space-1); border-radius: var(--radius-xs); font-size: var(--text-sm); color: var(--text-muted); text-decoration: none; border: 1px solid transparent; }
.page-link:hover { color: var(--text); background: var(--surface); }
.page-link[aria-current="page"] { color: var(--text); border-color: var(--border-strong); background: var(--surface-raised); }

/* ── Empty state ──────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: var(--space-8) var(--space-3); color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: var(--space-1); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }
.empty-state h3 { color: var(--text); }
.empty-state p { margin: 0; max-width: 28rem; text-wrap: pretty; }
.empty-state .btn { margin-top: var(--space-1); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .site-header__inner { gap: var(--space-2); }
  .nav-toggle-label { display: block; }
  .main-nav { position: absolute; top: var(--header-height); left: 0; right: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; gap: 0; padding: 0 var(--space-3); max-height: 0; overflow: hidden; transition: max-height 220ms var(--ease); }
  .nav-toggle:checked ~ .main-nav { max-height: 24rem; padding-bottom: var(--space-2); }
  .main-nav a { padding: var(--space-1-5) 0; border-bottom: 1px solid var(--border); }
  .main-nav a[aria-current="page"] { border-bottom-color: var(--border); box-shadow: inset 2px 0 0 var(--accent); padding-left: var(--space-1-5); }
  .user-menu { margin-left: auto; }
  .user-menu__name { display: none; }
  .page { padding: var(--space-3) var(--space-2) var(--space-8); }
  h1 { font-size: var(--text-xl); line-height: var(--leading-xl); }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head__text { align-self: stretch; }
  .page-head__actions { align-self: stretch; }
  .page-head__actions .btn { flex: 1; }
  .page-head__actions--stack { flex-direction: row; align-items: center; justify-content: flex-start; }
  .page-head__actions--stack .btn, .page-head__actions--stack .btn-group { flex: 0 0 auto; }
  .page-head__actions--stack .menu__panel { right: auto; left: 0; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  .input, select.input { min-height: 44px; }
  .prose { font-size: 17px; line-height: 28px; }
}
