/* ==========================================================================
   PEAR Club: site stylesheet

   Two palettes, both built from the club emblem:
     Night   (default)       near-black violet ground, ember orange, vellum text
     Archive ([data-theme="light"])  cool paper ground, darker ember for contrast
   Every color on the site comes from these tokens.

   Type: Gloock (display), Newsreader (reading), IBM Plex Mono (labels, data)
   ========================================================================== */

:root {
  --bg: #0d0b12;
  --bg-raised: #15121c;
  --bg-sunk: #09080d;
  --bg-hover: #1d1927;
  --line: rgba(239, 230, 214, 0.11);
  --line-strong: rgba(239, 230, 214, 0.24);
  --text: #efe6d6;
  --text-muted: #b5abb0;
  --text-faint: #8a8190;
  --ember: #ff7a29;
  --ember-strong: #ff9a52;
  --on-ember: #170a02;
  --aurora: #a58bff;
  --glow-ember: rgba(255, 122, 41, 0.17);
  --glow-aurora: rgba(132, 98, 255, 0.17);
  --band: rgba(165, 139, 255, 0.13);
  --star: 239, 230, 214;
  --header-bg: rgba(13, 11, 18, 0.8);
  --shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.9);

  --font-display: "Gloock", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --section: clamp(64px, 9vw, 120px);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f2f6;
  --bg-raised: #fbfafc;
  --bg-sunk: #ebe8f0;
  --bg-hover: #e8e4ee;
  --line: rgba(27, 22, 36, 0.12);
  --line-strong: rgba(27, 22, 36, 0.26);
  --text: #1b1624;
  --text-muted: #4c4556;
  --text-faint: #6b6375;
  --ember: #b34400;
  --ember-strong: #8f3600;
  --on-ember: #fff8f2;
  --aurora: #5b3fd0;
  --glow-ember: rgba(235, 120, 40, 0.16);
  --glow-aurora: rgba(110, 80, 230, 0.11);
  --band: rgba(91, 63, 208, 0.10);
  --star: 42, 32, 58;
  --header-bg: rgba(244, 242, 246, 0.82);
  --shadow: 0 40px 80px -50px rgba(40, 20, 70, 0.35);
  color-scheme: light;
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; }
img, svg, canvas { max-width: 100%; }
img { height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
[hidden] { display: none !important; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--ember) 65%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
a:hover { color: var(--ember); text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--ember); color: var(--on-ember); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ember);
  color: var(--on-ember);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-decoration: none;
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

.display {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 1.5rem + 4.6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.018em;
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 1.7rem + 3.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.012em;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.3rem + 2.1vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.006em;
}
h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.3rem; line-height: 1.25; }

.eyebrow, .label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow { color: var(--ember); }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.label { color: var(--text-faint); }

.lede {
  max-width: 34em;
  color: var(--text-muted);
  font-size: clamp(1.18rem, 1.06rem + 0.45vw, 1.38rem);
  line-height: 1.5;
}
.mono { font-family: var(--font-mono); }
.fine {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
}

.prose { max-width: 66ch; }
.prose > * + * { margin-top: 1em; }
.prose h3, .prose h4 { margin-top: 1.8em; font-size: 1.2rem; }
.prose h4 { font-size: 1.05rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--ember); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.prose blockquote {
  padding: 0.1em 0 0.1em 1.2em;
  border-left: 1px solid var(--ember);
  color: var(--text);
  font-style: italic;
  font-size: 1.08em;
}
.prose blockquote > * + * { margin-top: 0.6em; }
.prose strong { font-weight: 600; }

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ember); color: var(--on-ember); }
.btn-primary:hover { background: var(--ember-strong); color: var(--on-ember); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--ember); color: var(--ember); }
.btn-disabled {
  border: 1px dashed var(--line-strong);
  color: var(--text-faint);
  cursor: default;
}
.btn-sm { min-height: 40px; padding: 9px 16px; font-size: 0.75rem; }

