:root {
  color-scheme: light;
  --page: #f6f8f7;
  --surface: #ffffff;
  --surface-muted: #eef3f1;
  --text: #17231f;
  --muted: #61706a;
  --line: #dbe4df;
  --accent: #087b5b;
  --accent-dark: #066247;
  --accent-soft: #e4f4ed;
  --warning-soft: #fff5df;
  --warning-text: #825d12;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--text); font-size: 16px; line-height: 1.55; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { color: #034b37; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #76bfa4; outline-offset: 3px; }

.skip-link { position: absolute; top: -60px; left: 16px; z-index: 10; padding: 10px 14px; border-radius: 8px; background: var(--text); color: white; }
.skip-link:focus { top: 12px; }
.topbar { min-height: 68px; padding: 0 max(24px, calc((100% - 1040px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: baseline; gap: 1px; color: var(--text); font-size: 21px; font-weight: 800; letter-spacing: -1px; text-decoration: none; }
.brand > span { color: var(--accent); }
.brand small { margin-left: 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1.1px; }
.topbar nav { display: flex; gap: 24px; }
.topbar nav a, .footer > a:last-child { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.topbar nav a:hover, .footer > a:last-child:hover { color: var(--accent-dark); }

.page-wrap { width: min(100% - 40px, 960px); margin: 0 auto; }
.intro { margin: 42px 0 56px; padding: clamp(26px, 5vw, 48px); border: 1px solid #dcebe4; border-radius: 18px; background: #edf6f1; }
.eyebrow { margin: 0 0 9px; color: var(--accent-dark); font-size: 12px; font-weight: 800; letter-spacing: .09em; }
.intro h1 { max-width: 680px; margin: 0; font-size: clamp(34px, 6vw, 54px); line-height: 1.08; letter-spacing: -.045em; }
.intro h1 span { color: var(--accent); }
.intro-text { max-width: 620px; margin: 18px 0 24px; color: var(--muted); font-size: 17px; }
.primary-button, .download-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 43px; padding: 10px 16px; border-radius: 9px; background: var(--accent); color: white; font-size: 14px; font-weight: 700; text-decoration: none; }
.primary-button:hover, .download-button:hover { background: var(--accent-dark); color: white; }

.updates-section { scroll-margin-top: 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 12px; }
.section-heading h2, .install-heading h2 { margin: 0; font-size: 30px; line-height: 1.2; letter-spacing: -.035em; }
.section-heading p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); }
.search-box { display: flex; align-items: center; gap: 9px; width: min(100%, 300px); min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); }
.search-box > span { font-size: 21px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.search-box input::placeholder { color: #87948e; }
.result-count { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.result-count b { color: var(--text); }

.update-groups { display: grid; gap: 16px; }
.release-group { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.release-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px 14px; }
.release-label { margin: 0 0 4px; color: var(--accent-dark); font-size: 12px; font-weight: 800; }
.release-heading h3 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -.025em; }
.release-status { max-width: 320px; flex: 0 1 auto; padding: 5px 9px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 11px; font-weight: 750; text-align: right; }
.update-specs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 16px; }
.update-specs span, .mod-details span { padding: 4px 8px; border-radius: 6px; background: var(--surface-muted); color: #4b5d55; font-size: 12px; }
.no-mods-note { margin: 0 22px 20px; padding: 13px 15px; border-radius: 9px; background: var(--accent-soft); color: #225b45; font-size: 14px; }
.mod-list { display: grid; gap: 10px; padding: 0 14px 14px; }
.mod-item { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; }
.mod-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mod-title-line h4 { margin: 0; font-size: 17px; line-height: 1.35; }
.requirement { padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.requirement.required { background: var(--accent-soft); color: var(--accent-dark); }
.requirement.optional { background: var(--warning-soft); color: var(--warning-text); }
.mod-description { margin: 7px 0 12px; color: var(--muted); font-size: 14px; }
.mod-details { display: flex; flex-wrap: wrap; gap: 6px; }
.mod-credit { margin: 11px 0 12px; color: var(--muted); font-size: 12px; }
.mod-credit strong { color: #34443d; }
.mod-credit > span { padding: 0 3px; }
.mod-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.download-button { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.mod-links > a:not(.download-button) { font-size: 12px; font-weight: 650; }
.update-notes { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.update-notes summary { padding: 12px 22px; cursor: pointer; color: #42534b; font-weight: 650; }
.update-notes ul { margin: 0; padding: 0 22px 16px 42px; }
.source-note { margin: 13px 0 0; color: var(--muted); font-size: 12px; }
.empty-state { margin: 12px 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); }
.empty-state[hidden] { display: none; }

.install-section { margin: 58px 0 60px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.install-heading { margin-bottom: 17px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 15px; padding: 0; list-style: none; }
.steps li { display: flex; align-items: start; gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 14px; }
.steps li b { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; }
.text-link { font-size: 13px; font-weight: 650; }

.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px max(24px, calc((100% - 960px) / 2)); border-top: 1px solid var(--line); background: var(--surface); }
.footer p { margin: 0; color: var(--muted); font-size: 12px; }

@media (max-width: 680px) {
  .topbar { min-height: 60px; padding: 0 20px; }
  .topbar nav { gap: 14px; }
  .topbar nav a { font-size: 13px; }
  .page-wrap { width: min(100% - 28px, 960px); }
  .intro { margin: 24px 0 42px; border-radius: 13px; }
  .section-heading { align-items: stretch; flex-direction: column; gap: 15px; }
  .search-box { width: 100%; }
  .release-heading { align-items: start; padding: 17px 16px 12px; }
  .release-heading h3 { font-size: 20px; }
  .release-status { max-width: 180px; white-space: normal; }
  .update-specs { padding: 0 16px 13px; }
  .no-mods-note { margin: 0 16px 16px; }
  .mod-list { padding: 0 10px 10px; }
  .mod-item { padding: 13px; }
  .steps { grid-template-columns: 1fr; }
  .footer { align-items: start; flex-wrap: wrap; padding: 18px 20px; }
  .footer p { order: 3; width: 100%; }
}

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