/* netcup.sale — original design system */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Light theme */
  --bg: oklch(0.99 0.004 240);
  --bg-elev: oklch(1 0 0);
  --bg-sunken: oklch(0.965 0.005 240);
  --ink: oklch(0.18 0.02 240);
  --ink-muted: oklch(0.45 0.015 240);
  --ink-faint: oklch(0.62 0.012 240);
  --line: oklch(0.9 0.008 240);
  --line-strong: oklch(0.82 0.012 240);

  /* Accent — signal green by default; overridable via tweaks */
  --accent: oklch(0.68 0.18 145);
  --accent-ink: oklch(0.32 0.12 145);
  --accent-soft: oklch(0.95 0.05 145);

  --warn: oklch(0.72 0.15 60);
  --danger: oklch(0.62 0.2 25);

  /* Density (overridable) */
  --gap: 16px;
  --card-pad: 24px;
  --row-h: 48px;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;

  --font-sans: 'Geist', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1200px;
}

[data-theme="dark"] {
  --bg: oklch(0.135 0.015 240);
  --bg-elev: oklch(0.175 0.018 240);
  --bg-sunken: oklch(0.105 0.015 240);
  --ink: oklch(0.96 0.005 240);
  --ink-muted: oklch(0.7 0.015 240);
  --ink-faint: oklch(0.5 0.015 240);
  --line: oklch(0.27 0.015 240);
  --line-strong: oklch(0.35 0.015 240);
  --accent-soft: oklch(0.28 0.06 145);
}

[data-density="compact"] {
  --gap: 10px;
  --card-pad: 16px;
  --row-h: 40px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  transition: background 0.2s, color 0.2s;
}

a { color: inherit; text-decoration: none; }

.mono { font-family: var(--font-mono); font-feature-settings: 'zero', 'ss02'; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ======== Topbar ======== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand .dot { color: var(--accent); }
.brand-tld { color: var(--ink-muted); font-weight: 500; }

.nav {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}
.nav a {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ink-muted);
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.nav a:hover { background: var(--bg-sunken); color: var(--ink); }
.nav a.active { color: var(--ink); background: var(--bg-sunken); }

.topbar-spacer { flex: 1; }
.topbar-tools { display: flex; gap: 8px; align-items: center; }

.icon-btn, .lang-btn {
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 0.15s, background 0.15s;
}
.icon-btn:hover, .lang-btn:hover { border-color: var(--line-strong); background: var(--bg-sunken); }
.icon-btn svg { width: 16px; height: 16px; }

.lang-wrap { position: relative; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 140px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px -12px oklch(0 0 0 / 0.25);
  padding: 4px;
  display: none;
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: none;
  border: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  text-align: left;
}
.lang-menu button:hover { background: var(--bg-sunken); }
.lang-menu button.active { color: var(--accent-ink); }
[data-theme="dark"] .lang-menu button.active { color: var(--accent); }
.lang-menu .flag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-sunken);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink-muted);
}