.more {
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.more:hover { text-decoration: underline; }

.tag-example {
  display: inline-block;
  vertical-align: middle;
  padding: 2px 8px;
  border: 1px dashed var(--ember);
  border-radius: 999px;
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.copy-btn {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.copy-btn:hover, .copy-btn.is-done { border-color: var(--ember); color: var(--ember); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px 28px;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { color: var(--text); }
.brand img { width: 38px; height: 38px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; gap: 3px; }
.brand-name { font-family: var(--font-display); font-size: 1.3rem; line-height: 1; }
.brand-sub {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav a:hover { background: var(--bg-hover); color: var(--text); }
.nav-short { display: none; }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--ember); color: var(--ember); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; min-height: 0; padding-block: 12px 0; }
  .theme-toggle { margin-left: auto; width: 36px; height: 36px; }
  .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
    padding-block: 4px;
    border-top: 1px solid var(--line);
  }
  .nav a { padding: 10px 6px; font-size: 0.6875rem; letter-spacing: 0.06em; gap: 6px; }
  .nav a[aria-current="page"]::before { width: 5px; height: 5px; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
}

/* ---------- Atmosphere ---------- */

.starfield {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.has-glow { position: relative; overflow: hidden; isolation: isolate; }
.has-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 70% at 88% 12%, var(--glow-aurora), transparent 70%),
    radial-gradient(50% 60% at 6% 100%, var(--glow-ember), transparent 70%);
  pointer-events: none;
}

/* ---------- Home: hero ---------- */

.hero { border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(48px, 8vw, 112px);
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.hero-copy .display { max-width: 11.5em; }
.hero-note { color: var(--text-faint); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; }

.emblem {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
}
.emblem img {
  position: absolute;
  inset: 10%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line), 0 0 90px -12px var(--glow-ember), 0 50px 140px -40px var(--glow-aurora);
}
.dial { position: absolute; inset: 0; border-radius: 50%; }
.dial span { position: absolute; border-radius: 50%; }
.dial-ticks {
  inset: 0;
  background: repeating-conic-gradient(from -0.2deg, var(--line-strong) 0deg 0.4deg, transparent 0.4deg 5deg);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 10px), #000 calc(100% - 10px));
  mask: radial-gradient(closest-side, transparent calc(100% - 10px), #000 calc(100% - 10px));
}
.dial-major {
  inset: 0;
  background: repeating-conic-gradient(from -0.4deg, var(--ember) 0deg 0.8deg, transparent 0.8deg 30deg);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 20px), #000 calc(100% - 20px));
  mask: radial-gradient(closest-side, transparent calc(100% - 20px), #000 calc(100% - 20px));
  opacity: 0.8;
}
.dial-orbit { inset: 5.5%; border: 1px dashed var(--line-strong); }
.dial-orbit::after {
  content: "";
  position: absolute;
  top: -4px;
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 14px 2px var(--ember);
}
@media (prefers-reduced-motion: no-preference) {
  .dial { animation: spin 240s linear infinite; }
  .dial-orbit { animation: spin 90s linear infinite reverse; }
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .emblem { order: -1; max-width: min(340px, 78vw); }
}

/* ---------- Home: next talk ---------- */

.next-talk { border-bottom: 1px solid var(--line); background: var(--bg-raised); }
.next-talk-inner {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 32px;
  padding-block: 22px;
}
.next-label { display: inline-flex; align-items: center; gap: 10px; color: var(--ember); }
.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
}
@media (prefers-reduced-motion: no-preference) {
  .pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--ember);
    animation: ping 2.4s ease-out infinite;
  }
}
@keyframes ping { from { transform: scale(1); opacity: 0.9; } to { transform: scale(3.2); opacity: 0; } }

