/*
 * WiFi Pentest Kit: Stylesheet
 * Hand-crafted design following anti-slop guidelines (DESIGN.md)
 * Dial: ENERGY 2 / RHYTHM 2 / MOTION 1
 */

:root {
  /* Dark Theme (Default hardware laboratory mode) */
  --bg: #0c1117;
  --bg-subtle: #111822;
  --surface: #151e2a;
  --surface-elevated: #1a2534;
  --surface-hover: #202d3f;
  --border: #263547;
  --border-subtle: #1c2734;
  --border-focus: #f59e0b;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent: #f59e0b; /* Amber instrument signal */
  --accent-soft: rgba(245, 158, 11, 0.12);
  --accent-border: rgba(245, 158, 11, 0.35);
  --accent-contrast: #0b0f14;

  --cyan: #06b6d4; /* 5 GHz telemetry & radio markers */
  --cyan-soft: rgba(6, 182, 212, 0.12);
  --cyan-border: rgba(6, 182, 212, 0.32);

  --lime: #84cc16; /* Verified states & checksums */
  --lime-soft: rgba(132, 204, 22, 0.12);

  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max-width: 1200px;
  --header-height: 72px;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-hover: #f1f5f9;
  --border: #cbd5e1;
  --border-subtle: #e2e8f0;
  --border-focus: #d97706;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --accent: #b45309; /* High-contrast amber (5.02:1 ratio against white) */
  --accent-soft: rgba(180, 83, 9, 0.1);
  --accent-border: rgba(180, 83, 9, 0.4);
  --accent-contrast: #ffffff;

  --cyan: #0e7490; /* High-contrast cyan (5.36:1 ratio against white) */
  --cyan-soft: rgba(14, 116, 144, 0.1);
  --cyan-border: rgba(14, 116, 144, 0.35);

  --lime: #65a30d;
  --lime-soft: rgba(101, 163, 13, 0.1);

  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
}

/* Base resets & typography */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

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

/* Accessibility: Focus Indicators */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Container */
.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: 88px 0;
}

.section-tight {
  padding: 48px 0;
}

.section-divider {
  border-top: 1px solid var(--border-subtle);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--header-height);
  background-color: var(--bg);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.site-header.scrolled {
  background-color: var(--surface);
  border-bottom-color: var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background-color: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 20px;
  height: 20px;
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--cyan);
  background-color: var(--cyan-soft);
  border: 1px solid var(--cyan-border);
  padding: 1px 6px;
  border-radius: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a {
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--text-muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon {
  display: none;
}

.theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none !important;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block !important;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block !important;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none !important;
}

.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  transition: border-color 0.15s ease;
}

.btn-github:hover {
  border-color: var(--accent);
}

.btn-github svg {
  width: 16px;
  height: 16px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--text-main);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

/* Button system */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.button-primary:hover {
  filter: brightness(1.08);
}

.button-secondary {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text-main);
}

.button-secondary:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-focus);
}

.button-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.84rem;
}

/* Hero Section */
.hero {
  padding: 64px 0 80px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
}

.hero-badge-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.chip-telemetry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.chip-telemetry .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--lime);
}

.hero-title {
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 20px 0;
  color: var(--text-main);
}

.hero-title .highlight {
  color: var(--accent);
}

.hero-description {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 0 32px 0;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 580px;
  margin-bottom: 36px;
}

.hero-actions .button {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.88rem;
  white-space: nowrap;
  text-align: center;
}

/* Hero Hardware Board Showcase */
.board-showcase {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
}

.board-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.board-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wifi-emblem {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background-color: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  flex-shrink: 0;
}

.wifi-emblem svg {
  width: 22px;
  height: 22px;
}

.board-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.board-model {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.board-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.board-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--cyan-soft);
  border: 1px solid var(--cyan-border);
  color: var(--cyan);
  white-space: nowrap;
}

.board-stage {
  padding: 32px 24px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, var(--surface-hover) 0%, var(--surface) 75%);
  min-height: 250px;
}

.board-img {
  max-width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
  transition: transform 0.25s ease;
}

.board-img:hover {
  transform: scale(1.02);
}

.board-footer-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  background-color: var(--bg-subtle);
}

.board-spec {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid var(--border-subtle);
}

.board-spec:last-child {
  border-right: none;
}