/* ======== Hero ======== */
.hero {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}
.hero-inner { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}
.eyebrow .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero h1 {
  font-size: clamp(36px, 5.2vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  max-width: 820px;
}
.hero h1 .accent { color: var(--accent-ink); }
[data-theme="dark"] .hero h1 .accent { color: var(--accent); }
.hero p.sub {
  margin-top: 20px;
  font-size: 18px;
  color: var(--ink-muted);
  max-width: 640px;
}

.hero-stats {
  margin-top: 36px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.hero-stat {
  display: flex;
  flex-direction: column;
}
.hero-stat .num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-stat .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-stat .num .unit { color: var(--ink-faint); font-weight: 400; }

/* ======== Toolbar (filter/search/sort) ======== */
.toolbar {
  position: sticky;
  top: 64px;
  z-index: 20;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.toolbar-inner {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.search {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 360px;
}
.search input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s;
}
.search input:focus { border-color: var(--accent); }
.search input::placeholder { color: var(--ink-faint); }
.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--ink-faint);
  pointer-events: none;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.chip .count {
  font-size: 10px;
  opacity: 0.6;
}

.sort {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}
.sort select {
  height: 32px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  padding: 0 28px 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 4l3 3 3-3' stroke='%23888' fill='none' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* ======== Coupon Grid ======== */
.section { padding: 48px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.section-head .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--gap);
}

/* ======== Coupon Card (default: ticket style) ======== */
.coupon {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--card-pad);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto auto 1fr;
  grid-template-areas:
    "head    discount"
    "title   discount"
    "specs   discount"
    "trust   discount"
    "footer  footer";
  gap: 12px 20px;
  transition: border-color 0.15s, transform 0.15s;
}
.coupon h3 { min-height: 56px; display: flex; flex-direction: column; justify-content: flex-start; }
.specs { min-height: 24px; }
.discount { min-height: 110px; }
.coupon-footer { align-self: end; }
.coupon:hover {
  border-color: var(--line-strong);
}

.coupon-head {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-verified {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
[data-theme="dark"] .badge-verified { color: var(--accent); }
.badge-verified::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.badge-type {
  background: var(--bg-sunken);
  color: var(--ink-muted);
  border: 1px solid var(--line);
}
.badge-hot {
  background: oklch(0.95 0.05 25);
  color: oklch(0.45 0.18 25);
}
[data-theme="dark"] .badge-hot {
  background: oklch(0.28 0.08 25);
  color: oklch(0.78 0.15 25);
}

.coupon h3 {
  grid-area: title;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.coupon h3 .head-title { font-size: inherit; font-weight: inherit; }
.coupon h3 .sub {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.specs {
  grid-area: specs;
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}
.spec {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  padding: 3px 5px;
  background: var(--bg-sunken);
  border-radius: 3px;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.spec strong { color: var(--ink); font-weight: 600; }
.spec-icon { display: inline-flex; width: 11px; height: 11px; color: var(--ink-faint); flex-shrink: 0; }
.spec-icon svg { width: 100%; height: 100%; display: block; }

.discount {
  grid-area: discount;
  text-align: right;
  align-self: start;
  border-left: 1px dashed var(--line-strong);
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  max-width: 130px;
}
.discount .pct {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent-ink);
  white-space: nowrap;
}
[data-theme="dark"] .discount .pct { color: var(--accent); }
.discount .pct .pc { font-size: 22px; font-weight: 500; margin-left: 1px; }
.discount .label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.discount .save {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.35;
}
.discount .save strong { color: var(--ink); font-weight: 600; white-space: nowrap; }
.discount .save .vat { display: block; font-size: 9.5px; color: var(--ink-faint); margin-top: 1px; }

.coupon-footer {
  grid-area: footer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.codes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.codes-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.code-chips { display: flex; flex-direction: column; gap: 6px; }
.code-chips .code {
  height: 38px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.15s;
  padding: 0;
}
.code-chips .code .code-source {
  padding: 0;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  background: var(--bg-elev);
  border-right: 1px dashed var(--line-strong);
}
.code-chips .code .code-val {
  padding: 0 12px;
  color: var(--ink);
  letter-spacing: 0.04em;
  user-select: all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.code-chips .code .code-icon {
  padding: 0 12px;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  color: var(--ink-faint);
  border-left: 1px dashed var(--line-strong);
}
.code-chips .code:hover { border-color: var(--accent); }
.code-chips .code:hover .code-icon { color: var(--accent-ink); }
[data-theme="dark"] .code-chips .code:hover .code-icon { color: var(--accent); }
.code-chips .code.copied { border-color: var(--accent); background: var(--accent-soft); }

.coupon-footer .go-btn { align-self: flex-end; }
.code {
  flex: 1;
  display: flex;
  align-items: center;
  height: 44px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.15s;
}
.code .code-label {
  padding: 0 12px;
  background: var(--bg-elev);
  border-right: 1px dashed var(--line-strong);
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.code .code-val {
  flex: 1;
  padding: 0 12px;
  color: var(--ink);
  user-select: all;
}
.code .code-icon {
  padding: 0 12px;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  color: var(--ink-muted);
  border-left: 1px dashed var(--line-strong);
}
.code:hover { border-color: var(--accent); }
.code:hover .code-icon { color: var(--accent-ink); }
[data-theme="dark"] .code:hover .code-icon { color: var(--accent); }
.code.copied {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.go-btn {
  height: 44px;
  padding: 0 18px;
  border: 0;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.go-btn:hover { opacity: 0.85; }
.go-btn:active { transform: translateY(1px); }
.go-btn svg { width: 14px; height: 14px; }

.coupon-meta {
  grid-area: footer;
  display: none; /* used via additional row in stamp variant */
}

.coupon-trust {
  grid-area: trust;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.coupon-trust .uses { display: inline-flex; align-items: center; }
.rating { display: inline-flex; align-items: center; gap: 6px; }
.rating .stars { display: inline-flex; gap: 1.5px; align-items: center; }
.rating .star {
  width: 10px;
  height: 10px;
  display: inline-block;
  background-color: var(--warn);
  -webkit-mask: var(--star-mask) center / contain no-repeat;
          mask: var(--star-mask) center / contain no-repeat;
}
.rating .star.empty { background-color: var(--line-strong); }
.rating .star.half {
  background: linear-gradient(90deg, var(--warn) 50%, var(--line-strong) 50%);
}
.rating-num { color: var(--ink); font-weight: 600; font-size: 11px; }
.rating-count { color: var(--ink-faint); font-size: 10px; }

:root {
  --star-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>');
}

.flag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
}
.flag-svg {
  width: 14px;
  height: 10px;
  border-radius: 1px;
  display: block;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.15);
}

/* ======== Card variant: stamp ======== */
[data-card="stamp"] .coupon {
  border-radius: 4px;
  border-style: solid;
  background:
    radial-gradient(circle at 0 var(--notch-y, 50%), transparent 8px, var(--bg-elev) 9px),
    radial-gradient(circle at 100% var(--notch-y, 50%), transparent 8px, var(--bg-elev) 9px);
  background-color: var(--bg-elev);
  --notch-y: 50%;
}
[data-card="stamp"] .coupon::before,
[data-card="stamp"] .coupon::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  background: var(--bg);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}
[data-card="stamp"] .coupon::before { left: -9px; border-right: 1px dashed var(--line-strong); }
[data-card="stamp"] .coupon::after { right: -9px; border-left: 1px dashed var(--line-strong); }

/* ======== Card variant: minimal-row ======== */
[data-card="row"] .coupon-grid {
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
}
[data-card="row"] .coupon {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  grid-template-columns: 80px 1fr auto;
  grid-template-areas: "discount head footer";
  align-items: start;
  padding: 16px 20px;
  gap: 20px;
}
[data-card="row"] .coupon:last-child { border-bottom: 0; }
[data-card="row"] .coupon h3 { display: none; }
[data-card="row"] .coupon-head { grid-area: head; flex-direction: column; align-items: flex-start; gap: 4px; text-transform: none; font-size: 14px; color: var(--ink); font-family: var(--font-sans); font-weight: 500; }
[data-card="row"] .coupon-head .head-title { font-size: 15px; font-weight: 600; }
[data-card="row"] .discount { border: 0; padding: 0; }
[data-card="row"] .discount .pct { font-size: 28px; }
[data-card="row"] .discount .pct .pc { font-size: 18px; }
[data-card="row"] .discount .save, [data-card="row"] .discount .label { display: none; }
[data-card="row"] .specs { display: none; }
[data-card="row"] .coupon-footer { border: 0; padding: 0; margin: 0; min-width: 320px; }
[data-card="row"] .coupon-tabs-label { display: none; }
[data-card="row"] .code { height: 36px; font-size: 12px; }
[data-card="row"] .go-btn { height: 36px; padding: 0 14px; font-size: 13px; }
[data-card="row"] .coupon-trust { display: none; }

/* ======== FAQ ======== */
.faq {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.faq-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
}
@media (max-width: 760px) {
  .faq-grid { grid-template-columns: 1fr; gap: 24px; }
}
.faq-aside .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.faq-aside h2 {
  font-size: 32px;
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: 1.1;
}
.faq-aside p {
  margin-top: 12px;
  color: var(--ink-muted);
  font-size: 15px;
}

.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 500;
}
.faq-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  min-width: 28px;
}
.faq-icon {
  margin-left: auto;
  width: 24px; height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.15s;
  flex-shrink: 0;
}
.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  width: 10px; height: 1.5px;
  background: var(--ink);
}
.faq-icon { position: relative; }
.faq-icon::after { transform: rotate(90deg); transition: transform 0.2s; }
.faq-item[open] .faq-icon { background: var(--ink); }
.faq-item[open] .faq-icon::before, .faq-item[open] .faq-icon::after { background: var(--bg); }
.faq-item[open] .faq-icon::after { transform: rotate(0); }
.faq-a {
  padding: 0 0 24px 44px;
  color: var(--ink-muted);
  font-size: 15px;
  max-width: 720px;
}
.faq-a code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-sunken);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink);
}

/* ======== Footer ======== */
footer.foot {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  background: var(--bg-sunken);
  font-size: 14px;
  color: var(--ink-muted);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  font-weight: 500;
}
.foot ul { list-style: none; }
.foot ul li { margin-bottom: 8px; }
.foot ul li a:hover { color: var(--ink); }
.foot-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.foot-bottom .disclaimer {
  max-width: 780px;
  line-height: 1.6;
}

/* ======== Toast ======== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 28px -10px oklch(0 0 0 / 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .check { color: var(--accent); }

/* ======== Breadcrumbs ======== */
.crumbs {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.crumbs a:hover { color: var(--ink); }
.crumbs span.sep { color: var(--ink-faint); }
.crumbs .current { color: var(--ink); }

/* ======== Blog ======== */
.blog-hero { padding: 56px 0 32px; border-bottom: 1px solid var(--line); }
.blog-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: 1.05;
}
.blog-hero p { margin-top: 16px; color: var(--ink-muted); max-width: 600px; font-size: 17px; }

.featured {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  padding: 32px 0 48px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 760px) { .featured { grid-template-columns: 1fr; } }
.featured-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.featured-cover {
  aspect-ratio: 16/9;
  background: var(--bg-sunken);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 14px,
    color-mix(in oklab, var(--accent) 18%, transparent) 14px,
    color-mix(in oklab, var(--accent) 18%, transparent) 15px
  );
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.featured-cover .cover-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  background: var(--bg-elev);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.featured-cover.has-image { background-image: none; }
.featured-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.featured-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.tag {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  align-self: flex-start;
}
[data-theme="dark"] .tag { color: var(--accent); }
.featured-body h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.featured-body p { color: var(--ink-muted); }
.featured-meta {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.featured-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-card .tag { align-self: flex-start; }
.side-card h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.side-card .featured-meta { padding-top: 12px; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.post-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, transform 0.15s;
}
.post-card:hover { border-color: var(--line-strong); }
.post-card h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.post-card p { color: var(--ink-muted); font-size: 14px; flex: 1; }
.post-meta {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

/* ======== Article ======== */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.article header.art-head { margin-bottom: 36px; }
.article .tag { margin-bottom: 16px; }
.article h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: 1.1;
}
.article .lead {
  margin-top: 16px;
  font-size: 19px;
  color: var(--ink-muted);
  line-height: 1.55;
}
.article .art-meta {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  flex-wrap: wrap;
}

.article .body { font-size: 17px; line-height: 1.7; }
.article .body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.article .body p:has(> img) { margin-bottom: 0; }
.article .body h2 {
  margin-top: 48px;
  margin-bottom: 16px;
  font-size: 26px;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.article .body h3 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 19px;
  font-weight: 600;
}
.article .body p { margin-bottom: 18px; color: var(--ink); }
.article .body p + p { margin-top: 0; }
.article .body ul, .article .body ol { margin: 0 0 18px 22px; }
.article .body li { margin-bottom: 6px; }
.article .body code {
  font-family: var(--font-mono);
  background: var(--bg-sunken);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
  border: 1px solid var(--line);
}
.article .body pre {
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  overflow-x: auto;
  margin-bottom: 22px;
}
.article .body pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.article .body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px;
  margin-bottom: 22px;
  color: var(--ink-muted);
  font-style: italic;
}
.article .body a {
  color: var(--accent-ink);
  border-bottom: 1px solid color-mix(in oklab, var(--accent-ink) 30%, transparent);
}
[data-theme="dark"] .article .body a { color: var(--accent); border-bottom-color: color-mix(in oklab, var(--accent) 30%, transparent); }
.article .body a:hover { border-bottom-color: currentColor; }

.callout {
  margin: 28px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
}
.callout .callout-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  margin-bottom: 6px;
}
[data-theme="dark"] .callout .callout-label { color: var(--accent); }

/* ======== Tweaks panel ======== */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 280px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 24px 48px -16px oklch(0 0 0 / 0.25);
  font-family: var(--font-sans);
  z-index: 80;
  display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tweaks-panel .close-x {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 14px;
}
.tweak-row { margin-bottom: 14px; }
.tweak-row .tlabel {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.swatches { display: flex; gap: 8px; }
.swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  cursor: pointer;
  background: var(--sw);
  transition: transform 0.1s;
}
.swatch:hover { transform: scale(1.1); }
.swatch.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--bg); }
.seg { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button {
  flex: 1;
  padding: 6px 10px;
  background: transparent;
  border: 0;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active { background: var(--ink); color: var(--bg); }

/* ======== Helpers ======== */
.hidden { display: none !important; }

@media (max-width: 600px) {
  .hero h1 { font-size: 36px; }
  .nav { display: none; }
  .toolbar-inner .sort { width: 100%; margin-left: 0; }
  .coupon { grid-template-columns: 1fr; grid-template-areas: "head" "title" "discount" "specs" "trust" "footer"; }
  .discount { border-left: 0; padding-left: 0; align-items: flex-start; text-align: left; }
  .coupon-trust { padding: 0; }
}

/* ======== A11y: skip link, focus-visible, empty state ======== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  overflow: visible;
}

:where(.chip, .code, .faq-q, .lang-link, .go-btn, .icon-btn, .foot a, .nav a):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.empty-state {
  margin: 24px 0 0;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-muted, var(--ink));
  font-family: var(--font-mono);
  font-size: 14px;
  text-align: center;
}

/* ---------- Per-offer pages (/offers/{slug}/) ---------- */

/* Homepage card "Details" link, lives next to .go-btn in .cta-row. */
.cta-row {
  grid-area: footer;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}
.cta-row .go-btn { align-self: auto; }
.details-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--line-strong);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.details-link:hover { color: var(--ink); border-color: var(--ink); }

/* Page-scoped from here. .offer-page wraps <main>. */
.offer-page .crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  flex-wrap: wrap;
}
.offer-page .crumbs a {
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}
.offer-page .crumbs a:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.offer-page .crumbs .sep { color: var(--ink-faint); }
.offer-page .crumbs .current { color: var(--ink); }