.next-date { display: flex; align-items: center; gap: 10px; padding-left: 32px; border-left: 1px solid var(--line); }
.next-day { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.next-month {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}
.next-what { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.next-what strong { font-weight: 600; font-size: 1.2rem; }
.next-what > span:not(.next-when) { color: var(--text-muted); }
.next-when { flex-basis: 100%; color: var(--text-faint); font-size: 0.8125rem; }

@media (max-width: 760px) {
  .next-talk-inner { grid-template-columns: auto minmax(0, 1fr); }
  .next-label { grid-column: 1 / -1; }
  .next-date { padding-left: 0; border-left: 0; padding-right: 16px; border-right: 1px solid var(--line); }
  .next-talk-inner .btn { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section); border-bottom: 1px solid var(--line); }
.section-inner { display: flex; flex-direction: column; gap: clamp(36px, 5vw, 60px); }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 46rem; }
.section-head p:not(.eyebrow) { color: var(--text-muted); max-width: 38em; }

/* Home: what the club does */
.offerings { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.offering {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr) auto;
  align-items: baseline;
  gap: 12px 40px;
  padding-block: 30px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 0.25s ease;
}
.offering:hover { color: var(--text); }
.offering-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  line-height: 1;
  transition: color 0.25s ease;
}
.offering:hover .offering-name { color: var(--ember); }
.offering-text { display: flex; flex-direction: column; gap: 8px; max-width: 36em; }
.offering-text h3 { font-size: 1.15rem; }
.offering-text p { color: var(--text-muted); }
.offering-go {
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.offering-go span { display: inline-block; transition: transform 0.25s ease; }
.offering:hover .offering-go span { transform: translateX(4px); }
@media (max-width: 800px) {
  .offering { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* Home: history */
.history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.history-grid .prose p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  color: var(--ember);
  font-family: var(--font-display);
  font-size: 3.4em;
  line-height: 0.85;
}
.history-grid cite { font-style: italic; }

.timeline { list-style: none; padding: 0 0 0 26px; border-left: 1px solid var(--line-strong); }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 4px; padding-block: 0 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 0.35em;
  width: 9px;
  height: 9px;
  border: 1px solid var(--ember);
  border-radius: 50%;
  background: var(--bg);
}
.timeline li.is-now::before { background: var(--ember); box-shadow: 0 0 12px var(--ember); }
.timeline .year { color: var(--ember); font-family: var(--font-mono); font-size: 0.875rem; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.timeline p { color: var(--text-muted); font-size: 1.03rem; line-height: 1.5; }
.timeline em { color: var(--text); }
@media (max-width: 900px) { .history-grid { grid-template-columns: minmax(0, 1fr); } }

/* Try the experiment (History page) */
.reg {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-sunk);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.reg-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.reg-plot { position: relative; min-height: 300px; aspect-ratio: 16 / 9; border-right: 1px solid var(--line); }
.reg-plot canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.reg-side { display: flex; flex-direction: column; gap: 20px; padding: 24px; }
.reg-steps { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; color: var(--text-muted); font-size: 1.02rem; line-height: 1.45; }
.reg-steps li::marker { color: var(--ember); font-family: var(--font-mono); font-size: 0.85em; }
.reg-controls { display: grid; gap: 8px; }
.reg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.reg-btn:hover:not(:disabled) { border-color: var(--ember); }
.reg-btn[aria-pressed="true"] { background: var(--bg-hover); border-color: var(--text-faint); }
.reg-btn:disabled { cursor: progress; opacity: 0.55; }
.swatch { width: 16px; height: 3px; flex: none; border-radius: 2px; }
.swatch-hi { background: var(--ember); }
.swatch-lo { background: var(--aurora); }
.reg-result { display: flex; flex-direction: column; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.reg-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.reg-counts div { display: flex; flex-direction: column; gap: 2px; }
.reg-counts strong { font-family: var(--font-mono); font-size: 1.35rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.reg-verdict { color: var(--text); font-size: 1.02rem; line-height: 1.5; min-height: 4.5em; }
.reg figcaption {
  padding: 16px 24px 18px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}
@media (max-width: 900px) {
  .reg-body { grid-template-columns: minmax(0, 1fr); }
  .reg-plot { border-right: 0; border-bottom: 1px solid var(--line); aspect-ratio: 4 / 3; min-height: 240px; }
  .reg-controls { grid-template-columns: 1fr 1fr; }
}

/* Home: why */
.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px) clamp(40px, 6vw, 88px);
  align-items: start;
}
.statement { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.9rem); line-height: 1.02; }
.why-grid .section-head { max-width: none; }
.principles {
  grid-column: 1 / -1;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.principle {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.principle .sigil { width: 44px; height: 44px; color: var(--text-faint); }
.principle p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.5; }
@media (max-width: 900px) {
  .why-grid, .principles { grid-template-columns: minmax(0, 1fr); }
}

/* Invitation to speakers and press */
.invite {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: end;
  gap: 32px clamp(32px, 5vw, 72px);
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) * 1.4);
  background:
    radial-gradient(120% 140% at 0% 0%, var(--glow-ember), transparent 55%),
    radial-gradient(100% 120% at 100% 100%, var(--glow-aurora), transparent 60%),
    var(--bg-raised);
}
.invite-text { display: flex; flex-direction: column; gap: 16px; }
.invite-text p:not(.eyebrow) { color: var(--text-muted); max-width: 34em; }
.contacts { list-style: none; padding: 0; display: flex; flex-direction: column; }
.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}
.contact:last-child { border-bottom: 1px solid var(--line); }
.contact-who { display: flex; flex-direction: column; gap: 2px; }
.contact-name { font-weight: 600; }
.contact-email { display: flex; align-items: center; gap: 12px; min-width: 0; }
.contact-email a { font-size: 0.875rem; overflow-wrap: anywhere; }
@media (max-width: 860px) { .invite { grid-template-columns: minmax(0, 1fr); } }

