:root,
[data-theme="titanium"] {
  --bg-main: #0a0c10;
  --bg-elevated: #10131a;
  --bg-card: #131720;
  --bg-card-hover: #191f2b;
  --btn-bg: #181f2c;
  --btn-bg-hover: #253044;
  --btn-border: #2c3548;
  --btn-border-hover: #475569;
  --bg-glass: rgba(10, 12, 16, 0.94);
  --border: #232936;
  --border-strong: #384152;
  --text-main: #f3f4f6;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --accent: #e2e8f0;
  --accent-contrast: #090b0f;
  --accent-soft: rgba(226, 232, 240, 0.1);
}

[data-theme="sand"] {
  --bg-main: #0e0d0b;
  --bg-elevated: #151310;
  --bg-card: #1a1714;
  --bg-card-hover: #231f1b;
  --btn-bg: #221e19;
  --btn-bg-hover: #312b24;
  --btn-border: #383129;
  --btn-border-hover: #574c40;
  --bg-glass: rgba(14, 13, 11, 0.94);
  --border: #2d2822;
  --border-strong: #463e35;
  --text-main: #f5f2eb;
  --text-secondary: #ded7c8;
  --text-muted: #b0a798;
  --text-subtle: #7d7568;
  --accent: #e5dac7;
  --accent-contrast: #0e0d0b;
  --accent-soft: rgba(229, 218, 199, 0.12);
}

[data-theme="slate"] {
  --bg-main: #080b10;
  --bg-elevated: #0e131b;
  --bg-card: #121923;
  --bg-card-hover: #182230;
  --btn-bg: #172130;
  --btn-bg-hover: #233246;
  --btn-border: #28374d;
  --btn-border-hover: #435978;
  --bg-glass: rgba(8, 11, 16, 0.94);
  --border: #1e293b;
  --border-strong: #334155;
  --text-main: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --accent: #cbd5e1;
  --accent-contrast: #080b10;
  --accent-soft: rgba(203, 213, 225, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: ui-monospace, "JetBrains Mono", "Cascadia Mono", "Consolas", monospace;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-top: 10px;
  padding-bottom: 10px;
  gap: 10px;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-bottom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.brand-mark {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.03);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text-title {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 23px;
  display: block;
  line-height: 1.2;
}

.brand-text-sub {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  display: block;
  margin-top: 3px;
  line-height: 1.2;
}

.brand-text-tag2 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.nav-link,
a.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--text-main);
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.nav-link:hover,
a.nav-link:hover,
.nav-link.active:hover,
a.nav-link.active:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-border-hover);
}

.nav-link.active,
a.nav-link.active {
  background: var(--btn-bg);
  border-color: var(--btn-border-hover);
  color: var(--text-main);
}

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

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 6px;
  padding: 7px 12px 7px 30px;
  font-size: 12px;
  width: 190px;
  color: var(--text-main);
  transition: border-color 0.2s, width 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--btn-border-hover);
  width: 240px;
}

.search-icon {
  position: absolute;
  left: 9px;
  width: 14px;
  height: 14px;
  color: var(--text-subtle);
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 340px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  z-index: 80;
  padding: 6px;
}

.search-result-item {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  transition: background 0.15s;
}

.search-result-item:hover {
  background: var(--bg-card-hover);
}

.theme-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 0;
}

.theme-pill,
button.theme-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--text-main);
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.theme-pill:hover,
button.theme-pill:hover,
.theme-pill.active:hover,
button.theme-pill.active:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-border-hover);
}

.theme-pill.active,
button.theme-pill.active {
  background: var(--btn-bg);
  border-color: var(--btn-border-hover);
  color: var(--text-main);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--text-main);
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.btn:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-border-hover);
}

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

.btn-primary:hover {
  opacity: 0.92;
  background: var(--accent);
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
}

.btn-danger {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.12);
}

.mobile-menu-btn {
  display: none;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
}