.board-spec-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.board-spec-val {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Telemetry & Spec Strip */
.spec-strip {
  background-color: var(--surface);
  border-block: 1px solid var(--border);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background-color: var(--border);
}

.spec-cell {
  background-color: var(--surface);
  padding: 24px 20px;
}

.spec-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.spec-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.spec-note {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Section Headings */
.section-header {
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px 0;
  color: var(--text-main);
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0;
}

/* Feature & Interactive WebUI Explorer */
.interactive-console {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.console-nav {
  display: flex;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.console-tab {
  flex: 1;
  min-width: 160px;
  min-height: 48px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.console-tab:hover {
  color: var(--text-main);
  background-color: var(--surface);
}

.console-tab[aria-selected="true"] {
  color: var(--text-main);
  background-color: var(--surface);
  border-bottom-color: var(--accent);
}

.console-tab .tab-icon {
  width: 16px;
  height: 16px;
  color: var(--cyan);
}

.console-tab[aria-selected="true"] .tab-icon {
  color: var(--accent);
}

.console-panel {
  padding: 32px;
}

.panel-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}

.panel-info h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: var(--text-main);
}

.panel-info p {
  color: var(--text-muted);
  margin: 0 0 20px 0;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin-bottom: 24px;
}

.param-table th, .param-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.param-table th {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--text-dim);
  background-color: var(--bg-subtle);
}

.param-table td code {
  color: var(--cyan);
}

.badge-edition {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.badge-edition.trial {
  background-color: var(--cyan-soft);
  color: var(--cyan);
  border: 1px solid var(--cyan-border);
}

.badge-edition.pro {
  background-color: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.panel-audit-display {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.audit-display-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.preview-body {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
  overflow-x: auto;
}

.scan-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 4px 0;
  border-bottom: 1px dotted var(--border-subtle);
}

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

.scan-head {
  font-weight: 700;
  color: var(--text-dim);
}

.scan-band-5g {
  color: var(--cyan);
}

.scan-band-2g {
  color: var(--text-muted);
}

/* Hardware Breakdown */
.hardware-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: start;
}

.hardware-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.hardware-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.parts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.part-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.part-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.part-icon,
.part-index {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--cyan);
  flex-shrink: 0;
}

.part-index {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}

.part-details h4 {
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text-main);
}

.part-details p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.pinout-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
}

.pinout-card h4 {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px 0;
}

.pinout-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
}

/* Installation Guide Tabs */
.install-container {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.install-tablist {
  display: flex;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.install-tab {
  flex: 1;
  min-width: 180px;
  min-height: 52px;
  padding: 14px 18px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.install-tab:hover {
  color: var(--text-main);
  background-color: var(--surface);
}

.install-tab[aria-selected="true"] {
  color: var(--text-main);
  background-color: var(--surface);
  border-bottom-color: var(--accent);
}

.install-panel {
  padding: 36px;
}

.step-flow {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  align-items: start;
}

.step-num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
}

.step-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: var(--text-main);
}

.step-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0 0 12px 0;
}

.code-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 10px;
}

.code-field code {
  color: var(--text-main);
  font-size: 0.82rem;
  overflow-x: auto;
  white-space: nowrap;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--surface);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-copy:hover {
  color: var(--text-main);
  border-color: var(--accent);
}

.btn-copy svg {
  width: 14px;
  height: 14px;
}

.note-box {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-top: 32px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.88rem;
}

.note-box.alert-amber {
  border-left: 4px solid var(--accent);
}

.note-box svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.note-box p {
  margin: 0;
  color: var(--text-muted);
}

.note-box strong {
  color: var(--text-main);
}

/* Connection & Field Usage */
.usage-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.network-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.network-data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

.network-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.network-val {
  display: flex;
  align-items: center;
  gap: 10px;
}

.network-val code {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.ip-banner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.ip-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.ip-card span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.ip-card a {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cyan);
}

.ip-card a:hover {
  text-decoration: underline;
}

.usage-video-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--surface);
}

.usage-video-wrap img {
  width: 100%;
  height: auto;
}

.video-overlay-link {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(to top, rgba(12, 17, 23, 0.92) 0%, transparent 60%);
  color: #ffffff;
}

.video-play-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.92rem;
}

.play-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--accent-contrast);
  display: grid;
  place-items: center;
}

/* Feature Comparison Table */
.comparison-table-wrap {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.comparison-table th, .comparison-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table th {
  background-color: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-main);
  border-bottom-color: var(--border);
}

.comparison-table td:nth-child(2),
.comparison-table td:nth-child(3),
.comparison-table th:nth-child(2),
.comparison-table th:nth-child(3) {
  text-align: center;
}

.feature-check {
  color: var(--lime);
  font-weight: 700;
}

.feature-cross {
  color: var(--text-dim);
}

/* FAQ Accordion */
.faq-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: var(--border-focus);
}

.faq-item summary {
  padding: 18px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-body {
  padding: 0 20px 20px 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Ethical Responsibility Callout */
.ethics-shell {
  background-color: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 28px;
  align-items: start;
}

.ethics-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.ethics-icon svg {
  width: 28px;
  height: 28px;
}

.ethics-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: var(--text-main);
}

.ethics-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 16px 0;
}

/* Footer */
.site-footer {
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  font-size: 0.9rem;
}

.footer-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 360px;
  margin: 14px 0 0 0;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 16px 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-main);
}

.footer-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-focus);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

/* Mobile & Responsive Rules (R-03) */
@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .spec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel-layout {
    grid-template-columns: 1fr;
  }
  .hardware-grid, .usage-grid, .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    display: none;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .btn-github span {
    display: none;
  }

  .footer-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-sub {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .ethics-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .board-footer-specs {
    grid-template-columns: 1fr;
  }

  .board-spec {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .board-spec:last-child {
    border-bottom: none;
  }

  .board-stage {
    padding: 24px 16px;
    min-height: 200px;
  }
}

@media (max-width: 580px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .spec-grid {
    grid-template-columns: 1fr;
  }

  .ip-banner-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
