:root {
  --ink: #1a1714;
  --ink-2: #3a342e;
  --muted: #6b635a;
  --muted-2: #8a8176;
  --line: #e4ddd2;
  --line-strong: #d2c9bb;
  --surface: #ebe5d9;
  --bg: #f3efe6;
  --card: #faf7f1;
  --accent: #b8431f;
  --accent-hover: #9a3618;
  --accent-soft: #f3e2d8;
  --accent-deep: #7a2c14;
  --good: #2f6b4f;
  --mark: #c9a227;
  --nav-bg: rgba(243, 239, 230, 0.88);
  --footer-bg: #1a1714;
  --footer-fg: #f3efe6;
  --palette-bg: #faf7f1;
  --palette-shadow: 0 24px 80px rgba(26, 23, 20, 0.28);
  --grain-opacity: 0.035;
  --max: 1120px;
  --wrap-padding: 32px;
  --radius: 4px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(26,23,20,0.04), 0 12px 40px rgba(26,23,20,0.06);
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --ink: #f3efe6;
  --ink-2: #d8d0c4;
  --muted: #a89f92;
  --muted-2: #8a8176;
  --line: #3a342e;
  --line-strong: #4a433b;
  --surface: #2a2520;
  --bg: #161310;
  --card: #1e1a16;
  --accent: #e0653f;
  --accent-hover: #f07a54;
  --accent-soft: #3a241c;
  --accent-deep: #f3a48a;
  --good: #6bb890;
  --mark: #e0b84a;
  --nav-bg: rgba(22, 19, 16, 0.88);
  --footer-bg: #0e0c0a;
  --footer-fg: #f3efe6;
  --palette-bg: #1e1a16;
  --palette-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --grain-opacity: 0.05;
  --shadow: 0 1px 2px rgba(0,0,0,0.2), 0 12px 40px rgba(0,0,0,0.35);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .scroll-progress { display: none !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

/* paper grain */
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

a:focus-visible,
.btn:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--wrap-padding);
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  z-index: 10001;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

/* scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--mark));
  z-index: 10000;
  pointer-events: none;
  transform-origin: left;
}

/* reveals */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* --- Nav --- */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  border-bottom: 1px solid var(--line);
}
nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 12px;
}
nav .brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
nav .brand span { color: var(--accent); }
nav .nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
nav .links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0;
}
nav .links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 560;
  margin-left: 22px;
  transition: color 0.15s ease;
  position: relative;
  padding-bottom: 2px;
}
nav .links a:hover { color: var(--ink); }
nav .links a.is-active {
  color: var(--ink);
}
nav .links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.nav-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.nav-icon-btn svg { width: 16px; height: 16px; }
.kbd-hint {
  display: none;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.kbd-hint kbd {
  font-family: inherit;
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
}
@media (min-width: 900px) {
  .kbd-hint { display: inline-flex; }
}

/* --- Hero --- */
header.hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: end;
}
.hero-mark {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-mark::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.2vw, 3.55rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--ink);
  max-width: 14ch;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}
.hero .lede {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 34rem;
  margin-top: 24px;
}
.hero .place {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted-2);
  font-weight: 500;
}
.hero .cta {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  color: inherit;
}
.btn.primary {
  background: var(--ink);
  color: var(--bg);
}
.btn.primary:hover { background: var(--accent); color: #fff; }
.btn.ghost {
  border-color: var(--line-strong);
  color: var(--ink-2);
}
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn.primary:hover { transform: translateY(-1px); }
  .magnetic {
    transition: transform 0.2s ease;
  }
}

.hero-aside {
  position: relative;
  padding: 28px 28px 32px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-lg);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
[data-theme="dark"] .hero-aside {
  background: #0e0c0a;
  border: 1px solid var(--line);
}
.hero-aside .aside-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mark);
  margin-bottom: 16px;
}
.hero-aside blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #f7f2ea;
}
.hero-aside .aside-foot {
  margin-top: 28px;
  font-size: 13px;
  color: rgba(243, 239, 230, 0.55);
  line-height: 1.5;
}

.proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
}
.proof-item {
  padding: 24px 22px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.proof-item:last-child { border-right: none; }
.proof .num {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.15;
}
.proof .cap {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.45;
}

/* --- Sections --- */
section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  margin-bottom: 40px;
  align-items: start;
}
.section-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 700;
  padding-top: 10px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.6vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 12px;
}
.section-lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 42rem;
  line-height: 1.65;
}

