/* ==============================================
   hpl-notebook — The Human Pattern Lab

   Register: candlelit notebook, held open after midnight.
     - Dark first. Warm, watchful, tactile.
     - Reading serif for body, system sans for meta.
     - Calm rhythm with stronger atmosphere and structure.
     - Must stay fully readable with CSS disabled, per OFD's
       "habitability with stylesheet off" principle.

   Palette (hearth frequency):
     #120f0d  deep lacquer     (page background)
     #191512  lacquer soft     (panels, cards)
     #231c18  seam             (borders, dividers)
     #e8dfd2  body text        (warm paper)
     #f5ecdd  heading text     (ivory)
     #d6a65c  ember            (links, rules, accents)
     #efc37d  ember bright     (hover, emphasis)
     #988b7b  quiet            (metadata)
     #6f6255  smoke            (secondary lines)
   ============================================== */

:root {
  --bg: #120f0d;
  --bg-soft: #191512;
  --bg-softer: rgba(25, 21, 18, 0.82);
  --panel: rgba(30, 24, 20, 0.78);
  --panel-strong: rgba(35, 28, 24, 0.92);
  --text: #e8dfd2;
  --text-strong: #f5ecdd;
  --text-soft: #cec3b4;
  --meta: #988b7b;
  --smoke: #6f6255;
  --line: #231c18;
  --line-bright: rgba(214, 166, 92, 0.25);
  --accent: #d6a65c;
  --accent-bright: #efc37d;
  --accent-soft: rgba(214, 166, 92, 0.12);
  --shadow-deep: 0 18px 60px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.18);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
}

/* --- Reset & Foundation --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  color-scheme: dark light;
  background:
    radial-gradient(circle at top center, rgba(214, 166, 92, 0.08), transparent 38%),
    linear-gradient(180deg, #17120f 0%, #120f0d 26%, #0f0c0a 100%);
}

body {
  font-family: 'Lora', 'Source Serif Pro', 'Georgia', 'Times New Roman', serif;
  line-height: 1.8;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(239, 195, 125, 0.05), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 18%),
    var(--bg);
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 22%),
    radial-gradient(circle at 20% 0%, rgba(214, 166, 92, 0.08), transparent 24%),
    radial-gradient(circle at 100% 10%, rgba(214, 166, 92, 0.04), transparent 20%);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.09;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 4px, 4px 100%;
  mix-blend-mode: soft-light;
  z-index: -1;
}

/* --- Skip Link (visible on focus) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--text-strong);
  color: var(--bg);
  padding: 0.55rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 100;
  text-decoration: none;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.9rem;
  box-shadow: var(--shadow-soft);
}

.skip-link:focus {
  top: 0;
}

/* --- Typography --- */
h1 {
  font-size: clamp(2.25rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.08;
  margin-bottom: 0.85rem;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 3rem;
  margin-bottom: 1.1rem;
  color: var(--text-strong);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 5.5rem;
  border-bottom: 1px solid var(--line-bright);
}

h3 {
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 2rem;
  margin-bottom: 0.55rem;
  color: var(--text-strong);
}

h4, h5, h6 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--text-strong);
}

p {
  margin-bottom: 1rem;
}

p + p {
  margin-top: 0.3rem;
}

strong, b {
  color: var(--text-strong);
  font-weight: 600;
}

em, i {
  font-style: italic;
}

/* --- Navigation --- */
header[role="banner"] {
  margin-bottom: 3rem;
  padding: 0 0 1.5rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}

header[role="banner"]::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(8rem, 32%);
  border-bottom: 1px solid var(--line-bright);
}

