:root {
  --mist: #f4f5f7;
  --teal: #0b1f3a;
  --teal-deep: #071427;
  --gold: #d4a017;
  --gold-deep: #b8860b;
  --seal: #d4a017;
  --ink: #0e1116;
  --muted: #5a6270;
  --line: #d5d8de;
  --wash: #ebecef;
  --cream: #ffffff;
  --surface: #ffffff;
  --cta: var(--gold);
  --cta-ink: #0e1116;
  --header-h: 4.4rem;
  --edge: clamp(1.75rem, 20vw, 18rem);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 12px 28px rgba(11, 31, 58, 0.08);
  --shadow-tight: 0 6px 16px rgba(14, 17, 22, 0.08);
  --display: "Fraunces", "Georgia", serif;
  --ui: "Libre Franklin", "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 3.4rem);
}

body {
  margin: 0;
  background:
    radial-gradient(1000px 420px at 6% -10%, rgba(11, 31, 58, 0.08), transparent 55%),
    radial-gradient(800px 360px at 96% 4%, rgba(212, 160, 23, 0.08), transparent 48%),
    linear-gradient(180deg, #f5f8fa 0%, var(--mist) 40%, #e8eef2 100%);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 1.0625rem;
  line-height: 1.68;
}

img { max-width: 100%; height: auto; }

a { color: var(--teal); }
a:hover { color: var(--teal-deep); }

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: var(--edge);
  top: 0.5rem;
  z-index: 40;
  background: var(--teal);
  color: var(--cream);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.1rem;
  min-height: var(--header-h);
  padding: 0.55rem var(--edge);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 3px solid var(--teal);
  box-shadow: var(--shadow-tight);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-logo {
  width: 10.5rem;
  height: auto;
  background: #fff;
  padding: 0.15rem 0.35rem;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line);
}

.brand-mark {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.02rem, 2vw, 1.45rem);
  letter-spacing: -0.02em;
  color: var(--teal);
  white-space: nowrap;
}

.mobile-header-cta { display: none; }

.nav-toggle {
  margin-left: auto;
  border: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.48rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
}

.nav {
  display: none;
  align-items: center;
  gap: 0.95rem;
  flex-wrap: nowrap;
}

.nav.is-open {
  display: flex;
  flex: 1 0 100%;
  flex-wrap: wrap;
  padding: 0.85rem 0 0.35rem;
}

.nav a,
.nav summary {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.nav a.is-active { color: var(--teal); }

.nav-dropdown { position: relative; }
.nav-dropdown ul {
  margin: 0.4rem 0 0;
  padding: 0.55rem 0.2rem;
  list-style: none;
}

.badge-18 {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--seal);
  background: rgba(196, 43, 43, 0.1);
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.42rem 1.15rem;
  text-decoration: none;
  font-family: var(--ui);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.btn-primary,
.btn-play {
  background: var(--seal);
  color: var(--cta-ink);
  box-shadow: 0 8px 16px rgba(196, 43, 43, 0.28);
}

.btn-primary:hover,
.btn-play:hover {
  filter: brightness(1.06);
  color: var(--cta-ink);
}

.btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.mobile-header-cta.btn { display: none; }

/* Sticky-top TOC — text links, not chips / rail / numerals */
.page-toc--sticky,
.anchor-nav.page-toc--sticky {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 calc(-1 * var(--edge)) 0.85rem;
  padding: 0.55rem var(--edge);
  background: rgba(238, 243, 246, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.page-toc__head {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.page-toc__hint {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
}

.page-toc__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}

.page-toc--sticky .page-toc__link {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 650;
  padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
}

.page-toc--sticky .page-toc__link:hover { color: var(--teal); }

.page-toc--sticky .page-toc__link.is-active {
  color: var(--teal);
  border-bottom-color: var(--seal);
}

.anchor-nav:empty { display: none; }

.page {
  display: block;
  padding: 0;
}

#main {
  padding: 0 var(--edge) 3.2rem;
  min-width: 0;
}

.hero {
  padding: 1.8rem 0 1.15rem;
}

.hero:has(.hero-background),
.hero--mga {
  position: relative;
  isolation: isolate;
  margin: 0 calc(-1 * var(--edge)) 1rem;
  padding: 0;
  overflow: hidden;
  background: transparent;
  color: var(--ink);
}

.hero:has(.hero-background) .hero-stage,
.hero--mga .hero-stage {
  display: block;
  width: 100%;
  line-height: 0;
  background: transparent;
}

.hero:has(.hero-background) > .hero-background,
.hero--mga .hero-background,
.hero--mga .hero-banner {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  vertical-align: top;
  object-fit: cover;
  object-position: center center;
}

.hero:has(.hero-background) .kicker,
.hero--mga .kicker {
  padding: 1.1rem var(--edge) 0;
}

.hero:has(.hero-background) h1,
.hero--mga h1 {
  margin: 0.35rem var(--edge) 0.45rem;
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  color: var(--ink);
}

.hero:has(.hero-background) .lede,
.hero--mga .lede {
  max-width: 46rem;
  margin: 0 var(--edge) 1.2rem;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.45;
}

.kicker {
  margin: 0 0 0.4rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0;
  max-width: 46rem;
  font-size: 1.14rem;
}

.section { padding: 1.65rem 0; }

.section h2 {
  margin: 0 0 0.8rem;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.3vw, 1.95rem);
  font-weight: 600;
}

.section h3 {
  margin: 1.1rem 0 0.55rem;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
}

.prose p { margin: 0 0 1rem; }
.prose ul,
.prose ol { margin: 0 0 1rem; padding-left: 1.15rem; }

.note { color: var(--muted); font-size: 0.94rem; }
.scaffold-note { color: var(--muted); font-style: italic; }
.affiliate-note { color: var(--muted); font-size: 0.9rem; }

.table-scroll {
  overflow-x: auto;
  margin-bottom: 1.2rem;
}

.content-table,
.pay-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.94rem;
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-tight);
}

