/* Horizon RP: "city at night" theme. Loaded after store.css and only changes the look.
   Sunset over a dark skyline: deep navy page, warm amber -> coral -> pink accent.
   To go back to the old blue and white site, remove the theme.css line from index.html. */

:root {
  color-scheme: dark;
  --bg: #070b16;            /* page */
  --white: #0e1528;         /* cards and panels (store.css calls this "white") */
  --mist: #0b1222;          /* quiet bands */
  --line: #1d2742;          /* borders */
  --ink: #f4f6fb;           /* headings */
  --text: #c5cee2;          /* body text */
  --muted: #8b97b4;         /* secondary text */
  --blue: #ffa54d;          /* accent: links, prices */
  --blue-hover: #ffc078;
  --blue-deep: #05070f;     /* footer */
  --blue-night: #05070f;
  --on-blue: #ffffff;
  --on-blue-muted: #c9cfe4;
  --on-accent: #1a0c03;     /* text on the amber buttons */
  --sunset: linear-gradient(100deg, #ffc15e 0%, #ff8a3d 45%, #ff4f7b 100%);
  --sunset-soft: linear-gradient(100deg, rgba(255, 193, 94, 0.16), rgba(255, 79, 123, 0.16));
  --glow: 0 10px 30px -8px rgba(255, 122, 61, 0.55);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  /* tiers */
  --tier-1: #d6925a;        /* bronze */
  --tier-2: #c9d2e3;        /* silver */
  --tier-3: #ffcb52;        /* gold */
  --tier-4: #8fe9ff;        /* platinum */
  --radius: 10px;
}

body {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(123, 92, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at 0% 40%, rgba(255, 106, 61, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
}
::selection { background: rgba(255, 138, 61, 0.35); color: #fff; }
a { color: var(--blue); }
a:hover { color: var(--blue-hover); }
:focus-visible { outline-color: #ffb35c; }
code { background: rgba(255, 165, 77, 0.12); color: #ffc078; }
.error { color: #ff8a80; }
.skip { background: var(--sunset); color: var(--on-accent); }

h1, h2, h3 { color: var(--ink); }
h2 { letter-spacing: 0.01em; }

/* ---------------------------------------------------------------- buttons */

.btn { border-radius: 999px; font-weight: 600; transition: transform 0.15s, box-shadow 0.2s, background-color 0.15s, color 0.15s, border-color 0.15s; }
.btn--primary { background: var(--sunset); color: var(--on-accent); box-shadow: var(--glow); }
.btn--primary:hover { color: var(--on-accent); transform: translateY(-1px); box-shadow: 0 14px 34px -8px rgba(255, 106, 61, 0.7); filter: saturate(1.1); }
.btn--outline { background: rgba(255, 255, 255, 0.03); border-color: #2a3657; color: var(--ink); }
.btn--outline:hover { border-color: #ff9a4a; color: #fff; background: rgba(255, 138, 61, 0.08); }
.btn--ghost { color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.btn--done { background: transparent; color: #ffb35c; border-color: #ffb35c; }
.btn--basket { background: rgba(255, 255, 255, 0.04); color: var(--ink); border-color: #2a3657; }
.btn--basket:hover { border-color: #ff9a4a; color: #fff; }
.count { background: var(--sunset); color: var(--on-accent); font-weight: 700; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.hero .btn--primary, .phero .btn--primary { background: var(--sunset); color: var(--on-accent); }
.hero .btn--primary:hover { background: var(--sunset); color: var(--on-accent); }
.hero .btn--outline { background: rgba(7, 11, 22, 0.35); border-color: rgba(255, 255, 255, 0.35); color: #fff; backdrop-filter: blur(6px); }
.hero .btn--outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.12); }

/* ---------------------------------------------------------------- top bar + tabs */

.topbar { background: rgba(7, 11, 22, 0.78); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.tabs { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.brand, .brand:hover { color: #fff; }
.brand__mark { color: #ff9a4a; filter: drop-shadow(0 0 8px rgba(255, 138, 61, 0.6)); }
.brand__name { letter-spacing: 0.03em; text-transform: uppercase; }
.tab { color: var(--muted); }
.tab:hover { color: #fff; border-bottom-color: #2a3657; }
.tab[aria-current="page"] { color: #fff; border-bottom-color: transparent; }
.tab[aria-current="page"]::after {
  content: ""; position: absolute; left: 0.95rem; right: 0.95rem; bottom: -1px; height: 3px; border-radius: 3px;
  background: var(--sunset); box-shadow: 0 0 12px rgba(255, 122, 61, 0.8);
}
@media (max-width: 700px) { .tab[aria-current="page"]::after { left: 0.75rem; right: 0.75rem; } }

.demo-banner { background: repeating-linear-gradient(-45deg, #2a1a0e 0 14px, #3a2412 14px 28px); color: #ffd7a8; }

/* ---------------------------------------------------------------- hero: sunset over the city */

.hero, .phero {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(70% 55% at 72% 100%, rgba(255, 122, 61, 0.55), transparent 70%),
    linear-gradient(180deg, #05070f 0%, #0d0b25 28%, #261244 52%, #6a1f5c 72%, #c2405e 88%, #ff8a4d 100%);
}
/* stars */
.hero::before, .phero::before {
  content: ""; position: absolute; inset: 0 0 35% 0; z-index: -1; opacity: 0.7;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 61% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 77% 26%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 9%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 40%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 38%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 53% 4%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 95% 34%, #fff 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 0.85; } }
/* skyline: a far layer in violet and a near layer the colour of the page */
.hero::after, .phero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: clamp(90px, 12vw, 170px); z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%201440%20220'%20preserveAspectRatio%3D'none'%3E%3Cpath%20d%3D'M0%20220V173H35V148H41V173H76V195H111V136H155V176H226V165H270V156H286V111H292V156H307V121H338V76H344V121H375V118H416V174H487V150H506V109H512V150H530V138H602V186H634V140H672V124H704V119H794V175H849V163H932V124H986V145H1037V137H1087V170H1129V144H1219V179H1304V155H1342V119H1418V159H1436V121H1442V159H1440V220Z'%20fill%3D'%23070b16'%2F%3E%3C%2Fsvg%3E"), url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%201440%20220'%20preserveAspectRatio%3D'none'%3E%3Cpath%20d%3D'M0%20220V77H26V94H61V92H101V98H151V138H213V97H239V58H245V97H270V77H317V114H348V102H404V78H470V85H511V133H544V76H583V81H609V55H615V81H641V114H692V78H706V49H712V78H726V100H767V145H816V127H854V112H895V78H931V103H995V115H1044V124H1111V107H1148V125H1189V150H1254V123H1266V103H1272V123H1283V140H1353V119H1385V77H1417V80H1440V220Z'%20fill%3D'%231b1438'%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat; background-position: bottom, bottom;
  background-size: 100% 78%, 100% 100%;
}
.phero::after { height: clamp(70px, 9vw, 120px); opacity: 0.95; }
.hero__copy, .phero__inner { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(3.4rem, 7.4vw, 6.6rem); text-transform: uppercase; letter-spacing: 0.01em; text-shadow: 0 6px 40px rgba(0, 0, 0, 0.35); }
.hero h1 span + span, .phero h1 em {
  background: linear-gradient(180deg, #ffe3a3 0%, #ffab5a 45%, #ff5f86 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 24px rgba(255, 106, 61, 0.35));
}
.hero__lede { color: #e7e2f2; font-size: 1.22rem; }
.hero__links a { color: #ffe0bf; }
.hero__links a:hover { color: #fff; }
.phero h1 { text-transform: uppercase; }
.phero__lede { color: #e7e2f2; }
.phero__inner { padding-bottom: clamp(4.5rem, 9vw, 7rem); }

/* retro striped sun sitting on the skyline */
.hero__scene { z-index: auto; }
.sun { z-index: 0; }
.hero__copy { padding-bottom: clamp(7rem, 12vw, 10.5rem); }
.plate--hero { margin-bottom: clamp(6rem, 11vw, 9.5rem); }
.sun {
  width: clamp(300px, 34vw, 480px); height: clamp(300px, 34vw, 480px);
  margin-left: calc(clamp(300px, 34vw, 480px) / -2); bottom: clamp(-150px, -9vw, -90px);
  border-radius: 50%; opacity: 1;
  background: linear-gradient(180deg, #ffe99a 0%, #ffb44f 38%, #ff6a45 66%, #ff2e7e 100%);
  -webkit-mask: linear-gradient(180deg, #000 0 50%, transparent 50% 54%, #000 54% 61%, transparent 61% 65%, #000 65% 71%, transparent 71% 76%, #000 76% 81%, transparent 81% 87%, #000 87%);
          mask: linear-gradient(180deg, #000 0 50%, transparent 50% 54%, #000 54% 61%, transparent 61% 65%, #000 65% 71%, transparent 71% 76%, #000 76% 81%, transparent 81% 87%, #000 87%);
  animation: sunrise 2.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes sunrise { from { transform: translateY(160px); opacity: 0; } to { transform: none; opacity: 1; } }
.hero__scene::before {
  content: ""; position: absolute; left: 50%; bottom: -120px; width: 760px; height: 520px; margin-left: -380px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 138, 61, 0.45), transparent); filter: blur(10px); pointer-events: none;
}
.horizon-line { height: 2px; background: var(--sunset); box-shadow: 0 0 18px 2px rgba(255, 122, 61, 0.65); position: relative; z-index: 3; }

/* the plate floats in front of the sun */
.plate { color: #0b2a6f; box-shadow: inset 0 0 0 3px #c4d2ea, inset 0 0 0 5px #fff, 0 30px 60px -10px rgba(5, 7, 15, 0.75), 0 0 60px rgba(255, 138, 61, 0.25); }
.plate__state { color: #c2185b; }
.plate--hero { z-index: 3; animation: plate-float 6s ease-in-out infinite; }
@keyframes plate-float { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-8px); } }

/* ---------------------------------------------------------------- sections */

.section + .section { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.section--quiet { background: linear-gradient(180deg, rgba(14, 21, 40, 0.65), rgba(11, 18, 34, 0.9)); }
.section__head h2::after {
  content: ""; display: block; width: 64px; height: 4px; margin-top: 0.9rem; border-radius: 4px;
  background: var(--sunset); box-shadow: 0 0 14px rgba(255, 122, 61, 0.6);
}
.section__head p, .section__desc { color: var(--muted); }

/* live stats */
.stats-strip { background: rgba(14, 21, 40, 0.75); border-bottom: 1px solid var(--line); }
.stat { border-left-color: var(--line); }
.stat dd { color: #fff; }
.stat dd.is-online { color: #4ade80; text-shadow: 0 0 14px rgba(74, 222, 128, 0.45); }
.stat dd.is-offline { color: #ff8a80; }

/* what's in the city: cards */
.features { gap: 1.25rem; }
.feature {
  padding: 1.5rem; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 29, 54, 0.85), rgba(12, 18, 34, 0.85));
  box-shadow: var(--card-shadow); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(255, 138, 61, 0.45); box-shadow: 0 24px 50px -24px rgba(255, 106, 61, 0.45); }
.feature__icon { border-radius: 12px; background: var(--sunset-soft); color: #ffb35c; box-shadow: inset 0 0 0 1px rgba(255, 165, 77, 0.25); }
.feature p { color: var(--muted); }

/* numbered steps */
.steps li::before {
  background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 4.2rem;
}
.steps li { padding: 5rem 1.5rem 1.5rem; border-radius: 16px; border: 1px solid var(--line); background: rgba(14, 21, 40, 0.6); }
.steps li::before { top: 1.1rem; left: 1.5rem; }

/* call to action band */
.band {
  padding: clamp(1.75rem, 4vw, 2.75rem); border-radius: 20px; border: 1px solid rgba(255, 138, 61, 0.35);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 79, 123, 0.22), transparent 55%),
    radial-gradient(120% 140% at 0% 100%, rgba(255, 193, 94, 0.16), transparent 55%),
    #0e1528;
  box-shadow: 0 30px 70px -40px rgba(255, 106, 61, 0.6);
}
.band p { color: var(--text); }

/* faq */
.faq__list, .faq details { border-color: var(--line); }
.faq summary { color: var(--ink); }
.faq summary:hover { color: #ffc078; }
.faq summary::after { border-color: #ffa54d; }

/* footer */
.footer { background: #04060d; position: relative; color: var(--muted); }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--sunset); opacity: 0.7; }
.footer__brand { text-transform: uppercase; letter-spacing: 0.03em; }
.footer__cols a { color: var(--muted); }
.footer__cols a:hover { color: #fff; }

/* ---------------------------------------------------------------- store: priority lane */

.lane__end--city { color: #ffb35c; }
.lane__rule { background: repeating-linear-gradient(90deg, #3a4668 0 18px, transparent 18px 30px); }
.lane__rule::after { border-left-color: #ffb35c; }
.lane__tiers { gap: 1rem; background: none; border: 0; }
.tier {
  border-radius: 18px; border: 1px solid var(--line); border-top: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 10%, #0e1528) 0%, #0b1121 60%);
  box-shadow: var(--card-shadow); padding-top: 2.4rem; overflow: visible;
  transition: transform 0.2s, box-shadow 0.25s, border-color 0.2s;
}
.tier::before {
  content: ""; position: absolute; left: 1.2rem; right: 1.2rem; top: -1px; height: 3px; border-radius: 3px;
  background: var(--tone); box-shadow: 0 0 16px var(--tone);
}
.tier:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--tone) 55%, transparent); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--tone) 70%, transparent); }
.tier + .tier { background-image: linear-gradient(180deg, color-mix(in srgb, var(--tone) 10%, #0e1528) 0%, #0b1121 60%); background-size: auto; }
.tier--platinum { background-color: transparent; border-color: color-mix(in srgb, var(--tier-4) 45%, transparent); }
.tier--platinum::after {
  content: "Top tier"; position: absolute; top: 1rem; right: 1.2rem;
  font: 700 0.75rem/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.35rem 0.6rem; border-radius: 999px; color: #04212b; background: linear-gradient(90deg, #c8f6ff, #8fe9ff);
}
.tier__stop { box-shadow: 0 0 0 4px var(--bg), 0 0 14px var(--tone); }
.tier__name { color: #fff; }
.tier__price { color: #fff; font-size: 2rem; }
.tier__ahead { color: var(--muted); }
.tier__text, .tier__perks { color: var(--text); }
.tier__actions .btn--primary { background: var(--tone); color: #0b0f1a; box-shadow: 0 10px 26px -10px var(--tone); }
.tier__actions .btn--primary:hover { color: #0b0f1a; filter: brightness(1.08); }

.item { border-radius: 16px; background: linear-gradient(180deg, #121a31, #0c1223); box-shadow: var(--card-shadow); }
.item__price { color: #fff; }

/* ---------------------------------------------------------------- dialogs, basket, forms */

dialog { background: #0e1528; color: var(--text); }
dialog::backdrop { background: rgba(3, 5, 12, 0.72); backdrop-filter: blur(4px); }
.modal { border-radius: 18px; border-color: var(--line); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9); }
.drawer { border-left-color: var(--line); }
.drawer__foot { background: #0b1121; }
.modal__price { color: #fff; }
.coupon input, .field input, .field select, .field textarea {
  background: #0a1020; border-color: #253152; color: #fff; border-radius: 10px;
}
.coupon input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #ff9a4a; box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.15); }
.field select option { background: #0e1528; color: #fff; }
.check input { accent-color: #ff8a3d; }
.form__error { background: rgba(255, 99, 99, 0.12); color: #ffb4ab; border: 1px solid rgba(255, 99, 99, 0.3); }
.toast { background: #111a33; border: 1px solid var(--line); border-left: 5px solid #ffb35c; }

/* ---------------------------------------------------------------- queue, about, rules, apply, support */

.qstat dd { color: #fff; }
.meter { background: rgba(255, 255, 255, 0.15); }
.meter span { background: var(--sunset); box-shadow: 0 0 12px rgba(255, 122, 61, 0.7); }
.qcard, .qpanel, .person, .topic, .rules__nav, .rules__intro {
  border-radius: 16px; border-color: var(--line); background: linear-gradient(180deg, #111a31, #0c1223); box-shadow: var(--card-shadow);
}
.qcard--turn { background: linear-gradient(135deg, #ff9a3d, #ff4f7b); border-color: transparent; color: var(--on-accent); box-shadow: 0 30px 70px -30px rgba(255, 79, 123, 0.8); }
.qcard--turn h2, .qcard--turn p { color: var(--on-accent); }
.qcard--turn .btn--primary { background: #0b0f1a; color: #fff; box-shadow: none; }
.qcard--turn .btn--primary:hover { background: #000; color: #fff; }
.qcard--turn .btn--outline { border-color: rgba(26, 12, 3, 0.5); color: var(--on-accent); }
.qcard--turn .btn--outline:hover { border-color: var(--on-accent); color: var(--on-accent); background: rgba(0, 0, 0, 0.08); }
.qcard--turn .btn--text, .qcard--turn .btn--text:hover { color: var(--on-accent); }
.qfeatures li { color: var(--text); }
.qfeatures li::before { background: rgba(255, 138, 61, 0.12); box-shadow: inset 0 0 0 2px #ff9a4a; }
.qfeatures li::after { border-color: #ffb35c; }
.qnote { background: #0b1121; border: 1px solid var(--line); }
.qnote--ok { box-shadow: inset 4px 0 0 #ffb35c; }
.qpanel__kicker, .person__role, .rules__updated { color: #ffb35c; }
.order__item--you { background: rgba(255, 138, 61, 0.08); box-shadow: inset 3px 0 0 #ffb35c; }
.order__you, .rule-group__num, .person__avatar { background: var(--sunset); color: var(--on-accent); }
.order__item::before, .rule__num, .rules__nav a::before { color: #ffb35c; }

.values li { border-top: 0; padding: 1.4rem; border-radius: 16px; background: linear-gradient(180deg, #111a31, #0c1223); border: 1px solid var(--line); position: relative; }
.values li::before { content: ""; position: absolute; left: 1.4rem; right: 1.4rem; top: -1px; height: 3px; border-radius: 3px; background: var(--sunset); }
.rules__nav a { color: var(--text); }
.rules__nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.rules__nav a.is-active { background: rgba(255, 138, 61, 0.1); color: #fff; box-shadow: inset 3px 0 0 #ffb35c; }
.rule-list, .rule { border-color: var(--line); }
.rule__title { color: #fff; }
.mini-steps li::marker, .topic ul li::marker { color: #ffb35c; }

/* ---------------------------------------------------------------- entrances */

@media (prefers-reduced-motion: no-preference) {
  .panel .feature, .panel .tier, .panel .steps li, .panel .topic, .panel .values li {
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }
  .panel .feature:nth-child(2), .panel .tier:nth-child(2), .panel .steps li:nth-child(2) { animation-delay: 0.06s; }
  .panel .feature:nth-child(3), .panel .tier:nth-child(3), .panel .steps li:nth-child(3) { animation-delay: 0.12s; }
  .panel .feature:nth-child(4), .panel .tier:nth-child(4) { animation-delay: 0.18s; }
  .panel .feature:nth-child(5) { animation-delay: 0.24s; }
  .panel .feature:nth-child(6) { animation-delay: 0.3s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .tier { border-bottom: 1px solid var(--line); }
  .tier + .tier { border-top-width: 1px; }
  .hero::after { height: 100px; }
  .hero__copy { padding-bottom: 0; }
  .plate--hero { margin-bottom: 5.5rem; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: clamp(2.8rem, 14vw, 3.6rem); }
  .feature { padding: 1.2rem; }
}

/* ---------------------------------------------------------------- queue tab: "server queue" console */

.qx { padding-top: clamp(2rem, 5vw, 3.5rem); }
.qx__shell {
  position: relative; border-radius: 24px; padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid #222d4b;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(255, 79, 123, 0.10), transparent 60%),
    radial-gradient(70% 50% at 0% 100%, rgba(255, 165, 77, 0.07), transparent 60%),
    linear-gradient(180deg, #0d1427, #080d1a);
  box-shadow: 0 40px 100px -50px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.qx__shell::before { content: ""; position: absolute; left: 2rem; right: 2rem; top: -1px; height: 2px; border-radius: 2px; background: var(--sunset); box-shadow: 0 0 18px rgba(255, 122, 61, 0.6); }

.qx__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 1.5rem; border-bottom: 1px solid #1d2742; }
.qx__brand { display: flex; align-items: center; gap: 1rem; }
.qx__tile {
  width: 3.4rem; height: 3.4rem; flex: none; border-radius: 14px; display: grid; place-items: center;
  color: #ffb35c; background: var(--sunset-soft); box-shadow: inset 0 0 0 1px rgba(255, 165, 77, 0.3), 0 0 24px -6px rgba(255, 122, 61, 0.6);
}
.qx__tile svg { width: 60%; }
.qx__tile--sm { width: 2.6rem; height: 2.6rem; border-radius: 12px; }
.qx__tile--sm svg { width: 1.3rem; height: 1.3rem; }
.qx__kicker { font: 600 0.78rem/1.2 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.qx__kicker--accent { color: #ffb35c; }
.qx__title { font-size: clamp(2.4rem, 5vw, 3.6rem); text-transform: uppercase; letter-spacing: 0.02em; line-height: 0.95; margin-top: 0.15rem; }

.qx__live { width: min(100%, 300px); display: grid; gap: 0.45rem; }
.qx__pill {
  justify-self: end; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.75rem; border-radius: 999px;
  font: 700 0.75rem/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid #2a3657; color: var(--muted); background: rgba(255, 255, 255, 0.03);
}
.qx__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.qx__pill--up { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.08); }
.qx__pill--up .qx__dot { box-shadow: 0 0 10px #4ade80; animation: pulse 1.6s ease-in-out infinite; }
.qx__pill--down { color: #ff8a80; border-color: rgba(255, 138, 128, 0.35); background: rgba(255, 138, 128, 0.08); }
.qx__pill--idle { color: #ffc078; border-color: rgba(255, 165, 77, 0.35); background: rgba(255, 165, 77, 0.07); }
@keyframes pulse { 50% { opacity: 0.35; } }
.qx__cap { display: flex; justify-content: space-between; gap: 1rem; font: 600 0.85rem/1.2 var(--body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.qx__bar { display: block; height: 6px; border-radius: 6px; background: #1a2340; overflow: hidden; }
.qx__bar span { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--sunset); box-shadow: 0 0 12px rgba(255, 122, 61, 0.8); transition: width 0.5s; }
.qx__line { font-size: 0.85rem; color: var(--muted); justify-self: end; }

.qx__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.5rem; margin-top: 1.75rem; align-items: start; }
.qx__main { display: grid; gap: 1.4rem; align-content: start; border-radius: 18px; padding: 0.25rem 0; }
.qx__main.qcard--turn { padding: clamp(1.4rem, 3vw, 2rem); border-radius: 18px; }
.qx__main .qcard__row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.qx__main .qcard__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.qx__main > h2, .qx__main .qcard__row h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); }
.qx__main > .btn--text { justify-self: start; }
.qx__mainhead { display: flex; gap: 1rem; align-items: flex-start; }
.qx__h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.qx__muted { color: var(--muted); margin-top: 0.4rem; }
.qx__mainhead .qx__muted { max-width: 46ch; }

.qx__features { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.qx__features li { display: flex; gap: 0.8rem; align-items: center; color: var(--text); }
.qx__ficon { width: 2rem; height: 2rem; flex: none; border-radius: 9px; display: grid; place-items: center; color: #ffb35c; background: rgba(255, 138, 61, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 165, 77, 0.22); }
.qx__ficon svg { width: 1.05rem; height: 1.05rem; }
.qx__capbox { display: grid; gap: 0.5rem; max-width: 26rem; }

.qx__lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.qx__lane {
  display: flex; flex-direction: column; gap: 0.6rem; padding: 1.25rem; border-radius: 16px;
  border: 1px solid #222d4b; background: linear-gradient(180deg, #111a31, #0b1121);
}
.qx__lane .btn { margin-top: auto; }
.qx__lane .qx__muted { margin: 0 0 0.6rem; font-size: 0.97rem; }
.qx__lanetitle { display: flex; align-items: center; gap: 0.55rem; font: 700 1rem/1.2 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: #fff; }
.qx__lanetitle svg { width: 1.1rem; height: 1.1rem; color: var(--muted); }
.qx__lane--prio { border-color: rgba(255, 138, 61, 0.35); background: linear-gradient(180deg, rgba(255, 138, 61, 0.09), #0b1121 70%); }
.qx__lane--prio .qx__lanetitle svg { color: #ffb35c; }
.qx__lane--prio.is-on { box-shadow: 0 24px 60px -30px rgba(255, 106, 61, 0.7); }
.qx__lane.is-dim { opacity: 0.6; }
.qx__badge { margin-left: auto; font: 700 0.72rem/1 var(--body); letter-spacing: 0.06em; padding: 0.3rem 0.55rem; border-radius: 999px; background: var(--sunset); color: var(--on-accent); }
.qx__login { display: grid; gap: 0.9rem; justify-items: start; padding: 1.25rem; border-radius: 16px; border: 1px dashed #2a3657; }
.qx__login .qx__muted { margin: 0; }

.qx__side { display: grid; gap: 1rem; }
.qx__panel { border-radius: 16px; padding: 1.35rem; border: 1px solid #222d4b; background: linear-gradient(180deg, #111a31, #0b1121); display: grid; gap: 0.75rem; align-content: start; }
.qx__ptitle { font-size: 1.6rem; }
.qx__panel .order { margin-top: 0.25rem; }
.qx__prioHead { display: flex; gap: 0.85rem; align-items: center; }
.qx__prioName { font: 700 1.45rem/1.1 var(--display); color: #fff; margin-top: 0.15rem; }
.qx__panel--prio { --tone: #ffb35c; position: relative; border-color: color-mix(in srgb, var(--tone) 40%, #222d4b); }
.qx__panel--prio::before { content: ""; position: absolute; left: 0; top: 1.2rem; bottom: 1.2rem; width: 3px; border-radius: 3px; background: var(--tone); box-shadow: 0 0 14px var(--tone); }
.qx__panel--prio .qx__tile { color: var(--tone); }
.qx__panel--bronze { --tone: var(--tier-1); }
.qx__panel--silver { --tone: var(--tier-2); }
.qx__panel--gold { --tone: var(--tier-3); }
.qx__panel--platinum { --tone: var(--tier-4); }
.qx__score { display: grid; gap: 0.15rem; }
.qx__scoreNum { font: 700 2.2rem/1 var(--display); color: var(--tone); }
.qx__prioRow { display: flex; justify-content: space-between; padding-top: 0.75rem; border-top: 1px solid #1d2742; font-weight: 600; color: var(--text); }
.qx__plus { color: var(--tone); }
.qx__panel--upgrade { border-color: rgba(255, 79, 123, 0.3); background: radial-gradient(120% 100% at 100% 0%, rgba(255, 79, 123, 0.14), transparent 60%), linear-gradient(180deg, #111a31, #0b1121); }
.qx__panel--upgrade .btn { justify-self: start; }
.qx__fine { font-size: 0.82rem; color: var(--muted); }

@media (max-width: 980px) {
  .qx__grid { grid-template-columns: 1fr; }
  .qx__live { width: 100%; }
  .qx__pill, .qx__line { justify-self: start; }
}
@media (max-width: 620px) {
  .qx__lanes { grid-template-columns: 1fr; }
}

/* home stats: three across when the line count is hidden */
.stats:has(.stat[hidden]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
