/* ───────────────────────────────────────────────────────
   Loom docs — design tokens
   Dark theme first, light via html.light
   ─────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  --bg:         #0a0a0f;
  --bg-2:       #0e0e16;
  --surface:    #12121a;
  --surface-2:  #1c1c28;
  --border:     #242434;
  --border-2:   #2e2e42;

  --text:       #e8e8ee;
  --text-dim:   #9898a8;
  --text-muted: #6a6a7a;

  --brand:      #7c6ff0;
  --brand-2:    #a78bfa;
  --brand-glow: rgba(124, 111, 240, 0.25);
  --accent:     #f97066;
  --ok:         #4ade80;

  --code-bg:    #07070d;
  --code-border:#1c1c28;

  --tok-comment: #6a6a7a;
  --tok-keyword: #c58af9;
  --tok-type:    #7dd3fc;
  --tok-func:    #a78bfa;
  --tok-value:   #fbbf24;
  --tok-string:  #86efac;

  --shadow-sm:  0 1px 2px rgba(0,0,0,.3);
  --shadow-md:  0 8px 24px rgba(0,0,0,.4);
  --shadow-lg:  0 24px 64px rgba(0,0,0,.5);

  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;

  --wrap:       1120px;
  --wrap-narrow: 780px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
               Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas,
               "JetBrains Mono", "Fira Code", monospace;
}

html.light {
  color-scheme: light;

  --bg:         #fafaf8;
  --bg-2:       #f4f4f2;
  --surface:    #ffffff;
  --surface-2:  #f4f4f2;
  --border:     #e6e6e2;
  --border-2:   #d4d4cf;

  --text:       #18181e;
  --text-dim:   #52525e;
  --text-muted: #82828e;

  --brand:      #5a4be0;
  --brand-2:    #7c6ff0;
  --brand-glow: rgba(90, 75, 224, 0.18);
  --accent:     #e4564c;

  --code-bg:    #f7f7f4;
  --code-border:#e6e6e2;

  --tok-comment: #82828e;
  --tok-keyword: #8b5cf6;
  --tok-type:    #0284c7;
  --tok-func:    #7c3aed;
  --tok-value:   #d97706;
  --tok-string:  #059669;
}

/* ───────────────────────────────────────────────────────
   Reset + base
   ─────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse 800px 400px at 50% -100px, var(--brand-glow), transparent 60%);
  background-repeat: no-repeat;
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.125rem; }
h4 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }

p { margin: 0 0 1em; }

a {
  color: var(--brand-2);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--brand); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px; }

code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text);
}

pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-x: auto;
  color: var(--text);
  tab-size: 4;
}

pre code { background: none; border: none; padding: 0; font-size: inherit; }

ul, ol { padding-left: 1.3rem; margin: 0 0 1em; }
li { margin: 0.2em 0; }

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: white;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ───────────────────────────────────────────────────────
   Layout
   ─────────────────────────────────────────────────────── */

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}
.wrap.narrow { max-width: var(--wrap-narrow); }
.wrap.center { text-align: center; }
.wrap.center .cta { justify-content: center; }

.section {
  padding: clamp(60px, 9vw, 120px) 0;
  border-top: 1px solid var(--border);
}
.section.surface { background: var(--bg-2); }
.section.tight { padding: clamp(48px, 6vw, 80px) 0; }

/* Scroll-in reveal via Stick.js intersect (progressive enhancement).
   Sections are visible by default — no opacity trickery. When intersect
   fires, .in-view adds a subtle translate-up with no opacity change,
   so content NEVER disappears, even when Stick.js fails to load. */
section.in-view {
  animation: reveal .5s ease;
}
@keyframes reveal {
  from { transform: translateY(10px); }
  to   { transform: none; }
}

/* ───────────────────────────────────────────────────────
   Header
   ─────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: white;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.brand-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--accent);
  color: white;
}

.site-nav {
  display: flex;
  gap: 24px;
  flex: 1;
}
.site-nav a {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

.site-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.05rem;
  transition: background .15s ease, border-color .15s ease;
}
.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
}

/* ───────────────────────────────────────────────────────
   Buttons
   ─────────────────────────────────────────────────────── */

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease,
              border-color .15s ease, box-shadow .15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.primary-btn,
a.primary-btn,
a.primary-btn:hover,
a.primary-btn:visited {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px -4px var(--brand-glow);
}
.primary-btn:hover,
a.primary-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
  color: #ffffff;
  box-shadow: 0 8px 28px -6px var(--brand-glow);
  filter: brightness(1.08);
}

.ghost-btn,
a.ghost-btn,
a.ghost-btn:visited {
  background: transparent;
  border-color: var(--border-2);
  color: var(--text);
}
.ghost-btn:hover,
a.ghost-btn:hover {
  background: var(--surface-2);
  border-color: var(--brand);
  color: var(--text);
  text-decoration: none;
}

