@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..700&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&family=Newsreader:ital,opsz,wght@0,6..72,300..600;1,6..72,300..600&family=Playfair+Display:ital,wght@0,400..700;1,400..700&display=swap");

/* Smooth cross-document navigation (Chrome 126+, Safari 18+, Firefox in-progress).
   Falls back silently to default browser behavior elsewhere. */
@view-transition { navigation: auto; }

/* Slightly slower than the browser default so the fade actually registers. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.25s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ───────────────────────────────────────
   AI Wiki Quickstart — Field Manual
   Default theme: "Paper" (cream + oxblood)
   ─────────────────────────────────────── */

:root {
  --bg: #1c1813;
  --surface: #2a2319;
  --surface2: #3e372d;
  --border: #3c352b;
  --text: #f1e9d8;
  --muted: #a89878;
  --accent: #d49a2a;
  --accent-l: #daa94a;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --size: 17px;
  --lh: 1.65;
  --width: 680px;
  --r: 2px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--size);
  line-height: var(--lh);
  font-feature-settings: "kern", "liga", "calt", "onum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  transition:
    background-color 0.3s,
    color 0.3s;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='280' height='280'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  height: 56px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-name {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.2s;
}
.site-name:hover {
  color: var(--accent);
}

/* ── Site nav (sliding pill) ── */
.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin-left: auto;
}

.site-nav-pill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 30px;
  width: 0;
  transform: translateY(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
}
.site-nav-pill.ready {
  opacity: 1;
}

.site-nav a {
  position: relative;
  z-index: 1;
  padding: 0.45rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1;
  border-radius: var(--r);
}
.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}
.site-nav a.active {
  color: var(--text);
}

/* ── Sub-nav ── */
.sub-nav {
  position: sticky;
  top: 56px;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 2rem;
  height: 38px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  gap: 0;
}

.sub-nav a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 0.9rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  margin-bottom: -1px;
  transition:
    color 0.2s,
    border-color 0.2s;
  white-space: nowrap;
}
.sub-nav a:hover {
  color: var(--text);
  text-decoration: none;
}
.sub-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Main ── */
main {
  max-width: var(--width);
  margin: 0 auto;
  padding: 4.5rem 2rem 9rem;
  position: relative;
}

h2 {
  scroll-margin-top: 110px;
}

/* ── Type ── */
h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--text);
  margin-bottom: 1.5rem;
  animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s backwards;
}

h2 {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0;
  border-bottom: none;
}
h2::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}

p {
  margin-bottom: 1.05rem;
  font-family: var(--font);
  line-height: 1.7;
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 30%, transparent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.2s;
}
a:hover {
  text-decoration-color: var(--accent);
}

strong {
  font-weight: 600;
  color: var(--text);
}
em {
  font-style: italic;
}

ul,
ol {
  padding-left: 1.4rem;
  margin-bottom: 1.05rem;
}
li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
}
li::marker {
  color: var(--accent);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
  height: 0;
}

/* ── Blockquote ── */
blockquote {
  border-left: 2px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 0.7rem 1rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}
blockquote p {
  margin-bottom: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}
blockquote a {
  color: var(--accent);
}

/* ── Intro / requirements ── */
.intro {
  font-family: var(--font);
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 2.5rem;
  animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s backwards;
}
.intro a {
  color: var(--accent);
}

.requirements {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.55rem 0.95rem;
  margin-bottom: 3rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) 0.22s backwards;
}
.requirements strong {
  color: var(--text);
  font-weight: 500;
}
.requirements a {
  color: var(--accent);
}

/* ── Code ── */
.code-block {
  position: relative;
  margin: 1.4rem 0;
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.05rem 1.2rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82em;
  line-height: 1.6;
  color: var(--text);
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface);
  padding: 0.08em 0.4em;
  border-radius: 2px;
  border: 1px solid var(--border);
  color: var(--accent);
}

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

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s;
}
.copy-btn:hover {
  color: var(--text);
  background: var(--surface2);
  border-color: var(--muted);
}
.copy-btn.copied {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Path cards (index page) ── */
.paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0 3rem;
  counter-reset: path;
}

