:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --bg-deep: #e9e4d9;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #fbfaf7;
  --surface-muted: #ece8df;
  --text: #1d1e1b;
  --text-soft: #66675f;
  --text-faint: #5c5b52;
  --border: rgba(31, 31, 27, 0.12);
  --border-strong: rgba(31, 31, 27, 0.2);
  --accent: #f58b18;
  --accent-bright: #ff9b2a;
  --accent-ink: #2b1600;
  --shadow: 0 26px 70px rgba(42, 35, 23, 0.17);
  --shadow-soft: 0 12px 34px rgba(42, 35, 23, 0.1);
  --radius-lg: 26px;
  --radius-md: 17px;
  --radius-sm: 11px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* Dark palette. Declared twice on purpose:
   1. behind prefers-color-scheme, so the OS preference still works with no JS;
   2. behind [data-theme="dark"], so an explicit choice from the header toggle
      wins over the OS either way.
   The :not([data-theme="light"]) guard lets an explicit "light" choice beat a
   dark OS. Keep the two blocks in sync. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #151513;
    --bg-deep: #0e0e0d;
    --surface: rgba(31, 31, 28, 0.78);
    --surface-solid: #1d1d1a;
    --surface-muted: #272721;
    --text: #f2f0e9;
    --text-soft: #b0afa7;
    --text-faint: #7f7e77;
    --border: rgba(255, 255, 255, 0.11);
    --border-strong: rgba(255, 255, 255, 0.2);
    --accent-ink: #201000;
    --shadow: 0 28px 76px rgba(0, 0, 0, 0.42);
    --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.26);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151513;
  --bg-deep: #0e0e0d;
  --surface: rgba(31, 31, 28, 0.78);
  --surface-solid: #1d1d1a;
  --surface-muted: #272721;
  --text: #f2f0e9;
  --text-soft: #b0afa7;
  --text-faint: #7f7e77;
  --border: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.2);
  --accent-ink: #201000;
  --shadow: 0 28px 76px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.26);
}

/* Light mode only: the faint tier was too low-contrast to read comfortably,
   so its default now matches what used to be the hover color, and hover
   goes to black instead. Dark mode is unaffected. */
:root[data-theme="light"] {
  --text-faint: var(--text);
}

:root[data-theme="light"] .site-footer a:hover,
:root[data-theme="light"] .digest-button:hover {
  color: #000;
}

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

html {
  min-width: 320px;
  background: var(--bg-deep);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at 78% 16%, rgba(245, 139, 24, 0.13), transparent 25rem),
    radial-gradient(circle at 12% 88%, rgba(119, 134, 110, 0.11), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.84' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  content: "";
  opacity: 0.32;
  pointer-events: none;
}

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

/* Inline text links (short, standalone words like "rinbal") get a larger
   invisible tap target via padding, offset by an equal negative margin so
   surrounding text keeps its original position. */
[data-creator-link] {
  display: inline-block;
  margin: -6px;
  padding: 6px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, transparent);
  outline-offset: 3px;
}

.site-shell {
  display: grid;
  grid-template-rows: 74px minmax(0, 1fr) 86px 42px;
  width: 100%;
  max-width: 1600px;
  height: 100vh;
  height: 100svh;
  margin: 0 auto;
  padding: 0 clamp(20px, 3.1vw, 54px);
  overflow: hidden;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
  font-size: 17px;
  font-weight: 730;
  letter-spacing: -0.025em;
}

.brand-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: #20201e;
  box-shadow: var(--shadow-soft);
}

.brand-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: 0 8px 28px rgba(30, 25, 17, 0.045);
  backdrop-filter: blur(18px);
}

.primary-nav a {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
  transition: background 160ms ease, color 160ms ease;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(30, 25, 17, 0.07);
}

.nav-icon,
.swipe-hint {
  display: none;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 14px;
}

/* Hidden until theme.js resolves a theme onto <html>. Without JS the toggle
   cannot work, so it should not be there to click. */
