/* ============================================================================
   SavingSwitch â€” Warm Marketplace design system
   Committed terracotta brand Â· Young Serif display + Hanken Grotesk body
   Single source of truth for the public frontend. Replaces master/style/media.
   ========================================================================== */

/* ---- Fonts (self-hosted) ------------------------------------------------- */
@font-face {
  font-family: 'Young Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/young-serif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Young Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/young-serif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/hanken-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/hanken-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Tokens -------------------------------------------------------------- */
:root {
  /* Warm neutrals â€” intentional brand-red tint, not generic beige */
  --paper:      oklch(0.985 0.006 45);
  --paper-2:    oklch(0.963 0.013 45);
  --paper-3:    oklch(0.940 0.018 44);
  --ink:        oklch(0.245 0.018 47);
  --ink-2:      oklch(0.420 0.022 46);
  --ink-3:      oklch(0.545 0.020 45);
  --line:       oklch(0.890 0.012 45);
  --line-2:     oklch(0.825 0.016 44);

  /* Committed brand: terracotta / clay â†’ oxblood */
  --clay:       oklch(0.535 0.152 37);
  --clay-deep:  oklch(0.460 0.140 36);
  --clay-700:   oklch(0.405 0.120 34);
  --oxblood:    oklch(0.310 0.095 32);
  --oxblood-2:  oklch(0.265 0.080 33);
  --clay-soft:  oklch(0.930 0.038 44);
  --clay-softer:oklch(0.960 0.022 44);
  --on-clay:    oklch(0.985 0.014 75);

  /* Semantic (used sparingly, real state only) */
  --leaf:       oklch(0.520 0.095 150);
  --leaf-deep:  oklch(0.430 0.085 150);
  --leaf-soft:  oklch(0.935 0.040 150);
  --gold:       oklch(0.760 0.135 75);

  /* Surface var consumed by the coupon-ticket notch (set per section) */
  --surface:    var(--paper);

  /* Type */
  --font-display: 'Young Serif', 'Hanken Grotesk', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --fs-900: clamp(2.1rem, 1.5rem + 2.4vw, 3.1rem);
  --fs-800: clamp(1.55rem, 1.28rem + 1.3vw, 2.2rem);   /* page-hero titles ~35px */
  --fs-700: clamp(1.3rem, 1.13rem + 0.75vw, 1.7rem);   /* section titles ~27px */
  --fs-600: clamp(1.1rem, 1.03rem + 0.32vw, 1.25rem);  /* card titles ~20px */
  --fs-500: 1.125rem;   /* 18px lead/subhead */
  --fs-400: 1rem;       /* 16px body */
  --fs-300: 0.9375rem;  /* 15px secondary */
  --fs-200: 0.8125rem;  /* 13px meta */

  /* Spacing */
  --sp-1: 0.25rem; --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;
  --sp-9: 6rem;    --sp-10: 8rem;
  --section-y: clamp(3.25rem, 2.4rem + 3.5vw, 5.5rem);
  --gutter: clamp(1.15rem, 0.4rem + 2.8vw, 2.75rem);
  --container: 1240px;
  --container-narrow: 760px;

  /* Radius â€” buttons/chips = pill Â· cards/media/tickets = lg Â· inputs = md */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* Shadows â€” tinted warm, layered and soft (never pure black) */
  --shadow-1: 0 1px 2px rgba(64,32,20,0.04), 0 4px 14px rgba(64,32,20,0.05);
  --shadow-2: 0 2px 6px rgba(70,32,18,0.04), 0 10px 24px rgba(70,32,18,0.06), 0 26px 56px rgba(70,32,18,0.07);
  --shadow-pop: 0 10px 30px rgba(58,24,12,0.10), 0 30px 70px rgba(58,24,12,0.16);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-1: 0.16s; --t-2: 0.28s; --t-3: 0.5s;

  /* z-index scale */
  --z-base: 1; --z-dropdown: 100; --z-totop: 240; --z-sticky: 200;
  --z-header: 300; --z-drawer: 400; --z-backdrop: 500; --z-modal: 600;
}

/* ---- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  font-kerning: normal;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
  color: var(--ink);
}
p { text-wrap: pretty; }

:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: var(--clay); color: var(--on-clay); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: var(--fs-300);
  line-height: 1;
  letter-spacing: 0.005em;
  white-space: nowrap;
  transition: transform var(--t-1) var(--ease), background var(--t-2) ease,
    box-shadow var(--t-2) ease, color var(--t-2) ease, border-color var(--t-2) ease;
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.chip--active { background: var(--clay); border-color: var(--clay); color: var(--on-clay); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge--verified { background: var(--leaf-soft); color: var(--leaf-deep); }
.badge--code { background: var(--clay); color: var(--on-clay); }
.badge--deal { background: var(--ink); color: var(--paper); }
.badge--expired { background: var(--paper-3); color: var(--ink-3); }

/* ---- Forms --------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field > label { font-weight: 600; font-size: var(--fs-300); color: var(--ink); }
.input, .textarea, select.input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--paper);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-md);
  font-size: var(--fs-400);
  color: var(--ink);
  transition: border-color var(--t-1) ease, box-shadow var(--t-1) ease;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:focus, .textarea:focus, select.input:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--clay) 18%, transparent);
}
.textarea { min-height: 150px; resize: vertical; }

.alert { padding: 0.85rem 1.1rem; border-radius: var(--r-md); font-size: var(--fs-300); font-weight: 600; }
.alert--ok { background: var(--leaf-soft); color: var(--leaf-deep); }
.alert--err { background: color-mix(in oklch, var(--clay) 14%, var(--paper)); color: var(--clay-700); }

/* ============================================================================
   HEADER
   ========================================================================== */
/* Full-width white header */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.hdr {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: clamp(64px, 64px + 1vw, 76px);
}
.hdr__nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-300);
  color: var(--ink-2);
  transition: color var(--t-1) ease, background var(--t-1) ease;
}
.hdr__nav-link:hover { color: #D23A1C; background: color-mix(in oklch, #FF4D2E 9%, transparent); }
.hdr__nav-link.is-active { color: #D23A1C; background: color-mix(in oklch, #FF4D2E 11%, transparent); }

/* Search */
.search { position: relative; }
.search-empty { padding: 1rem 0.6rem; color: var(--ink-2); font-size: var(--fs-300); }

/* ============================================================================
   FOOTER â€” committed oxblood brand surface
   ========================================================================== */
.site-footer {
  /* Re-theme footer to near-black + coral (matches the new home system).
     Scoped var overrides cascade into every existing footer rule below. */
  --oxblood: #17161B;
  --oxblood-2: #0F0E12;
  --clay: #FF4D2E;
  --clay-deep: #E23A1E;
  --on-clay: #FFFFFF;
  background: #17161B;
  color: rgba(255, 255, 255, 0.74);
}
.news-response { margin-top: 0.6rem; font-size: var(--fs-200); min-height: 1.1em; }
.news-response.success { color: var(--leaf-soft); }
.news-response.error { color: color-mix(in oklch, var(--gold) 80%, white); }

/* Back to top */
.to-top {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  width: 48px; height: 48px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--clay); color: var(--on-clay); box-shadow: var(--shadow-2);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity var(--t-2) ease, transform var(--t-2) var(--ease), visibility var(--t-2), background var(--t-2) ease;
  z-index: var(--z-totop);
}
.to-top.is-vis { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--clay-deep); transform: translateY(-3px); }
.to-top .ti { font-size: 1.4rem; }