nav {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.nav-home {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-strong);
  text-decoration: none;
  margin-bottom: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-home:hover,
.nav-home:focus {
  color: var(--accent-bright);
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}

nav a {
  color: var(--meta);
  text-decoration: none;
  font-size: 0.84rem;
  transition: color 0.18s ease;
}

nav a:hover,
nav a:focus {
  color: var(--accent-bright);
}

nav a[aria-current="page"] {
  color: var(--text-strong);
  font-weight: 600;
}

/* --- Links --- */
a {
  color: var(--accent);
  text-decoration-color: rgba(214, 166, 92, 0.4);
  text-underline-offset: 0.18em;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

a:hover,
a:focus {
  color: var(--accent-bright);
  text-decoration-color: var(--accent-bright);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.external {
  font-size: 0.75em;
  color: var(--meta);
  margin-left: 0.2em;
  vertical-align: super;
}

/* --- Main Content --- */
main {
  margin-bottom: 3rem;
}

main section {
  margin-bottom: 2.4rem;
}

/* --- Archive Portraits / Figures --- */
.figure-archive,
figure.portrait,
figure.voice-portrait {
  margin: 0 0 2rem;
  padding: 0.9rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%),
    var(--panel-strong);
  border: 1px solid rgba(214, 166, 92, 0.12);
  border-radius: calc(var(--radius-lg) + 2px);
  box-shadow: var(--shadow-deep);
}

.figure-archive img,
figure.portrait img,
figure.voice-portrait img,
img.portrait,
img.voice-portrait,
img.avatar {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin: 0;
  border-radius: calc(var(--radius-lg) - 2px);
  border: 1px solid rgba(214, 166, 92, 0.14);
  background: linear-gradient(180deg, rgba(214, 166, 92, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow-soft);
}

.figure-archive figcaption,
figure.portrait figcaption,
figure.voice-portrait figcaption,
.figcaption-archive,
.image-caption {
  margin-top: 0.8rem;
  color: var(--meta);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.82rem;
  line-height: 1.55;
}

.figure-archive figcaption strong,
figure.portrait figcaption strong,
figure.voice-portrait figcaption strong {
  color: var(--text-strong);
  font-weight: 600;
}

.portrait-shell,
.voice-portrait-shell {
  display: grid;
  gap: 1.5rem;
  align-items: start;
  margin: 0 0 2.4rem;
}

.portrait-shell > *:first-child,
.voice-portrait-shell > *:first-child {
  margin-top: 0;
}

@media (min-width: 760px) {
  .portrait-shell,
  .voice-portrait-shell {
    grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
    gap: 1.75rem;
  }

  .portrait-shell .figure-archive,
  .portrait-shell figure.portrait,
  .portrait-shell figure.voice-portrait,
  .voice-portrait-shell .figure-archive,
  .voice-portrait-shell figure.portrait,
  .voice-portrait-shell figure.voice-portrait {
    position: sticky;
    top: 1.5rem;
  }
}

/* --- Blockquote --- */
blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.85rem 1.3rem;
  margin: 1.75rem 0;
  color: var(--text-soft);
  font-style: italic;
  background:
    linear-gradient(90deg, rgba(214, 166, 92, 0.08), rgba(214, 166, 92, 0.02) 55%, transparent),
    rgba(255, 255, 255, 0.01);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: inset 0 0 0 1px rgba(214, 166, 92, 0.04);
}

blockquote p {
  margin-bottom: 0.5rem;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* --- Inline code and code blocks --- */
code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 0.9em;
  color: var(--accent-bright);
  background: rgba(239, 195, 125, 0.08);
  padding: 0.08em 0.42em;
  border-radius: 3px;
}

pre {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24%),
    rgba(20, 16, 13, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.6rem 0;
  font-size: 0.92rem;
  line-height: 1.65;
  box-shadow: var(--shadow-soft);
}

pre code {
  background: transparent;
  padding: 0;
  color: var(--text);
  font-size: 1em;
}

/* --- Lists --- */
ul, ol {
  margin: 0 0 1.35rem 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

li > ul, li > ol {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

/* --- Horizontal rules --- */
hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.25rem 0;
}

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.01);
}

th, td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--text-strong);
  font-weight: 600;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Images --- */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.75rem auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

/* --- Homepage Staging --- */
.home-stage {
  display: grid;
  gap: 3rem;
}

.home-hero {
  display: grid;
  gap: 1.5rem;
  padding: 1.4rem;
  background:
    radial-gradient(circle at top right, rgba(239, 195, 125, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 34%),
    var(--panel-strong);
  border: 1px solid rgba(214, 166, 92, 0.12);
  border-radius: calc(var(--radius-lg) + 4px);
  box-shadow: var(--shadow-deep);
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), rgba(214, 166, 92, 0));
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 0.85rem;
}

.home-intro {
  font-size: 1.14rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 38rem;
}

.home-note {
  color: var(--text-soft);
  max-width: 36rem;
  margin-top: 1rem;
}

.hero-anchor {
  position: relative;
  z-index: 1;
}

.hearth-fox {
  min-height: 15rem;
  display: grid;
  place-items: center;
  border-radius: calc(var(--radius-lg) + 2px);
  border: 1px solid rgba(214, 166, 92, 0.14);
  background:
    radial-gradient(circle at center, rgba(239, 195, 125, 0.14), transparent 30%),
    radial-gradient(circle at center, rgba(214, 166, 92, 0.06), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.12)),
    rgba(17, 13, 11, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), var(--shadow-soft);
}

