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

:root {
  --bg-dark: #0a0a0c;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a26;
  --red-primary: #c41e1e;
  --red-glow: #ff2020;
  --red-dark: #8b0000;
  --red-muted: rgba(196, 30, 30, 0.15);
  --text-primary: #e8e8ec;
  --text-secondary: #9898a8;
  --text-muted: #686878;
  --border: rgba(196, 30, 30, 0.25);
  --border-glow: rgba(255, 32, 32, 0.4);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --discord: #5865f2;
  --facebook: #1877f2;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(196, 30, 30, 0.14), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(139, 0, 0, 0.1), transparent),
    radial-gradient(ellipse 40% 30% at 10% 60%, rgba(196, 30, 30, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
  animation: glow-drift 12s ease-in-out infinite alternate;
}

@keyframes glow-drift {
  0% { opacity: 0.85; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(196, 30, 30, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 30, 30, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  animation: grid-scroll 20s linear infinite;
}

@keyframes grid-scroll {
  0% { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  opacity: 0.4;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }

/* Hero entrance animations */
.hero-content .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-content .hero-reveal-logo {
  transform: translateY(40px) scale(0.82);
  filter: blur(6px);
}

.hero-content .reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.hero-content .hero-reveal-logo.visible {
  transform: translateY(0) scale(1);
}

.hero-content .reveal[data-delay="1"] { transition-delay: 0.15s; }
.hero-content .reveal[data-delay="2"] { transition-delay: 0.3s; }
.hero-content .reveal[data-delay="3"] { transition-delay: 0.45s; }
.hero-content .reveal[data-delay="4"] { transition-delay: 0.6s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1); }
}

.hero-content .hero-reveal-logo.visible {
  animation: float 6s ease-in-out 0.9s infinite;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .bg-glow,
  .bg-grid,
  .hero-logo-ring,
  .hero-logo-ring-outer,
  .scanline,
  .hero-scroll-hint .scroll-line,
  .connect-card::after,
  .hero-video-wrap {
    animation: none !important;
    display: none;
  }

  .hero-video-grain {
    animation: none !important;
    display: none;
  }

  .hero-overlay {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.header.scrolled {
  background: rgba(10, 10, 12, 0.95);
  border-bottom-color: var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}

.nav-logo:hover {
  opacity: 0.85;
}

.nav-logo img {
  border-radius: 50%;
  border: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.nav-logo:hover img {
  box-shadow: 0 0 15px rgba(196, 30, 30, 0.4);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--red-glow);
  transition: width 0.3s;
  box-shadow: 0 0 6px var(--red-glow);
}

.nav-links a:hover {
  color: var(--red-glow);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-block;
  padding-bottom: 0.85rem;
  margin-bottom: -0.85rem;
}

.nav-dropdown-trigger::after {
  content: '▾';
  margin-left: 0.35em;
  font-size: 0.7em;
  opacity: 0.75;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 200;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.65rem 1.1rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.nav-dropdown-menu a::after {
  display: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  color: var(--red-glow);
  background: rgba(196, 30, 30, 0.08);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown.open .nav-dropdown-trigger {
  color: var(--red-glow);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s;
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--red-glow);
}

.lang-divider {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.nav-toggle,
.nav-backdrop {
  display: none;
}

.nav-drawer {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex: 1;
  justify-content: flex-end;
}

.nav-toggle {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: rgba(196, 30, 30, 0.45);
  background: rgba(196, 30, 30, 0.08);
  outline: none;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    url('https://img.youtube.com/vi/0bjTrPutt4k/maxresdefault.jpg') center / cover no-repeat,
    #0a0a0c;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border: 0;
  opacity: 1;
  filter: url(#video-grade) contrast(1.06) saturate(1.12) brightness(0.93);
  -webkit-filter: url(#video-grade) contrast(1.06) saturate(1.12) brightness(0.93);
  backface-visibility: hidden;
}

.hero-video-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(160deg, rgba(120, 10, 10, 0.18) 0%, transparent 45%),
    linear-gradient(to bottom, rgba(10, 10, 12, 0.15) 0%, transparent 50%, rgba(10, 10, 12, 0.35) 100%);
  mix-blend-mode: multiply;
}

.hero-video-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  animation: grain-shift 8s steps(6) infinite;
}

@keyframes grain-shift {
  0% { background-position: 0 0; }
  20% { background-position: -5% -8%; }
  40% { background-position: 6% 4%; }
  60% { background-position: -3% 6%; }
  80% { background-position: 8% -5%; }
  100% { background-position: 0 0; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  background:
    radial-gradient(ellipse 55% 50% at 50% 38%, rgba(10, 10, 12, 0.72) 0%, rgba(10, 10, 12, 0.25) 55%, transparent 75%),
    linear-gradient(to bottom, rgba(10, 10, 12, 0.35) 0%, transparent 40%, transparent 70%, rgba(10, 10, 12, 0.8) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 2.5rem 2rem;
}

.hero-logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.hero-logo-backdrop {
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 10, 12, 0.92) 0%, rgba(10, 10, 12, 0.55) 55%, transparent 72%);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.85);
  z-index: 0;
}

.hero-logo-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid var(--red-glow);
  box-shadow:
    0 0 40px rgba(255, 32, 32, 0.55),
    0 0 80px rgba(196, 30, 30, 0.25),
    inset 0 0 30px rgba(196, 30, 30, 0.15);
  animation: pulse-ring 3s ease-in-out infinite;
  z-index: 2;
}

.hero-logo-ring-outer {
  inset: -28px;
  border-width: 1px;
  border-color: rgba(255, 32, 32, 0.45);
  animation: spin-slow 20s linear infinite;
  box-shadow: 0 0 30px rgba(196, 30, 30, 0.2);
  z-index: 1;
}

.hero-logo {
  border-radius: 50%;
  display: block;
  position: relative;
  z-index: 3;
  border: 3px solid rgba(255, 32, 32, 0.65);
  box-shadow:
    0 0 0 5px rgba(10, 10, 12, 0.85),
    0 0 50px rgba(255, 32, 32, 0.45),
    0 12px 40px rgba(0, 0, 0, 0.9);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  background: linear-gradient(180deg, #fff 0%, #d0d0d8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 24px rgba(0, 0, 0, 0.6));
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 600;
  color: var(--red-glow);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 32, 32, 0.5);
}

.hero-sub {
  font-size: 1.2rem;
  color: #e8e8ec;
  margin-bottom: 2.5rem;
  font-weight: 500;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.hero-scroll {
  animation: pulse-btn 2.5s ease-in-out infinite;
}

@keyframes pulse-btn {
  0%, 100% { box-shadow: 0 0 20px rgba(196, 30, 30, 0.3); }
  50% { box-shadow: 0 0 35px rgba(255, 32, 32, 0.55); }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--red-primary), transparent);
  animation: scroll-hint 2s ease-in-out infinite;
}

@keyframes scroll-hint {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.25s;
  cursor: pointer;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

.btn-primary {
  background: var(--red-primary);
  color: #fff;
  border: 1px solid var(--red-glow);
  box-shadow: 0 0 20px rgba(196, 30, 30, 0.3);
}

.btn-primary:hover {
  background: var(--red-glow);
  box-shadow: 0 0 30px rgba(255, 32, 32, 0.5);
  transform: translateY(-2px);
}

/* Stats bar */
.stats-bar {
  position: relative;
  z-index: 1;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(18, 18, 26, 0.6);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat {
  padding: 1rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--red-glow);
  text-shadow: 0 0 20px rgba(255, 32, 32, 0.3);
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--red-primary);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.stats-source {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.stats-source a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}

.stats-source a:hover {
  color: var(--red-glow);
}

.stats-bar.is-live .stat-value {
  font-variant-numeric: tabular-nums;
}

.stats-bar.is-live .stat-value-decimal {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.stats-bar.is-live .stat-value-decimal + .stat-suffix {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
}

.section-alt {
  background: rgba(18, 18, 26, 0.5);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--red-primary);
  margin: 1rem auto 0;
  box-shadow: 0 0 10px var(--red-glow);
}

.section-lead {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

/* About cards */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red-primary), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(196, 30, 30, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card:hover::before,
.card:hover::after {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  color: var(--red-primary);
  margin-bottom: 1.25rem;
  transition: transform 0.3s, color 0.3s;
}

.card:hover .card-icon {
  transform: scale(1.1);
  color: var(--red-glow);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  flex: 1;
}

/* Operations */
.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.ops-item {
  padding: 1.75rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.35s;
  position: relative;
  overflow: hidden;
}

.ops-item:hover {
  border-color: var(--border-glow);
  transform: translateX(4px);
  background: var(--bg-card-hover);
}

.ops-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: rgba(196, 30, 30, 0.2);
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.ops-item:hover .ops-num {
  color: rgba(255, 32, 32, 0.5);
}

.ops-item h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.ops-item p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* Motto banner */
.motto-banner {
  position: relative;
  z-index: 1;
  padding: 4rem 0;
  background:
    linear-gradient(135deg, rgba(139, 0, 0, 0.15), rgba(10, 10, 12, 0.9)),
    var(--bg-dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.motto-banner blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  max-width: 800px;
  margin: 0 auto;
  font-style: italic;
  text-shadow: 0 0 30px rgba(196, 30, 30, 0.2);
}

/* Warzone life */
.warzone-timeline {
  list-style: none;
  max-width: 820px;
  margin: 0 auto 2rem;
  padding: 0;
  display: grid;
  gap: 0;
}

.warzone-step {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.25rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.warzone-step:last-child {
  border-bottom: none;
}

.warzone-mark {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--red-glow);
  padding-top: 0.2rem;
}

.warzone-step h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.warzone-step p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 0;
}

.warzone-aside {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-left: 2px solid var(--red-primary);
  background: rgba(196, 30, 30, 0.06);
}

.warzone-aside p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.warzone-aside a {
  color: var(--red-glow);
  text-decoration: none;
  font-weight: 600;
}

.warzone-aside a:hover {
  text-decoration: underline;
}

/* Culture fit */
.culture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.culture-col {
  padding: 1.75rem 1.5rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
}

.culture-col h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.culture-yes h3 {
  color: #6ecf6e;
}

.culture-no h3 {
  color: var(--red-glow);
}

.culture-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.culture-col li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.5rem;
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.45;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.culture-col li:last-child {
  border-bottom: none;
}

.culture-yes li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: #6ecf6e;
  font-weight: 700;
}

.culture-no li::before {
  content: '−';
  position: absolute;
  left: 0;
  color: var(--red-glow);
  font-weight: 700;
}

/* Field kit */
.fieldkit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

.fieldkit-link {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.5rem 1.35rem;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}

.fieldkit-link:hover {
  border-color: rgba(196, 30, 30, 0.45);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.fieldkit-kicker {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-glow);
}

.fieldkit-link h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
}

.fieldkit-link p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.5;
  margin: 0 0 0.35rem;
  flex: 1;
}

.fieldkit-cta {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-primary);
}

.fieldkit-link:hover .fieldkit-cta {
  color: var(--red-glow);
}

/* Requirements */
.req-panel {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
}

.req-core {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.req-stat {
  padding: 2.5rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.req-stat:first-child {
  border-right: 1px solid var(--border);
}

.req-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--red-glow);
  line-height: 1;
  text-shadow: 0 0 24px rgba(255, 32, 32, 0.35);
}

.req-stat-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0.75rem 0 1rem;
}

.req-stat-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 36ch;
  margin: 0 auto;
}

