:root {
  --navy: #0A1B52; --blue: #1E3FD8; --gold: #F5B301; --gold-ink: #3B2A00;
  --ink: #1E293B; --muted: #64748B; --bg: #F6F7FB; --card: #FFFFFF; --line: #E2E8F0;
  --ok: #059669; --bad: #DC2626; --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #E2E8F0; --muted: #94A3B8; --bg: #0B1226; --card: #121B36; --line: #22305A; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ── Top bar ── */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--navy); color: #fff; }
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 50%; background: #fff; }
.menu { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.menu a { text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 10px; opacity: .9; }
.menu a:hover, .menu a.on { background: rgba(255,255,255,.12); opacity: 1; }
.menu a.login { background: var(--gold); color: var(--navy); font-weight: 700; opacity: 1; margin-left: 6px; }
.burger { display: none; margin-left: auto; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; padding: 6px; }
@media (max-width: 820px) {
  .burger { display: block; }
  .menu { display: none; position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--navy); padding: 8px 16px 16px; gap: 2px; }
  .menu.open { display: flex; }
  .menu a { padding: 12px; }
  .menu a.login { margin: 6px 0 0; text-align: center; }
}

/* ── Page header ── */
.pagehead { background: linear-gradient(160deg, var(--navy), var(--blue)); color: #fff; padding: 36px 0 40px; }
.pagehead h1 { margin: 0 0 6px; font-size: clamp(26px, 4vw, 36px); line-height: 1.15; }
.pagehead p { margin: 0; opacity: .9; max-width: 40em; }
.hero { background: linear-gradient(160deg, var(--navy), var(--blue)); color: #fff; padding: 48px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; margin: 0 0 14px; }
.hero h1 span { color: var(--gold); }
.hero .lead { font-size: 18px; opacity: .92; margin: 0 0 22px; max-width: 34em; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: min(220px, 55vw); border-radius: 50%; border: 6px solid var(--gold); background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; text-align: center; } .hero-art { order: -1; } .hero .lead { margin-inline: auto; } .actions { justify-content: center; } }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 15px; padding: 11px 18px; border-radius: 10px; text-decoration: none; background: var(--blue); color: #fff; transition: filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled, .btn:disabled:hover { background: #E5E7EB; color: #6B7280; border-color: transparent; cursor: not-allowed; filter: none; }
@media (prefers-color-scheme: dark) { .btn:disabled, .btn:disabled:hover { background: #1F2937; color: #6B7280; } }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.ghost { background: transparent; color: inherit; border: 1.5px solid currentColor; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.block { width: 100%; }

/* ── Sections & cards ── */
section { padding: 40px 0 8px; }
h2 { font-size: 24px; margin: 0 0 6px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid > * { min-width: 0; }
@media (max-width: 900px) { .grid, .grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid, .grid.four { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h3 { margin: 6px 0 4px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .ico { font-size: 24px; }

/* product cards */
.product { display: flex; flex-direction: column; gap: 10px; }
.product .top { display: flex; align-items: center; gap: 12px; }
.product .badge-code { min-width: 46px; height: 46px; padding: 0 8px; border-radius: 12px; background: #EEF2FF; color: var(--blue); font-weight: 800; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .product .badge-code { background: #1B2A5C; color: #A5B4FC; } }
.product .name { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.product .btn { margin-top: auto; }
.product .price.na { font-size: 15px; font-weight: 600; color: var(--muted); }
.product .price { font-size: 22px; font-weight: 800; }
.product .price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.product .meta { font-size: 13px; color: var(--muted); }
.tiers { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.tiers td { padding: 7px 0; border-top: 1px solid var(--line, rgba(127,127,127,.2)); }
.tiers tr:first-child td { border-top: 0; font-weight: 700; }
.tiers td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.tag.in { background: #DCFCE7; color: #166534; }
.tag.out { background: #FEE2E2; color: #991B1B; }
.tag.soon { background: #FEF3C7; color: #92400E; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar input { flex: 1; min-width: 200px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--card); color: inherit; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Forms ── */
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 6px; }
input, select { width: 100%; font: inherit; padding: 11px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: inherit; }
input:focus, select:focus { outline: none; border-color: var(--blue); }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.error { color: var(--bad); font-size: 14px; margin-top: 10px; min-height: 1em; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: inherit; font-size: 20px; cursor: pointer; }
.qty input { width: 70px; text-align: center; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-weight: 700; }
.total strong { font-size: 22px; }
.secure { display: flex; gap: 8px; align-items: flex-start; background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin-top: 12px; }
@media (prefers-color-scheme: dark) { .secure { background: #062E24; color: #A7F3D0; border-color: #065F46; } }

/* ── Modal ── */
.modal { position: fixed; inset: 0; background: rgba(2,6,23,.55); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal.open { display: flex; }
.modal .box { background: var(--card); color: var(--ink); border-radius: 16px; width: 100%; max-width: 440px; padding: 22px; max-height: 92vh; overflow: auto; }
.modal .head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.modal h3 { margin: 0; font-size: 19px; }
.x { background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }

/* ── PIN card (same layout as the printed checker card) ── */
.pincard { background: #fff; color: #1E293B; border: 1px solid #475569; border-radius: 6px; padding: 14px 16px 10px; text-align: center; margin: 0 auto 12px; max-width: 420px; }
.pincard .school { font-weight: 800; color: var(--navy); letter-spacing: .3px; font-size: 14px; }
.pincard .title { font-size: 15px; margin-top: 2px; }
.pincard .rule { border-top: 1.5px dashed #334155; margin: 10px 20px; }
.pincard .line { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 8px; border-radius: 6px; font-size: 15px; }
.pincard .line:hover { background: #F1F5F9; }
.pincard .line b { letter-spacing: 1px; }
.pincard .line.pin b { font-size: 18px; }
.pincard .small { font-size: 13px; }
.pincard .sites { font-size: 11.5px; color: #64748B; margin-top: 6px; }
.pincard .copyall { margin-top: 6px; background: none; border: 0; color: var(--blue); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #0F172A; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; }
.toast.show { opacity: 1; }

/* ── Status blocks ── */
.status { text-align: center; padding: 24px 10px; }
.status .icon { font-size: 44px; }
.status h2 { margin: 8px 0 4px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin 1s linear infinite; margin: 14px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.narrow { max-width: 560px; margin: 0 auto; }

/* ── CTA & footer ── */
.cta { margin: 48px 0 0; background: var(--navy); color: #fff; border-radius: 18px; padding: 26px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.cta p { margin: 4px 0 0; opacity: .85; }
footer { padding: 40px 0 32px; color: var(--muted); font-size: 14px; }
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 20px; }

/* Attention pulse ("blink") for the main call to action */
.btn.blink { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(246,185,59,.75); filter: brightness(1); transform: scale(1); }
  50% { box-shadow: 0 0 0 10px rgba(246,185,59,0), 0 0 22px 4px rgba(246,185,59,.55); filter: brightness(1.18); transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) { .btn.blink { animation: none; } }