.content-table th,
.content-table td,
.pay-table th,
.pay-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--wash);
}

.pay-table thead th {
  background: var(--wash);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal);
}

.pay-table tr.is-current { background: rgba(10, 77, 92, 0.06); }
.yes { color: var(--teal); font-weight: 800; }

.pay-logos {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.pay-logos[data-grid-count="10"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pay-logo {
  margin: 0;
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.5rem 0.5rem;
  text-align: center;
  box-shadow: var(--shadow-tight);
}

.pay-logo img {
  width: 5.4rem;
  height: 2.35rem;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}

.pay-logo figcaption {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.pay-method {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.pay-method img {
  width: 3.15rem;
  height: 2rem;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 0.1rem;
}

.slot-grid {
  display: grid;
  gap: 0.7rem;
}

.slot-grid[data-grid-count="10"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.slot-card {
  margin: 0;
  background: var(--cream);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-tight);
}

.slot-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.slot-card figcaption {
  padding: 0.4rem 0.5rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.faq details {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.95rem;
  margin: 0 0 0.55rem;
  box-shadow: var(--shadow-tight);
  border-left: 3px solid var(--teal);
}

.faq summary {
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
}

.faq summary::marker { color: var(--seal); }

.faq details p { margin: 0.55rem 0 0.15rem; }

.author-portrait {
  margin: 0 auto 0.35rem;
  max-width: 11rem;
  text-align: center;
}

.author-portrait img {
  display: block;
  width: 100%;
  max-width: 11rem;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  background: var(--wash);
  box-shadow: var(--shadow);
  border: 3px solid #fff;
}

.author-portrait figcaption {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.author-intro {
  display: grid;
  gap: 1.25rem;
  align-items: start;
  margin: 0.4rem 0 1.4rem;
}

@media (min-width: 720px) {
  .author-intro {
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 1.75rem;
  }
  .author-portrait { margin: 0; }
}

.ranking-block h2 { margin-bottom: 0.75rem; }

.rank-cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.rank-card--row {
  display: grid;
  grid-template-columns: auto minmax(10rem, 1.3fr) minmax(0, 1fr) auto minmax(7rem, 0.9fr) auto;
  gap: 0.75rem 0.85rem;
  align-items: center;
  background: var(--cream);
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow-tight);
}

.rank-card__badge {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(11, 31, 58, 0.08);
  color: var(--teal);
  font-weight: 800;
}

.rank-card__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.rank-card__logo-link {
  display: flex;
  flex: 0 0 auto;
  text-decoration: none;
}

.rank-card__logo {
  width: 88px;
  height: 52px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 0.15rem;
}

.rank-card__name {
  margin: 0;
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.08rem;
}

.rank-card__stars {
  color: #c5d0d6;
  letter-spacing: 0.05em;
}

.rank-card__star.is-on { color: var(--seal); }

.rank-card__features {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.rank-card__pays {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  align-items: center;
}

.rank-card__pays img {
  width: 44px;
  height: 28px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px;
}

.rank-card__bonus {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.rank-card__bonus-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.rank-card__cta { justify-self: end; }
.rank-card__cta .btn { white-space: nowrap; }

.mga-author-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
  padding: 1.1rem 1.2rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  box-shadow: var(--shadow-tight);
}

.mga-author-card img {
  border-radius: 50%;
  width: 96px;
  height: 96px;
  object-fit: cover;
}

.site-footer {
  padding: 2.1rem var(--edge) 1.6rem;
  background:
    linear-gradient(180deg, rgba(11, 31, 58, 0.08), rgba(238, 243, 246, 0.5)),
    var(--wash);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 1.5rem;
}

.footer-logo {
  width: 11.5rem;
  border-radius: 10px;
  background: #fff;
  padding: 0.2rem 0.35rem;
}

.legal-line {
  margin: 1.4rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(10, 77, 92, 0.3);
}

.to-top.is-visible { display: block; }

@media (min-width: 861px) {
  .nav-toggle { display: none; }
  .nav { display: flex; margin-left: auto; }
  .nav-dropdown ul {
    position: absolute;
    right: 0;
    min-width: 15rem;
    background: var(--cream);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    box-shadow: var(--shadow);
  }
  .page-toc--sticky,
  .anchor-nav.page-toc--sticky { display: flex; }
}

@media (max-width: 860px) {
  :root { --edge: clamp(0.9rem, 6vw, 1.5rem); }

  .brand { flex: 1; min-width: 0; order: 0; }
  .brand-mark { display: none; }
  .mobile-header-cta,
  .mobile-header-cta.btn {
    display: inline-flex;
    order: 1;
  }
  .nav-toggle { order: 2; margin-left: 0.35rem; }

  .page-toc--sticky,
  .anchor-nav.page-toc--sticky { display: none !important; }

  .rank-cards { gap: 0.65rem; }

  .rank-card--row {
    position: relative;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    padding: 0.85rem 0.9rem 0.95rem;
    text-align: center;
  }

  .rank-card__badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    z-index: 1;
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.78rem;
  }

  .rank-card__brand {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding-top: 0.15rem;
  }

  .rank-card__id { text-align: center; }

  .rank-card__logo,
  .rank-card__logo-link .rank-card__logo {
    width: 7.25rem;
    height: 2.65rem;
  }

  .rank-card__name { font-size: 0.98rem; }
  .rank-card__stars { font-size: 0.85rem; }
  .rank-card__features { display: none; }

  .rank-card__pays {
    grid-column: 1;
    grid-row: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .rank-card__bonus {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
    font-size: 0.88rem;
  }

  .rank-card__cta {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }

  .rank-card__cta .btn {
    display: flex;
    width: 100%;
    justify-content: center;
  }

  .pay-logos[data-grid-count="10"],
  .slot-grid[data-grid-count="10"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid { grid-template-columns: 1fr; }

  .table-scroll--pay { overflow: visible; }
  .table-scroll--pay table {
    min-width: 0;
    width: 100%;
    display: block;
    background: transparent;
    box-shadow: none;
  }
  .table-scroll--pay thead { display: none; }
  .table-scroll--pay tbody { display: block; }
  .table-scroll--pay tr {
    display: grid;
    grid-template-columns: minmax(7rem, 1.15fr) 1fr 1fr;
    grid-template-areas:
      "method a b"
      "method c d";
    align-items: center;
    column-gap: 0.45rem;
    row-gap: 0.3rem;
    margin: 0 0 0.55rem;
    padding: 0.65rem 0.75rem;
    background: var(--cream);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-tight);
  }
  .table-scroll--pay th,
  .table-scroll--pay td {
    display: block;
    width: auto;
    border: 0;
    padding: 0;
    white-space: normal;
  }
  .table-scroll--pay td:first-child {
    grid-area: method;
    font-weight: 800;
  }
  .table-scroll--pay td:nth-child(2) { grid-area: a; }
  .table-scroll--pay td:nth-child(3) { grid-area: b; }
  .table-scroll--pay td:nth-child(4) { grid-area: c; }
  .table-scroll--pay td:nth-child(5) { grid-area: d; }
  .table-scroll--pay td:nth-child(n+6) { display: none; }
  .table-scroll--pay td + td::before {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 0.05rem;
  }
  .table-scroll--pay tbody tr td:nth-child(2)::before { content: "Talletus"; }
  .table-scroll--pay tbody tr td:nth-child(3)::before { content: "Kotiutus"; }
  .table-scroll--pay tbody tr td:nth-child(4)::before { content: "Nopeus"; }
  .table-scroll--pay tbody tr td:nth-child(5)::before { content: "Kulut"; }

  .mga-author-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}


/* Logo plate: black mark needs clear edge on light header */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}
.brand-logo {
  height: 2.6rem;
  width: auto;
  max-width: 11.5rem;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
  box-shadow: 0 0 0 1px rgba(212, 160, 23, 0.35);
}
.footer-logo {
  height: 2.8rem;
  width: auto;
  max-width: 12rem;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
}
.btn-primary, .rank-card .btn-primary {
  background: var(--gold);
  color: var(--cta-ink);
  border-color: var(--gold-deep);
}
.btn-primary:hover {
  background: var(--gold-deep);
  color: #fff;
}