/* Officers */
.officers { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.officer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.officer-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.officer-name { font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.officer-email { color: var(--text-muted); font-size: 0.8125rem; overflow-wrap: anywhere; }
@media (max-width: 900px) { .officers { grid-template-columns: minmax(0, 1fr); } }

.monogram {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, var(--glow-ember), transparent 70%), var(--bg-sunk);
  color: var(--ember);
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: 0.02em;
}
.monogram::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px dashed var(--line);
  border-radius: 50%;
}
.monogram.sm { width: 48px; height: 48px; font-size: 1.05rem; }
.monogram.sm::after { inset: -5px; }
.monogram.is-tba { color: var(--text-faint); font-size: 1.6rem; }
.avatar { width: 64px; height: 64px; flex: none; border-radius: 50%; object-fit: cover; }
.avatar.sm { width: 48px; height: 48px; }

/* ---------- Inner page header ---------- */

.page-head { border-bottom: 1px solid var(--line); }
.page-head-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding-block: clamp(52px, 8vw, 104px) clamp(44px, 6vw, 80px);
}
.page-head-text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.page-sigil { width: clamp(150px, 20vw, 250px); color: var(--line-strong); }
.page-sigil .sigil { width: 100%; height: auto; }
@media (max-width: 760px) {
  .page-head-inner { grid-template-columns: minmax(0, 1fr); }
  .page-sigil { display: none; }
}

.sigil { display: block; }
.sigil-dots circle, .sigil-core { fill: currentColor; }
.sigil-planet { fill: var(--ember); }
.sigil-moon { fill: var(--bg); stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }

.section-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.section-bar p:not(.label) { color: var(--text-muted); font-size: 1rem; }

/* ---------- Empty and error states ---------- */

.empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.empty p { max-width: 44em; }
.empty.is-error { border-color: var(--ember); }
.empty.is-error .label { color: var(--ember); }

/* ---------- Speakers ---------- */

