/* ==========================================================================
   Tactical HUD theme — loaded last on every page.
   Sharp, angled shapes; condensed uppercase display type; HUD brackets;
   sliding-fill buttons. Colours stay the teal / steel-blue palette.
   ========================================================================== */

:root {
  --font-display: 'Teko', 'Arial Narrow', sans-serif;
  --font-ui: 'Chakra Petch', system-ui, sans-serif;
  --font-mono: 'Chakra Petch', ui-monospace, monospace;
  --r-1: 0; --r-2: 0; --r-3: 0;
  --cut: 12px;
  --hud: var(--accent);
  /* clipped-corner shapes */
  --clip-btn: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  --clip-card: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  --clip-tag: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

body { font-family: var(--font-ui); font-size: 15px; letter-spacing: 0.01em; }

/* ---------------------------------------------------------------- type */
.display, .h1, .h2, .h3, .pitch-title, .floor-title, .board-title, .top-name, .result-model, .modal h3,
.page-head .h1, .auth-card .h1, .mm-stage .h1, .results-hero .display, .how-h {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.9;
}
.h1, .page-head .h1 { font-size: clamp(2.6rem, 5vw, 3.6rem); }
.h2 { font-size: clamp(2.1rem, 3.6vw, 2.8rem); }
.h3, .how-h { font-size: 1.75rem; }
.top-name { font-size: 2rem; line-height: 0.95; }
.result-model { font-size: 2.1rem; }

.eyebrow, .label, dt, .table th, .scan-head, .top-label, .result-brand, .badge, .center-status,
.tabs button, .seg button, .cats button, .nav-links > a, .footer-links a, .btn, .ci-tag, .top-tag,
.side-title, .live-pill, .item-tile .brand {
  font-family: var(--font-ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.label, dt, .table th { font-size: 0.66rem; color: var(--faint); }
.eyebrow::before, .top-label::before { content: '// '; color: var(--faint); }

/* Numbers: tall condensed figures */
.mono-num, .ticker dd, .stats dd, .top-price, .ci-price, .seat-stat .v, .value-main, .r-final .big, .r-stats .v,
.bd-head .final, .top-clock, .lb-metric, .stat .v, .mm-timer, .room-code, .code-chip, .rank, .challenge .count,
.mini-num, .scan-value, .leader-score .mono-num {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 0.9;
}
.ticker dd { font-size: 2.4rem; }
.top-price { font-size: 3rem; }
.ci-price { font-size: 1.7rem; }
.seat-stat .v { font-size: 2.1rem; }
.value-main { font-size: 3rem; }
.top-clock { font-size: 2.6rem; }
.r-final .big { font-size: clamp(4rem, 7vw, 5.6rem); }
.r-stats .v { font-size: 2.2rem; }
.bd-head .final { font-size: 2rem; }
.stat .v { font-size: clamp(2.2rem, 3.4vw, 3rem); }
.lb-metric { font-size: 1.8rem; }
.rank { font-size: 1.8rem; }

/* ---------------------------------------------------------------- buttons: clipped, sliding fill */
.btn {
  border-radius: 0;
  clip-path: var(--clip-btn);
  font-size: 0.8rem;
  min-height: 46px;
  padding: 0 24px;
  background: linear-gradient(90deg, var(--accent) 50%, var(--btn-bg) 50%) 100% 0 / 202% 100% no-repeat;
  transition: background-position 280ms var(--ease), color 200ms var(--ease), border-color var(--t-fast);
}
.btn:hover:not([disabled]) { background-position: 0 0; color: var(--accent-ink); border-color: var(--accent); }
.btn-primary { background: linear-gradient(90deg, var(--text) 50%, var(--accent) 50%) 100% 0 / 202% 100% no-repeat; color: var(--accent-ink); }
.btn-primary:hover:not([disabled]) { color: var(--accent-ink); border-color: var(--text); }
.btn-ghost { background: linear-gradient(90deg, var(--card-2) 50%, transparent 50%) 100% 0 / 202% 100% no-repeat; }
.btn-ghost:hover:not([disabled]) { color: var(--text); }
.btn-danger { background: linear-gradient(90deg, var(--error) 50%, rgba(251, 113, 133, 0.06) 50%) 100% 0 / 202% 100% no-repeat; }
.btn-danger:hover:not([disabled]) { color: var(--accent-ink); border-color: var(--error); }
.btn-lg { min-height: 54px; padding: 0 32px; font-size: 0.9rem; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 0.7rem; }
.icon-btn { border-radius: 0; clip-path: var(--clip-btn); }

/* ---------------------------------------------------------------- panels: notched corner + HUD brackets */
.card, .panel, .mode-card, .lb-table-wrap, .wallet-btn, .auth-card, .card-item, .top-card, .console-col, .overlay-card,
.r-player, .modal, .side, .board-main, .live-bar, .evidence-card, .auto-box, .stat-grid, .status-list li, .formula,
.empty, .notice, .seat-stats, .toast, .stats {
  border-radius: 0;
  clip-path: var(--clip-card);
  background-image:
    linear-gradient(var(--hud), var(--hud)), linear-gradient(var(--hud), var(--hud)),
    linear-gradient(var(--hud), var(--hud)), linear-gradient(var(--hud), var(--hud)),
    linear-gradient(to bottom left, transparent calc(50% - 1px), var(--line-2) 50%, transparent calc(50% + 1px));
  background-repeat: no-repeat;
  background-size: 16px 2px, 2px 16px, 16px 2px, 2px 16px, var(--cut) var(--cut);
  background-position: 0 0, 0 0, 100% 100%, 100% 100%, 100% 0;
}
.empty, .notice, .toast { --hud: var(--line-2); }

/* small shapes */
.badge, .ci-tag, .top-tag { border-radius: 0; clip-path: var(--clip-tag); padding-right: 12px; }
.tabs, .seg { border-radius: 0; padding: 0; gap: 0; }
.tabs button, .seg button { border-radius: 0; font-size: 0.72rem; padding: 9px 14px; }
.tabs button[aria-selected='true'], .seg button[aria-selected='true'] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.cats button { border-radius: 0; clip-path: var(--clip-tag); font-size: 0.7rem; padding: 6px 14px 6px 12px; }
.input, .select, .textarea { border-radius: 0; }
.input:focus, .select:focus, .textarea:focus { box-shadow: inset 3px 0 0 var(--accent); }
.switch input { border-radius: 0; }
.switch input::after { border-radius: 0; }
.avatar { border-radius: 0; clip-path: polygon(0 0, calc(100% - 25%) 0, 100% 25%, 100% 100%, 25% 100%, 0 calc(100% - 25%)); font-family: var(--font-display); font-weight: 600; font-size: calc(var(--size) * 0.55); line-height: 1; padding-top: 0.12em; }
.feed, .result-media, .item-tile .media, .ci-media, .top-media, .scan-thumb, .h-thumb { border-radius: 0; }
.feed { clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px)); }
.conf-bar, .bd-bar .track, .slots span, .auto-bar { border-radius: 0; }

/* ---------------------------------------------------------------- nav */
.site-nav { background: rgba(7, 16, 19, 0.9); border-bottom-color: var(--line); }
.site-nav::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 120px; height: 2px; background: var(--accent); }
.brand-word { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; line-height: 0.8; padding-top: 0.15em; }
.nav-links > a { font-size: 0.74rem; color: var(--dim); }
.nav-links > a[aria-current='page'] { color: var(--text); }
.nav-links > a[aria-current='page']::after { height: 2px; bottom: -4px; }
.user-chip { border-radius: 0 !important; clip-path: var(--clip-btn); }

