/* cryptocoupons.org - "Orange Ticket" design
 * warm cream + bitcoin orange, playful ticket coupons, no third-party fonts
 * tokens: dark is the default; light via prefers-color-scheme or data-theme */

:root {
  --bg: #191210;
  --bg-2: #221a15;
  --bg-3: #2b211a;
  --ticket: #241c16;
  --ticket-edge: #3a2d22;
  --line: #3a2d22;
  --line-2: #4a3a2c;
  --text: #f3ead9;
  --text-dim: #c9b795;
  --text-faint: #a08c68;
  --accent: #f7931a;
  --accent-2: #ffb84d;
  --accent-deep: #b5620b;
  --accent-text: #231505;
  --green: #3ddc84;
  --red: #ff5a4d;
  --gold: #ffd257;
  --glow: 0 0 24px rgba(247, 147, 26, .28);
  --shadow: 0 10px 28px rgba(0, 0, 0, .45);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fdf6ea;
    --bg-2: #ffffff;
    --bg-3: #f6ecdb;
    --ticket: #fffdf7;
    --ticket-edge: #e8d9bf;
    --line: #e5d7c0;
    --line-2: #d3c1a4;
    --text: #241a0d;
    --text-dim: #6b5c43;
    --text-faint: #85745a;
    --accent: #e07d0b; /* AA on light cream */
    --accent-2: #f7931a;
    --accent-deep: #9a5307;
    --accent-text: #fff7ea;
    --green: #0a7d43;
    --red: #c0392b;
    --glow: 0 0 20px rgba(247, 147, 26, .25);
    --shadow: 0 8px 24px rgba(120, 80, 20, .18);
  }
}

[data-theme="dark"] {
  --bg: #191210; --bg-2: #221a15; --bg-3: #2b211a; --ticket: #241c16;
  --ticket-edge: #3a2d22; --line: #3a2d22; --line-2: #4a3a2c;
  --text: #f3ead9; --text-dim: #c9b795; --text-faint: #a08c68;
  --accent: #f7931a; --accent-2: #ffb84d; --accent-deep: #b5620b;
  --accent-text: #231505; --green: #3ddc84; --red: #ff5a4d; --gold: #ffd257;
}
[data-theme="light"] {
  --bg: #fdf6ea; --bg-2: #ffffff; --bg-3: #f6ecdb; --ticket: #fffdf7;
  --ticket-edge: #e8d9bf; --line: #e5d7c0; --line-2: #d3c1a4;
  --text: #241a0d; --text-dim: #6b5c43; --text-faint: #85745a;
  --accent: #e07d0b; --accent-2: #f7931a; --accent-deep: #9a5307;
  --accent-text: #fff7ea; --green: #0a7d43; --red: #c0392b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); line-height: 1.55; font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
/* subtle chain-link paper texture in the page background */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(247, 147, 26, .09), transparent 60%),
    radial-gradient(800px 400px at 0% 110%, rgba(247, 147, 26, .06), transparent 60%);
}
main, .site-header, .site-footer { position: relative; z-index: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); }
.hl { color: var(--accent); font-style: italic; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.wrap.center { text-align: center; }
.dim { color: var(--text-dim); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mono-prefix { color: var(--accent); opacity: .8; }
.icon { width: 1.05em; height: 1.05em; vertical-align: -0.18em; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-text); padding: 8px 14px; z-index: 50; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--accent-deep);
}
.header-inner { display: flex; align-items: center; gap: 14px; height: 58px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.logo em { color: var(--accent); font-style: normal; }
.logo-chip {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  background: var(--accent); color: var(--accent-text); border-radius: 8px;
  box-shadow: var(--glow);
}
.main-nav { display: flex; gap: 4px; margin-left: 10px; }
.main-nav > a, .nav-drop > summary { padding: 7px 10px; border-radius: 8px; color: var(--text-dim); font-size: .95rem; cursor: pointer; list-style: none; }
.main-nav > a:hover, .nav-drop summary:hover { color: var(--text); background: var(--bg-3); }
.nav-drop { position: relative; }
.nav-drop[open] summary { color: var(--text); background: var(--bg-3); }
.drop-panel {
  position: absolute; top: 110%; left: 0; min-width: 230px; padding: 8px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); display: grid; z-index: 30;
}
.drop-panel a { padding: 7px 10px; border-radius: 8px; color: var(--text-dim); }
.drop-panel a:hover { background: var(--bg-3); color: var(--text); }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.btn-ghost, .btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: .95rem;
  border: 1px solid var(--line-2); cursor: pointer; text-decoration: none;
}
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: var(--glow); }
.btn-primary:hover { background: var(--accent-2); color: var(--accent-text); }
.btn-sm { padding: 5px 11px; font-size: .85rem; border-radius: 8px; }
.btn-disabled { opacity: .55; cursor: not-allowed; background: var(--bg-3); color: var(--text-dim); border: 1px dashed var(--line-2); }
.theme-toggle { background: none; border: 1px solid var(--line-2); border-radius: 10px; color: var(--text); padding: 7px 9px; cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent); }
.nav-burger { display: none; }
.nav-burger summary { cursor: pointer; list-style: none; }
.nav-panel { position: absolute; right: 12px; top: 105%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: grid; box-shadow: var(--shadow); z-index: 40; min-width: 210px; }
.nav-panel a { padding: 8px 10px; color: var(--text-dim); border-radius: 8px; }
.nav-panel a:hover { background: var(--bg-3); color: var(--text); }