/* ───────────────────────────────────────────────────────
   Hero
   ─────────────────────────────────────────────────────── */

.hero {
  padding: clamp(80px, 12vw, 140px) 0 clamp(60px, 8vw, 100px);
  border-top: 0;
}
.hero .wrap { max-width: 920px; }

.eyebrow {
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--brand-2);
  font-weight: 700;
  margin: 0 0 1rem;
}

h1 {
  margin-top: 0;
  margin-bottom: 1.2rem;
  letter-spacing: -0.035em;
}
.grad {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--text-dim);
  max-width: 62ch;
  margin-bottom: 2rem;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.cta.center { justify-content: center; }

.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.93rem;
  margin-bottom: 2.5rem;
}
.alert strong { color: var(--accent); white-space: nowrap; }
.alert em { color: var(--text-dim); font-style: normal; font-weight: 600; }

.hero-code {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
}
@media (min-width: 820px) {
  .hero-code { grid-template-columns: 1.2fr 1fr; }
}

.hero-code pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}

/* Terminal mock */
.terminal {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.term-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.term-head .dot {
  width: 11px; height: 11px; border-radius: 50%;
  display: inline-block;
}
.term-head .dot.r { background: #ff5f57; }
.term-head .dot.y { background: #febc2e; }
.term-head .dot.g { background: #28c840; }
.term-head .term-title {
  margin-left: 8px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.term-body {
  padding: 18px 22px;
  color: #c8c8d2;
  font-size: 12.5px;
  line-height: 1.7;
  flex: 1;
}

/* ───────────────────────────────────────────────────────
   Feature grid
   ─────────────────────────────────────────────────────── */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 3rem;
}

.card {
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}
.card-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
  line-height: 1;
}
.card h3 {
  font-size: 1.1rem;
  margin-bottom: .6rem;
  color: var(--text);
}
.card p {
  font-size: 0.92rem;
  color: var(--text-dim);
  margin: 0;
}

/* ───────────────────────────────────────────────────────
   Pipeline viz
   ─────────────────────────────────────────────────────── */

.pipeline {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 18px;
  margin-top: 3rem;
}
@media (min-width: 900px) {
  .pipeline {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
  }
}

.stage {
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease,
              box-shadow .2s ease;
}
.stage:hover {
  border-color: var(--brand);
}
.stage.pulse {
  animation: pulse .9s ease;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--brand-glow); }
  50%  { box-shadow: 0 0 0 16px transparent; border-color: var(--brand-2); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.stage-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-glow);
  color: var(--brand-2);
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 14px;
}
.stage h3 { margin-bottom: .5em; }
.stage p { font-size: 0.92rem; color: var(--text-dim); margin: 0 0 14px; }
.stage-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  color: var(--ok);
}

.arrow {
  text-align: center;
  font-size: 1.6rem;
  color: var(--brand);
  opacity: .8;
}
@media (max-width: 899px) {
  .arrow { transform: rotate(90deg); }
}

.hint {
  margin-top: 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 2px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-right: 6px;
  color: var(--text-dim);
}

/* ───────────────────────────────────────────────────────
   Tabs (target codegen panels)
   ─────────────────────────────────────────────────────── */

/* Hidden radio inputs that drive the tab state. Visually hidden but
   still focusable via keyboard so the tabs remain accessible. */
.tab-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 3rem;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: fit-content;
  max-width: 100%;
}

.tab {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 0;
  padding: 9px 20px;
  border-radius: 7px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
  transition: background .15s ease, color .15s ease;
}
.tab:hover { color: var(--text); }

/* Active-tab styling: driven by which radio is :checked. The `~` combinator
   selects the .tabs div that comes after the checked input among siblings,
   then descends to the matching label. */
#t-rust:checked ~ .tabs label[for="t-rust"],
#t-ts:checked   ~ .tabs label[for="t-ts"],
#t-go:checked   ~ .tabs label[for="t-go"],
#t-wasm:checked ~ .tabs label[for="t-wasm"] {
  background: var(--brand);
  color: #ffffff;
}

/* Keyboard focus indicator — :has() lights up the label whose hidden
   radio currently has focus, so tab navigation stays visible. */
#targets:has(#t-rust:focus-visible) .tabs label[for="t-rust"],
#targets:has(#t-ts:focus-visible)   .tabs label[for="t-ts"],
#targets:has(#t-go:focus-visible)   .tabs label[for="t-go"],
#targets:has(#t-wasm:focus-visible) .tabs label[for="t-wasm"] {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
}

