:root {
  --ink: #0c0b09;
  --ink-2: #14120e;
  --ink-3: #1c1913;
  --line: #2b2619;
  --gold: #d6b25e;
  --gold-hi: #f1d796;
  --gold-lo: #9a7a35;
  --ivory: #f2ecdf;
  --muted: #9b927f;
  --silver: #c9ccd1;
  --bronze: #c58a5a;
  --danger: #e0806e;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 75% -10%, rgba(214, 178, 94, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(214, 178, 94, 0.05), transparent 60%),
    var(--ink);
  color: var(--ivory);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-hi); }
img { display: block; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); background: rgba(12, 11, 9, 0.78); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark { font: 600 14px/1 var(--sans); letter-spacing: 0.32em; text-transform: uppercase; color: var(--ivory); text-decoration: none; }
.wordmark b { color: var(--gold); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.fx { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.fx select {
  appearance: none; -webkit-appearance: none; width: auto; padding: 7px 26px 7px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--ink-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239b927f' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ivory); font: 500 13px/1 var(--sans); cursor: pointer;
}
.approx { color: var(--muted); font: 500 13px/1.4 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.approx:empty { display: none; }
.crown-approx { margin-top: 4px; font-size: 15px; }
.amount .approx { display: block; margin-top: 5px; text-align: right; }
.stat .approx { margin-top: 2px; }
.fx-note { margin-top: 6px; opacity: .85; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 15px/1 var(--sans); letter-spacing: 0.01em; text-decoration: none;
  color: #1a1408; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 8px 24px -8px rgba(214,178,94,.55);
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-ghost { background: transparent; color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--gold-lo); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { padding: 88px 0 40px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.eyebrow { font: 600 12px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin: 0 0 22px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(44px, 6.4vw, 84px); line-height: .98; font-variation-settings: "opsz" 144; }
h1 em { font-style: italic; color: var(--gold-hi); }
.lede { color: var(--muted); font-size: 18px; max-width: 34em; margin: 26px 0 34px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.crown {
  position: relative; padding: 34px 32px 30px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(241,215,150,.10), rgba(214,178,94,.02) 40%, rgba(0,0,0,0)), var(--ink-2);
  border: 1px solid rgba(214,178,94,.35);
  box-shadow: 0 40px 80px -40px rgba(214,178,94,.35);
}
.crown::before { content: ""; position: absolute; inset: 8px; border-radius: 16px; border: 1px solid rgba(214,178,94,.12); pointer-events: none; }
.crown-label { display: flex; align-items: center; gap: 10px; font: 600 12px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.crown-label svg { width: 22px; height: 22px; }
.crown-name { display: flex; align-items: center; gap: 14px; margin: 22px 0 6px; font: 400 clamp(30px, 3.6vw, 44px)/1.05 var(--serif); word-break: break-word; }
.crown-amount { font: 500 clamp(26px, 3vw, 36px)/1.1 var(--serif); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.crown-msg { margin: 18px 0 0; color: var(--ivory); opacity: .85; font: italic 400 18px/1.45 var(--serif); }
.crown-msg:empty { display: none; }
.crown-foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.crown-foot strong { color: var(--ivory); font-weight: 600; }

.flag { width: 28px; height: 20px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.12); flex: none; background: var(--ink-3); }
.crown .flag { width: 40px; height: 28px; }

/* ---------- time at #1 ---------- */
.reign { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.reign-label { font: 600 12px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.reign-clock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.reign-unit { background: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 0 10px; text-align: center; }
.reign-num { font: 400 34px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.reign-secs { color: var(--gold-hi); }
.reign-cap { font-size: 11px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.reign-record { margin-top: 14px; color: var(--muted); font-size: 14px; }
.reign-record strong { color: var(--ivory); font-weight: 600; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); margin: 36px 0 80px; background: rgba(20,18,14,.6); }
.stat { padding: 22px 26px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-value { font: 400 32px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; }

/* ---------- board ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; }
.section-head p { color: var(--muted); margin: 8px 0 0; }

.board { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 18px;
  padding: 18px 8px; border-bottom: 1px solid var(--line);
  animation: rise .5s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rank { font: 400 30px/1 var(--serif); color: var(--muted); font-variant-numeric: tabular-nums; }
.rank small { font-size: 15px; vertical-align: top; margin-right: 1px; opacity: .7; }
.who { min-width: 0; }
.who-line { display: flex; align-items: center; gap: 12px; }
.who-name { font: 500 19px/1.25 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-msg { margin: 5px 0 0 40px; color: var(--muted); font: italic 15px/1.45 var(--serif); overflow-wrap: anywhere; }
.who-msg:empty { display: none; }
.amount { font: 500 21px/1 var(--serif); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

.row.r1 .rank { color: var(--gold-hi); }
.row.r2 .rank { color: var(--silver); }
.row.r3 .rank { color: var(--bronze); }
.row.r1 { background: linear-gradient(90deg, rgba(214,178,94,.10), transparent 70%); }
.row.r1 .amount { color: var(--gold-hi); }

.board-empty { padding: 48px 8px; text-align: center; color: var(--muted); border-bottom: 1px solid var(--line); }
.board-more { display: flex; justify-content: center; margin-top: 26px; }

/* ---------- claim ---------- */
.claim { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; padding: 110px 0 40px; align-items: start; }
.claim-copy p { color: var(--muted); }
.claim-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.claim-points li { display: flex; gap: 12px; color: var(--ivory); }
.claim-points li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 9px; transform: rotate(45deg); background: var(--gold); }

.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px; padding: 30px; }
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label, .label { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--ivory); }
.hint { font-size: 13px; color: var(--muted); }
input[type=text], input[type=number], select, textarea {
  width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--ink); color: var(--ivory); font: 16px/1.3 var(--sans);
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-lo); box-shadow: 0 0 0 3px rgba(214,178,94,.18); }
.amount-input { position: relative; }
.amount-input span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gold); font: 500 20px var(--serif); pointer-events: none; }
.amount-input input { padding-left: 34px; font: 500 22px/1.2 var(--serif); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ivory); font: 500 13px var(--sans); cursor: pointer; }
.quick button:hover { border-color: var(--gold-lo); color: var(--gold-hi); }

.estimate { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px; margin: 4px 0 20px; border-radius: 12px; background: rgba(214,178,94,.07); border: 1px dashed rgba(214,178,94,.35); }
.estimate-rank { font: 400 30px/1 var(--serif); color: var(--gold-hi); }
.estimate .hint { text-align: right; }

.check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; font-size: 14px; font-weight: 400; letter-spacing: 0; line-height: 1.5; color: var(--muted); cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold); flex: none; }
.err { color: var(--danger); font-size: 13px; min-height: 0; }
.err:empty { display: none; }
.form-error { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: rgba(224,128,110,.1); color: var(--danger); font-size: 14px; }
.form-error:empty { display: none; }
.pay { width: 100%; padding: 17px; font-size: 16px; margin-top: 10px; }
.secure { display: flex; justify-content: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 13px; }

