:root {
  color-scheme: light;
  --ink: #251914;
  --muted: #725f55;
  --paper: #f8f1e5;
  --paper-deep: #eddfca;
  --line: #d7c4a8;
  --seal: #9d281a;
  --seal-dark: #741f16;
  --cream: #fffaf0;
  --focus: #155eef;
  font-family: "Noto Serif SC", "Songti SC", "Microsoft YaHei", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 10%, rgb(157 40 26 / 9%), transparent 32rem),
    linear-gradient(180deg, var(--paper), #fffaf2 60%, var(--paper-deep));
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  inset: 8px auto auto 8px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--cream);
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }

.topbar,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
}

.brand img { border-radius: 9px; }
.brand small { color: var(--muted); font: 600 .72rem/1 sans-serif; letter-spacing: .1em; }

.community-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  background: rgb(255 250 240 / 72%);
}

.community-link:hover { border-color: var(--seal); }

.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  align-items: center;
  gap: 56px;
  padding: 84px 0 96px;
}

.hero > * { min-width: 0; }

.eyebrow,
.section-label {
  color: var(--seal-dark);
  text-transform: uppercase;
  letter-spacing: .13em;
  font: 750 .77rem/1.4 sans-serif;
}

h1 {
  max-width: 760px;
  margin: 16px 0 24px;
  font-size: clamp(3rem, 7vw, 6.7rem);
  line-height: .98;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}

.lede {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.download-button,
.secondary-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 12px;
  font: 750 .96rem/1 sans-serif;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.download-button {
  color: white;
  background: var(--seal);
  box-shadow: 0 12px 30px rgb(116 31 22 / 22%);
}

.download-button[aria-disabled="true"] {
  color: #776a62;
  background: #d8cec0;
  box-shadow: none;
  pointer-events: none;
}

.download-button:not([aria-disabled="true"]):hover,
.secondary-button:hover { transform: translateY(-2px); }

.secondary-button { border: 1px solid var(--line); background: rgb(255 250 240 / 76%); }
.release-status { min-height: 24px; color: var(--muted); font-size: .92rem; }

.seal-panel { display: grid; place-items: center; }
.seal-panel img { width: min(100%, 390px); height: auto; filter: drop-shadow(0 28px 40px rgb(73 29 20 / 22%)); }

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}

.facts article { min-height: 140px; padding: 28px 24px; border-right: 1px solid var(--line); }
.facts article:last-child { border-right: 0; }
.facts strong, .facts span { display: block; }
.facts strong { margin-bottom: 10px; font-size: 1.15rem; }
.facts span { color: var(--muted); line-height: 1.65; }

.content-grid,
.two-column,
.notes,
.notice { margin-top: 108px; }

.content-grid,
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; }

h2 { margin: 10px 0 18px; font-size: clamp(1.8rem, 4vw, 3.1rem); line-height: 1.15; letter-spacing: -.025em; }
.content-grid p, .two-column p, .notes p, .notice p { color: var(--muted); line-height: 1.85; }

.release-card {
  margin: 0;
  padding: 6px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgb(255 250 240 / 78%);
  box-shadow: 0 16px 46px rgb(75 49 33 / 8%);
}

.release-card > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.release-card > div:last-child { border-bottom: 0; }
.release-card dt { color: var(--muted); }
.release-card dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.hash-row dd { display: grid; gap: 10px; }
.hash-row code { font: 600 .76rem/1.6 ui-monospace, "Cascadia Mono", monospace; }
.hash-row button { width: fit-content; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); cursor: pointer; }
.hash-row button:disabled { cursor: default; opacity: .55; }

.two-column article { padding: 34px; border-top: 3px solid var(--seal); background: rgb(255 250 240 / 58%); }
.notes { max-width: 850px; }
#release-notes { white-space: pre-line; }
.notice { padding: 36px; border-radius: 18px; background: var(--seal-dark); color: white; }
.notice h2 { margin-top: 0; }
.notice p { color: #f9e9dc; margin-bottom: 0; }

footer { min-height: 160px; margin-top: 100px; padding-top: 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; color: var(--muted); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 56px 0 72px; }
  .hero-copy { order: 2; }
  .seal-panel { order: 1; }
  .seal-panel img { width: min(58vw, 260px); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts article:nth-child(2) { border-right: 0; }
  .facts article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .content-grid, .two-column { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 600px) {
  .topbar, main, footer { width: min(100% - 24px, 1180px); }
  .brand small { display: none; }
  .topbar { gap: 8px; }
  .community-link { padding-inline: 11px; font-size: .88rem; white-space: nowrap; }
  h1 { font-size: clamp(2.8rem, 16vw, 4.5rem); }
  .hero-actions > * { width: 100%; }
  .facts { grid-template-columns: 1fr; }
  .facts article { border-right: 0; border-bottom: 1px solid var(--line); }
  .facts article:last-child { border-bottom: 0; }
  .content-grid, .two-column, .notes, .notice { margin-top: 72px; }
  .release-card { padding-inline: 20px; }
  .release-card > div { grid-template-columns: 1fr; gap: 8px; }
  .two-column article, .notice { padding: 24px; }
  footer { flex-direction: column; justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