.req-checklist-block {
  padding: 2rem 2.25rem 2.25rem;
}

.req-checklist-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

.req-checklist {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.req-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(196, 30, 30, 0.12);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  min-height: 100%;
}

.req-checklist li::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.1em;
  background: rgba(196, 30, 30, 0.2);
  border: 1px solid rgba(196, 30, 30, 0.45);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  box-shadow: 0 0 10px rgba(196, 30, 30, 0.25);
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

.step {
  text-align: center;
  padding: 2rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.35s;
  position: relative;
}

.step:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
}

.step-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--red-glow);
  border: 2px solid var(--red-primary);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(196, 30, 30, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.step:hover .step-icon {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(255, 32, 32, 0.5);
}

.step h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Connect section */
.connect-section {
  padding-bottom: 6rem;
}

/* Tools section */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.tool-card-wide {
  margin-top: 2rem;
}

.tool-card-wide:first-of-type {
  margin-top: 2.5rem;
}

.tool-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 24px rgba(196, 30, 30, 0.08);
}

.tool-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.tool-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.tool-card-head h3 {
  margin-bottom: 0;
}

.tool-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tool-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.tool-toggle input {
  accent-color: var(--red-primary);
}

.tool-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.tool-form {
  display: flex;
  gap: 0.75rem;
}

