:root {
  --surface-0: 251 248 241;
  --surface-1: 245 241 233;
  --surface-2: 236 231 221;
  --surface-3: 223 215 203;
  --text-primary: 42 33 24;
  --text-secondary: 94 76 57;
  --text-muted: 138 120 98;
  --accent: 168 92 42;
  --accent-hover: 144 79 36;
  --danger: 186 56 42;
  --warning: 168 116 32;

  --font-sans: "Avenir Next", "Gill Sans", "Futura", "Trebuchet MS", ui-sans-serif, system-ui, sans-serif;
  --font-serif: ui-serif, "New York", "Iowan Old Style", "Baskerville", Georgia, serif;
  --font-mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: rgb(var(--text-primary));
  background:
    radial-gradient(860px 280px at 104% -10%, rgba(168, 92, 42, 0.08), transparent 70%),
    radial-gradient(720px 320px at -10% 12%, rgba(138, 120, 98, 0.06), transparent 68%),
    linear-gradient(180deg, rgb(var(--surface-0)), rgb(var(--surface-1))),
    repeating-linear-gradient(35deg, rgba(94, 76, 57, 0.009) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(-35deg, rgba(94, 76, 57, 0.006) 0 1px, transparent 1px 11px);
  padding: 30px 14px 68px;
}

.page {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 46px);
  animation: page-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::selection {
  background: rgb(var(--accent) / 0.18);
}

.site-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(138, 120, 98, 0.25);
}

.brand {
  margin: 0;
  font-family: var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgb(var(--text-secondary));
}

.brand a {
  color: inherit;
  text-decoration: none;
}

