:root {
  --bg: #f7f5f2;
  --surface: #ffffff;
  --text: #1c1a17;
  --muted: #6b655d;
  --border: #e3ddd4;
  --accent: #c2410c;
  --accent-text: #ffffff;
  --track: #ece6dd;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --surface: #1c1a18;
    --text: #f2eee8;
    --muted: #a39b90;
    --border: #2f2b27;
    --accent: #f97316;
    --accent-text: #1a0e05;
    --track: #2b2723;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.proto-banner {
  background: var(--text);
  color: var(--bg);
  text-align: center;
  font-size: .8rem;
  padding: .35rem 1rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}
.logo { font-weight: 800; font-size: 1.4rem; letter-spacing: .08em; text-decoration: none; color: var(--accent); }
.site-header nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.site-header nav a:hover { color: var(--text); }

main { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

.hero { padding: 3rem 0 2rem; }
.eyebrow { color: var(--accent); font-weight: 600; margin: 0 0 .5rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 18ch; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 55ch; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0 2rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin: 0;
}
.stats div { border-top: 2px solid var(--border); padding-top: .5rem; }
.stats dt { color: var(--muted); font-size: .85rem; }
.stats dd { margin: 0; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { border-color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }

.section { padding: 2.5rem 0; border-top: 1px solid var(--border); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }

.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1rem; }
.way { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.way p { color: var(--muted); margin: 0; }
.way small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.way-n { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700; margin-bottom: .75rem; }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: .35rem .85rem; font: inherit; font-size: .875rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-btn { all: unset; display: block; cursor: pointer; width: 100%; height: 100%; }
.card-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.card:hover { border-color: var(--muted); }
.card-body { padding: 1rem; }
.summary { font-size: .925rem; margin: .5rem 0 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .825rem; color: var(--muted); margin-top: .5rem; font-variant-numeric: tabular-nums; }
.card-meta strong { color: var(--text); }

.poster {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 75% 30%, hsl(var(--h) 80% 65% / .9), transparent 55%),
    linear-gradient(135deg, hsl(var(--h) 55% 22%), hsl(calc(var(--h) + 40) 45% 12%));
  display: flex;
  align-items: end;
  padding: .75rem;
}
.poster span { background: rgb(0 0 0 / .5); color: #fff; font-size: .75rem; padding: .2rem .55rem; border-radius: 999px; }
.poster-lg { border-radius: 10px; margin-bottom: 1rem; }

.bar { height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; margin: .5rem 0; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

.allies { display: grid; gap: .75rem; margin-top: 1rem; }
.ally { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.ally h3, .ally p { margin: 0; }
.ally-deal { font-size: .9rem; }
@media (max-width: 640px) {
  .ally { grid-template-columns: 1fr; gap: .5rem; }
}

dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 1.5rem;
}
dialog::backdrop { background: rgb(0 0 0 / .55); }
.dialog-close { position: sticky; top: 0; display: flex; justify-content: end; height: 0; }
.dialog-close button { border: 0; background: var(--bg); color: var(--text); width: 2rem; height: 2rem; border-radius: 50%; font-size: 1.25rem; cursor: pointer; transform: translate(.5rem, -.5rem); }

.tiers { display: grid; gap: .6rem; }
.tier { display: grid; gap: .15rem; text-align: left; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 10px; padding: .85rem 1rem; font: inherit; cursor: pointer; }
.tier:hover { border-color: var(--accent); }
.tier-amount { font-weight: 700; color: var(--accent); }
.tier-name { font-weight: 600; }

.notice { background: var(--bg); border-left: 3px solid var(--accent); padding: .75rem 1rem; border-radius: 6px; }

#code-form { display: grid; gap: .5rem; margin: 1rem 0; }
#code-form label { font-weight: 600; font-size: .9rem; }
select { font: inherit; padding: .6rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.code-box { display: flex; gap: .75rem; align-items: center; justify-content: space-between; background: var(--bg); border: 1px dashed var(--accent); border-radius: 10px; padding: .75rem 1rem; flex-wrap: wrap; }
.bar-wrap { position: relative; }
.bar-wrap .bar { margin: .5rem 0; }
.mark { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text); border-radius: 1px; }
.mark-threshold { background: var(--muted); }
.bar-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: var(--muted); }
.bar-legend span { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.bar-legend .key { display: inline-block; width: 2px; height: .9rem; background: var(--text); border-radius: 1px; }
.bar-legend .key.mark-threshold { background: var(--muted); }
.wishes { list-style: none; padding: 0; margin: .5rem 0 1rem; border-top: 1px solid var(--border); }
.wishes li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: .925rem; }
.wishes li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.compare { background: var(--bg); border-radius: 8px; padding: .75rem 1rem; font-size: .9rem; margin: 1.25rem 0 0; }

.signup { display: grid; gap: .75rem; max-width: 34rem; margin-top: 1rem; }
.signup label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
.signup input:not([type="checkbox"]), .signup textarea { font: inherit; padding: .6rem; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.signup select { background: var(--surface); }
.signup label.consent { display: flex; align-items: start; gap: .5rem; font-weight: 400; color: var(--muted); }
.signup label.consent input { margin-top: .25rem; accent-color: var(--accent); }
.signup .btn { justify-self: start; }

.lang-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: .2rem .7rem; font: inherit; font-size: .85rem; cursor: pointer; }
.lang-btn:hover { border-color: var(--text); }

.poster { gap: .4rem; }
.poster-badge { background: var(--accent) !important; color: var(--accent-text) !important; }

.membership { border: 1px solid var(--accent); border-radius: 12px; padding: 1rem 1.1rem; margin: 1.25rem 0; }
.membership-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.membership-head h3 { margin: 0; }
.membership-head small { font-size: .75rem; font-weight: 400; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; }
.segmented button { border: 0; background: none; color: var(--muted); font: inherit; font-size: .85rem; padding: .25rem .75rem; border-radius: 999px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.member-price { margin: .75rem 0 .25rem; }
.member-price strong { font-size: 1.5rem; }
.save { margin-left: .4rem; font-size: .75rem; font-weight: 600; color: var(--accent); }
.perks { margin: .5rem 0 1rem; padding-left: 1.2rem; }
.perks li { margin: .2rem 0; }
.member-foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }

.code-box code { font-size: 1.15rem; font-weight: 700; letter-spacing: .06em; }

.site-footer { max-width: 1100px; margin: 2rem auto 0; padding: 2rem 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .875rem; }

.ts { min-height: 65px; }