.path-card {
  position: relative;
  display: block;
  padding: 1.9rem 1.6rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  counter-increment: path;
  transition:
    border-color 0.3s,
    transform 0.3s,
    background 0.3s;
  overflow: hidden;
}
.path-card::before {
  content: counter(path, decimal-leading-zero);
  position: absolute;
  top: 0.7rem;
  right: 1.2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1;
  color: var(--accent);
  opacity: 0.6;
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.path-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  text-decoration: none;
  background: color-mix(in srgb, var(--surface) 75%, var(--bg));
}
.path-card:hover::before {
  opacity: 1;
  transform: translateY(-2px);
}

.path-card-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 1.6rem;
}
.path-card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.path-card p {
  font-size: 0.94rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* ── Steps ── */
.step {
  margin-bottom: 2rem;
}
.step > p:first-child > strong:first-child {
  color: var(--text);
  font-weight: 600;
}

/* ── Notes list ── */
.notes-list {
  list-style: none;
  padding: 0;
}

.notes-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.96rem;
  color: var(--text);
  line-height: 1.6;
}
.notes-list li:last-child {
  border-bottom: none;
}
.notes-list li a {
  color: var(--accent);
}

.sub-tools {
  list-style: none;
  padding: 0;
  margin: 0.7rem 0 0 0.5rem;
  border-left: 1px dashed var(--border);
  padding-left: 1.2rem;
}
.sub-tools li {
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: none;
  color: var(--muted);
}
.sub-tools li::before {
  content: "›";
  color: var(--accent);
  font-size: 1rem;
  margin-right: 0.5em;
}

/* ── Controls cog (in header, right of nav) ── */
#controls-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
#controls-tab svg {
  width: 15px;
  height: 15px;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
#controls-tab:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
#controls-tab:hover svg {
  transform: rotate(60deg);
}
#controls-tab:focus-visible {
  outline: none;
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Controls drawer ── */
#controls-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 99;
  overflow-y: auto;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 1.8rem 1.8rem;
}
#controls-drawer.open {
  right: 0;
}

.drawer-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin: 0 -1.8rem 2rem;
  padding: 1.1rem 1.8rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.drawer-header h3 {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.drawer-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: var(--r);
  line-height: 1;
  transition: color 0.2s;
}
.drawer-close:hover {
  color: var(--accent);
}

.section-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  margin-top: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.preset-btn {
  padding: 0.55rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
  text-align: center;
}
.preset-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.preset-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

.ctrl-row {
  margin-bottom: 1.1rem;
}
.ctrl-row label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.ctrl-row label .val {
  color: var(--text);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

input[type="color"] {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  padding: 2px 3px;
}

select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  padding: 0.45rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  cursor: pointer;
  outline: none;
}

.drawer-reset {
  margin: 0;
  padding: 0.32rem 0.6rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.drawer-reset:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Animations ── */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ───────────────────────────────────────
   Site section label (sub-page header)
   ─────────────────────────────────────── */

.site-section {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding-left: 0.9rem;
  margin-left: 0.1rem;
  border-left: 1px solid var(--border);
  transition: color 0.2s;
  line-height: 1;
}
.site-section:hover {
  color: var(--text);
  text-decoration: none;
}
.site-section.active {
  color: var(--accent);
}

/* ───────────────────────────────────────
   Home page — almanac / field notes
   ─────────────────────────────────────── */

.site-header--home .site-nav {
  margin-left: auto;
}

/* Home column width is fixed by design — independent of the drawer's
   max-width slider, which is intended for the prose-heavy sub-pages. */
.masthead-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 5.5rem 2rem 7rem;
  text-align: center;
}

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 4.5rem;
}

