/* =====================================================================
   FREEDOM RUN — Republic Day Marathon
   Design system + public website + organiser console
   ---------------------------------------------------------------------
   1. Tokens & reset          5. Hero & stats
   2. Typography & helpers    6. Cards, sections, FAQ
   3. Buttons & badges        7. Forms, wizard, payment, status, pass
   4. Header & footer         8. Admin console & print
   ===================================================================== */

/* ------------------------------------------------------------------ */
/* 1. Tokens & reset                                                   */
/* ------------------------------------------------------------------ */
:root {
  --ink: #0a0f1e;
  --ink-2: #101a33;
  --ink-3: #1c2745;
  --paper: #f7f6f2;
  --paper-2: #efeee7;
  --white: #ffffff;
  --text: #131a2b;
  --muted: #5c6579;
  --muted-2: #8790a3;
  --line: rgba(15, 23, 42, .10);
  --line-strong: rgba(15, 23, 42, .18);

  --brand: #f2542d;
  --brand-2: #ff8a3d;
  --brand-3: #c62b3c;
  --saffron: #ff9933;
  --green: #138808;
  --green-soft: #0f8a5f;

  --amber: #92400e;   --amber-bg: #fef3c7;
  --blue: #1e40af;    --blue-bg: #dbeafe;
  --red: #b91c1c;     --red-bg: #fee2e2;
  --green-bg: #dcfce7;
  --grey-bg: #eceef2;

  --r-xs: 8px;
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  --sh-sm: 0 1px 2px rgba(10, 15, 30, .06), 0 1px 3px rgba(10, 15, 30, .05);
  --sh: 0 8px 24px -10px rgba(10, 15, 30, .18), 0 2px 6px rgba(10, 15, 30, .05);
  --sh-lg: 0 36px 70px -36px rgba(10, 15, 30, .40), 0 12px 28px -16px rgba(10, 15, 30, .18);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --container: 1180px;
  --head-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, h5, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
::selection { background: rgba(242, 84, 45, .22); }

.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }

:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ */
/* 2. Typography & helpers                                             */
/* ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 32px);
}
.container-narrow { max-width: 780px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .72rem; font-weight: 750; letter-spacing: .17em;
  text-transform: uppercase; color: var(--brand);
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--saffron), var(--brand), var(--brand-3));
}
.eyebrow-light { color: #ffb9a4; }
.eyebrow-light::before { background: linear-gradient(90deg, var(--saffron), #fff, #34c759); }

.section { padding: clamp(56px, 7vw, 96px) 0; }
.section-tight { padding: clamp(36px, 5vw, 64px) 0; }
.section-white { background: var(--white); }
.section-ink { background: var(--ink); color: #fff; }
.section-soft { background: linear-gradient(180deg, var(--paper), #fff); }

.section-head { max-width: 660px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-title {
  font-size: clamp(1.75rem, 3.4vw, 2.65rem);
  line-height: 1.08; letter-spacing: -.025em; font-weight: 800;
  text-wrap: balance;
}
.section-title .accent { color: var(--brand); }
.section-lead { margin-top: 12px; color: var(--muted); font-size: 1.02rem; max-width: 60ch; }
.section-ink .section-lead { color: rgba(255, 255, 255, .7); }

.page-hero { padding: clamp(36px, 5vw, 56px) 0 0; }
.page-hero .page-title { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.06; letter-spacing: -.03em; font-weight: 800; margin-top: 10px; }
.page-lead { margin-top: 10px; color: var(--muted); max-width: 64ch; }

.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tiny { font-size: .76rem; }
.strong { font-weight: 700; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.inline-list { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .9rem; }
.inline-list li { display: flex; gap: 8px; align-items: center; }

/* Flash messages */
.flash-wrap { padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.flash {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px; border-radius: var(--r);
  font-size: .92rem; border: 1px solid transparent; position: relative;
  animation: flash-in .25s ease both;
}
.flash p { flex: 1; }
.flash .icon { width: 20px; height: 20px; margin-top: 1px; }
.flash-success { background: var(--green-bg); color: #14532d; border-color: rgba(22, 101, 52, .18); }
.flash-error   { background: var(--red-bg);   color: #7f1d1d; border-color: rgba(153, 27, 27, .18); }
.flash-info    { background: var(--blue-bg);  color: #1e3a8a; border-color: rgba(30, 64, 175, .16); }
.flash-warning { background: var(--amber-bg); color: var(--amber); border-color: rgba(146, 64, 14, .18); }
.flash-close { background: none; border: 0; opacity: .6; padding: 2px; line-height: 0; }
.flash-close:hover { opacity: 1; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ */
/* 3. Buttons & badges                                                 */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .84rem 1.4rem; border-radius: var(--r-pill); border: 1.5px solid transparent;
  font-size: .93rem; font-weight: 650; line-height: 1; letter-spacing: -.01em;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
  white-space: nowrap; text-align: center;
}
.btn .icon { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand) 55%, var(--brand-3));
  color: #fff; box-shadow: 0 10px 22px -10px rgba(242, 84, 45, .65);
}
.btn-primary:hover { box-shadow: 0 16px 30px -12px rgba(242, 84, 45, .7); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); }
.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--ink); background: #fff; }
.btn-light { background: #fff; color: var(--ink); box-shadow: var(--sh-sm); }
.btn-ghost-light { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(8px); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .16); }
.btn-quiet { background: transparent; color: var(--text); padding-inline: .9rem; }
.btn-quiet:hover { background: rgba(15, 23, 42, .06); }
.btn-success { background: var(--green-soft); color: #fff; }
.btn-success:hover { background: #0b7350; }
.btn-danger { background: #fff; border-color: rgba(185, 28, 28, .35); color: var(--red); }
.btn-danger:hover { background: #fef2f2; }
.btn-warn { background: #fff; border-color: rgba(146, 64, 14, .35); color: var(--amber); }
.btn-warn:hover { background: #fffbeb; }
.btn-sm { padding: .58rem .95rem; font-size: .84rem; }
.btn-xs { padding: .42rem .7rem; font-size: .78rem; border-radius: 9px; }
.btn-sm .icon, .btn-xs .icon { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: .3rem .62rem; border-radius: var(--r-pill);
  font-size: .74rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.badge .icon { width: 13px; height: 13px; }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-blue  { background: var(--blue-bg);  color: var(--blue); }
.badge-green { background: var(--green-bg); color: #166534; }
.badge-red   { background: var(--red-bg);   color: var(--red); }
.badge-grey  { background: var(--grey-bg);  color: #4b5563; }
.badge-brand { background: rgba(242, 84, 45, .12); color: var(--brand-3); }
.badge-count { background: rgba(15, 23, 42, .1); border-radius: var(--r-pill); padding: 0 .38rem; font-size: .72rem; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: .5rem .8rem; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .9); font-size: .84rem; font-weight: 550;
  backdrop-filter: blur(6px);
}
.chip .icon { width: 16px; height: 16px; color: #ffb9a4; }

/* ------------------------------------------------------------------ */
/* 4. Header & footer                                                  */
/* ------------------------------------------------------------------ */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 246, 242, .88);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(15, 23, 42, .07);
  transition: box-shadow .2s ease;
}
.site-head.is-scrolled { box-shadow: 0 8px 30px -18px rgba(10, 15, 30, .35); }
.head-inner { display: flex; align-items: center; gap: 20px; min-height: var(--head-h); }

.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand-mark { flex: none; width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 8px 18px -8px rgba(198, 43, 60, .6); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: .95rem; font-weight: 800; letter-spacing: .07em; }
.brand-text small { font-size: .66rem; color: var(--muted); letter-spacing: .02em; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav > a {
  padding: .5rem .78rem; border-radius: var(--r-pill);
  font-size: .88rem; font-weight: 550; color: #2b3448;
  transition: background .15s ease, color .15s ease;
}
.site-nav > a:hover { background: rgba(15, 23, 42, .055); color: var(--ink); }
.site-nav > a.is-active { color: var(--brand-3); background: rgba(242, 84, 45, .09); }
.nav-cta-mobile, .nav-help { display: none; }

.head-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; align-items: center; justify-content: center;
}
.nav-toggle .nav-toggle-close { display: none; }
body.nav-open .nav-toggle .nav-toggle-open { display: none; }
body.nav-open .nav-toggle .nav-toggle-close { display: inline-flex; }

/* Footer */
.site-foot {
  background: var(--ink); color: rgba(255, 255, 255, .72);
  padding: clamp(44px, 6vw, 72px) 0 28px; margin-top: clamp(48px, 7vw, 90px);
  position: relative;
}
.site-foot::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--saffron), #fff 50%, #138808);
  opacity: .85;
}
.foot-grid {
  display: grid; grid-template-columns: 1.7fr 1.1fr 1fr 1.15fr;
  gap: 36px 28px; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.brand-foot .brand-text strong { color: #fff; }
.brand-foot .brand-text small { color: rgba(255, 255, 255, .55); }
.foot-brand p { margin-top: 16px; font-size: .9rem; max-width: 38ch; }
.foot-social { display: flex; gap: 8px; margin-top: 18px; }
.foot-social a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  color: #fff; transition: background .15s ease;
}
.foot-social a:hover { background: var(--brand); border-color: var(--brand); }
.foot-col h4 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.foot-col ul { display: flex; flex-direction: column; gap: 11px; font-size: .88rem; }
.foot-col li { display: flex; gap: 10px; align-items: flex-start; }
.foot-col li .icon { width: 16px; height: 16px; margin-top: 3px; color: #ff9b7f; }
.foot-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-bottom {
  display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between;
  padding-top: 22px; font-size: .78rem; color: rgba(255, 255, 255, .5);
}
.foot-note { display: inline-flex; align-items: center; gap: 7px; }
.foot-note .icon { width: 15px; height: 15px; }
.foot-admin { color: rgba(255, 255, 255, .65); border: 1px solid rgba(255, 255, 255, .18); padding: .35rem .7rem; border-radius: var(--r-pill); }
.foot-admin:hover { color: #fff; border-color: rgba(255, 255, 255, .4); }

/* Mobile sticky CTA */
.sticky-cta {
  display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90;
  background: rgba(10, 15, 30, .96); color: #fff; border-radius: 18px;
  padding: 12px 14px; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 20px 40px -18px rgba(10, 15, 30, .7);
  backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .12);
}
.sticky-cta strong { display: block; font-size: .86rem; }
.sticky-cta span { font-size: .72rem; color: rgba(255, 255, 255, .65); }
.sticky-cta .btn { padding: .7rem 1.1rem; font-size: .86rem; }
.sticky-spacer { display: none; height: 84px; }

/* ------------------------------------------------------------------ */
/* 5. Hero & stats                                                     */
/* ------------------------------------------------------------------ */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 45%; opacity: .62; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 12% 20%, rgba(242, 84, 45, .30), transparent 62%),
    linear-gradient(100deg, rgba(8, 12, 24, .96) 0%, rgba(8, 12, 24, .86) 42%, rgba(8, 12, 24, .38) 78%, rgba(8, 12, 24, .55) 100%),
    linear-gradient(0deg, rgba(8, 12, 24, .9), transparent 40%);
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
  padding: clamp(52px, 7vw, 88px) 0 clamp(84px, 10vw, 130px);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: .48rem .85rem .48rem .55rem; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  backdrop-filter: blur(8px);
}
.hero-badge .tricolour { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; display: grid; grid-template-rows: repeat(3, 1fr); border: 1.5px solid rgba(255, 255, 255, .5); }
.hero-badge .tricolour i { display: block; }
.hero-badge .tricolour i:nth-child(1) { background: var(--saffron); }
.hero-badge .tricolour i:nth-child(2) { background: #fff; }
.hero-badge .tricolour i:nth-child(3) { background: #138808; }
/* Presented-by line — sponsor credit above the headline. Malayalam text needs a
   font with Malayalam glyphs; the stack degrades to whatever the device has. */
.hero-presenter {
  display: flex; align-items: flex-start; gap: 10px;
  margin: -4px 0 20px; padding: .55rem .95rem .6rem .8rem;
  max-width: 100%;
  border-radius: 12px;
  border-left: 3px solid #ffb877;
  background: linear-gradient(90deg, rgba(255, 190, 130, .16), rgba(255, 255, 255, .04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .94);
  font-family: "Noto Sans Malayalam", "Noto Serif Malayalam", "Manjari", "Nirmala UI",
    "AnjaliOldLipi", "Rachana", system-ui, sans-serif;
  font-size: .97rem; line-height: 1.6; letter-spacing: 0;
  text-wrap: pretty;
}
.hero-presenter .hp-spark { color: #ffc48a; flex: none; margin-top: 3px; }
.hero-presenter strong { font-weight: 700; color: #fff; }

.hero-title {
  font-size: clamp(2.4rem, 5.4vw, 4.15rem);
  line-height: .99; letter-spacing: -.035em; font-weight: 850;
  margin: 20px 0 18px; text-wrap: balance;
}
.hero-title .grad {
  background: linear-gradient(100deg, #ffc48a 0%, #ff8a3d 35%, #ff5a3c 70%, #ff7a7a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: clamp(1rem, 1.2vw, 1.09rem); color: rgba(255, 255, 255, .78); max-width: 54ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-actions .btn-primary { padding: 1rem 1.6rem; font-size: 1rem; }
.hero-note { margin-top: 18px; display: flex; align-items: center; gap: 8px; font-size: .8rem; color: rgba(255, 255, 255, .62); }
.hero-note .icon { width: 15px; height: 15px; color: #7ee2b8; }

.hero-card {
  position: relative; border-radius: var(--r-xl); padding: 26px;
  background: linear-gradient(155deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8);
}
.hero-card::before {
  content: ""; position: absolute; inset: 0 26px auto; height: 3px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--saffron), #fff, #138808);
  opacity: .9;
}
.hero-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.hero-card-head h2 { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .7); font-weight: 700; }
.live-dot { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; color: #9df5c9; font-weight: 650; }
.live-dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .7); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); }
  70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cd-cell {
  background: rgba(8, 12, 24, .42); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px; padding: 12px 4px 10px; text-align: center;
}
.cd-num { display: block; font-size: clamp(1.5rem, 3vw, 1.95rem); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.cd-lab { display: block; margin-top: 6px; font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .55); font-weight: 650; }
.hero-card-list { margin-top: 18px; display: flex; flex-direction: column; gap: 0; }
.hero-card-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-top: 1px dashed rgba(255, 255, 255, .16); font-size: .84rem;
}
.hero-card-list span { color: rgba(255, 255, 255, .6); }
.hero-card-list strong { font-weight: 650; text-align: right; }
.hero-card .btn { margin-top: 16px; }

/* Stat ribbon */
.stat-ribbon { position: relative; z-index: 5; margin-top: clamp(-72px, -6vw, -48px); }
.stat-ribbon-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  border: 1px solid var(--line); overflow: hidden;
}
.stat-item { padding: 22px 24px; display: flex; gap: 14px; align-items: center; border-right: 1px solid var(--line); }
.stat-item:last-child { border-right: 0; }
.stat-icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, rgba(242, 84, 45, .12), rgba(255, 138, 61, .16)); color: var(--brand-3);
}
.stat-icon .icon { width: 22px; height: 22px; }
.stat-item strong { display: block; font-size: 1.18rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.stat-item span { font-size: .78rem; color: var(--muted); }

/* ------------------------------------------------------------------ */
/* 6. Cards, sections, FAQ                                             */
/* ------------------------------------------------------------------ */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.card-pad { padding: clamp(18px, 3vw, 28px); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-head h2, .card-head h3 { font-size: 1.06rem; letter-spacing: -.01em; font-weight: 750; }
.card-head p { font-size: .82rem; color: var(--muted); }

/* About / inclusions */
.incl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.incl {
  padding: 20px; border-radius: var(--r); background: #fff; border: 1px solid var(--line);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.incl:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: rgba(242, 84, 45, .3); }
.incl .incl-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(242, 84, 45, .09); color: var(--brand-3); margin-bottom: 14px;
}
.incl h3 { font-size: .95rem; font-weight: 700; margin-bottom: 5px; }
.incl p { font-size: .82rem; color: var(--muted); line-height: 1.5; }

.split-media { position: relative; }
.split-media img { border-radius: var(--r-xl); box-shadow: var(--sh-lg); aspect-ratio: 4 / 3.4; object-fit: cover; width: 100%; }
.media-badge {
  position: absolute; left: 18px; bottom: 18px; background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px); border-radius: 16px; padding: 12px 16px;
  box-shadow: var(--sh); display: flex; align-items: center; gap: 12px;
}
.media-badge strong { display: block; font-size: .95rem; letter-spacing: -.01em; }
.media-badge span { font-size: .74rem; color: var(--muted); }
.media-badge .stat-icon { width: 38px; height: 38px; }

.check-list { display: flex; flex-direction: column; gap: 11px; margin-top: 22px; }
.check-list li { display: flex; gap: 11px; align-items: flex-start; font-size: .92rem; color: #2f3a4f; }
.check-list .icon { color: var(--green-soft); width: 19px; height: 19px; margin-top: 2px; flex: none; }

/* Categories */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.cat-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px 22px 22px; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cat-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background: linear-gradient(90deg, var(--saffron), var(--brand), var(--brand-3));
  opacity: 0; transition: opacity .18s ease;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--line-strong); }
.cat-card:hover::before { opacity: 1; }
.cat-tag {
  position: absolute; right: 14px; top: 14px; font-size: .64rem; font-weight: 750;
  letter-spacing: .08em; text-transform: uppercase; padding: .28rem .55rem; border-radius: var(--r-pill);
  background: var(--ink); color: #fff;
}
.cat-tag.tag-brand { background: var(--brand); }
.cat-dist { font-size: 2.5rem; font-weight: 850; letter-spacing: -.045em; line-height: 1; }
.cat-dist small { font-size: .95rem; font-weight: 650; letter-spacing: 0; color: var(--muted); margin-left: 2px; }
.cat-name { font-size: .95rem; font-weight: 700; margin-top: 8px; }
.cat-time { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.cat-time .icon { width: 14px; height: 14px; }
.cat-desc { font-size: .82rem; color: var(--muted); margin-top: 10px; min-height: 2.6em; }
.cat-fee { margin: 16px 0 0; padding-top: 16px; border-top: 1px dashed var(--line-strong); display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cat-fee strong { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.cat-fee span { font-size: .72rem; color: var(--muted); }
.slots { margin-top: 12px; }
.slots-bar { height: 6px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.slots-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green-soft), #34d399); }
.slots-bar.is-tight i { background: linear-gradient(90deg, var(--brand-2), var(--brand-3)); }
.slots-text { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 6px; }
.cat-card .btn { margin-top: 18px; }
.cat-card.is-full { opacity: .72; }

/* How it works */
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: how; }
.how-card { position: relative; padding: 26px 24px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r-lg); }
.how-num {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: .95rem; color: #fff; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand-3));
  box-shadow: 0 10px 24px -10px rgba(242, 84, 45, .8);
}
.how-card h3 { font-size: 1.05rem; font-weight: 750; color: #fff; margin-bottom: 6px; }
.how-card p { font-size: .88rem; color: rgba(255, 255, 255, .68); }
.how-card .how-foot { margin-top: 14px; font-size: .76rem; color: #ffb9a4; display: inline-flex; align-items: center; gap: 6px; }
.how-card .how-foot .icon { width: 14px; height: 14px; }

/* Schedule */
.timeline { position: relative; display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 110px 28px minmax(0, 1fr); gap: 0 14px; }
.tl-time { font-size: .85rem; font-weight: 700; color: var(--brand-3); padding-top: 2px; text-align: right; font-variant-numeric: tabular-nums; }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before { content: ""; position: absolute; top: 6px; bottom: -6px; width: 2px; background: var(--paper-2); }
.tl-item:last-child .tl-rail::before { display: none; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); margin-top: 4px; z-index: 1; }
.tl-item.is-muted .tl-dot { border-color: var(--muted-2); }
.tl-body { padding: 0 0 24px; }
.tl-body h3 { font-size: .98rem; font-weight: 700; }
.tl-body p { font-size: .84rem; color: var(--muted); }
.tl-badge { margin-left: 8px; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 860px; margin-inline: auto; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 0 18px; transition: box-shadow .18s ease, border-color .18s ease;
}
.faq details[open] { box-shadow: var(--sh); border-color: rgba(242, 84, 45, .35); }
.faq summary {
  list-style: none; cursor: pointer; padding: 17px 0; display: flex; align-items: center; gap: 14px;
  font-weight: 650; font-size: .95rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; margin-left: auto; width: 10px; height: 10px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .faq-a { padding: 0 0 18px; font-size: .89rem; color: var(--muted); max-width: 72ch; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; background: var(--ink); color: #fff; border-radius: var(--r-xl); padding: clamp(28px, 4vw, 52px); }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(520px 260px at 88% 12%, rgba(242, 84, 45, .40), transparent 60%),
    radial-gradient(400px 200px at 10% 90%, rgba(19, 136, 8, .18), transparent 65%);
}
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.025em; line-height: 1.1; max-width: 22ch; }
.cta-band p { color: rgba(255, 255, 255, .72); margin-top: 10px; max-width: 52ch; font-size: .95rem; }
.cta-band .btn-row { margin-top: 24px; }
.cta-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.cta-side { display: flex; flex-direction: column; gap: 12px; }
.cta-side .chip { justify-content: flex-start; }

/* Empty state */
.empty-state { text-align: center; padding: clamp(32px, 6vw, 64px) 24px; max-width: 620px; margin-inline: auto; }
.empty-icon {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 18px;
  background: rgba(242, 84, 45, .1); color: var(--brand-3);
}
.empty-icon .icon { width: 30px; height: 30px; }
.empty-state .page-title { margin-bottom: 10px; }
.empty-state .page-lead { margin-inline: auto; }
.empty-state .btn-row { justify-content: center; margin-top: 24px; }

/* Legal / prose */
.prose { max-width: 76ch; }
.prose h2 { font-size: 1.25rem; letter-spacing: -.015em; margin: 30px 0 10px; }
.prose h3 { font-size: 1rem; margin: 22px 0 8px; }
.prose p, .prose li { color: #37415a; font-size: .94rem; }
.prose p { margin-bottom: 12px; }
.prose ul { list-style: disc; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.prose ul li::marker { color: var(--brand); }
.prose .notice { background: var(--amber-bg); border: 1px solid rgba(146, 64, 14, .18); color: var(--amber); padding: 14px 16px; border-radius: 12px; font-size: .88rem; }
/* ------------------------------------------------------------------ */
/* 7. Forms, wizard, payment, status, pass                            */
/* ------------------------------------------------------------------ */
.form-shell {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(20px, 3.5vw, 34px); align-items: start;
}
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(20px, 3.4vw, 38px); box-shadow: var(--sh);
}
.aside-card { position: sticky; top: calc(var(--head-h) + 20px); display: flex; flex-direction: column; gap: 16px; }
.aside-card .card { padding: 20px; }

/* Wizard progress */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 28px; }
.step {
  display: flex; align-items: center; gap: 9px; padding-bottom: 10px;
  border-bottom: 3px solid var(--paper-2); font-size: .8rem; font-weight: 650; color: var(--muted-2);
  transition: color .2s ease, border-color .2s ease;
}
.step i {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--paper-2); color: var(--muted); font-style: normal; font-size: .72rem; font-weight: 750;
  transition: background .2s ease, color .2s ease;
}
.step.is-active { color: var(--ink); border-color: var(--brand); }
.step.is-active i { background: var(--brand); color: #fff; }
.step.is-done { color: var(--green-soft); border-color: rgba(15, 138, 95, .4); }
.step.is-done i { background: var(--green-bg); color: var(--green-soft); }

.wizard-step { display: none; }
.wizard-step.is-active { display: block; animation: step-in .28s ease both; }
html.no-js .wizard-step { display: block; margin-bottom: 28px; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step-heading { margin-bottom: 22px; }
.step-heading h2 { font-size: 1.22rem; letter-spacing: -.015em; font-weight: 758; }
.step-heading p { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.wizard-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.wizard-nav .btn { min-width: 120px; }

/* Fields */
.field { margin-bottom: 18px; min-width: 0; }
.field > label, .label {
  display: flex; align-items: center; gap: 5px; margin-bottom: 7px;
  font-size: .86rem; font-weight: 650; color: #263047;
}
.req { color: var(--brand); font-weight: 800; }
.optional { font-weight: 500; color: var(--muted-2); font-size: .76rem; }
.input, .select, .textarea {
  width: 100%; padding: .8rem .95rem; border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm); background: #fff; color: var(--text);
  font: inherit; font-size: .94rem; line-height: 1.45;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: #a3aab8; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(242, 84, 45, .13);
}
.textarea { min-height: 92px; resize: vertical; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235c6579' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9.5 12 15.5 18 9.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.input-uppercase { text-transform: uppercase; letter-spacing: .04em; font-family: var(--mono); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.hint { font-size: .77rem; color: var(--muted-2); margin-top: 6px; line-height: 1.45; }
.hint a { color: var(--brand-3); text-decoration: underline; text-underline-offset: 2px; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: #e11d48; background: #fff8f9; }
.err-msg { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: .78rem; color: #be123c; font-weight: 550; }
.err-msg .icon { width: 14px; height: 14px; margin-top: 2px; flex: none; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group .input-addon {
  display: flex; align-items: center; padding: 0 .85rem; background: var(--paper-2);
  border: 1.5px solid var(--line-strong); border-left: 0; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: .85rem; color: var(--muted); font-weight: 600; white-space: nowrap;
}

/* Radio cards (race category picker) */
.radio-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.radio-card { position: relative; display: block; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card .rc-body {
  display: block; height: 100%;
  border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 13px 30px 13px 14px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  background: #fff;
}
.radio-card .rc-title {
  display: flex; align-items: baseline; justify-content: flex-start; gap: 6px;
  font-weight: 750; font-size: 1.02rem; letter-spacing: -.02em; line-height: 1.2;
}
.radio-card .rc-title span { font-size: .7rem; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: auto; white-space: nowrap; }
.radio-card .rc-sub { display: block; font-size: .76rem; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.radio-card input:checked + .rc-body {
  border-color: var(--brand); background: linear-gradient(160deg, #fff6f2, #fff);
  box-shadow: 0 0 0 3px rgba(242, 84, 45, .12);
}
.radio-card input:checked + .rc-body::after {
  content: ""; position: absolute; top: 10px; right: 12px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--brand);
}
.radio-card input:focus-visible + .rc-body { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.radio-card.is-disabled { opacity: .45; pointer-events: none; }

/* Checkbox */
.check { display: flex; align-items: flex-start; gap: 11px; font-size: .86rem; color: #333d52; cursor: pointer; line-height: 1.55; }
.check input { width: 19px; height: 19px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.check a { color: var(--brand-3); text-decoration: underline; text-underline-offset: 2px; }
.consent-box { background: #fbfaf7; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.consent-box.has-error { border-color: #e11d48; background: #fff8f9; box-shadow: 0 0 0 4px rgba(225, 29, 72, .08); }

/* Upload */
.upload-zone {
  position: relative; display: block; border: 1.6px dashed var(--line-strong); border-radius: 14px;
  padding: 20px 16px; text-align: center; background: #fbfaf7; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.upload-zone:hover { border-color: var(--brand); background: #fff8f5; }
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-zone .uz-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin: 0 auto 10px; background: rgba(242, 84, 45, .1); color: var(--brand-3); }
.upload-zone strong { display: block; font-size: .88rem; }
.upload-zone span { font-size: .76rem; color: var(--muted); }
.upload-zone.has-file { border-style: solid; border-color: rgba(15, 138, 95, .5); background: #f4fbf8; }
.upload-preview { margin-top: 12px; display: none; }
.upload-preview img { max-height: 170px; border-radius: 10px; border: 1px solid var(--line); margin-inline: auto; }
.upload-preview.is-visible { display: block; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--green-soft); font-weight: 600; }

/* Summary / KV lists */
.summary-card { background: #fbfaf7; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.summary-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.summary-head h3 { font-size: .92rem; font-weight: 750; }
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .85rem; }
.kv:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 650; text-align: right; }
.kv.kv-total { border-top: 1.5px solid var(--line-strong); border-bottom: 0; margin-top: 6px; padding-top: 12px; font-size: .95rem; }
.kv.kv-total dd { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }

/* Payment page */
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: clamp(20px, 3.5vw, 34px); align-items: start; }
.qr-card { position: sticky; top: calc(var(--head-h) + 20px); }
.qr-panel { text-align: center; }
.qr-frame {
  width: 216px; margin: 14px auto; padding: 10px; background: #fff;
  border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--sh-sm);
}
.qr-frame img { width: 100%; height: auto; border-radius: 6px; }
.qr-caption { font-size: .78rem; color: var(--muted); }
.upi-box {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 10px 9px 13px; margin-top: 14px;
}
.upi-box code { font-family: var(--mono); font-size: .85rem; font-weight: 650; overflow-wrap: anywhere; }
.upi-amount { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 4px; }
.upi-amount strong { font-size: 1.75rem; font-weight: 820; letter-spacing: -.03em; }
.upi-amount span { font-size: .78rem; color: var(--muted); }
.pay-steps { display: flex; flex-direction: column; gap: 0; counter-reset: pay; }
.pay-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding-bottom: 22px; position: relative; }
.pay-step::before {
  counter-increment: pay; content: counter(pay);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-size: .8rem; font-weight: 700;
}
.pay-step:not(:last-child)::after {
  content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; background: var(--paper-2);
}
.pay-step h3 { font-size: .94rem; font-weight: 700; margin-bottom: 3px; }
.pay-step p { font-size: .84rem; color: var(--muted); }
.hold-banner {
  display: flex; align-items: center; gap: 12px; background: var(--amber-bg); color: var(--amber);
  border: 1px solid rgba(146, 64, 14, .2); border-radius: 14px; padding: 13px 15px; font-size: .85rem;
}
.hold-banner .icon { flex: none; }
.hold-banner strong { font-variant-numeric: tabular-nums; }
.pay-trust { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .76rem; color: var(--muted); margin-top: 14px; }
.pay-trust span { display: inline-flex; align-items: center; gap: 6px; }
.pay-trust .icon { width: 14px; height: 14px; color: var(--green-soft); }
.apps-note { margin-top: 10px; font-size: .74rem; color: var(--muted-2); }

/* Registration reference banner */
.ref-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(120deg, var(--ink), #16233f); color: #fff;
  border-radius: var(--r-lg); padding: 18px 22px;
}
.ref-banner .ref-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; color: rgba(255, 255, 255, .55); }
.ref-banner .ref-code { font-family: var(--mono); font-size: 1.35rem; font-weight: 700; letter-spacing: .12em; }
.ref-banner .ref-phone { font-size: .78rem; color: rgba(255, 255, 255, .62); }

/* Status page */
.status-shell { max-width: 860px; margin-inline: auto; }
.status-card { overflow: hidden; }
.status-top {
  padding: 26px clamp(18px, 3vw, 30px); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  background: linear-gradient(140deg, #fff, #fbfaf7);
}
.status-person { display: flex; align-items: center; gap: 14px; min-width: 0; }
.status-avatar {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, rgba(242, 84, 45, .16), rgba(255, 138, 61, .2));
  color: var(--brand-3); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em;
}
.status-person h2 { font-size: 1.14rem; font-weight: 780; letter-spacing: -.015em; }
.status-person p { font-size: .82rem; color: var(--muted); }
.status-body { padding: clamp(18px, 3vw, 30px); }
.status-note { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; font-size: .86rem; margin-bottom: 20px; }
.status-note.tone-amber { background: var(--amber-bg); color: var(--amber); }
.status-note.tone-blue  { background: var(--blue-bg);  color: var(--blue); }
.status-note.tone-green { background: var(--green-bg); color: #166534; }
.status-note.tone-red   { background: var(--red-bg);   color: var(--red); }
.status-note.tone-grey  { background: var(--grey-bg);  color: #4b5563; }
.status-note .icon { flex: none; margin-top: 1px; }
.status-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 8px 0 26px; }
.track-item { position: relative; text-align: center; padding-top: 34px; font-size: .74rem; color: var(--muted-2); font-weight: 600; }
.track-item::before {
  content: ""; position: absolute; top: 13px; left: 50%; transform: translateX(-50%);
  width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--paper-2); z-index: 2;
}
.track-item::after { content: ""; position: absolute; top: 19px; left: 50%; width: 100%; height: 2px; background: var(--paper-2); z-index: 1; }
.track-item:last-child::after { display: none; }
.track-item.is-done { color: var(--green-soft); }
.track-item.is-done::before { border-color: var(--green-soft); background: var(--green-soft); }
.track-item.is-done::after { background: rgba(15, 138, 95, .35); }
.track-item.is-current { color: var(--ink); }
.track-item.is-current::before { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(242, 84, 45, .18); }
.status-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.lookup-card { max-width: 560px; margin-inline: auto; }
.lookup-form { display: flex; flex-direction: column; gap: 0; }
.lookup-form .btn { margin-top: 6px; }

/* Entry pass */
.pass {
  max-width: 720px; margin-inline: auto; background: #fff; border-radius: var(--r-xl);
  overflow: hidden; border: 1px solid var(--line); box-shadow: var(--sh-lg); position: relative;
}
.pass-top { position: relative; background: linear-gradient(120deg, #0a0f1e, #16233f 55%, #3b1d22); color: #fff; padding: clamp(22px, 4vw, 34px); }
.pass-top::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--saffron), #fff, #138808); }
.pass-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.pass-event { display: flex; align-items: center; gap: 11px; }
.pass-event strong { display: block; font-size: .92rem; letter-spacing: .08em; font-weight: 800; }
.pass-event span { font-size: .7rem; color: rgba(255, 255, 255, .6); }
.pass-status { font-size: .7rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; padding: .4rem .7rem; border-radius: var(--r-pill); background: rgba(34, 197, 94, .18); color: #86efac; border: 1px solid rgba(134, 239, 172, .35); }
.pass-status.is-pending { background: rgba(251, 191, 36, .16); color: #fcd34d; border-color: rgba(252, 211, 77, .35); }
.pass-ref { margin-top: 26px; }
.pass-ref small { display: block; font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.pass-ref strong { font-family: var(--mono); font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: .14em; font-weight: 700; }
.pass-meta { display: flex; flex-wrap: wrap; gap: 18px 28px; margin-top: 20px; }
.pass-meta div small { display: block; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .45); margin-bottom: 3px; }
.pass-meta div strong { font-size: .92rem; font-weight: 650; }
.pass-tear { display: none; }
.pass-dashed { border-top: 2px dashed var(--line-strong); margin: 14px 26px 0; }
.pass-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; padding: clamp(20px, 4vw, 30px); align-items: start; }
.pass-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.pass-details .pd small { display: block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 2px; }
.pass-details .pd strong { font-size: .92rem; font-weight: 650; }
.pass-qr { text-align: center; }
.pass-qr img { width: 140px; height: 140px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
.pass-qr span { display: block; font-size: .66rem; color: var(--muted-2); margin-top: 6px; letter-spacing: .08em; text-transform: uppercase; }
.pass-foot { padding: 14px clamp(20px, 4vw, 30px); background: #fbfaf7; border-top: 1px solid var(--line); font-size: .74rem; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.pass-note { font-size: .78rem; color: var(--muted); text-align: center; margin-top: 16px; }

/* Tables & toolbar */
.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; min-width: 780px; }
table.data th {
  text-align: left; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); background: #fafaf7; padding: 12px 16px;
  border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 700; position: sticky; top: 0; z-index: 1;
}
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: .86rem; vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fffdf9; }
table.data .t-main { font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 10px; }
table.data .t-sub { font-size: .76rem; color: var(--muted); }
table.data .t-num { font-variant-numeric: tabular-nums; }
table.data .t-right { text-align: right; }
/* Status lookup — mobile-only result list */
.lookup-result {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.lookup-result + .lookup-result { margin-top: 10px; }
.lookup-result strong { font-size: .95rem; letter-spacing: .02em; }

/* Compact inputs inside table rows (form builder) */
.input-sm { padding: 7px 10px !important; font-size: .82rem !important; border-radius: 9px !important; }
table.data tr.is-dim td { background: #fbfbf9; }
table.data tr.is-dim strong { color: var(--muted); }

/* Core-field table: comfortable columns, horizontal scroll when tight */
table.data#coreFields { min-width: 900px; }
table.data#coreFields th:nth-child(1) { width: 30%; }
table.data#coreFields th:nth-child(2),
table.data#coreFields th:nth-child(3) { width: 90px; }
table.data#coreFields td .input-sm { min-width: 150px; }

/* Form-builder table stacks on phones instead of scrolling sideways */
@media (max-width: 720px) {
  table.data.stack-sm { min-width: 0; }
  table.data.stack-sm thead { display: none; }
  table.data.stack-sm tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.data.stack-sm td { display: block; padding: 0; border: 0; }
  table.data.stack-sm td::before { content: attr(data-label); display: block; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
  table.data.stack-sm td:first-child { grid-column: 1 / -1; }
  table.data.stack-sm td:nth-child(4), table.data.stack-sm td:nth-child(5) { grid-column: 1 / -1; }
}

.row-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: rgba(242, 84, 45, .1); color: var(--brand-3); font-size: .72rem; font-weight: 750;
}
.table-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 16px; border-top: 1px solid var(--line); background: #fbfaf7; font-size: .8rem; color: var(--muted); }
.pager { display: flex; align-items: center; gap: 6px; }
.pager-btn { padding: .4rem .7rem; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; font-size: .8rem; font-weight: 600; }
.pager-btn:hover { border-color: var(--ink); }
.pager-btn.is-disabled { opacity: .4; pointer-events: none; }
.pager-info { font-size: .78rem; color: var(--muted); padding-inline: 6px; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px;
}
.search-field { position: relative; flex: 1; min-width: 200px; }
.search-field .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted-2); }
.search-field .input { padding-left: 38px; }
.toolbar .select, .toolbar .input { padding: .58rem .8rem; font-size: .85rem; border-radius: 10px; }
.toolbar .search-field .input { padding-left: 38px; }
.search-field .icon { pointer-events: none; }
.toolbar .select { flex: 0 1 200px; width: auto; min-width: 150px; padding-right: 36px; background-position: right 10px center; }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: .42rem .75rem; border-radius: var(--r-pill);
  font-size: .79rem; font-weight: 650; background: #fff; border: 1px solid var(--line); color: var(--muted);
}
.filter-tab:hover { border-color: var(--line-strong); color: var(--ink); }
.filter-tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter-tab em { font-style: normal; font-size: .7rem; opacity: .7; }

.row-actions { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.row-actions .btn.btn-xs { padding: .3rem .5rem; }
.row-actions .btn.btn-xs .icon { width: 15px; height: 15px; }

.checkin-head-right { display: flex; align-items: center; gap: 10px; flex: none; }
.checkin-bib { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }

/* ------------------------------------------------------------------ */
/* 8. Admin console                                                    */
/* ------------------------------------------------------------------ */
.admin-body { background: #f2f3f8; }
.admin-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }

.admin-side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(185deg, #0a0f1e 0%, #0d1428 60%, #101a30 100%);
  color: #fff; padding: 20px 14px 16px; overflow-y: auto; z-index: 60;
}
.admin-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 8px; }
.brand-admin .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.brand-admin .brand-text { min-width: 0; }
.brand-admin .brand-text strong,
.brand-admin .brand-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.brand-admin .brand-text strong { color: #fff; font-size: .9rem; }
.brand-admin .brand-text small { color: rgba(255, 255, 255, .45); font-size: .62rem; }
.side-close { display: none; background: rgba(255, 255, 255, .07); border: 0; border-radius: 9px; width: 34px; height: 34px; color: #fff; place-items: center; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; margin-top: 8px; }
.side-label {
  font-size: .63rem; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255, 255, 255, .32); margin: 18px 10px 7px; font-weight: 700;
}
.side-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  color: rgba(255, 255, 255, .7); font-size: .875rem; font-weight: 550;
  transition: background .15s ease, color .15s ease; position: relative;
}
.side-link .icon { width: 18px; height: 18px; opacity: .8; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-link.is-active { background: rgba(242, 84, 45, .15); color: #fff; }
.side-link.is-active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.side-link.is-active .icon { opacity: 1; color: #ff9b7f; }
.side-badge { margin-left: auto; background: var(--brand); color: #fff; font-style: normal; font-size: .66rem; font-weight: 750; border-radius: var(--r-pill); padding: .08rem .42rem; }
.side-user { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: rgba(242, 84, 45, .18); color: #ffb59e; font-size: .76rem; font-weight: 750;
}
.side-user strong { display: block; font-size: .82rem; color: #fff; line-height: 1.2; }
.side-user small { font-size: .68rem; color: rgba(255, 255, 255, .45); }
.side-logout { margin-left: auto; color: rgba(255, 255, 255, .5); padding: 6px; border-radius: 8px; }
.side-logout:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-top {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px;
  padding: 13px clamp(16px, 3vw, 30px); background: rgba(242, 243, 248, .92);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.admin-top-title { min-width: 0; }
.crumb { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); font-weight: 650; }
.admin-top h1 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); letter-spacing: -.02em; font-weight: 780; line-height: 1.2; }
.admin-top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.drawer-btn { display: none; width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line); background: #fff; place-items: center; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: .3rem .6rem; border-radius: var(--r-pill); font-size: .74rem; font-weight: 650; }
.pill-blue { background: #e0e7ff; color: #3730a3; }
.pill .icon { width: 13px; height: 13px; }

.admin-content { padding: clamp(16px, 2.6vw, 30px); display: flex; flex-direction: column; gap: 20px; flex: 1; }
.admin-foot {
  margin-top: auto; padding: 16px clamp(16px, 3vw, 30px); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  font-size: .74rem; color: var(--muted-2);
}

.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
/* The dashboard has five KPIs once check-in is in use. */
.stat-cards:has(> :nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  position: relative; overflow: hidden; box-shadow: var(--sh-sm);
}
.stat-card .stat-label { display: block; padding-right: 46px; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 650; line-height: 1.3; }
.stat-card .stat-value { display: block; font-size: 1.85rem; font-weight: 820; letter-spacing: -.03em; line-height: 1.15; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-card .stat-foot { display: block; font-size: .74rem; color: var(--muted); margin-top: 3px; }
.stat-card .stat-badge { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.stat-card .stat-badge .icon { width: 19px; height: 19px; }
.sb-amber { background: var(--amber-bg); color: var(--amber); }
.sb-blue { background: var(--blue-bg); color: var(--blue); }
.sb-green { background: var(--green-bg); color: #166534; }
.sb-brand { background: rgba(242, 84, 45, .12); color: var(--brand-3); }
.stat-card.is-alert { border-color: rgba(242, 84, 45, .45); }

.stat-card { text-decoration: none; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: .95rem; font-weight: 750; letter-spacing: -.01em; }
.panel-head p { font-size: .76rem; color: var(--muted); }
.panel-body { padding: 16px 18px; }
.panel-body.flush { padding: 0; }
.panel-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: #fbfaf7; font-size: .78rem; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

.queue-item { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.queue-item:last-child { border-bottom: 0; }
.queue-item:hover { background: #fffdf9; }
.queue-item .qi-main { min-width: 0; flex: 1; }
.queue-item .qi-main strong { display: block; font-size: .88rem; font-weight: 650; }
.queue-item .qi-main span { font-size: .75rem; color: var(--muted); }
.queue-item .qi-amount { text-align: right; font-size: .85rem; font-weight: 700; }
.queue-item .qi-amount small { display: block; font-size: .7rem; color: var(--muted); font-weight: 500; }

.mini-bar { display: flex; flex-direction: column; gap: 12px; }
.mini-bar .mb-row { display: flex; flex-direction: column; gap: 5px; }
.mb-top { display: flex; justify-content: space-between; font-size: .8rem; }
.mb-top span { color: var(--muted); }
.mb-top strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.mb-track { height: 7px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.mb-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }

.review-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.detail-grid .dg small { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 2px; }
.detail-grid .dg strong, .detail-grid .dg span { font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.screenshot-box { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fbfaf7; }
.screenshot-box img { width: 100%; max-height: 460px; object-fit: contain; }
.screenshot-box iframe { width: 100%; height: 420px; border: 0; }
.screenshot-empty { padding: 30px 16px; text-align: center; color: var(--muted-2); font-size: .82rem; }
.action-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.action-bar .spacer { flex: 1; }
.note-editor { display: flex; flex-direction: column; gap: 8px; }
.note-editor .textarea { min-height: 74px; font-size: .86rem; }

/* Auth pages */
.auth-body {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(242, 84, 45, .18), transparent 60%),
    radial-gradient(700px 400px at 90% 90%, rgba(19, 136, 8, .1), transparent 60%),
    #0a0f1e;
}
.auth-shell { width: min(430px, 100%); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 22px; color: #fff; }
.auth-brand .brand-text strong { color: #fff; }
.auth-brand .brand-text small { color: rgba(255, 255, 255, .5); }
.auth-card { background: #fff; border-radius: 22px; padding: clamp(24px, 5vw, 34px); box-shadow: var(--sh-lg); }
.auth-card h1 { font-size: 1.35rem; letter-spacing: -.02em; font-weight: 800; }
.auth-card .auth-lead { font-size: .87rem; color: var(--muted); margin-top: 4px; margin-bottom: 22px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: .78rem; color: rgba(255, 255, 255, .5); }
.auth-foot a { color: rgba(255, 255, 255, .8); text-decoration: underline; text-underline-offset: 3px; }
.auth-demo { margin-top: 16px; font-size: .74rem; color: var(--muted); background: #fbfaf7; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 10px 12px; }
.password-field { position: relative; }
.password-field .input { padding-right: 46px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 8px; color: var(--muted-2); border-radius: 8px; line-height: 0; }
.password-toggle:hover { color: var(--ink); }

/* Utilities for admin */
.grid-2-admin { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-narrow { max-width: 640px; }
.inline-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.divider-label { display: flex; align-items: center; gap: 12px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; margin: 26px 0 16px; }
.divider-label::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.toast-note { font-size: .8rem; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 1120px) {
  .incl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-ribbon-inner { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: 0; }
  .stat-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .form-shell { grid-template-columns: minmax(0, 1fr); }
  .aside-card { position: static; flex-direction: row; flex-wrap: wrap; }
  .aside-card .card { flex: 1; min-width: 260px; }
  .pay-grid { grid-template-columns: minmax(0, 1fr); }
  .qr-card { position: static; }
  .dash-grid, .review-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-card { max-width: 520px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 940px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-side {
    position: fixed; inset: 0 auto 0 0; width: 272px; height: 100dvh;
    transform: translateX(-102%); transition: transform .24s ease; z-index: 120;
    box-shadow: 0 0 60px rgba(0, 0, 0, .5);
  }
  body.drawer-open .admin-side { transform: none; }
  .side-close { display: grid; }
  .drawer-btn { display: grid; }
  .drawer-scrim { position: fixed; inset: 0; background: rgba(8, 12, 24, .55); z-index: 110; backdrop-filter: blur(2px); }
  .drawer-scrim[hidden] { display: none; }
  .admin-foot { padding-bottom: 24px; }
}

@media (max-width: 900px) {
  :root { --head-h: 64px; }
  .head-inner { gap: 10px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-text strong { font-size: .85rem; }
  .brand-text small { font-size: .6rem; }
  .site-nav {
    position: fixed; inset: var(--head-h) 0 auto; margin: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fffdf9; border-bottom: 1px solid var(--line);
    padding: 12px 16px 20px; box-shadow: 0 30px 50px -20px rgba(10, 15, 30, .4);
    transform: translateY(-140%); opacity: 0; visibility: hidden;
    transition: transform .25s ease, opacity .2s ease, visibility .2s;
    max-height: calc(100dvh - var(--head-h)); overflow-y: auto;
  }
  body.nav-open .site-nav { transform: none; opacity: 1; visibility: visible; }
  .site-nav > a { padding: .8rem .6rem; border-radius: 10px; font-size: .95rem; color: #1c2745; border-bottom: 1px solid rgba(15, 23, 42, .05); }
  .site-nav > a:hover { background: rgba(15, 23, 42, .04); color: var(--ink); }
  .site-nav > a:last-of-type { border-bottom: 0; }
  .site-nav > a.nav-cta-mobile {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 10px; padding: .85rem; border-radius: 12px; background: var(--ink); color: #fff;
    font-weight: 650; font-size: .92rem; border-bottom: 0;
  }
  .site-nav > a.nav-cta-mobile:hover { background: var(--ink-3); color: #fff; }
  .nav-help { display: flex; flex-direction: column; gap: 2px; padding: 12px 6px 0; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 8px; }
  .nav-help a { font-weight: 650; color: var(--brand-3); }
  .nav-toggle { display: flex; }
  .head-actions .btn-primary { padding: .62rem .95rem; font-size: .84rem; }
  .head-actions .btn-primary .icon { display: none; }
  .sticky-cta { display: flex; }
  .sticky-spacer { display: block; }
  .site-foot { margin-top: 40px; padding-bottom: 92px; }
  .foot-bottom { justify-content: flex-start; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-media { order: -1; }
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .cta-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-2, .grid-3, .grid-4, .grid-2-admin { grid-template-columns: minmax(0, 1fr); }
  .pass-body { grid-template-columns: minmax(0, 1fr); }
  .pass-qr { text-align: left; display: flex; align-items: center; gap: 14px; }
  .pass-qr img { width: 104px; height: 104px; }
  .pass-qr span { margin-top: 0; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .hide-sm { display: none !important; }
  .hero-grid { padding-top: 36px; padding-bottom: 88px; gap: 26px; }
  .hero-title { font-size: clamp(2.15rem, 9.4vw, 3rem); }
  .hero-badge { font-size: .72rem; }
  .hero-presenter { font-size: .87rem; line-height: 1.62; padding: .5rem .8rem .55rem .7rem; margin: 0 0 16px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-card { padding: 20px; }
  .countdown { gap: 6px; }
  .cd-cell { padding: 10px 2px 9px; }
  .stat-ribbon { margin-top: -60px; }
  .stat-item { padding: 16px; gap: 10px; }
  .stat-icon { width: 38px; height: 38px; border-radius: 11px; }
  .stat-item strong { font-size: 1rem; }
  .stat-item span { font-size: .72rem; }
  .incl-grid { grid-template-columns: minmax(0, 1fr); }
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .cat-dist { font-size: 2.2rem; }
  .field-grid, .field-grid-3 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps { gap: 6px; }
  .step { font-size: 0; gap: 0; justify-content: center; padding-bottom: 8px; }
  .step i { font-size: .72rem; }
  .step.is-active i { box-shadow: 0 0 0 4px rgba(242, 84, 45, .15); }
  .wizard-nav .btn { flex: 1; }
  .wizard-nav .btn-back { flex: 0 0 auto; min-width: 96px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .cta-band { border-radius: 22px; }
  .tl-item { grid-template-columns: 84px 22px minmax(0, 1fr); gap: 0 10px; }
  .tl-time { font-size: .76rem; }
  .status-top { align-items: flex-start; }
  .status-track { margin-bottom: 20px; }
  .track-item { font-size: .68rem; }
  .pass-details { grid-template-columns: minmax(0, 1fr); }
  .stat-cards { grid-template-columns: minmax(0, 1fr); }
  .admin-top { flex-wrap: nowrap; gap: 10px; }
  .admin-top-actions { width: auto; margin-left: auto; }
  .admin-top-actions .btn { flex: none; }
  .table-card { border-radius: 14px; }
  .toolbar { padding: 10px; }
  .toolbar .select { flex: 1; min-width: 0; }
  .filter-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; width: 100%; scrollbar-width: none; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-tab { flex: none; }
  .admin-content { padding: 14px; }
  .panel-body { padding: 14px; }
  .action-bar { flex-direction: column; align-items: stretch; }
  .action-bar .btn { width: 100%; }
  .action-bar .spacer { display: none; }
  .qr-frame { width: 190px; }
  .upi-box { flex-wrap: wrap; }
  .ref-banner { padding: 16px; }
  .ref-banner .ref-code { font-size: 1.15rem; }
  .section-head { margin-bottom: 24px; }
  .faq details { padding: 0 14px; }
  .faq summary { font-size: .9rem; }
}

@media (max-width: 420px) {
  .brand-text small { display: none; }
  .stat-item { padding: 13px; }
  .cd-num { font-size: 1.3rem; }
  .cd-lab { font-size: .52rem; letter-spacing: .1em; }
  .chip { font-size: .78rem; padding: .42rem .65rem; }
  .btn { padding: .8rem 1.1rem; }
}

/* Honeypot: hidden from people, visible to naive bots */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.hp-field label, .hp-field input { display: block; }

/* Motion & print preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media print {
  .site-head, .site-foot, .sticky-cta, .sticky-spacer, .status-actions,
  .admin-side, .admin-top, .admin-foot, .no-print, .flash-wrap { display: none !important; }
  body { background: #fff; }
  .pass, .status-card { box-shadow: none; border: 1px solid #ddd; max-width: 100%; }
  .pass-top { background: #0a0f1e !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .section { padding: 0; }
  .container { max-width: 100%; padding: 0; }
  a[href]::after { content: none; }
}

/* Scroll reveal — the hidden state is applied ONLY when JS is running,
   so content is always visible if scripts fail or are blocked. */
html:not(.no-js) .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .55s cubic-bezier(.2,.7,.3,1) var(--d, 0s), transform .55s cubic-bezier(.2,.7,.3,1) var(--d, 0s);
}
html:not(.no-js) .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html:not(.no-js) .reveal { opacity: 1; transform: none; transition: none; }
}

/* Small additions */
.is-copied { color: var(--green-soft) !important; border-color: rgba(15, 138, 95, .4) !important; }
.link-quiet { color: var(--brand-3); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.eyebrow-center { justify-content: center; }
.track-item.is-failed { color: var(--red); }
.track-item.is-failed::before { border-color: var(--red); background: var(--red); }
.track-item.is-failed::after { background: rgba(185, 28, 28, .3); }

/* Page-hero back links sit on their own line (they are followed by an
   inline-flex eyebrow). */
.page-hero .btn-quiet { display: flex; width: fit-content; margin-bottom: 2px; }

/* ------------------------------------------------------------------ */
/* Mobile card tables (table.data.data-cards)                          */
/* ------------------------------------------------------------------ */
@media (max-width: 760px) {
  table.data.data-cards { min-width: 0 !important; display: block; }
  table.data.data-cards thead { display: none; }
  table.data.data-cards tbody { display: block; }
  table.data.data-cards tr {
    display: block; padding: 14px 16px; border-bottom: 1px solid var(--line);
  }
  table.data.data-cards tbody tr:last-child { border-bottom: 0; }
  table.data.data-cards td {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 5px 0; border: 0; font-size: .86rem; text-align: right;
  }
  table.data.data-cards td::before {
    content: attr(data-label); flex: none;
    font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted-2); font-weight: 700; text-align: left;
  }
  table.data.data-cards td[data-label=""]::before { content: none; }
  table.data.data-cards td.cell-primary {
    padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px dashed var(--line);
    align-items: flex-start;
  }
  table.data.data-cards td.cell-primary::before { content: none; }
  table.data.data-cards td.cell-primary .t-main { text-align: left; }
  table.data.data-cards td.cell-action { padding-top: 10px; }
  table.data.data-cards td.cell-action .btn { width: 100%; }
  table.data.data-cards td.cell-action::before { content: none; }
  table.data.data-cards td[colspan] { display: block; text-align: center; }
}

/* Screen-reader-only utility */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ */
/* CMS additions: announcement bar, logo image, partner strip          */
/* ------------------------------------------------------------------ */
.announce { font-size: .84rem; font-weight: 600; }
.announce-inner { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 9px 0; flex-wrap: wrap; text-align: center; }
.announce-text { display: inline-flex; align-items: center; gap: 8px; }
.announce-text .icon { width: 15px; height: 15px; }
.announce-link { display: inline-flex; align-items: center; gap: 5px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.announce-link .icon { width: 14px; height: 14px; }
.announce-brand { background: linear-gradient(90deg, var(--brand-2), var(--brand), var(--brand-3)); color: #fff; }
.announce-dark { background: var(--ink); color: #fff; }
.announce-light { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }

.brand-logo { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; flex: none; }
.brand-foot .brand-logo { width: 38px; height: 38px; }

.partner-strip { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 20px; }
.partner {
  display: grid; place-items: center; min-width: 140px; min-height: 64px; padding: 12px 20px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-sm);
  font-weight: 700; color: #46506a; font-size: .9rem;
}
.partner img { max-height: 40px; width: auto; }

/* Grid counts so 3, 5 or 6 items still lay out nicely */
.stat-ribbon-inner.stat-count-3 { grid-template-columns: repeat(3, 1fr); }
.stat-ribbon-inner.stat-count-2 { grid-template-columns: repeat(2, 1fr); }
.how-grid.how-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.how-grid.how-count-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cat-grid.cat-count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-grid.cat-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1120px) {
  .how-grid.how-count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .stat-ribbon-inner.stat-count-3, .how-grid.how-count-2, .how-grid.how-count-4,
  .cat-grid.cat-count-3, .cat-grid.cat-count-2 { grid-template-columns: minmax(0, 1fr); }
  .stat-ribbon-inner.stat-count-2 { grid-template-columns: repeat(2, 1fr); }
}
.foot-meta { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ */
/* Console: CMS form controls                                          */
/* ------------------------------------------------------------------ */
.cms-field { margin-bottom: 18px; }
.color-field { display: flex; gap: 10px; align-items: center; }
.color-input { width: 54px; height: 44px; padding: 4px; border-radius: 10px; cursor: pointer; }
.color-text { font-family: var(--mono); font-size: .84rem; text-transform: uppercase; max-width: 130px; }

.switch-row { display: flex; align-items: center; gap: 11px; cursor: pointer; padding: 9px 0; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  width: 42px; height: 24px; border-radius: 99px; background: #d5d8e0; position: relative;
  transition: background .16s ease; flex: none;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .16s ease;
}
.switch-row input:checked + .switch { background: var(--green-soft); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.switch-label { font-size: .88rem; font-weight: 600; color: #263047; }

.media-picker { display: flex; gap: 14px; align-items: flex-start; }
.media-picker-preview { flex: none; }
.media-preview, .media-empty {
  width: 84px; height: 84px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line);
  background: #fbfaf7;
}
.media-empty { display: grid; place-items: center; gap: 3px; color: var(--muted-2); font-size: .62rem; text-align: center; }
.media-empty .icon { width: 18px; height: 18px; }
.media-picker-controls { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.media-picker-controls .select { flex: 1; min-width: 140px; }

.icon-picker { display: flex; gap: 10px; align-items: center; }
.icon-picker .select { flex: 1; }
.icon-preview { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: rgba(242,84,45,.1); color: var(--brand-3); flex: none; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; padding: .5rem .8rem; border-radius: 10px;
  font-size: .83rem; font-weight: 650; color: var(--muted); white-space: nowrap;
}
.tab .icon { width: 15px; height: 15px; }
.tab:hover { background: rgba(15,23,42,.05); color: var(--ink); }
.tab.is-active { background: var(--ink); color: #fff; }
.tab.is-active .icon { color: #ff9b7f; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.cms-group-head { margin-bottom: 16px; }
.cms-group-head h2 { font-size: 1.05rem; font-weight: 760; }
.cms-group-head p { font-size: .82rem; color: var(--muted); }

.block-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.block-row:last-child { border-bottom: 0; }
.block-row .br-icon { width: 34px; height: 34px; border-radius: 10px; background: rgba(242,84,45,.1); color: var(--brand-3); display: grid; place-items: center; flex: none; }
.block-row .br-main { flex: 1; min-width: 0; }
.block-row .br-main strong { display: block; font-size: .88rem; font-weight: 650; }
.block-row .br-main span { font-size: .76rem; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block-row .br-actions { display: flex; gap: 5px; align-items: center; flex: none; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; color: var(--muted);
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn .icon { width: 15px; height: 15px; }
.edit-grid { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 18px; align-items: start; }
.edit-nav { display: flex; flex-direction: column; gap: 3px; position: sticky; top: 84px; }
.edit-nav a {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px;
  font-size: .84rem; font-weight: 550; color: #3b4661;
}
.edit-nav a:hover { background: #fff; }
.edit-nav a em { margin-left: auto; font-style: normal; font-size: .72rem; color: var(--muted-2); }
.edit-nav a.is-active { background: #fff; box-shadow: var(--sh-sm); color: var(--ink); font-weight: 700; }
.edit-nav .icon { width: 16px; height: 16px; color: var(--muted); }

@media (max-width: 900px) {
  .edit-grid { grid-template-columns: minmax(0,1fr); }
  .edit-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .edit-nav a { white-space: nowrap; }
  .edit-nav a em { display: none; }
}

/* Content list editor */
.cms-split { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 18px; align-items: start; }
.cms-split-aside { position: sticky; top: 78px; }
@media (max-width: 1000px) { .cms-split { grid-template-columns: minmax(0,1fr); } .cms-split-aside { position: static; } }
.block-row.is-dim { opacity: .55; }
.block-row.is-editing { background: #fffdf6; box-shadow: inset 3px 0 0 var(--brand); }
.br-thumb { width: 38px; height: 38px; border-radius: 9px; object-fit: contain; background: #f6f5f1; padding: 3px; flex: none; }
.br-text { font-size: .84rem; color: #2b3550; line-height: 1.4; }
.inline-form { display: inline; }
.icon-btn-danger:hover { border-color: var(--red); color: var(--red); }
.empty-state { text-align: center; display: grid; gap: 6px; place-items: center; }
.empty-state .icon-xl { width: 34px; height: 34px; color: var(--muted-2); }
.empty-state h3 { font-size: .95rem; }
.badge.mono, .mono { font-family: var(--mono); }

/* ------------------------------------------------------------------ */
/* Console: pages, media library                                       */
/* ------------------------------------------------------------------ */
.input-group { display: flex; align-items: stretch; }
.input-prefix {
  display: grid; place-items: center; padding: 0 11px; border: 1px solid var(--line); border-right: 0;
  border-radius: 11px 0 0 11px; background: #f7f6f2; color: var(--muted); font-size: .84rem;
}
.input-group .input { border-radius: 0 11px 11px 0; }
.code-area { font-family: var(--mono); font-size: .8rem; line-height: 1.6; }
.token-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.token-chip {
  font-family: var(--mono); font-size: .72rem; padding: .22rem .5rem; border-radius: 7px;
  border: 1px dashed #cfd4de; background: #fbfaf7; color: #4b5563; cursor: pointer;
}
.token-chip:hover { border-color: var(--brand); color: var(--brand-3); background: #fff7f3; }
.mini-details { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; margin-bottom: 16px; background: #fdfcfa; }
.mini-details > summary { cursor: pointer; padding: 11px 0; font-size: .84rem; font-weight: 650; color: #374151; list-style: none; display: flex; align-items: center; gap: 8px; }
.mini-details > summary::-webkit-details-marker { display: none; }
.mini-details > summary::before { content: "+"; font-weight: 700; color: var(--brand-3); }
.mini-details[open] > summary::before { content: "–"; }
.mini-details .field:last-child { margin-bottom: 14px; }

.dropzone {
  display: grid; place-items: center; gap: 6px; text-align: center; padding: 30px 18px; cursor: pointer;
  border: 1.5px dashed #cbd2df; border-radius: 14px; background: #fbfbf9; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--brand); background: #fff8f4; }
.dropzone .icon-xl { width: 30px; height: 30px; color: var(--brand-3); }
.dropzone strong { font-size: .88rem; }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone-list { color: var(--brand-3); font-weight: 600; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.media-card { margin: 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #fff; }
.media-card.is-hidden { display: none; }
.media-thumb { display: block; aspect-ratio: 4/3; background: #f1f0ec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cpath d='M0 18 18 0H0Z' fill='%23e7e5df'/%3E%3C/svg%3E"); }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card figcaption { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px 10px; }
.media-card figcaption strong { font-size: .78rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-actions { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.media-actions .btn { padding: .22rem .42rem; font-size: .68rem; }
.btn-danger-ghost:hover { border-color: var(--red); color: var(--red); background: #fff5f5; }
.alt-form { display: flex; gap: 5px; margin-top: 6px; }
.alt-form[hidden] { display: none; }
.alt-form .input { padding: .35rem .5rem; font-size: .78rem; }
.input-search { max-width: 240px; padding: .45rem .7rem; font-size: .82rem; }

/* Extra registration questions + outbox preview */
.field-stack { display: grid; gap: 4px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 18px; }
fieldset.field legend { font-size: .82rem; font-weight: 650; color: #263047; margin-bottom: 8px; padding: 0; }
.radio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.radio-grid .check, .radio-grid .checkbox-row {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 11px; background: #fff; font-size: .86rem; cursor: pointer;
}
.radio-grid .check:has(input:checked), .radio-grid .checkbox-row:has(input:checked) {
  border-color: var(--brand); background: #fff8f4; box-shadow: 0 0 0 3px rgba(242,84,45,.08);
}
.radio-grid input { accent-color: var(--brand); margin: 0; }
.mail-preview {
  width: 100%; min-height: 460px; border: 1px solid var(--line); border-radius: 12px; background: #f3f2ee;
}

/* Console: small screens */
@media (max-width: 760px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; }
  .block-row { flex-wrap: wrap; row-gap: 9px; }
  .block-row .br-main { flex: 1 1 calc(100% - 52px); }
  .block-row .br-actions { flex: 1 1 100%; justify-content: flex-end; }
  .block-row .br-actions .badge:first-child { margin-right: auto; }
  .panel-head { flex-wrap: wrap; gap: 10px; }
  .panel-head .btn { flex: none; }
  .media-picker { flex-direction: column; }
  .media-picker-controls { width: 100%; }
  .edit-nav { gap: 6px; }
  .stat-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .admin-content { padding-inline: 14px; }
  .input-search { max-width: 100%; }
}

#compose { scroll-margin-top: 92px; }

/* ------------------------------------------------------------------ */
/* Notifications                                                       */
/* ------------------------------------------------------------------ */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: .18rem .5rem; border-radius: 99px;
  font-size: .68rem; font-weight: 700; letter-spacing: .02em;
}
.chip .icon { width: 12px; height: 12px; }
.chip-green { background: var(--green-bg); color: #166534; }
.chip-amber { background: var(--amber-bg); color: #92400e; }
.chip-grey  { background: #f1f2f5; color: #4b5563; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 7px; }
.check-grid .check {
  display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; font-size: .82rem; cursor: pointer;
}
.check-grid .check:has(input:checked) { border-color: var(--brand); background: #fff8f4; }
.check-grid input { accent-color: var(--brand); margin: 0; }
.field-legend { display: block; font-size: .82rem; font-weight: 650; color: #263047; margin-bottom: 8px; }
.secret-set { display: inline-flex; align-items: center; gap: 4px; color: #166534; font-weight: 650; }
.secret-set .icon { width: 12px; height: 12px; }

.notify-row .br-icon.br-wa { background: rgba(37, 211, 102, .14); color: #128c45; }
.notify-row .br-icon.br-mail { background: rgba(59, 130, 246, .12); color: #1d4ed8; }
.notify-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.notify-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.notify-form .select { min-width: 190px; }

.wa-preview { display: grid; gap: 8px; justify-items: start; }
.wa-bubble {
  background: #dcf8c6; color: #111b21; border-radius: 12px 12px 12px 3px; padding: 12px 14px;
  max-width: 460px; font-size: .88rem; line-height: 1.5; box-shadow: 0 1px 1px rgba(0,0,0,.08);
}
@media (max-width: 760px) {
  .notify-form { width: 100%; }
  .notify-form .select, .notify-form .btn { flex: 1 1 100%; }
  .check-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Dashboard: notification tiles */
.msg-tiles { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.msg-tile {
  display: grid; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 12px;
  background: #fdfcfa; color: inherit;
}
.msg-tile .icon { width: 17px; height: 17px; color: var(--brand-3); margin-bottom: 4px; }
.msg-tile strong { font-size: 1.15rem; font-weight: 760; }
.msg-tile span { font-size: .7rem; color: var(--muted); line-height: 1.3; }
.msg-tile.is-warn { border-color: #f7c98b; background: #fffaf0; }
.msg-tile.is-warn .icon { color: #b45309; }
@media (max-width: 620px) { .msg-tiles { grid-template-columns: minmax(0,1fr); } }

/* ================================================================== */
/* 12. MOBILE APP SHELL                                                */
/* ------------------------------------------------------------------ */
/*  Below 860 px the public site becomes an app: a translucent bar at
    the top, a tab bar at the bottom, sheets instead of dropdowns, and
    no hover-only affordances. Desktop is untouched.                   */
/* ================================================================== */

.app-splash, .app-back, .app-tabbar, .app-sheet, .app-scrim, .install-card, .admin-tabbar { display: none; }

/* Connection pill (offline / back online) — mobile-first, harmless on desktop */
.net-pill {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 12px); left: 50%;
  transform: translate(-50%, -16px); z-index: 950;
  padding: 9px 16px; border-radius: 999px;
  font-size: .76rem; font-weight: 650; letter-spacing: .01em; color: #fff;
  background: rgba(10, 15, 30, .94);
  box-shadow: 0 14px 34px -16px rgba(10, 15, 30, .75);
  opacity: 0; pointer-events: none;
  transition: transform .26s cubic-bezier(.32, .72, 0, 1), opacity .22s ease;
}
.net-pill.is-on { opacity: 1; transform: translate(-50%, 0); }
.net-pill[data-tone="green"] { background: #0f8a5f; }

@media (max-width: 860px) {
  :root {
    --app-bar-h: 54px;
    --tabbar-h: 60px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-t: env(safe-area-inset-top, 0px);
    --app-gutter: 16px;
  }

  html {
    -webkit-text-size-adjust: 100%;
    overscroll-behavior-y: contain;
    scroll-padding-top: calc(var(--app-bar-h) + var(--safe-t) + 14px);
  }

  body { min-height: 100dvh; }

  /* Never let a tap flash a grey box, and never wait 300 ms for a tap */
  a, button, summary, .app-tab, .btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

  /* ---------- App bar ---------- */
  .site-head {
    padding-top: var(--safe-t);
    background: rgba(250, 249, 245, .82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(15, 23, 42, .08);
  }
  .head-inner {
    min-height: var(--app-bar-h);
    gap: 8px;
    padding-inline: 6px;
    align-items: center;
  }
  .brand { gap: 9px; min-width: 0; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 6px 14px -8px rgba(198, 43, 60, .8); }
  .brand-text { min-width: 0; }
  .brand-text strong { font-size: .74rem; letter-spacing: .085em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100vw - 158px); }
  .brand-text small { display: none; }

  .app-back {
    display: grid; place-items: center; flex: none;
    width: 38px; height: 38px; margin-left: -2px;
    border: 0; border-radius: 12px; background: rgba(15, 23, 42, .05); color: var(--ink);
  }
  .app-back .icon { width: 20px; height: 20px; }
  .app-back:active { transform: scale(.94); background: rgba(15, 23, 42, .1); }

  .head-actions { margin-left: auto; gap: 4px; }
  .head-actions .btn { display: none; }           /* the tab bar carries these */
  .nav-toggle {
    display: grid; place-items: center;
    width: 40px; height: 40px; border: 0; border-radius: 12px;
    background: transparent; color: var(--ink);
  }
  .nav-toggle .icon { width: 22px; height: 22px; }
  .nav-toggle:active { background: rgba(15, 23, 42, .07); }
  .nav-toggle-close { display: none !important; }

  /* The desktop nav is replaced by the sheet below */
  .site-nav { display: none !important; }

  /* ---------- Header extras ---------- */
  .hide-app { display: none !important; }          /* the app bar already has a back arrow */
  .page-hero { padding-top: 14px; padding-bottom: 10px; }
  .page-title { font-size: clamp(1.6rem, 7.6vw, 2rem); letter-spacing: -.025em; line-height: 1.1; }
  .page-lead { font-size: .92rem; }

  /* ---------- Console top bar ---------- */
  .admin-top { gap: 8px; padding: 9px 14px; }
  .admin-top .crumb { display: none; }
  .admin-top h1 { font-size: 1.02rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
  .admin-top-actions .btn { padding: .5rem .7rem; font-size: .8rem; min-height: 40px; }
  .admin-top-actions .btn .icon { width: 17px; height: 17px; }
  .drawer-btn { width: 40px; height: 40px; border-radius: 12px; }

  /* ---------- Page enter ---------- */
  @keyframes appRise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
  main { animation: appRise .3s cubic-bezier(.32, .72, 0, 1) both; }

  /* ---------- Typography & rhythm ---------- */
  body { font-size: 16px; line-height: 1.55; }
  .container { padding-inline: var(--app-gutter); }
  .section { padding-block: clamp(34px, 9vw, 52px); }
  .section-head { text-align: left; margin-bottom: 20px; }
  .section-title { font-size: clamp(1.45rem, 6.2vw, 1.75rem); letter-spacing: -.02em; }
  .section-lead { font-size: .92rem; }
  .eyebrow { font-size: .64rem; }

  /* ---------- Controls sized for thumbs ---------- */
  .btn { min-height: 48px; padding: .82rem 1.15rem; font-size: .94rem; border-radius: 14px; transition: transform .12s ease, box-shadow .15s ease; }
  .btn:active { transform: scale(.975); }
  .btn-sm { min-height: 40px; font-size: .84rem; }
  .input, .select, .textarea, select, input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="date"], textarea {
    font-size: 16px !important;   /* stops iOS zooming the page on focus */
    min-height: 50px;
    border-radius: 13px;
    padding: .8rem .9rem;
  }
  textarea { min-height: 96px; }
  .field > label, .label { font-size: .84rem; }
  .check { min-height: 44px; align-items: flex-start; }
  .check input { width: 22px; height: 22px; margin-top: 1px; }

  .card { border-radius: 18px; }
  .faq details { border-radius: 14px; }
  .faq summary { min-height: 52px; align-items: center; }

  /* ---------- Bottom tab bar ---------- */
  .app-on { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); }
  .app-tabbar {
    display: grid;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    height: calc(var(--tabbar-h) + var(--safe-b));
    padding: 4px 6px calc(var(--safe-b) + 2px);
    background: rgba(252, 251, 248, .9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 -12px 34px -24px rgba(10, 15, 30, .55);
  }
  .app-tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 50px; padding: 5px 2px; border: 0; background: none;
    font-family: inherit; font-size: .62rem; font-weight: 650; letter-spacing: .01em;
    color: #7d8697; text-decoration: none; border-radius: 14px;
    transition: color .15s ease, transform .12s ease;
  }
  .app-tab .icon { width: 22px; height: 22px; stroke-width: 1.8; }
  .app-tab span { line-height: 1; }
  .app-tab:active { transform: scale(.93); }
  .app-tab.is-active { color: var(--brand-3); }
  .app-tab.is-active .icon { stroke-width: 2.2; }
  .app-tab.is-active::after {
    content: ""; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%;
    background: var(--brand);
  }
  .app-tab { position: relative; }

  .app-tab-primary { justify-content: flex-end; gap: 1px; }
  .app-tab-fab {
    width: 46px; height: 46px; margin-top: -20px; border-radius: 15px;
    display: grid; place-items: center; color: #fff;
    background: linear-gradient(145deg, var(--brand-2, #ff8a3d), var(--brand) 55%, var(--brand-3, #c62b3c));
    box-shadow: 0 10px 22px -10px rgba(242, 84, 45, .95), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .12s ease;
  }
  .app-tab-fab .icon { width: 24px; height: 24px; stroke-width: 2.2; }
  .app-tab-primary:active .app-tab-fab { transform: scale(.94); }
  .app-tab-primary .app-tab-label { font-size: .6rem; color: #7d8697; font-weight: 650; }
  .app-tab-primary.is-active .app-tab-label { color: var(--brand-3); }

  /* The floating CTA card is redundant once the tab bar is there */
  .app-on .sticky-cta, .app-on .sticky-spacer { display: none !important; }
  .app-on .site-foot { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 22px); }

  /* ---------- Sheet ---------- */
  .app-scrim {
    display: block; position: fixed; inset: 0; z-index: 95;
    background: rgba(8, 12, 24, .42);
    opacity: 0; transition: opacity .26s ease;
  }
  .app-scrim[hidden] { display: none; }
  .app-scrim.is-on { opacity: 1; }

  .app-sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 96;
    max-height: 86dvh; overflow-y: auto; overscroll-behavior: contain;
    padding: 6px 18px calc(22px + var(--safe-b));
    background: #fffdf9;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -24px 60px -24px rgba(10, 15, 30, .55);
    transform: translateY(102%);
    transition: transform .32s cubic-bezier(.32, .72, 0, 1);
    -webkit-overflow-scrolling: touch;
  }
  .app-sheet[hidden] { display: none; }
  .app-sheet.is-open { transform: none; }
  .sheet-grip {
    width: 40px; height: 4px; border-radius: 99px; margin: 6px auto 4px;
    background: rgba(15, 23, 42, .16);
  }
  .sheet-head { display: flex; align-items: center; gap: 10px; padding: 6px 2px 10px; }
  .sheet-title { margin: 0; font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .sheet-close { margin-left: auto; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 11px; background: rgba(15, 23, 42, .05); color: var(--ink); }
  .sheet-nav { display: flex; flex-direction: column; }
  .sheet-link {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 54px; padding: 4px 2px;
    font-size: 1.02rem; font-weight: 600; color: var(--ink); text-decoration: none;
    border-bottom: 1px solid rgba(15, 23, 42, .07);
  }
  .sheet-link .icon { width: 17px; height: 17px; color: var(--muted-2); }
  .sheet-link:active { opacity: .6; }
  .sheet-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 6px; }
  .sheet-action {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    min-height: 78px; padding: 12px 8px; border: 1px solid var(--line); border-radius: 16px;
    background: #fff; color: var(--ink); font-family: inherit; font-size: .72rem; font-weight: 650; text-align: center; text-decoration: none;
  }
  .sheet-action .icon { width: 21px; height: 21px; color: var(--brand-3); }
  .sheet-action:active { transform: scale(.97); background: #faf8f4; }
  .sheet-foot { margin: 14px 0 0; font-size: .74rem; color: var(--muted-2); text-align: center; }
  .sheet-foot a { color: var(--brand-3); font-weight: 650; }

  /* ---------- Install card ---------- */
  .install-card {
    display: flex; gap: 12px; align-items: flex-start;
    position: fixed; left: 12px; right: 12px; z-index: 89;
    bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px);
    padding: 14px; border-radius: 18px;
    background: #fffdf9; border: 1px solid rgba(15, 23, 42, .09);
    box-shadow: 0 22px 50px -22px rgba(10, 15, 30, .55);
    transform: translateY(130%); opacity: 0;
    transition: transform .34s cubic-bezier(.32, .72, 0, 1), opacity .28s ease;
  }
  .install-card[hidden] { display: none; }
  .install-card.is-on { transform: none; opacity: 1; }
  .install-icon {
    width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center;
    color: #fff; background: linear-gradient(145deg, var(--brand-2, #ff8a3d), var(--brand) 60%, var(--brand-3, #c62b3c));
  }
  .install-icon .icon { width: 22px; height: 22px; }
  .install-copy strong { display: block; font-size: .9rem; letter-spacing: -.01em; }
  .install-copy p { margin: 3px 0 10px; font-size: .78rem; line-height: 1.5; color: var(--muted); }
  .install-actions { display: flex; gap: 8px; }
  .install-actions .btn { min-height: 38px; padding: .45rem .95rem; font-size: .82rem; border-radius: 11px; }

  /* ---------- Splash (installed app only) ---------- */
  @media (display-mode: standalone) {
    .app-splash {
      display: grid; position: fixed; inset: 0; z-index: 900;
      place-items: center; align-content: center; gap: 14px;
      background: linear-gradient(165deg, #0a0f1e 0%, #141c33 60%, #1b1524 100%);
      color: #fff;
      animation: splashOut .5s ease 2.6s forwards;
    }
    .app-splash-mark { width: 84px; height: 84px; display: grid; place-items: center; }
    .app-splash-mark .brand-mark { width: 84px; height: 84px; border-radius: 24px; box-shadow: 0 24px 60px -20px rgba(242, 84, 45, .9); }
    .app-splash-name { margin: 0; font-size: .82rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
    .app-splash-bar { width: 92px; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; position: relative; }
    .app-splash-bar::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-2, #ff8a3d), var(--brand)); animation: splashBar 1.1s ease-in-out infinite; }
    .app-splash.is-done { opacity: 0; pointer-events: none; transition: opacity .45s ease; }
  }
  @keyframes splashOut { to { opacity: 0; visibility: hidden; pointer-events: none; } }
  @keyframes splashBar { 0% { left: -40%; } 100% { left: 100%; } }

  /* ---------- Touch-friendly lists ---------- */
  .status-row, .entry-card, .listing-row { min-height: 56px; }
  .foot-links a, .foot-col a { min-height: 40px; display: inline-flex; align-items: center; }
  .table-wrap { border-radius: 16px; }
  .ref-banner .ref-code { letter-spacing: .06em; }

  /* ---------- Register wizard: sticky action bar ---------- */
  .wizard-nav {
    position: sticky; bottom: 0; z-index: 80;
    margin: 26px -16px -18px; padding: 10px 16px calc(10px + var(--safe-b));
    background: rgba(252, 251, 248, .94);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-top: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 -14px 34px -26px rgba(10, 15, 30, .7);
  }
  .wizard-nav .btn { min-height: 50px; flex: 1; }
  .wizard-nav .btn-back { flex: 0 0 104px; }
  body.page-register .site-foot { padding-bottom: 8px; }
  body.page-register .container { padding-bottom: 0; }

  /* Steps read as a segmented control */
  .steps { gap: 4px; padding: 4px; background: rgba(15, 23, 42, .05); border-radius: 14px; }
  .step { padding: 7px 4px; border-radius: 10px; }
  .step.is-active { background: #fff; box-shadow: 0 2px 8px -4px rgba(10, 15, 30, .35); }

  .radio-card .rc-sub { font-size: .74rem; display: flex; flex-wrap: wrap; gap: 2px 7px; align-items: baseline; }
  .rc-name { flex: 1 1 auto; min-width: 0; }
  .rc-fee { white-space: nowrap; font-weight: 700; color: var(--ink); }
  .radio-card input:checked + .rc-body .rc-fee { color: var(--brand-3); }
  .page-hero .page-lead { font-size: .9rem; line-height: 1.5; }

  /* ---------- Action rows: two tidy buttons, not a stack ---------- */
  .pass-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .pass-actions > .btn-row { display: contents; }
  .pass-actions .btn { width: 100%; justify-content: center; }
  /* the bib download is the action runners actually want — give it the full row */
  .pass-actions .btn:last-child { grid-column: 1 / -1; }
  .status-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .status-actions .btn { width: 100%; justify-content: center; }
  .status-actions .btn:first-child { grid-column: 1 / -1; }

  /* ---------- Pass: wallet-style card ---------- */
  .pass-body { border-radius: 20px; }
  .pass-qr img { width: 128px; height: 128px; }

  /* ---------- Console ---------- */
  .admin-body { padding-bottom: 0; }
  .admin-top { padding-top: calc(12px + var(--safe-t)); backdrop-filter: blur(18px); }
  .admin-content { padding: 14px 14px calc(76px + var(--safe-b)); }
  .admin-tabbar {
    display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    grid-template-columns: repeat(5, 1fr); height: calc(58px + var(--safe-b));
    padding: 4px 4px var(--safe-b);
    background: rgba(252, 251, 248, .95); backdrop-filter: blur(18px) saturate(180%);
    border-top: 1px solid rgba(15, 23, 42, .08);
  }
  .admin-tabbar a, .admin-tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: none; font-family: inherit; font-size: .6rem; font-weight: 650;
    color: #7d8697; text-decoration: none; border-radius: 12px; position: relative;
  }
  .admin-tabbar .icon { width: 21px; height: 21px; }
  .admin-tabbar .is-active { color: var(--brand-3); }
  .admin-tabbar .is-active .icon { stroke-width: 2.1; }
  .admin-tabbar .admin-tab-badge {
    position: absolute; top: 6px; right: 50%; transform: translateX(18px);
    min-width: 17px; height: 17px; border-radius: 99px; background: var(--brand); color: #fff;
    font-size: .58rem; font-weight: 750; display: grid; place-items: center; padding: 0 4px;
  }
}

/* Tablet / small laptop — keep the desktop layout but tighten it so the
   nav + call to action never push past the viewport (1024 px was 14 px over) */
@media (min-width: 861px) and (max-width: 1140px) {
  .head-inner { gap: 10px; }
  .brand { gap: 9px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-text strong { font-size: .84rem; letter-spacing: .05em; }
  .brand-text small { font-size: .6rem; }
  .site-nav { gap: 0; }
  .site-nav > a { padding: .5rem .5rem; font-size: .8rem; }
  .head-actions { gap: 6px; }
  .head-actions .btn-primary { padding: .68rem .95rem; font-size: .82rem; }
  .head-actions .btn-quiet span { display: none; }
  .container { padding-inline: clamp(14px, 2.4vw, 26px); }
}

/* ------------------------------------------------------------------ */
/* In-app confirm dialog (replaces window.confirm)                     */
/* ------------------------------------------------------------------ */
.app-dialog {
  position: fixed; inset: 0; z-index: 960;
  display: grid; place-items: center; padding: 20px;
  opacity: 0; transition: opacity .18s ease;
}
.app-dialog[hidden] { display: none; }
.app-dialog.is-on { opacity: 1; }
.app-dialog-scrim { position: absolute; inset: 0; background: rgba(8, 12, 24, .5); backdrop-filter: blur(3px); }
.app-dialog-card {
  position: relative; width: min(420px, 100%);
  background: #fffdf9; border-radius: 22px; padding: 22px 20px 18px;
  box-shadow: 0 40px 80px -30px rgba(10, 15, 30, .7);
  transform: translateY(10px) scale(.98);
  transition: transform .22s cubic-bezier(.32, .72, 0, 1);
  text-align: center;
}
.app-dialog.is-on .app-dialog-card { transform: none; }
.app-dialog-card h2 { font-size: 1.05rem; letter-spacing: -.01em; margin: 0 0 6px; }
.app-dialog-card p { margin: 0 0 18px; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.app-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.app-dialog-actions .btn { width: 100%; justify-content: center; min-height: 46px; }
.app-modal-open, .app-modal-open body { overflow: hidden; }

.app-dialog-actions .btn-danger {
  background: linear-gradient(140deg, #e0342f, #b91c1c 70%);
  border: 0; color: #fff;
  box-shadow: 0 12px 26px -14px rgba(185, 28, 28, .9);
}
.app-dialog-actions .btn-outline { border-color: var(--line-strong); color: var(--ink); }
@media (max-width: 860px) {
  .app-dialog { align-items: end; padding: 0; }
  .app-dialog-card {
    width: 100%; border-radius: 22px 22px 0 0;
    padding: 20px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
  }
  .app-dialog.is-on .app-dialog-card { transform: none; }
  .app-dialog-actions { grid-template-columns: 1fr; gap: 8px; }
  .app-dialog-actions .btn-primary { order: -1; }
}
