:root {
  color-scheme: dark light;
  --paper: #191c21;
  --panel: #22262c;
  --panel-elev: #2b3038;
  --rule: #363c45;
  --ink: #f1f4f9;
  --muted: #a0a8b5;
  --accent: #97b8e9;
  --crab: #f06a3c;
  --crab-soft: rgba(240, 106, 60, 0.14);
  --cyan: #5cc6e0;
  --button-ink: #131820;
  --shadow: 0 16px 36px rgba(9, 11, 15, 0.42);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --paper: #eaecef;
    --panel: #fafafb;
    --panel-elev: #f0f2f5;
    --rule: #dadee3;
    --ink: #1f242d;
    --muted: #6d7582;
    --accent: #355d9d;
    --crab: #d64d20;
    --crab-soft: rgba(214, 77, 32, 0.10);
    --cyan: #0e7490;
    --button-ink: #ffffff;
    --shadow: 0 12px 28px rgba(31, 36, 45, 0.08);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper: #eaecef;
  --panel: #fafafb;
  --panel-elev: #f0f2f5;
  --rule: #dadee3;
  --ink: #1f242d;
  --muted: #6d7582;
  --accent: #355d9d;
  --crab: #d64d20;
  --crab-soft: rgba(214, 77, 32, 0.10);
  --cyan: #0e7490;
  --button-ink: #ffffff;
  --shadow: 0 12px 28px rgba(31, 36, 45, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.62; background: var(--paper); color: var(--ink); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .22em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--crab); outline-offset: 4px; }

.skip-link {
  position: absolute;
  inset-block-start: .75rem;
  inset-inline-start: .75rem;
  z-index: 20;
  padding: .55rem .85rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: .5rem;
  transform: translateY(calc(-100% - 1.2rem));
}
.skip-link:focus { transform: translateY(0); }

.shell { width: min(1088px, calc(100% - 2.5rem)); margin-inline: auto; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .85rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.05rem;
  font-weight: 760;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.03em;
}
.wordmark img { display: block; border-radius: .35rem; }

nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
nav a {
  font-size: .925rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s ease;
}
nav a:hover { color: var(--ink); }
nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--crab);
  text-decoration-thickness: 2px;
}

.top-tools { display: flex; align-items: center; gap: .8rem; font-size: .88rem; }
.top-tools a { color: var(--muted); text-decoration: none; font-weight: 500; }
.top-tools a:hover { color: var(--ink); }
.sibling-link {
  padding: .24rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--panel);
  font-size: .82rem;
}
.sibling-link:hover { border-color: var(--crab); }

.theme-toggle {
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--ink);
  width: 2rem;
  height: 2rem;
  border-radius: .5rem;
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.theme-toggle:hover { border-color: var(--crab); transform: translateY(-1px); }

/* Hero */
.intro {
  padding-block: clamp(2.8rem, 7vw, 5.2rem) 2.75rem;
  display: grid;
  align-items: center;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .95fr);
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  background: var(--crab-soft);
  border: 1px solid color-mix(in srgb, var(--crab) 45%, var(--rule));
  color: var(--crab);
  font-size: .82rem;
  font-weight: 680;
  text-decoration: none;
  margin-bottom: 1.1rem;
}
.release-pill:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; line-height: 1.06; }
h1 { font-size: clamp(2.7rem, 6.8vw, 4.9rem); letter-spacing: -.055em; font-weight: 780; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); letter-spacing: -.045em; }
h3 { margin-top: 1.8rem; font-size: 1.18rem; }
p { max-width: 66ch; color: var(--muted); }
.intro p { font-size: clamp(1rem, 1.7vw, 1.14rem); max-width: 44ch; margin-block: 1.25rem 1.5rem; }
.intro p strong { color: var(--ink); }

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .72em 1.25em;
  background: var(--crab);
  color: #ffffff;
  border-radius: .6rem;
  font-weight: 680;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, filter .15s ease, border-color .15s ease;
}
.button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.button-outline {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--rule);
}
.button-outline:hover { border-color: var(--accent); filter: none; }

.download-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }
.release-notes { white-space: pre-wrap; overflow-wrap: anywhere; }

.systems { display: flex; flex-wrap: wrap; gap: .5rem; }
.sys-pill {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .28rem .72rem;
}