/* Hero Section */
.hero-section {
  padding: 64px 0 72px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero-section .container {
  max-width: 1560px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.35fr;
  gap: 36px;
  align-items: center;
}

.hero-grid > .reveal:last-child {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-grid .hero-visual-box {
  width: 100%;
  height: auto;
  background: transparent;
  border: none;
  border-radius: 12px;
}

.hero-grid .hero-image-zoom-wrap {
  width: 100%;
  height: auto;
}

.hero-grid .hero-visual-box img,
.hero-grid .hero-visual-box video {
  width: 100%;
  height: auto;
  max-height: 640px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.hero-title {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-top: 18px;
}

.hero-subtitle {
  display: block;
  color: var(--text-muted);
  font-weight: 300;
  margin-top: 6px;
}

.hero-desc {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 16px;
  max-width: 620px;
  font-weight: 300;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
}

.stat-value {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-main);
}

.stat-label {
  font-size: 11px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-visual-box {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual-box img,
.hero-visual-box video {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 540px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-image-zoom-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  border-radius: 12px;
  overflow: hidden;
}

.hero-image-zoom-wrap:hover img {
  border-color: var(--border-strong);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.hero-zoom-cue {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 5px 11px;
  font-size: 11px;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-main);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-image-zoom-wrap:hover .hero-zoom-cue {
  opacity: 1;
  transform: translateY(0);
}

.hero-mode-tabs {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  gap: 4px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 6px;
}

/* Boom Supersonic Style Full-Viewport Featured Showcases */
.showcase-banner {
  position: relative;
  min-height: 520px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  padding: 56px 0;
  overflow: hidden;
  background: var(--bg-elevated);
}

.showcase-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.showcase-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.8s ease;
}

.showcase-banner:hover .showcase-bg img {
  transform: scale(1.02);
}

.showcase-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to top, var(--bg-main) 8%, rgba(10, 12, 16, 0.72) 55%, rgba(10, 12, 16, 0.35) 100%);
}

.showcase-content {
  position: relative;
  z-index: 3;
  width: 100%;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 32px;
  align-items: end;
}

/* Section Headers & Cards */
.section-block {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.section-eyebrow {
  font-size: 11px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.section-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-pill {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all 0.15s;
}

.filter-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-main);
}

.filter-pill.active {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
  font-weight: 500;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}

.fleet-card-wrapper {
  grid-row: span 2;
  display: grid;
  grid-template-rows: subgrid;
  row-gap: 3px;
  height: 100%;
  transition: transform 0.2s ease;
}

.fleet-card-wrapper:hover {
  transform: translateY(-2px);
}

.fleet-card-wrapper[draggable="true"] {
  cursor: grab;
}

.fleet-card-wrapper.dragging {
  opacity: 0.45;
}

.fleet-card-wrapper.dragging .card-header-box,
.fleet-card-wrapper.dragging .fleet-card {
  border-style: dashed;
  border-color: var(--accent);
}

.fleet-card-wrapper.drag-over .card-header-box,
.fleet-card-wrapper.drag-over .fleet-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
  transform: translateY(-2px);
}

.card-header-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px 14px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 94px;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.2s;
}

.card-header-box:hover .card-title {
  color: var(--accent);
  text-decoration: underline;
}

.fleet-card-wrapper:hover .card-header-box,
.fleet-card-wrapper:hover .fleet-card {
  border-color: var(--border-strong);
}

.fleet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: border-color 0.2s;
}

.fleet-card[draggable="true"] {
  cursor: grab;
}

.fleet-card.dragging {
  opacity: 0.45;
  border-style: dashed;
  border-color: var(--accent);
}

.fleet-card.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
  transform: translateY(-3px);
}

.drag-handle-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  cursor: grab;
  user-select: none;
}

.drag-handle-badge:hover {
  border-color: var(--border-strong);
  color: var(--text-main);
}

.admin-tree-row[draggable="true"] {
  cursor: grab;
  transition: border-color 0.15s, background 0.15s;
}

.admin-tree-row.dragging {
  opacity: 0.45;
  border-style: dashed;
}

.admin-tree-row.drag-over {
  border-color: var(--accent) !important;
  background: var(--bg-card-hover) !important;
}

.card-media {
  position: relative;
  width: 100%;
  height: 190px;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.fleet-card-wrapper:hover .card-media img,
.fleet-card:hover .card-media img {
  transform: scale(1.04);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-subtle);
  margin-bottom: 8px;
}

.card-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.35;
  cursor: pointer;
  display: block;
  text-decoration: none;
  transition: color 0.15s ease;
}

.card-title:hover {
  color: var(--accent);
  text-decoration: underline;
}

