/* =========================================================
   Hack The AI — "Midnight Web" UI
   One stylesheet for home, about, login, signup, leaderboard
   ========================================================= */

:root {
  /* surfaces */
  --bg: #07080D;
  --bg-alt: #0A0B13;
  --surface: #0D0F18;
  --raised: #121522;
  --footer: #05060A;
  /* lines */
  --line: #1F2436;
  --line-soft: #141826;
  --line-strong: #2A3043;
  --line-hover: #3A4466;
  /* brand */
  --red: #D61F35;          /* action fill (white text passes AA) */
  --red-hover: #EE2D44;
  --red-bright: #E5243B;   /* strokes, accents */
  --red-text: #FF6B7A;     /* red text on dark */
  --red-soft: #FF8A96;
  --blue: #2F7BFF;
  --blue-text: #7FADFF;
  --blue-soft: #9EC1FF;
  --amber: #F7C56B;
  --green: #52E0A8;
  /* text */
  --text: #EEF0F6;
  --text-2: #C2C8D8;
  --muted: #A3AABD;
  --subtle: #8C94AB;
  /* type */
  --f-display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --f-body: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  /* radii */
  --r-tag: 6px;
  --r-ctl: 10px;
  --r-card: 18px;
  --r-hero: 24px;
  --container: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-text); }
