:root {
  --paper: #eef4ef;
  --paper-2: #f8fbf7;
  --ink: #252527;
  --ink-2: #171719;
  --muted: #646963;
  --rule: rgba(37, 37, 39, 0.18);
  --yellow: #ffd006;
  --yellow-soft: #fff0a8;
  --code-bg: #171719;
  --code-fg: #eef4ef;
  --shadow: rgba(23, 23, 25, 0.16);
  --max: 1160px;
  --font-body: "Work Sans", Arial, "Helvetica Neue", sans-serif;
  --font-brand: "Unbounded", Arial, "Helvetica Neue", sans-serif;
  --font-display: Anton, Impact, "Arial Black", sans-serif;
  --font-code: "Fira Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
}

html.dark {
  --paper: #171719;
  --paper-2: #252527;
  --ink: #eef4ef;
  --ink-2: #f8fbf7;
  --muted: #b9c0ba;
  --rule: rgba(238, 244, 239, 0.2);
  --yellow: #ffd006;
  --yellow-soft: #5a4b12;
  --code-bg: #eef4ef;
  --code-fg: #171719;
  --shadow: rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

code {
  font-family: var(--font-code);
  font-size: 0.95em;
}

pre {
  margin: 0;
  overflow-x: auto;
  font-family: var(--font-code);
}

.page-shell {
  min-height: 100svh;
  background: var(--paper);
}

.site-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  margin: 0;
  padding: 28px clamp(22px, 3.4vw, 70px);
  border: 0;
  background: transparent;
  color: #252527;
}

.mark {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  background: var(--yellow);
  color: #252527;
  box-shadow: 0 8px 22px rgba(23, 23, 25, 0.28);
  font-family: var(--font-brand);
  font-size: clamp(18px, 2.6vw, 28px);
  font-weight: 900;
  line-height: 0.82;
  text-decoration: none;
}

.mark-accent {
  color: #fff;
}

/* Both logo parts get matching vertical room so the rainbow fill on the name
   isn't clipped, while staying aligned with each other. */
.mark-accent,
.mark-name {
  display: inline-block;
  margin: -0.24em 0;
  padding: 0.24em 0;
}

.brand {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
}