/* ---------- how / faq ---------- */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 90px 0 0; }
.how .card { padding: 26px; }
.how-num { font: 400 15px/1 var(--serif); color: var(--gold); letter-spacing: .2em; }
.how h3 { font-size: 24px; margin: 14px 0 8px; }
.how p { color: var(--muted); margin: 0; }

.faq { margin: 100px 0 0; max-width: 800px; }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; list-style: none; font: 400 21px/1.3 var(--serif); display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-family: var(--sans); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* ---------- footer ---------- */
footer { margin-top: 120px; border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer nav { display: flex; gap: 20px; }
footer a { color: var(--muted); }

/* ---------- simple pages ---------- */
.page { max-width: 760px; padding: 72px 0 0; }
.page h1 { font-size: clamp(40px, 5vw, 60px); margin-bottom: 18px; }
.page h2 { font-size: 26px; margin: 38px 0 10px; }
.page p, .page li { color: #d6cfbf; }
.page .updated { color: var(--muted); }

.result { text-align: center; padding: 110px 0 0; max-width: 640px; margin-inline: auto; }
.result .big { font: 400 clamp(72px, 12vw, 140px)/1 var(--serif); color: var(--gold-hi); margin: 18px 0 8px; }
.result p { color: var(--muted); }
.spinner { width: 28px; height: 28px; margin: 30px auto; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--gold); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.demo-banner { background: var(--gold); color: #1a1408; text-align: center; font: 600 13px/1.4 var(--sans); padding: 8px 12px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero, .claim { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding-top: 56px; }
  .claim { padding-top: 80px; }
  .how { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .row { grid-template-columns: 46px 1fr; gap: 10px 12px; }
  .rank { font-size: 24px; }
  .amount { grid-column: 2; text-align: left; font-size: 18px; margin-left: 40px; }
  .who-name { white-space: normal; }
  .field-row { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .section-head { flex-direction: column; align-items: start; }
  .topbar .btn { display: none; }
  .amount .approx { text-align: left; }
  .crown { padding: 26px 22px 22px; }
  .crown-foot { flex-wrap: wrap; }
  .crown-foot .btn { flex: none; }
  .reign-clock { gap: 8px; }
  .reign-num { font-size: 26px; }
  .reign-label { font-size: 11px; letter-spacing: .24em; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