.nav {
  margin: 12px 0 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(138, 120, 98, 0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav a {
  color: rgb(var(--text-muted));
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.nav a:hover {
  color: rgb(var(--text-secondary));
  border-bottom-color: rgba(168, 92, 42, 0.5);
}

.nav a.current {
  color: rgb(var(--text-primary));
  border-bottom-color: rgba(168, 92, 42, 0.65);
}

.kicker {
  margin-top: 22px;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgb(var(--text-secondary));
}

h1 {
  margin: 10px 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 7vw, 60px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  max-width: 18ch;
  font-weight: 650;
}

.lead {
  margin: 0;
  color: rgb(var(--text-secondary));
  font-size: clamp(20px, 3.2vw, 27px);
  line-height: 1.45;
  max-width: 34ch;
}

.hero {
  margin-top: 18px;
  display: grid;
  gap: 18px;
  align-items: start;
}

.hero-copy {
  display: grid;
  gap: 10px;
}

.hero-copy p {
  margin-top: 0;
}

.hero-support {
  max-width: 43ch;
  font-size: 17px;
  line-height: 1.75;
  color: rgb(var(--text-secondary));
}

.hero-proof {
  min-width: 0;
}

.hero-proof .window {
  margin-top: 0;
}

.section {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(138, 120, 98, 0.16);
}

.section-intro {
  display: grid;
  gap: 6px;
  max-width: 42rem;
}

.section-intro p {
  margin-top: 0;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgb(var(--text-secondary));
}

h2 {
  margin: 38px 0 10px;
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: -0.01em;
  text-transform: none;
  color: rgb(var(--text-primary));
  font-weight: 650;
}

h2[id] {
  scroll-margin-top: 18px;
}

p,
li,
dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: rgb(var(--text-secondary));
}

p {
  margin-top: 10px;
}

h2 + p,
h2 + .stack,
h2 + ul,
h2 + ol,
h2 + .sample,
h2 + .callout,
h2 + .link-list,
h2 + .facts {
  margin-top: 0;
}

ul,
ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.stack {
  display: grid;
  gap: 10px;
  max-width: 70ch;
}

.stack p {
  margin-top: 0;
}

.stack .actions {
  margin-top: 0;
}

.sample {
  margin-top: 14px;
  max-width: 78ch;
  border: 1px solid rgba(138, 120, 98, 0.28);
  border-radius: 12px;
  background: rgba(245, 241, 233, 0.8);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  box-shadow: 0 1px 0 rgba(42, 33, 24, 0.04);
}

.sequence {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.sequence-card,
.panel,
.release-card {
  border: 1px solid rgba(138, 120, 98, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgb(var(--surface-0) / 0.76), rgb(var(--surface-1) / 0.56));
  box-shadow: 0 1px 0 rgba(42, 33, 24, 0.04);
}

.sequence-card {
  padding: 16px 16px 15px;
}

.sequence-step {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(var(--text-muted));
}

.sequence-card h3,
.panel-title,
.release-name {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: rgb(var(--text-primary));
  font-weight: 650;
}

.sequence-card p,
.panel p,
.release-card p {
  margin-top: 8px;
}

.panel-grid,
.release-grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  align-items: stretch;
}

.panel {
  padding: 16px;
  min-height: 100%;
}

.panel-top,
.release-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.panel-tag,
.release-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(138, 120, 98, 0.82);
}

.release-card {
  padding: 16px;
}

.release-note {
  max-width: 36ch;
}

.footnote {
  margin-top: 12px;
  max-width: 42rem;
  font-size: 14px;
  color: rgb(var(--text-muted));
}

.callout {
  margin-top: 14px;
  max-width: 76ch;
  border: 1px solid rgba(138, 120, 98, 0.22);
  border-left: 3px solid rgb(var(--accent));
  padding: 10px 12px;
  background: rgb(var(--surface-0) / 0.6);
  border-radius: 10px;
}

.link-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.link-list li {
  padding-left: 0;
}

.link-list a {
  text-decoration: none;
  color: rgb(var(--text-secondary));
}

.link-list a:hover {
  color: rgb(var(--accent-hover));
}

.link-list a::before {
  content: "-> ";
  color: rgba(138, 120, 98, 0.65);
  font-family: var(--font-mono);
  font-size: 12px;
}

.meta a {
  color: rgb(var(--text-muted));
}

.meta a:hover {
  color: rgb(var(--accent-hover));
}

.actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toc {
  margin-top: 14px;
  max-width: 76ch;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toc a {
  text-decoration: none;
  border: 1px solid rgba(138, 120, 98, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.45);
  color: rgb(var(--text-secondary));
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.toc a:hover {
  border-color: rgba(168, 92, 42, 0.4);
  background: rgba(168, 92, 42, 0.06);
  color: rgb(var(--text-primary));
}

.toc a:focus-visible {
  border-radius: 999px;
}

.changelog-switch {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.changelog-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tabs {
  width: fit-content;
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(138, 120, 98, 0.24);
  background: rgb(var(--surface-0) / 0.6);
  box-shadow: 0 1px 0 rgba(42, 33, 24, 0.04);
  overflow: hidden;
}

.tab {
  cursor: pointer;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(var(--text-muted));
  user-select: none;
}

#changelog-app:checked ~ .tabs label[for="changelog-app"],
#changelog-site:checked ~ .tabs label[for="changelog-site"] {
  color: rgb(var(--text-primary));
  background: rgb(var(--surface-1) / 0.85);
}

#changelog-app:checked ~ .changelog-views .view-app,
#changelog-site:checked ~ .changelog-views .view-site {
  display: grid;
}

.changelog-view {
  display: none;
  gap: 20px;
  grid-template-columns: 160px minmax(0, 1fr);
}

.timeline-nav {
  align-self: start;
  position: sticky;
  top: 18px;
  display: grid;
  gap: 10px;
}

.timeline-nav-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(var(--text-secondary));
}

.timeline-link {
  text-decoration: none;
  border: 1px solid rgba(138, 120, 98, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.45);
  color: rgb(var(--text-secondary));
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.timeline-link:hover {
  border-color: rgba(168, 92, 42, 0.4);
  background: rgba(168, 92, 42, 0.06);
  color: rgb(var(--text-primary));
}

.timeline {
  position: relative;
  padding-left: 20px;
  display: grid;
  gap: 14px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 0;
  bottom: 0;
  width: 1px;
  border-radius: 1px;
  background: rgba(138, 120, 98, 0.22);
}

.entry {
  scroll-margin-top: 18px;
  position: relative;
  border: 1px solid rgba(138, 120, 98, 0.22);
  border-radius: 16px;
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgb(var(--surface-0) / 0.75), rgb(var(--surface-1) / 0.55));
  box-shadow: 0 1px 0 rgba(42, 33, 24, 0.04);
}

.entry::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 20px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgb(var(--surface-0));
  border: 1px solid rgba(138, 120, 98, 0.35);
  box-shadow: 0 1px 0 rgba(42, 33, 24, 0.05);
}

.entry:target {
  border-color: rgba(168, 92, 42, 0.45);
  box-shadow: 0 1px 0 rgba(42, 33, 24, 0.05), 0 16px 30px rgba(42, 33, 24, 0.05);
}

.entry:target::before {
  border-color: rgba(168, 92, 42, 0.55);
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.entry-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  font-weight: 650;
  color: rgb(var(--text-primary));
}

.entry-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(138, 120, 98, 0.8);
}

.window {
  margin-top: 14px;
  max-width: 78ch;
  border-radius: 18px;
  border: 1px solid rgba(138, 120, 98, 0.24);
  overflow: hidden;
  background: rgb(var(--surface-0) / 0.6);
  box-shadow: 0 1px 0 rgba(42, 33, 24, 0.05), 0 26px 46px rgba(42, 33, 24, 0.06);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(138, 120, 98, 0.22);
  background:
    linear-gradient(180deg, rgb(var(--surface-0) / 0.85), rgb(var(--surface-1) / 0.65));
}

