/* ════════════════════════════════════════════════════════════════════
   Tarkov Raiders HQ — full visual overhaul (2026) · "FIELD TERMINAL"
   Loaded AFTER styles.css / hq-pages.css / site-themes.css.
   Pure CSS overrides — no markup or JS hooks change, and the shared
   design tokens are reused so purchasable site themes keep working.

   Art language:
   · olive-black surfaces, EFT tan-gold accent, Bender stencil headings
   · chamfered plates instead of pills, HUD corner brackets on cards
   · film grain + scanline atmosphere, animated topbar scan sweep
   · terminal-style inputs, striped primary actions, hard focus rings
   ════════════════════════════════════════════════════════════════════ */

/* ── 1. Design tokens (default theme — data-site-theme overrides win) ── */
:root {
  --bg: #0b0c09;
  --bg-elevated: #14150f;
  --bg-card: #1a1b13;
  --border: #34362a;
  --text: #e9e6d8;
  --text-muted: #a29b86;
  --accent: #d3ab4e;
  --accent-dim: #94783a;
  --line: #3e4033;
  --body-glow: rgba(211, 171, 78, 0.08);
  --body-gradient-from: #0b0c09;
  --body-gradient-to: #12130c;
  --radius: 4px;
  --scrollbar-thumb-hover: rgba(211, 171, 78, 0.55);
  --scrollbar-thumb-active: rgba(211, 171, 78, 0.72);
  /* redesign-only tokens (theme-reactive via --accent) */
  --chamfer: polygon(
    0.45rem 0, 100% 0, 100% calc(100% - 0.45rem),
    calc(100% - 0.45rem) 100%, 0 100%, 0 0.45rem
  );
  --chamfer-sm: polygon(
    0.2rem 0, 100% 0, 100% calc(100% - 0.2rem),
    calc(100% - 0.2rem) 100%, 0 100%, 0 0.2rem
  );
  --hud-bracket: color-mix(in srgb, var(--accent) 42%, transparent);
  --hud-stripes: repeating-linear-gradient(
    -45deg, rgba(0, 0, 0, 0.16) 0 5px, transparent 5px 10px
  );
}

/* ── 2. Atmosphere — grain, scanlines, tactical grid, vignette ── */
body {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--body-glow), transparent),
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    radial-gradient(ellipse 140% 100% at 50% 38%, transparent 58%, rgba(0, 0, 0, 0.5) 100%),
    linear-gradient(180deg, var(--body-gradient-from) 0%, var(--body-gradient-to) 100%);
  background-size: auto, 38px 38px, 38px 38px, auto, auto;
  background-attachment: fixed;
}

/* Film grain + scanlines over page chrome (kept below maps, modals, and tooltips) */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.045;
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0 1px, transparent 1px 3px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: auto, 160px 160px;
}

::selection {
  background: color-mix(in srgb, var(--accent) 32%, transparent);
  color: var(--text);
}

a {
  transition: color 0.14s ease;
  text-underline-offset: 3px;
}
a:hover { color: color-mix(in srgb, var(--accent) 72%, #fff); }

h1 {
  font-family: var(--brand);
  letter-spacing: 0.05em;
}

input, textarea, select { caret-color: var(--accent); }

input[type='checkbox'],
input[type='radio'],
input[type='range'],
progress {
  accent-color: var(--accent);
}

/* View switch — quick HUD fade (opacity only: safe for fixed children) */
.app-view:not([hidden]) {
  animation: hud-view-in 0.22s ease-out;
}

@keyframes hud-view-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── 3. Topbar — command bar ── */
.topbar {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

/* animated scan sweep along the bottom edge */
.topbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  opacity: 0.55;
  background-image: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--accent) 85%, #fff) 50%,
    transparent
  );
  background-size: 34% 100%;
  background-repeat: no-repeat;
  animation: hud-scan 8s ease-in-out infinite;
}

@keyframes hud-scan {
  0%, 100% { background-position: -30% 0; }
  50% { background-position: 130% 0; }
}

.topbar-brand-mark {
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 74%, #000));
  color: #14120a;
  border: none;
  border-radius: 0;
  clip-path: var(--chamfer);
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.62rem;
}

.topbar-brand-title { letter-spacing: 0.1em; }