.hero-visual { display: grid; gap: 1rem; justify-items: center; }

.mascot-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: .5rem;
}
.mascot-stage::before {
  content: "";
  position: absolute;
  inset: 14% 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.28) 0%, rgba(203, 186, 239, 0.14) 55%, transparent 75%);
  filter: blur(22px);
  z-index: 0;
}
.mascot-hero {
  position: relative;
  z-index: 1;
  width: min(290px, 72vw);
  height: auto;
  filter: drop-shadow(0 16px 26px rgba(10, 8, 22, 0.45));
  transition: transform .35s ease;
}
.mascot-hero:hover { transform: translateY(-4px) rotate(-1.5deg); }

.spec-card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: .85rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: .88rem;
}
.spec-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding: .55rem .9rem;
  background: var(--panel-elev);
  border-bottom: 1px solid var(--rule);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
}
.spec-badge {
  color: var(--crab);
  background: var(--crab-soft);
  padding: .14rem .48rem;
  border-radius: .35rem;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem .9rem;
  color: var(--muted);
}
.spec-row + .spec-row { border-top: 1px solid var(--rule); }
.spec-row strong { color: var(--ink); font-weight: 620; text-align: right; }

/* Sections & cards */
.showcase { padding-bottom: 1rem; }
.section { border-top: 1px solid var(--rule); padding-block: 2.25rem; }
.reading { max-width: 780px; }
.page-heading { padding-block: clamp(2.2rem, 6vw, 4.2rem) 2rem; }
.page-heading h1 { font-size: clamp(2.3rem, 7vw, 4.1rem); }
.page-heading p { margin-bottom: 0; font-size: 1.08rem; }

.explore-section { padding-block: .5rem 2.75rem; }
.home-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.nav-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.15rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: .85rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.nav-card:hover {
  transform: translateY(-3px);
  border-color: var(--crab);
  box-shadow: var(--shadow);
}
.card-kicker {
  font-size: .72rem;
  font-weight: 720;
  letter-spacing: .05em;
  color: var(--crab);
  margin-bottom: .5rem;
}
.nav-card strong { font-size: 1.05rem; font-weight: 700; }
.nav-card p { margin: .45rem 0 1rem; font-size: .9rem; flex: 1; }
.card-cta { font-size: .85rem; font-weight: 660; color: var(--accent); }

.package-list > div { padding-block: .85rem; }
.package-list > div + div { border-top: 1px solid var(--rule); }
.package-list dt { font-weight: 650; }
.package-list dd { margin: .3rem 0 0; color: var(--muted); }

.timeline { list-style: none; padding: 0; margin-block: 1rem; }
.timeline > li { display: grid; grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); gap: 1rem; padding-block: 1.2rem; }
.timeline > li + li { border-top: 1px solid var(--rule); }
.timeline h3 { margin: 0 0 .4rem; }
.timeline p { margin: .4rem 0 0; }
.timeline div > ul { padding-inline-start: 1.25rem; color: var(--muted); }
.version-number { color: var(--crab); font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.shortcuts { max-width: 38rem; }
.shortcuts div { border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 1rem; padding-block: .7rem; }
.shortcuts dd { margin: 0; white-space: nowrap; }
kbd {
  padding: .16em .42em;
  border-radius: .3em;
  background: var(--panel-elev);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: .88em;
}

.capture { margin: 0 auto 2rem; }
.capture img {
  width: 100%;
  display: block;
  border: 1px solid var(--rule);
  border-radius: .85rem;
  box-shadow: var(--shadow);
}
.capture figcaption { margin-top: .65rem; color: var(--muted); font-size: .9rem; }
.zen { max-width: 38rem; margin: 1.5rem 0; }

.footer { border-top: 1px solid var(--rule); padding-block: 1.75rem 2.5rem; font-size: .9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .6rem 1.35rem; margin-bottom: .6rem; }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; }
  .home-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top { flex-wrap: wrap; }
}

@media (max-width: 620px) {
  .top { align-items: flex-start; flex-direction: column; }
  .timeline > li { grid-template-columns: 1fr; gap: .45rem; }
  .shortcuts div { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .home-links { grid-template-columns: 1fr; }
}