.theme-toggle {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}

:root[data-theme] .theme-toggle {
  display: grid;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Show the mode you would switch *to*, matching the aria-label. */
:root[data-theme="light"] .theme-icon-sun,
:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

.header-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
  transition: color 160ms ease;
}

.header-source:hover {
  color: var(--text);
}

.header-source svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.home-main {
  display: grid;
  grid-template-columns: minmax(350px, 0.82fr) minmax(520px, 1.18fr);
  align-items: center;
  min-height: 0;
  gap: clamp(26px, 4.8vw, 82px);
  padding: clamp(24px, 4.2vh, 58px) 0 clamp(18px, 3vh, 38px);
}

.hero-copy {
  position: relative;
  z-index: 4;
  align-self: center;
  min-width: 0;
}

.mobile-break {
  display: none;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 17px;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.hero-copy h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(47px, 4.55vw, 79px);
  font-weight: 710;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.hero-copy h1 span {
  color: var(--text-soft);
  font-weight: 480;
  /* Keeps "Your files. Your keys." from wrapping mid-phrase when a fallback
     font (Inter isn't guaranteed to be installed) renders wider than
     expected. The explicit .mobile-break <br> below still forces a line
     break on narrow screens regardless of this. */
  white-space: nowrap;
}

.hero-lede {
  max-width: 550px;
  margin: 23px 0 0;
  color: var(--text-soft);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 27px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 27px rgba(245, 139, 24, 0.24);
}

.button-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 14px 32px rgba(245, 139, 24, 0.31);
}

.button-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
  backdrop-filter: blur(16px);
}

.button-secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-solid);
}

#primary-download {
  justify-content: flex-start;
  min-width: 242px;
  padding: 9px 16px 9px 10px;
}

.button-platform {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 9px;
  background: rgba(31, 18, 0, 0.1);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

#primary-download strong,
#primary-download small {
  display: block;
}

#primary-download small {
  margin-top: 4px;
  color: color-mix(in srgb, var(--accent-ink) 72%, transparent);
  font-size: 10px;
  font-weight: 620;
}

.release-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #66a56d;
  box-shadow: 0 0 0 4px rgba(102, 165, 109, 0.12);
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.feature-pills li {
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.035em;
}

.showcase {
  position: relative;
  min-width: 0;
  align-self: stretch;
}

.showcase-glow {
  position: absolute;
  top: 14%;
  right: 5%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(245, 139, 24, 0.19);
  filter: blur(80px);
  opacity: 0.65;
  pointer-events: none;
}

.screenshot-stage {
  position: absolute;
  inset: 1% 0 50px;
  perspective: 1400px;
}

.screen-card {
  position: absolute;
  width: min(88%, 780px);
  aspect-ratio: 1.49;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: clamp(13px, 1.4vw, 22px);
  background: #1a1a18;
  box-shadow: var(--shadow);
  cursor: pointer;
  transform-origin: center;
  transition: left 680ms cubic-bezier(.2, .75, .2, 1), right 680ms cubic-bezier(.2, .75, .2, 1), top 680ms cubic-bezier(.2, .75, .2, 1), transform 680ms cubic-bezier(.2, .75, .2, 1), opacity 480ms ease, filter 480ms ease;
}

.screen-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.08), transparent 25%, transparent 75%, rgba(245, 139, 24, 0.05));
  content: "";
  pointer-events: none;
}

.screen-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.screen-card figcaption {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(17, 17, 16, 0.68);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  backdrop-filter: blur(12px);
  transition: opacity 240ms ease;
}

/* The active card is already named by .showcase-meta, and this badge sits over
   the bottom-right corner — where the dialog screenshots keep their action
   buttons. Fade it out once a card is front-and-centre. */
.screen-card[data-position="active"] figcaption {
  opacity: 0;
}

.screen-card[data-position="active"] {
  top: 8%;
  left: 5%;
  z-index: 3;
  opacity: 1;
  transform: rotate(-0.4deg) scale(1);
  filter: saturate(1);
}