.tool-input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tool-input:focus {
  border-color: var(--red-primary);
  box-shadow: 0 0 0 2px var(--red-muted);
}

.tool-input::placeholder {
  color: var(--text-muted);
}

.tool-refresh {
  padding: 0.35rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.tool-refresh:hover {
  color: var(--red-glow);
  border-color: var(--red-primary);
}

.tool-result {
  margin-top: 1.25rem;
}

.tool-loading,
.tool-error,
.tool-empty {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.tool-error {
  color: var(--red-glow);
}

.lp-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.lp-faction-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.lp-faction-tab {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.lp-faction-tab:hover,
.lp-faction-tab.active {
  color: var(--red-glow);
  border-color: rgba(196, 30, 30, 0.45);
  background: rgba(196, 30, 30, 0.08);
}

.tool-select-wide {
  min-width: min(100%, 320px);
}

.tool-field-faction {
  min-width: min(100%, 340px);
}

.lp-stat {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.lp-stat-hot {
  color: var(--red-glow);
  border-color: rgba(255, 32, 32, 0.35);
  background: rgba(196, 30, 30, 0.12);
}

.lp-table-wrap {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-dark);
}

.lp-table-wrap::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.lp-table-wrap::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.lp-table-head,
.lp-row {
  display: grid;
  grid-template-columns: minmax(160px, 2.2fr) repeat(5, minmax(72px, 1fr));
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
}

.lp-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #16161f;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  border-bottom: 1px solid var(--border);
}

.lp-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.lp-sort-btn:hover,
.lp-sort-btn.is-active {
  color: var(--red-glow);
}

.lp-sort-btn:focus-visible {
  outline: 1px solid rgba(196, 30, 30, 0.55);
  outline-offset: 2px;
}

.lp-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.lp-row:last-child {
  border-bottom: none;
}

.lp-row:hover {
  background: rgba(196, 30, 30, 0.05);
}

.lp-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 0;
}

.lp-rank {
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.75rem;
  padding-top: 0.15rem;
  flex-shrink: 0;
}

.lp-name {
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.lp-name-row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

.lp-name-row .lp-name {
  min-width: 0;
  flex: 1 1 auto;
}

.lp-name-row .item-copy-name {
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.lp-mats {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: #e8c547;
}

.lp-isklp {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--red-glow);
}

.lp-pos { color: #6ecf6e; }
.lp-neg { color: var(--red-glow); }

.market-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-dark);
  padding: 1.25rem;
}

.market-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.market-head img {
  border-radius: 6px;
  border: 1px solid var(--border);
}

.market-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin-bottom: 0.15rem;
}

.market-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.25;
}

.item-copy-name,
.market-copy-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid rgba(122, 158, 200, 0.38);
  background: rgba(88, 128, 176, 0.1);
  color: #9eb8d9;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.item-copy-name:hover,
.market-copy-name:hover {
  color: #c8daf0;
  border-color: rgba(152, 188, 230, 0.55);
  background: rgba(88, 128, 176, 0.18);
}

.item-copy-name.is-copied,
.market-copy-name.is-copied {
  color: #8fd4a8;
  border-color: rgba(100, 190, 130, 0.45);
  background: rgba(80, 160, 110, 0.12);
}

.linkish.is-copied {
  color: #8fd4a8;
}

.item-copy-icon,
.market-copy-icon {
  width: 0.72rem;
  height: 0.72rem;
  flex-shrink: 0;
}

.market-head h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.market-id {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.market-hubs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.market-hub {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.market-hub h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.market-hub dl {
  display: grid;
  gap: 0.4rem;
}

.market-hub dl div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.market-hub dt {
  color: var(--text-muted);
}

.market-hub dd {
  font-weight: 600;
}

.market-depth {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Tools hub + tool pages */
.page-tool .header {
  position: sticky;
  top: 0;
}

.tool-page {
  position: relative;
  z-index: 1;
  padding: 7rem 0 4rem;
  min-height: 70vh;
}

.tool-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.tool-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.tool-breadcrumb a:hover {
  color: var(--red-glow);
}

.tool-page-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.tool-page-lead {
  max-width: 720px;
  margin-bottom: 0;
}

.tool-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tool-switch {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red-primary);
  text-decoration: none;
  white-space: nowrap;
  padding-top: 0.5rem;
}

.tool-switch:hover {
  color: var(--red-glow);
}

.tools-hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 0;
}

.tools-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.tools-hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-glow);
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(255, 32, 32, 0.35);
  background: rgba(196, 30, 30, 0.12);
  margin-bottom: 1.25rem;
}

.tools-hero-lead {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

.tools-subnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.tools-subnav a {
  padding: 0.55rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.tools-subnav a:hover {
  color: var(--text-primary);
  border-color: var(--border);
}

.tools-subnav a.active {
  color: var(--red-glow);
  background: rgba(196, 30, 30, 0.1);
  border-color: rgba(196, 30, 30, 0.35);
}

.tools-hub-card-lg {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 100%;
}

.tools-hub-icon {
  width: 52px;
  height: 52px;
  color: var(--red-primary);
  flex-shrink: 0;
}

.tools-hub-icon svg {
  width: 100%;
  height: 100%;
}

.tools-hub-body {
  flex: 1;
}

.tools-hub-features {
  list-style: none;
  margin-top: 1rem;
  display: grid;
  gap: 0.4rem;
}

.tools-hub-features li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.4;
}

.tools-hub-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--red-primary);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.tools-hub-note {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tools-hub-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.tools-hub-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 28px rgba(196, 30, 30, 0.12);
  transform: translateY(-3px);
}

.tools-hub-kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-primary);
  margin-bottom: 0.75rem;
}

.tools-hub-card h2,
.tools-hub-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.tools-hub-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.tools-hub-cta {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-glow);
}

.tools-hub-more {
  margin-top: 1.5rem;
  text-align: center;
}

.tools-hub-more a {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tools-hub-more a:hover {
  color: var(--red-glow);
}

.nav-links a.active {
  color: var(--red-glow);
}

.tool-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.tool-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tool-field-grow {
  grid-column: span 2;
}

.tool-field-range input[type="range"] {
  width: 100%;
  accent-color: var(--red-primary);
}

.tool-field-label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
}