/* --- Work rail (horizontal) --- */
.work-rail-wrap {
  position: relative;
  margin-left: calc(-1 * var(--wrap-padding));
  margin-right: calc(-1 * var(--wrap-padding));
  padding-left: var(--wrap-padding);
}
.work-rail-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding-right: var(--wrap-padding);
}
.rail-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.rail-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.rail-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.rail-btn svg { width: 18px; height: 18px; }
.work-rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 20px;
  padding-right: var(--wrap-padding);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.work-rail:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.work-case {
  flex: 0 0 min(420px, 85vw);
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .work-case:hover {
    box-shadow: var(--shadow);
    border-color: var(--line-strong);
  }
}
.work-case .case-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.work-case .index {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.work-case .sticky-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.work-case .body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.work-case .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.work-case .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 11px;
}
.work-case h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.25;
  color: var(--ink);
}
.work-case > .body > p {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 8px;
}
.work-case ul {
  color: var(--muted);
  font-size: 14px;
  padding-left: 1.15em;
  margin: 10px 0 4px;
  flex: 1;
}
.work-case li {
  margin-bottom: 6px;
  padding-left: 0.15em;
}
.work-case li::marker { color: var(--accent); }
.work-case .outcome {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-2);
  padding-top: 14px;
  border-top: 1px solid var(--line);
  line-height: 1.55;
}
.work-case .outcome strong {
  color: var(--good);
  font-weight: 650;
}

/* --- Paved Road toy --- */
.road-toy {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
}
.road-toy-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.road-toy-head h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.road-toy-head p {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 36rem;
}
.road-toy-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.road-body {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-height: 320px;
}
.road-steps {
  list-style: none;
  border-right: 1px solid var(--line);
  padding: 12px 0;
}
.road-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 22px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
  border-left: 3px solid transparent;
}
.road-step:hover { background: var(--surface); }
.road-step[aria-current="step"] {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}
.road-step .step-num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 1.5rem;
  padding-top: 2px;
}
.road-step .step-label {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  display: block;
}
.road-step .step-hint {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
  display: block;
}
.road-panel {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
}
.road-panel .panel-meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.road-panel h4 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.25;
}
.road-panel p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}
.road-panel .panel-foot {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.road-progress-dots {
  display: flex;
  gap: 6px;
}
.road-progress-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background 0.2s, transform 0.2s;
}
.road-progress-dots span.is-on {
  background: var(--accent);
  transform: scale(1.15);
}
.road-viz {
  margin-top: 18px;
  height: 56px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.road-viz-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 4px;
}
.road-viz-seg {
  flex: 1;
  height: 10px;
  border-radius: 4px;
  background: var(--line);
  transition: background 0.35s ease, transform 0.35s ease;
}
.road-viz-seg.is-lit {
  background: var(--accent);
}
.road-viz-seg.is-done {
  background: var(--good);
}
.road-viz-node {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--line-strong);
  transform: translate(-50%, -50%);
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  z-index: 1;
}
.road-viz-node.is-lit {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* principles under toy */
.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.principle {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 26px 28px;
  position: relative;
  overflow: hidden;
}
.principle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  opacity: 0.85;
}
.principle .idx {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.principle h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.principle p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* --- Notes --- */
.notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.note {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: 28px 28px 30px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
[data-theme="dark"] .note:not(.alt) {
  background: #0e0c0a;
  border: 1px solid var(--line);
}
.note.alt {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}
.note .note-meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mark);
  margin-bottom: 16px;
}
.note.alt .note-meta { color: var(--accent); }
.note h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 12px;
}
.note p {
  font-size: 14.5px;
  line-height: 1.6;
  opacity: 0.82;
  flex: 1;
}
.note.alt p { color: var(--muted); opacity: 1; }
.note .note-foot {
  margin-top: 20px;
  font-size: 12.5px;
  opacity: 0.5;
  font-weight: 500;
}
.note.alt .note-foot { color: var(--muted-2); opacity: 1; }

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}
.about-copy p {
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: 16px;
  max-width: 38rem;
}
.about-copy p strong {
  color: var(--ink);
  font-weight: 650;
}
.about-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.about-panel h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.about-panel ul {
  list-style: none;
  font-size: 14.5px;
  color: var(--ink-2);
}
.about-panel li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.about-panel li:last-child { border-bottom: none; }
.about-panel .when {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  min-width: 64px;
}