.screen-card[data-position="next"] {
  top: 18%;
  right: -1%;
  z-index: 2;
  opacity: 0.7;
  transform: rotate(5.2deg) scale(0.86) translateZ(-80px);
  filter: saturate(0.75) brightness(0.78);
}

.screen-card[data-position="previous"] {
  top: 24%;
  left: -4%;
  z-index: 1;
  opacity: 0.48;
  transform: rotate(-5.4deg) scale(0.78) translateZ(-150px);
  filter: saturate(0.55) brightness(0.7);
}

/* Slides beyond the three-card fan: parked behind "previous" so they fade in
   from the same place the fan cycles toward. */
.screen-card[data-position="hidden"] {
  top: 24%;
  left: -4%;
  z-index: 0;
  opacity: 0;
  transform: rotate(-5.4deg) scale(0.78) translateZ(-150px);
  pointer-events: none;
}

.showcase-meta {
  position: absolute;
  right: 2%;
  bottom: 2px;
  left: 5%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.showcase-meta > div:first-child span,
.showcase-meta > div:first-child strong {
  display: block;
}

.showcase-meta > div:first-child span {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.showcase-meta > div:first-child strong {
  margin-top: 2px;
  font-size: 12px;
}

.carousel-controls {
  display: flex;
  gap: 12px;
}

.carousel-dot {
  position: relative;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--border-strong);
  cursor: pointer;
  transition: width 200ms ease, background 200ms ease;
}

/* Enlarges the tap target without growing the visible dot. Horizontal
   reach is capped at half the .carousel-controls gap so neighboring
   dots' hit areas can never overlap. */
.carousel-dot::after {
  content: "";
  position: absolute;
  inset: -8px -6px 0 -6px;
}

.carousel-dot.is-active {
  width: 22px;
  background: var(--accent);
}

.community-strip {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-width: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.community-label span,
.community-label small {
  display: block;
}

.community-label span {
  font-size: 12px;
  font-weight: 760;
}

.community-label small {
  margin-top: 1px;
  color: var(--text-faint);
  font-size: 10px;
}

.contributors-window {
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 7%, black 93%, transparent);
}

.contributors-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 8px;
}

.contributors-track.is-looping {
  animation: contributor-loop var(--loop-duration, 32s) linear infinite;
}

.contributors-window:hover .contributors-track.is-looping,
.contributors-window:focus-within .contributors-track.is-looping {
  animation-play-state: paused;
}

.contributor {
  display: flex;
  min-width: 156px;
  align-items: center;
  gap: 9px;
  padding: 7px 11px 7px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  transition: border-color 150ms ease, background 150ms ease;
}

.contributor:hover {
  border-color: var(--border-strong);
  background: var(--surface-solid);
}

.contributor img {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  background: var(--surface-muted);
}

.contributor span,
.contributor strong,
.contributor small {
  display: block;
  min-width: 0;
}

.contributor strong {
  max-width: 115px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contributor small {
  margin-top: 1px;
  color: var(--text-faint);
  font-size: 8px;
}

.community-link {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

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

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 9px;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  gap: 15px;
}

.site-footer a:hover {
  color: var(--text);
}

@keyframes contributor-loop {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--loop-distance, 50%))); }
}

/* Downloads */
.downloads-shell {
  grid-template-rows: 74px minmax(0, 1fr) 42px;
}

.downloads-main {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  gap: 14px;
  padding: 20px 0 18px;
}

.downloads-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 34px;
}

.downloads-intro .eyebrow {
  margin-bottom: 5px;
}

.downloads-intro h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 47px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.downloads-intro > p {
  margin: 0 0 2px;
  color: var(--text-soft);
  font-size: 13px;
}