.tool-info {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tool-info-btn {
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 1px solid rgba(122, 158, 200, 0.45);
  border-radius: 50%;
  background: rgba(88, 128, 176, 0.12);
  color: #9eb8d9;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.tool-info-btn:hover,
.tool-info-btn:focus-visible {
  color: #c8daf0;
  border-color: rgba(152, 188, 230, 0.7);
  outline: none;
}

.tool-info-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  transform: translateX(-50%);
  width: min(16.5rem, 70vw);
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(122, 158, 200, 0.35);
  background: #14141e;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 40;
}

.tool-info-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(122, 158, 200, 0.35);
}

.tool-info:hover .tool-info-tip,
.tool-info:focus-within .tool-info-tip {
  opacity: 1;
  visibility: visible;
}

.tool-field em {
  font-style: normal;
  color: var(--text-secondary);
  text-transform: none;
}

.tool-select {
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.tool-toolbar-btn {
  height: 44px;
}

#lp-refresh {
  height: 32px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  align-self: end;
  margin-bottom: 1px;
}

.lp-table-page {
  max-height: none;
}

/* Sticky column headers cover expanded history range buttons while scrolling */
.lp-table-page .lp-table-head {
  position: static;
}

.lp-history-controls,
.lp-history-controls .ph-range-btn,
.lp-history-controls .tool-select {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.lp-table-head-full,
.lp-row-full {
  grid-template-columns: minmax(200px, 2.4fr) repeat(5, minmax(80px, 1fr));
}

.lp-row-details {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.lp-row-details summary {
  list-style: none;
  cursor: pointer;
}

.lp-row-details summary::-webkit-details-marker {
  display: none;
}

.lp-row-details[open] summary {
  background: rgba(196, 30, 30, 0.06);
}

.lp-row-full img {
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.lp-wallet-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: #6ecf6e;
  font-weight: 600;
}

.lp-wallet-hint.muted {
  color: var(--text-muted);
}

.lp-detail {
  padding: 1rem 1.25rem 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--border);
}

.lp-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.lp-detail h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.lp-dl {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.lp-dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.lp-dl dt {
  color: var(--text-muted);
}

.lp-mats-list {
  list-style: none;
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.lp-mats-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.lp-mat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.lp-mat-item img {
  flex-shrink: 0;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.lp-mat-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.lp-mats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.lp-mats-head h4 {
  margin: 0;
}

.lp-mats-copy {
  flex-shrink: 0;
}

.lp-mat-name-row {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.lp-mat-name {
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
}

.lp-mat-name-row .item-copy-name {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.lp-mat-name-row .item-copy-icon {
  width: 0.65rem;
  height: 0.65rem;
}

.lp-mat-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.lp-mat-cost {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.lp-breakdown-product {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.lp-breakdown-product img {
  flex-shrink: 0;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.lp-breakdown-product-info {
  min-width: 0;
  flex: 1 1 auto;
}

.lp-breakdown-qty {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.lp-breakdown-meta {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lp-mats-total,
.lp-detail-empty {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.lp-ext-links {
  margin-top: 1rem;
  font-size: 0.85rem;
}

.lp-history {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lp-history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.lp-history-head h4 {
  margin: 0;
}

.lp-history-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
}

.lp-history-hub {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lp-history-hub .tool-select {
  min-width: 7.5rem;
  height: 1.75rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.8rem;
}

.lp-history-body .ph-showing {
  margin-bottom: 0.55rem;
}

.lp-history-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.lp-price-chart {
  margin-top: 0.35rem;
}

.lp-price-chart .ph-tooltip {
  pointer-events: none;
}

.lp-ext-links a,
.linkish {
  color: var(--red-primary);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.lp-ext-links a:hover,
.linkish:hover {
  color: var(--red-glow);
  text-decoration: underline;
}

.tool-footer-actions {
  margin-top: 1rem;
  text-align: center;
}

.tool-footnote,
.tool-muted {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  padding: 0.4rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.chip:hover {
  color: var(--red-glow);
  border-color: var(--red-primary);
}

.market-side-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.25rem 0 1.5rem;
}

.market-side-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.suggest-wrap {
  position: relative;
}

.suggest-box {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 1rem;
  font: inherit;
  color: var(--text-primary);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.suggest-item:hover {
  background: rgba(196, 30, 30, 0.1);
}

.market-card-full {
  margin-top: 0.5rem;
}

.market-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.market-hub-btn {
  text-align: left;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.market-hub-btn:hover,
.market-hub-btn.active {
  border-color: var(--red-primary);
  background: rgba(196, 30, 30, 0.08);
}

.hub-name {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.hub-sell {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: #6ecf6e;
  margin-bottom: 0.25rem;
}

.hub-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.arb-card {
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(232, 197, 71, 0.35);
  border-radius: 8px;
  background: rgba(232, 197, 71, 0.06);
}

.arb-card h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: #e8c547;
}

.arb-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.market-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.market-panel {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.market-panel h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.order-book {
  display: grid;
  gap: 0.35rem;
}

.order-line {
  display: grid;
  grid-template-columns: 90px 1fr 70px;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
}

.order-bar-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.order-bar {
  display: block;
  height: 100%;
  border-radius: 3px;
}

.order-line.sell .order-bar {
  background: linear-gradient(90deg, var(--red-dark), var(--red-glow));
}

.order-line.buy .order-bar {
  background: linear-gradient(90deg, #1f5c2e, #6ecf6e);
}

.order-price {
  font-weight: 600;
}

.order-vol {
  text-align: right;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.market-fill {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.price-history {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.price-history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.price-history-head h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0;
}

.ph-view-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
}

.ph-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
}

.ph-view-switch-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.ph-view-switch:has(.ph-view-switch-input:checked) .ph-view-switch-label {
  color: var(--text-secondary);
}

.ph-view-switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ph-view-switch-track {
  position: relative;
  flex-shrink: 0;
  width: 2.35rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.ph-view-switch-thumb {
  position: absolute;
  top: 50%;
  left: 0.12rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #c8c8d0 0%, #9898a8 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  transform: translateY(-50%);
  transition:
    left 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.ph-view-switch-input:checked + .ph-view-switch-track {
  background: rgba(196, 30, 30, 0.35);
  border-color: rgba(255, 32, 32, 0.55);
  box-shadow:
    inset 0 0 12px rgba(255, 32, 32, 0.15),
    0 0 10px rgba(255, 32, 32, 0.2);
}

.ph-view-switch-input:checked + .ph-view-switch-track .ph-view-switch-thumb {
  left: calc(100% - 1.02rem);
  background: linear-gradient(180deg, #ff5050 0%, var(--red-primary) 100%);
  box-shadow:
    0 0 8px rgba(255, 32, 32, 0.55),
    0 1px 3px rgba(0, 0, 0, 0.35);
}

.ph-view-switch:hover .ph-view-switch-track {
  border-color: rgba(255, 255, 255, 0.18);
}

.ph-view-switch:hover .ph-view-switch-input:checked + .ph-view-switch-track {
  border-color: rgba(255, 32, 32, 0.75);
  box-shadow:
    inset 0 0 14px rgba(255, 32, 32, 0.2),
    0 0 14px rgba(255, 32, 32, 0.28);
}

.ph-view-switch-input:focus-visible + .ph-view-switch-track {
  outline: 2px solid var(--red-glow);
  outline-offset: 2px;
}

.ph-range-row {
  margin-bottom: 0.65rem;
}

.ph-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.ph-range-slider {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin-top: 0.55rem;
  max-width: 28rem;
}

.ph-range-slider-label {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ph-days-slider {
  flex: 1 1 10rem;
  min-width: 8rem;
  accent-color: var(--red-primary);
  cursor: pointer;
}

.ph-range-slider-value {
  min-width: 2.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.ph-range-short {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  color: #c4a35a;
}

.ph-range-btn.is-capped {
  opacity: 0.55;
}

.ph-showing.is-flash {
  animation: ph-showing-flash 0.7s ease;
}

@keyframes ph-showing-flash {
  0% {
    color: var(--red-glow);
  }
  100% {
    color: var(--text-secondary);
  }
}

.lp-history-range {
  margin-bottom: 0.75rem;
}

.ph-range-reset {
  margin-left: 0.2rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(122, 158, 200, 0.38);
  background: rgba(88, 128, 176, 0.1);
  color: #9eb8d9;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.ph-range-reset:hover {
  color: #c8daf0;
  border-color: rgba(152, 188, 230, 0.55);
  background: rgba(88, 128, 176, 0.18);
}

.ph-custom-range {
  display: none;
}

.ph-range-summary {
  padding: 0.3rem 0.65rem;
  border: 1px dashed rgba(196, 30, 30, 0.45);
  background: rgba(196, 30, 30, 0.08);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.ph-range-summary:hover {
  color: var(--red-glow);
  border-color: rgba(255, 32, 32, 0.65);
  background: rgba(196, 30, 30, 0.14);
}

body.ph-range-overlay-open {
  overflow: hidden;
}

.ph-range-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ph-range-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(4, 4, 8, 0.72);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.ph-range-popover {
  position: relative;
  z-index: 1;
  width: min(100%, 42rem);
  max-height: min(92vh, 44rem);
  overflow: auto;
  padding: 1rem 1.1rem 1.05rem;
  border: 1px solid rgba(255, 32, 32, 0.35);
  background:
    linear-gradient(180deg, rgba(22, 22, 32, 0.98) 0%, rgba(10, 10, 14, 0.98) 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(196, 30, 30, 0.12);
}

.ph-range-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.ph-range-popover-head h5 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.ph-range-close {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.ph-range-close:hover {
  color: var(--red-glow);
  border-color: rgba(196, 30, 30, 0.45);
}

.ph-range-endpoints {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.55rem;
  align-items: stretch;
  margin-bottom: 0.45rem;
}

.ph-range-endpoint {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.ph-range-endpoint-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ph-range-endpoint-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ph-range-endpoint.is-active {
  border-color: rgba(255, 32, 32, 0.65);
  background: rgba(196, 30, 30, 0.12);
  box-shadow: inset 0 0 16px rgba(255, 32, 32, 0.08);
}

.ph-range-endpoint.is-active .ph-range-endpoint-label {
  color: var(--red-glow);
}

.ph-range-endpoint-sep {
  align-self: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.ph-range-pick-hint {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ph-calendars {
  margin-bottom: 0.85rem;
}

.ph-cal-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.ph-cal-nav-title {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: center;
}

.ph-calendars-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.ph-calendar {
  min-width: 0;
}

.ph-cal-nav {
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.ph-cal-nav:hover {
  color: var(--red-glow);
  border-color: rgba(196, 30, 30, 0.45);
}

.ph-cal-weekdays,
.ph-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.12rem;
}

.ph-cal-wd {
  text-align: center;
  font-size: 0.62rem;
  color: var(--text-muted);
  padding: 0.15rem 0;
}

.ph-cal-day {
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 2px;
  padding: 0;
}

.ph-cal-day.is-empty {
  pointer-events: none;
}

.ph-cal-day:not(.is-empty):not(:disabled):hover {
  background: rgba(196, 30, 30, 0.15);
  color: var(--red-glow);
}

.ph-cal-day.is-disabled,
.ph-cal-day:disabled {
  opacity: 0.25;
  cursor: default;
}

.ph-cal-day.is-in-range {
  background: rgba(196, 30, 30, 0.16);
  color: var(--text-primary);
}

.ph-cal-day.is-endpoint {
  background: rgba(196, 30, 30, 0.55);
  color: #fff;
  font-weight: 700;
}

.ph-cal-day.is-pending,
.ph-cal-day.is-anchor {
  box-shadow: inset 0 0 0 1px rgba(255, 32, 32, 0.75);
}

.ph-range-popover-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ph-range-cancel {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
}

.ph-range-cancel:hover {
  color: var(--text-secondary);
}

.ph-custom-field {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ph-custom-field .tool-input {
  min-width: 0;
  width: 4.5rem;
  padding: 0.28rem 0.4rem;
  font-size: 0.78rem;
  height: 1.7rem;
}

.ph-custom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ph-custom-apply,
.ph-custom-reset {
  height: 1.7rem;
  padding: 0 0.55rem;
  font-size: 0.72rem;
}

.ph-custom-apply {
  letter-spacing: 0.04em;
}

.ph-available,
.ph-showing {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ph-showing {
  color: var(--text-secondary);
}

.ph-range-btn {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.ph-range-btn:hover,
.ph-range-btn.active {
  color: var(--red-glow);
  border-color: rgba(196, 30, 30, 0.45);
  background: rgba(196, 30, 30, 0.08);
}

.ph-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.ph-stats-volume {
  margin-top: -0.35rem;
}

.ph-stats-volume .ph-stat {
  border-color: rgba(196, 30, 30, 0.22);
  background: rgba(196, 30, 30, 0.05);
}

.ph-vol-bar {
  fill: rgba(196, 30, 30, 0.35);
  pointer-events: none;
}

.ph-vol-bar.active {
  fill: var(--red-glow);
}

.ph-panel-label {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.market-liq {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ph-stat {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.ph-stat-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.ph-stat-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.price-history-svg {
  display: block;
  width: 100%;
  height: auto;
}

.price-chart {
  position: relative;
  margin-bottom: 0.65rem;
}

.ph-brush-hint {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ph-interact {
  fill: transparent;
  cursor: crosshair;
  touch-action: none;
}

.price-chart.is-brushing .ph-interact {
  cursor: ew-resize;
}

.ph-brush {
  fill: rgba(196, 30, 30, 0.18);
  stroke: rgba(196, 30, 30, 0.55);
  stroke-width: 1;
  pointer-events: none;
}

.ph-tip-brush {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ph-grid {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
}

.ph-axis-line {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
}

.ph-tick {
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 1;
}

.ph-axis {
  fill: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-body, Rajdhani, sans-serif);
}

.ph-axis-y {
  font-size: 11px;
}

.ph-axis-x {
  font-size: 10px;
}

.ph-band {
  fill: rgba(196, 30, 30, 0.14);
}

.ph-avg {
  stroke: var(--red-glow);
  stroke-width: 2.25;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.ph-point {
  fill: rgba(12, 14, 18, 0.9);
  stroke: var(--red-glow);
  stroke-width: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s, r 0.12s;
}

.ph-point.active {
  opacity: 1;
}

.ph-hits .ph-hit {
  fill: transparent;
  cursor: crosshair;
}

.ph-crosshair-x,
.ph-crosshair-y {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  pointer-events: none;
}

.ph-focus {
  fill: var(--red-glow);
  stroke: #fff;
  stroke-width: 1.5;
  pointer-events: none;
}

.ph-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 170px;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(196, 30, 30, 0.4);
  background: rgba(10, 12, 16, 0.96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.ph-tip-date {
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
  font-size: 0.88rem;
}

.ph-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.ph-tip-row strong {
  color: var(--text-primary);
  font-weight: 700;
}

.ph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ph-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ph-legend-avg,
.ph-legend-band,
.ph-legend-vol {
  display: inline-block;
  width: 16px;
  height: 3px;
}

.ph-legend-avg {
  background: var(--red-glow);
}

.ph-legend-band {
  height: 10px;
  background: rgba(196, 30, 30, 0.2);
  border: 1px solid rgba(196, 30, 30, 0.35);
}

.ph-legend-vol {
  height: 10px;
  background: rgba(196, 30, 30, 0.35);
}

.ph-table-wrap {
  max-height: min(380px, 45vh);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
}

.ph-table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.ph-table-wrap::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.ph-table-panel {
  margin-top: 0.85rem;
}

.ph-table-meta {
  margin: 0 0 0.45rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.ph-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ph-table th,
.ph-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.ph-table th.is-num,
.ph-table td.is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ph-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #16161f;
  box-shadow: inset 0 -1px 0 var(--border);
}

.ph-table-sort {
  padding: 0;
}

.ph-table-sort-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: inherit;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}

.ph-table-sort.is-num .ph-table-sort-btn {
  text-align: right;
}

.ph-table-sort-btn:hover,
.ph-table-sort.is-active .ph-table-sort-btn {
  color: var(--red-glow);
}

.ph-table tbody tr:hover {
  background: rgba(196, 30, 30, 0.05);
}

.ph-table tbody tr.is-linked {
  background: rgba(196, 30, 30, 0.16);
}

.ph-table tbody tr.is-linked td:first-child {
  box-shadow: inset 3px 0 0 var(--red-glow);
}

.ph-table-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 1rem 0.55rem !important;
}

.ph-note {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.connect-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.connect-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.connect-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.connect-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.connect-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
}

.connect-card.featured {
  padding: 2rem 2.25rem;
  border-color: rgba(88, 101, 242, 0.4);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.08), var(--bg-card));
}

.connect-card.featured:hover {
  border-color: var(--discord);
  box-shadow: 0 12px 40px rgba(88, 101, 242, 0.2);
}

.connect-card.connect-auth:hover {
  border-color: var(--red-primary);
  box-shadow: 0 12px 40px rgba(196, 30, 30, 0.15);
}

.connect-card.connect-facebook:hover {
  border-color: var(--facebook);
  box-shadow: 0 12px 40px rgba(24, 119, 242, 0.15);
}

.connect-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.35rem 1rem;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--discord);
  color: #fff;
}

.connect-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.3s;
}

.connect-card:hover .connect-icon {
  transform: scale(1.08);
}

.connect-icon svg {
  width: 32px;
  height: 32px;
}

.connect-discord .connect-icon svg {
  color: var(--discord);
}

.connect-auth .connect-icon svg {
  color: var(--red-glow);
}

.connect-facebook .connect-icon svg {
  color: var(--facebook);
}

.connect-body {
  flex: 1;
  min-width: 0;
}

.connect-body h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.connect-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.connect-url {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.connect-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: transform 0.3s, color 0.3s;
  flex-shrink: 0;
}

.connect-card:hover .connect-arrow {
  transform: translateX(6px);
  color: var(--text-primary);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 12, 0.9);
}

.footer-inner {
  text-align: center;
}

.footer-logo {
  border-radius: 50%;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--red-glow);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-disclaimer {
  margin-top: 0.5rem;
  font-size: 0.8rem !important;
}

/* Responsive */
@media (max-width: 1100px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .req-core {
    grid-template-columns: 1fr;
  }

  .req-stat:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .req-checklist {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .connect-row {
    grid-template-columns: 1fr;
  }

  .tools-hub-grid {
    grid-template-columns: 1fr;
  }

  .tools-subnav {
    gap: 0.35rem;
  }

  .tools-subnav a {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.5rem 0.65rem;
    font-size: 0.68rem;
  }

  .tool-field-grow {
    grid-column: span 1;
  }

  .lp-table-head-full,
  .lp-row-full,
  .lp-table-head,
  .lp-row {
    grid-template-columns: minmax(140px, 1.6fr) repeat(5, minmax(64px, 1fr));
    font-size: 0.8rem;
  }

  .lp-detail-grid,
  .market-panels,
  .market-side-grid,
  .market-hubs {
    grid-template-columns: 1fr;
  }

  .ph-stats,
  .ph-stats-volume {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .nav {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: max(0.75rem, env(safe-area-inset-top));
    padding-bottom: 0.75rem;
  }

  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 160;
  }

  body.nav-open .header {
    z-index: 200;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 140;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  body.nav-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  body {
    font-size: 16px;
  }

  .tool-info-tip {
    left: 0;
    transform: none;
    width: min(16.5rem, calc(100vw - 2rem));
  }

  .tool-info-tip::after {
    left: 1rem;
    transform: none;
  }

  .market-head {
    flex-wrap: wrap;
  }

  .market-head h3 {
    font-size: 1rem;
    word-break: break-word;
  }

  .market-hub-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .market-hub-grid::-webkit-scrollbar {
    display: none;
  }

  .market-hub-btn {
    flex-shrink: 0;
    min-width: 140px;
    min-height: 44px;
  }

  .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-scroll {
    width: 100%;
    max-width: 280px;
  }

  .nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 150;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    width: min(100vw - 2.5rem, 320px);
    height: 100dvh;
    height: 100vh;
    padding: calc(4.5rem + env(safe-area-inset-top)) 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
    background: rgba(14, 14, 18, 0.98);
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.28s ease;
  }

  body.nav-open .nav-drawer {
    transform: translateX(0);
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin-bottom: 1.25rem;
  }

  .nav-links > li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    font-size: 0.82rem;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    min-width: 0;
    width: 100%;
    margin: 0 0 0.5rem;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    pointer-events: auto;
    max-height: 20rem;
  }

  .nav-dropdown-menu a {
    padding: 0.65rem 0 0.65rem 0.85rem;
    font-size: 0.78rem;
    white-space: normal;
  }

  .lang-switch {
    justify-content: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    width: 100%;
  }

  .lang-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
  }

  .nav-logo span {
    font-size: 0.88rem;
  }

  .hero {
    padding-top: 5rem;
    min-height: auto;
  }

  .hero-logo {
    width: 160px;
    height: 160px;
  }

  .hero-sub {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .hero-tagline {
    letter-spacing: 0.08em;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-title {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .req-checklist {
    grid-template-columns: 1fr;
  }

  .req-stat {
    padding: 2rem 1.25rem;
  }

  .req-checklist-block {
    padding: 1.75rem 1rem 2rem;
  }

  .connect-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .connect-card.featured {
    padding: 2rem 1.25rem 1.5rem;
  }

  .connect-arrow {
    display: none;
  }

  .culture-grid,
  .fieldkit-grid {
    grid-template-columns: 1fr;
  }

  .warzone-step {
    grid-template-columns: 2.75rem 1fr;
    gap: 0.85rem;
  }

  .footer {
    padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom));
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
  }

  .tool-page {
    padding: 5.5rem 0 3rem;
  }

  .page-guides .tool-page {
    padding-top: 5.5rem;
  }

  .tool-breadcrumb {
    font-size: 0.78rem;
    line-height: 1.5;
    word-break: break-word;
  }

  .tool-form {
    flex-direction: column;
  }

  .tool-toolbar {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 0.85rem;
  }

  .tool-field-grow {
    grid-column: span 1;
  }

  .tool-toolbar-btn,
  .tool-select,
  .tool-input {
    min-height: 44px;
  }

  #lp-refresh {
    width: 100%;
    height: 44px;
    margin-bottom: 0;
  }

  .lp-faction-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding-bottom: 0.25rem;
  }

  .lp-faction-tabs::-webkit-scrollbar {
    display: none;
  }

  .lp-faction-tab {
    flex-shrink: 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .lp-table-wrap {
    max-height: none;
    overflow-x: auto;
  }

  .lp-table-head,
  .lp-table-head-full {
    display: none;
  }

  .lp-row,
  .lp-row-full {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 0.75rem;
    padding: 0.85rem 0.75rem;
  }

  .lp-item {
    grid-column: 1 / -1;
  }

  .market-hubs,
  .market-panels,
  .market-side-grid {
    grid-template-columns: 1fr;
  }

  .tool-page-head {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .tool-switch {
    padding-top: 0;
    white-space: normal;
  }

  .ph-calendars-row {
    grid-template-columns: 1fr;
  }

  .ph-stats,
  .ph-stats-volume {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ph-range-endpoints {
    grid-template-columns: 1fr;
  }

  .ph-range-endpoint-sep {
    display: none;
  }

  .ph-range-popover-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .guides-layout {
    gap: 1.5rem;
    margin-top: 1rem;
  }

  .guide-set-summary {
    flex-wrap: nowrap;
    gap: 0.75rem;
    padding-right: 0;
  }

  .guide-set-summary-main .guide-set-desc {
    padding-right: 0.5rem;
  }

  .guide-fit-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .guide-fit-copy-btn {
    width: 100%;
    min-height: 44px;
  }

  .guide-fit-eft {
    font-size: 0.68rem;
    max-height: 14rem;
  }

  .guide-implant-strip {
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  .guide-implant-row {
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .guide-implant-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: calc(28px + 0.65rem);
  }

  .guide-implant-market {
    white-space: normal;
  }

  .guide-table-wrap {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
  }

  .guide-table {
    font-size: 0.82rem;
  }

  .guide-table th,
  .guide-table td {
    padding: 0.55rem 0.65rem;
  }

  .guide-checklist li {
    padding-left: 1.75rem;
  }
}

@media (max-width: 480px) {
  .nav-logo span {
    display: none;
  }

  .hero-logo {
    width: 140px;
    height: 140px;
  }

  .nav-drawer {
    width: 100vw;
    border-left: none;
  }

  .ph-stats,
  .ph-stats-volume {
    grid-template-columns: 1fr;
  }

  .lp-row,
  .lp-row-full {
    grid-template-columns: 1fr;
  }

  .lp-row-full > span:not(:first-child) {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 0.85rem;
  }

  .lp-isklp {
    font-weight: 700;
    color: var(--red-glow);
  }
}

/* ========== Guides / Field manuals ========== */
.page-guides .tool-page {
  padding-top: 6.5rem;
}

.guides-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 2.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

.guide-article {
  max-width: 760px;
}

.guide-kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-glow);
  margin-bottom: 0.75rem;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0 0 1.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.guide-article h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
}

.guide-article h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 1.5rem 0 0.55rem;
}

.guide-article p,
.guide-article li {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1.02rem;
}

.guide-article p {
  margin: 0 0 1rem;
}

.guide-article ul,
.guide-article ol {
  margin: 0 0 1.15rem;
  padding-left: 1.25rem;
}

.guide-article li + li {
  margin-top: 0.35rem;
}

.guide-article a {
  color: var(--red-glow);
  text-decoration: none;
}

.guide-article a:hover {
  text-decoration: underline;
}

.guide-callout {
  margin: 1.25rem 0 1.5rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--red-primary);
  background: rgba(196, 30, 30, 0.08);
  border: 1px solid rgba(196, 30, 30, 0.22);
  border-left-width: 3px;
}

.guide-callout p {
  margin: 0;
  font-size: 0.95rem;
}

.guide-checklist {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.guide-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.guide-checklist li::before {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 0.12em;
  border: 1px solid rgba(196, 30, 30, 0.5);
  background: rgba(196, 30, 30, 0.12);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.guide-toc {
  position: sticky;
  top: 5.5rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.guide-toc h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.guide-toc ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}

.guide-toc a {
  color: var(--text-secondary);
  text-decoration: none;
}

.guide-toc a:hover {
  color: var(--red-glow);
}

.guide-sets {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}

.guide-set {
  padding: 1rem 1.1rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
}

.guide-set-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.guide-set-summary-main {
  flex: 1;
  min-width: 0;
}

.guide-set-summary-main h3,
.guide-set > h3 {
  margin: 0 0 0.25rem;
}

.guide-set-summary .guide-set-price,
.guide-set > .guide-set-price {
  display: block;
  margin: 0 0 0.25rem;
}

.guide-set-summary-main .guide-set-price {
  margin-bottom: 0.25rem;
}

.guide-set-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-secondary);
  font-weight: 500;
}

.guide-set-summary-main .guide-set-desc {
  padding-right: 0.25rem;
}

.guide-set:not([open]) .guide-set-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-set[open] .guide-set-desc {
  color: var(--text-primary);
}

.guide-set-summary::-webkit-details-marker {
  display: none;
}

.guide-set-summary::marker {
  content: '';
}

.guide-set-summary:hover h3 {
  color: var(--red-glow);
}

.guide-set-chevron {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.55rem;
  border-right: 2px solid var(--red-glow);
  border-bottom: 2px solid var(--red-glow);
  transform: rotate(-45deg);
  transition: transform 0.2s ease, margin-top 0.2s ease;
}

.guide-set[open] .guide-set-chevron {
  margin-top: 0.55rem;
  transform: rotate(45deg);
}

.guide-set-body {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-set-body:empty {
  display: none;
  margin: 0;
  padding: 0;
  border: none;
}

.guide-set-body > p {
  margin-top: 0;
}

.guide-set h3 {
  margin: 0 0 0.35rem;
}

.guide-set ul {
  margin-bottom: 0.5rem;
}

.guide-set-price {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--red-glow);
}

.guide-set > .guide-set-price {
  margin-bottom: 0.65rem;
}

.guide-fit-panel {
  margin-top: 0;
}

.guide-fit-subhead {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.guide-fit-panel > .guide-fit-subhead:first-child {
  margin-top: 0;
}

.guide-fit-ammo-table {
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
}

.guide-fit-ammo-table code {
  font-size: 0.78rem;
  color: var(--red-glow);
}

.guide-fit-fight {
  margin: 0 0 0.5rem 1.1rem;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.guide-fit-fight li {
  margin-bottom: 0.35rem;
}

.guide-fit-avoid {
  margin: 0 0 0.5rem 1.1rem;
  font-size: 0.85rem;
  color: rgba(196, 30, 30, 0.85);
}

.guide-fit-actions {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-fit-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.55rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(196, 30, 30, 0.45);
  background: rgba(196, 30, 30, 0.1);
  color: var(--red-glow);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.guide-fit-copy-btn:hover,
.guide-fit-copy-btn.is-copied {
  background: rgba(196, 30, 30, 0.22);
  border-color: var(--red-glow);
  color: #fff;
}

.guide-fit-eft {
  margin: 0;
  padding: 0.75rem 0.85rem;
  max-height: 16rem;
  overflow: auto;
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  white-space: pre-wrap;
  word-break: break-word;
  user-select: all;
}

.guide-implant-panel {
  margin-top: 0.75rem;
}

.guide-implant-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
}

.guide-implant-strip img {
  display: block;
  image-rendering: auto;
}

.guide-implant-actions {
  margin-bottom: 0.5rem;
}

.guide-implant-list {
  list-style: none;
  margin: 0 0 0.65rem;
  padding: 0;
}

.guide-implant-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 0.5rem 0.75rem;
  align-items: start;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.guide-implant-row:last-child {
  border-bottom: none;
}

.guide-implant-icon {
  display: block;
  border-radius: 2px;
  margin-top: 0.1rem;
}

.guide-implant-name {
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.guide-implant-name-text {
  display: block;
}

.guide-implant-note {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  line-height: 1.35;
}

.guide-implant-row-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  padding-top: 0.05rem;
}

.guide-implant-copy-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.guide-implant-copy-name:hover,
.guide-implant-copy-name.is-copied {
  background: rgba(196, 30, 30, 0.15);
  border-color: rgba(196, 30, 30, 0.45);
  color: var(--red-glow);
}

.guide-implant-copy-name .item-copy-icon {
  width: 0.9rem;
  height: 0.9rem;
}

.guide-implant-market {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.guide-implant-market:hover {
  color: var(--red-glow);
}

.guide-implant-pre {
  max-height: 9rem;
}

.guide-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--border);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.guide-table th,
.guide-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  vertical-align: top;
}

.guide-table th {
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.guide-table tr:last-child td {
  border-bottom: none;
}

.guide-table code {
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.78rem;
  color: var(--red-glow);
}

.guides-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.guides-hub-card.is-soon {
  opacity: 0.72;
  pointer-events: none;
}

.guides-hub-card .tools-hub-cta-soon {
  color: var(--text-muted);
}

.guide-more {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.guide-more-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.guide-more-grid a {
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}

.guide-more-grid a:hover {
  border-color: rgba(196, 30, 30, 0.45);
  color: var(--red-glow);
}

.guide-footnote {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .guides-layout {
    grid-template-columns: 1fr;
  }

  .guide-toc {
    position: static;
    order: -1;
  }

  .guides-hub-grid,
  .guide-more-grid {
    grid-template-columns: 1fr;
  }
}
