:root {
  --bg:        oklch(98% 0.003 250);
  --surface:   oklch(95% 0.005 250);
  --surface-2: oklch(92% 0.007 250);
  --ink:       oklch(18% 0.015 250);
  --ink-soft:  oklch(32% 0.018 250);
  --muted:     oklch(52% 0.015 250);
  --line:      oklch(from var(--ink) l c h / 0.12);
  --accent:    oklch(52% 0.18 25);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --step--1: clamp(0.85rem, 0.82rem + 0.15vw, 0.9rem);
  --step-0:  clamp(0.95rem, 0.92rem + 0.2vw, 1rem);
  --step-1:  clamp(1.1rem, 1.05rem + 0.3vw, 1.2rem);
  --step-2:  clamp(1.35rem, 1.25rem + 0.5vw, 1.55rem);
  --step-3:  clamp(1.7rem, 1.5rem + 1vw, 2.1rem);
  --step-4:  clamp(2.1rem, 1.8rem + 1.6vw, 2.8rem);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 200ms;

  --maxw: 1120px;

  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        oklch(15% 0.012 250);
    --surface:   oklch(19% 0.015 250);
    --surface-2: oklch(23% 0.018 250);
    --ink:       oklch(95% 0.008 250);
    --ink-soft:  oklch(80% 0.012 250);
    --muted:     oklch(60% 0.015 250);
    --line:      oklch(from var(--ink) l c h / 0.14);
    --accent:    oklch(68% 0.18 25);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: oklch(from var(--accent) calc(l - 0.08) c h); }

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 var(--space-4); color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25em; color: var(--ink-soft); }
li { margin-bottom: var(--space-2); }

strong { color: var(--ink); font-weight: 600; }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-10) 0; }

::selection { background: var(--accent); color: white; }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }

/* Container */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--space-6); }
}

.container--tight {
  max-width: 760px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--bg) l c h / 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 56px;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.site-logo:hover { color: var(--ink); }
.site-logo img { border-radius: 5px; }

.site-nav {
  display: none;
  align-items: center;
  gap: var(--space-5);
}
.site-nav a {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--ink); }

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface); }

@media (min-width: 768px) {
  .site-nav { display: inline-flex; }
  .nav-toggle { display: none; }
}

.site-nav.open {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  padding: var(--space-2);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-nav.open a {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
}
.site-nav.open a:hover { background: var(--surface); }

/* ─── Homepage layout ─── */
.intro {
  padding: var(--space-12) 0 var(--space-8);
}
.intro__row {
  display: grid;
  gap: var(--space-8);
  align-items: end;
}
@media (min-width: 880px) {
  .intro__row { grid-template-columns: 2fr 1fr; gap: var(--space-12); }
}
.intro h1 {
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3rem);
  letter-spacing: -0.025em;
  margin-bottom: var(--space-3);
  max-width: 18ch;
}
.intro__lead {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
}
.intro__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: 0.88rem;
  color: var(--muted);
}
.intro__meta span { display: flex; gap: var(--space-2); align-items: center; }
.intro__meta i { color: var(--accent); width: 14px; text-align: center; }

/* Lottery grid */
.tools {
  padding: var(--space-6) 0 var(--space-16);
}
.tools__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.tools__head h2 {
  font-size: var(--step-2);
  margin: 0;
}
.tools__count {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 640px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tool-card:hover {
  border-color: var(--tc-color, var(--accent));
  background: var(--bg);
  transform: translateY(-1px);
  color: var(--ink);
}
.tool-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.tool-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tc-color, var(--accent));
  color: white;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}
.tool-card__arrow {
  color: var(--muted);
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tool-card:hover .tool-card__arrow {
  color: var(--tc-color, var(--accent));
  transform: translateX(2px);
}
.tool-card__name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.tool-card__rule {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
}

/* Content section */
.content {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--line);
}
.content + .content { padding-top: var(--space-12); }