/* ---------- hero ---------- */
.hero { padding: 54px 0 34px; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center; }
.hero-sub { color: var(--text-dim); font-size: 1.08rem; max-width: 34em; }
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 12px; }
.hero-trust { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-faint); font-size: .82rem; }
.hero .hl { text-decoration-color: var(--accent); }
.board {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; font-size: .9rem;
}
.board-title { color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.board-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px dashed var(--line); color: var(--text-dim); }
.board-row:first-of-type { border-top: 0; }
.board-val { color: var(--text); font-weight: 700; }
.board-val.ok { color: var(--green); }
.board-val.warn { color: var(--gold); }

/* ---------- sections ---------- */
.section { padding: 30px 0; }
.section-head { margin-bottom: 16px; }
.section-head h2 { display: flex; align-items: baseline; gap: 10px; }
.section-sub { color: var(--text-dim); margin: 2px 0 0; max-width: 60em; }
.cat-block, .section + .section { border-top: 1px dashed var(--line); }
.ticket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; align-items: start; }

/* ---------- coupon ticket ---------- */
.coupon-ticket {
  --notch: 12px;
  position: relative; background: var(--ticket);
  border: 1.5px solid var(--ticket-edge); border-radius: 16px;
  padding: 16px 18px 14px; box-shadow: var(--shadow);
  overflow: hidden;
  /* perforation: punched notches left/right + dashed tear line */
  -webkit-mask:
    radial-gradient(circle var(--notch) at left 46%, transparent 97%, #000) left,
    radial-gradient(circle var(--notch) at left 46%, transparent 97%, #000) right;
}
.coupon-ticket::after {
  content: ""; position: absolute; left: 10px; right: 10px; top: 44px;
  border-top: 2px dashed var(--line-2); opacity: .6; pointer-events: none;
}
.coupon-ticket.is-expired { opacity: .75; filter: saturate(.6); }
.ct-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.ct-store { display: flex; align-items: center; gap: 6px; font-size: .92rem; }
.ct-store a { color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.ct-store a:hover { color: var(--accent-2); }
.ct-type { font-size: .72rem; }
.ct-title { font-size: 1.18rem; margin: 2px 0 8px; }
.ct-value { color: var(--text-dim); font-size: .95rem; margin: 0 0 10px; }
.ct-body { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ct-terms { color: var(--text-dim); margin: 4px 0 8px; }
.ct-src { color: var(--text-faint); margin: 0 0 10px; font-size: .78rem; }
.ct-src a { color: var(--text-faint); text-decoration: underline; }

.code-reveal { flex: 0 1 auto; }
.reveal-btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  border: 2px dashed var(--accent-deep); background: rgba(247, 147, 26, .07);
  color: var(--text); padding: 9px 14px; border-radius: 10px;
  font-family: var(--mono); font-weight: 700; font-size: .95rem; min-width: 150px;
  justify-content: center; text-align: center;
}
.reveal-btn:hover { border-color: var(--accent); background: rgba(247, 147, 26, .12); }
.reveal-btn .rb-code { display: none; letter-spacing: .08em; }
.reveal-btn.revealed { border-style: solid; border-color: var(--accent); background: var(--accent); color: var(--accent-text); box-shadow: var(--glow); }
.reveal-btn.revealed .rb-label { display: none; }
.reveal-btn.revealed .rb-code { display: inline; user-select: all; }

/* ---------- badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .74rem; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; background: var(--bg-3); color: var(--text-dim);
  border: 1px solid var(--line); white-space: nowrap;
}
.badge.ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.badge.warn { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.badge.bad { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.badge.info { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 35%, transparent); }
.badge.ref { color: var(--accent-text); background: var(--accent); border-color: var(--accent); }
.badge.xmr { color: var(--accent); }
.badge.tor { color: var(--accent-2); }
.badge.mag { color: var(--text-dim); }
.badge.dim { opacity: .8; }

/* ---------- success meter ---------- */
.success-meter { display: inline-flex; align-items: center; gap: 6px; }
.sm-bar { width: 40px; height: 8px; }
.sm-track { fill: var(--bg-3); stroke: var(--line-2); stroke-width: .5; }
.sm-fill { fill: var(--accent); }
.success-meter.good .sm-fill { fill: var(--green); }
.success-meter.mid .sm-fill { fill: var(--gold); }
.success-meter.bad .sm-fill { fill: var(--red); }
.sm-pct { font-size: .8rem; font-weight: 700; }

/* ---------- vote box ---------- */
.vote-box {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-top: 8px; border-top: 1px dashed var(--line);
}
.vote-q { color: var(--text-faint); font-size: .82rem; }
.vote-btns { display: inline-flex; gap: 6px; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text-dim);
  padding: 5px 11px; border-radius: 8px; font-size: .82rem; font-weight: 700;
}
.vote-btn:hover { border-color: var(--accent); color: var(--text); }
.vote-btn.mining { opacity: .7; }
.v-yes:hover, .vote-btn[aria-pressed="true"].v-yes { color: var(--green); border-color: var(--green); }
.v-no:hover, .vote-btn[aria-pressed="true"].v-no { color: var(--red); border-color: var(--red); }
.vote-thanks { color: var(--green); font-weight: 700; font-size: .85rem; }

/* ---------- store cards ---------- */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 20px; }
.store-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; color: var(--text); transition: border-color .15s, transform .15s;
}
.store-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.sc-body { display: grid; gap: 1px; flex: 1; min-width: 0; }
.sc-count { font-size: .78rem; color: var(--text-dim); white-space: nowrap; }
.store-logo { flex-shrink: 0; }
.store-logo-img, img.store-logo { object-fit: contain; }
.monogram {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; font-weight: 800; font-family: var(--mono); font-size: .95rem;
  background: var(--bg-3); color: var(--text-dim); border: 1px solid var(--line-2);
}
.logo-18 { height: 18px; width: auto; }
.logo-26 { height: 26px; width: auto; max-width: 62px; object-fit: contain; }
.logo-32 { height: 32px; width: auto; max-width: 70px; object-fit: contain; }
.logo-44 { height: 44px; width: auto; max-width: 96px; object-fit: contain; }
.logo-64 { height: 64px; width: auto; max-width: 140px; object-fit: contain; }
.mono-h0 { background: #4a2e18; color: #ffb84d; } .mono-h1 { background: #3a2b3f; color: #d8a6ff; }
.mono-h2 { background: #16323a; color: #7fd8e8; } .mono-h3 { background: #17331f; color: #7fe8a0; }
.mono-h4 { background: #39321a; color: #f2dd7f; } .mono-h5 { background: #3a2020; color: #ff9d94; }
.mono-h6 { background: #23304a; color: #9db8ff; } .mono-h7 { background: #2f2438; color: #cfa0e8; }
.mono-h8 { background: #1f332e; color: #84e0c8; } .mono-h9 { background: #38302a; color: #d8b49a; }
.mono-h10 { background: #34331f; color: #e0d97f; } .mono-h11 { background: #2a2a38; color: #a8a8e0; }

/* ---------- category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cat-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; color: var(--text); font-weight: 700;
  transition: border-color .15s, transform .15s;
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat-card .icon { color: var(--accent); }
.age-note { color: var(--gold); background: rgba(255, 210, 87, .08); border: 1px solid rgba(255, 210, 87, .3); padding: 10px 14px; border-radius: 10px; font-size: .85rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.compare { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.compare th, table.compare td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.compare th { color: var(--text-faint); font-weight: 700; font-size: .8rem; }
table.compare.simple th { border-bottom: 2px solid var(--line-2); }
tr.row-expired td { opacity: .55; }
.cp-code { background: var(--bg-3); border: 1px solid var(--line-2); padding: 2px 8px; border-radius: 7px; font-size: .85rem; user-select: all; }
.col-cta { text-align: right; }

/* ---------- crumbs, prose, faq ---------- */
.crumbs { color: var(--text-faint); font-size: .78rem; margin-bottom: 14px; }
.crumbs a { color: var(--text-dim); }
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.4em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
details.faq { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 10px 16px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; font-weight: 700; }
details.faq p { color: var(--text-dim); margin: 8px 0 2px; }

/* ---------- forms ---------- */
.alert-form, .submit-form { display: grid; gap: 10px; max-width: 560px; }
.alert-form input[type=email], .submit-form input[type=text], .submit-form input[type=url],
.submit-form input[type=email], .submit-form select, .submit-form textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font-size: .95rem;
}
.flabel { font-weight: 700; font-size: .88rem; color: var(--text-dim); }
.alert-stores { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; max-height: 260px; overflow: auto; display: grid; gap: 4px; }
.alert-stores legend { padding: 0 6px; }
.alert-store { font-size: .9rem; color: var(--text-dim); }
.new-store-fields { display: grid; gap: 10px; padding: 10px 14px; background: var(--bg-3); border-radius: 12px; }
.hp-field { position: absolute; left: -9999px; }

/* ---------- toast + burst ---------- */
.cc-toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--accent); color: var(--accent-text); font-weight: 700;
  padding: 10px 18px; border-radius: 12px; box-shadow: var(--glow), var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60;
}
.cc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.burst-coin {
  position: fixed; z-index: 59; pointer-events: none;
  color: var(--accent); font-weight: 800;
}
@media (prefers-reduced-motion: reduce) {
  .burst-coin { display: none; }
  html { scroll-behavior: auto; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 2px solid var(--accent-deep); margin-top: 40px; padding: 34px 0 20px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 26px; margin-bottom: 22px; }
.footer-grid h4 { font-size: .85rem; color: var(--accent); margin-bottom: 8px; }
.footer-grid nav { display: grid; gap: 5px; font-size: .9rem; }
.footer-grid nav a { color: var(--text-dim); }
.footer-grid nav a:hover { color: var(--text); }
.notrack { font-size: .78rem; color: var(--text-faint); }
.footer-legal { color: var(--text-faint); font-size: .78rem; border-top: 1px dashed var(--line); padding-top: 14px; display: grid; gap: 6px; }

/* ---------- search dialog ---------- */
.search-dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); color: var(--text); padding: 0; width: min(560px, 92vw); }
.search-dialog::backdrop { background: rgba(10, 6, 2, .6); backdrop-filter: blur(3px); }
.search-box { padding: 14px; }
.search-box input { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--text); font-size: 1rem; }
.search-results { list-style: none; margin: 10px 0 0; padding: 0; max-height: 320px; overflow: auto; }
.search-results a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text-dim); }
.search-results a:hover, .search-results a.sel { background: var(--bg-3); color: var(--text); }

/* ---------- store head ---------- */
.store-head { display: flex; gap: 16px; align-items: flex-start; }
.store-head h1 { margin-bottom: 4px; }
.age-banner { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .nav-burger { display: block; }
  .btn-label { display: none; }
}
@media (max-width: 640px) {
  .ticket-grid { grid-template-columns: 1fr; }
  .store-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .ct-body { flex-direction: column; align-items: flex-start; }
  .reveal-btn { width: 100%; }
}

/* ---------- push alert button ---------- */
.push-alert-btn {
  background: none; border: none; padding: 0; font: inherit; cursor: pointer;
  color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
}
.push-alert-btn:hover { color: var(--accent-2); }

/* ---------- hero art ---------- */
.hero-art-band { max-width: 1140px; }
.hero-art {
  width: 100%; max-height: 340px; object-fit: cover;
  border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.cat-hero {
  width: 220px; height: 150px; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--line); margin-bottom: 16px;
}