.hearth-fox__glyph {
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 1;
  color: var(--accent-bright);
  text-shadow: 0 0 24px rgba(239, 195, 125, 0.18);
  opacity: 0.92;
}

.hero-anchor-note {
  margin-top: 0.85rem;
  color: var(--meta);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.82rem;
  line-height: 1.55;
}

.home-registers,
.home-elsewhere {
  display: grid;
  gap: 1rem;
}

.section-intro {
  color: var(--text-soft);
  max-width: 38rem;
}

.register-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.9rem;
}

.register-grid li {
  margin: 0;
  padding: 1rem 1rem 0.95rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%),
    var(--panel);
  border: 1px solid rgba(214, 166, 92, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.register-grid strong {
  display: block;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.register-grid span {
  display: block;
  color: var(--text-soft);
  line-height: 1.65;
}

.register-coda {
  color: var(--text-soft);
  max-width: 38rem;
}

.elsewhere-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.elsewhere-list li {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0.8rem 0.95rem;
  border-left: 2px solid rgba(214, 166, 92, 0.18);
  background: rgba(255, 255, 255, 0.015);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.elsewhere-list span {
  color: var(--meta);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.84rem;
  line-height: 1.5;
}

@media (min-width: 760px) {
  .home-hero {
    grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 0.9fr);
    align-items: center;
    gap: 2rem;
    padding: 1.7rem;
  }

  .home-stage {
    gap: 3.4rem;
  }
}

/* --- Footer --- */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--meta);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

footer p {
  margin-bottom: 0.4rem;
}

footer a {
  color: var(--meta);
  text-decoration-color: rgba(152, 139, 123, 0.4);
}

footer a:hover,
footer a:focus {
  color: var(--accent-bright);
  text-decoration-color: var(--accent-bright);
}

.quiet {
  color: var(--meta);
  font-size: 0.85rem;
}

/* --- Lede --- */
.lede {
  font-size: 1.12rem;
  line-height: 1.72;
  color: var(--text-soft);
  margin-bottom: 2rem;
  font-style: italic;
  max-width: 40rem;
}

.lede code {
  font-style: normal;
}

/* --- Voice / Tag Index Lists --- */
.voice-index,
.tag-index {
  list-style: none;
  margin: 0;
  padding: 1rem 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 100%), var(--bg-softer);
  border: 1px solid rgba(214, 166, 92, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.voice-index li,
.tag-index li {
  margin: 0;
  padding: 0.25rem 0;
}

.voice-index a,
.tag-index a {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 500;
}

.count {
  color: var(--meta);
  font-size: 0.85em;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  margin-left: 0.25em;
}

/* --- RSS link in primary nav --- */
/* Sits in the nav ul with the other tabs, but visually quieter — it's a
   subscription doorway, not a section. Slightly smaller, dimmer, with a
   subtle left separator so it doesn't compete with Home/Voices/etc. */
.nav-rss {
  margin-left: auto;
}

.nav-rss a {
  color: var(--meta);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.1rem 0.45rem;
  border: 1px solid rgba(214, 166, 92, 0.18);
  border-radius: var(--radius-sm);
}

.nav-rss a:hover,
.nav-rss a:focus {
  color: var(--accent-bright);
  border-color: rgba(214, 166, 92, 0.4);
}

/* --- Breadcrumbs (per-item aggregate pages) --- */
/* Minimal trail — the site is shallow. This exists to give the reader a
   fast way back to the parent index, not to prove depth. */
.breadcrumbs {
  margin: 0 0 1.25rem;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  color: var(--meta);
}

.breadcrumb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}

.breadcrumb-list li {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.breadcrumb-list li + li::before {
  content: "›";
  color: var(--smoke);
  padding-right: 0.1rem;
}

.breadcrumb-list a {
  color: var(--meta);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  padding-bottom: 1px;
}

.breadcrumb-list a:hover,
.breadcrumb-list a:focus {
  color: var(--accent);
  border-bottom-color: rgba(214, 166, 92, 0.35);
}

.breadcrumb-list [aria-current="page"] {
  color: var(--text);
}

/* --- Entry Filing Footer (By [Voice] + Filed in [Burrows]) --- */
/* Shown at the foot of an entry so readers can step back to the voice or
   burrow the piece belongs to. Intentionally quiet — this is wayfinding,
   not a headline. */
.entry-filing {
  margin: 2.5rem 0 0;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.9rem;
}

.entry-voices,
.entry-burrows {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.9rem;
  margin: 0;
}

.entry-filing-label {
  color: var(--meta);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  min-width: 4.5rem;
}

.entry-filing-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.entry-voice-chip,
.entry-burrow-chip {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.entry-burrow-chip {
  background: var(--accent-soft);
  border: 1px solid rgba(214, 166, 92, 0.22);
  color: var(--accent-bright);
}

.entry-burrow-chip:hover {
  background: rgba(214, 166, 92, 0.2);
  border-color: rgba(214, 166, 92, 0.4);
}

/* Voice chips read as "the voice" — slightly softer register, a subtle
   contrast with the burrow chips so the two rows don't compete visually. */
.entry-voice-chip {
  background: rgba(236, 224, 198, 0.04);
  border: 1px solid rgba(236, 224, 198, 0.16);
  color: var(--text-strong);
}

.entry-voice-chip:hover {
  background: rgba(236, 224, 198, 0.08);
  border-color: rgba(236, 224, 198, 0.32);
}

/* --- Burrow Index --- */
/* Burrows are rooms with intention, so their index cards get more weight
   than the compact tag/voice pills — each one shows its own lede. */
.burrow-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.burrow-card {
  margin: 0;
  padding: 1.1rem 1.2rem 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 40%),
    var(--panel);
  border: 1px solid rgba(214, 166, 92, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.burrow-card-title {
  margin: 0 0 0.45rem;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.12rem;
  font-weight: 600;
}

.burrow-card-title a {
  text-decoration: none;
  color: var(--accent);
  border-bottom: 1px dashed rgba(214, 166, 92, 0.35);
  padding-bottom: 1px;
}

.burrow-card-title a:hover {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
}

.burrow-card-lede {
  margin: 0 0 0.6rem;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.burrow-card-meta {
  margin: 0;
}

.burrow-card-meta .quiet {
  opacity: 0.6;
  font-style: italic;
}

.burrow-count {
  color: var(--meta);
  font-size: 0.9rem;
  margin: 0 0 0.8rem;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.burrow-empty {
  padding: 1rem 1.1rem;
  background: var(--bg-softer);
  border: 1px dashed rgba(214, 166, 92, 0.15);
  border-radius: var(--radius-lg);
}

.burrow-empty p {
  margin: 0;
}

/* --- Entry Cards --- */
.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry-list > li {
  margin-bottom: 1.4rem;
  padding-bottom: 0;
  border-bottom: none;
}

.entry-list > li:last-child {
  margin-bottom: 0;
}

.entry-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%),
    var(--panel);
  border: 1px solid rgba(214, 166, 92, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.25rem 1.15rem;
  box-shadow: var(--shadow-deep);
  position: relative;
  overflow: hidden;
}

.entry-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), rgba(214, 166, 92, 0));
  opacity: 0.85;
}

.card-title {
  font-size: 1.34rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 0.45rem;
  border-bottom: none;
  padding-bottom: 0;
}

.card-title a {
  color: var(--text-strong);
  text-decoration: none;
}

.card-title a:hover,
.card-title a:focus {
  color: var(--accent-bright);
  text-decoration: underline;
  text-decoration-color: var(--accent-bright);
}

.card-meta {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.8rem;
  color: var(--meta);
  margin-bottom: 0.65rem;
  letter-spacing: 0.03em;
}

.card-type {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--accent);
}

.card-date {
  font-variant-numeric: tabular-nums;
}

.card-subtitle {
  font-style: italic;
  color: var(--text-soft);
  margin-bottom: 0;
}

.card-summary {
  color: var(--text-soft);
  font-size: 0.97rem;
  margin-bottom: 0;
}

/* --- Entry Tier Label (auto-prepended on trace entries) --- */
.entry-tier-label {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed var(--line-bright);
  display: inline-block;
  padding-right: 1.1rem;
}

.entry-tier-label-trace {
  color: var(--accent);
}

/* --- Voice Pinned Block --- */
.voice-pinned {
  margin: 2.5rem 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.voice-pinned-label {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

.voice-pinned-upcoming .entry-card-upcoming {
  opacity: 0.85;
}

.voice-pinned-upcoming .card-title {
  color: var(--text-strong);
}

.voice-pinned-upcoming .card-type {
  color: var(--accent);
  font-style: italic;
}

/* --- Voice Intro (when profile has no portrait) --- */
.voice-intro {
  margin-bottom: 2.5rem;
}

.voice-intro > .lede {
  margin-bottom: 1.25rem;
}

/* --- Pointer Cards (external_canonical entries) --- */
.pointer-card {
  margin: 1.5rem 0;
  padding: 1.75rem 1.5rem;
  background: var(--panel-strong);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.pointer-context {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--meta);
  margin-bottom: 1.25rem;
}

.pointer-context strong {
  color: var(--text-strong);
  font-weight: 600;
}

.pointer-meta {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.82rem;
  color: var(--meta);
  margin-bottom: 0.9rem;
  letter-spacing: 0.01em;
}

.pointer-subtitle {
  font-style: italic;
  color: var(--text-soft);
  margin-bottom: 0.9rem;
}

.pointer-summary {
  color: var(--text-soft);
  margin-bottom: 0.9rem;
}

.pointer-stats {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  margin: 1.25rem 0;
  padding: 0.9rem 1.1rem;
  background: rgba(214, 166, 92, 0.04);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.25rem;
}

.pointer-stats dt {
  color: var(--meta);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
  align-self: center;
}

.pointer-stats dd {
  color: var(--text-strong);
  margin: 0;
}

.pointer-status {
  margin: 1.25rem 0;
  padding: 0.85rem 1.1rem;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--smoke);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.pointer-status strong {
  color: var(--text-strong);
}

.pointer-action {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.pointer-link {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--bg);
  background: var(--accent);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.pointer-link:hover,
.pointer-link:focus {
  background: var(--accent-bright);
  color: var(--bg);
  text-decoration: none;
}

.pointer-arrow {
  margin-left: 0.35em;
  font-weight: 400;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  body {
    max-width: 100%;
    padding: 1.6rem 1rem 3rem;
  }

  h1 {
    font-size: 1.95rem;
  }

  h2 {
    font-size: 1.25rem;
    margin-top: 2.25rem;
  }

  nav ul {
    gap: 0.35rem 0.9rem;
  }

  .voice-index,
  .tag-index {
    padding: 0.9rem 1rem;
    gap: 0.4rem 0.95rem;
  }

  .entry-card {
    padding: 1rem 1rem 0.95rem;
  }

  .card-title {
    font-size: 1.16rem;
  }

  .home-hero {
    padding: 1rem;
  }

  .hearth-fox {
    min-height: 11rem;
  }

  .register-grid {
    grid-template-columns: 1fr;
  }

  .figure-archive,
  figure.portrait,
  figure.voice-portrait {
    padding: 0.7rem;
  }

  blockquote {
    padding: 0.7rem 1rem;
    margin: 1.25rem 0;
  }

  pre {
    padding: 0.8rem 1rem;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }

  body::before,
  body::after {
    display: none;
  }
}

/* --- Light Mode --- */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8f1e6;
    --bg-soft: #f2e7d7;
    --bg-softer: rgba(255, 252, 247, 0.9);
    --panel: rgba(255, 250, 242, 0.92);
    --panel-strong: rgba(248, 241, 230, 0.96);
    --text: #2b241e;
    --text-strong: #18120d;
    --text-soft: #4c4034;
    --meta: #7b6d5c;
    --smoke: #998b7d;
    --line: #e3d7c6;
    --line-bright: rgba(168, 114, 42, 0.3);
    --accent: #a8722a;
    --accent-bright: #7a4e16;
    --accent-soft: rgba(168, 114, 42, 0.08);
    --shadow-deep: 0 16px 40px rgba(83, 56, 22, 0.08);
    --shadow-soft: 0 8px 20px rgba(83, 56, 22, 0.06);
  }

  html {
    background:
      radial-gradient(circle at top center, rgba(168, 114, 42, 0.08), transparent 34%),
      linear-gradient(180deg, #fbf6ef 0%, #f8f1e6 100%);
  }

  body {
    background:
      radial-gradient(circle at top, rgba(168, 114, 42, 0.05), transparent 25%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 22%),
      var(--bg);
  }

  .skip-link {
    background: var(--text-strong);
    color: #faf6ed;
  }

  pre {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent 24%),
      #f4ebdd;
  }

  blockquote {
    box-shadow: inset 0 0 0 1px rgba(168, 114, 42, 0.05);
  }

  body::after {
    opacity: 0.04;
  }
}

/* --- Print --- */
@media print {
  body {
    color: #000;
    background: #fff;
    max-width: none;
    padding: 0;
    font-size: 11pt;
    box-shadow: none;
  }

  body::before,
  body::after,
  .entry-card::before {
    display: none;
  }

  header[role="banner"],
  .skip-link,
  footer {
    display: none;
  }

  .voice-index,
  .tag-index,
  .entry-card,
  blockquote,
  pre {
    background: none;
    box-shadow: none;
    border-color: #bbb;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: ' (' attr(href) ')';
    font-size: 0.85em;
    color: #555;
  }

  h1 {
    page-break-after: avoid;
  }

  blockquote {
    border-left-color: #000;
    color: #222;
  }
}