/* ============================================================================
   COUPON TICKET â€” signature motif (real affordance, not decoration)
   ========================================================================== */
.ticket {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: box-shadow 0.38s cubic-bezier(0.32,0.72,0,1), transform 0.38s cubic-bezier(0.32,0.72,0,1), border-color 0.38s cubic-bezier(0.32,0.72,0,1);
}
.ticket:hover { box-shadow: 0 16px 42px -10px rgba(6,2,2,0.15); transform: translateY(-4px); border-color: rgba(139,62,47,0.28); }
.ticket__body { padding: 2.6rem 1.5rem 1.4rem; min-width: 0; }
.ticket__meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.65rem; }
.ticket__store { font-size: var(--fs-200); font-weight: 700; color: var(--clay-deep); text-transform: uppercase; letter-spacing: 0.04em; }
.ticket__title { font-family: var(--font-body); font-weight: 700; font-size: var(--fs-500); line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 0.4rem; }
.ticket__title a:hover { color: var(--clay-deep); }
.ticket__desc { color: var(--ink-2); font-size: var(--fs-300); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticket__stats { display: flex; gap: 1rem; margin-top: 0.9rem; font-size: var(--fs-200); color: var(--ink-3); flex-wrap: wrap; }
.ticket__stats span { display: inline-flex; align-items: center; gap: 0.3rem; }
.ticket__stats .ti { font-size: 1em; }

/* Perforated action stub */
.ticket__stub {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 1.4rem 1.5rem;
  min-width: 168px;
  border-left: 2px dashed var(--line-2);
}
.ticket__stub::before, .ticket__stub::after {
  content: ""; position: absolute; left: -10px; width: 20px; height: 20px;
  border-radius: var(--r-pill); background: var(--surface);
  border: 1px solid var(--line);
}
.ticket__stub::before { top: -11px; }
.ticket__stub::after { bottom: -11px; }
.ticket__discount { font-family: var(--font-body); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--clay-deep); font-variant-numeric: tabular-nums; text-align: center; }
.ticket__discount small { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-top: 0.2rem; }
.ticket__cta {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.75rem 1.15rem; border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--fs-300); position: relative; overflow: hidden;
  background: var(--clay); color: var(--on-clay);
  transition: background 0.28s cubic-bezier(0.32,0.72,0,1), transform 0.28s cubic-bezier(0.32,0.72,0,1), box-shadow 0.28s cubic-bezier(0.32,0.72,0,1);
}
.ticket__cta:hover { background: var(--clay-deep); transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(139,62,47,0.42); }
.ticket__cta.is-deal { background: var(--ink); }
.ticket__cta.is-deal:hover { background: var(--oxblood); }
.ticket--expired { opacity: 0.62; filter: saturate(0.7); }
.ticket--expired .ticket__cta { background: var(--ink-3); }