.offer-hero { padding: 32px 0 12px; }
.offer-hero .badge { margin-right: 6px; }
.offer-hero-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.offer-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.offer-hero .offer-sub {
  color: var(--ink-muted);
  font-size: 16px;
  margin-bottom: 22px;
}
.offer-hero-deal {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: baseline;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.offer-hero-promo { display: flex; flex-direction: column; gap: 2px; }
.offer-hero-promo-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.offer-hero-promo-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-ink);
}
[data-theme="dark"] .offer-hero-promo-value { color: var(--accent); }
.offer-hero-pricing {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-mono);
  color: var(--ink-muted);
}
.offer-hero-pricing strong {
  color: var(--ink);
  font-size: 22px;
  font-family: var(--font-sans);
}
.offer-hero-pricing .vat { font-size: 11px; }

/* Section spacing on offer pages — slightly tighter than the homepage. */
.offer-page .section { padding: 32px 0; }
.offer-page .offer-h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.offer-specs {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.offer-specs th,
.offer-specs td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.offer-specs th {
  width: 180px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.offer-specs td .vat {
  font-size: 11px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  margin-left: 4px;
}

/* The single coupon card on the offer page reuses .coupon styling but
   gets a roomier desktop layout: full container width, three code
   chips side-by-side, and a noticeably bigger CTA. The homepage card
   is constrained by its 360px grid cell — here we have the whole row. */
.offer-coupon-card {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px;
  /* Collapse the homepage card's 5-row grid down to a single column —
     this card has no head/title/specs/discount slots filled. */
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "trust"
    "footer";
  gap: 18px;
}
.offer-coupon-card .coupon-trust { font-size: 12px; gap: 18px; }
.offer-coupon-card .coupon-trust .rating-num { font-size: 13px; }
.offer-coupon-card .coupon-footer {
  gap: 18px;
  margin-top: 0;
  padding-top: 20px;
}
.offer-coupon-card .codes-label { font-size: 12px; }

/* Three chips in a row at desktop widths; stacked on small screens
   (the @media (max-width: 700px) block at the bottom flips them back). */
.offer-coupon-card .code-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.offer-coupon-card .code-chips .code {
  height: 64px;
  grid-template-columns: 44px 1fr 36px;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.offer-coupon-card .code-chips .code .code-source {
  font-size: 13px;
}
.offer-coupon-card .code-chips .code .code-icon svg {
  width: 18px;
  height: 18px;
}
.offer-coupon-card .go-btn {
  height: 56px;
  padding: 0 28px;
  font-size: 15px;
  align-self: stretch;
  justify-content: center;
}
.offer-coupon-card .go-btn svg { width: 16px; height: 16px; }

.offer-description p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 14px;
  max-width: 70ch;
}

.redeem-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: redeem;
}
.redeem-steps li {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.redeem-num {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-ink);
  flex-shrink: 0;
}
[data-theme="dark"] .redeem-num { color: var(--accent); }
.redeem-body h3 {
  font-size: 15px;
  margin-bottom: 4px;
}
.redeem-body p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}
.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.related-card .tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.related-card h3 {
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.related-card p {
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.offer-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.offer-nav-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s;
}
.offer-nav-card:hover { border-color: var(--accent); }
.offer-nav-card.next { text-align: right; }
.offer-nav-dir {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 700px) {
  .redeem-steps { grid-template-columns: 1fr; }
  .offer-nav-grid { grid-template-columns: 1fr; }
  .offer-specs th { width: 120px; }
  .cta-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .offer-coupon-card { padding: 22px; }
  .offer-coupon-card .code-chips { grid-template-columns: 1fr; }
  .offer-coupon-card .code-chips .code { height: 52px; }
}

/* ======== 404 — not found ======== */
.nf-hero {
  padding: 56px 0 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.nf-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 35%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 35%, black, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}
.nf-hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nf-hero .eyebrow { margin-bottom: 24px; }

.nf-digits {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 18px);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(96px, 18vw, 200px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 4px 0 24px;
}
.nf-digit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 8px 24px color-mix(in oklab, var(--accent) 25%, transparent);
}
.nf-zero {
  width: 1em;
  height: 1em;
  color: var(--accent-ink);
}
[data-theme="dark"] .nf-zero { color: var(--accent); }
.nf-zero svg { width: 100%; height: 100%; }
.nf-zero-ring {
  stroke-dasharray: 4 6;
  animation: nf-zero-spin 14s linear infinite;
  transform-origin: 60px 60px;
}
.nf-zero-hand {
  transform-origin: 60px 60px;
  animation: nf-zero-spin 8s linear infinite reverse;
}
@keyframes nf-zero-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .nf-zero-ring, .nf-zero-hand { animation: none; }
}