.brand-ver {
  font-family: var(--font-code);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.version {
  padding: 5px 9px;
  border: 1px solid currentColor;
  font-family: var(--font-code);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.gh {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.gh svg {
  display: block;
}

.gh:hover {
  opacity: 0.65;
}

.hero {
  display: grid;
  grid-template-rows: minmax(336px, 41.6svh) minmax(440px, auto);
  min-height: 100svh;
  background: #252527;
  color: #eef4ef;
}

html.dark .hero {
  background: #252527;
  color: #eef4ef;
}

.hero-paper {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: clamp(28px, 5vw, 72px);
  width: 100%;
  margin: 0;
  padding: 64px clamp(22px, 3.4vw, 70px) 52px;
  background: #eef4ef;
  color: #252527;
  position: relative;
  z-index: 2;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.hero-headline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 690px);
  gap: clamp(34px, 7vw, 128px);
  align-items: end;
}

/* Centered published-coordinate display with a rotating module name. */
.hero-coords {
  align-self: center;
  justify-self: center;
  display: grid;
  gap: 14px;
}

.coords {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  font-family: var(--font-code);
  font-size: clamp(11px, 2.4vw, 20px);
  font-weight: 700;
  line-height: 1.5;
  color: #252527;
}

.coords-rotator {
  display: inline-block;
  height: 1.5em;
  overflow: hidden;
  vertical-align: top;
  text-align: left;
}

.coords-rotor {
  display: flex;
  flex-direction: column;
  animation: coords-roll 12s infinite;
}

.coords-rotor span {
  display: block;
  height: 1.5em;
  line-height: 1.5em;
}

@keyframes coords-roll {
  0%, 28% { transform: translateY(0); }
  33%, 61% { transform: translateY(-1.5em); }
  66%, 94% { transform: translateY(-3em); }
  100% { transform: translateY(-4.5em); }
}

.command {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  min-height: 36px;
  color: inherit;
  font-family: var(--font-code);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.command-arrow {
  display: inline-block;
  font-weight: 900;
  animation: arrow-jump 1.2s ease-in-out infinite;
}

.command:hover .command-arrow {
  animation-duration: 0.6s;
}

@keyframes arrow-jump {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.hero h1 {
  width: max-content;
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(72px, 10vw, 170px);
  font-weight: 900;
  line-height: 0.76;
}

/* Shimmer text: base wordmark with a highlight band swept across the glyphs
   via a ::before that masks a moving gradient (background-clip: text). */
.t-shimmer {
  --shimmer-dur: 4500ms;
  --shimmer-base: #252527;
  --shimmer-highlight: #41434a;
  --shimmer-band: 400%;
  --shimmer-ease: linear;
  position: relative;
  display: inline-block;
  color: var(--shimmer-base);
}

/* Only on hover. The box extends past the tight line-height (top/bottom -0.3em)
   with a matching padding-top so the masked text stays aligned with the base
   glyphs but the fill now reaches the ascenders/descenders (f top, t bottom). */
.t-shimmer:hover::before {
  content: attr(data-text);
  position: absolute;
  top: -0.3em;
  right: 0;
  bottom: -0.3em;
  left: 0;
  padding-top: 0.3em;
  pointer-events: none;
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    transparent 40%,
    var(--shimmer-highlight) 50%,
    transparent 60%,
    transparent 100%);
  background-size: var(--shimmer-band) 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: t-shimmer var(--shimmer-dur) var(--shimmer-ease) infinite;
}

@keyframes t-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .t-shimmer:hover::before {
    animation: none !important;
  }
}

/* Animated rainbow on hover for the logo name. */
.mark:hover .mark-name {
  background-image: linear-gradient(
    90deg,
    #ff0040,
    #ff9500,
    #ffe000,
    #1fd655,
    #18b6ff,
    #7b2cff,
    #ff0040);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: rainbow-slide 6s linear infinite;
}

@keyframes rainbow-slide {
  to {
    background-position: 200% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mark:hover .mark-name {
    animation: none;
  }
}

.hero-summary {
  justify-self: end;
  max-width: 430px;
  margin: 0;
  font-size: clamp(19px, 2.6vw, 27px);
  font-weight: 900;
  line-height: 1.02;
  text-align: right;
}

.hero-summary a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.hero-dark {
  display: grid;
  grid-template-columns: clamp(170px, 15vw, 224px) minmax(0, 1fr) minmax(320px, 24vw);
  width: 100%;
  margin: 0;
}

/* Big selected word: full-height vertical title on the left of the dark band. */
.qs-word {
  align-self: stretch;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  font-family: var(--font-display);
  font-size: clamp(100px, 13.5vw, 172px);
  line-height: 1;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.quickstart {
  position: relative;
  z-index: 1;
  /* Offset + negative spread keeps the shadow on the right (yellow panel)
     without the blur bleeding left onto the GRADLE/NATIVE word column. */
  box-shadow: 26px 0 34px -10px rgba(0, 0, 0, 0.5);
  display: grid;
  align-items: center;
  min-width: 0;
  /* Top padding clears the tab row; bottom is smaller so the card sits just
     below the tabs. Kept tight so the dark band stays within one screen. */
  padding: 104px clamp(22px, 3.4vw, 70px) 40px;
}

/* Visually-hidden radios hold the active-tab state; :has() drives the view. */
.qs-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.qs-w {
  display: none;
}

.hero-dark:has(#qs-gradle:checked) .qs-w-gradle,
.hero-dark:has(#qs-native:checked) .qs-w-native {
  display: block;
}

.qs-right {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 900px;
  min-width: 0;
  justify-self: center;
}

/* Tab switcher (quickstart-tabs.ftl). Equal-width tabs sized to the widest
   label keep the percentage-based indicator maths exact; the group shrinks to
   its content (width: max-content) so the bar's 100%/N tracks the tabs, not the
   surrounding column — which is what lets it stay aligned on mobile too. */
.qs-tabs {
  position: absolute;
  top: 28px;
  right: clamp(22px, 3.4vw, 70px);
  z-index: 2;
  display: flex;
  width: max-content;
}

.qs-tab {
  box-sizing: border-box;
  min-width: 5.4em;
  padding-top: 12px;
  border-top: 8px solid transparent;
  color: rgba(238, 244, 239, 0.5);
  font-size: 30px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
}

.qs-tab:hover {
  color: rgba(238, 244, 239, 0.82);
}

/* Active tab + indicator position both derive from the checked radio's index,
   so the component works for any tab count without per-id rules. */
.qs-tabs:has(.qs-radio:nth-of-type(1):checked) .qs-tab:nth-of-type(1),
.qs-tabs:has(.qs-radio:nth-of-type(2):checked) .qs-tab:nth-of-type(2),
.qs-tabs:has(.qs-radio:nth-of-type(3):checked) .qs-tab:nth-of-type(3),
.qs-tabs:has(.qs-radio:nth-of-type(4):checked) .qs-tab:nth-of-type(4) {
  color: #eef4ef;
}

/* Single yellow indicator that eases between tabs and squishes mid-slide. */
.qs-tab-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% / var(--tab-count, 2));
  height: 8px;
  background: var(--yellow);
  transform-origin: center;
  transition: left 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Distinct animation-names per index force the squish keyframe to restart on
   each switch (an identical animation value would not re-trigger). */
.qs-tabs:has(.qs-radio:nth-of-type(1):checked) .qs-tab-bar {
  left: 0;
  animation: bar-slide-1 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.qs-tabs:has(.qs-radio:nth-of-type(2):checked) .qs-tab-bar {
  left: calc(100% / var(--tab-count, 2));
  animation: bar-slide-2 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.qs-tabs:has(.qs-radio:nth-of-type(3):checked) .qs-tab-bar {
  left: calc(200% / var(--tab-count, 2));
  animation: bar-slide-3 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.qs-tabs:has(.qs-radio:nth-of-type(4):checked) .qs-tab-bar {
  left: calc(300% / var(--tab-count, 2));
  animation: bar-slide-4 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes bar-slide-1 { 50% { transform: scaleX(0.6); } }
@keyframes bar-slide-2 { 50% { transform: scaleX(0.6); } }
@keyframes bar-slide-3 { 50% { transform: scaleX(0.6); } }
@keyframes bar-slide-4 { 50% { transform: scaleX(0.6); } }

@media (prefers-reduced-motion: reduce) {
  .qs-tab-bar {
    transition: none;
    animation: none;
  }
}

.qs-tabs:has(.qs-radio:nth-of-type(1):focus-visible) .qs-tab:nth-of-type(1),
.qs-tabs:has(.qs-radio:nth-of-type(2):focus-visible) .qs-tab:nth-of-type(2),
.qs-tabs:has(.qs-radio:nth-of-type(3):focus-visible) .qs-tab:nth-of-type(3),
.qs-tabs:has(.qs-radio:nth-of-type(4):focus-visible) .qs-tab:nth-of-type(4) {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
}

/* Carbon-style code card: rounded corners, soft drop shadow, roomy padding. */
.qs-panel {
  display: none;
  overflow: hidden;
  border-radius: 8px;
  background: #171719;
  box-shadow: 0 20px 68px rgba(0, 0, 0, 0.55);
}

.hero-dark:has(#qs-gradle:checked) .qs-p-gradle,
.hero-dark:has(#qs-native:checked) .qs-p-native {
  display: block;
}

.qs-panel pre {
  padding: 22px 24px 24px;
  overflow-x: auto;
  color: #eef4ef;
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.62;
}

.qs-panel code {
  white-space: pre;
}

/* Gradle snippet wraps within the panel; long lines (e.g. the plugin version)
   drop to a hanging-indented continuation instead of overflowing the padding. */
.qs-p-gradle code {
  white-space: normal;
}

.qs-p-gradle .cl {
  display: block;
  white-space: pre-wrap;
  padding-left: 8ch;
  text-indent: -8ch;
}

.qs-p-gradle .nowrap {
  white-space: nowrap;
}

/* Gradle example carousel: a code card plus a right-hand dot navigator. The
   active dot wears a countdown ring that drains over the dwell interval; when
   it empties the carousel advances (see quickstart.js). The dark .qs-panel card
   visuals move to .ex-card so the panel itself can be a flex row [card | nav]. */
.qs-p-gradle {
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  gap: 18px;
  align-items: center;
  /* Grid items default to min-width:auto; without this the flex row refuses to
     shrink below the card's content width and the nav spills onto the yellow
     panel in the cramped band just above the mobile breakpoint. */
  min-width: 0;
}

.hero-dark:has(#qs-gradle:checked) .qs-p-gradle {
  display: flex;
}

.ex-card {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #171719;
  box-shadow: 0 20px 68px rgba(0, 0, 0, 0.55);
}

/* Frames overlap (absolute) so a short example doesn't reserve the tallest
   one's height, which had pushed the hero past one screen. The code area's
   height is set in px by quickstart.js (active frame + current flavour) and
   eases between examples; the top bar sits above it as a static sibling. */
.ex-frames {
  position: relative;
  transition: height 0.42s cubic-bezier(0.65, 0, 0.35, 1);
}

.ex-frame {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}

.ex-frame.is-active {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .ex-frames {
    transition: none;
  }
}

/* Window-style top bar shared by all frames: faint window dots, the active
   example name (set by quickstart.js), and the Kotlin/Groovy flavour toggle,
   divided from the code body so the card reads like an editor window. */
.ex-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.win-dots {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 7px;
}

.win-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.ex-title {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(238, 244, 239, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Gradle DSL flavour toggle: a compact segmented control pinned to the right of
   the top bar. Kotlin is the default; :has() swaps which code variant renders. */
.ex-flavor {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.flavor-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.flavor-opt {
  padding: 4px 12px;
  border-radius: 999px;
  color: rgba(238, 244, 239, 0.55);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.flavor-opt:hover {
  color: rgba(238, 244, 239, 0.85);
}

.ex-card:has(#flavor-kotlin:checked) .flavor-opt[for="flavor-kotlin"],
.ex-card:has(#flavor-groovy:checked) .flavor-opt[for="flavor-groovy"] {
  color: #171719;
  background: var(--yellow);
}

.ex-card:has(#flavor-kotlin:focus-visible) .flavor-opt[for="flavor-kotlin"],
.ex-card:has(#flavor-groovy:focus-visible) .flavor-opt[for="flavor-groovy"] {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* One code variant at a time; Kotlin shows by default. */
.ex-code.is-groovy {
  display: none;
}

.ex-card:has(#flavor-groovy:checked) .ex-code.is-kotlin {
  display: none;
}

.ex-card:has(#flavor-groovy:checked) .ex-code.is-groovy {
  display: block;
}

.ex-nav {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ex-dots {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ex-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(238, 244, 239, 0.55);
  cursor: pointer;
}

.ex-arrow:hover {
  color: #eef4ef;
}

/* Pure-CSS chevron so it rotates cleanly to point up/down (desktop column)
   or left/right (mobile row) without swapping glyphs. */
.ex-arrow .chev {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.ex-prev .chev {
  margin-top: 4px;
  transform: rotate(225deg);
}

.ex-next .chev {
  margin-bottom: 4px;
  transform: rotate(45deg);
}

.ex-dot {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* Solid white dot. The active one brightens; the ring is the only added mark,
   so once the countdown drains there is nothing left beneath it. */
.ex-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: translate(-50%, -50%);
  transition: background 0.2s ease;
}

.ex-dot.is-active::after {
  background: #fff;
}

.ex-dot .ring {
  width: 100%;
  height: 100%;
  fill: none;
  /* start the ring at 12 o'clock */
  transform: rotate(-90deg);
}

/* Thin draining outline with a ~1px gap to the dot; no track circle behind it. */
.ring-progress {
  --ring-circ: 31.42; /* 2 * pi * r, r = 5 */
  stroke: var(--yellow);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: var(--ring-circ);
  stroke-dashoffset: var(--ring-circ); /* drained (invisible) until active */
}

.ex-dot.is-active .ring-progress {
  animation: ex-ring-drain 15s linear forwards;
}

.qs-p-gradle.is-paused .ex-dot.is-active .ring-progress,
.qs-p-gradle.is-tab-hidden .ex-dot.is-active .ring-progress {
  animation-play-state: paused;
}

@keyframes ex-ring-drain {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: var(--ring-circ); }
}

.ex-dot:focus-visible,
.ex-arrow:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .ex-frame {
    transition: none;
  }

  .ex-dot.is-active .ring-progress {
    animation: none;
  }
}

/* Schematic --render-line-width guide: a dotted ruler in the right margin,
   marking the 120-column limit the code stays within. */
.tok-comment { color: rgba(238, 244, 239, 0.42); }
.tok-key { color: #eef4ef; }
.tok-fn { color: #eef4ef; }
.tok-task { color: #d2a8ff; }
.tok-str { color: var(--yellow); }
.tok-flag { color: var(--yellow); }
.tok-dim { color: rgba(238, 244, 239, 0.45); }
.tok-ok { color: #7ee787; font-weight: 800; }
.tok-bad { color: var(--yellow); font-weight: 800; }
.tok-add { color: #7ee787; }
.tok-del { color: #ff7b72; }

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.yellow-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 24px;
  padding: 30px;
  background: var(--yellow);
  color: #171719;
}

.stamp-stack {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.yellow-panel .stamp {
  font-family: var(--font-display);
  font-size: 126px;
  line-height: 0.72;
}

.stamp-rule {
  width: 136px;
  height: 1px;
  /* Sit below ZERO with a clear gap (its tight line-height puts the box bottom
     near the glyphs, so push the line down rather than up). */
  margin: 10px 0 2px;
  background: currentColor;
}

.yellow-panel .stamp-sub {
  font-family: var(--font-display);
  /* sized so the wider "sensible defaults" line fits on one line, about the
     width of the big ZERO above it */
  font-size: 32px;
  line-height: 0.92;
  text-align: center;
}

.yellow-panel p:last-child {
  max-width: 220px;
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.18;
  text-align: center;
}

.content {
  max-width: var(--max);
  margin: 0 auto;
  padding: 68px 28px 96px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(280px, 0.38fr);
  gap: 34px;
  align-items: end;
  margin-bottom: 24px;
}

h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 82px);
  font-weight: 900;
  line-height: 0.86;
  text-transform: uppercase;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.panel {
  border: 1px solid var(--rule);
  background: var(--paper-2);
  box-shadow: 0 18px 60px var(--shadow);
}

.code-panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-code);
  font-size: 12px;
  font-weight: 800;
}

.panel-head span:last-child {
  color: var(--muted);
}

.code-panel pre {
  padding: 18px 16px 20px;
  background: var(--code-bg);
  color: var(--code-fg);
  font-size: 13px;
  line-height: 1.62;
}

.code-panel code {
  white-space: pre;
}

.note-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 20px;
}

.note-panel h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.coordinate-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.coordinate-list div {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.coordinate-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.coordinate-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.coordinate-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-code);
  font-size: 13px;
  font-weight: 700;
}

.task-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  border: 1px solid var(--rule);
  background: var(--rule);
}

.task-strip article {
  min-height: 144px;
  padding: 20px;
  background: var(--paper-2);
}

.task-strip strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 900;
}

.task-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.architecture {
  margin-top: 76px;
}

.architecture-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.44fr);
  gap: 18px;
}

.flow {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.flow-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.flow-row:last-child {
  grid-template-columns: minmax(0, 1fr);
}

.flow-box {
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--rule);
  background: var(--paper);
}

.flow-box strong {
  font-size: 16px;
  font-weight: 900;
}

.flow-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.flow-arrow {
  display: grid;
  place-items: center;
  min-height: 104px;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--yellow);
}

.module-list {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.module-list h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.module-list code {
  display: inline-block;
  margin-right: 8px;
  color: var(--ink);
  font-weight: 800;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.link-button:hover {
  border-color: currentColor;
}

@media (max-width: 900px) {
  .site-nav {
    padding: 20px;
  }

  .nav-links a {
    display: none;
  }

  .hero {
    grid-template-rows: auto auto;
    min-height: auto;
  }

  .hero-paper,
  .hero-dark,
  .quickstart,
  .hero-headline {
    grid-template-columns: 1fr;
  }

  .hero-paper {
    padding: 104px 20px 34px;
  }

  .hero-dark {
    min-height: auto;
  }

  .quickstart {
    padding: 32px 20px;
  }

  .qs-word {
    display: none;
  }

  .qs-tabs {
    position: relative;
    top: auto;
    right: auto;
    margin: 0 auto 24px;
  }

  .qs-right {
    padding-top: 0;
  }

  /* Stack the carousel: code first, dot navigator below as a centered row. */
  .qs-p-gradle {
    flex-direction: column;
    gap: 16px;
  }

  .ex-card {
    width: 100%;
  }

  .ex-nav {
    flex-direction: row;
  }

  .ex-dots {
    flex-direction: row;
  }

  .ex-prev .chev {
    margin: 0 0 0 4px;
    transform: rotate(135deg);
  }

  .ex-next .chev {
    margin: 0 4px 0 0;
    transform: rotate(-45deg);
  }

  .content {
    padding: 54px 20px 78px;
  }

  .task-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero h1 {
    font-size: clamp(46px, 15vw, 64px);
  }

  .hero-summary {
    font-size: 18px;
  }

  .qs-word {
    font-size: 64px;
  }

  .command {
    width: 100%;
    white-space: normal;
  }

  .code-panel code {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
  }

  .section-head {
    gap: 14px;
  }

  h2 {
    font-size: 44px;
  }

  .flow-row {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    min-height: 24px;
    transform: rotate(90deg);
  }
}