.content__head {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.content__head h2 {
  font-size: var(--step-2);
  margin: 0;
}
.content__head .badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 2px var(--space-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.content__body {
  max-width: 70ch;
}
.content__body p {
  margin-bottom: var(--space-4);
}
.content__body h3 {
  margin-top: var(--space-8);
  font-size: var(--step-1);
  font-weight: 600;
}
.content__body h3:first-child { margin-top: 0; }

/* Comparison table */
.compare-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--bg);
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.compare th, .compare td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}
.compare th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface);
}
.compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody tr:hover { background: var(--surface); }
.compare .lottery-name { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 500; color: var(--ink); }
.compare .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.compare .num { font-family: var(--font-mono); font-feature-settings: "tnum" 1; color: var(--ink); }

/* ─── Generator page ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-5) 0 var(--space-2);
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--font-mono);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb i { font-size: 9px; opacity: 0.5; }

.tool-header {
  padding: var(--space-6) 0 var(--space-8);
}
.tool-header__row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.tool-header__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--tc-color, var(--accent));
  color: white;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.tool-header h1 {
  margin: 0;
  font-size: var(--step-3);
  letter-spacing: -0.02em;
}
.tool-header__lead {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 var(--space-6);
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 720px) {
  .facts { grid-template-columns: repeat(5, 1fr); }
}
.fact {
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.fact__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 500;
}
.fact__value {
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 500;
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
}

/* Form */
.gen-form {
  margin: var(--space-8) 0 var(--space-6);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.gen-form__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
@media (min-width: 640px) {
  .gen-form__row {
    flex-direction: row;
    align-items: end;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}
.form-group select {
  appearance: none;
  width: 100%;
  height: 44px;
  padding: 0 var(--space-8) 0 var(--space-3);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}
.form-group select:focus {
  outline: none;
  border-color: var(--tc-color, var(--accent));
  box-shadow: 0 0 0 3px oklch(from var(--tc-color, var(--accent)) l c h / 0.15);
}

.form-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  font: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--primary {
  background: var(--tc-color, var(--ink));
  color: white;
}
.btn--primary:hover {
  background: oklch(from var(--tc-color, var(--ink)) calc(l - 0.06) c h);
  color: white;
}
.btn--ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}
.btn--ghost:hover {
  background: var(--surface);
  color: var(--ink);
}

/* Results */
.results {
  display: none;
  margin-bottom: var(--space-10);
  scroll-margin-top: 80px;
}
.results.is-active { display: block; }

.results__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}
.results__title {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: 0.95rem;
  margin: 0;
  font-weight: 600;
}
.results__title span {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}
.results__hint {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 640px) { .result-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .result-grid { grid-template-columns: repeat(3, 1fr); } }

.result {
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease);
}
.result:hover { border-color: var(--tc-color, var(--accent)); }
.result__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
}
.result__id {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.result__copy {
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.result__copy:hover { background: var(--surface-2); color: var(--ink); }

.balls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.ball {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tc-color, var(--ink));
  color: white;
  font-weight: 600;
  font-size: 0.88rem;
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
}
.ball--secondary {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
}
.balls__group { width: 100%; }
.balls__group + .balls__group { margin-top: var(--space-3); }
.balls__group-label {
  display: block;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.column-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.column-stack__label {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Reel (roleta) */
.reel {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: oklch(from var(--tc-color, var(--accent)) l c h / 0.06);
  border: 1px solid oklch(from var(--tc-color, var(--accent)) l c h / 0.25);
  border-radius: var(--radius-sm);
}
.reel__label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: var(--space-2);
}
.reel__label i { color: var(--tc-color, var(--accent)); }
.reel__viewport {
  position: relative;
  height: 28px;
  overflow: hidden;
  border-radius: 4px;
}
.reel__strip {
  position: absolute;
  inset: 0 auto auto 0;
  display: flex;
  flex-direction: column;
}
.reel__item {
  height: 28px;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--tc-color, var(--ink));
  white-space: nowrap;
}
.reel__strip.is-spinning {
  animation: reelSpin 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes reelSpin {
  0%   { transform: translateY(0); }
  100% { transform: translateY(var(--reel-stop, -560px)); }
}
@media (prefers-reduced-motion: reduce) {
  .reel__strip.is-spinning { animation-duration: 0.01ms; }
}

/* Info section (after generator) */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 980px) {
  .info-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: var(--space-10); }
}