.nf-title {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
  max-width: 720px;
}
.nf-title .accent { color: var(--accent-ink); }
[data-theme="dark"] .nf-title .accent { color: var(--accent); }
.nf-sub {
  margin-top: 14px;
  color: var(--ink-muted);
  font-size: 17px;
  max-width: 580px;
}

/* ---- Consolation coupon ticket ---- */
.nf-consolation { padding: 24px 0 64px; }
.nf-consolation-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.nf-card {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  width: 100%;
  max-width: 640px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow:
    0 1px 0 0 var(--line),
    0 24px 60px -28px color-mix(in oklab, var(--accent) 30%, transparent),
    0 12px 30px -20px oklch(0 0 0 / 0.18);
  overflow: hidden;
  transform: translateY(8px);
  opacity: 0;
  animation: nf-pop 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s forwards;
}
@keyframes nf-pop {
  to { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .nf-card { animation: none; opacity: 1; transform: none; }
}

/* tiny semicircles to make the dashed seam look punched out */
.nf-perf {
  position: absolute;
  left: 130px;
  width: 14px;
  height: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.nf-perf-l { top: -7px; }
.nf-perf-r { bottom: -7px; }

.nf-card-stub {
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 8px,
      color-mix(in oklab, var(--accent) 14%, transparent) 8px,
      color-mix(in oklab, var(--accent) 14%, transparent) 9px
    ),
    color-mix(in oklab, var(--accent) 8%, var(--bg-elev));
  border-right: 1.5px dashed var(--line-strong);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: center;
  color: var(--accent-ink);
}
[data-theme="dark"] .nf-card-stub { color: var(--accent); }
.nf-card-stub-num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.nf-card-stub-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  writing-mode: horizontal-tb;
}