/* ============================================================================
   COUPON MODAL
   ========================================================================== */
.cmodal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: none; align-items: center; justify-content: center;
  padding: var(--gutter);
  background: color-mix(in oklch, var(--oxblood-2) 60%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity var(--t-2) ease;
}
.cmodal.show { opacity: 1; }
.cmodal__card {
  position: relative; width: min(460px, 100%);
  background: var(--paper); border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop); padding: 2.2rem 1.8rem 1.8rem;
  text-align: center; transform: scale(0.94) translateY(10px);
  transition: transform var(--t-3) var(--ease);
}
.cmodal.show .cmodal__card { transform: scale(1) translateY(0); }
.cmodal__close { position: absolute; top: 0.9rem; right: 0.9rem; width: 38px; height: 38px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); transition: background var(--t-1) ease; }
.cmodal__close:hover { background: var(--paper-2); }
.cmodal__logo { width: 84px; height: 84px; margin: 0 auto 1rem; border-radius: var(--r-lg); border: 1px solid var(--line); object-fit: contain; background: #fff; padding: 0.5rem; }
.cmodal__kicker { display: inline-block; font-size: var(--fs-200); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--leaf-deep); margin-bottom: 0.4rem; }
.cmodal__title { font-size: var(--fs-600); margin-bottom: 0.5rem; }
.cmodal__status { color: var(--ink-2); font-size: var(--fs-300); margin-bottom: 1.4rem; }
.cmodal__instruction { font-size: var(--fs-200); color: var(--ink-3); margin-bottom: 0.6rem; }
.code-box {
  display: flex; align-items: stretch; gap: 0; margin-bottom: 1rem;
  border: 2px dashed var(--clay); border-radius: var(--r-md); overflow: hidden; background: var(--clay-softer);
}
.code-box.no-code { border-style: solid; border-color: var(--line-2); background: var(--paper-2); }
.code-text { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0.95rem 1rem; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.06em; color: var(--clay-700); }
.btn-copy { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0 1.2rem; background: var(--clay); color: var(--on-clay); font-weight: 700; font-size: var(--fs-300); transition: background var(--t-2) ease; }
.btn-copy:hover { background: var(--clay-deep); }
.btn-copy.copied { background: var(--leaf); }
.cmodal__visit { display: inline-flex; width: 100%; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.9rem; background: var(--ink); color: var(--paper); border-radius: var(--r-pill); font-weight: 700; transition: background var(--t-2) ease; }
.cmodal__visit:hover { background: var(--oxblood); }