.talks { display: flex; flex-direction: column; gap: 20px; }
.talk {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 260px;
  gap: 28px 36px;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  scroll-margin-top: 110px;
}
.talk.is-next {
  border-color: var(--line-strong);
  background:
    radial-gradient(90% 120% at 100% 0%, var(--glow-aurora), transparent 60%),
    radial-gradient(70% 100% at 0% 100%, var(--glow-ember), transparent 65%),
    var(--bg-raised);
  box-shadow: var(--shadow);
}
.datebox {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: start;
  gap: 4px;
  padding: 16px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg-sunk);
  text-align: center;
}
.datebox-dow, .datebox-mon {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.datebox-dow { color: var(--ember); }
.datebox-day { font-family: var(--font-display); font-size: 3.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.talk-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.talk-who { display: flex; align-items: center; gap: 18px; }
.talk-name { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.2rem); line-height: 1.05; }
.talk-aff { color: var(--text-faint); font-family: var(--font-mono); font-size: 0.8125rem; margin-top: 6px; }
.talk-title { font-size: 1.3rem; font-style: italic; line-height: 1.35; }
.talk-bio { color: var(--text-muted); }
.talk-meta { list-style: none; padding: 16px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; border-top: 1px solid var(--line); font-size: 1rem; }
.talk-meta li { display: flex; align-items: baseline; gap: 10px; }
.talk-cta { display: flex; flex-direction: column; align-items: stretch; gap: 12px; align-self: start; }
@media (max-width: 1000px) {
  .talk { grid-template-columns: 96px minmax(0, 1fr); }
  .talk-cta { grid-column: 2; }
}
@media (max-width: 640px) {
  .talk { grid-template-columns: minmax(0, 1fr); }
  .talk-cta { grid-column: auto; }
  .datebox { flex-direction: row; align-self: stretch; justify-content: flex-start; gap: 12px; padding: 10px 14px; }
  .datebox-day { font-size: 2rem; }
}

.theme-groups { display: flex; flex-direction: column; gap: 40px; }
.theme-group { display: flex; flex-direction: column; gap: 22px; }
.theme-title {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.theme-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.theme-count {
  order: 2;
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding-inline: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
}
.theme-title::after { order: 3; }
.people { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 36px; }
.person { display: flex; align-items: flex-start; gap: 18px; scroll-margin-top: 110px; }
.person-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.person-name { font-family: var(--font-body); font-weight: 600; font-size: 1.2rem; line-height: 1.25; }
.person-bio { color: var(--text-muted); font-size: 1rem; line-height: 1.55; }
.person-bio > * + * { margin-top: 0.6em; }
@media (max-width: 1000px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .people { grid-template-columns: minmax(0, 1fr); } }

.past-list { list-style: none; padding: 0; }
.past {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 28px;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 110px;
}
.past-date { color: var(--text-faint); font-size: 0.8125rem; }
.past-name { font-weight: 600; font-size: 1.2rem; }
.past-talk { color: var(--text-muted); font-style: italic; }
@media (max-width: 700px) {
  .past { grid-template-columns: minmax(0, 1fr); }
  .past-link { justify-self: start; }
}

/* ---------- Meeting log ---------- */

.log-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.search {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
}
.search input {
  width: 100%;
  min-height: 46px;
  padding: 10px 16px 10px 42px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus { outline: none; border-color: var(--ember); }
.search input:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.search svg { position: absolute; left: 16px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }

.log { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 64px); }
.term { display: flex; flex-direction: column; gap: 8px; }
.term-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); }
.entries { list-style: none; padding: 0; }
.entry {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 12px 40px;
  padding-block: 32px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 110px;
}
.entry-rail { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 100px; align-self: start; }
.entry-no { color: var(--ember); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.entry-date { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.875rem; }
.entry-body { display: flex; flex-direction: column; gap: 12px; }
.entry-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); line-height: 1.12; }
.entry-title a { text-decoration: none; }
.entry-title a:hover { text-decoration: underline; }
.entry-body .prose { color: var(--text); }
@media (max-width: 760px) {
  .entry { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .entry-rail { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 16px; }
}

/* ---------- Reflections ---------- */

.topics { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.topic {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  text-decoration: none;
  transition: border-color 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}
.topic:hover { border-color: var(--ember); color: var(--text); background: var(--bg-hover); }
.topic-sigil { width: 64px; height: 64px; margin-bottom: 8px; color: var(--text-faint); transition: color 0.25s ease, transform 0.6s ease; }
.topic:hover .topic-sigil { color: var(--text-muted); transform: rotate(30deg); }
.topic-name { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.05; }
.topic-desc { color: var(--text-muted); font-size: 1.02rem; line-height: 1.5; }
.topic-meta { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 1000px) { .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .topics { grid-template-columns: minmax(0, 1fr); } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}
.chip:hover { border-color: var(--ember); color: var(--text); }
.chip[aria-current="page"] { border-color: var(--ember); background: var(--ember); color: var(--on-ember); }
.chip-count { opacity: 0.7; font-variant-numeric: tabular-nums; }

.topic-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.toc {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  scroll-margin-top: 110px;
}
.toc ol { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.toc a { display: block; font-weight: 600; line-height: 1.3; text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc-meta { display: block; margin-top: 3px; color: var(--text-faint); font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.04em; }
.pieces { display: flex; flex-direction: column; }
.piece { display: flex; flex-direction: column; gap: 28px; padding-block: 8px 56px; scroll-margin-top: 100px; }
.piece + .piece { padding-top: 56px; border-top: 1px solid var(--line); }
.piece-head { display: flex; flex-direction: column; gap: 12px; }
.piece-title { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1.05; }
.piece-byline { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.02em; }
.prose-reading { font-size: 1.1875rem; line-height: 1.72; }
.prose-reading > p:first-child::first-letter {
  float: left;
  margin: 0.06em 0.1em 0 0;
  color: var(--ember);
  font-family: var(--font-display);
  font-size: 3.5em;
  line-height: 0.85;
}
.piece-foot { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.75rem; }
.piece-foot a { color: var(--text-faint); text-decoration: none; }
.piece-foot a:hover { color: var(--ember); }
@media (max-width: 900px) {
  .topic-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
}

/* ---------- Footer ---------- */

.site-footer { padding-block: 56px 28px; background: var(--bg-sunk); }
.site-footer:empty { min-height: 120px; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 32px 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { width: 64px; height: 64px; border-radius: 50%; }
.footer-name { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.footer-tag { color: var(--text-muted); font-size: 1rem; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer-col .label { margin-bottom: 4px; }
.footer-col a { color: var(--text-muted); text-decoration: none; font-size: 1rem; overflow-wrap: anywhere; }
.footer-col a.mono { font-size: 0.8125rem; }
.footer-col a:hover { color: var(--ember); }
.footer-fine {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 24px;
  color: var(--text-faint);
  font-size: 0.875rem;
  line-height: 1.5;
}
.footer-fine p:first-child { max-width: 52em; }
.footer-fine .mono { font-size: 0.75rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Home: schedule, lineage, profiles, follow ---------- */

.section-head-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 32px;
  max-width: none;
}
.section-head-row > div { display: flex; flex-direction: column; gap: 16px; }

.schedule { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.sched {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px 28px;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}
.sched-date { display: flex; align-items: center; gap: 10px; }
.sched-day { font-family: var(--font-display); font-size: 2.3rem; line-height: 1; font-variant-numeric: tabular-nums; min-width: 1.3em; }
.sched-mon { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.12em; line-height: 1.35; text-transform: uppercase; }
.sched-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sched-name { font-weight: 600; font-size: 1.25rem; line-height: 1.25; text-decoration: none; }
.sched-name:hover { text-decoration: underline; }
.sched-bio { color: var(--text-muted); font-size: 1rem; line-height: 1.45; }
.sched-time { color: var(--text-faint); font-size: 0.8125rem; white-space: nowrap; }
@media (max-width: 760px) {
  .sched { grid-template-columns: 76px minmax(0, 1fr); align-items: start; }
  .sched-time { grid-column: 2; white-space: normal; }
  .sched-cta { grid-column: 2; }
}

.lineage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 28px;
  padding: 22px 26px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: radial-gradient(80% 140% at 0% 50%, var(--glow-ember), transparent 70%), var(--bg-raised);
  text-decoration: none;
  transition: border-color 0.25s ease;
}
.lineage:hover { border-color: var(--ember); color: var(--text); }
.lineage-years { color: var(--ember); font-size: 0.875rem; letter-spacing: 0.06em; }
.lineage-text { color: var(--text-muted); font-size: 1.05rem; line-height: 1.5; }
.lineage-go { color: var(--ember); font-size: 0.8125rem; white-space: nowrap; }
@media (max-width: 860px) {
  .lineage { grid-template-columns: minmax(0, 1fr); }
  .lineage-go { white-space: normal; }
}

.officer-text .more { margin-top: 6px; }
.profiles { display: flex; flex-direction: column; gap: 24px; }
.profiles:empty { display: none; }
.profile {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px clamp(32px, 5vw, 72px);
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) * 1.4);
  background:
    radial-gradient(90% 90% at 0% 0%, var(--glow-ember), transparent 60%),
    var(--bg-raised);
  scroll-margin-top: 100px;
}
.profile-side { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.profile-photo { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); }
.monogram.lg { width: 120px; height: 120px; font-size: 2.6rem; }
.monogram.lg::after { inset: -9px; }
.profile-id { display: flex; flex-direction: column; gap: 10px; }
.profile-name { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; }
.profile-titles { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.profile-titles li { color: var(--text-muted); font-size: 0.98rem; line-height: 1.4; }
.profile-titles li:first-child { color: var(--ember); font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.04em; }
.profile-main { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-width: 0; }
.profile-heading { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.08; }
.profile-bio { font-size: 1.12rem; line-height: 1.7; }
@media (max-width: 860px) {
  .profile { grid-template-columns: minmax(0, 1fr); }
  .profile-side { flex-direction: row; align-items: center; }
  .monogram.lg { width: 88px; height: 88px; font-size: 1.9rem; }
  .profile-photo { width: 96px; height: 96px; }
}

.follow { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.follow-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  text-decoration: none;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.follow-tile:hover { border-color: var(--ember); background: var(--bg-hover); color: var(--text); }
.follow-kind { color: var(--ember); }
.follow-title { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.12; }
.follow-handle { margin-top: auto; color: var(--text-muted); font-size: 0.8125rem; }
@media (max-width: 860px) { .follow { grid-template-columns: minmax(0, 1fr); } }

.youtube-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-raised);
  text-decoration: none;
  transition: border-color 0.25s ease;
}
.youtube-card:hover { border-color: var(--ember); color: var(--text); }
.youtube-card strong { display: block; font-weight: 600; font-size: 1.15rem; }
.youtube-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--ember); color: var(--on-ember); }
.youtube-icon svg { width: 26px; height: 26px; }
.youtube-go { color: var(--ember); font-size: 1.2rem; }
[data-past] { display: flex; flex-direction: column; gap: 20px; }

/* ---------- Forms ---------- */

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.field-hint { color: var(--text-faint); letter-spacing: 0.04em; text-transform: none; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-sunk);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.4;
  transition: border-color 0.2s ease;
}
.field textarea { min-height: 320px; resize: vertical; line-height: 1.65; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--glow-ember); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; align-items: flex-start; gap: 12px; color: var(--text-muted); font-size: 1rem; line-height: 1.5; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ember); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line-strong); font-size: 1rem; line-height: 1.5; }
.form-status.is-error { border-color: var(--ember); color: var(--text); background: var(--glow-ember); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: progress; }