.masthead-rule {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  max-width: 320px;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s backwards;
}
.masthead-rule-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.masthead-title {
  font-family: "Fraunces", "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: clamp(4rem, 13vw, 8.5rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--text);
  margin: 0.4rem 0 0.2rem;
  font-variation-settings:
    "opsz" 144,
    "SOFT" 100;
  animation: rise 0.95s cubic-bezier(0.2, 0.7, 0.2, 1) 0.18s backwards;
}
.masthead-title em {
  font-style: italic;
  color: var(--accent);
}
.masthead-line-1,
.masthead-line-2 {
  display: block;
}
.masthead-line-2 {
  padding-left: 1.5ch;
  margin-top: -0.05em;
}

.masthead-sub {
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 32ch;
  margin: 0;
  animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) 0.36s backwards;
}

.masthead-meta {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) 0.46s backwards;
}

/* Contents rule — horizontal line with centered label */
.contents-rule {
  position: relative;
  border: none;
  border-top: 1px solid var(--border);
  height: 0;
  margin: 0 0 3rem;
  overflow: visible;
  animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) 0.54s backwards;
}
.contents-rule::after {
  content: attr(data-label);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0 0.9rem;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Entries list */
.entries {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  counter-reset: entry;
}

.entry {
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--border);
  animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) 0.64s backwards;
}
.entry:nth-child(2) {
  animation-delay: 0.74s;
}
.entry:last-child {
  border-bottom: none;
}

.entry-link,
.entry--placeholder {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.8rem;
  align-items: start;
  text-decoration: none;
  color: inherit;
}
.entry-link {
  transition: color 0.2s;
}
.entry-link:hover {
  text-decoration: none;
}

.entry-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.5rem;
  white-space: nowrap;
}

.entry-body {
  min-width: 0;
}

.entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.entry-title {
  display: block; /* override global h2 { display: flex } */
  text-transform: none; /* override global h2 { text-transform: uppercase } */
  font-family: "Fraunces", var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
  transition: color 0.25s;
}
.entry-title::before {
  content: none;
} /* override global h2::before { content: "" } */
.entry-link:hover .entry-title {
  color: var(--accent);
}

.entry-tag {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.35rem;
}

.entry-desc {
  font-family: var(--font);
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 0.55rem;
}

.entry-meta {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.entry-arrow {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--muted);
  align-self: center;
  transition:
    transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
    color 0.25s;
  padding-right: 0.4rem;
}
.entry-link:hover .entry-arrow {
  color: var(--accent);
  transform: translateX(8px);
}

/* Placeholder rows — softer, italicized */
.entry--placeholder {
  grid-template-columns: auto 1fr;
  opacity: 0.55;
}
.entry--placeholder .entry-title {
  font-style: italic;
  color: var(--muted);
  font-weight: 400;
}

/* Footer for landing */
.masthead-foot {
  text-align: center;
  margin-top: 4.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.masthead-foot .dots {
  display: block;
  color: var(--border);
  font-size: 1rem;
  letter-spacing: 0.4em;
  margin-bottom: 0.9rem;
}
.masthead-foot a {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}
.masthead-foot a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  main {
    padding: 3rem 1.4rem 6rem;
  }
  .site-header {
    padding: 0 1.4rem;
    gap: 1rem;
    height: 52px;
  }
  .site-section {
    padding-left: 0.7rem;
  }
  .sub-nav {
    padding: 0 1.4rem;
    top: 52px;
  }
  h2 {
    scroll-margin-top: 100px;
  }
  h1 {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }
  .paths {
    grid-template-columns: 1fr;
  }
  #controls-drawer {
    width: 100%;
    right: -100%;
  }

  .masthead-page {
    padding: 3rem 1.4rem 5rem;
  }
  .masthead {
    gap: 1.2rem;
    margin-bottom: 3rem;
  }
  .masthead-line-2 {
    padding-left: 1ch;
  }
  .entry-link,
  .entry--placeholder {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
  .entry-num {
    padding-top: 0;
  }
  .entry-arrow {
    display: none;
  }
  .entry-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  .entry-tag {
    padding-top: 0;
  }
}