.recommended-card {
  display: grid;
  grid-template-columns: 58px minmax(240px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  padding: 13px 17px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: var(--radius-md);
  background: linear-gradient(100deg, rgba(245, 139, 24, 0.12), color-mix(in srgb, var(--surface) 84%, transparent) 48%);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.recommended-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(245, 139, 24, 0.35);
  border-radius: 14px;
  background: rgba(245, 139, 24, 0.12);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.recommended-copy > span,
.panel-heading > div > span {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.13em;
}

.recommended-copy h2 {
  margin: 3px 0 2px;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.recommended-copy p {
  margin: 0;
  color: var(--text-soft);
  font-size: 10px;
}

.recommended-copy p.is-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--text);
  font-size: 11px;
  font-weight: 620;
  line-height: 1.4;
}

.hint-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.recommended-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.recommended-actions .button {
  min-height: 43px;
  white-space: nowrap;
}

.loading-pill,
.count-pill,
.format-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
}

.loading-pill {
  padding: 7px 11px;
}

.release-browser {
  display: grid;
  grid-template-columns: minmax(225px, 0.3fr) minmax(480px, 0.7fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
}

.release-index,
.asset-panel {
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr);
  min-height: 0;
}

.release-index {
  border-right: 1px solid var(--border);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}

.panel-heading h2 {
  margin: 2px 0 0;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.count-pill {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
}

.text-link {
  position: relative;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.text-link::after {
  content: "";
  position: absolute;
  inset: -10px;
}

.text-link:hover {
  color: var(--text);
}

.is-hidden {
  display: none !important;
}

.release-list,
.asset-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: thin;
}

.release-list {
  padding: 7px;
}

.release-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.release-option:hover {
  background: color-mix(in srgb, var(--surface-muted) 62%, transparent);
}

.release-option.is-selected {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
  background: rgba(245, 139, 24, 0.1);
}

.release-version {
  font-size: 12px;
  font-weight: 730;
}

.release-meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.release-meta small {
  color: var(--text-faint);
  font-size: 8px;
}

.release-meta em {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(245, 139, 24, 0.13);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 7px;
  font-style: normal;
  font-weight: 750;
  text-transform: uppercase;
}

.asset-list {
  padding: 8px;
}

.asset-row {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 73px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
}

.asset-row:last-child {
  border-bottom: 0;
}

.asset-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
}

.asset-copy {
  min-width: 0;
}

.asset-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.asset-title-line h3 {
  margin: 0;
  font-size: 11px;
  letter-spacing: -0.01em;
}

.format-pill {
  padding: 2px 6px;
  font-size: 7px;
}

.asset-filename {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-facts {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 8px;
}

.digest-button {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: 8px;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 2px;
  cursor: pointer;
}

.digest-button::after {
  content: "";
  position: absolute;
  inset: -8px;
}

.digest-button:hover {
  color: var(--text);
}

.small-download {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-solid);
  color: var(--text);
  font-size: 9px;
  font-weight: 730;
  transition: border-color 150ms ease, transform 150ms ease;
}

.small-download:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.empty-message {
  margin: 0;
  padding: 28px;
  color: var(--text-soft);
  font-size: 12px;
  text-align: center;
}

.release-skeleton,
.asset-skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-muted);
}

.release-skeleton::after,
.asset-skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.11), transparent);
  content: "";
  animation: loading 1.3s ease-in-out infinite;
  transform: translateX(-100%);
}

.release-skeleton {
  height: 51px;
  margin-bottom: 6px;
}

.asset-skeleton {
  height: 64px;
  margin-bottom: 8px;
}

@keyframes loading {
  to { transform: translateX(100%); }
}