.topbar-brand-title:hover,
.topbar-brand-title:focus-visible {
  color: var(--accent);
  text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent);
}

/* Primary nav — stencil HUD tabs with a hard underline for active route */
.topbar-nav-link {
  border-radius: 2px;
  border: 1px solid transparent;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.4rem 0.55rem;
  transition: color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

.topbar-nav-link:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.topbar-nav-link.is-active {
  color: color-mix(in srgb, var(--accent) 88%, #fff);
  background:
    var(--hud-stripes),
    color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--accent);
  text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 40%, transparent);
}

.topbar-nav-link.is-disabled { opacity: 0.45; }

.topbar-nav-link--discord:hover {
  color: #dee0fe;
  background: rgba(88, 101, 242, 0.14);
  box-shadow: none;
}

/* Tighten the nav before it can collide with the brand (the old design
   already overlapped at ~1280px — this makes mid widths cleaner) */
@media (max-width: 1500px) {
  .topbar-nav-link {
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    padding: 0.38rem 0.42rem;
  }
}

@media (max-width: 1350px) {
  .topbar-brand-mark { display: none; }
}

/* Sub-navigation strip — distinct command bar */
.topbar-subnav {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.22));
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── 4. Tabs — chamfered plates instead of pills ── */
.hq-tab {
  border-radius: 0;
  clip-path: var(--chamfer);
  font-family: var(--brand);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.48rem 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  transition: color 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
}

.hq-tab:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, rgba(0, 0, 0, 0.25));
}

.hq-tab.active {
  background:
    var(--hud-stripes),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 26%, transparent),
      color-mix(in srgb, var(--accent) 12%, transparent)
    );
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: color-mix(in srgb, var(--accent) 85%, #fff);
  text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 40%, transparent);
}

/* ── 5. Panels — hard plates (backgrounds untouched so special panels
       like promo heroes keep their own art) ── */
.panel {
  border-color: color-mix(in srgb, var(--accent) 7%, var(--border));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 6px 20px rgba(0, 0, 0, 0.28);
}

.panel h2 {
  font-family: var(--brand);
  font-weight: 700;
  letter-spacing: 0.11em;
  border-left: 3px solid var(--accent);
  padding-left: 0.55rem;
  line-height: 1.25;
}

.panel th {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

/* HUD corner brackets — curated surfaces only (never generic .panel,
   whose background other rules own). Drawn as background layers, so no
   pseudo-elements or overflow are touched. */
.hq-home-card,
.sidebar-section,
.auth-modal-panel {
  background-image:
    linear-gradient(var(--hud-bracket), var(--hud-bracket)),
    linear-gradient(var(--hud-bracket), var(--hud-bracket)),
    linear-gradient(var(--hud-bracket), var(--hud-bracket)),
    linear-gradient(var(--hud-bracket), var(--hud-bracket)),
    linear-gradient(var(--hud-bracket), var(--hud-bracket)),
    linear-gradient(var(--hud-bracket), var(--hud-bracket)),
    linear-gradient(var(--hud-bracket), var(--hud-bracket)),
    linear-gradient(var(--hud-bracket), var(--hud-bracket));
  background-position:
    left top, left top,
    right top, right top,
    left bottom, left bottom,
    right bottom, right bottom;
  background-size:
    16px 1px, 1px 16px,
    16px 1px, 1px 16px,
    16px 1px, 1px 16px,
    16px 1px, 1px 16px;
  background-repeat: no-repeat;
  border-radius: 2px;
}

/* Dashboard cards — bracket flash + lift on hover */
.hq-home-card {
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.hq-home-card:hover {
  --hud-bracket: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 30px rgba(0, 0, 0, 0.4),
    0 0 22px color-mix(in srgb, var(--accent) 14%, transparent);
}

.hq-home-card h2 {
  font-family: var(--brand);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-left: none;
  padding-left: 0;
}

.hq-home-card-tag {
  font-family: var(--mono);
  color: color-mix(in srgb, var(--accent) 72%, var(--text-muted));
  letter-spacing: 0.1em;
}

.hq-home-promo-tag {
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── 6. Buttons — chamfered field controls ── */
.btn {
  border-radius: 2px;
  transition: color 0.14s ease, background-color 0.14s ease,
    border-color 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease,
    transform 0.08s ease;
}

.btn:not(.btn-icon) { clip-path: var(--chamfer); }

.btn-sm:not(.btn-icon) { clip-path: var(--chamfer-sm); }

.btn:active:not(:disabled) { transform: translateY(1px); }

/* Primary actions — EFT-style filled tan plate, striped, dark text.
   Exclusion list mirrors site-themes.css so premium themes still win. */
.btn:not(.btn-secondary):not(.btn-ghost):not(.btn-icon):not(.btn-danger):not(.btn-link):not(.btn-discord):not(.tr-slots-bet-btn):not(.tr-slots-speed-btn):not(.profile-theme-action):not(.forge-change-gun-btn) {
  background:
    var(--hud-stripes),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 96%, #fff),
      color-mix(in srgb, var(--accent) 72%, #000)
    );
  color: #14120a;
  border-color: color-mix(in srgb, var(--accent) 65%, #000);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn:not(.btn-secondary):not(.btn-ghost):not(.btn-icon):not(.btn-danger):not(.btn-link):not(.btn-discord):not(.tr-slots-bet-btn):not(.tr-slots-speed-btn):not(.profile-theme-action):not(.forge-change-gun-btn):hover {
  filter: brightness(1.1);
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 30%, transparent);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.28);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, rgba(0, 0, 0, 0.28));
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); }