.fleet-card:hover .card-title {
  color: #ffffff;
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 0;
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-specs-mini {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-spec-line {
  display: grid;
  grid-template-columns: minmax(95px, 44%) 1fr;
  column-gap: 12px;
  align-items: baseline;
  font-size: 11px;
  line-height: 1.45;
}

.card-spec-label {
  color: var(--text-subtle);
  font-weight: 400;
  word-break: break-word;
}

.card-spec-value {
  color: var(--text-main);
  font-weight: 500;
  word-break: break-word;
  text-align: left;
}

.card-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Interactive Image Hotspots & Gallery Viewer */
.gallery-stage {
  position: relative;
  width: 100%;
  height: 440px;
  background: #06080b;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-stage .pin-canvas {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.gallery-stage .pin-canvas img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 438px;
}

.pin-canvas {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.pin-canvas img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 318px;
}

.hotspot-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(226, 232, 240, 0.25), 0 4px 12px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  z-index: 15;
  transition: transform 0.15s;
}

.hotspot-pin:hover {
  transform: translate(-50%, -50%) scale(1.15);
}

.hotspot-pin.hotspot-draggable {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.hotspot-pin.hotspot-dragging {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.22);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.75);
  z-index: 20;
}

.gallery-stage.editing-pins {
  cursor: crosshair;
  outline: 2px dashed var(--accent, #38bdf8);
  outline-offset: 2px;
}

.hotspot-popover {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 420px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 14px 16px;
  z-index: 20;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gallery-thumb {
  width: 84px;
  height: 56px;
  border-radius: 6px;
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  flex-shrink: 0;
  transition: opacity 0.15s, border-color 0.15s;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  opacity: 1;
  border-color: var(--accent);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Breadcrumbs */
.breadcrumb-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.breadcrumb-link {
  cursor: pointer;
  color: var(--text-muted);
}

.breadcrumb-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

/* Detail Two-Column Grid */
.detail-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 32px;
  margin-top: 24px;
}

.info-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}

.spec-table-row {
  display: grid;
  grid-template-columns: minmax(130px, 38%) 1fr;
  column-gap: 18px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.5;
}

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

.spec-table-label {
  color: var(--text-subtle);
  font-weight: 400;
  word-break: break-word;
}

.spec-table-value {
  color: var(--text-main);
  font-weight: 500;
  word-break: break-word;
  text-align: left;
}

.spec-row {
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.spec-row.spec-row-off {
  opacity: 0.62;
  border-style: dashed !important;
  border-color: var(--btn-border-hover) !important;
}

.spec-row.spec-row-off input {
  color: var(--text-muted);
}

/* Interactive Tech Tree Canvas */
.tree-viewport {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

/* Interactive Tech Tree Node & Line Highlights */
.tree-node rect {
  transition: fill 0.22s ease, stroke 0.22s ease, stroke-width 0.22s ease, filter 0.22s ease;
}

.tree-node text {
  transition: fill 0.22s ease;
}

.tree-link {
  transition: stroke 0.22s ease, stroke-width 0.22s ease, opacity 0.22s ease;
}

/* Base hover & keyboard focus on individual tree nodes */
.tree-node:focus {
  outline: none;
}

.tree-node:hover rect,
.tree-node:focus-visible rect {
  stroke: var(--accent, #38bdf8) !important;
  fill: #1e293b !important;
  stroke-width: 2px !important;
}

.tree-node:hover text,
.tree-node:focus-visible text {
  fill: #ffffff !important;
}

/* Lighten sector node when active */
.tree-sector.tree-active rect {
  fill: #1c2638 !important;
  stroke: var(--accent, #38bdf8) !important;
  stroke-width: 1.8px !important;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.35));
}

.tree-sector.tree-active text {
  fill: #ffffff !important;
}

/* Lighten connecting lines when active */
.tree-link.tree-active {
  stroke: var(--accent, #38bdf8) !important;
  stroke-width: 2.4px !important;
  opacity: 1 !important;
}

/* Lighten connected technologies on the right */
.tree-tech.tree-active rect {
  fill: #1b263b !important;
  stroke: var(--accent, #38bdf8) !important;
  stroke-width: 1.8px !important;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.28));
}

.tree-tech.tree-active .tree-tech-title {
  fill: #ffffff !important;
}

.tree-tech.tree-active .tree-tech-sub {
  fill: #93c5fd !important;
}

/* Lighten connected sub-devices */
.tree-sub.tree-active rect {
  fill: #15202f !important;
  stroke: #60a5fa !important;
  stroke-width: 1.5px !important;
}

.tree-sub.tree-active text {
  fill: #f8fafc !important;
}

/* Modal System */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text-main);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-strong);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pw-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pw-input-wrap .form-input {
  padding-right: 56px;
}

.pw-toggle-btn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 10px;
  padding: 3px 7px;
  cursor: pointer;
  line-height: 1.2;
}

.pw-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* Footer */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: 12px;
}