.info-aside {
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  align-self: start;
}
@media (min-width: 980px) {
  .info-aside { position: sticky; top: 76px; }
}
.info-aside h4 {
  margin: 0 0 var(--space-3);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.info-aside dl { margin: 0; display: grid; gap: var(--space-3); }
.info-aside dt {
  font-size: 0.78rem;
  color: var(--muted);
}
.info-aside dd {
  margin: 2px 0 var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-feature-settings: "tnum" 1;
}
.info-aside dd:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

/* Notice */
.notice {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: var(--space-4) 0;
}
.notice i { color: var(--accent); margin-top: 3px; flex-shrink: 0; }

/* Probability table */
.prob-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--bg);
  margin: var(--space-4) 0 var(--space-6);
}
.prob {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.prob th, .prob td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.prob th {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface);
}
.prob tbody tr:last-child td { border-bottom: 0; }
.prob tbody tr:hover { background: var(--surface); }
.prob .num { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }

/* FAQ */
.faq {
  display: grid;
  gap: var(--space-2);
}
.faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-3) var(--space-4);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary i {
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform var(--dur) var(--ease);
  flex-shrink: 0;
}
.faq__item[open] summary i { transform: rotate(180deg); }
.faq__item p {
  padding: 0 var(--space-4) var(--space-4);
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0;
}

/* Tips list */
.tips-list {
  display: grid;
  gap: var(--space-4);
  padding: 0;
  list-style: none;
  counter-reset: tip;
}
.tips-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: tip;
  margin: 0;
}
.tips-list li::before {
  content: counter(tip, decimal-leading-zero);
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.6;
}
.tips-list strong {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 600;
  color: var(--ink);
}
.tips-list span {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Related */
.related {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--line);
}
.related h2 {
  font-size: var(--step-2);
  margin-bottom: var(--space-5);
}

/* Page header for institutional */
.page-head {
  padding: var(--space-10) 0 var(--space-6);
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-size: var(--step-3);
  margin-bottom: var(--space-3);
  max-width: 22ch;
}
.page-head p {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
}

/* Footer */
.site-footer {
  margin-top: var(--space-16);
  padding: var(--space-10) 0 var(--space-6);
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: var(--space-10); }
}
.footer-brand p {
  margin: var(--space-3) 0 0;
  max-width: 42ch;
  color: var(--ink-soft);
}
.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: var(--space-3);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.footer-col a {
  color: var(--ink-soft);
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 0.8rem;
  color: var(--muted);
}
@media (min-width: 720px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* Cookie banner */
.cookie {
  position: fixed;
  inset: auto var(--space-3) var(--space-3) var(--space-3);
  z-index: 60;
  padding: var(--space-4);
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.4);
  transform: translateY(150%);
  transition: transform 400ms var(--ease);
  max-width: 440px;
  margin-inline: auto;
  font-size: 0.88rem;
}
.cookie.show { transform: translateY(0); }
.cookie p { color: oklch(from var(--bg) l c h / 0.85); margin-bottom: var(--space-3); }
.cookie a { color: var(--bg); text-decoration: underline; }
.cookie__btns { display: flex; gap: var(--space-2); }
.cookie__btns button {
  flex: 1;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid oklch(from var(--bg) l c h / 0.2);
  background: transparent;
  color: var(--bg);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.cookie__btns button:hover { background: oklch(from var(--bg) l c h / 0.1); }
.cookie__btns .accept {
  background: var(--bg);
  color: var(--ink);
}
.cookie__btns .accept:hover { background: oklch(from var(--bg) calc(l - 0.05) c h); }

/* Toast */
.toast {
  position: fixed;
  bottom: var(--space-5);
  left: 50%;
  z-index: 80;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.3);
  transform: translate(-50%, 80px);
  opacity: 0;
  animation: toastIn 200ms var(--ease) forwards;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.toast.out { animation: toastOut 250ms var(--ease) forwards; }
@keyframes toastIn { to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes toastOut { to { transform: translate(-50%, 80px); opacity: 0; } }

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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