a:hover { color: #B3CDFF; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--blue-text); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r-ctl); background: var(--red); color: #fff; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* ---------- type ---------- */
.display { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; line-height: .88; letter-spacing: .005em; text-wrap: balance; }
.h-hero { font-size: clamp(52px, 7.6vw, 116px); }
.h-page { font-size: clamp(56px, 8vw, 120px); line-height: .86; }
.h-section { font-family: var(--f-display); font-weight: 800; font-size: clamp(40px, 5vw, 64px); line-height: .95; text-transform: uppercase; text-wrap: balance; }
.h-section--sm { font-size: clamp(30px, 3.6vw, 40px); }   /* compact section heading (dashboard) */
.outline-red { color: transparent; -webkit-text-stroke: 2px var(--red-bright); }
.outline-blue { color: transparent; -webkit-text-stroke: 2px var(--blue-text); }
.c-red { color: var(--red-bright); }
.lead { font-size: 19px; line-height: 1.6; color: #B4BACB; max-width: 560px; text-wrap: pretty; }
.eyebrow { font-family: var(--f-mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--red-text); }
.eyebrow--blue { color: var(--blue-text); }
.mono { font-family: var(--f-mono); }
.muted { color: var(--muted); }

.badge-live { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #B4BACB; background: rgba(7,8,13,.7); }
.dot-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--red-bright); animation: hta-pulse 3.2s ease-in-out infinite; }
.tag-sample { font-family: var(--f-mono); font-size: 12px; padding: 6px 10px; border-radius: var(--r-tag); border: 1px dashed #4A5578; color: #B4BACB; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px; border-radius: var(--r-ctl); border: 1px solid transparent; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 17px; border-radius: 12px; }
.btn--block { width: 100%; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hover); color: #fff; box-shadow: 0 10px 30px -10px rgba(229,36,59,.7); }
.btn-ghost { background: transparent; border-color: #34405F; color: #DDE3F2; font-weight: 600; }
.btn-ghost:hover { border-color: var(--blue-text); color: #fff; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn[aria-busy="true"] { background: #9E1828; pointer-events: none; }

/* ---------- nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7,8,13,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid #1A1E2C; }
.nav { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand__logo { flex: none; object-fit: contain; display: block; }
.brand__word { font-family: var(--f-display); font-weight: 900; font-size: 24px; letter-spacing: .06em; white-space: nowrap; }
.btn { white-space: nowrap; }
@media (max-width: 420px) { .brand__word { font-size: 19px; letter-spacing: .03em; } .brand svg, .brand__logo { width: 28px; height: 28px; } .nav { gap: 12px; } .nav__actions .btn { padding: 0 14px; } }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav__link { color: #B4BACB; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; transition: color .15s; }
.nav__link:hover { color: #fff; }
.nav__link[aria-current="page"] { color: #fff; border-bottom-color: var(--red-bright); }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.nav__login { color: #B4BACB; text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px 8px; }
.nav__login:hover { color: #fff; }
.nav__toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: transparent; color: #fff; cursor: pointer; }
@media (max-width: 960px) {
  .nav__toggle { display: inline-flex; }
  .nav__login { display: none; }
  .nav__links { display: none; position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; background: rgba(7,8,13,.97); border-bottom: 1px solid #1A1E2C; }
  .nav__links.is-open { display: flex; }
  .nav__link { padding: 14px 4px; border-bottom: 1px solid var(--line-soft); }
  .nav__link[aria-current="page"] { border-bottom-color: var(--line-soft); color: var(--red-text); }
  .nav__links .nav__login-mobile { display: block; }
  .nav__links .nav__logout-mobile { display: block; }
}
.nav__login-mobile { display: none; }
.nav__logout-mobile { display: none; margin: 0; }
.nav__logout-btn { width: 100%; text-align: left; background: none; border: 0;
  border-bottom: 1px solid var(--line-soft); cursor: pointer; font: inherit; color: var(--red-text); }

/* ---------- profile chip (logged-in) -> dashboard ---------- */
.nav__profile { display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  padding: 5px 12px 5px 5px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(255,255,255,.03); transition: border-color .15s, background .15s, transform .15s, box-shadow .15s; }
.nav__profile:hover { border-color: var(--red-bright); background: rgba(229,36,59,.08);
  transform: translateY(-1px); box-shadow: 0 10px 26px -14px rgba(229,36,59,.7); }
.nav__profile-avatar { display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff;
  font-family: var(--f-mono); font-size: 12px; font-weight: 700; letter-spacing: .04em; flex: none; }
.nav__profile-name { color: #E7E9F0; font-weight: 600; font-size: 15px; max-width: 140px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__profile:hover .nav__profile-name { color: #fff; }
.nav__profile { font: inherit; cursor: pointer; }
@media (max-width: 560px) { .nav__profile { padding: 4px; } .nav__profile-name { display: none; } }

/* ---------- profile dropdown (Log out now lives here, not as a standalone nav link) ---------- */
.nav__profile-menu { position: relative; }
.nav__profile-caret { width: 13px; height: 13px; flex: none; color: var(--subtle); margin-left: -2px; transition: transform .15s ease, color .15s ease; }
.nav__profile[aria-expanded="true"] .nav__profile-caret { transform: rotate(180deg); color: #fff; }
.nav__profile-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 190px; z-index: 60;
  padding: 6px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)), var(--surface);
  box-shadow: 0 20px 44px -16px rgba(0,0,0,.6);
  animation: nav-dropdown-pop .14s cubic-bezier(.2,.9,.3,1.2);
}
.nav__profile-dropdown[hidden] { display: none; }
@keyframes nav-dropdown-pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .nav__profile-dropdown { animation: none; } }
.nav__profile-dropdown form { margin: 0; }
.nav__profile-dropdown__item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px;
  border-radius: 9px; border: 0; background: none; color: var(--text-2);
  font-family: inherit; font-size: 14px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.nav__profile-dropdown__item svg { width: 15px; height: 15px; flex: none; opacity: .8; }
.nav__profile-dropdown__item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav__profile-dropdown__item--danger { color: var(--red-text, #FF6B7A); }
.nav__profile-dropdown__item--danger:hover { background: rgba(229,36,59,.1); color: var(--red-hover, #EE2D44); }
.nav__profile-dropdown__sep { height: 1px; margin: 5px 4px; background: var(--line-soft); }

/* ---------- flash messages ---------- */
.flashes { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.flash { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; }
.flash--error { border-color: rgba(229,36,59,.45); background: #160A10; color: #FFC2C8; }
.flash--success { border-color: rgba(127,173,255,.45); background: #0E1A36; color: #D6E4FF; }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section--line { border-top: 1px solid var(--line-soft); }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 40px; }
.section__title { display: flex; flex-direction: column; gap: 12px; max-width: 680px; }
.grid-auto { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 280px), 100%), 1fr)); }
@media (max-width: 640px) { .section { padding: 64px 0; } }

/* ---------- hero (home) ---------- */
.hero { position: relative; padding: 72px 0 96px; min-height: 760px; overflow: hidden; }
.hero__glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(900px 520px at 82% 18%, rgba(214,31,53,.20), transparent 60%), radial-gradient(700px 480px at 6% 92%, rgba(47,123,255,.16), transparent 62%); }
.hero__bgword { position: absolute; left: 0; right: 0; top: 52%; transform: translateY(-50%); text-align: center; font-family: var(--f-display); font-weight: 900; font-size: clamp(140px, 22vw, 340px); line-height: 1; letter-spacing: .02em; color: transparent; -webkit-text-stroke: 1.5px rgba(238,240,246,.07); white-space: nowrap; pointer-events: none; user-select: none; }
.hero__web { max-width: none; position: absolute; right: -180px; top: -160px; width: 880px; height: 880px; opacity: .16; pointer-events: none; }
.hero__inner { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero__copy { flex: 1 1 520px; min-width: 0; overflow-wrap: break-word; display: flex; flex-direction: column; gap: 28px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__art { flex: 1 1 480px; min-width: 0; position: relative; height: 560px; border-radius: var(--r-hero); border: 1px solid #1F2436; background: linear-gradient(180deg, #0D1020 0%, #0A0B14 100%); overflow: hidden; box-shadow: 0 40px 90px -40px rgba(214,31,53,.45); }
.hero__art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__hud { position: absolute; left: 24px; top: 24px; right: 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; font-family: var(--f-mono); font-size: 12px; color: #B4BACB; }
.hud-term { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; border: 1px solid #262D44; background: rgba(10,12,22,.78); backdrop-filter: blur(8px); }
.hud-pill { padding: 6px 10px; border-radius: 999px; background: rgba(214,31,53,.16); color: var(--red-soft); border: 1px solid rgba(229,36,59,.4); white-space: nowrap; }
@media (max-width: 640px) { .hero { padding: 48px 0 64px; min-height: 0; } .hero__art { height: 420px; } .hud-term { display: none; } }

/* ---------- cards ---------- */
.card { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 24px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.card--lift:hover { transform: translateY(-4px); border-color: var(--line-hover); box-shadow: 0 28px 50px -30px rgba(229,36,59,.55); }
.lab__top { display: flex; justify-content: space-between; align-items: flex-start; }
.lab__icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #151A2B; }
.lab__cat { font-family: var(--f-mono); font-size: 12px; color: var(--subtle); text-transform: uppercase; letter-spacing: .08em; }
.lab__title { font-family: var(--f-display); font-size: 23px; line-height: 1.06; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; color: #fff; }
.lab__desc { font-size: 15px; line-height: 1.6; color: var(--muted); }
.lab__meta { display: flex; gap: 16px; font-family: var(--f-mono); font-size: 13px; color: #B4BACB; }
.lab__meta span { display: inline-flex; align-items: center; gap: 6px; }
.lab__xp { color: var(--amber); }
.lab__foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.progress { display: flex; flex-direction: column; gap: 6px; }
.progress__label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.progress__track { height: 4px; border-radius: 4px; background: #1C2134; overflow: hidden; }
.progress__bar { height: 100%; border-radius: 4px; background: var(--red-bright); }
.progress__bar--done { background: var(--blue-text); }

.pill { font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.pill--easy { background: rgba(127,173,255,.12); color: var(--blue-soft); border-color: rgba(127,173,255,.35); }
.pill--medium { background: rgba(245,179,65,.12); color: var(--amber); border-color: rgba(245,179,65,.35); }
.pill--hard { background: rgba(229,36,59,.14); color: var(--red-soft); border-color: rgba(229,36,59,.45); }
.pill--insane { background: #B3122A; color: #fff; border-color: #B3122A; }

/* ---------- how it works ---------- */
.steps { position: relative; }
.steps__thread { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 120px; pointer-events: none; }
.steps__list { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.step { display: flex; flex-direction: column; gap: 16px; }
.step__num { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg); border: 2px solid var(--red-bright); font-family: var(--f-display); font-weight: 900; font-size: 34px; }
.step__num--blue { border-color: var(--blue-text); }
.step__num--solid { background: var(--red); border-color: var(--red); }
.step h3 { font-size: 20px; font-weight: 700; }
.step p { font-size: 15px; line-height: 1.6; color: var(--muted); }
@media (max-width: 960px) { .steps__thread { display: none; } }

/* ---------- value grid ---------- */
.split { display: flex; flex-wrap: wrap; gap: 56px; }
.split__intro { flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; }
.split__body { flex: 2 1 600px; min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 1px; background: #1A1F2F; border: 1px solid #1A1F2F; border-radius: var(--r-card); overflow: hidden; }
.tile { padding: 28px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.tile__num { font-family: var(--f-mono); font-size: 13px; color: var(--red-text); }
.tile:nth-child(even) .tile__num { color: var(--blue-text); }
.tile h3 { font-size: 18px; font-weight: 700; }
.tile p { font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ---------- leaderboard preview (home) ---------- */
.board-preview { flex: 2 1 520px; list-style: none; margin: 0; padding: 8px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); }
.board-row { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 12px; }
.board-row__rank { width: 32px; font-family: var(--f-display); font-weight: 900; font-size: 24px; color: var(--subtle); }
.board-row:nth-child(1) .board-row__rank { color: var(--red-text); }
.board-row:nth-child(2) .board-row__rank { color: var(--blue-soft); }
.board-row:nth-child(3) .board-row__rank { color: var(--amber); }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #28324F; font-weight: 700; font-size: 14px; color: #fff; }
.board-row__name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row__labs { font-family: var(--f-mono); font-size: 14px; color: #B4BACB; }
.board-row__xp { font-family: var(--f-mono); font-size: 15px; min-width: 96px; text-align: right; }
@media (max-width: 640px) { .board-row__labs { display: none; } }
.achievements { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); }
.achievements__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.achv { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 13px; color: #B4BACB; }

/* ---------- final CTA + footer ---------- */
.cta { position: relative; padding: 120px 0; text-align: center; overflow: hidden; }
.cta__web { position: absolute; left: 50%; top: 50%; width: 1100px; height: 1100px; max-width: none; transform: translate(-50%, -50%); opacity: .12; pointer-events: none; }
.cta__inner { position: relative; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.footer { padding: 64px 0 40px; border-top: 1px solid #1A1E2C; background: var(--footer); }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 48px; }
.footer__brand { flex: 1 1 260px; max-width: 340px; display: flex; flex-direction: column; gap: 14px; }
.footer__cols { flex: 2 1 560px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 32px; }
.footer__col { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.footer__col strong { color: #fff; }
.footer a { color: #B4BACB; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid #1A1E2C; font-size: 14px; color: var(--subtle); }
.footer__social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--r-ctl); color: var(--muted); background: var(--surface); transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease; }
.footer__social a:hover { color: #fff; border-color: var(--red-bright); background: var(--raised); transform: translateY(-2px); }
.footer__social a:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .footer__social a { transition: none; } .footer__social a:hover { transform: none; } }

/* ---------- about ---------- */
.about-hero { position: relative; min-height: 620px; padding: 96px 0 80px; overflow: hidden; background: radial-gradient(800px 460px at 85% 10%, rgba(214,31,53,.22), transparent 60%), radial-gradient(700px 420px at 0% 100%, rgba(47,123,255,.18), transparent 60%); }
.about-hero__scene { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.about-hero__bgword { position: absolute; left: 0; right: 0; bottom: -30px; text-align: center; font-family: var(--f-display); font-weight: 900; font-size: clamp(140px, 22vw, 340px); line-height: 1; color: transparent; -webkit-text-stroke: 1.5px rgba(238,240,246,.06); white-space: nowrap; pointer-events: none; user-select: none; }
.about-hero__copy { position: relative; display: flex; flex-direction: column; gap: 24px; max-width: 640px; }
.member { position: relative; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .25s, box-shadow .3s; }
.member::before { content: ""; position: absolute; left: 50%; top: -40px; width: 1.5px; height: 40px; background: linear-gradient(#E3E7F2, rgba(227,231,242,0)); transform: scaleY(0); transform-origin: top; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.member:hover { transform: translateY(-8px) rotate(-1deg); border-color: var(--line-hover); box-shadow: 0 30px 60px -30px rgba(229,36,59,.6); }
.member:hover::before { transform: scaleY(1); }
.hex { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #B3122A; font-family: var(--f-display); font-weight: 900; color: #fff; transition: transform .5s cubic-bezier(.2,.7,.2,1); overflow: hidden; }
.hex img { width: 100%; height: 100%; object-fit: cover; }
.hex--blue { background: #1F4FB8; }
.member:hover .hex { transform: scale(1.04); }
.member:hover .hex img { transform: scale(1.1); }
.member--core { display: flex; flex-wrap: wrap; gap: 28px; padding: 32px; background: linear-gradient(140deg, rgba(214,31,53,.20) 0%, var(--surface) 55%); }
.member--core.is-blue { background: linear-gradient(140deg, rgba(47,123,255,.20) 0%, var(--surface) 55%); }
.member--core .hex { width: 120px; height: 120px; flex: none; font-size: 44px; }
.member__body { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.member__name { font-family: var(--f-display); font-weight: 900; font-size: 44px; line-height: .95; text-transform: uppercase; }
.member__role { font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em; color: var(--red-soft); }
.is-blue .member__role { color: var(--blue-soft); }
.member__bio { font-size: 15px; line-height: 1.6; color: #B4BACB; }
.socials { display: flex; gap: 10px; margin-top: 6px; }
.social { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-ctl); border: 1px solid var(--line-strong); color: var(--text-2); }
.social:hover { border-color: var(--blue-text); color: #fff; }
.crew { position: relative; }
.crew__threads { position: absolute; left: 0; top: 120px; width: 100%; height: 640px; pointer-events: none; }
.crew__grid { --min: 210px; row-gap: 56px; }
.member--crew { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 20px; text-align: center; }
.member--crew .hex { width: 84px; height: 84px; font-size: 30px; }
.member--crew h3 { font-size: 19px; font-weight: 700; }
.member--crew .member__role { font-size: 12px; letter-spacing: 0; }
.member--crew a { color: #B4BACB; text-decoration: none; font-size: 14px; padding: 10px 0; }
.member--crew a:hover { color: #fff; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: flex; }
.auth__main { flex: 1 1 50%; min-width: 0; display: flex; flex-direction: column; padding: 32px; }
.auth__center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 0; }
.auth__box { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 24px; }
.auth__title { font-family: var(--f-display); font-weight: 900; font-size: 64px; line-height: .9; text-transform: uppercase; }
.auth__art { flex: 1 1 50%; position: relative; overflow: hidden; background: radial-gradient(700px 500px at 80% 10%, rgba(214,31,53,.28), transparent 60%), radial-gradient(600px 420px at 0% 100%, rgba(47,123,255,.22), transparent 60%), #0A0B14; }
.auth__art--left { border-right: 1px solid #1A1E2C; }
.auth__art--right { border-left: 1px solid #1A1E2C; display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; background: radial-gradient(700px 500px at 100% 0%, rgba(47,123,255,.26), transparent 60%), radial-gradient(600px 420px at 0% 100%, rgba(214,31,53,.26), transparent 60%), #0A0B14; }
.auth__art svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth__quote { position: absolute; left: 56px; right: 56px; top: 56px; display: flex; flex-direction: column; gap: 16px; }
.auth__quote p { max-width: 420px; font-family: var(--f-display); font-weight: 900; font-size: 72px; line-height: .9; text-transform: uppercase; }
.auth__vword { position: absolute; left: -20px; top: 50%; transform: translateY(-50%) rotate(-90deg); font-family: var(--f-display); font-weight: 900; font-size: 220px; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px rgba(238,240,246,.07); white-space: nowrap; }
.perks { position: relative; display: flex; flex-direction: column; gap: 28px; }
.perks__title { font-family: var(--f-display); font-weight: 900; font-size: 76px; line-height: .88; text-transform: uppercase; }
.perks ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.perks li { display: flex; gap: 14px; align-items: center; font-size: 16px; color: #DDE3F2; }
.perks__n { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: var(--r-ctl); background: rgba(214,31,53,.18); font-family: var(--f-mono); font-size: 13px; color: var(--red-soft); }
.perks li:nth-child(2) .perks__n { background: rgba(47,123,255,.18); color: var(--blue-soft); }
@media (max-width: 960px) { .auth__art { display: none; } }
@media (max-width: 640px) { .auth__main { padding: 20px 16px; } .auth__title { font-size: 52px; } }

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__row { display: flex; justify-content: space-between; align-items: baseline; }
.label { font-size: 14px; font-weight: 600; color: #DDE3F2; }
.label__req { color: var(--red-soft); margin-left: 1px; font-weight: 700; }
.input { width: 100%; height: 52px; padding: 0 16px; border-radius: var(--r-ctl); border: 1px solid #262D44; background: var(--surface); color: #fff; font-size: 16px; transition: border-color .15s; }
.input:hover { border-color: #34405F; }
.input::placeholder { color: #7D859C; }
.input--mono { font-family: var(--f-mono); font-size: 15px; }
.input[aria-invalid="true"] { border-color: #B3122A; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 60px; }
.input-wrap--prefix .input { padding-left: 36px; padding-right: 16px; }
.input-prefix { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-family: var(--f-mono); color: var(--subtle); }
.pw-toggle { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pw-toggle:hover { color: #fff; }

/* ---------- searchable country picker (signup) ---------- */
.country-picker { position: relative; }
.country-picker__list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; margin: 0; padding: 6px;
  list-style: none; max-height: 260px; overflow-y: auto; border-radius: 12px; border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)), var(--surface);
  box-shadow: 0 20px 44px -16px rgba(0,0,0,.65);
}
.country-picker__list[hidden] { display: none; }
.country-picker__opt {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px;
  font-size: 14px; color: var(--text-2); cursor: pointer; scroll-margin-block: 6px;
}
.country-picker__opt[hidden] { display: none; }
.country-picker__opt:hover, .country-picker__opt.is-active { background: rgba(255,255,255,.06); color: #fff; }
.country-picker__flag { font-size: 16px; flex: none; }
.field__msg { font-size: 13px; color: var(--muted); min-height: 0; }
.field__msg:empty { display: none; }
.field__msg--error { color: var(--red-soft); }
.field__msg--ok { color: var(--blue-soft); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--text-2); cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex: none; }
.strength { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.strength span { height: 4px; border-radius: 4px; background: #1C2134; transition: background-color .2s; }
.strength-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.rules { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.rules li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.rules li::before { content: "·"; font-family: var(--f-mono); width: 10px; }
.rules li.is-met { color: var(--blue-soft); }
.rules li.is-met::before { content: "✓"; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(229,36,59,.45); background: #160A10; font-size: 14px; line-height: 1.5; color: #FFC2C8; }
.alt-link { font-size: 15px; color: #B4BACB; text-align: center; }
.alt-link a { font-weight: 700; }

/* ---------- leaderboard ---------- */
.arena { position: relative; padding: 56px 0 64px; overflow: hidden; background: linear-gradient(100deg, rgba(214,31,53,.30) 0%, rgba(7,8,13,0) 38%, rgba(7,8,13,0) 62%, rgba(47,123,255,.30) 100%), var(--bg); }
.arena__speed { position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.045) 0 2px, transparent 2px 26px); animation: hta-drift 14s linear infinite; }
.arena__dots { position: absolute; inset: 0; pointer-events: none; background-size: 12px 12px; }
.arena__dots--red { background-image: radial-gradient(rgba(229,36,59,.35) 1.2px, transparent 1.6px); -webkit-mask-image: linear-gradient(90deg, #000, transparent 35%); mask-image: linear-gradient(90deg, #000, transparent 35%); }
.arena__dots--blue { background-image: radial-gradient(rgba(127,173,255,.35) 1.2px, transparent 1.6px); -webkit-mask-image: linear-gradient(270deg, #000, transparent 35%); mask-image: linear-gradient(270deg, #000, transparent 35%); }
.arena__web { position: absolute; left: 50%; top: 40%; width: 1300px; height: 1300px; max-width: none; transform: translate(-50%, -50%); opacity: .10; pointer-events: none; }
.arena__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.arena__title { font-family: var(--f-display); font-weight: 900; font-size: clamp(42px, 11vw, 152px); line-height: .82; text-transform: uppercase; text-shadow: -4px 0 0 rgba(229,36,59,.85), 4px 0 0 rgba(47,123,255,.85); transform: skewX(-6deg); }
.tabs { display: inline-flex; padding: 5px; gap: 4px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(10,12,20,.85); }
.tab { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 112px; padding: 0 18px; border-radius: var(--r-ctl); color: var(--text-2); font-weight: 700; font-size: 15px; text-decoration: none; }
.tab:hover { color: #fff; }
.tab[aria-current="page"] { background: var(--red); color: #fff; }
.podium { list-style: none; margin: 16px 0 0; padding: 0; width: 100%; max-width: 900px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 16px; }
.podium__item { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.podium__avatar { display: flex; align-items: center; justify-content: center; border-radius: 50%; font-family: var(--f-display); font-weight: 900; font-size: 28px; color: #fff; }
.podium__name { font-weight: 700; font-size: 17px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium__xp { font-family: var(--f-mono); font-size: 14px; color: var(--text-2); }
.podium__block { width: 100%; border-radius: 14px 14px 0 0; border: 1px solid; border-bottom: 0; display: flex; justify-content: center; padding-top: 12px; }
.podium__block span { font-family: var(--f-display); font-weight: 900; font-size: 64px; line-height: 1; }
.podium__item--1 .podium__avatar { width: 104px; height: 104px; background: #D61F35; }
.podium__item--1 .podium__block { height: 210px; border-color: var(--red-bright); background: linear-gradient(180deg, rgba(229,36,59,.34), rgba(7,8,13,0)); color: var(--red-bright); }
.podium__item--2 .podium__avatar { width: 84px; height: 84px; background: #1F4FB8; }
.podium__item--2 .podium__block { height: 150px; border-color: var(--blue-text); background: linear-gradient(180deg, rgba(47,123,255,.30), rgba(7,8,13,0)); color: var(--blue-text); }
.podium__item--3 .podium__avatar { width: 76px; height: 76px; background: #8A5A12; }
.podium__item--3 .podium__block { height: 110px; border-color: var(--amber); background: linear-gradient(180deg, rgba(245,179,65,.22), rgba(7,8,13,0)); color: var(--amber); }
@media (max-width: 640px) { .podium__block span { font-size: 44px; } .podium__item--1 .podium__block { height: 150px; } .podium__item--2 .podium__block { height: 110px; } .podium__item--3 .podium__block { height: 80px; }
  .podium { gap: 10px; } .podium__avatar { font-size: 20px; }
  .podium__item--1 .podium__avatar { width: min(72px, 22vw); height: min(72px, 22vw); }
  .podium__item--2 .podium__avatar { width: min(60px, 19vw); height: min(60px, 19vw); }
  .podium__item--3 .podium__avatar { width: min(54px, 17vw); height: min(54px, 17vw); }
  .podium__name { font-size: 13px; } }
.lb-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding: 40px 0 96px; }
.lb-main { flex: 999 1 620px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.lb-search { position: relative; flex: 0 1 320px; }
.lb-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.lb-search .input { height: 46px; padding-left: 42px; font-size: 15px; }
.lb-country-filter { flex: 0 1 220px; margin: 0; }
.lb-country-filter .input { height: 46px; font-size: 14.5px; cursor: pointer; }
.table-wrap { border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); overflow-x: auto; }
.table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; }
.table th { padding: 16px 12px; text-align: left; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); font-weight: 600; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; text-align: right; }
.table td { padding: 14px 12px; border-top: 1px solid #161A28; }
.table tbody tr { transition: background-color .15s; }
.table tbody tr:hover { background: #11141F; }
.table tr.is-me { background: rgba(214,31,53,.14); }
.td-rank { font-family: var(--f-display); font-weight: 800; font-size: 22px; color: var(--subtle); }
.is-me .td-rank { color: #fff; }
.td-user { display: flex; align-items: center; gap: 12px; }
.td-user .avatar { width: 36px; height: 36px; font-size: 13px; border-radius: 50%; }
.td-mono { font-family: var(--f-mono); color: #B4BACB; }
.td-xp { font-family: var(--f-mono); color: #fff; }
.you { font-family: var(--f-mono); font-size: 11px; padding: 3px 7px; border-radius: var(--r-tag); background: var(--red); color: #fff; }
@media (max-width: 760px) { .col-hide { display: none; } .table { min-width: 0; } }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.pager__btns { display: flex; gap: 8px; }
.pager__btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-ctl); border: 1px solid var(--line-strong); color: #fff; font-family: var(--f-mono); font-size: 14px; text-decoration: none; }
.pager__btn:hover { border-color: var(--blue-text); color: #fff; }
.pager__btn[aria-current="page"] { background: var(--red); border-color: var(--red); }
.pager__btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 24px; text-align: center; border-radius: var(--r-card); border: 1px dashed #2E3754; }
.me-panel { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: 24px; border-radius: 20px; border: 1px solid #2A1820; background: linear-gradient(180deg, #140A10 0%, var(--surface) 60%); }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 12px; border-radius: 12px; background: var(--raised); display: flex; flex-direction: column; gap: 4px; }
.stat span { font-size: 12px; color: var(--subtle); font-family: var(--f-mono); }
.stat strong { font-size: 18px; }
.achv-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--raised); }

/* ---------- motion ---------- */
@keyframes hta-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes hta-dash { to { stroke-dashoffset: -240; } }
@keyframes hta-drift { to { background-position: 240px 0; } }
@keyframes hta-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes hta-blink { 0%, 92%, 100% { opacity: 1; } 95% { opacity: .2; } }
@keyframes hta-swing { from { transform: rotate(24deg); } to { transform: rotate(-24deg); } }
@keyframes hta-swing-b { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
.rise { animation: hta-rise .9s cubic-bezier(.2,.7,.2,1) both; }
.flow { animation: hta-dash 9s linear infinite; }
.visor { animation: hta-blink 4s linear infinite; }
/* swing pivots are set per-scene with --pivot (in SVG user units) */
.swing { transform-box: view-box; transform-origin: var(--pivot, 0 0); animation: hta-swing 3.4s cubic-bezier(.45,0,.55,1) infinite alternate; }
.swing--b { animation-name: hta-swing-b; animation-duration: 4.4s; }

/* Animated spider-web in the hero: bold white↔gold threads with energy
   travelling along each strand (reads like live socket traffic). */
.hero__web { opacity: .32; filter: drop-shadow(0 0 6px rgba(247,197,107,.35)); }
.hero__web path {
  stroke: #FFFFFF;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 16 12;
  animation: hta-web-flow 7s linear infinite, hta-web-glow 6s ease-in-out infinite;
}
/* stagger the rings so the whole web shimmers instead of marching in lockstep */
.hero__web path:nth-child(2n) { animation-duration: 9s, 5s; animation-delay: -1.5s, -1s; stroke-dasharray: 10 16; }
.hero__web path:nth-child(3n) { animation-duration: 11s, 7s; animation-delay: -3s, -2.5s; }

@keyframes hta-web-flow { to { stroke-dashoffset: -280; } }
@keyframes hta-web-glow {
  0%, 100% { stroke: #FFFFFF; }          /* bold white */
  50%      { stroke: #F7C56B; }          /* golden (amber token) */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ===================================================================
   Dashboard + Labs catalog (added for the labs integration)
   =================================================================== */
/* Lab cards as links */
.lab-card { display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: inherit; height: 100%; }
.lab-card .lab__foot { margin-top: auto; }
.lab-card .btn { pointer-events: none; }   /* whole card is the link */

/* Status chip on cards / detail */
.lab-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--subtle); font-family: var(--f-mono); }
.lab-status--active { color: var(--amber); }
.lab-status--done { color: var(--green); }

/* Dashboard stat tiles */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat__num { font-family: var(--f-display); font-weight: 800; font-size: 44px; line-height: 1; color: #fff; }
.stat__den { font-size: 24px; color: var(--subtle); font-weight: 700; }
.stat__label { font-size: 14px; color: var(--muted); }

/* Storyline lab chips on the dashboard */
.dash-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dash-chip { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface);
  font-family: var(--f-mono); font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none;
  transition: border-color .15s ease, color .15s ease, transform .15s ease; }
.dash-chip:hover { border-color: var(--line-hover); color: #fff; transform: translateY(-2px); }
.dash-chip--in_progress { border-color: var(--amber); color: var(--amber); }
.dash-chip--completed { border-color: var(--green); color: var(--green); background: rgba(82,224,168,.08); }

/* Lab detail page */
.back-link { display: inline-block; margin-bottom: 20px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back-link:hover { color: #fff; }
.lab-detail { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 900px) { .lab-detail { grid-template-columns: minmax(0,1fr) 320px; align-items: start; } }
/* NOTE: .lab-detail__topic/__summary/__sub/__panel are defined once, further below
   (the "LAB DETAIL PAGE" block). .lab-flow was unused (template uses .lab-steps). */
.lab-detail__meta { display: flex; flex-direction: column; gap: 12px; padding-bottom: 6px; }
.lab-detail__meta > div { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; }
.lab-detail__meta > div:last-child { border-bottom: 0; padding-bottom: 0; }
.lab-detail__k { color: var(--muted); font-size: 14px; }
.lab-detail__v { color: var(--text); font-size: 14px; font-weight: 600; text-align: right; }
.lab-detail__hint { font-size: 12px; margin: -6px 0 2px; }

/* failed / out-of-time lab chip on the dashboard */
.dash-chip--failed { border-color: var(--red-bright); color: var(--red-text); background: rgba(214,31,53,.08); }

/* ===================================================================
   LAB DETAIL PAGE — richer layout + original web-slinger animations.
   (UI app has no CSP; all art is original web/comic motifs.)
   =================================================================== */
.lab-detail-sec { position: relative; overflow: hidden; }
.lab-detail-sec .container { position: relative; z-index: 1; }

/* animated web backdrop (top-right), reuses the hero-web flow/glow */
.lab-detail__web { position: absolute; z-index: 0; right: -220px; top: -200px; width: 820px; height: 820px;
  max-width: none; opacity: .14; pointer-events: none; }
.lab-detail__web path { stroke: #FFFFFF; stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 16 12;
  animation: hta-web-flow 8s linear infinite, hta-web-glow 6s ease-in-out infinite; }
.lab-detail__web path:nth-child(2n) { animation-duration: 10s, 5s; stroke-dasharray: 10 16; }

/* header: icon badge + pills */
.lab-detail__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.lab-detail__badge { position: relative; width: 60px; height: 60px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--lab-accent, var(--red));
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--lab-accent, #D61F35) 55%, transparent); animation: lab-badge-glow 3s ease-in-out infinite; }
@keyframes lab-badge-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(229,36,59,.0); } 50% { box-shadow: 0 0 22px -4px color-mix(in srgb, var(--lab-accent, #D61F35) 60%, transparent); } }
.lab-detail__pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill--limit { background: rgba(224,194,69,.1); color: var(--amber); border: 1px solid rgba(224,194,69,.4); font-family: var(--f-mono); }
.pill--xp { background: rgba(82,224,168,.12); color: #7DE6A6; border: 1px solid rgba(82,224,168,.4); font-family: var(--f-mono); }
.lab-status--fail { color: var(--red-text); }

.lab-detail__title { margin: 6px 0 10px; }
.lab-detail__topic { font-family: var(--f-mono); font-size: 14px; letter-spacing: .02em; color: var(--amber); margin: 0 0 18px; }
.lab-detail__summary { font-size: 16px; line-height: 1.75; color: var(--text-2); max-width: 66ch; }

/* objective callout */
.lab-objective { position: relative; margin: 26px 0 8px; padding: 18px 22px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--red); overflow: hidden; }
.lab-objective::after { content: ""; position: absolute; top: -20px; right: -20px; width: 90px; height: 90px; opacity: .5; pointer-events: none;
  background: radial-gradient(circle at 100% 0, transparent 38px, rgba(255,255,255,.08) 39px 40px, transparent 41px),
              radial-gradient(circle at 100% 0, transparent 62px, rgba(255,255,255,.06) 63px 64px, transparent 65px); }
.lab-objective__k { display: block; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--red-text); margin-bottom: 6px; }
.lab-objective p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--text); }

/* "How the room runs" — vertical web-silk stepper */
.lab-detail__sub { font-family: var(--f-display); font-weight: 800; font-size: 24px; color: #fff; margin: 32px 0 16px; }
.lab-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.lab-steps::before { content: ""; position: absolute; left: 17px; top: 14px; bottom: 14px; width: 2px;
  background: linear-gradient(180deg, rgba(42,48,67,0), #2A3043 12%, #2A3043 88%, rgba(42,48,67,0));
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 8px, transparent 8px 12px);
          mask-image: repeating-linear-gradient(180deg, #000 0 8px, transparent 8px 12px);
  animation: lab-thread 1.4s linear infinite; }
@keyframes lab-thread { to { -webkit-mask-position: 0 12px; mask-position: 0 12px; } }
.lab-step { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; padding: 9px 0; }
.lab-step__node { flex-shrink: 0; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--raised); border: 1px solid var(--line-strong);
  font-family: var(--f-mono); font-size: .8rem; font-weight: 700; color: var(--muted); transition: all .18s ease; }
.lab-step:hover .lab-step__node { border-color: var(--red-bright); color: #fff; transform: translateY(-2px); box-shadow: 0 0 0 4px rgba(214,31,53,.12); }
.lab-step__label { font-size: 15px; color: var(--text-2); transition: color .18s ease; }
.lab-step:hover .lab-step__label { color: #fff; }

/* operation eyebrow above the title */
.lab-detail__op { display: inline-block; font-family: var(--f-mono); font-size: 12px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--red-text); margin-bottom: 8px; }

/* topic tag chips */
.lab-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.lab-tag { font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--subtle); border: 1px solid var(--line); border-radius: 7px; padding: 5px 11px; background: rgba(255,255,255,.02); }

/* blue variant of the objective callout (investigation rule) */
.lab-objective--blue { border-left-color: var(--blue); }
.lab-objective--blue .lab-objective__k { color: var(--blue-text); }

/* opening scene — narrative card */
.lab-scene { margin: 26px 0 8px; padding: 20px 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.lab-scene__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.lab-scene__k { font-family: var(--f-mono); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); line-height: 1.5; }
.lab-scene__time { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; white-space: nowrap;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); margin-top: 2px; }
.lab-scene__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red-bright); flex-shrink: 0; }
.lab-scene p { margin: 0 0 12px; font-size: 15px; line-height: 1.75; color: var(--muted); }
.lab-scene p:last-child { margin-bottom: 0; }

/* what you'll learn */
.lab-learn { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lab-learn li { position: relative; padding-left: 24px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.lab-learn li::before { content: "◆"; position: absolute; left: 0; top: 1px; color: var(--red-text); font-size: 12px; }

/* mentor note */
.lab-mentor { display: flex; gap: 14px; align-items: flex-start; margin: 24px 0 0; padding: 16px 20px;
  border-radius: 12px; border: 1px dashed var(--line-strong); background: rgba(247,197,107,.04); }
.lab-mentor__tag { flex-shrink: 0; font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--amber); border: 1px solid rgba(247,197,107,.4); border-radius: 7px; padding: 4px 9px; }
.lab-mentor p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--text-2); font-style: italic; }

/* two-up row: "How the room runs" + "What you'll learn" as side-by-side cards */
.lab-detail__cols { display: grid; gap: 20px; margin-top: 10px; align-items: start; }
@media (min-width: 680px) { .lab-detail__cols { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.lab-detail__col { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.lab-detail__col .lab-detail__sub { margin: 0 0 16px; font-size: 20px; }

/* side panel: web corner + hover lift */
.lab-detail__panel { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.lab-detail__panel::before { content: ""; position: absolute; top: 0; right: 0; width: 100px; height: 100px; opacity: .12; pointer-events: none;
  background:
    repeating-conic-gradient(from 0deg at 100% 0, rgba(255,255,255,.5) 0 1deg, transparent 1deg 30deg),
    radial-gradient(circle at 100% 0, transparent 30px, rgba(255,255,255,.25) 31px 32px, transparent 33px),
    radial-gradient(circle at 100% 0, transparent 58px, rgba(255,255,255,.2) 59px 60px, transparent 61px); }

/* primary CTA — original "web-shoot" sweep on hover */
.lab-cta { position: relative; overflow: hidden; }
.lab-cta__label { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; }
.lab-cta__web { position: absolute; inset: 0; z-index: 0; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 0% 50%, rgba(255,255,255,.28) 0 1.2deg, transparent 1.2deg 16deg);
  transform: scale(.4); transform-origin: 0 50%; transition: opacity .2s ease, transform .35s ease; }
.lab-cta:hover .lab-cta__web { opacity: .5; transform: scale(1.1); }

@media (prefers-reduced-motion: reduce) {
  .lab-detail__web path, .lab-detail__badge, .lab-steps::before { animation: none; }
  .lab-step:hover .lab-step__node, .lab-cta:hover .lab-cta__web { transform: none; }
}

/* ---------- profile (edit own) ---------- */
.profile { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.profile__form { display: flex; flex-direction: column; gap: 18px; padding: 26px; }
.handle-lock { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: rgba(255,255,255,.02); }
.social-row { display: flex; align-items: stretch; margin-bottom: 8px; }
.social-row__prefix { display: inline-flex; align-items: center; padding: 0 12px; font-family: var(--f-mono); font-size: 13px; color: #8C94AB; background: rgba(255,255,255,.03); border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r-ctl) 0 0 var(--r-ctl); white-space: nowrap; }
.social-row__input { border-radius: 0 var(--r-ctl) var(--r-ctl) 0 !important; }
.profile__side { position: sticky; top: 90px; }
.rank-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; text-align: center; align-items: center; }
.rank-card__rank { font-family: var(--f-display, inherit); font-weight: 800; font-size: 56px; line-height: 1; color: var(--red-bright); }
@media (max-width: 860px) { .profile { grid-template-columns: 1fr; } .profile__side { position: static; } }

/* Danger Zone (profile.html only) — a clearly-separated destructive-action card below
   the edit form/sidebar, not inside .profile__form, so it never shares a submit button
   or validation path with ordinary profile edits. */
.danger-zone {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 24px; padding: 22px 26px; border-color: rgba(229,36,59,.3);
  background: linear-gradient(135deg, rgba(229,36,59,.06), rgba(13,15,24,.2) 55%), var(--surface);
}
.danger-zone__eyebrow { color: var(--red-text, #FF6B7A); }
.danger-zone .btn-danger { flex: none; }
@media (max-width: 560px) { .danger-zone { flex-direction: column; align-items: stretch; } .danger-zone .btn-danger { width: 100%; } }

/* ---------- public profile ---------- */
.pub { padding: 30px; display: flex; flex-direction: column; gap: 20px; }
.pub__head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pub__avatar { width: 64px; height: 64px; font-size: 24px; flex: none; }
.pub__id { display: flex; flex-direction: column; gap: 4px; }
.pub__name { font-size: 30px; margin: 0; }
.pub__country { color: var(--text-2, #B4BACB); font-size: 15px; display: flex; align-items: center; gap: 6px; }
.pub__rank { margin-left: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 14px; }
.pub__rank-num { font-weight: 800; font-size: 26px; color: var(--red-bright); }
.pub__bio { font-size: 17px; line-height: 1.6; color: #C7CDDC; margin: 0; }
.pub__links { display: flex; flex-wrap: wrap; gap: 10px; }
.pub__foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line-soft); padding-top: 18px; }
@media (max-width: 560px) { .pub__rank { margin-left: 0; } }

/* ---------- leaderboard country cell + name link ---------- */
.td-country span { font-family: var(--f-mono); font-size: 14px; color: #C2C8D8; white-space: nowrap; }
/* name link: animated gradient underline that slides in from the left (no flat red line) */
.lb-name { position: relative; font-weight: 600; color: inherit; text-decoration: none;
  transition: color .18s ease, text-shadow .18s ease; }
.lb-name::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, var(--red-bright), var(--blue-text));
  transform: scaleX(0); transform-origin: left; transition: transform .26s cubic-bezier(.22,.61,.36,1); }
.lb-name:hover, .lb-name:focus-visible { color: #fff; text-shadow: 0 0 14px rgba(229,36,59,.35); }
.lb-name:hover::after, .lb-name:focus-visible::after { transform: scaleX(1); }
/* podium names: lift + glow instead of an underline */
.podium__name.lb-name::after { display: none; }
.podium__name.lb-name { transition: color .18s ease, transform .18s ease, text-shadow .18s ease; display: inline-block; }
.podium__name.lb-name:hover { transform: translateY(-1px); color: #fff; text-shadow: 0 0 16px rgba(127,173,255,.45); }
/* row hover: gently highlight the whole row + nudge the avatar */
.table tbody tr { transition: background .16s ease; }
.table tbody tr:hover { background: rgba(255,255,255,.03); }
.table tbody tr .avatar { transition: transform .18s ease, box-shadow .18s ease; }
.table tbody tr:hover .avatar { transform: scale(1.06); box-shadow: 0 6px 18px -8px rgba(229,36,59,.6); }

/* ---------- lab flag submission ---------- */
.flag-form { margin-top: 4px; }
.flag-form__label { display: block; font-size: 13px; margin-bottom: 8px; color: #B4BACB; }
.flag-form__row { display: flex; gap: 8px; }
.flag-form__input { flex: 1; font-family: var(--f-mono); letter-spacing: .3px; }
.flag-form__btn { flex: none; white-space: nowrap; }
@media (max-width: 420px) { .flag-form__row { flex-direction: column; } .flag-form__btn { width: 100%; } }

/* ===================== dashboard redesign ===================== */
.dash-top { position: relative; overflow: hidden; padding-bottom: 8px; }
.dash-top__web { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none; z-index: 0; }
.dash-hero { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }

/* Nudge for existing accounts with no country set yet (dashboard.html) */
.country-nudge {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: 12px; border: 1px solid rgba(47,123,255,.3);
  background: rgba(47,123,255,.07); color: var(--text-2); font-size: 14px;
}
.country-nudge__ico { color: var(--blue-text, #7FADFF); flex: none; display: flex; }
.country-nudge .btn { margin-left: auto; }
@media (max-width: 560px) { .country-nudge .btn { margin-left: 0; width: 100%; justify-content: center; } }
.dash-hero__id { display: flex; align-items: center; gap: 20px; min-width: 0; }
.dash-hero__avatar { flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 70px; height: 70px; border-radius: 50%; background: var(--red); color: #fff;
  font-family: var(--f-mono); font-weight: 700; font-size: 24px; letter-spacing: .04em;
  box-shadow: 0 10px 26px -14px rgba(229,36,59,.55); }
.dash-hero__name { font-size: clamp(34px, 4.4vw, 56px); margin: 2px 0 8px; }
.dash-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px;
  font-family: var(--f-mono); font-size: 14px; color: #C2C8D8; }
.dash-hero__meta i { color: #4B5268; font-style: normal; }
.dash-hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* progress ring */
.dash-ring { position: relative; flex: none; width: 164px; height: 164px; }
/* soft radial glow behind the ring */
.dash-ring::before { content: ""; position: absolute; inset: 14px; border-radius: 50%;
  background: radial-gradient(circle, rgba(229,36,59,.16), transparent 68%); filter: blur(4px); z-index: 0; }
.dash-ring svg { position: relative; z-index: 1; }
.dash-ring__ticks { stroke: rgba(255,255,255,.07); }
.dash-ring__track { stroke: rgba(255,255,255,.05); }
.dash-ring__fill { stroke-dashoffset: calc(100 - var(--pct, 0));
  animation: dash-ring-in 1.3s cubic-bezier(.22,.61,.36,1) both; }
@keyframes dash-ring-in { from { stroke-dashoffset: 100; } to { stroke-dashoffset: calc(100 - var(--pct, 0)); } }
/* glowing head dot that sits at the tip of the arc */
.dash-ring__head { transform: rotate(var(--deg, 0deg)); transform-origin: 60px 60px;
  animation: dash-head-in 1.3s cubic-bezier(.22,.61,.36,1) both; }
@keyframes dash-head-in { from { transform: rotate(0deg); } to { transform: rotate(var(--deg, 0deg)); } }
.dash-ring__dot { fill: #fff; filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 9px rgba(247,197,107,.9));
  animation: dash-dot-pulse 1.7s ease-in-out infinite; }
@keyframes dash-dot-pulse { 0%, 100% { r: 4; opacity: .9; } 50% { r: 5.4; opacity: 1; } }
.dash-ring__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2; }
.dash-ring__pct { display: inline-flex; align-items: baseline; gap: 1px; }
.dash-ring__pct strong { font-family: var(--f-display); font-weight: 800; font-size: 46px; color: #fff; line-height: 1;
  text-shadow: 0 2px 14px rgba(229,36,59,.4); }
.dash-ring__pct i { font-family: var(--f-display); font-style: normal; font-size: 22px; font-weight: 800; color: var(--gold, #F7C56B); }
.dash-ring__center em { font-style: normal; font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 3px; text-transform: uppercase; color: var(--subtle); margin-top: 4px; }

/* stat cards */
.dash-stat { position: relative; padding: 20px 20px 18px; overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.dash-stat::before { display: none; }
.dash-stat__ico { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center;
  border-radius: 11px; background: rgba(255,255,255,.04); border: 1px solid var(--line-strong); margin-bottom: 12px; color: var(--text-2); }
.dash-stat:hover { transform: translateY(-4px); border-color: var(--line-hover); box-shadow: 0 24px 44px -28px rgba(229,36,59,.5); }
.dash-stat--link { text-decoration: none; color: inherit; cursor: pointer; }

/* next-up card */
.dash-next { flex-direction: row; align-items: center; gap: 24px; padding: 26px 30px;
  text-decoration: none; color: inherit; position: relative; overflow: hidden; }
.dash-next::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(85% 130% at 100% 50%, rgba(229,36,59,.10), transparent 62%); }
.dash-next__ico { flex: none; width: 66px; height: 66px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--line-strong); position: relative; }
.dash-next__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px;
  text-align: left; position: relative; }
.dash-next__cta { flex: none; pointer-events: none; position: relative; white-space: nowrap; }
@media (max-width: 680px) {
  .dash-next { flex-direction: column; text-align: center; gap: 18px; padding: 26px 20px; }
  .dash-next__body { text-align: center; align-items: center; }
  .dash-next__cta { width: 100%; justify-content: center; }
}

/* storyline legend */
.dash-legend { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; font-family: var(--f-mono);
  font-size: 12px; color: var(--subtle); text-transform: uppercase; letter-spacing: 1px; }
.dash-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; border: 1px solid; }
.dash-dot--completed { background: rgba(82,224,168,.15); border-color: var(--green); }
.dash-dot--in_progress { background: transparent; border-color: var(--amber); }
.dash-dot--not_started { background: transparent; border-color: var(--line-strong); }

.progress__bar { transition: width 1s cubic-bezier(.22,.61,.36,1); }

@media (max-width: 760px) {
  .dash-hero { gap: 22px; }
  .dash-hero__avatar { width: 56px; height: 56px; font-size: 20px; }
  .dash-ring { width: 120px; height: 120px; }
  .dash-ring svg { width: 120px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-ring__fill, .dash-ring__head, .dash-ring__dot { animation: none; }
  .progress__bar { transition: none; }
  .dash-stat, .card--lift { transition: none; }
}

/* ---------- sequential-unlock: locked states ---------- */
.pill--locked { background: rgba(224,194,69,.12); color: var(--gold, #E0C245); border-color: rgba(224,194,69,.4); }
.lab-card--locked { cursor: not-allowed; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.012) 0 9px, transparent 9px 18px), var(--surface);
  border-color: var(--line-strong); }
.lab-card--locked .lab__icon { color: #717B97 !important; }
.lab-card--locked .lab__cat { color: #717B97; }
.lab-card--locked .lab__title { color: #B7BECF; }
.lab-card--locked .lab__desc { color: #8C94AB; }
.lab-card--locked .lab__meta,
.lab-card--locked .lab__meta .lab__xp { color: #7D859C; }
.lab-status--locked { color: var(--gold, #E0C245); font-family: var(--f-mono); font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; }
.dash-chip--locked { border-color: var(--line-strong); color: var(--subtle); opacity: .7; cursor: not-allowed; }
.lab-locked { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 16px;
  border: 1px dashed var(--line-strong); border-radius: 14px; background: rgba(255,255,255,.02); }
.lab-locked__icon { font-size: 30px; filter: grayscale(.2); }
.lab-locked__title { font-family: var(--f-display); font-weight: 800; font-size: 22px; color: #fff; margin: 0; letter-spacing: .04em; }

/* ---------- Pro (paid) labs + upgrade paywall ---------- */
.lab__pills { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pill--pro { background: rgba(229,36,59,.12); color: var(--red-text, #FF6B7A); border-color: rgba(229,36,59,.45); }
.lab-status--pro { color: var(--red-text, #FF6B7A); font-family: var(--f-mono); font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; }
.lab-card--pro { border-color: rgba(229,36,59,.28); }
.lab-card--pro:hover { border-color: rgba(229,36,59,.5); box-shadow: 0 28px 50px -30px rgba(229,36,59,.55); }
.dash-chip--pro { border-color: rgba(229,36,59,.45); color: var(--red-text, #FF6B7A); }
.dash-chip--pro:hover { border-color: var(--red-bright); color: #fff; }
.lab-upgrade { border-color: rgba(229,36,59,.4); background: rgba(229,36,59,.06); }
.lab-upgrade__icon { color: var(--red-text, #FF6B7A); filter: none; }

/* ---------- subscription plan badges (nav + profile) ---------- */
.plan-badge { position: relative; display: inline-flex; align-items: center; gap: 6px; overflow: hidden;
  font-family: var(--f-mono); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  line-height: 1; white-space: nowrap; border-radius: 999px; vertical-align: middle; }
.plan-badge__ico { display: inline-flex; z-index: 1; }
.plan-badge__txt { z-index: 1; }
.plan-badge--sm { font-size: 10.5px; padding: 5px 9px; }
.plan-badge--md { font-size: 12px; padding: 6px 11px; }
.plan-badge--lg { font-size: 13px; padding: 8px 15px; }
.plan-badge--sm .plan-badge__ico svg { width: 12px; height: 12px; }
.plan-badge--lg .plan-badge__ico svg { width: 15px; height: 15px; }
/* Founder (lifetime) — "Golden Web Crest": the same premium gold as before, plus a
   faint blue web-crack radiating from the top-right corner (ties it to the same
   Spider-Man motif as the Pro badge's web-pattern corners) and a slightly slower,
   warmer shine sweep so it reads as calmer/more prestigious than Pro's livelier
   red/blue badge. z-index: -1 on the web-crack keeps it under the icon/text (which
   carry z-index: 1, see .plan-badge__ico/__txt above) without needing extra markup. */
.plan-badge--founder { color: #2A1E04;
  background: linear-gradient(135deg, #FFE9A6 0%, #F7C56B 42%, #E0A52E 100%);
  border: 1px solid rgba(255,220,130,.6);
  box-shadow: 0 2px 12px -2px rgba(224,165,46,.6), inset 0 1px 0 rgba(255,255,255,.55); }
.plan-badge--founder .plan-badge__ico { color: #6B4E07; }
.plan-badge--founder::before {
  content: ""; position: absolute; top: -70%; right: -30%; width: 85px; height: 85px; z-index: -1; opacity: .28;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%233E63FF' stroke-width='1.6'%3E%3Ccircle cx='100' cy='0' r='20'/%3E%3Ccircle cx='100' cy='0' r='42'/%3E%3Cpath d='M100 0L35 90M100 0L100 90'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100% 100%; pointer-events: none;
}
.plan-badge--founder::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 18%, rgba(255,241,214,.65) 50%, transparent 82%);
  background-size: 220% 100%; animation: founder-shine 5.5s ease-in-out infinite; }
@keyframes founder-shine { 0%, 55% { background-position: 200% 0; } 100% { background-position: -130% 0; } }
@media (prefers-reduced-motion: reduce) { .plan-badge--founder::after { animation: none; opacity: 0; } }
/* Pro — "Spider-sense emblem": a dark glass pill holding a thin gold ring+spark
   mark (the final pick from the badge-concept review) next to the PRO wordmark.
   A slow breathing glow on the spark (the "tingle") plus a soft gold sheen sweep
   across the pill give it quiet, premium motion without being loud. Plain CSS
   (no SVG animation), so it scales correctly across all three badge sizes. */
.plan-badge--pro {
  color: #F3E6C4; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #1B1E2C 0%, #0D0F18 100%);
  border: 1.3px solid rgba(224,165,46,.55);
  box-shadow: 0 0 0 1px rgba(224,165,46,.1), 0 2px 10px -2px rgba(224,165,46,.4);
}
.plan-badge--pro .plan-badge__ico { color: #E0C245; animation: planbadge-pro-glow 2.4s ease-in-out infinite; }
.plan-badge--pro .plan-badge__txt { color: #F3E6C4; }
.plan-badge--pro::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(224,165,46,.4), transparent);
  animation: planbadge-pro-sheen 3.4s ease-in-out infinite;
}
@keyframes planbadge-pro-sheen { 0% { left: -55%; } 55%, 100% { left: 115%; } }
@keyframes planbadge-pro-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(224,165,46,0)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 4px rgba(224,165,46,.9)); transform: scale(1.14); }
}
@media (prefers-reduced-motion: reduce) {
  .plan-badge--pro::after, .plan-badge--pro .plan-badge__ico { animation: none; }
}
/* profile hero: name + badge on one line */
.id-nameline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
/* pricing: "your current plan" marker */
.price-card__current { display: flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--f-mono); font-size: 13px; font-weight: 700; letter-spacing: .03em;
  color: var(--amber, #F7C56B); padding: 11px; border-radius: 10px; margin-bottom: 4px;
  background: rgba(247,197,107,.08); border: 1px solid rgba(247,197,107,.25); }
.price-card__current--gold { color: #F3CC66; background: rgba(224,165,46,.12); border-color: rgba(224,165,46,.4); }

/* ===================== profile bio — web-slinger field ===================== */
.bio-field { position: relative; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line-strong); overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease; }
.bio-field.is-err { border-color: #B3122A; }

.bio-field__input { position: relative; z-index: 2; display: block; width: 100%;
  min-height: 120px; padding: 15px 16px; border: 0; background: transparent; resize: vertical;
  color: #EDEFF6; font-family: var(--f-body); font-size: 16px; line-height: 1.7; letter-spacing: .1px; }
.bio-field__input:focus { outline: none; }
.bio-field__input::placeholder { color: #7D859C; }

/* animated gradient ring (red → gold → blue) that lights up on focus */
.bio-field::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: linear-gradient(120deg, var(--red-bright), var(--amber), var(--blue-text), var(--red-bright));
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s ease; z-index: 3; pointer-events: none; }
.bio-field:focus-within { border-color: transparent;
  box-shadow: 0 0 0 1px rgba(229,36,59,.12), 0 18px 46px -24px rgba(229,36,59,.65); }
.bio-field:focus-within::before { opacity: 1; animation: bio-sweep 3.6s linear infinite; }
@keyframes bio-sweep { to { background-position: 300% 0; } }

/* web strands anchored top-right that shoot across on focus (THWIP) */
.bio-field__web { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none;
  opacity: 0; transition: opacity .35s ease; }
.bio-field:focus-within .bio-field__web { opacity: .55; }
.bio-field__web path { fill: none; stroke: #9FB0D8; stroke-width: 1; stroke-linecap: round;
  stroke-dasharray: 620; stroke-dashoffset: 620; }
.bio-field__web .bio-web__rings path { stroke: rgba(247,197,107,.8); }
.bio-field:focus-within .bio-field__web path { animation: bio-thwip .75s cubic-bezier(.2,.8,.2,1) forwards; }
.bio-field:focus-within .bio-field__web path:nth-child(2) { animation-delay: .05s; }
.bio-field:focus-within .bio-field__web path:nth-child(3) { animation-delay: .1s; }
.bio-field:focus-within .bio-field__web path:nth-child(4) { animation-delay: .15s; }
.bio-field:focus-within .bio-field__web path:nth-child(5) { animation-delay: .2s; }
@keyframes bio-thwip { to { stroke-dashoffset: 0; } }

/* THWIP! pops in when you focus */
.bio-field__thwip { position: absolute; top: 9px; right: 13px; z-index: 4; pointer-events: none;
  font-family: var(--f-display); font-weight: 900; font-size: 17px; color: var(--red-bright);
  -webkit-text-stroke: 1px rgba(255,255,255,.35); letter-spacing: .02em;
  opacity: 0; transform: scale(.55) rotate(-10deg); transition: opacity .25s ease, transform .3s cubic-bezier(.2,1.3,.3,1); }
.bio-field:focus-within .bio-field__thwip { opacity: .92; transform: scale(1) rotate(-6deg);
  animation: bio-thwip-pop 1.7s ease-in-out .35s infinite; }
@keyframes bio-thwip-pop { 0%,100% { transform: scale(1) rotate(-6deg); } 50% { transform: scale(1.08) rotate(-2deg); } }

/* char counter warms up near the limit */
.bio-count { transition: color .2s ease; font-family: var(--f-mono); }
.bio-count.is-near { color: var(--amber); }
.bio-count.is-full { color: var(--red-text); }

@media (prefers-reduced-motion: reduce) {
  .bio-field:focus-within::before { animation: none; }
  .bio-field:focus-within .bio-field__web path { animation: none; stroke-dashoffset: 0; }
  .bio-field:focus-within .bio-field__thwip { animation: none; }
}

/* =======================================================================
   Web-slinger profile identity — hero banner + animated avatar badge
   Shared by /profile and /u/<handle>. Original web-shoot art only.
   ======================================================================= */
.id-hero { position: relative; overflow: hidden; border-radius: 20px; padding: 30px 28px;
  background: radial-gradient(130% 150% at 88% -30%, rgba(229,36,59,.24), transparent 55%),
              linear-gradient(180deg, #16111C 0%, var(--surface) 72%);
  border: 1px solid var(--line-strong); }
.id-hero__web { position: absolute; right: -150px; top: -180px; width: 560px; height: 560px;
  opacity: .22; pointer-events: none; filter: drop-shadow(0 0 6px rgba(247,197,107,.3)); }
.id-hero__web path { stroke: #FFFFFF; stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 16 12;
  animation: hta-web-flow 8s linear infinite, hta-web-glow 6s ease-in-out infinite; }
.id-hero__web path:nth-child(2n) { animation-duration: 10s, 5s; animation-delay: -1.5s, -1s; }
.id-hero__web path:nth-child(3n) { animation-duration: 12s, 7s; animation-delay: -3s, -2.5s; }
.id-hero__swing { position: absolute; left: 8%; top: -8px; width: 150px; height: 300px; opacity: .55;
  pointer-events: none; }
.id-hero__inner { position: relative; z-index: 2; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

/* --- animated identity badge --- */
.id-badge { position: relative; width: 104px; height: 104px; flex: none; }
.id-badge--lg { width: 120px; height: 120px; }
.id-badge__ring { display: none; }
.id-badge__ring path { fill: none; stroke: #9FB0D8; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 320; stroke-dashoffset: 320; animation: id-webshoot 1.05s cubic-bezier(.2,.85,.25,1) forwards; }
.id-badge__ring path.gold { stroke: rgba(247,197,107,.9); }
.id-badge__ring path:nth-child(1){animation-delay:.02s}.id-badge__ring path:nth-child(2){animation-delay:.07s}
.id-badge__ring path:nth-child(3){animation-delay:.12s}.id-badge__ring path:nth-child(4){animation-delay:.17s}
.id-badge__ring path:nth-child(5){animation-delay:.22s}.id-badge__ring path:nth-child(6){animation-delay:.27s}
.id-badge__ring path:nth-child(7){animation-delay:.32s}.id-badge__ring path:nth-child(8){animation-delay:.37s}
.id-badge__ring path:nth-child(9){animation-delay:.46s}.id-badge__ring path:nth-child(10){animation-delay:.56s}
.id-badge__av { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-weight: 800; font-size: 40px; letter-spacing: .02em; color: #fff;
  background: radial-gradient(circle at 32% 26%, #E5243B, #B3122A 78%); box-shadow: inset 0 0 0 2px rgba(255,255,255,.1); }
.id-badge--lg .id-badge__av { font-size: 46px; }
.id-badge__spider { display: none; }
.id-badge__spider .spider-mark { width: 21px; height: 21px; }
@keyframes id-webshoot { to { stroke-dashoffset: 0; } }
@keyframes id-spin { to { transform: rotate(360deg); } }
@keyframes id-glow {
  0%,100% { box-shadow: inset 0 0 0 2px rgba(255,255,255,.14), 0 0 0 4px rgba(10,12,22,.92), 0 10px 26px -10px rgba(229,36,59,.5); }
  50%     { box-shadow: inset 0 0 0 2px rgba(255,255,255,.2),  0 0 0 4px rgba(10,12,22,.92), 0 12px 34px -6px rgba(229,36,59,.9); } }
@keyframes id-bob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }

/* --- identity text block --- */
.id-meta { display: flex; flex-direction: column; gap: 9px; min-width: 0; flex: 1; }
.id-eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--red-bright); }
.id-name { font-family: var(--f-display); font-weight: 800; font-size: 40px; line-height: 1.02; margin: 0; color: #fff; }
.id-sub { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 15px; }
.id-sub .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }
.id-rankpill { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 18px;
  border: 1px solid rgba(247,197,107,.4); border-radius: 14px; background: rgba(247,197,107,.08); }
.id-rankpill b { font-family: var(--f-display); font-weight: 800; font-size: 24px; color: var(--amber, #F7C56B); line-height: 1; }
.id-rankpill span { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--subtle); }

/* --- public profile v2 --- */
.pub2 { display: flex; flex-direction: column; gap: 22px; }
.pub2__bio { position: relative; margin: 0; padding: 14px 18px 14px 20px; border-radius: 14px;
  background: rgba(255,255,255,.025); border: 1px solid var(--line-soft);
  font-size: 17px; line-height: 1.6; color: #C7CDDC; }
.pub2__bio::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--red-bright), var(--amber, #F7C56B)); }
.pub-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.pub-stat { position: relative; overflow: hidden; padding: 18px 16px; border-radius: 16px; background: var(--raised);
  border: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 6px; }
.pub-stat__ico { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--line-strong); color: var(--text-2); margin-bottom: 2px; }
.pub-stat b { font-family: var(--f-display); font-weight: 800; font-size: 30px; line-height: 1; color: #fff; }
.pub-stat span { font-family: var(--f-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--subtle); }
.pub-links { display: flex; flex-wrap: wrap; gap: 10px; }
.pub-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line-soft); padding-top: 20px; }

@media (max-width: 560px) {
  .id-hero { padding: 24px 18px; }
  .id-name { font-size: 30px; }
  .id-rankpill { margin-left: 0; }
  .pub-stats { grid-template-columns: 1fr; }
  .id-hero__swing { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .id-badge__ring, .id-badge__ring path, .id-badge__av, .id-badge__spider, .id-hero__web path { animation: none; }
  .id-badge__ring path { stroke-dashoffset: 0; }
}

/* hanging spider that swings on a web thread (hero accent) */
.id-hero__drop { position: absolute; top: -2px; right: 28%; z-index: 2; pointer-events: none;
  transform-origin: top center; animation: id-drop-swing 4.2s cubic-bezier(.45,0,.55,1) infinite alternate; }
.id-hero__drop .thread { display: block; width: 1.5px; height: 42px; margin: 0 auto;
  background: linear-gradient(#FFFFFF, rgba(255,255,255,.25)); opacity: .7; }
.id-hero__drop .bug { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  margin: -2px auto 0; color: var(--red-bright);
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); animation: id-bob 3.2s ease-in-out infinite; }
.id-hero__drop .bug .spider-mark { width: 26px; height: 26px; }
@keyframes id-drop-swing { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
@media (max-width: 760px) { .id-hero__drop { display: none; } }
@media (prefers-reduced-motion: reduce) { .id-hero__drop { animation: none; } }

/* swinging web-slinger figure in the hero's open right area (not clipped near the avatar) */
.id-hero__mascot { position: absolute; top: 0; right: 18%; width: 184px; height: 100%; z-index: 1;
  pointer-events: none; opacity: .92; }
.id-hero__mascot svg { width: 100%; height: 100%; overflow: visible;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.45)); }
@media (max-width: 900px) { .id-hero__mascot { right: 6%; opacity: .7; } }
@media (max-width: 620px) { .id-hero__mascot { display: none; } }

/* =======================================================================
   Certificate — one per storyline, verifiable public page. Print-friendly.
   ======================================================================= */
.cert { position: relative; z-index: 0; overflow: hidden; border-radius: 14px; margin: 8px 0 22px;
  border: 1px solid rgba(247,197,107,.32);
  background: radial-gradient(ellipse 62% 48% at 50% 8%, rgba(247,197,107,.12), transparent 62%),
              linear-gradient(160deg, #0D0F18 0%, #0A0B13 100%);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); }
.cert__inner { position: relative; padding: clamp(24px,4vw,48px) clamp(20px,4vw,52px) clamp(18px,3vw,28px);
  text-align: center; min-height: 460px; display: flex; flex-direction: column; }
.cert__web { position: absolute; z-index: -1; top: -42%; right: -16%; width: 92%; height: 165%;
  opacity: .22; pointer-events: none; }
.cert__web path { stroke: #F7C56B; }

.cert__corner { position: absolute; z-index: 2; width: 26px; height: 26px; pointer-events: none; }
.cert__corner::before, .cert__corner::after { content: ""; position: absolute; background: rgba(247,197,107,.55); }
.cert__corner::before { width: 100%; height: 1.4px; top: 0; left: 0; }
.cert__corner::after { width: 1.4px; height: 100%; top: 0; left: 0; }
.cert__corner--tl { top: 12px; left: 12px; }
.cert__corner--tr { top: 12px; right: 12px; transform: scaleX(-1); }
.cert__corner--bl { bottom: 12px; left: 12px; transform: scaleY(-1); }
.cert__corner--br { bottom: 12px; right: 12px; transform: scale(-1,-1); }

.cert__head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid rgba(247,197,107,.22); padding-bottom: 14px; }
.cert__brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--f-display);
  font-weight: 800; letter-spacing: .12em; font-size: 17px; color: #fff; }
.cert__brand-mark { color: var(--red-bright); width: 20px; height: 20px; display: inline-flex; }
.cert__brand-mark .spider-mark { width: 20px; height: 20px; }
.cert__eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--amber, #F7C56B); }

.cert__body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 26px 0; }
.cert__intro { margin: 0; color: var(--muted); font-size: 15px; letter-spacing: .02em; }
.cert__name { margin: 6px 0 4px; font-family: var(--f-display); font-weight: 800; font-size: 54px; line-height: 1.02;
  color: #F3E7C0; letter-spacing: .01em; text-shadow: 0 0 34px rgba(247,197,107,.22); }
.cert__story { margin: 8px 0 2px; font-family: var(--f-display); font-weight: 800; font-size: 30px;
  color: var(--accent, #E5243B); letter-spacing: .01em; }
.cert__stats { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 2px;
  font-family: var(--f-mono); font-size: 13px; color: var(--amber, #F7C56B); letter-spacing: .05em; }
.cert__stats b { color: #fff; font-size: 14px; }
.cert__stat-dot { color: rgba(247,197,107,.4); }
.cert__labs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin-top: 20px; }
.cert__lab { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; line-height: 1;
  color: #C2C8D8; padding: 4px 12px 4px 4px; border-radius: 999px;
  border: 1px solid rgba(247,197,107,.2); background: rgba(255,255,255,.03); }
.cert__lab b { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(247,197,107,.16); color: var(--amber, #F7C56B); font-weight: 700;
  font-family: var(--f-mono); font-size: 9.5px; line-height: 1; flex-shrink: 0;
  font-variant-numeric: tabular-nums; text-align: center; }

.cert__divider { display: flex; align-items: center; gap: 10px; margin: 22px 0 14px; }
.cert__divider span { flex: 1; height: 1px; background: rgba(247,197,107,.22); }
.cert__divider i { font-style: normal; color: rgba(247,197,107,.55); font-size: 9px; }

.cert__foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 18px;
  margin-top: 6px; padding-top: 2px; }
.cert__sig { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.cert__sig--r { text-align: right; }
.cert__sig-line { font-family: var(--f-display); font-weight: 700; font-size: 16px; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.25); padding-bottom: 4px; }
.cert__sig-sub { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); }

/* clean gold medallion — renders identically on screen, PNG and PDF (no SVG textPath) */
.cert__seal { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 auto; }
.cert__seal-ring { width: 70px; height: 70px; border-radius: 50%; position: relative; z-index: 0;
  display: flex; align-items: center; justify-content: center; }
.cert__seal-ring-svg { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
.cert__seal-core { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--amber, #F7C56B); background: radial-gradient(circle at 35% 28%, #3a2f05, #07080D 72%);
  border: 1.4px solid var(--amber, #F7C56B); }
.cert__seal-core .spider-mark { width: 24px; height: 24px; }
.cert__seal-cap { font-family: var(--f-mono); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--amber, #F7C56B); }

.cert__verify { margin-top: 20px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .04em;
  color: var(--subtle); word-break: break-all; }

.cert-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

@media (max-width: 680px) {
  .cert__inner { padding: 30px 20px 22px; }
  .cert__name { font-size: 36px; }
  .cert__story { font-size: 23px; }
  .cert__foot { grid-template-columns: 1fr; justify-items: center; gap: 16px; }
  .cert__sig, .cert__sig--r { text-align: center; }
}
/* Print / Save-as-PDF: the certificate alone, full-bleed on a landscape page, dark + gold preserved */
@media print {
  @page { size: 1100px 720px; margin: 0; }
  html, body { background: #0B0D14 !important; margin: 0 !important; padding: 0 !important;
    height: 720px !important; max-height: 720px !important; overflow: hidden !important; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body * { visibility: hidden !important; }
  .cert, .cert * { visibility: visible !important; }
  .cert { position: fixed !important; left: 0; top: 0; width: 1100px !important; height: 720px !important;
    margin: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
  .cert__inner { height: 100%; box-sizing: border-box; padding: 48px 52px 28px; }
}

/* dashboard certificate cards + storyline cert link */
.cert-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.cert-card { flex: 1 1 300px; max-width: 380px; display: flex; flex-direction: column; gap: 12px;
  position: relative; overflow: hidden; padding: 22px; text-decoration: none; color: inherit;
  border-color: rgba(224,194,69,.3); background: linear-gradient(180deg, rgba(224,194,69,.05), var(--surface) 55%); }
.cert-card::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 90% at 100% 0, rgba(224,194,69,.14), transparent 55%); }
.cert-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; }
.cert-card__seal { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent, #E5243B); background: rgba(10,12,22,.6); border: 1px solid rgba(224,194,69,.45);
  box-shadow: 0 0 18px -6px rgba(224,194,69,.5); }
.cert-card__badge { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--amber, #F7C56B); padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(224,194,69,.3);
  background: rgba(224,194,69,.08); }
.cert-card__title { font-family: var(--f-display); font-weight: 800; font-size: 21px; color: #fff; margin: 0; position: relative; }
.cert-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; position: relative;
  padding-top: 12px; border-top: 1px solid var(--line-soft); }
.cert-card__date { font-family: var(--f-mono); font-size: 12px; color: var(--subtle); }
.cert-card__cta { font-size: 14px; font-weight: 700; color: var(--amber, #F7C56B); }
.cert-card:hover .cert-card__cta { color: #fff; }
.dash-sl__cert { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 12px;
  font-size: 13px; font-weight: 600; color: var(--amber, #F7C56B); text-decoration: none;
  border: 1px solid rgba(224,194,69,.3); border-radius: 10px; background: rgba(224,194,69,.06); }
.dash-sl__cert:hover { background: rgba(224,194,69,.12); color: #fff; }

/* Powered by TrinetLayer strip on the certificate */
.cert__powered { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px;
  font-size: 12.5px; letter-spacing: .04em; color: var(--muted); }
.cert__powered-logo { width: 22px; height: 22px; border-radius: 5px; object-fit: contain;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cert__powered b { color: #fff; font-weight: 700; letter-spacing: .06em; }
.cert__verify b { color: var(--amber, #F7C56B); font-family: var(--f-mono); letter-spacing: .08em; }
.cert__verify a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cert__verify a:hover { color: var(--amber, #F7C56B); }

/* editable hacker handle with live availability */
.handle-edit { display: flex; align-items: center; gap: 2px; padding: 0 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.handle-edit:focus-within { border-color: var(--red-bright); box-shadow: 0 0 0 3px rgba(229,36,59,.14); }
.handle-edit.is-ok { border-color: var(--green); box-shadow: 0 0 0 3px rgba(82,224,168,.14); }
.handle-edit.is-bad, .handle-edit.is-err { border-color: #E5243B; box-shadow: 0 0 0 3px rgba(229,36,59,.14); }
.handle-edit__at { color: var(--subtle); font-weight: 700; font-size: 17px; }
.handle-edit__input { flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  color: #fff; font-weight: 700; font-size: 17px; padding: 13px 4px; font-family: inherit; }
.handle-edit__mark { flex: none; font-weight: 800; font-size: 16px; width: 18px; text-align: center; }
.handle-edit.is-ok .handle-edit__mark { color: var(--green); }
.handle-edit.is-bad .handle-edit__mark { color: #E5243B; }
.handle-status { font-size: 12.5px; font-family: var(--f-mono); letter-spacing: .02em; color: var(--subtle); }
.handle-status.is-ok { color: var(--green); }
.handle-status.is-bad { color: #FF8A96; }

/* OWASP LLM Top 10 tag pill */
.pill--owasp { align-self: flex-start; background: rgba(127,173,255,.1); color: var(--blue-text, #7FADFF);
  border: 1px solid rgba(127,173,255,.32); font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .02em; }
.lab-detail__atlas { margin: 2px 0 10px; font-family: var(--f-mono); font-size: 12.5px; color: var(--subtle); }
.lab-detail__atlas b { color: var(--blue-text, #7FADFF); font-weight: 600; }

/* path certificate CTA banner */
.path-cert { flex-direction: row; align-items: center; gap: 18px; }
.path-cert--earned { border-color: rgba(224,194,69,.4);
  background: linear-gradient(180deg, rgba(224,194,69,.05), var(--surface) 60%); }
@media (max-width: 620px) { .path-cert { flex-direction: column; align-items: flex-start; } }

/* daily-activity streak chip */
.streak-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-weight: 700; font-size: 13px; color: #FFB15C;
  background: rgba(255,140,60,.1); border: 1px solid rgba(255,140,60,.3); }

/* ============ Skill matrix — spider-web radar + strengths/focus panel ============ */
.skill-matrix { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 30px; align-items: center; padding: 28px; }
.skill-radar svg { width: 100%; height: auto; max-width: 400px; display: block; margin: 0 auto; overflow: visible; }
.skill-ring { fill: none; stroke: var(--line-strong); stroke-width: 1; opacity: .5; stroke-linejoin: round; }
.skill-ring--edge { opacity: .8; }
.skill-spoke { stroke: var(--line-strong); stroke-width: 1; opacity: .4; }
.skill-shape { fill: url(#skillFill); stroke: #F7C56B; stroke-width: 2; stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(247,197,107,.3)); }
.skill-dot { fill: #fff; stroke: var(--red-bright); stroke-width: 1.5; }
.skill-axislabel { fill: var(--muted); font-family: var(--f-mono); font-size: 9px; letter-spacing: .02em; }
.skill-axispct { fill: var(--amber, #F7C56B); font-weight: 700; }
.skill-center { fill: #fff; font-family: var(--f-display); font-weight: 800; font-size: 21px; }
.skill-centersub { fill: var(--subtle); font-family: var(--f-mono); font-size: 7.5px; letter-spacing: .16em; text-transform: uppercase; }

.skill-panel { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.skill-group__h { display: block; margin-bottom: 12px; font-family: var(--f-mono); font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase; }
.skill-group__h--str { color: var(--green); }
.skill-group__h--foc { color: var(--amber, #F7C56B); }
.skill-row { display: grid; grid-template-columns: 1fr 72px 40px; align-items: center; gap: 12px; margin-bottom: 9px; }
.skill-row__name { font-size: 13.5px; color: #C7CDDC; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skill-row__bar { height: 6px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.skill-row__bar i { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.skill-row__pct { font-family: var(--f-mono); font-size: 12px; color: var(--subtle); text-align: right; }

.skill-focus { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px;
  padding: 11px 14px; border-radius: 11px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.02);
  text-decoration: none; transition: border-color .15s, transform .15s; }
.skill-focus:hover { border-color: var(--amber, #F7C56B); transform: translateY(-1px); }
.skill-focus.is-locked { opacity: .55; cursor: not-allowed; pointer-events: none; }
.skill-focus__name { display: flex; flex-direction: column; gap: 3px; font-size: 14px; font-weight: 700; color: #fff; }
.skill-focus__meta { font-family: var(--f-mono); font-size: 11px; font-weight: 400; color: var(--subtle); }
.skill-focus__cta { font-size: 13px; font-weight: 700; color: var(--amber, #F7C56B); white-space: nowrap; }

@media (max-width: 760px) { .skill-matrix { grid-template-columns: 1fr; gap: 20px; } }

/* ===================== Pricing cards ===================== */
.pricing-sec { position: relative; overflow: hidden; }
.pricing__web { position: absolute; right: -200px; top: -200px; width: 760px; height: 760px; opacity: .1; pointer-events: none; }
.pricing-head { position: relative; z-index: 2; text-align: center; max-width: 720px; margin: 0 auto 40px; }
.pricing-grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px; align-items: start; max-width: 1060px; margin: 0 auto; }

.price-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 30px 26px;
  border-radius: 18px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.price-card--pop { border-color: rgba(229,36,59,.55); background: radial-gradient(130% 120% at 50% -10%, rgba(229,36,59,.14), var(--surface) 55%);
  box-shadow: 0 30px 70px -40px rgba(229,36,59,.7); transform: translateY(-10px); z-index: 3; }
.price-card--life { border-color: rgba(224,194,69,.45); background: linear-gradient(180deg, rgba(224,194,69,.05), var(--surface) 55%); }
.price-card__web { position: absolute; right: -120px; top: -120px; width: 320px; height: 320px; opacity: .14; pointer-events: none; }

.price-card__badge { position: absolute; top: 16px; right: 16px; z-index: 2; font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px;
  background: var(--red-bright); color: #fff; font-weight: 700; }
.price-card__badge--gold { background: linear-gradient(135deg, #F7C56B, #E0A82E); color: #1a1205; }

.price-card__top { position: relative; z-index: 2; }
.price-card__name { font-family: var(--f-display); font-weight: 800; font-size: 26px; color: #fff; margin: 0; }
.price-card__tag { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.price-card__price { position: relative; z-index: 2; display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.price-card__amt { font-family: var(--f-display); font-weight: 800; font-size: 46px; line-height: 1; color: #fff; }
.price-card--pop .price-card__amt { color: var(--red-bright); }
.price-card--life .price-card__amt { color: var(--amber, #F7C56B); }
.price-card__per { color: var(--subtle); font-size: 14px; font-family: var(--f-mono); }
.price-card__sub { position: relative; z-index: 2; margin: -6px 0 0; font-size: 13px; color: var(--muted); }
.price-card__sub b { color: #fff; }

.price-card .btn { position: relative; z-index: 2; margin-top: 4px; }
.btn-gold { background: linear-gradient(135deg, #F7C56B, #E0A82E); color: #1a1205; border: none; font-weight: 800; }
.btn-gold:hover { filter: brightness(1.08); }

.price-feats { position: relative; z-index: 2; list-style: none; margin: 10px 0 0; padding: 14px 0 0;
  border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 10px; }
.price-feats li { position: relative; padding-left: 26px; font-size: 14px; line-height: 1.45; color: #C7CDDC; }
.price-feats li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }
.price-feats--pro li::before { color: var(--amber, #F7C56B); }
.price-feats li b { color: #fff; }

/* ---------- pricing comparison table ---------- */
.pricing-compare { position: relative; z-index: 2; max-width: 960px; margin: 60px auto 0; }
.cmp-title { font-family: var(--f-display); font-weight: 900; font-size: clamp(26px, 4.5vw, 34px); text-align: center; margin: 0; }
.cmp-sub { text-align: center; margin: 6px 0 24px; }
.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 580px; font-size: 15px; }
.cmp-table th, .cmp-table td { padding: 13px 18px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.cmp-table thead th { position: sticky; top: 0; z-index: 1; background: #0E1119; font-family: var(--f-display); font-weight: 800; font-size: 16px; color: #fff; }
.cmp-table th.cmp-feat { text-align: left; }
.cmp-table td:first-child { text-align: left; color: var(--text-2); }
.cmp-table td.cmp-pop, .cmp-table th.cmp-pop { background: rgba(229,36,59,.06); }
.cmp-table th.cmp-pop { color: var(--red-text); }
.cmp-pop-tag { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: var(--red); border-radius: 999px; padding: 2px 7px; margin-left: 6px; vertical-align: middle; }
.cmp-group td { background: rgba(255,255,255,.025); text-align: left !important; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); padding: 14px 18px 8px; }
.cmp-yes { color: #35D6A1; font-weight: 700; }
.cmp-no { color: #4A5061; }
.cmp-price td { font-family: var(--f-display); font-weight: 900; font-size: 20px; color: #fff; border-bottom: none; padding-top: 16px; }
.cmp-per { display: block; font-size: 11px; font-weight: 600; color: var(--text-2); margin-top: 2px; }
.cmp-table tbody tr:hover td { background: rgba(255,255,255,.02); }
.cmp-table tbody tr:hover td.cmp-pop { background: rgba(229,36,59,.1); }
@media (max-width: 560px) { .cmp-table { font-size: 13px; } .cmp-table th, .cmp-table td { padding: 10px 11px; } .cmp-group td { padding: 11px; } }

/* ===== Spider-Verse pricing FX ===== */
.sv-scene { position: relative; overflow: hidden; }
.sv-halftone { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(rgba(229,36,59,.10) 1px, transparent 1.6px); background-size: 15px 15px;
  -webkit-mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, #000, transparent 72%); }
.sv-glitch { position: relative; }
.sv-reveal { will-change: opacity, transform; }
html.js .sv-reveal { opacity: 0; transform: translateY(26px) scale(.985); transition: opacity .55s ease, transform .55s cubic-bezier(.2,1.1,.3,1); }
html.js .sv-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .sv-halftone { animation: sv-drift 22s linear infinite; }
  @keyframes sv-drift { to { background-position: 15px 30px; } }
  .sv-glitch { animation: sv-chroma 5s steps(1) infinite; }
  @keyframes sv-chroma {
    0%,88%,100% { text-shadow: -1px 0 rgba(229,36,59,.45), 1px 0 rgba(47,123,255,.45); }
    90% { text-shadow: -3px 0 rgba(229,36,59,.85), 3px 0 rgba(47,123,255,.85); }
    92% { text-shadow: 2px 0 rgba(229,36,59,.7), -2px 0 rgba(47,123,255,.7); }
    94% { text-shadow: -2px 1px rgba(229,36,59,.6), 2px -1px rgba(47,123,255,.6); }
    96% { text-shadow: 1px 0 rgba(229,36,59,.5), -1px 0 rgba(47,123,255,.5); } }
  .price-card { transition: transform .28s cubic-bezier(.2,1,.3,1), box-shadow .28s, border-color .2s; }
  .price-card:hover { transform: translateY(-7px) rotate(-.4deg); box-shadow: -9px 10px 0 rgba(229,36,59,.22), 9px 10px 34px rgba(0,0,0,.45); }
  .price-card--pop:hover { box-shadow: -9px 10px 0 rgba(47,123,255,.22), 9px 10px 40px rgba(229,36,59,.3); } }
@media (prefers-reduced-motion: reduce) { .sv-reveal { opacity: 1; transform: none; } }

/* billing toggle */
.bill-toggle { display: inline-flex; align-items: center; gap: 4px; margin: 20px auto 0; padding: 4px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(10,12,20,.6); }
.bill-opt { appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; color: var(--text-2); background: transparent; padding: 8px 18px; border-radius: 999px; transition: color .15s, background .15s; }
.bill-opt.is-active { color: #fff; background: var(--red); }
.bill-save { font-size: 11px; font-weight: 700; color: var(--amber, #F7C56B); margin-left: 4px; }
.bill-opt.is-active .bill-save { color: #fff; }
.bill-thumb { display: none; }
.pricing-sec[data-bill="monthly"] .bill-show[data-bill="yearly"] { display: none; }
.pricing-sec[data-bill="yearly"]  .bill-show[data-bill="monthly"] { display: none; }
.price-feats .feat-star { color: #F7C56B; }
.price-feats .feat-star b { color: #FFE2A6; }

/* compare controls */
.cmp-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.cmp-focus { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cmp-focus-lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin-right: 2px; }
.cmp-pill { appearance: none; cursor: pointer; font: inherit; font-weight: 700; font-size: 13px; color: var(--text-2); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px; transition: color .15s, background .15s, border-color .15s; }
.cmp-pill:hover { color: #fff; border-color: var(--line-hover); }
.cmp-pill.is-active { color: #fff; background: var(--red); border-color: var(--red); }
.cmp-diff { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.cmp-diff input { accent-color: var(--red); width: 15px; height: 15px; }

/* compare focus: highlight chosen column, dim the others */
.cmp-table[data-focus] td, .cmp-table[data-focus] th { transition: opacity .2s, background .2s; }
.cmp-table[data-focus="free"] td:nth-child(2), .cmp-table[data-focus="free"] thead th:nth-child(2),
.cmp-table[data-focus="pro"]  td:nth-child(3), .cmp-table[data-focus="pro"]  thead th:nth-child(3),
.cmp-table[data-focus="life"] td:nth-child(4), .cmp-table[data-focus="life"] thead th:nth-child(4) {
  background: rgba(229,36,59,.12); box-shadow: inset 2px 0 0 var(--red), inset -2px 0 0 var(--red); }
.cmp-table[data-focus="free"] td:nth-child(3), .cmp-table[data-focus="free"] td:nth-child(4),
.cmp-table[data-focus="free"] th:nth-child(3), .cmp-table[data-focus="free"] th:nth-child(4),
.cmp-table[data-focus="pro"]  td:nth-child(2), .cmp-table[data-focus="pro"]  td:nth-child(4),
.cmp-table[data-focus="pro"]  th:nth-child(2), .cmp-table[data-focus="pro"]  th:nth-child(4),
.cmp-table[data-focus="life"] td:nth-child(2), .cmp-table[data-focus="life"] td:nth-child(3),
.cmp-table[data-focus="life"] th:nth-child(2), .cmp-table[data-focus="life"] th:nth-child(3) { opacity: .4; }

/* differences-only toggle */
.cmp-table.diff-only tr[data-same="1"] { display: none; }

/* hot row: real pentest / career */
.cmp-group--hot td { color: var(--amber, #F7C56B) !important; }
.cmp-row--hot td:first-child { color: #FFE2A6; font-weight: 600; }
.cmp-row--hot td { background: rgba(247,197,107,.05); }

/* ===== CTF Events panel ===== */
.eyebrow--amber { color: var(--amber, #F7C56B); }
.ctf-panel { position: relative; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 22px;
  background: radial-gradient(130% 120% at 12% -10%, rgba(229,36,59,.15), transparent 55%), radial-gradient(120% 130% at 102% 120%, rgba(247,197,107,.1), transparent 50%), var(--surface);
  padding: 40px clamp(22px, 5vw, 56px); }
.ctf-panel__body { position: relative; z-index: 2; }
.ctf-lede { max-width: 560px; margin: 8px 0 0; }
.ctf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 24px 0 22px; }
.ctf-prize { display: flex; flex-direction: column; }
.ctf-prize__amt { font-family: var(--f-display); font-weight: 900; font-size: clamp(32px, 6vw, 52px); line-height: 1; color: var(--amber, #F7C56B); }
.ctf-prize__lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); margin-top: 4px; }
.ctf-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #E7E9F0; border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 14px; }
.ctf__web { position: absolute; right: -140px; top: -130px; width: 620px; height: 620px; max-width: none; opacity: .5; z-index: 1; pointer-events: none; }

/* ===== CTF event cards (Open + Private Pro) ===== */
.ctf-events-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 34px; }
@media (max-width: 720px) { .ctf-events-grid { grid-template-columns: 1fr; } }
.ctf-event { position: relative; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 20px; padding: 32px clamp(20px, 4vw, 36px); }
.ctf-event--open { background: radial-gradient(130% 120% at 15% -10%, rgba(229,36,59,.16), transparent 55%), var(--surface); }
.ctf-event--pro { border-color: rgba(247,197,107,.45);
  background: radial-gradient(130% 120% at 15% -10%, rgba(247,197,107,.16), transparent 55%), radial-gradient(120% 130% at 100% 120%, rgba(229,36,59,.08), transparent 50%), #100C06; }
.ctf-event__body { position: relative; z-index: 3; }
.ctf-event__ribbon { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--red); border-radius: 999px; padding: 5px 12px; }
.ctf-event__ribbon--gold { color: #1a1304; background: linear-gradient(90deg, #F7C56B, #E0A33A); }
.ctf-event__name { font-family: var(--f-display); font-weight: 900; font-size: clamp(24px, 4vw, 32px); margin: 14px 0 4px; color: #fff; }
.ctf-event__when { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 14px; }
.ctf-event__when--gold { color: #F7C56B; }
.ctf-event .ctf-prize { margin: 0 0 14px; }
.ctf-prize__amt--gold { color: #F7C56B; }
.ctf-event .ctf-lede { margin: 0 0 20px; max-width: none; }
.ctf-locked { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #F7C56B; margin-bottom: 10px; }
/* shimmer sweep on the private Pro card */
.ctf-event__shine { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.ctf-event__shine::before { content: ""; position: absolute; top: -50%; left: -60%; width: 45%; height: 200%;
  background: linear-gradient(100deg, transparent, rgba(247,197,107,.16), transparent); transform: rotate(8deg); }
@media (prefers-reduced-motion: no-preference) {
  .ctf-event__shine::before { animation: ctf-shine 5.5s ease-in-out infinite; }
  @keyframes ctf-shine { 0%, 55% { left: -60%; } 100% { left: 135%; } }
}

/* ===== "new labs every week" banner ===== */
.labs-update { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 14px 0 4px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(229,36,59,.05); }
.labs-update__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red-bright); flex: none; }
.labs-update__text { flex: 1; min-width: 220px; font-size: 14px; color: var(--text-2); }
.labs-update__text b { color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .labs-update__dot { animation: lu-pulse 2s infinite; }
  @keyframes lu-pulse { 0% { box-shadow: 0 0 0 0 rgba(229,36,59,.5); } 70% { box-shadow: 0 0 0 8px rgba(229,36,59,0); } 100% { box-shadow: 0 0 0 0 rgba(229,36,59,0); } }
}

.price-teams { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; max-width: 1060px; margin: 34px auto 0; flex-direction: row; }

@media (max-width: 880px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); max-width: 680px; }
  .price-card--pop { transform: none; }
}
@media (max-width: 640px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
}

/* "Jump back in" — horizontal resume banner(s) */
.resume-list { display: flex; flex-direction: column; gap: 14px; }
.resume-card__right { flex: none; display: flex; align-items: center; gap: 14px; position: relative; }
.resume-card .dash-next__cta { pointer-events: none; }
@media (max-width: 680px) {
  .resume-card__right { width: 100%; justify-content: center; flex-wrap: wrap; }
}

/* inline SVG icons: align neatly with adjacent text (emoji replacements) */
.pill svg, .lab-status svg, .streak-chip svg, .price-card__badge svg, .cert-card__badge svg,
.skill-group__h svg, .skill-focus__cta svg, .dash-sl__cert svg, .btn svg, .lab-detail__hint svg,
.eyebrow svg, .cert__seal-cap svg, .price-card__amt svg { display: inline-block; vertical-align: -0.14em; }

/* Powered by TrinetLayer — footer parent-brand badge */
.footer__powered { display: inline-flex; align-items: center; gap: 9px; margin-top: 18px;
  padding: 8px 14px 8px 10px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.02);
  color: var(--muted); font-size: 13px; letter-spacing: .01em; transition: border-color .15s, background .15s; }
.footer__powered:hover { border-color: rgba(79,107,216,.55); background: rgba(79,107,216,.08); }
.footer__powered b { color: #fff; font-weight: 700; }
.footer__powered svg { flex: none; }
.footer__powered-logo { flex: none; width: 22px; height: 22px; object-fit: contain; }
.footer__tl-link { color: var(--blue-text, #7FADFF); text-decoration: none; font-weight: 600; }
.footer__tl-link:hover { text-decoration: underline; }

/* ===================== Legal pages (Terms / Privacy) ===================== */
.legal__meta { font-family: var(--f-mono); font-size: 13px; color: var(--subtle); margin: 0 0 26px; }
.legal__meta b { color: var(--amber, #F7C56B); }
.legal__lead { font-size: 17px; line-height: 1.7; color: #C7CDDC; margin: 0 0 10px; }
.legal h2 { font-family: var(--f-display); font-weight: 800; font-size: 21px; color: #fff; margin: 32px 0 10px; }
.legal p { font-size: 15.5px; line-height: 1.75; color: var(--muted); margin: 0 0 12px; }
.legal ul { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.legal li { font-size: 15.5px; line-height: 1.65; color: var(--muted); }
.legal b { color: #fff; font-weight: 700; }
.legal a { color: var(--blue-text, #7FADFF); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.legal__switch { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line-soft); font-size: 15px; color: var(--muted); }

/* footer bottom mini legal links */
.footer__legal-mini a { color: var(--subtle); text-decoration: none; }
.footer__legal-mini a:hover { color: #fff; }

/* ===================== Web-slinger error pages (404 / 500) ===================== */
.err { position: relative; overflow: hidden; text-align: center; min-height: 74vh;
  display: flex; align-items: center; }
.err__web { position: absolute; left: 50%; top: -34%; width: 125%; height: 170%;
  transform: translateX(-50%); opacity: .08; pointer-events: none; }
.err__web path { stroke: #E5243B; }
.err__wrap { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.err__swing { width: 180px; height: 290px; margin-bottom: -34px; }
.err__swing svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 14px 26px rgba(0,0,0,.55)); }
.err__code { font-family: var(--f-display); font-weight: 800; font-size: clamp(88px, 17vw, 168px); line-height: .95;
  letter-spacing: .02em; background: linear-gradient(180deg, #FFFFFF 40%, #E5243B);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.err__title { font-family: var(--f-display); font-weight: 800; font-size: 30px; color: #fff; margin: 2px 0 0; }
.err__joke { font-size: 17px; font-style: italic; color: var(--amber, #F7C56B); max-width: 560px; margin: 8px 0 22px; line-height: 1.5; }
.err__cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.err__newjoke { margin-top: 18px; background: none; border: none; color: var(--subtle);
  font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .04em; cursor: pointer; transition: color .15s; }
.err__newjoke:hover { color: #fff; }
@media (max-width: 560px) { .err__swing { width: 140px; height: 230px; } }

/* footer ecosystem external-link arrow */
.footer__ext { font-size: 11px; color: var(--subtle); opacity: .7; margin-left: 1px; }
.footer__col a:hover .footer__ext { opacity: 1; color: var(--blue-text, #7FADFF); }

/* ===== Homepage "Powered by TrinetLayer" lockup ===== */
.hero__powered {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 24px;
  padding: 7px 15px 7px 9px; border-radius: 999px; width: fit-content;
  background: rgba(255,255,255,.03); border: 1px solid var(--line-strong);
  color: var(--muted); font-size: 13px; letter-spacing: .01em; text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.hero__powered:hover { border-color: var(--line-hover); background: rgba(255,255,255,.06); transform: translateY(-1px); }
.hero__powered b { color: var(--text); font-weight: 700; }
.hero__powered svg { flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(21,80,200,.35)); }
.hero__powered-logo { flex-shrink: 0; width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(21,80,200,.35)); }

/* ===== Bonus lab — featured standalone card (the "Off the Record" section, labs.html only) =====
   Re-skinned to match the Spider-Man duotone treatment used on the storyline
   grid above it (hex icon chip, red/blue top strand, corner web pattern,
   glossy pills/CTA) — scoped under `.bonus-feature` so the shared `.pill--*`/
   `.btn-primary`/`.lab-status*` classes it reuses stay untouched everywhere
   else they're used (dashboard, index, pricing, etc). Icon/accent/top-strand
   key off each lab's own `--accent` custom property (same one the storyline
   cards get from `lab.accent`), severity still drives the badge color. */
.pill--bonus { background: rgba(229,36,59,.12); color: var(--red-bright); border: 1px solid rgba(229,36,59,.42); }
.bonus-feature + .bonus-feature { margin-top: 20px; }
.bonus-feature {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: flex-start;
  gap: 24px; overflow: hidden; padding: 28px 30px; border-radius: 20px;
  text-decoration: none; color: inherit; isolation: isolate;
  background: radial-gradient(480px 260px at 102% -10%, color-mix(in srgb, var(--accent, var(--red-bright)) 16%, transparent), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.006)), var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.bonus-feature::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, #3E5CFF, var(--accent, #FF2E3D)); box-shadow: 0 0 16px -2px #3E5CFF; opacity: .95; }
.bonus-feature::after { content: ""; position: absolute; top: -26%; right: -8%; width: 40%; height: 150%; opacity: .13; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%233E5CFF' stroke-width='1.4'%3E%3Ccircle cx='120' cy='0' r='22'/%3E%3Ccircle cx='120' cy='0' r='46'/%3E%3Ccircle cx='120' cy='0' r='74'/%3E%3Cpath d='M120 0L10 110M120 0L50 118M120 0L120 118M120 0L118 50'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 100% 100%; }
.bonus-feature > * { position: relative; z-index: 1; }
.bonus-feature:hover {
  transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent, var(--blue)) 55%, var(--line-strong));
  box-shadow: 0 26px 54px -26px color-mix(in srgb, var(--accent, var(--blue)) 40%, transparent), 0 0 0 1px rgba(255,255,255,.02) inset;
}
.bonus-feature__icon {
  display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; flex-shrink: 0;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  color: var(--accent, var(--blue-text)); background: color-mix(in srgb, var(--accent, var(--blue)) 18%, #151A2B);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent, var(--blue)) 48%, transparent);
}
.bonus-feature__icon svg { width: 26px; height: 26px; }
.bonus-feature__body { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.bonus-feature__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 2px; }
.bonus-feature .pill--bonus { box-shadow: inset 0 1px 0 rgba(255,255,255,.16); }
.bonus-feature .pill--medium { background: linear-gradient(160deg, rgba(247,197,107,.24), rgba(245,179,65,.12)); border-color: rgba(245,179,65,.4); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.bonus-feature .pill--hard { background: linear-gradient(160deg, var(--red-hover), var(--red-bright)); color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 14px -6px rgba(229,36,59,.5); }
.bonus-feature .pill--insane { background: linear-gradient(160deg, #B3122A, #6E0A1B); border-color: rgba(255,89,110,.4); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.bonus-feature__title { font-family: var(--f-display); font-weight: 800; letter-spacing: .01em; text-transform: uppercase; font-size: 29px; line-height: 1.08; margin: 2px 0 0; color: #fff; }
.bonus-feature__desc { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 64ch; margin: 0; }
.bonus-feature__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 4px;
  font-family: var(--f-mono, ui-monospace, monospace); font-size: 13px; color: var(--subtle);
}
.bonus-feature__meta > span { display: inline-flex; align-items: center; gap: 6px; }
.bonus-feature__meta .lab__xp { color: var(--amber); }
.bonus-feature__cta { position: relative; flex-shrink: 0; white-space: nowrap; align-self: center; }
.bonus-feature__cta.btn-primary {
  background: linear-gradient(160deg, var(--red-hover), var(--red)); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 12px 26px -14px rgba(214,31,53,.55);
}
.bonus-feature__cta.btn-primary:hover { background: linear-gradient(160deg, var(--red-hover), var(--red)); filter: brightness(1.08); }
@media (max-width: 760px) {
  .bonus-feature { grid-template-columns: 1fr; gap: 16px; padding: 22px; align-items: flex-start; }
  .bonus-feature__icon { width: 54px; height: 54px; }
  .bonus-feature__cta { width: 100%; justify-content: center; }
}

/* ===== AI Labs — Spider-Man duotone redesign (labs.html only) =====
   Page-scoped `labcard`/`labstat`/`spidey-*` classes so the shared `.lab-card`/
   `.lab__*`/`.pill*` component (also used by dashboard.html, index.html,
   path_detail.html, paths.html, pricing.html) is untouched — only /labs' own
   storyline grid changes look. Red carries danger/action, blue carries info/
   trust; severity (amber=medium, red=hard/insane) still reads through the
   badge so the system stays legible on top of the duotone. */

body.labs-spidey { position: relative; }
.spidey-field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1100px 620px at 10% -6%, rgba(30,63,209,.16), transparent 58%),
    radial-gradient(1000px 560px at 100% 8%, rgba(212,22,42,.12), transparent 55%),
    repeating-linear-gradient(55deg, rgba(255,255,255,.02) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(-55deg, rgba(255,255,255,.02) 0 1px, transparent 1px 64px);
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 85%);
}
.spidey-skyline { position: fixed; left: 0; right: 0; bottom: 0; height: 200px; z-index: 0; pointer-events: none; opacity: .4; }
.spidey-skyline svg { width: 100%; height: 100%; }
.spidey-sling { position: relative; height: 34px; margin: 8px 0 4px; }
.spidey-sling svg { position: absolute; inset: 0; width: 100%; height: 100%; }
body.labs-spidey .section, body.labs-spidey .container { position: relative; z-index: 1; }

.labstat-row { display: flex; gap: 12px; flex-wrap: wrap; align-self: center; }
.labstat { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)), var(--surface); min-width: 128px; }
.labstat__ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.labstat__ico svg { width: 17px; height: 17px; }
.labstat__ico--total { background: rgba(255,255,255,.04); border: 1px solid var(--line-strong); color: var(--text-2); }
.labstat__ico--done { background: rgba(255,255,255,.04); border: 1px solid var(--line-strong); color: var(--text-2); }
.labstat__ico--pct { background: rgba(255,255,255,.04); border: 1px solid var(--line-strong); color: var(--text-2); }
.labstat__num { font-family: var(--f-display); font-weight: 900; font-size: 22px; line-height: 1; color: #fff; }
.labstat__label { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--subtle); margin-top: 3px; }

.labcard {
  position: relative; display: flex; flex-direction: column; gap: 14px; height: 100%;
  padding: 22px; border-radius: var(--r-card); border: 1px solid var(--line);
  background: radial-gradient(420px 220px at 102% -8%, color-mix(in srgb, var(--labcard-accent, var(--blue)) 18%, transparent), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.006)), var(--surface);
  text-decoration: none; color: inherit; overflow: hidden; isolation: isolate;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.labcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, #3E5CFF, var(--labcard-accent, #FF2E3D));
  box-shadow: 0 0 16px -2px #3E5CFF; opacity: .95; }
.labcard::after { content: ""; position: absolute; top: -18%; right: -14%; width: 65%; height: 65%; opacity: .14; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%233E5CFF' stroke-width='1.4'%3E%3Ccircle cx='120' cy='0' r='22'/%3E%3Ccircle cx='120' cy='0' r='46'/%3E%3Ccircle cx='120' cy='0' r='74'/%3E%3Cpath d='M120 0L10 110M120 0L50 118M120 0L120 118M120 0L118 50'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 100% 100%; }
.labcard > * { position: relative; z-index: 1; }
.labcard--medium { --labcard-accent: var(--amber); }
.labcard--hard { --labcard-accent: var(--red-bright); }
.labcard--insane { --labcard-accent: #B3122A; }
.labcard:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--labcard-accent, var(--blue)) 55%, var(--line-strong));
  box-shadow: 0 26px 54px -26px color-mix(in srgb, var(--labcard-accent, var(--blue)) 40%, transparent), 0 0 0 1px rgba(255,255,255,.02) inset; }

.labcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.labcard__icon { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; flex: none;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  color: var(--accent, var(--blue-text)); background: color-mix(in srgb, var(--accent, var(--blue)) 18%, #151A2B);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent, var(--blue)) 48%, transparent); }

.labcard__badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--f-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.labcard__badge--medium { background: linear-gradient(160deg, rgba(247,197,107,.22), rgba(245,179,65,.12)); color: var(--amber); border-color: rgba(245,179,65,.4); }
.labcard__badge--hard { background: linear-gradient(160deg, var(--red-hover), var(--red-bright)); color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 14px -6px rgba(229,36,59,.5); }
.labcard__badge--insane { background: linear-gradient(160deg, #B3122A, #6E0A1B); color: #fff; border-color: rgba(255,89,110,.4); }
.labcard__badge--locked { background: rgba(62,92,255,.12); color: #8CA8FF; border-color: rgba(62,92,255,.38); }
.labcard__badge--pro { background: rgba(229,36,59,.12); color: var(--red-text); border-color: rgba(229,36,59,.45); }
.labcard__badge--owasp { background: rgba(62,92,255,.1); color: #8CA8FF; border-color: rgba(62,92,255,.3); font-size: 10.5px; }

.labcard__tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.labcard__cat { font-family: var(--f-mono); font-size: 11.5px; color: var(--subtle); text-transform: uppercase; letter-spacing: .07em; }
.labcard__title { font-family: var(--f-display); font-weight: 800; font-size: 21px; line-height: 1.08; letter-spacing: .01em;
  text-transform: uppercase; color: #fff; margin: 0; }
.labcard__desc { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0; flex: 1; }

.labcard__meta { display: flex; align-items: center; gap: 16px; font-family: var(--f-mono); font-size: 12.5px; color: #B4BACB; }
.labcard__meta span { display: inline-flex; align-items: center; gap: 5px; }
.labcard__xp { color: var(--amber); }

.labcard__progress { display: flex; flex-direction: column; gap: 6px; }
.labcard__progress-track { height: 5px; border-radius: 99px; background: #1C2134; overflow: hidden; }
.labcard__progress-bar { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--labcard-accent, var(--blue)), var(--blue-text)); }
.labcard__progress-label { font-family: var(--f-mono); font-size: 10.5px; color: var(--subtle); }

.labcard__foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.labcard__status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--subtle); font-family: var(--f-mono); }
.labcard__status--active { color: var(--amber); }
.labcard__status--done { color: var(--green); }
.labcard__status--pro { color: var(--red-text); }
.labcard__status--locked { color: #8CA8FF; }

.labcard__cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; pointer-events: none;
  padding: 12px 16px; border-radius: 12px; font-family: var(--f-body); font-weight: 700; font-size: 14px; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.labcard__cta svg { width: 15px; height: 15px; transition: transform .15s ease; }
.labcard:hover .labcard__cta svg { transform: translateX(3px); }
.labcard__cta--start { color: #fff; background: linear-gradient(160deg, var(--red-hover), var(--red)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 12px 26px -14px rgba(214,31,53,.55); }
.labcard__cta--active { color: #fff; background: linear-gradient(135deg, #C9902B, var(--amber)); box-shadow: 0 12px 26px -14px rgba(245,179,65,.45); }
.labcard__cta--done { color: #fff; background: linear-gradient(160deg, var(--blue-text), var(--blue)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 12px 26px -14px rgba(47,123,255,.45); }
.labcard__cta--pro { color: #fff; background: linear-gradient(135deg, var(--red), var(--red-hover)); box-shadow: 0 12px 26px -14px rgba(214,31,53,.55); }

.labcard--locked { cursor: not-allowed; border-color: var(--line-strong); }
.labcard--locked::after {
  opacity: .11;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%237C97FF' stroke-width='1.4'%3E%3Ccircle cx='120' cy='0' r='22'/%3E%3Ccircle cx='120' cy='0' r='46'/%3E%3Ccircle cx='120' cy='0' r='74'/%3E%3Cpath d='M120 0L10 110M120 0L50 118M120 0L120 118M120 0L118 50'/%3E%3C/g%3E%3C/svg%3E"),
    repeating-linear-gradient(48deg, rgba(124,151,255,.05) 0 1px, transparent 1px 13px),
    repeating-linear-gradient(-48deg, rgba(124,151,255,.05) 0 1px, transparent 1px 13px);
  width: 100%; height: 100%; top: 0; right: 0; background-size: 65% 65%, auto, auto; background-repeat: no-repeat, repeat, repeat;
  background-position: top right, 0 0, 0 0;
}
.labcard--locked::before { background: linear-gradient(90deg, #3E5CFF, #2A3B9C); box-shadow: 0 0 16px -2px #3E5CFF; }
.labcard--locked:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
.labcard--locked .labcard__icon { color: #8992C0 !important; background: #121730; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.labcard--locked .labcard__cat, .labcard--locked .labcard__desc, .labcard--locked .labcard__meta,
.labcard--locked .labcard__meta .labcard__xp { color: #7D859C; }
.labcard--locked .labcard__title { color: #B7BECF; }
.labcard--pro { border-color: rgba(62,92,255,.22); }
.labcard--pro:hover { border-color: rgba(62,92,255,.45); box-shadow: 0 24px 50px -28px rgba(62,92,255,.45); }

@media (max-width: 640px) {
  .labstat-row { width: 100%; }
  .labstat { flex: 1 1 0; min-width: 0; padding: 12px 14px; }
}

/* ===== Homepage — Featured AI Labs card redesign (index.html only) =====
   Page-scoped `featcard`/`featgrid` classes so the shared `.card`/`.lab__*`/`.pill*`
   component (also used by dashboard.html, labs.html, path_detail.html, paths.html,
   pricing.html) is untouched — only index.html's featured-labs strip changes look. */

.featgrid { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .featgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .featgrid { grid-template-columns: 1fr; } }

.featcard {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  padding: 22px; border-radius: var(--r-card); border: 1px solid var(--line);
  background: linear-gradient(175deg, var(--raised), var(--surface) 55%);
  text-decoration: none; color: inherit; overflow: hidden; isolation: isolate;
  transition: transform .22s cubic-bezier(.2,.7,.3,1), border-color .22s ease, box-shadow .22s ease;
}
.featcard::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, var(--featcard-accent, transparent), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; pointer-events: none; z-index: 1;
}
.featcard::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 220px at 15% -10%, var(--featcard-accent, transparent), transparent 60%);
  opacity: .16; pointer-events: none; z-index: 0;
}
.featcard > * { position: relative; z-index: 2; }
.featcard:hover { transform: translateY(-4px); border-color: var(--featcard-accent, var(--line-hover));
  box-shadow: 0 18px 44px -20px var(--featcard-shadow, rgba(0,0,0,.6)), 0 0 0 1px rgba(255,255,255,.02) inset; }
.featcard:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.featcard--easy, .featcard--low { --featcard-accent: var(--blue); --featcard-shadow: rgba(47,123,255,.3); }
.featcard--medium { --featcard-accent: var(--amber); --featcard-shadow: rgba(247,197,107,.28); }
.featcard--hard { --featcard-accent: var(--red-bright); --featcard-shadow: rgba(229,36,59,.32); }
.featcard--insane { --featcard-accent: #B01030; --featcard-shadow: rgba(176,16,48,.42); }

.featcard__top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.featcard__icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none;
  color: var(--featcard-accent, var(--blue-text));
  background: color-mix(in srgb, var(--featcard-accent, var(--blue)) 16%, var(--raised));
  border: 1px solid color-mix(in srgb, var(--featcard-accent, var(--blue)) 38%, var(--line));
  box-shadow: 0 0 0 1px rgba(0,0,0,.2) inset, 0 6px 16px -8px var(--featcard-shadow, transparent); }

.featcard__badge { font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em;
  padding: 5px 10px; border-radius: 999px; text-transform: uppercase; white-space: nowrap; border: 1px solid transparent; }
.featcard__badge--easy, .featcard__badge--low { color: #061A33; background: linear-gradient(135deg, #9EC1FF, var(--blue)); }
.featcard__badge--medium { color: #2A1D06; background: linear-gradient(135deg, #FFDA92, var(--amber)); }
.featcard__badge--hard { color: #fff; background: linear-gradient(135deg, var(--red-hover), var(--red)); box-shadow: 0 4px 14px -6px rgba(229,36,59,.55); }
.featcard__badge--insane { color: #FFD9DE; background: linear-gradient(135deg, #5A0D1C, #2E0712); border-color: rgba(255,89,110,.45);
  box-shadow: 0 0 0 1px rgba(255,89,110,.2) inset, 0 4px 14px -6px rgba(176,16,48,.6); }

.featcard__cat { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); display: block; margin-bottom: 8px; }
.featcard__title { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 22px; letter-spacing: .01em; line-height: 1.04; margin: 0 0 10px; color: #fff; }
.featcard__desc { font-size: 14px; line-height: 1.55; color: var(--text-2); margin: 0 0 16px; flex: 1 0 auto; min-width: 0; }

.featcard__meta { display: flex; align-items: center; gap: 16px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.featcard__meta span { display: flex; align-items: center; gap: 6px; }
.featcard__xp { color: var(--amber); }

.featcard__progress-row { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; font-family: var(--f-mono); margin-bottom: 7px; }
.featcard__state { color: var(--subtle); letter-spacing: .03em; }
.featcard__pct { color: var(--text-2); font-weight: 600; }
.featcard__track { height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin-bottom: 18px; }
.featcard__bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--blue-soft)); }
.featcard__bar--done { background: linear-gradient(90deg, #2BBE8C, var(--green)); }

.featcard__cta { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-body); font-weight: 700; font-size: 14px; padding: 12px 16px; border-radius: 11px;
  border: 1px solid var(--line-strong); color: var(--text); background: var(--surface);
  transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.featcard__cta svg { width: 15px; height: 15px; transition: transform .18s ease; }
.featcard:hover .featcard__cta svg { transform: translateX(3px); }
.featcard__cta--start { background: linear-gradient(135deg, var(--red-hover), var(--red)); border-color: transparent; color: #fff; box-shadow: 0 10px 24px -12px rgba(229,36,59,.55); }
.featcard__cta--done { background: linear-gradient(135deg, #1C8F6B, #2BBE8C); border-color: transparent; color: #04140E; box-shadow: 0 10px 24px -12px rgba(43,190,140,.45); }

/* ===================== Admin panel (/admin) ===================== */
.nav__link--admin { color: var(--amber, #F7C56B); }
.btn-danger { background: var(--red, #D61F35); color: #fff; border: 1px solid var(--red, #D61F35); }
.btn-danger:hover { background: var(--red-hover, #EE2D44); border-color: var(--red-hover, #EE2D44); }
.btn--sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }

.admin-section { padding-top: 36px; padding-bottom: 64px; }
.admin-container { max-width: var(--container); }
.admin-head { margin-bottom: 22px; }
.admin-head__desc { margin: -6px 0 0; }

/* Layout: sidebar + main content */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: flex-start; }

.admin-sidebar {
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 90px;
  padding: 10px; border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface);
}
.admin-sidebar__link {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 10px; border: 1px solid transparent; background: none;
  color: var(--text-2); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.admin-sidebar__link svg { flex: none; opacity: .75; }
.admin-sidebar__link span:first-of-type { flex: 1; }
.admin-sidebar__link:hover { background: rgba(255,255,255,.04); color: var(--text); }
.admin-sidebar__link.is-active { background: rgba(79,131,255,.1); border-color: rgba(79,131,255,.3); color: #fff; }
.admin-sidebar__link.is-active svg { opacity: 1; color: var(--blue-text, #8FB4FF); }
.admin-sidebar__count {
  flex: none; font-family: var(--f-mono); font-size: 11px; font-weight: 700; color: var(--subtle);
  background: rgba(255,255,255,.05); border-radius: 999px; padding: 1px 8px; min-width: 20px; text-align: center;
}
.admin-sidebar__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.admin-sidebar__dot--on { background: var(--green); box-shadow: 0 0 0 3px rgba(82,224,168,.15); }

.admin-main { min-width: 0; }
.admin-panel__intro { margin: 0 0 16px; }
.admin-overview-note { padding: 16px 20px; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.admin-stat { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; }
.admin-stat__num { font-family: var(--f-display); font-weight: 900; font-size: 42px; line-height: 1; color: #fff; }
.admin-stat__label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); }

/* User-management toolbar: search + filters */
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.admin-search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--raised);
  padding: 0 12px; color: var(--subtle);
}
.admin-search input {
  flex: 1; border: 0; background: none; color: var(--text); font: inherit; font-size: 14px;
  padding: 10px 0; outline: none;
}
.admin-toolbar select {
  border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--raised);
  color: var(--text-2); font: inherit; font-size: 13.5px; padding: 10px 12px; cursor: pointer;
}
.admin-toolbar select:focus, .admin-search:focus-within { border-color: var(--line-hover); }

.admin-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; }
.admin-pageinfo { font-size: 13px; font-family: var(--f-mono); min-width: 190px; text-align: center; }
.admin-empty { padding: 22px 4px; text-align: center; }

.admin-card { padding: 0; overflow: hidden; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
/* Fixed layout (User Management only — CTF/Pro CTF/audit tables keep auto-layout,
   which already sizes their fewer columns fine): with `width` hints on <th> as
   mere "preferred" sizes, the browser's auto-layout algorithm still shrinks the
   Action column below what 2 side-by-side buttons need whenever the row of
   explicit widths exceeds the container. Fixed layout makes every `.admin-col-*`
   width exact, so the table (not any one column) is what overflows, which the
   existing `.admin-table-wrap { overflow-x: auto }` already handles. */
#admin-user-table { table-layout: fixed; min-width: 1112px; }
.admin-table th { text-align: left; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--subtle); font-weight: 700; padding: 14px 16px; border-bottom: 1px solid var(--line-strong); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td { background: rgba(255,255,255,.02); }
.admin-email { font-family: var(--f-mono); color: var(--text); word-break: break-all; }
.admin-date { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.admin-center { text-align: center; }
.admin-ok { color: var(--green); font-weight: 700; }
.admin-action-col { text-align: right; width: 240px; min-width: 240px; white-space: nowrap; }
.admin-del { margin: 0; }
.admin-protected { font-size: 11px; font-family: var(--f-mono); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--subtle); border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.admin-country { white-space: nowrap; }
.admin-flag { margin-right: 6px; }
.admin-country-name { font-size: 13px; }
.admin-uname { font-weight: 600; color: var(--text); }
.admin-uname--trunc { display: inline-block; max-width: 90px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom; }

/* User-management table: per-column sizing so common content (ids, dates, badges)
   stays compact and the email/username columns get the space instead of every
   column growing to fit the widest possible value. */
.admin-col-id { width: 36px; }
.admin-col-uname { width: 110px; }
.admin-col-email { width: 170px; }
.admin-col-plan { width: 64px; }
.admin-col-country { width: 100px; }
.admin-col-verified { width: 92px; text-align: center; }
.admin-col-joined { width: 134px; }
.admin-col-pro { width: 170px; }

/* Grant Pro / Revoke Pro / Remove sit side by side instead of stacking, which used
   to make the Action cell (and therefore the whole row, since table rows share a
   height) 2-3x taller than every other column needed — the main cause of the
   uneven, overly spaced-out rows. */
.admin-action-stack { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.admin-badge { display: inline-block; font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--amber, #F7C56B); border: 1px solid rgba(247,197,107,.4); border-radius: 5px; padding: 1px 6px; vertical-align: middle; }
.admin-badge--action { color: var(--blue-text, #8FB4FF); border-color: rgba(79,131,255,.35); }

/* Admin-granted Pro access */
.admin-pro-badge { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 700; white-space: nowrap; vertical-align: bottom; }
.admin-pro-badge--on { color: var(--green); }
.admin-btn-green { color: var(--green); border: 1px solid rgba(82,224,168,.4); }
.admin-btn-green:hover { background: rgba(82,224,168,.1); }
.admin-btn-amber { color: var(--amber, #F7C56B); border: 1px solid rgba(247,197,107,.4); }
.admin-btn-amber:hover { background: rgba(247,197,107,.1); }
.admin-subheading { margin: 36px 0 14px; }
.plan-tag { display: inline-block; font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; border-radius: 5px; padding: 1px 7px; }
.plan-tag--pro { color: var(--green); border: 1px solid rgba(82,224,168,.4); }

/* CTF / Pro CTF interest panels */
.admin-ctf { padding: 20px 20px 10px; }
.admin-ctf__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.admin-ctf__title { font-family: var(--f-display); font-weight: 800; font-size: 20px; color: #fff; margin: 4px 0 2px; }
.admin-ctf__desc { font-size: 13px; line-height: 1.5; margin: 0; }
.admin-count { flex: none; min-width: 48px; text-align: center; font-family: var(--f-display); font-weight: 900;
  font-size: 30px; line-height: 1.1; color: var(--blue-text, #8FB4FF); }
.admin-count--amber { color: var(--amber, #F7C56B); }

/* Integrations (Slack) */
.admin-integrations { padding: 16px 20px; }
.admin-int__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-int__name { font-weight: 700; color: #fff; }
.admin-int__desc { font-size: 13px; }
.admin-int__right { display: flex; align-items: center; gap: 12px; }
.admin-int__status { font-family: var(--f-mono); font-size: 12px; font-weight: 700; letter-spacing: .04em;
  border-radius: 6px; padding: 3px 10px; }
.admin-int__status--on { color: var(--green); border: 1px solid rgba(82,224,168,.4); }
.admin-int__status--off { color: var(--subtle); border: 1px solid var(--line-strong); }
.admin-int__hint { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }

/* Long values (emails, detail strings) truncate with an ellipsis + title tooltip instead
   of wrapping across multiple lines and blowing out row height. */
.admin-email--trunc { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-detail-trunc { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Audit-log action badges — color-coded like a real activity feed instead of one flat blue. */
.admin-badge--action { text-transform: capitalize; }
.admin-badge--grant_pro { color: var(--green); border-color: rgba(82,224,168,.4); }
.admin-badge--revoke_pro { color: var(--amber, #F7C56B); border-color: rgba(247,197,107,.4); }
.admin-badge--expire_pro { color: var(--subtle); border-color: var(--line-strong); }
.admin-badge--delete_user { color: var(--red-text, #FF6B7A); border-color: rgba(229,36,59,.4); }

/* ===== Admin confirm modal — replaces window.confirm() for destructive/sensitive actions ===== */
.admin-modal-backdrop {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(5,6,10,.65); backdrop-filter: blur(3px);
  animation: admin-modal-fade .15s ease;
}
/* `display: flex` above has the same specificity as the UA stylesheet's `[hidden]{display:none}`
   but wins as an author rule, so the modal would show on every page load unless this is explicit. */
.admin-modal-backdrop[hidden] { display: none; }
.admin-modal {
  width: 100%; max-width: 420px; border-radius: var(--r-card); border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)), var(--surface);
  padding: 28px 26px 22px; text-align: center;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.6);
  animation: admin-modal-pop .18s cubic-bezier(.2,.9,.3,1.2);
}
.admin-modal__icon {
  width: 46px; height: 46px; margin: 0 auto 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.admin-modal__icon svg { width: 22px; height: 22px; }
.admin-modal--danger .admin-modal__icon { color: var(--red-text, #FF6B7A); background: rgba(229,36,59,.14); }
.admin-modal--warning .admin-modal__icon { color: var(--amber, #F7C56B); background: rgba(247,197,107,.14); }
.admin-modal--primary .admin-modal__icon { color: var(--blue-text, #7FADFF); background: rgba(79,131,255,.14); }
.admin-modal__title { font-family: var(--f-display); font-weight: 800; font-size: 20px; color: #fff; margin: 0 0 10px; letter-spacing: .01em; }
.admin-modal__msg { font-size: 14px; line-height: 1.6; color: var(--text-2); margin: 0 0 22px; }
.admin-modal__actions { display: flex; gap: 10px; justify-content: center; }
.admin-modal__actions .btn { flex: 1; justify-content: center; }
.admin-modal--danger #admin-modal-confirm { background: var(--red); color: #fff; border: 1px solid var(--red); }
.admin-modal--danger #admin-modal-confirm:hover { background: var(--red-hover); border-color: var(--red-hover); }
.admin-modal--warning #admin-modal-confirm { background: var(--amber, #F7C56B); color: #1a1406; border: 1px solid var(--amber, #F7C56B); }
.admin-modal--warning #admin-modal-confirm:hover { filter: brightness(1.08); }
.admin-modal--primary #admin-modal-confirm { background: var(--blue, #2F7BFF); color: #fff; border: 1px solid var(--blue, #2F7BFF); }
.admin-modal--primary #admin-modal-confirm:hover { filter: brightness(1.08); }
@keyframes admin-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes admin-modal-pop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .admin-modal-backdrop, .admin-modal { animation: none; }
}
@media (max-width: 480px) {
  .admin-modal__actions { flex-direction: column-reverse; }
}

/* Responsive: sidebar becomes a horizontal pill row above the content */
@media (max-width: 880px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: static; flex-direction: row; overflow-x: auto; gap: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .admin-sidebar__link { flex: none; width: auto; white-space: nowrap; }
}

/* Tablet/below: columns are already sized to fit most desktop widths without
   scrolling; where they still don't (narrower tablet, sidebar still beside
   content), the table scrolls inside its own contained box (.admin-table-wrap)
   rather than breaking the page layout. */
@media (max-width: 760px) {
  .admin-toolbar { flex-direction: column; align-items: stretch; }
  .admin-search { flex: 1 1 auto; }
  .admin-toolbar select { width: 100%; }
  .admin-int__row { flex-direction: column; align-items: flex-start; }
  .admin-int__right { width: 100%; justify-content: space-between; }
}

/* Mobile: each row becomes its own card instead of a cramped/scrolling table row.
   `data-label` (set on every <td> in admin.html) supplies the row-label text via
   ::before, reusing the exact same `.admin-table` markup and styles everywhere
   it's used (User Management, CTF Interest, Pro CTF Interest, audit log) instead
   of a separate mobile-only component. */
@media (max-width: 680px) {
  .admin-table-wrap { overflow-x: visible; }
  .admin-table, #admin-user-table { min-width: 0; display: block; table-layout: auto; }
  .admin-table thead { display: none; }
  .admin-table tbody { display: block; }
  .admin-table tr {
    display: block; padding: 12px 14px; border-bottom: 1px solid var(--line-strong);
  }
  .admin-table tbody tr:hover td { background: none; }
  .admin-table td {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; padding: 8px 2px; border-bottom: 0; text-align: right;
  }
  .admin-table td[data-label]::before {
    content: attr(data-label); flex: none; text-align: left;
    font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
    color: var(--subtle); font-weight: 700;
  }
  .admin-col-id, .admin-col-uname, .admin-col-email, .admin-col-plan, .admin-col-country,
  .admin-col-verified, .admin-col-joined, .admin-col-pro { width: auto; }
  .admin-uname--trunc { max-width: 60vw; }
  .admin-action-col { width: auto; text-align: right; }
  .admin-action-col .admin-action-stack { justify-content: flex-end; width: 100%; }
  .admin-action-col .btn--sm { padding: 8px 16px; }
}

/* Achievements (profile) */
.achv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.achv-item { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center;
  padding: 14px 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .015); }
.achv-item__t { font-size: 11.5px; font-weight: 600; color: var(--text-2); line-height: 1.25; }
.achv-item--locked { opacity: .4; filter: grayscale(1); }
@media (max-width: 440px) { .achv-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Two-factor authentication  (profile card + setup + codes + challenge)
   ============================================================ */
.tfa { gap: 0; }
.tfa__head { display: flex; align-items: flex-start; gap: 16px; }
.tfa__badge { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--raised); color: var(--text-2); }
.tfa__badge svg { width: 24px; height: 24px; }
.tfa--on .tfa__badge { color: var(--green); border-color: rgba(82,224,168,.40);
  background: radial-gradient(120% 120% at 50% 0%, rgba(82,224,168,.16), var(--raised) 70%); }
.tfa--off .tfa__badge { color: var(--amber); border-color: rgba(247,197,107,.38);
  background: radial-gradient(120% 120% at 50% 0%, rgba(247,197,107,.14), var(--raised) 70%); }
.tfa__headmain { flex: 1; min-width: 0; }
.tfa__title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.tfa__title h3 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 26px; line-height: 1; text-transform: uppercase; }
.tfa__status { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; border: 1px solid; }
.tfa__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.tfa__status.is-on  { color: var(--green); border-color: rgba(82,224,168,.40); background: rgba(82,224,168,.08); }
.tfa__status.is-off { color: var(--amber); border-color: rgba(247,197,107,.40); background: rgba(247,197,107,.08); }
.tfa__desc { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 62ch; }
.tfa__desc b { color: var(--text-2); }

/* benefit list (disabled state) */
.tfa__benefits { list-style: none; margin: 18px 0 22px; padding: 0; display: grid; gap: 10px; }
.tfa__benefits li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.tfa__benefits svg { flex: 0 0 auto; color: var(--amber); width: 18px; height: 18px; }
.tfa__enable { margin-top: 2px; }

/* setting rows (enabled state) */
.tfa__rows { margin-top: 22px; border-top: 1px solid var(--line-soft); }
.tfa__row-wrap { border-bottom: 1px solid var(--line-soft); }
.tfa__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 4px;
  cursor: pointer; list-style: none; flex-wrap: wrap; transition: background-color .16s ease; border-radius: 10px; }
.tfa__row::-webkit-details-marker { display: none; }
.tfa__row:hover { background: rgba(255,255,255,.02); }
.tfa__row-main { min-width: 210px; flex: 1; }
.tfa__row-main strong { display: block; font-size: 15px; color: var(--text); font-weight: 700; }
.tfa__row-main span { display: block; font-size: 13px; color: var(--subtle); margin-top: 3px; line-height: 1.45; }
.tfa__cta { pointer-events: none; }            /* the whole row toggles; button is just the affordance */
.tfa__cta--danger { border-color: rgba(229,36,59,.5); color: var(--red-soft); }
.tfa__row-wrap[open] .tfa__cta--danger { color: var(--red-soft); }
.tfa__panel { margin: 2px 4px 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg-alt); max-width: 400px; animation: tfa-reveal .22s ease; }
@keyframes tfa-reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.tfa__panel .field + .field { margin-top: 12px; }
.tfa__panel .btn { margin-top: 16px; }

/* ---- setup page ---- */
.tfa-setup { max-width: 720px; }
.tfa-setup__grid { display: grid; gap: 14px; margin-top: 22px; }
.tfa-step { display: flex; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-alt); }
.tfa-step__n { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-mono); font-weight: 700; font-size: 14px; color: #fff; background: var(--red);
  box-shadow: 0 6px 18px -8px rgba(229,36,59,.8); }
.tfa-step__body { flex: 1; min-width: 0; }
.tfa-step__body > strong { display: block; font-size: 16px; color: var(--text); }
.tfa-step__body > span { display: block; font-size: 13.5px; color: var(--muted); margin: 3px 0 0; }
.tfa-qr { display: inline-flex; margin: 16px 0 4px; padding: 10px; border-radius: 14px; background: #fff;
  box-shadow: 0 10px 30px -14px rgba(0,0,0,.6); }
.tfa-qr img { width: 180px; height: 180px; border-radius: 6px; }
.tfa-manual { margin-top: 10px; }
.tfa-manual > summary { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px;
  color: var(--blue-text); list-style: none; width: fit-content; }
.tfa-manual > summary::-webkit-details-marker { display: none; }
.tfa-manual > summary:hover { color: var(--blue-soft); }
.tfa-key { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-top: 10px; padding: 10px 12px;
  border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); max-width: 320px; }
.tfa-key code { font-family: var(--f-mono); font-size: 14px; letter-spacing: 1px; word-break: break-all; color: var(--text); }

/* ---- backup codes page ---- */
.tfa-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 20px 0; }
.tfa-codes code { position: relative; font-family: var(--f-mono); font-size: 16px; letter-spacing: 1px; text-align: center;
  padding: 13px 10px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line); color: var(--text); }
.tfa-codes code::before { content: counter(tfa-c) ""; counter-increment: tfa-c; position: absolute; left: 9px; top: 7px;
  font-size: 10px; color: var(--subtle); letter-spacing: 0; }
.tfa-codes { counter-reset: tfa-c; }
.tfa-codes-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

/* ---- login challenge: segmented code feel ---- */
.auth__box .tfa-head { display: flex; align-items: center; gap: 12px; }
.auth__box .tfa-head__ico { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  color: var(--red-text); border: 1px solid rgba(229,36,59,.35); background: rgba(229,36,59,.08); }
.input--code { font-family: var(--f-mono); letter-spacing: 10px; text-align: center; font-size: 22px; }

@media (max-width: 560px) { .tfa__title h3 { font-size: 22px; } .tfa-codes code { font-size: 14px; } }

/* ================= Subscription / billing card ================= */
.tfa__status.is-neutral { color: var(--subtle); border-color: var(--line-strong); background: rgba(255,255,255,.03); }
.sub-card { display: grid; grid-template-columns: 1fr minmax(240px, 300px); gap: 24px; align-items: stretch; padding: 24px; overflow: hidden; }
.sub-card--pro { border-color: rgba(82,224,168,.28); background: radial-gradient(130% 130% at 0 0, rgba(82,224,168,.07), var(--surface) 58%); }
.sub-card--founder { border-color: rgba(247,197,107,.30); background: radial-gradient(130% 130% at 0 0, rgba(247,197,107,.08), var(--surface) 58%); }
.sub-card__main { display: flex; flex-direction: column; min-width: 0; }
.sub-head { display: flex; align-items: flex-start; gap: 16px; }
.sub-head__text { flex: 1; min-width: 0; }
.sub-badge { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--raised); color: var(--text-2); }
.sub-badge svg { width: 24px; height: 24px; }
.sub-card--pro .sub-badge { color: var(--green); border-color: rgba(82,224,168,.40);
  background: radial-gradient(120% 120% at 50% 0%, rgba(82,224,168,.16), var(--raised) 70%); }
.sub-card--founder .sub-badge { color: var(--amber); border-color: rgba(247,197,107,.38);
  background: radial-gradient(120% 120% at 50% 0%, rgba(247,197,107,.14), var(--raised) 70%); }
.sub-desc { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 54ch; }
.sub-desc b { color: var(--text-2); }
.sub-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 20px; }
.sub-actions form { margin: 0; }
.sub-cancel { border-color: rgba(229,36,59,.5); color: var(--red-soft); }
.sub-cancel:hover { border-color: var(--red); color: #fff; background: rgba(229,36,59,.12); }

/* right panel: plan summary (paid) */
.sub-card__panel { display: flex; flex-direction: column; justify-content: center; }
.sub-summary { display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sub-kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; background: var(--raised); }
.sub-kv span { color: var(--subtle); font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.sub-kv strong { color: var(--text); font-size: 14px; font-weight: 700; text-align: right; }
.sub-kv strong.ok { color: var(--green); }

/* right panel: upsell (free) */
.sub-upsell { border: 1px solid rgba(229,36,59,.30); border-radius: 16px; padding: 18px;
  background: radial-gradient(130% 120% at 100% 0%, rgba(229,36,59,.13), var(--raised) 72%); }
.sub-upsell__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px;
  padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.06); }
.sub-upsell__name { font-family: var(--f-display); font-weight: 800; font-size: 24px; line-height: 1; text-transform: uppercase; color: #fff; }
.sub-upsell__price { font-family: var(--f-display); font-weight: 800; font-size: 30px; line-height: 1; color: var(--red-text); }
.sub-upsell__price small { font-size: 13px; font-family: var(--f-body); font-weight: 600; color: var(--subtle); }
.sub-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.sub-perks li { position: relative; padding-left: 24px; font-size: 13.5px; color: var(--text-2); line-height: 1.4; }
.sub-perks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }

@media (max-width: 760px) {
  .sub-card { grid-template-columns: 1fr; gap: 20px; }
  .sub-card__panel { justify-content: flex-start; }
}

/* pricing: refined "current plan" active state */
.price-card__current--active { color: var(--red-soft); background: rgba(229,36,59,.1); border-color: rgba(229,36,59,.4); }
.price-card__current .pc-check { width: 15px; height: 15px; }
.pc-manage { margin-top: 2px; }
.pc-manage .pc-ico { width: 17px; height: 17px; opacity: .85; }

/* ===================== Admin console redesign (.ax-*) ===================== */
.ax-head { margin-bottom: 22px; }
.ax-head .eyebrow { color: var(--subtle); }
.ax-head h1 { font-family: var(--f-display); font-weight: 800; font-size: clamp(32px, 4vw, 46px); line-height: .95; text-transform: uppercase; margin: 4px 0 6px; }
.ax-head p { color: var(--muted); font-size: 14.5px; margin: 0; }
.ax-shell { display: grid; grid-template-columns: 236px 1fr; gap: 24px; align-items: start; }

/* sidebar */
.ax-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 4px; padding: 10px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.ax-side__link { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 12px; border: 0; border-radius: 11px;
  background: transparent; color: var(--text-2); font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.ax-side__link svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--subtle); }
.ax-side__link:hover { background: rgba(255,255,255,.03); color: var(--text); }
.ax-side__link.is-active { background: rgba(255,255,255,.06); color: #fff; }
.ax-side__link.is-active svg { color: var(--text); }
.ax-side__link > span:first-of-type { flex: 1; }
.ax-side__count { font-family: var(--f-mono); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,.06); color: var(--muted); }
.ax-side__link.is-active .ax-side__count { background: rgba(255,255,255,.1); color: var(--text-2); }
.ax-side__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--subtle); }
.ax-side__dot.on { background: var(--text-2); box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.ax-side__sep { height: 1px; margin: 6px 4px; background: var(--line-soft); }

.ax-main { min-width: 0; }
.ax-panel[hidden] { display: none; }
.ax-panel__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.ax-panel__head h2 { font-family: var(--f-display); font-weight: 800; font-size: 26px; text-transform: uppercase; line-height: 1; margin: 0; }
.ax-panel__head p { color: var(--muted); font-size: 13.5px; margin: 5px 0 0; }

/* stat tiles */
.ax-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ax-stat { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ax-stat__num { font-family: var(--f-display); font-weight: 800; font-size: 36px; line-height: 1; color: #fff; }
.ax-stat__label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); margin-top: 8px; }
.ax-stat__trend { font-size: 12px; color: var(--subtle); margin-top: 7px; }

.ax-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.ax-mini { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.ax-mini h3 { font-size: 12px; font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--subtle); margin: 0 0 12px; }
.ax-mini__row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.ax-mini__row:first-of-type { border-top: 0; }
.ax-mini__row .ax-avatar { width: 30px; height: 30px; font-size: 11px; }
.ax-mini__row b { font-size: 14px; }
.ax-mini__row > span:last-child { color: var(--subtle); font-size: 12.5px; margin-left: auto; font-family: var(--f-mono); }

/* activity feed (timeline) */
.ax-feed { list-style: none; margin: 0; padding: 0; }
.ax-feed__item { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 11px 0; }
.ax-feed__item:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 22px; bottom: -11px; width: 1px; background: var(--line); }
.ax-feed__node { flex: 0 0 auto; width: 11px; height: 11px; margin-top: 4px; border-radius: 50%;
  background: var(--raised); border: 2px solid var(--line-hover); position: relative; z-index: 1; }
.ax-feed__body { flex: 1; min-width: 0; }
.ax-feed__txt { font-size: 14px; color: var(--text-2); line-height: 1.35; }
.ax-feed__txt b { color: var(--text); font-weight: 700; }
.ax-feed__meta { font-size: 12px; color: var(--subtle); font-family: var(--f-mono); margin-top: 3px; word-break: break-all; }
.ax-feed__time { margin-left: auto; flex: 0 0 auto; font-size: 12px; color: var(--subtle); font-family: var(--f-mono); white-space: nowrap; padding-top: 2px; }

/* toolbar */
.ax-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ax-search { flex: 1 1 280px; display: flex; align-items: center; gap: 9px; padding: 0 14px; height: 46px;
  border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--raised); color: var(--subtle); }
.ax-search input { flex: 1; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14.5px; outline: none; }
.ax-select { height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl);
  background: var(--raised); color: var(--text-2); font: inherit; font-size: 14px; cursor: pointer; }

/* fluid user table — table-layout auto, no fixed min-width, nothing clipped */
.ax-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.ax-tablewrap { overflow-x: auto; }
.ax-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ax-table th { text-align: left; padding: 13px 13px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--subtle); border-bottom: 1px solid var(--line); white-space: nowrap; }
.ax-table td { padding: 12px 13px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.ax-table tbody tr:last-child td { border-bottom: 0; }
.ax-row { cursor: pointer; transition: background .14s; }
.ax-row:hover { background: rgba(255,255,255,.03); }
.ax-user-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ax-avatar { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-mono); font-weight: 700; font-size: 13px; letter-spacing: .02em; color: var(--text-2); background: var(--raised); border: 1px solid var(--line-strong); }
.ax-user-meta { min-width: 0; }
.ax-uname { display: flex; align-items: center; gap: 7px; font-weight: 700; color: var(--text); }
.ax-email { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; margin-top: 2px; }
.ax-chip { font-family: var(--f-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.04); color: var(--muted); white-space: nowrap; }
.ax-plan { font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); white-space: nowrap; }
.ax-plan--free { color: var(--subtle); background: transparent; }
.ax-plan--pro, .ax-plan--lifetime { color: var(--text); background: rgba(255,255,255,.07); }
.ax-tag { font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.04); color: var(--muted); white-space: nowrap; }
.ax-country { color: var(--text-2); white-space: nowrap; }
.ax-date { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ax-status { display: flex; align-items: center; gap: 8px; }
.ax-ok { color: var(--text-2); display: inline-flex; }
.ax-no { color: var(--subtle); }
.ax-protected { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; color: var(--subtle); padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 999px; }
.ax-rowact { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.ax-rowact form { margin: 0; }
.ax-chevron { color: var(--subtle); display: inline-flex; transition: transform .15s, color .15s; }
.ax-row:hover .ax-chevron { color: var(--text-2); transform: translateX(2px); }

.ax-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }
.ax-pager span { color: var(--muted); font-size: 13px; font-family: var(--f-mono); }

.ax-countpill { font-family: var(--f-mono); font-size: 12px; font-weight: 700; color: var(--muted);
  background: rgba(255,255,255,.05); border: 1px solid var(--line-strong); padding: 1px 9px; border-radius: 999px; vertical-align: middle; margin-left: 10px; }

/* integrations */
.ax-int { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ax-int + .ax-int { margin-top: 12px; }
.ax-int__ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--raised); color: var(--text-2); flex: 0 0 auto; }
.ax-int__name { font-weight: 700; font-size: 15px; }
.ax-int__desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ax-int__status { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 11px;
  font-weight: 700; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; flex: 0 0 auto; }
.ax-int__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ax-int__status.on { color: var(--text-2); background: rgba(255,255,255,.05); border: 1px solid var(--line-strong); }
.ax-int__status.off { color: var(--subtle); background: rgba(255,255,255,.03); border: 1px solid var(--line-strong); }
.ax-int__hint { font-family: var(--f-mono); font-size: 12px; color: var(--subtle); }

/* detail drawer */
.ax-drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(4,5,10,.6); opacity: 0; pointer-events: none; transition: opacity .22s; }
.ax-drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.ax-drawer { position: fixed; top: 0; right: 0; z-index: 41; height: 100%; width: 440px; max-width: 94vw;
  background: var(--bg-alt); border-left: 1px solid var(--line-strong); box-shadow: -30px 0 70px -30px rgba(0,0,0,.7);
  transform: translateX(100%); transition: transform .26s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; }
.ax-drawer.open { transform: none; }
.ax-drawer__top { display: flex; align-items: flex-start; gap: 14px; padding: 22px; border-bottom: 1px solid var(--line); }
.ax-drawer__top .ax-avatar { width: 52px; height: 52px; font-size: 18px; border-radius: 50%; }
.ax-drawer__name { font-family: var(--f-display); font-weight: 800; font-size: 24px; line-height: 1; text-transform: uppercase; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ax-drawer__email { font-family: var(--f-mono); font-size: 13px; color: var(--muted); margin-top: 6px; word-break: break-all; }
.ax-drawer__x { margin-left: auto; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; flex: 0 0 auto; }
.ax-drawer__x:hover { color: #fff; border-color: var(--line-hover); }
.ax-drawer__body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.ax-kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 14px; margin-bottom: 18px; }
.ax-kv dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--subtle); padding-top: 2px; }
.ax-kv dd { margin: 0; color: var(--text); font-size: 14px; word-break: break-word; }
.ax-drawer__sub { font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--subtle); margin: 0 0 10px; }
.ax-prograntt { padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--raised); font-size: 13px; color: var(--text-2); }
.ax-socials { display: flex; flex-wrap: wrap; gap: 8px; }
.ax-social { font-family: var(--f-mono); font-size: 12px; color: var(--text-2); padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 8px; }
.ax-bio { color: var(--text-2); font-size: 14px; line-height: 1.5; }
.ax-drawer__foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; }
.ax-drawer__foot form { margin: 0; }
.ax-btn-neutral { background: rgba(255,255,255,.05); border: 1px solid var(--line-strong); color: var(--text-2); }
.ax-btn-neutral:hover { background: rgba(255,255,255,.1); color: #fff; }

.ax-empty { padding: 40px; text-align: center; color: var(--subtle); }

@media (max-width: 900px) {
  .ax-shell { grid-template-columns: 1fr; }
  .ax-side { position: static; flex-direction: row; overflow-x: auto; }
  .ax-side__sep { display: none; }
  .ax-side__link > span:first-of-type, .ax-side__count { display: none; }
  .ax-grid2 { grid-template-columns: 1fr; }
}