/* ============================================================================
   SCROLL REVEAL
   ========================================================================== */
/* Reveal is load-safe: content is visible by default; only hidden once JS
   is confirmed present (html.js), so a failed/headless render never blanks. */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ============================================================================
   HERO (home)
   ========================================================================== */
.hero { position: relative; background: var(--oxblood); color: var(--on-clay); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 88% -10%, color-mix(in oklch, var(--clay) 55%, transparent), transparent 60%),
    radial-gradient(90% 80% at -10% 110%, color-mix(in oklch, var(--oxblood-2) 90%, transparent), transparent 55%);
}
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s var(--ease); }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero__dot { width: 9px; height: 9px; border-radius: var(--r-pill); background: color-mix(in oklch, var(--on-clay) 45%, transparent); cursor: pointer; transition: width var(--t-2) var(--ease), background var(--t-2) ease; border: none; }
.hero__dot.is-active { width: 26px; background: var(--gold); }

/* Empty state */
.empty-state { text-align: center; padding: var(--sp-8) var(--gutter); color: var(--ink-2); }
.empty-state .ti { font-size: 3rem; color: var(--ink-3); margin-bottom: 0.5rem; }
.empty-state h3 { font-size: var(--fs-600); margin-bottom: 0.4rem; }

/* Disclaimer */
.disclaimer { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg); }
.disclaimer h2 { font-size: var(--fs-600); margin-bottom: 0.5rem; }
.disclaimer p { color: var(--ink-2); font-size: var(--fs-300); }
.breadcrumb { display: none; }
.breadcrumb a:hover { color: var(--clay-deep); }
.breadcrumb .ti { font-size: 1em; opacity: 0.6; }

/* Rating */
.hx-store-rating { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 0.6rem; cursor: pointer; flex-wrap: wrap; }
.hx-store-rating .star { font-size: 1.2rem; transition: color 0.2s cubic-bezier(0.32,0.72,0,1); }
.hx-store-rating .star.ti-star-filled { color: var(--gold); }
.hx-store-rating .star.ti-star { color: var(--line-2); }
.hx-store-rating.locked { cursor: default; }
.coupons-list { display: grid; gap: 2.5rem; }
.hx-offer-filter { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.42rem 0.9rem; border-radius: var(--r-pill); font-size: var(--fs-300); font-weight: 600; cursor: pointer; border: 1px solid var(--line); color: var(--ink-2); background: var(--paper); transition: background 0.28s cubic-bezier(0.32,0.72,0,1), border-color 0.28s cubic-bezier(0.32,0.72,0,1), color 0.28s cubic-bezier(0.32,0.72,0,1); }
.hx-offer-filter:hover { background: var(--clay-softer); border-color: rgba(139,62,47,0.28); color: var(--clay); }
.hx-offer-filter.chip--active { background: var(--clay); border-color: var(--clay); color: var(--on-clay); }

/* ============================================================================
   PAGER
   ========================================================================== */