/* ---------------------------------------------------------------- section headings with a HUD rule */
.floor-title, .board-title, .side-title, .page-head .h1 { display: flex; align-items: center; gap: 14px; }
.floor-bar .floor-title { flex: 1; }
.floor-bar .floor-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.floor-title { font-size: 2.2rem; }

/* ---------------------------------------------------------------- homepage hero */
.floor-hero::before {
  background-image: repeating-linear-gradient(135deg, rgba(105, 170, 193, 0.05) 0 1px, transparent 1px 14px);
  background-size: auto;
  mask-image: linear-gradient(100deg, transparent 35%, #000 70%);
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 70%);
}
.pitch-title { font-size: clamp(4.4rem, 10vw, 8.6rem); line-height: 0.82; letter-spacing: 0.005em; }
.pitch-text { font-size: 1rem; }
.hero-ghost {
  position: absolute;
  right: -1vw;
  bottom: -0.18em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(8rem, 22vw, 20rem);
  line-height: 0.8;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(105, 170, 193, 0.1);
  pointer-events: none;
  user-select: none;
}
.hud-tag { display: inline-flex; align-items: center; gap: 10px; margin-bottom: var(--s-5); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.hud-tag::before { content: ''; width: 28px; height: 2px; background: var(--accent); }
.ticker > div { border-right: 0; position: relative; }
.ticker > div + div::before { content: ''; position: absolute; left: calc(-1 * var(--s-5) - 1px); top: 4px; bottom: 4px; width: 2px; background: var(--line-2); transform: skewX(-18deg); }
.top-card { box-shadow: none; }
.top-body { position: relative; }
.top-card::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }

/* ---------------------------------------------------------------- arena HUD */
.arena-top { background: rgba(7, 16, 19, 0.94); }
.top-clock {
  padding: 4px 28px 0;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 14px 100%);
}
.vs { font-family: var(--font-display); font-size: 3.6rem; font-weight: 700; color: var(--accent); }
.seat.is-me .feed { box-shadow: none; }
.seat-id .name { font-family: var(--font-display); font-size: 1.6rem; text-transform: uppercase; line-height: 0.9; letter-spacing: 0.02em; }
.challenge .instruction { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 0.95; }
.auto-icon { border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); border: 0; background: rgba(105, 170, 193, 0.14); }
.auto-text strong { font-family: var(--font-display); font-size: 1.5rem; text-transform: uppercase; font-weight: 600; line-height: 0.9; letter-spacing: 0.02em; }

/* ---------------------------------------------------------------- results: VICTORY / DEFEAT */
.results-hero .display { font-size: clamp(4rem, 11vw, 9rem); line-height: 0.92; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.results-hero.is-win .display { color: var(--success); }
.results-hero.is-loss .display { color: var(--error); }
.r-player.winner { border-color: rgba(57, 214, 163, 0.5); --hud: var(--success); }

/* ---------------------------------------------------------------- misc */
.spinner { border-radius: 50%; }
.live-dot, .live-pill i, .badge .dot, .cam-status .dot { border-radius: 0; transform: rotate(45deg); }
.wallet-mono { border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); border: 0; background: rgba(105, 170, 193, 0.14); font-family: var(--font-display); font-size: 1.5rem; padding-top: 0.15em; }
.code-chip, .room-code { color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }

.switch span { font-weight: 600; font-size: 0.82rem; }

/* ---------------------------------------------------------------- contract address button */
.ca-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px 0 0;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  font: 600 0.74rem/1 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.ca-btn .ca-k { align-self: stretch; display: grid; place-items: center; padding: 0 10px; background: var(--accent); color: #071013; }
.ca-btn .ca-v { font-variant-numeric: tabular-nums; }
.ca-btn .icon { width: 15px; height: 15px; color: var(--dim); }
.ca-btn:hover:not(:disabled) { border-color: var(--accent); }
.ca-btn:hover:not(:disabled) .icon { color: var(--text); }
.ca-btn:disabled { cursor: default; }
.ca-btn:disabled .ca-v { color: var(--warn); }
.ca-btn:disabled .icon { opacity: 0.35; }
.ca-btn.ca-lg { height: 42px; font-size: 0.82rem; }
.ca-btn.ca-lg .ca-k { padding: 0 14px; }
.pitch-ca { margin-top: 14px; }
@media (max-width: 900px) { .ca-nav { align-self: flex-start; } }