.panels {
  margin-top: 1.2rem;
}
.panel {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
/* Panel visibility: driven purely by which radio is :checked. */
#t-rust:checked ~ .panels #panel-rust,
#t-ts:checked   ~ .panels #panel-ts,
#t-go:checked   ~ .panels #panel-go,
#t-wasm:checked ~ .panels #panel-wasm {
  display: block;
}

.panel-hint {
  padding: 14px 24px 20px;
  margin: 0;
  color: var(--text-dim);
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* ───────────────────────────────────────────────────────
   Code blocks
   ─────────────────────────────────────────────────────── */

.code-block {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 20px;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 8px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.code-block pre {
  padding: 20px 24px;
  overflow-x: auto;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text-dim);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.copy-btn:hover {
  color: var(--text);
  border-color: var(--brand);
}
.copy-btn.flash {
  animation: flash .7s ease;
}
@keyframes flash {
  0%   { background: var(--brand); color: white; border-color: var(--brand); }
  60%  { background: var(--brand); color: white; border-color: var(--brand); }
  100% { background: transparent; color: var(--text-dim); border-color: var(--border-2); }
}

/* Token coloring */
.lang-loom, .lang-rust, .lang-ts, .lang-go, .lang-wasm {
  color: var(--text);
}
.c  { color: var(--tok-comment); font-style: italic; }
.k  { color: var(--tok-keyword); font-weight: 600; }
.t  { color: var(--tok-type); }
.f  { color: var(--tok-func); }
.v  { color: var(--tok-value); }
.s  { color: var(--tok-string); }

/* ───────────────────────────────────────────────────────
   Examples gallery
   ─────────────────────────────────────────────────────── */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 3rem;
}
@media (min-width: 840px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-2 .wide { grid-column: 1 / -1; }
}

.ex-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px 22px 6px;
  transition: border-color .2s ease;
}
.ex-card[open] { border-color: var(--brand); }
.ex-card:hover { border-color: var(--border-2); }

.ex-card summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  user-select: none;
}
.ex-card summary::-webkit-details-marker { display: none; }
.ex-card summary::after {
  content: '+';
  margin-left: auto;
  font-size: 1.4rem;
  color: var(--text-dim);
  transition: transform .2s ease;
  font-family: var(--font-mono);
  line-height: 1;
}
.ex-card[open] summary::after { content: '−'; }

.ex-num {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--brand-glow);
  color: var(--brand-2);
  font-family: var(--font-mono);
  font-weight: 700;
  flex-shrink: 0;
}
.ex-title {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
}
.ex-file {
  margin-left: auto;
  margin-right: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
@media (max-width: 640px) {
  .ex-file { display: none; }
}

.ex-card > p,
.ex-card > pre {
  margin: 0 0 14px;
}
.ex-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
}
.ex-card pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
}
.ex-card .run {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  padding-bottom: 18px;
}
.ex-card .run strong {
  color: var(--ok);
}

/* ───────────────────────────────────────────────────────
   Quickstart steps
   ─────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  counter-reset: step;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 56px;
  margin-bottom: 36px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-glow);
  color: var(--brand-2);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  border: 1px solid var(--brand);
}
.steps h3 { margin-bottom: 14px; }

.cmd-list {
  list-style: none;
  padding: 0;
}
.cmd-list li {
  padding: 8px 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  border-bottom: 1px dashed var(--border);
}
.cmd-list li:last-child { border-bottom: 0; }
.cmd-list code {
  color: var(--brand-2);
}

/* ───────────────────────────────────────────────────────
   Footer
   ─────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 60px 0 40px;
}
.foot-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 720px) {
  .foot-cols { grid-template-columns: 1fr; gap: 28px; }
}
.foot-cols h4 { color: var(--text); margin-bottom: 14px; }
.foot-cols ul {
  list-style: none;
  padding: 0;
}
.foot-cols ul li { margin: 6px 0; }
.foot-cols ul a {
  color: var(--text-dim);
  font-size: 0.92rem;
}
.foot-cols ul a:hover { color: var(--brand-2); text-decoration: none; }

.foot-base {
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.foot-base p { margin: 0 0 .4em; }
.foot-base p:last-child { margin-bottom: 0; }
.muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.made-by {
  margin-top: 12px !important;
}
.made-by a {
  color: var(--brand-2);
  font-weight: 600;
}
.made-by a:hover {
  color: var(--brand);
  text-decoration: underline;
}

/* ───────────────────────────────────────────────────────
   Back-to-top button
   ─────────────────────────────────────────────────────── */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  border: 0;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .15s ease;
  z-index: 40;
}
.to-top.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.to-top:hover {
  background: var(--brand-2);
}

/* ───────────────────────────────────────────────────────
   Reduced motion
   ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  section[data-stick] { opacity: 1; transform: none; }
}