.window-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(42, 33, 24, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.dot.red {
  background: rgb(232 106 96 / 0.95);
}

.dot.yellow {
  background: rgb(233 193 78 / 0.95);
}

.dot.green {
  background: rgb(94 190 111 / 0.95);
}

.window-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(94, 76, 57, 0.82);
}

.window-spacer {
  margin-left: auto;
}

.window-body {
  padding: 14px 14px 16px;
  display: grid;
  gap: 12px;
  background: rgb(var(--surface-1) / 0.35);
}

.window-note {
  border: 1px solid rgba(138, 120, 98, 0.18);
  border-radius: 14px;
  background: rgb(var(--surface-0) / 0.72);
  padding: 12px 12px;
  font-size: 14px;
  line-height: 1.7;
  color: rgb(var(--text-secondary));
  box-shadow: 0 1px 0 rgba(42, 33, 24, 0.03);
}

.window-section {
  border: 1px solid rgba(138, 120, 98, 0.18);
  border-radius: 14px;
  background: rgb(var(--surface-0) / 0.65);
  padding: 12px 12px;
  box-shadow: 0 1px 0 rgba(42, 33, 24, 0.03);
}

.window-section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(var(--text-muted));
  margin-bottom: 8px;
}

.window-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 10px;
  color: rgb(var(--text-secondary));
}

.window-row + .window-row {
  border-top: 1px solid rgba(138, 120, 98, 0.12);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.window-row .box {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid rgba(138, 120, 98, 0.35);
  background: rgb(var(--surface-2) / 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  flex: none;
}

.window-row .label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-row .dur {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(138, 120, 98, 0.85);
  flex: none;
}

.window-row.subtle {
  color: rgb(var(--text-muted));
}

.pillars {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.pillar {
  display: block;
  padding: 18px 18px;
  border-radius: 16px;
  border: 1px solid rgba(138, 120, 98, 0.22);
  background:
    linear-gradient(180deg, rgb(var(--surface-0) / 0.72), rgb(var(--surface-1) / 0.52));
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(42, 33, 24, 0.04);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pillar:hover {
  border-color: rgba(168, 92, 42, 0.45);
  background: rgba(168, 92, 42, 0.06);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(42, 33, 24, 0.05), 0 16px 30px rgba(42, 33, 24, 0.06);
}

.pillar:active {
  transform: translateY(0);
}

.pillar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.pillar-kicker {
  font-family: var(--font-sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgb(var(--text-muted));
}

.pillar-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(138, 120, 98, 0.8);
}

.pillar-title {
  margin: 8px 0 0;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 22ch;
}

.pillar p {
  margin-top: 8px;
  color: rgb(var(--text-secondary));
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.92fr);
    gap: 28px;
  }

  .pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .sequence {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel-grid,
  .release-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 920px) {
  .panel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid rgba(138, 120, 98, 0.3);
  background: rgba(255, 255, 255, 0.55);
  color: rgb(var(--text-secondary));
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 1px 0 rgba(42, 33, 24, 0.05);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  border-color: rgba(168, 92, 42, 0.45);
  background: rgba(168, 92, 42, 0.08);
  color: rgb(var(--text-primary));
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(42, 33, 24, 0.06), 0 12px 22px rgba(42, 33, 24, 0.06);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  border-color: rgba(168, 92, 42, 0.55);
  background: rgba(168, 92, 42, 0.12);
  color: rgb(var(--text-primary));
}

.faq {
  margin-top: 8px;
  display: grid;
  gap: 10px;
  max-width: 76ch;
}

.faq dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(var(--text-muted));
}

.faq dd {
  margin: 0;
}

.facts {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px 18px;
  max-width: 76ch;
}

.facts dt {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(var(--text-muted));
}

.facts dd {
  margin: 0;
}

.meta {
  margin-top: 30px;
  padding-top: 14px;
  border-top: 1px solid rgba(138, 120, 98, 0.22);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgb(var(--text-muted));
}

a {
  color: rgb(var(--accent));
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

a:focus-visible {
  outline: 2px solid rgba(168, 92, 42, 0.7);
  outline-offset: 2px;
}

.nav a:focus-visible {
  border-radius: 6px;
}

.btn:focus-visible {
  border-radius: 999px;
}

.pillar:focus-visible {
  border-radius: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .page {
    animation: none;
  }

  .pillar,
  .btn {
    transition: none;
  }

  .pillar:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}

@media (max-width: 820px) {
  .facts {
    grid-template-columns: 1fr;
  }

  .changelog-view {
    grid-template-columns: 1fr;
  }

  .timeline-nav {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .panel-top,
  .release-top,
  .entry-head,
  .pillar-top {
    flex-direction: column;
    align-items: flex-start;
  }
}