/* Register dialog */
.modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) * 1.4);
  background: var(--bg-raised);
  color: var(--text);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.7);
}
.modal::backdrop { background: rgba(6, 5, 10, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-card { position: relative; padding: clamp(24px, 5vw, 36px); }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.modal-close:hover { border-color: var(--ember); color: var(--ember); }
.modal-close svg { width: 18px; height: 18px; }
.modal-head { display: flex; flex-direction: column; gap: 10px; padding-right: 40px; }
.modal-head h2, .modal-done h2 { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.3rem); }
.modal-sub { color: var(--text-muted); font-size: 1.05rem; line-height: 1.5; }
.modal-done { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-right: 40px; }

/* Submit a reflection */
.submit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.submit-done { display: flex; flex-direction: column; gap: 16px; padding: 32px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-raised); scroll-margin-top: 100px; }
.submit-notes {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.submit-notes .label + * { margin-bottom: 10px; }
.steps, .tips { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; color: var(--text-muted); font-size: 1rem; line-height: 1.45; }
.steps strong { color: var(--text); font-weight: 600; }
.steps li::marker, .tips li::marker { color: var(--ember); }
.tips code { font-family: var(--font-mono); font-size: 0.85em; color: var(--text); }
@media (max-width: 900px) {
  .submit-layout { grid-template-columns: minmax(0, 1fr); }
  .submit-notes { position: static; order: -1; }
}

/* PDF upload box (Submit a reflection) */
.field textarea.short { min-height: 96px; }
.upload {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-sunk);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.upload:hover, .upload.is-over, .upload:focus-within { border-color: var(--ember); background: var(--bg-hover); }
.upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--glow-ember); color: var(--ember); }
.upload-icon svg { width: 24px; height: 24px; }
.upload-text { color: var(--text-muted); }
.upload-text strong { color: var(--text); font-weight: 600; }
.upload-file { color: var(--text-faint); font-size: 0.8125rem; overflow-wrap: anywhere; }