.pager { display: flex; justify-content: center; margin-top: var(--sp-7); }
.pager ul { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.pager li a, .pager li span { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 0.6rem; border-radius: var(--r-md); font-weight: 700; font-size: var(--fs-300); border: 1px solid var(--line); color: var(--ink-2); transition: background var(--t-1) ease, color var(--t-1) ease, border-color var(--t-1) ease; }
.pager li a:hover { border-color: var(--clay); color: var(--clay-deep); background: var(--clay-softer); }
.pager li.active span { background: var(--clay); border-color: var(--clay); color: var(--on-clay); }
.form-grid { display: grid; gap: var(--sp-4); }
.alert-list { margin: 0; padding-left: 1.1rem; }

/* ============================================================================
   REDIRECT INTERSTITIAL (standalone page)
   ========================================================================== */
.redirect-page { min-height: 100dvh; display: grid; place-items: center; background: var(--oxblood); color: var(--on-clay); padding: var(--gutter); }
.redirect-card { max-width: 480px; width: 100%; text-align: center; background: var(--paper); color: var(--ink); border-radius: var(--r-xl); padding: clamp(2rem, 1.5rem + 3vw, 3rem); box-shadow: var(--shadow-pop); }
.redirect-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.9rem; border-radius: var(--r-pill); background: var(--leaf-soft); color: var(--leaf-deep); font-weight: 700; font-size: var(--fs-200); margin-bottom: var(--sp-5); }
.redirect-spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid var(--clay-softer); border-top-color: var(--clay); margin: 0 auto var(--sp-5); animation: ss-spin 0.8s linear infinite; }
@keyframes ss-spin { to { transform: rotate(360deg); } }
.redirect-title { font-size: var(--fs-700); margin-bottom: 0.6rem; }
.redirect-desc { color: var(--ink-2); margin-bottom: var(--sp-5); }
.redirect-progress { height: 6px; border-radius: var(--r-pill); background: var(--clay-softer); overflow: hidden; margin-bottom: var(--sp-5); }
.redirect-progress span { display: block; height: 100%; width: 0; background: var(--clay); border-radius: inherit; animation: ss-fill 1.5s var(--ease) forwards; }
@keyframes ss-fill { to { width: 100%; } }
.redirect-hint { font-size: var(--fs-300); color: var(--ink-2); }
.redirect-hint a { color: var(--clay-deep); font-weight: 700; text-decoration: underline; }
.redirect-cancel { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: var(--sp-5); color: var(--ink-3); font-size: var(--fs-200); }
.redirect-cancel:hover { color: var(--clay-deep); }
@media (prefers-reduced-motion: reduce) { .redirect-spinner { animation: none; } .redirect-progress span { animation: none; width: 100%; } }
@keyframes ss-kenburns { from { transform: scale(1.02); } to { transform: scale(1.1); } }

/* Layout primitives */
.hx-wrap { max-width: 1200px; margin-inline: auto; padding-inline: clamp(1.15rem, 0.4rem + 2.6vw, 2.5rem); }