/* ── 7. Inputs & selects — terminal fields ── */
.search-wrap input,
.topbar-select,
.hq-search-field input,
.hq-toolbar input,
.hq-toolbar select {
  border-radius: 2px;
  background-color: rgba(0, 0, 0, 0.32);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.search-wrap input:focus,
.topbar-select:focus,
.hq-search-field input:focus,
.hq-toolbar input:focus,
.hq-toolbar select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.25),
    0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
}

.search-wrap input::placeholder {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

/* ── 8. Segmented controls ── */
.game-mode-switch,
.briefcase-toggle {
  border-radius: 0;
  clip-path: var(--chamfer);
}

.game-mode-switch {
  border-color: color-mix(in srgb, var(--accent) 18%, var(--border));
  background: rgba(0, 0, 0, 0.32);
}

.game-mode-switch__btn { font-weight: 700; }

/* ── 9. Progress — striped ammo-belt fill ── */
.progress-fill {
  background-image:
    var(--hud-stripes),
    linear-gradient(90deg, var(--accent-dim), var(--accent));
  background-size: 28px 100%, auto;
  animation: hud-belt 1.4s linear infinite;
}

@keyframes hud-belt {
  from { background-position: 0 0, 0 0; }
  to { background-position: 28px 0, 0 0; }
}

/* ── 10. Sidebar / step navigation ── */
.sidebar-section-toggle:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.sidebar-section-static-head .sidebar-section-title {
  font-family: var(--brand);
  letter-spacing: 0.11em;
}

.step-nav a { border-radius: 2px; }

.step-nav a:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.step-nav a.active {
  background: color-mix(in srgb, var(--accent) 9%, var(--bg-card));
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  box-shadow: inset 2px 0 0 var(--accent);
}

/* ── 10b. Item checklist (story sidebar + kappa hand-ins) — supply manifest ── */
.item-checklist li {
  display: grid;
  grid-template-columns: auto minmax(2.4rem, auto) 1fr;
  align-items: start;
  column-gap: 0.5rem;
  padding: 0.42rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  transition: background-color 0.12s ease;
}

/* empty state ("No quest items…") — single cell, plain flow */
.item-checklist li.panel-note {
  display: block;
}

/* name cell — hard left alignment, wraps like prose */
.item-checklist li > span:last-child {
  min-width: 0;
  text-align: left;
  line-height: 1.45;
}

/* the item-tooltip trigger is a <button> — browsers force inline-block on
   buttons and default them to centered text, which made wrapped names look
   scattered. Left-align and let it wrap tight to its content. */
.item-checklist li > span:last-child button {
  text-align: left;
  white-space: normal;
  max-width: 100%;
}

/* curated note — quiet second line under the item name */
.item-checklist .req-item-note {
  margin-top: 0.12rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.item-checklist li:hover {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

/* chamfered field checkbox */
.item-checklist input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  margin: 0.12rem 0 0;
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  background-color: rgba(0, 0, 0, 0.35);
  background-position: center;
  background-repeat: no-repeat;
  clip-path: polygon(
    0.22rem 0, 100% 0, 100% calc(100% - 0.22rem),
    calc(100% - 0.22rem) 100%, 0 100%, 0 0.22rem
  );
  transition: border-color 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
}

.item-checklist input[type='checkbox']:hover {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent);
}

.item-checklist input[type='checkbox']:checked {
  background-color: var(--accent);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2314120a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M3.2 8.6l3.2 3.2 6.4-7.6'/%3E%3C/svg%3E"),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 96%, #fff), color-mix(in srgb, var(--accent) 74%, #000));
  background-size: 0.78rem, auto;
  border-color: color-mix(in srgb, var(--accent) 70%, #000);
}

.item-checklist input[type='checkbox']:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
}

/* quantity — ammo-count plate (never wraps, sits in its own column) */
.item-checklist .qty {
  flex-shrink: 0;
  justify-self: stretch;
  white-space: nowrap;
  min-width: 2.2rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  padding: 0.04rem 0.3rem;
  color: color-mix(in srgb, var(--accent) 85%, #fff);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  clip-path: polygon(
    0.28rem 0, 100% 0, 100% calc(100% - 0.28rem),
    calc(100% - 0.28rem) 100%, 0 100%, 0 0.28rem
  );
}

/* gathered — dim the row, strike the name, mute the plate */
.item-checklist li:has(input:checked) {
  background: rgba(0, 0, 0, 0.18);
}

.item-checklist li:has(input:checked) > span:last-child {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--text-muted);
}