/* Reflections published as PDFs */
.pdf-frame { width: 100%; height: min(85vh, 1000px); border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.pdf-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.piece-summary > p:first-child::first-letter { float: none; margin: 0; color: inherit; font: inherit; }

/* Reflections index: all pieces with category filters */
button.chip { background: transparent; cursor: pointer; font-weight: 400; }
.chip[aria-pressed="true"] { border-color: var(--ember); background: var(--ember); color: var(--on-ember); }
.ref-about { color: var(--text-muted); max-width: 46em; }
.ref-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.ref-list > li { border-bottom: 1px solid var(--line); }
.ref-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  grid-template-areas: "cat title" "cat meta" "cat desc";
  gap: 4px 32px;
  padding: 22px 8px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.ref-item:hover { background: var(--bg-raised); color: var(--text); }
.ref-cat { grid-area: cat; color: var(--ember); padding-top: 0.5em; }
.ref-title { grid-area: title; font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.12; }
.ref-item:hover .ref-title { color: var(--ember); }
.ref-meta { grid-area: meta; color: var(--text-faint); font-size: 0.8125rem; }
.ref-desc { grid-area: desc; color: var(--text-muted); margin-top: 6px; max-width: 46em; }
@media (max-width: 700px) {
  .ref-item { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cat" "title" "meta" "desc"; }
  .ref-cat { padding-top: 0; }
}