@media (max-width: 1180px) {
  .header-bottom-row {
    gap: 8px;
  }
  .nav-links {
    gap: 5px;
  }
  .nav-link,
  a.nav-link {
    padding: 6px 9px;
    font-size: 11px;
  }
  .search-input {
    width: 150px;
  }
  .theme-pill,
  button.theme-pill {
    padding: 6px 9px;
    font-size: 11px;
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .showcase-content,
  .detail-grid,
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .hero-grid .hero-visual-box,
  .hero-grid .hero-image-zoom-wrap,
  .hero-grid .hero-visual-box img,
  .hero-grid .hero-visual-box video {
    height: auto;
  }
  .nav-links,
  .theme-pills {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  #mobileNavLinks .nav-link,
  #mobileNavLinks a.nav-link {
    padding: 5px 7px;
    font-size: 10.5px;
    text-align: center;
    white-space: nowrap;
  }
  .gallery-stage {
    height: 300px;
  }
  .gallery-stage .pin-canvas img {
    max-height: 298px;
  }
  .header-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    min-height: 84px;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 12px;
  }
  .header-top-row {
    flex: 1 1 auto;
    min-width: 0;
  }
  .header-bottom-row {
    border-top: none;
    padding-top: 0;
    flex-shrink: 0;
  }
  .brand-mark {
    width: 72px;
    height: 72px;
  }
  .brand-text-title {
    font-size: 16px;
  }
  .brand-text-sub {
    font-size: 14px;
    margin-top: 2px;
  }
  .brand-text-tag2 {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 56px;
    padding-top: 6px;
    padding-bottom: 6px;
    gap: 8px;
  }
  .brand {
    gap: 10px;
  }
  .brand-mark {
    width: 44px;
    height: 44px;
    padding: 2px;
    border-radius: 6px;
  }
  .brand-text-title {
    font-size: 14px;
    letter-spacing: 0.04em;
  }
  .brand-text-sub {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-top: 2px;
    line-height: 1.25;
  }
  .brand-text-tag2 {
    font-size: 10px;
    margin-top: 1px;
  }
  .search-box input {
    width: 110px;
  }
}

/* ===== Mechanism: one continuous text with Read more ===== */
.mech-flow {
  position: relative;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
  font-weight: 300;
  overflow: hidden;
  transition: max-height 0.45s ease;
}

.mech-flow.mech-collapsed {
  max-height: 380px;
}

.mech-flow.mech-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--bg-card) 92%);
  pointer-events: none;
}

.mech-text {
  margin-bottom: 14px;
}

.mech-p {
  margin: 0 0 12px 0;
  line-height: 1.65;
  white-space: pre-line;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 300;
}

.mech-p:last-child {
  margin-bottom: 0;
}

.mech-bullet {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 6px 0 8px 0;
}

.mech-bullet-dot {
  flex-shrink: 0;
  color: var(--text-main);
  font-size: 13.5px;
  line-height: 1.65;
  user-select: none;
}

.mech-bullet-text {
  flex: 1 1 auto;
  line-height: 1.65;
  white-space: pre-line;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 300;
}

.mech-math {
  margin: 8px 0;
}

.mech-intro {
  color: var(--text-main);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.mech-intro .mech-p,
.mech-intro .mech-bullet-text {
  color: var(--text-main);
}

.mech-subhead {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-main);
  margin: 22px 0 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  line-height: 1.4;
}

.mech-flow > .mech-subhead:first-child,
.mech-intro + .mech-subhead {
  border-top: none;
  padding-top: 0;
}

.mech-fade-actions,
.mech-end-actions {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.mech-end-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.btn-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-read-more:hover {
  background: var(--btn-border-hover);
  border-color: var(--border-strong);
  color: #ffffff;
}

.read-more-arrow {
  font-size: 12px;
  color: var(--text-subtle);
}

.btn-read-more:hover .read-more-arrow {
  color: var(--text-main);
}

/* ===== KaTeX equations ===== */
.katex { font-size: 1.08em; color: inherit; }
.katex-display {
  margin: 10px 0 14px;
  padding: 10px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 6px;
  white-space: normal;
}
.katex-display > .katex { white-space: nowrap; }

/* ===== Print Styles ===== */
@media print {
  .site-header,
  .admin-bar,
  .mobile-menu-drawer,
  .site-footer,
  .btn,
  .hero-actions,
  .carousel-controls {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #111827 !important;
  }
  .surface,
  .tech-card {
    background: #ffffff !important;
    border-color: #d1d5db !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  a {
    color: #111827 !important;
    text-decoration: none !important;
  }
}