/* --- Footer --- */
footer#connect {
  border-top: 1px solid var(--line);
  padding: 64px 0 56px;
  background: var(--footer-bg);
  color: var(--footer-fg);
}
footer .section-label { color: var(--mark); }
footer .section-title { color: #f7f2ea; }
footer .section-lede { color: rgba(243, 239, 230, 0.62); }
footer .section-head { margin-bottom: 32px; }
footer .connect-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
}
footer .connect-row a {
  color: #f7f2ea;
  text-decoration: none;
  font-weight: 650;
  font-size: 1.05rem;
  border-bottom: 1.5px solid rgba(201, 162, 39, 0.45);
  padding-bottom: 2px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
footer .connect-row a:hover {
  color: var(--mark);
  border-color: var(--mark);
}
footer .fine {
  margin-top: 48px;
  font-size: 12.5px;
  color: rgba(243, 239, 230, 0.4);
  padding-top: 24px;
  border-top: 1px solid rgba(243, 239, 230, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
}
footer .fine a {
  color: rgba(243, 239, 230, 0.45);
  text-decoration: none;
}
footer .fine a:hover {
  color: rgba(243, 239, 230, 0.75);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.console-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: rgba(243, 239, 230, 0.32);
  margin-top: 16px;
  letter-spacing: 0.02em;
}
.console-line .prompt { color: var(--mark); opacity: 0.7; }
.console-line button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.console-line button:hover { color: rgba(243, 239, 230, 0.7); }

/* --- Command palette --- */
.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(26, 23, 20, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.palette-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}
[data-theme="dark"] .palette-backdrop {
  background: rgba(0, 0, 0, 0.65);
}
.palette {
  width: min(560px, 100%);
  background: var(--palette-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--palette-shadow);
  overflow: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: transform 0.18s ease;
}
.palette-backdrop.is-open .palette {
  transform: none;
}
.palette-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.palette-search svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}
.palette-search input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  outline: none;
}
.palette-search input::placeholder { color: var(--muted-2); }
.palette-esc {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
  background: var(--surface);
}
.palette-list {
  list-style: none;
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
}
.palette-group {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 10px 10px 6px;
}
.palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 550;
  cursor: pointer;
}
.palette-item:hover,
.palette-item.is-active {
  background: var(--accent-soft);
  color: var(--accent-deep);
}
[data-theme="dark"] .palette-item:hover,
[data-theme="dark"] .palette-item.is-active {
  color: var(--accent);
}
.palette-item .meta {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.palette-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.palette-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  z-index: 10002;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.palette-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero h1 { max-width: none; }
  .section-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .section-label { padding-top: 0; }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .road-body {
    grid-template-columns: 1fr;
  }
  .road-steps {
    border-right: none;
    border-bottom: 1px solid var(--line);
    display: flex;
    overflow-x: auto;
    padding: 8px;
    gap: 4px;
    scroll-snap-type: x mandatory;
  }
  .road-step {
    flex: 0 0 auto;
    scroll-snap-align: start;
    border-left: none;
    border-bottom: 3px solid transparent;
    border-radius: 8px;
    min-width: 140px;
    padding: 12px 14px;
  }
  .road-step[aria-current="step"] {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
  }
  .road-step .step-hint { display: none; }
}

@media (max-width: 800px) {
  .proof {
    grid-template-columns: repeat(2, 1fr);
  }
  .proof-item:nth-child(2) { border-right: none; }
  .proof-item:nth-child(1),
  .proof-item:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }
  .principles { grid-template-columns: 1fr; }
  .notes { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --wrap-padding: 20px; }
  header.hero { padding: 48px 0 40px; }
  nav .links a { margin-left: 12px; font-size: 12.5px; }
  nav .links a:nth-child(3) { display: none; }
  section { padding: 52px 0; }
  .btn { width: 100%; }
  .hero .cta { flex-direction: column; }
  .kbd-hint { display: none; }
}

@media (max-width: 400px) {
  .proof { grid-template-columns: 1fr; }
  .proof-item {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .proof-item:last-child { border-bottom: none; }
  nav .links a:nth-child(2) { display: none; }
}