/* --- Section 1: Hero â€” full-bleed cinematic slider ------------------------- */
.hxhero { position: relative; overflow: hidden; background: #110E0C; isolation: isolate; }
@keyframes hxhero-kb { from { transform: scale(1.05); } to { transform: scale(1.15); } }
@keyframes hxhero-textin { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes hxhero-prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hxhero:hover .hero__dot.is-active::after { animation-play-state: paused; }

/* Pager â€” CI built-in (legacy) */
.hx-pager { display: flex; justify-content: center; padding-top: 2.75rem; }
.hx-pager .pager ul { display: flex; align-items: center; gap: 0.3rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.hx-pager .pager li a,
.hx-pager .pager li span {
  display: flex; align-items: center; justify-content: center;
  min-width: 2.2rem; height: 2.2rem; padding: 0 0.7rem;
  border-radius: var(--r-pill); font-size: 0.875rem; font-weight: 500;
  border: 1px solid var(--line); color: var(--ink-2); background: var(--paper);
  text-decoration: none; transition: all var(--t-2) var(--ease);
}
.hx-pager .pager li a:hover { background: var(--clay-softer); border-color: var(--clay); color: var(--clay-deep); }
.hx-pager .pager li.active span { background: var(--clay); color: var(--on-clay); border-color: var(--clay); font-weight: 700; }

/* Pager â€” custom markup (categories, stores single-alpha) */
.hx-pager { display: flex; align-items: center; justify-content: center; gap: 0.4rem; flex-wrap: wrap; padding-top: 2.75rem; }
.hx-pager__pages { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.hx-pager__btn,
.hx-pager__page {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-width: 2.2rem; height: 2.2rem; padding: 0 0.75rem;
  border-radius: var(--r-pill); font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--line); color: var(--ink-2); background: var(--paper);
  text-decoration: none;
  transition: background 0.28s cubic-bezier(0.32,0.72,0,1), border-color 0.28s cubic-bezier(0.32,0.72,0,1), color 0.28s cubic-bezier(0.32,0.72,0,1), transform 0.28s cubic-bezier(0.32,0.72,0,1);
}
.hx-pager__btn:hover,
.hx-pager__page:hover { background: var(--clay-softer); border-color: rgba(139,62,47,0.35); color: var(--clay); transform: translateY(-1px); }
.hx-pager__page.is-active { background: var(--clay); color: var(--on-clay); border-color: var(--clay); font-weight: 700; pointer-events: none; }
.hx-pager__btn--disabled { opacity: 0.38; pointer-events: none; }
.hx-pager__ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2.2rem; font-size: 0.82rem; color: var(--ink-3); }

/* Sticky TOC */
.hx-toc {
  position: sticky; top: calc(76px + 1.5rem);
  max-height: calc(100vh - 76px - 3rem); overflow-y: auto;
  padding: 1.15rem 1.1rem; border: 1px solid var(--line);
  border-radius: var(--r-lg); background: var(--paper);
}
.hx-toc--empty { display: none; }
.hx-toc__title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 0.75rem;
}
.hx-toc__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.05rem; }
.hx-toc__list a {
  display: block; padding: 0.3rem 0.55rem; font-size: 0.8rem; color: var(--ink-3);
  text-decoration: none; line-height: 1.35; border-radius: var(--r-sm);
  border-left: 2px solid transparent; transition: all var(--t-2) var(--ease);
}
.hx-toc__list a:hover { color: var(--ink); background: var(--paper-2); }
.hx-toc__list a.is-active { color: var(--clay); border-left-color: var(--clay); background: var(--clay-softer); font-weight: 600; }
.hx-toc__h3 a { padding-left: 1rem; font-size: 0.76rem; }