/* line-through doesn't propagate into the inline-block tooltip button, so
   strike the item name explicitly — otherwise checked rows looked half-done */
.item-checklist li:has(input:checked) > span:last-child button {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--text-muted);
  border-bottom-color: transparent;
}

.item-checklist li:has(input:checked) .qty {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

/* FiR — find-in-raid tag chip (story + key items list) */
.item-checklist .fir,
.req-item-list .fir {
  display: inline-block;
  vertical-align: baseline;
  margin-top: 0.08rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 32%, transparent);
  border-radius: 2px;
  padding: 0 0.28rem 0.02rem;
}

/* key items list — matching hover rows */
.req-item-list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.45rem 0.45rem;
  border-radius: 2px;
  transition: background-color 0.12s ease;
}

.req-item-list li:hover {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

/* ── 11. Modals — briefing panel ── */
.auth-modal-panel {
  background-color: var(--bg-elevated);
  border-top: 2px solid var(--accent);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.65),
    0 0 40px color-mix(in srgb, var(--accent) 10%, transparent);
}

.auth-modal-panel h2 {
  font-family: var(--brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-modal {
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 4px),
    rgba(0, 0, 0, 0.82);
}

/* ── 12. Focus visibility — hard accent ring (box-shadow survives
       chamfer clipping where outlines would be cut) ── */
.topbar-nav-link:focus-visible,
.hq-tab:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--accent) 80%, transparent),
    0 0 12px color-mix(in srgb, var(--accent) 30%, transparent);
}

/* ── 13. Interactive maps — always-black backdrop behind tiles ── */
.maplibregl-map,
.maplibregl-canvas,
.maplibregl-canvas-container {
  background: #000 !important;
}

/* Raster tiles — sit above film grain so static/noise does not show on the canvas */
body.route-maps .hq-maps-main,
body.raid-mode-maps-embedded #raid-map-slot .hq-maps-main,
#view-story:not([hidden]) .story-terminal-guide-map-viewport {
  position: relative;
  z-index: 101;
}

/* ── 14. Tarkov time — horizontal 24h day/night strip ──
   Two in-game clocks run 12h apart: sun and moon markers ride a slim
   sky-gradient timeline with the digital readouts on either side. */
.hq-tt-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.hq-tt-strip-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hq-tt-strip {
  --day-pos: 0%;
  --night-pos: 50%;
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 0.3rem; /* room for marker glow */
}