@media (max-height: 760px) and (min-width: 921px) {
  .site-shell {
    grid-template-rows: 62px minmax(0, 1fr) 72px 34px;
  }

  .home-main {
    padding-top: 18px;
    padding-bottom: 15px;
  }

  .hero-copy h1 {
    font-size: clamp(43px, 4vw, 64px);
  }

  .hero-lede {
    margin-top: 17px;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .feature-pills {
    margin-top: 16px;
  }

  .downloads-shell {
    grid-template-rows: 62px minmax(0, 1fr) 34px;
  }

  .downloads-main {
    gap: 10px;
    padding: 12px 0 10px;
  }

  .recommended-card {
    min-height: 78px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .release-index,
  .asset-panel {
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .asset-row {
    min-height: 65px;
    padding-top: 7px;
    padding-bottom: 7px;
  }
}

@media (max-width: 1100px) {
  .home-main {
    grid-template-columns: minmax(320px, 0.9fr) minmax(430px, 1.1fr);
    gap: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(44px, 5.4vw, 64px);
  }

  .screen-card {
    width: 92%;
  }

  .community-strip {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .community-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  body {
    overflow: auto;
  }

  .site-shell,
  .downloads-shell {
    grid-template-rows: 66px auto auto auto;
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .primary-nav {
    position: fixed;
    right: 14px;
    bottom: 14px;
    left: 14px;
    z-index: 50;
    justify-content: space-evenly;
    max-width: calc(100vw - 28px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.18);
  }

  .primary-nav a {
    flex: 1 1 0;
    padding-right: 7px;
    padding-left: 7px;
    text-align: center;
  }

  .header-actions {
    grid-column: 2;
  }

  .home-main {
    grid-template-columns: 1fr;
    gap: 18px;
    min-width: 0;
    padding: 44px 0 20px;
  }

  .hero-copy {
    text-align: center;
  }

  .eyebrow,
  .hero-actions,
  .release-line,
  .feature-pills {
    justify-content: center;
  }

  .hero-lede {
    margin-right: auto;
    margin-left: auto;
  }

  .showcase {
    min-height: min(65vw, 520px);
  }

  .screenshot-stage {
    inset: 0 0 38px;
  }

  .showcase-meta {
    bottom: 0;
  }

  .community-strip {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px 0;
  }

  .community-label {
    text-align: center;
  }

  .site-footer {
    min-height: 88px;
    padding: 18px 0 74px;
  }

  .downloads-main {
    gap: 16px;
    padding: 28px 0 20px;
  }

  .downloads-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .recommended-card {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .recommended-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .release-browser {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .release-index {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .release-list {
    display: flex;
    overflow-x: auto;
  }

  .release-option {
    min-width: 190px;
  }

  .asset-list {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 580px) {
  body {
    background:
      radial-gradient(circle at 88% 5%, rgba(245, 139, 24, 0.16), transparent 18rem),
      radial-gradient(circle at 6% 56%, rgba(119, 134, 110, 0.1), transparent 20rem),
      var(--bg);
    overscroll-behavior-y: none;
  }

  .site-shell,
  .downloads-shell {
    width: 100%;
    padding-top: env(safe-area-inset-top, 0px);
    padding-right: 16px;
    padding-left: 16px;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 66px;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
  }

  .brand {
    gap: 10px;
    font-size: 16px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .header-actions {
    gap: 10px;
  }

  .header-source {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
  }

  /* The GitHub link collapses to an icon button here — match the toggle's box to
     it. Deliberately no `display` here: that stays owned by the
     :root[data-theme] rule so the toggle remains hidden without JS. */
  .theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .header-source span {
    display: none;
  }

  .header-source svg,
  .theme-toggle svg {
    width: 18px;
    height: 18px;
  }

  .primary-nav {
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom, 10px));
    left: 12px;
    max-width: calc(100vw - 24px);
    min-height: 70px;
    gap: 3px;
    padding: 6px;
    border-color: var(--border-strong);
    border-radius: 22px;
    background: color-mix(in srgb, var(--surface-solid) 91%, transparent);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(24px) saturate(1.25);
  }

  .primary-nav a {
    display: flex;
    min-width: 0;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    padding: 5px 3px;
    border-radius: 17px;
    font-size: 9px;
    letter-spacing: 0.01em;
  }

  .primary-nav a:hover,
  .primary-nav a[aria-current="page"] {
    background: rgba(245, 139, 24, 0.13);
    color: var(--text);
    box-shadow: none;
  }

  .nav-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
  }

  .nav-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

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

  .home-main {
    gap: 28px;
    padding: 28px 0 24px;
  }

  .hero-copy {
    width: 100%;
    text-align: center;
  }

  .eyebrow {
    justify-content: center;
    margin-bottom: 15px;
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(42px, 12.6vw, 54px);
    letter-spacing: -0.065em;
    line-height: 0.99;
  }

  .hero-copy h1 span {
    display: block;
    margin-top: 4px;
  }

  .mobile-break {
    display: block;
  }

  .hero-lede {
    max-width: 355px;
    margin-top: 19px;
    font-size: 14px;
    line-height: 1.58;
  }

  .hero-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
    margin-top: 24px;
  }

  #primary-download,
  .hero-actions .button-secondary {
    width: 100%;
    min-width: 0;
    border-radius: 17px;
  }

  #primary-download {
    min-height: 61px;
    padding: 10px 15px 10px 10px;
  }

  .hero-actions .button-secondary {
    min-height: 51px;
  }

  .button-platform {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 12px;
  }

  .release-line {
    justify-content: center;
    margin-top: 14px;
    font-size: 9px;
  }

  .feature-pills {
    width: 100%;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
  }

  .feature-pills li {
    padding: 5px 8px;
    font-size: 8px;
  }

  .showcase {
    width: 100%;
    min-height: calc((100vw - 32px) * 0.68 + 50px);
    overflow: hidden;
  }

  .showcase-glow {
    top: 6%;
    right: 10%;
    width: 80%;
    opacity: 0.52;
    filter: blur(54px);
  }

  .screenshot-stage {
    inset: 0 0 48px;
    overflow: hidden;
    border-radius: 19px;
    perspective: none;
    touch-action: pan-y pinch-zoom;
  }

  .screen-card,
  .screen-card[data-position="active"],
  .screen-card[data-position="next"],
  .screen-card[data-position="previous"] {
    top: 0;
    right: auto;
    left: 0;
    width: 100%;
    border-radius: 18px;
    transform: none;
    filter: none;
  }

  .screen-card {
    transition: transform 430ms cubic-bezier(.2, .75, .2, 1), opacity 300ms ease;
  }

  .screen-card[data-position="active"] {
    z-index: 3;
    opacity: 1;
    transform: translateX(0);
  }

  .screen-card[data-position="next"] {
    z-index: 2;
    opacity: 0.2;
    transform: translateX(105%);
  }

  .screen-card[data-position="previous"] {
    z-index: 1;
    opacity: 0.2;
    transform: translateX(-105%);
  }

  .screen-card[data-position="hidden"] {
    z-index: 0;
    opacity: 0;
    transform: translateX(-105%);
    pointer-events: none;
  }

  .screen-card figcaption {
    display: none;
  }

  .showcase-meta {
    right: 0;
    bottom: 1px;
    left: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .showcase-meta > div:first-child {
    display: block;
    text-align: left;
  }

  .carousel-controls {
    justify-self: center;
  }

  .swipe-hint {
    display: block;
    justify-self: end;
    color: var(--text-faint);
    font-family: var(--mono);
    font-size: 7px;
  }

  .community-strip {
    gap: 15px;
    margin-top: 2px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    box-shadow: var(--shadow-soft);
  }

  .community-label {
    text-align: left;
  }

  .community-label span {
    font-size: 15px;
  }

  .community-label small {
    font-size: 10px;
  }

  .contributors-track {
    gap: 8px;
  }

  .contributor {
    min-width: 164px;
    min-height: 54px;
    padding: 8px 12px 8px 8px;
  }

  .contributor img {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .contributor strong {
    font-size: 11px;
  }

  .contributor small {
    font-size: 9px;
  }

  .community-link {
    display: flex;
    min-height: 47px;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
    border-radius: 14px;
    background: rgba(245, 139, 24, 0.1);
    color: var(--text);
    font-size: 11px;
  }

  .site-footer {
    min-height: 112px;
    align-items: center;
    justify-content: center;
    padding: 22px 0 calc(92px + env(safe-area-inset-bottom, 0px));
    text-align: center;
  }

  .home-page .site-footer nav {
    display: none;
  }

  .downloads-main {
    gap: 17px;
    padding: 25px 0 calc(98px + env(safe-area-inset-bottom, 0px));
  }

  .downloads-intro {
    gap: 10px;
  }

  .downloads-intro .eyebrow {
    justify-content: flex-start;
    margin-bottom: 7px;
  }

  .downloads-intro h1 {
    font-size: clamp(36px, 10.8vw, 46px);
  }

  .downloads-intro > p {
    font-size: 13px;
    line-height: 1.55;
  }

  .recommended-card {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    padding: 17px;
    border-radius: 21px;
    text-align: left;
  }

  .recommended-mark {
    width: 52px;
    height: 52px;
    margin: 0;
    border-radius: 15px;
  }

  .recommended-copy h2 {
    margin-top: 4px;
    font-size: 19px;
  }

  .recommended-copy p {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.45;
  }

  .recommended-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .recommended-actions .button {
    width: 100%;
    min-height: 51px;
    border-radius: 15px;
  }

  .release-browser {
    display: block;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .release-index {
    display: grid;
    grid-template-rows: auto auto;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    box-shadow: var(--shadow-soft);
  }

  .panel-heading {
    min-height: 65px;
    padding: 14px 16px;
  }

  .panel-heading h2 {
    font-size: 17px;
  }

  .release-list {
    display: flex;
    gap: 7px;
    padding: 9px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
  }

  .release-list::-webkit-scrollbar {
    display: none;
  }

  .release-option {
    min-width: 154px;
    min-height: 68px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    padding: 11px 12px;
    border-color: var(--border);
    border-radius: 14px;
    background: var(--surface-muted);
    scroll-snap-align: start;
  }

  .release-option.is-selected {
    border-color: color-mix(in srgb, var(--accent) 58%, var(--border));
    background: rgba(245, 139, 24, 0.12);
  }

  .release-version {
    font-size: 14px;
  }

  .release-meta {
    width: 100%;
    justify-content: space-between;
  }

  .asset-panel {
    display: grid;
    grid-template-rows: auto auto;
    margin-top: 17px;
  }

  .asset-heading {
    min-height: 62px;
    padding: 10px 2px;
    border-bottom: 0;
  }

  .asset-heading .text-link {
    font-size: 10px;
  }

  .asset-list {
    display: grid;
    gap: 10px;
    max-height: none;
    padding: 0;
    overflow: visible;
  }

  .asset-row {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    box-shadow: 0 8px 25px rgba(30, 25, 17, 0.06);
  }

  .asset-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .asset-title-line {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .asset-title-line h3 {
    font-size: 13px;
  }

  .asset-filename {
    margin-top: 5px;
    font-size: 8px;
  }

  .asset-facts {
    margin-top: 7px;
    font-size: 9px;
  }

  .digest-button {
    min-height: 22px;
    font-size: 9px;
  }

  .small-download {
    grid-column: 1 / -1;
    display: flex;
    min-height: 47px;
    align-items: center;
    justify-content: center;
    border-color: transparent;
    border-radius: 14px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 11px;
    text-align: center;
  }

  .downloads-page .site-footer {
    min-height: 106px;
    justify-content: center;
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  }

  .downloads-page .site-footer nav {
    display: none;
  }
}

@media (max-width: 370px) {
  .site-shell,
  .downloads-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-lede {
    font-size: 13px;
  }

  .feature-pills li:last-child {
    display: none;
  }

  .showcase {
    min-height: calc((100vw - 24px) * 0.68 + 48px);
  }
}

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