.nf-card-main {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nf-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.nf-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--ink);
  font-weight: 600;
  font-size: 10px;
}
.nf-card-label { color: var(--ink-faint); }
.nf-card-verified {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-ink);
  font-weight: 600;
}
[data-theme="dark"] .nf-card-verified { color: var(--accent); }
.nf-card-verified svg { width: 12px; height: 12px; }

.nf-card-body { display: flex; flex-direction: column; gap: 4px; }
.nf-card-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.nf-card-discount {
  font-family: var(--font-mono);
  color: var(--ink-muted);
  font-size: 13px;
}

.nf-code {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  width: 100%;
  padding: 0 14px;
  border: 1px dashed var(--line-strong);
  background: var(--bg-sunken);
  color: var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  font-family: var(--font-mono);
}
.nf-code:hover { border-color: var(--accent); background: var(--accent-soft); }
.nf-code:active { transform: translateY(1px); }
.nf-code.copied {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.nf-code-source {
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  padding-right: 8px;
  border-right: 1px solid var(--line);
}
.nf-code-val {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nf-code-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
}
.nf-code:hover .nf-code-icon { color: var(--accent-ink); }
[data-theme="dark"] .nf-code:hover .nf-code-icon { color: var(--accent); }

.nf-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nf-roll {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.nf-roll:hover { border-color: var(--line-strong); background: var(--bg-sunken); color: var(--ink); }
.nf-roll.spinning svg {
  animation: nf-spin 0.6s cubic-bezier(0.5, 0, 0.2, 1);
}
@keyframes nf-spin {
  from { transform: rotate(0); }
  to   { transform: rotate(-360deg); }
}
.nf-go {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background 0.15s, transform 0.1s;
}
.nf-go:hover { background: var(--accent-ink); }
[data-theme="dark"] .nf-go { background: var(--accent); color: var(--accent-ink); }
[data-theme="dark"] .nf-go:hover { background: color-mix(in oklab, var(--accent) 88%, white); }
.nf-go:active { transform: translateY(1px); }

.nf-links {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.nf-links a {
  color: var(--ink-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.nf-links a:hover { color: var(--ink); background: var(--bg-sunken); }
.nf-links-sep { color: var(--ink-faint); }

@media (max-width: 560px) {
  .nf-card { grid-template-columns: 1fr; }
  .nf-card-stub {
    border-right: 0;
    border-bottom: 1.5px dashed var(--line-strong);
    flex-direction: row;
    padding: 14px 18px;
  }
  .nf-perf { display: none; }
  .nf-card-main { padding: 20px 18px; }
  .nf-go { margin-left: 0; width: 100%; justify-content: center; }
  .nf-roll { width: 100%; justify-content: center; }
}