.hq-tt-strip-track {
  position: relative;
  height: 1.35rem;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  /* 24h sky: night → dawn 05:00 → daylight 05:45 → dusk 21:30 → night 21:50 */
  background: linear-gradient(
    90deg,
    #2c3e6b 0%,
    #34497e 17%,
    #d98a3f 20.83%,
    #e0a44c 23.96%,
    #e5bd58 26%,
    #e5bd58 87%,
    #b07a4e 89.58%,
    #8f5fb5 90.97%,
    #34497e 94%,
    #2c3e6b 100%
  );
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* hour gridlines every 6h */
.hq-tt-strip-track::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(25% - 1px),
    rgba(0, 0, 0, 0.35) calc(25% - 1px),
    rgba(0, 0, 0, 0.35) 25%
  );
  pointer-events: none;
}

.hq-tt-strip-marker {
  position: absolute;
  top: 50%;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 0, 0, 0.55);
}

/* marker position = which clock it tracks; look = that clock's current phase */
.hq-tt-strip-marker--day { left: var(--day-pos); }
.hq-tt-strip-marker--night { left: var(--night-pos); }

.hq-tt-strip-marker[data-icon='sun'] {
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #f0c85a 55%, #c99a30);
  box-shadow: 0 0 9px rgba(240, 200, 90, 0.85), 0 0 2px rgba(0, 0, 0, 0.6);
}

.hq-tt-strip-marker[data-icon='moon'] {
  background: radial-gradient(circle at 35% 30%, #e8eefc, #bfcdec 55%, #8fa3cf);
  box-shadow: 0 0 9px rgba(150, 175, 235, 0.8), 0 0 2px rgba(0, 0, 0, 0.6);
}

.hq-tt-strip-ruler {
  display: flex;
  justify-content: space-between;
  margin-top: 0.22rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  opacity: 0.8;
  line-height: 1;
}

.hq-tt-readout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .hq-tt-strip-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.5rem;
  }
  .hq-tt-strip {
    order: 3;
    flex-basis: 100%;
  }
}

.hq-tt-readout-row {
  display: inline-flex;
  align-items: baseline;
  gap: 0.32rem;
}