/* Share strip */
.hx-share {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.55rem;
  padding: 1.2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-top: 2.5rem; max-width: 68ch;
}
.hx-share__label {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-3); margin-right: 0.2rem;
}
.hx-share__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.05rem; height: 2.05rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--paper);
  color: var(--ink-2); font-size: 1rem; text-decoration: none;
  transition: all var(--t-2) var(--ease); cursor: pointer;
}
.hx-share__btn:hover { background: var(--clay); border-color: var(--clay); color: var(--on-clay); }
.hx-share__btn--copy.is-copied { background: var(--leaf); border-color: var(--leaf); color: #fff; }

/* Prev/Next nav */
.hx-post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem;
}
.hx-post-nav__link {
  display: flex; align-items: center; gap: 0.85rem; padding: 1rem 1.1rem;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper);
  text-decoration: none; transition: all var(--t-2) var(--ease);
}
.hx-post-nav__link:hover:not(.hx-post-nav__link--disabled) { border-color: var(--clay); background: var(--clay-softer); }
.hx-post-nav__link--next { flex-direction: row-reverse; text-align: right; }
.hx-post-nav__link--disabled { opacity: 0.38; pointer-events: none; }
.hx-post-nav__thumb {
  width: 60px; height: 60px; object-fit: cover;
  border-radius: var(--r-md); flex-shrink: 0;
}
.hx-post-nav__dir {
  display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--clay); margin-bottom: 0.3rem;
}
.hx-post-nav__link--next .hx-post-nav__dir { justify-content: flex-end; }
.hx-post-nav__name {
  font-size: 0.86rem; font-weight: 600; color: var(--ink); line-height: 1.32;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

@media (max-width: 880px) {
  .hx-toc { display: none; }
  .hx-post-nav { grid-template-columns: 1fr; }
}

.hx-form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.hx-form-actions {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem;
}
.hx-form-note { font-size: 0.8rem; color: var(--ink-3); }

@media (max-width: 768px) {
  .hx-form-row { grid-template-columns: 1fr; }
}

/* Group: card + inline subcategory list stacked */
.hx-cat-group { display: flex; flex-direction: column; gap: 0.5rem; }
@media (max-width: 640px) {
  .hdr { height: 64px; }
  .ticket { grid-template-columns: 1fr; }
  .ticket__stub { border-left: none; border-top: 2px dashed var(--line-2); flex-direction: row; justify-content: space-between; min-width: 0; }
  .ticket__stub::before, .ticket__stub::after { left: auto; top: auto; }
  .ticket__stub::before { top: -11px; left: -11px; }
  .ticket__stub::after { top: -11px; right: -11px; bottom: auto; left: auto; }
}

/* ---- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---- Print --------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .to-top, .cmodal{ display: none !important; }
  body { background: #fff; color: #000; }
}

/* ============================================================================
   BLOG ENGINE â€” coupon blocks, comparison table, FAQ, store CTA  (ss- prefix)
   ========================================================================== */

/* Coupon block */
.ss-coupon-block {
  display: flex; align-items: center; gap: 1rem;
  background: var(--clay-softer); border: 1px solid rgba(139,62,47,0.22);
  border-radius: var(--r-lg); padding: 1rem 1.25rem;
  margin: 1.75rem 0; flex-wrap: wrap;
}
.ss-coupon-store {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--clay); flex-shrink: 0;
}
.ss-coupon-title {
  flex: 1; font-size: var(--fs-400); font-weight: 700; color: var(--ink);
  min-width: 140px;
}
.ss-coupon-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.1rem; background: var(--clay); color: var(--on-clay);
  border-radius: var(--r-pill); font-size: var(--fs-200); font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  transition: background 0.25s cubic-bezier(0.32,0.72,0,1); white-space: nowrap;
}
.ss-coupon-cta:hover { background: var(--clay-deep); }

/* Comparison table */
.ss-compare-table {
  width: 100%; border-collapse: collapse;
  margin: 1.75rem 0; font-size: var(--fs-300);
}
.ss-compare-table th {
  background: var(--paper-2); font-weight: 800; font-size: var(--fs-200);
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.7rem 0.9rem; text-align: left;
  border-bottom: 2px solid var(--line);
}
.ss-compare-table td {
  padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); color: var(--ink-2);
}
.ss-compare-table tr:last-child td { border-bottom: none; }
.ss-compare-table a { color: var(--clay); font-weight: 700; text-decoration: none; white-space: nowrap; }
.ss-compare-table a:hover { text-decoration: underline; }

/* In-article store CTA */
.ss-store-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1.25rem; padding: 0.75rem 1.5rem;
  background: var(--clay); color: var(--on-clay);
  border-radius: var(--r-pill); font-weight: 800; font-size: var(--fs-400);
  text-decoration: none;
  transition: background 0.25s cubic-bezier(0.32,0.72,0,1), transform 0.25s cubic-bezier(0.32,0.72,0,1);
}
.ss-store-cta:hover { background: var(--clay-deep); transform: translateY(-2px); }

