:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --bg-raised: #fffdfb;
  --ink: #1a1614;
  --muted: #5e534c;
  --line: #e3d9cf;
  --accent: #a15c38;
  --on-accent: #fffaf6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --measure: 40rem;
  --wrap: 72rem;
  --pad: clamp(1.25rem, 4vw, 2rem);
}

html[data-theme="ink"] {
  color-scheme: dark;
  --bg: #141210;
  --bg-raised: #1c1916;
  --ink: #f4efe8;
  --muted: #cbbbae;
  --line: #3a332c;
  --accent: #e0a080;
  --on-accent: #141210;
}

html[data-theme="console"] {
  color-scheme: dark;
  --bg: #0b0d0b;
  --bg-raised: #121612;
  --ink: #d9ffe6;
  --muted: #8dffb4;
  --line: #1d3d28;
  --accent: #3dff6e;
  --on-accent: #07140c;
}

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

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

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

.skip {
  position: absolute;
  left: var(--pad);
  top: 0.5rem;
  transform: translateY(-150%);
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.5rem 0.75rem;
  z-index: 2;
}

.skip:focus {
  transform: none;
}

.wrap {
  width: min(var(--wrap), calc(100% - (var(--pad) * 2)));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 1;
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  min-height: 4.25rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  margin-right: auto;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.mark {
  width: 2rem;
  height: 2rem;
  color: var(--accent);
  flex: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

html[data-theme="console"] .brand-name {
  color: var(--accent);
}

.site-nav ul,
.themes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.themes {
  gap: 0.25rem;
}

.themes button {
  font: inherit;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  min-height: 2.75rem;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}

.themes button[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--line);
  background: var(--bg-raised);
}

.themes button:hover {
  color: var(--accent);
}

.hero {
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem);
}

.hero-lockup {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.hero .mark {
  width: clamp(3.5rem, 8vw, 5.25rem);
  height: clamp(3.5rem, 8vw, 5.25rem);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
}

h1 {
  font-size: clamp(2.35rem, 7vw, 5rem);
  max-width: 18ch;
}

.hero h1 {
  max-width: none;
}

h1 .line {
  display: block;
  color: var(--accent);
}

.lede,
.section-intro {
  font-size: 1.2rem;
  max-width: var(--measure);
  margin: 1.25rem 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  text-decoration: none;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
}

.button:hover {
  color: var(--on-accent);
  filter: brightness(1.08);
}

.button-ghost {
  background: transparent;
  color: var(--ink);
}

.button-ghost:hover {
  color: var(--accent);
  filter: none;
}

.beta {
  max-width: var(--measure);
  margin-top: 1.75rem;
  color: var(--muted);
}

.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.benefits article,
.example,
.panel {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  padding: 1.25rem 1.25rem 1.35rem;
}

.benefits h2,
.example h3,
.panel h2,
.panel h3 {
  font-size: 1.55rem;
  margin-bottom: 0.75rem;
}

.benefits p,
.example p,
.panel p,
.prose p {
  margin: 0.75rem 0 0;
}

.benefits p:first-of-type,
.panel p:first-of-type {
  margin-top: 0;
}

.band {
  padding-block: clamp(2.25rem, 5vw, 3.75rem);
  border-top: 1px solid var(--line);
}

.band h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  max-width: 18ch;
}

.prose {
  max-width: var(--measure);
}

.prose a,
.site-footer a,
.panel a,
.example a {
  color: var(--accent);
}

.more {
  margin-top: 1rem;
}

.more a {
  color: var(--accent);
}

.examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.kicker {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-hero {
  padding-block: clamp(2rem, 5vw, 3.5rem) 0.5rem;
}

.page-hero h1 {
  max-width: 22ch;
  font-size: clamp(2.3rem, 6vw, 3.75rem);
}

.stack {
  display: grid;
  gap: 1rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-raised);
  min-width: 36rem;
}

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

th {
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

ol.steps,
.plain-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

ol.steps li + li,
.plain-list li + li {
  margin-top: 0.45rem;
}

code {
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.92em;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem 2.5rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0.4rem 0;
  max-width: var(--measure);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.footer-slogan {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 1.25rem;
}

@media (max-width: 800px) {
  .site-header {
    position: static;
  }

  .benefits,
  .examples {
    grid-template-columns: 1fr;
  }

  .hero-lockup {
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  h1 {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