.hq-tt-readout-icon { font-size: 0.72rem; line-height: 1; }
.hq-tt-readout-icon[data-icon='sun'] { color: #f0c85a; }
.hq-tt-readout-icon[data-icon='moon'] { color: #bfcdec; }

.hq-tt-readout-time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: 0.03em;
}

/* phase chips — colored to match the ring arcs */
.hq-tt-phase {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1;
  padding: 0.16rem 0.4rem 0.18rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
}

.hq-tt-phase[data-phase='Daylight'] {
  color: #efd083;
  border-color: rgba(229, 189, 88, 0.45);
  background: rgba(229, 189, 88, 0.12);
}

.hq-tt-phase[data-phase='Night'] {
  color: #a9bdf0;
  border-color: rgba(90, 120, 200, 0.5);
  background: rgba(60, 85, 160, 0.2);
}

.hq-tt-phase[data-phase='Dawn'] {
  color: #edaa66;
  border-color: rgba(217, 138, 63, 0.5);
  background: rgba(217, 138, 63, 0.14);
}

.hq-tt-phase[data-phase='Dusk'] {
  color: #c39ae0;
  border-color: rgba(143, 95, 181, 0.5);
  background: rgba(143, 95, 181, 0.16);
}

/* status chips under the strip — align with the field-terminal chip look */
.hq-tarkov-time-flag {
  font-family: var(--mono);
  border-radius: 2px;
}

/* ── 15. Seasonal — season window, rules, rewards ── */
.hq-seasonal-window {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.35rem 0 0.5rem;
}

.hq-seasonal-window-range {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.hq-seasonal-window-state {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.16rem 0.45rem 0.18rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
}

.hq-seasonal-window-state.is-live {
  color: color-mix(in srgb, var(--success) 85%, #fff);
  border-color: color-mix(in srgb, var(--success) 50%, transparent);
  background: color-mix(in srgb, var(--success) 14%, transparent);
}

.hq-seasonal-window-state.is-ended {
  color: color-mix(in srgb, var(--danger) 85%, #fff);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.hq-seasonal-window-state.is-upcoming {
  color: color-mix(in srgb, var(--accent) 88%, #fff);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.hq-seasonal-rules-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.4rem 1rem;
}

.hq-seasonal-rules-list li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.1rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hq-seasonal-rules-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: 0.3rem;
  color: var(--accent);
  font-size: 0.8rem;
}

.hq-seasonal-mod-note {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
  padding-left: 0.55rem;
  border-left: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.hq-seasonal-rewards-scroll {
  overflow-x: auto;
}

.hq-seasonal-rewards-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.hq-seasonal-rewards-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.hq-seasonal-rewards-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: top;
}

.hq-seasonal-rewards-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.hq-seasonal-reward-name {
  color: var(--text);
  font-weight: 600;
  min-width: 14rem;
}

.hq-seasonal-reward-quest {
  color: color-mix(in srgb, var(--accent) 82%, #fff);
  white-space: nowrap;
}

.hq-seasonal-reward-lvl {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── 16. Group (shared) task progression — 1.1.0.0 ── */
.tag-group {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 2px;
}

.tag-group--full,
.tag-group--partial {
  color: #8fd4b0;
  border: 1px solid rgba(90, 190, 140, 0.45);
  background: rgba(60, 160, 110, 0.16);
}

.tag-group--partial {
  color: #cfd49a;
  border-color: rgba(190, 190, 110, 0.4);
  background: rgba(150, 150, 70, 0.14);
}

.tag-group--solo {
  color: #e8a878;
  border: 1px solid rgba(212, 132, 74, 0.45);
  background: rgba(212, 132, 74, 0.14);
}

/* per-objective "Squad" marker */
.sq-obj-shared {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.06rem 0.34rem 0.08rem;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
  color: #8fd4b0;
  border: 1px solid rgba(90, 190, 140, 0.4);
  background: rgba(60, 160, 110, 0.14);
  cursor: help;
}

/* ── 17. Three-mode switch (PvP / PvE / Seasonal) ── */
.game-mode-switch__btn[data-game-mode='seasonal'] {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.game-mode-switch__btn.is-active[data-game-mode='seasonal'] {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  color: color-mix(in srgb, var(--accent) 90%, #fff);
}

/* seasonal mode running: tint the whole switch so it is unmistakable */
html[data-game-mode='seasonal'] .game-mode-switch {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 18%, transparent);
}

@media (max-width: 1500px) {
  .game-mode-switch__btn {
    padding: 0.35rem 0.5rem;
  }
}

/* seasonal economy notice, e.g. on crafts/hideout costs */
.hq-seasonal-econ-note {
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.7rem;
  border-radius: 2px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.hq-seasonal-econ-note strong {
  color: color-mix(in srgb, var(--accent) 85%, #fff);
  font-weight: 700;
}

.hq-seasonal-econ-note ul {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
}

/* ── 18. Motion safety ── */
@media (prefers-reduced-motion: reduce) {
  .topbar::after { animation: none; opacity: 0.25; }
  .progress-fill { animation: none; }
  .app-view:not([hidden]) { animation: none; }
  .hq-home-card,
  .hq-home-card:hover { transform: none; }
}

/* ── 19. Kord Breach — Overview + Battle Pass ── */
.hq-seasonal-questline {
  margin: 0 0 1rem;
  padding: 0.6rem 0.8rem;
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text);
}

.hq-seasonal-questline strong {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 85%, #fff);
  margin-bottom: 0.15rem;
}

/* --- Battle Pass: progress summary --- */
.hq-bp-summary {
  padding: 0.9rem 1rem 1rem;
}

.hq-bp-progress-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.55rem;
}

.hq-bp-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hq-bp-progress-value {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: color-mix(in srgb, var(--accent) 88%, #fff);
}

.hq-bp-progress-value span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hq-bp-verdict {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem 0.22rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
}

.hq-bp-verdict.is-ok,
.hq-bp-verdict.is-done {
  color: #8fd4b0;
  border-color: rgba(90, 190, 140, 0.45);
  background: rgba(60, 160, 110, 0.15);
}

.hq-bp-verdict.is-tight {
  color: #e8a878;
  border-color: rgba(212, 132, 74, 0.45);
  background: rgba(212, 132, 74, 0.14);
}

.hq-bp-bar {
  height: 0.6rem;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.hq-bp-bar-fill {
  display: block;
  height: 100%;
  background-image:
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.16) 0 5px, transparent 5px 10px),
    linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 0.3s ease;
}

.hq-bp-progress-note {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hq-bp-progress-note strong {
  color: var(--text);
}

/* --- daily caps --- */
.hq-bp-limits {
  margin-top: 0.9rem;
}

.hq-bp-limits-title {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.hq-bp-limits-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.45rem;
}

.hq-bp-limit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.45rem 0.4rem 0.5rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.hq-bp-limit.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.hq-bp-limit-n {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.hq-bp-limit.is-active .hq-bp-limit-n {
  color: color-mix(in srgb, var(--accent) 88%, #fff);
}

.hq-bp-limit-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hq-bp-limit-tag {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 85%, #fff);
}

.hq-bp-limits-note {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
}

/* --- sections --- */
.hq-bp-section {
  margin-top: 1.4rem;
}

.hq-bp-section-head {
  margin-bottom: 0.7rem;
}

.hq-bp-section-head h2 {
  margin: 0 0 0.2rem;
  font-family: var(--brand);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hq-bp-count {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: 0.3rem;
}

/* --- documentation types --- */
.hq-bp-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.55rem;
}

.hq-bp-doc {
  padding: 0.6rem 0.7rem 0.7rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.hq-bp-doc h3 {
  margin: 0 0 0.4rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--accent) 80%, #fff);
  line-height: 1.3;
}

.hq-bp-doc-maps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.hq-bp-map {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem 0.12rem;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
  white-space: nowrap;
}

.hq-bp-doc-extras {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.3rem;
}

.hq-bp-doc-extras p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hq-bp-doc-extras strong {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 80%, #fff);
  margin-right: 0.35rem;
}

/* --- reward track --- */
.hq-bp-track {
  display: grid;
  gap: 0.7rem;
}

.hq-bp-page {
  border: 1px solid var(--border);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.hq-bp-page.is-complete {
  border-color: rgba(90, 190, 140, 0.35);
  background: rgba(60, 160, 110, 0.06);
}

.hq-bp-page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
}

.hq-bp-page-no {
  font-family: var(--brand);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 82%, #fff);
}

.hq-bp-page-cost {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-muted);
}

.hq-bp-page-rewards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.4rem;
  padding: 0.5rem;
}

.hq-bp-reward {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
  padding: 0.5rem 0.55rem 0.55rem 1.9rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  transition: border-color 0.14s ease, background-color 0.14s ease, transform 0.1s ease;
}

.hq-bp-reward:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(-1px);
}

.hq-bp-reward-lvl {
  position: absolute;
  left: 0.45rem;
  top: 0.5rem;
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
}

.hq-bp-reward.is-claimed {
  border-color: rgba(90, 190, 140, 0.45);
  background: rgba(60, 160, 110, 0.1);
}

.hq-bp-reward.is-claimed .hq-bp-reward-lvl {
  color: #14120a;
  background: #8fd4b0;
  border-color: transparent;
}

.hq-bp-reward-name {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
}

.hq-bp-reward-type,
.hq-bp-reward-cost {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.hq-bp-reward-cost {
  color: color-mix(in srgb, var(--accent) 75%, var(--text-muted));
}

/* reward-type accent on the level chip */
.hq-bp-reward--trade .hq-bp-reward-lvl { box-shadow: inset 0 -2px 0 #6fa8dc; }
.hq-bp-reward--cosmetic .hq-bp-reward-lvl { box-shadow: inset 0 -2px 0 #c39ae0; }
.hq-bp-reward--decor .hq-bp-reward-lvl { box-shadow: inset 0 -2px 0 #8fbf88; }
.hq-bp-reward--currency .hq-bp-reward-lvl { box-shadow: inset 0 -2px 0 #e5bd58; }
.hq-bp-reward--crate .hq-bp-reward-lvl { box-shadow: inset 0 -2px 0 #d98a3f; }
.hq-bp-reward--weapon .hq-bp-reward-lvl { box-shadow: inset 0 -2px 0 #c95545; }

.hq-bp-actions {
  margin-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .hq-bp-reward:hover { transform: none; }
  .hq-bp-bar-fill { transition: none; }
}

/* Battle Pass reward icons */
.hq-bp-reward {
  padding-left: 3.5rem;
  min-height: 4.4rem;
}

.hq-bp-reward-icon {
  position: absolute;
  left: 1.75rem;
  top: 0.5rem;
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