/* FAQ section â€” Schema.org FAQPage compatible */
.ss-faq {
  margin-top: 2.5rem; border-top: 2px solid var(--line); padding-top: 1.75rem;
}
.ss-faq > h2 {
  font-size: var(--fs-600); font-weight: 800; margin-bottom: 1.25rem;
}
.ss-faq__item {
  border-bottom: 1px solid var(--line); padding: 0;
}
.ss-faq__item:last-child { border-bottom: none; }
/* Accordion: question is the toggle, answer collapses (JS sets max-height) */
.ss-faq__q {
  font-size: var(--fs-400); font-weight: 700; color: var(--ink);
  margin: 0; cursor: pointer; position: relative;
  padding: 1.1rem 2.25rem 1.1rem 0; list-style: none;
  transition: color 0.2s ease;
}
.ss-faq__q:hover { color: var(--clay); }
.ss-faq__q::after {
  content: ''; position: absolute; right: 0.4rem; top: 50%;
  width: 0.7rem; height: 0.7rem; margin-top: -0.45rem;
  border-right: 2px solid var(--clay); border-bottom: 2px solid var(--clay);
  transform: rotate(45deg); transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
}
.ss-faq__q.is-open::after { transform: rotate(-135deg); margin-top: -0.2rem; }
.ss-faq__a {
  font-size: var(--fs-300); color: var(--ink-2); line-height: 1.65;
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.32,0.72,0,1);
}
.ss-faq__q.is-open + .ss-faq__a { padding-bottom: 1.1rem; }
.ss-faq__a div { margin: 0; }

/* Blog-engine CTA buttons sit inside .hx-article__content, whose `a` rule (clay text +
   underline) would otherwise make these clay-on-clay buttons unreadable. Override it. */
.ss-coupon-block .ss-coupon-cta,
a.ss-store-cta {
  color: var(--on-clay); text-decoration: none;
}
.ss-coupon-block .ss-coupon-cta:hover { color: var(--on-clay); }
a.ss-store-cta:hover { color: var(--on-clay); text-decoration: none; }
.ss-compare-table a, .ss-related__list a { text-decoration: none; }

/* Inline blog images (AI-generated, contextual) */
.ss-blog-figure {
  margin: 2rem 0; padding: 0; border-radius: var(--r-lg); overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--line);
  box-shadow: 0 18px 40px -24px rgba(54,32,24,0.45);
}
.ss-blog-figure img {
  display: block; width: 100%; height: auto; object-fit: cover;
}
.ss-blog-figure figcaption {
  font-size: var(--fs-200); color: var(--ink-3, var(--ink-2));
  padding: 0.6rem 0.9rem; letter-spacing: 0.01em;
  border-top: 1px solid var(--line); background: var(--paper);
}

/* Related guides â€” blog-to-blog interlinking.
   Selectors are doubled-up (.ss-related .ss-related__list) to out-rank the theme's
   generic `.hx-article__content ul { display:grid; padding-left:1.5rem }` rule. */
.ss-related {
  margin-top: 2.5rem; border-top: 2px solid var(--line); padding-top: 1.5rem; clear: both;
}
.ss-related > h2 { font-size: var(--fs-500); font-weight: 800; margin: 0 0 1rem; }
.ss-related .ss-related__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.6rem;
}
.ss-related .ss-related__list li { margin: 0; padding: 0; }
.ss-related__list a {
  display: block; padding: 0.7rem 1rem; border-radius: var(--r-md, 12px);
  background: var(--clay-softer); color: var(--clay); font-weight: 700;
  text-decoration: none; font-size: var(--fs-300);
  transition: background 0.25s cubic-bezier(0.32,0.72,0,1), transform 0.25s cubic-bezier(0.32,0.72,0,1);
}
.ss-related__list a:hover { background: var(--clay); color: var(--on-clay); transform: translateY(-2px); }

@media (max-width: 640px) {
  .ss-coupon-block { flex-direction: column; align-items: flex-start; }
  .ss-compare-table { font-size: var(--fs-200); }
  .ss-compare-table th, .ss-compare-table td { padding: 0.5rem 0.6rem; }
  .ss-faq > h2 { font-size: var(--fs-500); }
  .ss-blog-figure { margin: 1.5rem 0; }
  .ss-related__list { grid-template-columns: 1fr; }
}

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 180px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transform-origin: top right;
  transition: opacity var(--t-2) var(--ease), transform var(--t-2) var(--ease), visibility var(--t-2);
  z-index: var(--z-dropdown);
}
.lang-switch__menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
