/* Shared reading layout, following the reference site's light presentation. */
:root {
  --paper: #f4f5f6;
  --ink: #1c2733;
  --muted: #5c6672;
  --emerald: #135e6b;
  --line: #e2e4e7;
  --wash: #edf3f4;
  --surface: #fff;
  --sidebar-width: 200px;
}

html { scroll-padding-top: 24px; }
body { padding-left: var(--sidebar-width); }
.site-shell { width: min(1152px, calc(100% - 80px)); }
.site-shell main { min-width: 0; }
.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar-width);
  height: 100dvh;
  padding: 16px 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  overflow-y: auto;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
  scrollbar-width: thin;
  scrollbar-color: #d4d7db transparent;
}
.site-header::-webkit-scrollbar { width: 4px; }
.site-header::-webkit-scrollbar-thumb { background: #d4d7db; border-radius: 4px; }
.site-header::-webkit-scrollbar-track { background: transparent; }
.site-header::-webkit-scrollbar-button { display: none; }
.site-header .wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--line);
  font: 650 20px/1.3 var(--sans);
  letter-spacing: -.7px;
}
.site-header .wordmark-dot { margin: 5px 0 0 4px; font-size: 7px; }
.site-header .wordmark-note {
  display: block;
  margin-top: 4px;
  font: 400 11px/1.5 var(--sans);
  letter-spacing: 1.5px;
}
.site-header .primary-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: none;
  padding-top: 8px;
  font-size: 13px;
}
.nav-section-label { margin: 4px 0 2px; padding: 0 12px; color: var(--muted); font-size: 11px; line-height: 1.5; letter-spacing: 2px; }
.site-header .primary-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  transition: color 150ms ease, background-color 150ms ease;
}
.site-header .primary-nav a:hover { color: var(--emerald); background: #f1f5f6; }
.site-header .primary-nav a[aria-current] { color: var(--emerald); background: #e7eff0; font-weight: 600; }
.nav-number { width: 20px; font: 12px/1.4 Consolas, monospace; color: var(--emerald); font-weight: 400; }
.sidebar-note { margin: auto 12px 0; padding-top: 40px; color: var(--muted); font-size: 10px; letter-spacing: 1px; line-height: 1.9; }
.sidebar-note span { letter-spacing: 1.5px; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .6fr);
  align-items: end;
  gap: 36px;
  max-width: none;
  margin: 0;
  padding: 54px 0 28px;
  border-bottom: 1px solid var(--line);
}
.intro .eyebrow { margin-bottom: 12px; color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.intro h1 { font: 650 clamp(24px, 2.5vw, 34px)/1.4 var(--sans); letter-spacing: -.8px; text-wrap: balance; }
.intro-note { margin: 12px 0 0; font-size: 12px; line-height: 1.9; color: var(--muted); }
.intro-actions { min-width: 0; }
.search-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; padding: 11px 15px; border: 1px solid #d4d7db; border-radius: 8px; background: var(--surface); font-size: 12px; color: var(--muted); }
.search-link:hover { border-color: var(--emerald); }
.timeline-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0 0; font-size: 11px; }
.timeline-stats div { display: flex; justify-content: space-between; gap: 8px; }
.timeline-stats dt { color: var(--muted); }
.timeline-stats dd { margin: 0; font-variant-numeric: tabular-nums; }

.timeline .day-group { display: block; padding: 24px 0 32px; border-bottom: 1px solid var(--line); }
.timeline .day-heading { position: static; height: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; padding: 0 5px; margin: 0 0 15px; border: 0; }
.day-heading h2 { font-size: 13px; margin: 0; font-weight: 600; }
.day-weekday, .day-count { font-size: 12px; color: var(--muted); }
.day-count { margin-left: 0; }
.day-entries { position: relative; padding-left: 76px; }
.day-entries::before { content: ""; position: absolute; left: 54px; top: 22px; bottom: 22px; width: 1px; background: #d4d7db; }
.day-entries .entry { padding: 18px 22px 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); animation: none; }
.day-entries .entry:last-child { margin-bottom: 0; }
.day-entries .entry::before { content: ""; position: absolute; left: -26px; top: 30px; width: 7px; height: 7px; border: 2px solid var(--paper); border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 1px #95afb5; }
.day-entries .entry-meta time { position: absolute; left: -76px; top: 24px; width: 44px; text-align: center; }
.entry-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.entry-meta { min-width: 0; flex-wrap: wrap; font-size: 11px; }
.record-type { font-size: 10px; }
.entry-copy-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 14px; font-size: 11px; color: var(--muted); }
.entry-copy-actions button, .entry-copy-actions a { min-height: 32px; display: inline-flex; align-items: center; white-space: nowrap; }
.entry-copy-actions .permalink { font-size: inherit; }
.entry-title { font: 650 19px/1.6 var(--sans); margin: 8px 0 12px; letter-spacing: -.3px; }
.entry-body { font-size: 15px; line-height: 1.9; color: #3e4954; }
.entry-body img { border-radius: 7px; }
.entry-tags { margin: 18px 0 12px; color: var(--emerald); }
.entry-actions { justify-content: flex-start; gap: 12px; font-size: 11px; }
.entry-actions>span { color: var(--muted); }
.entry-actions .open-interaction { min-height: 36px; }
.page-heading { padding: 48px 0 30px; }
.page-heading h1 { font: 650 32px/1.5 var(--sans); letter-spacing: -.5px; }
.page-heading .eyebrow { margin-bottom: 12px; }
.tag-cloud a, .access-card { background: var(--surface); border-radius: 10px; }
.single-column { max-width: 880px; }
.entry-detail { padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.entry-detail .entry-header { flex-wrap: wrap; }
.entry-detail .entry-title { font: 650 30px/1.6 var(--sans); letter-spacing: -.5px; }
.entry-detail .entry-body { font-size: 16px; line-height: 2; }
.breadcrumb { padding: 28px 0; }
.site-footer { margin-top: 32px; font-size: 11px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 1100px) and (min-width: 900px) {
  .site-shell { width: calc(100% - 48px); }
  .intro { grid-template-columns: 1fr; gap: 22px; padding-top: 36px; }
  .intro-actions { max-width: 440px; }
}
@media (max-width: 899px) {
  body { padding-left: 0; }
  .site-shell { width: calc(100% - 40px); }
  .site-header { position: static; width: calc(100% + 40px); height: auto; margin-left: -20px; padding: 18px 20px 12px; border: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .site-header .wordmark { flex-direction: row; align-items: center; justify-content: space-between; padding: 0 0 14px; border: 0; font-size: 19px; }
  .site-header .wordmark-note { margin: 0; font-size: 11px; }
  .site-header .primary-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 8px; width: 100%; padding: 0; }
  .nav-section-label, .sidebar-note { display: none; }
  .site-header .primary-nav a { justify-content: center; gap: 8px; padding: 8px 4px; font-size: 12px; }
  .nav-number { width: auto; font-size: 11px; }
  .intro { grid-template-columns: 1fr; gap: 20px; padding: 28px 0 24px; }
  .intro h1 { font-size: clamp(23px, 4.5vw, 30px); letter-spacing: -.5px; }
  .intro-note { font-size: 12px; }
  .timeline-stats { margin-top: 12px; font-size: 12px; }
  .timeline .day-group { padding: 22px 0 26px; }
  .timeline .day-heading { padding: 0; gap: 8px; }
  .day-heading h2 { font-size: 12px; }
  .day-weekday, .day-count { font-size: 11px; }
  .day-entries { padding-left: 0; }
  .day-entries .entry-meta time { position: static; width: auto; text-align: left; }
  .day-entries::before, .day-entries .entry::before { display: none; }
  .day-entries .entry { padding: 15px 16px 12px; }
  .entry-header { flex-wrap: wrap; gap: 0 12px; }
  .entry-copy-actions { gap: 4px 12px; margin-left: auto; font-size: 10px; }
  .entry-copy-actions button, .entry-copy-actions a { min-width: 44px; min-height: 44px; }
  .entry-title { font-size: 18px; margin-top: 4px; }
  .entry-body { font-size: 15px; line-height: 1.9; }
  .entry-actions { font-size: 11px; gap: 8px; flex-wrap: wrap; }
  .entry-actions .open-interaction { min-height: 44px; }
  .entry-detail { padding: 20px 16px; }
  .entry-detail .entry-title { font-size: 25px; }
  .entry-detail .entry-body { font-size: 16px; }
  .page-heading { padding: 30px 0 24px; }
  .page-heading h1 { font-size: 28px; }
  .site-footer { padding: 18px 0 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .primary-nav a { transition: none; }
}
