@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&family=Rajdhani:wght@500;600;700&family=JetBrains+Mono:ital,wght@0,400;0,500;0,700;1,400&display=swap');

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

:root {
  --bg:            #0A0A0A;
  --surface:       #111213;
  --card:          #1C1D1F;
  --card-hover:    #222426;
  --border:        rgba(255, 107, 0, 0.09);
  --border-light:  rgba(255, 107, 0, 0.22);
  --accent:        #FF6B00;
  --accent-bright: #FF9A3C;
  --accent-dim:    #C04E00;
  --text:          #E8E0D5;
  --text-muted:    #5A5550;
  --text-dim:      #3A3530;
  --sev-red:       #FF2D2D;
  --sev-orange:    #FF6B00;
  --sev-yellow:    #FFB800;
  --sev-green:     #39FF6A;
  --radius:        3px;
  --radius-sm:     2px;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  position: relative;
  overflow-x: hidden;
}

/* ── BACKGROUND SYSTEM ── */

/* Topographic photo layer — parallax, hue-shifted to orange, low opacity */
#site-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* height set dynamically by nav.js to account for parallax translation */
  z-index: 0;
  pointer-events: none;
  background-image: url('red-topo.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  filter: hue-rotate(22deg) saturate(1.1);
  opacity: 0.13;
  will-change: transform;
}

/* Topographic contour layer (keep as subtle overlay on top of photo) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0.5) 0%, transparent 70%);
}

/* CRT grain + vignette overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0,0,0,0.65) 100%);
  background-size: 200px 200px, 100% 100%;
}

/* Ensure all page content sits above background layers */
nav, main, footer, .scroll-progress {
  position: relative;
  z-index: 1;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
}

.nav-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-logo .logo-accent { color: var(--accent); }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s, text-shadow 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(255, 107, 0, 0.5);
}

/* ── NAV DROPDOWNS ── */
.nav-dropdown { position: relative; display: flex; align-items: center; }

.nav-dropdown-trigger {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s, text-shadow 0.2s;
  white-space: nowrap;
}

.nav-dropdown-trigger:hover,
.nav-dropdown.open .nav-dropdown-trigger {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(255, 107, 0, 0.5);
}

.nav-dd-arrow {
  font-size: 0.6rem;
  display: inline-block;
  transition: transform 0.2s;
  margin-top: 1px;
}

.nav-dropdown.open .nav-dd-arrow { transform: rotate(180deg); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 0;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
  z-index: 300;
  min-width: 200px;
  padding: 0.4rem 0;
}

.nav-dropdown.open .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
  display: block;
  padding: 0.42rem 1.1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  color: var(--accent);
  background: rgba(255, 107, 0, 0.06);
  text-shadow: 0 0 8px rgba(255, 107, 0, 0.4);
}

/* Mega menu — Tools dropdown */
.nav-mega-menu {
  left: auto;
  right: 0;
  transform: none;
  min-width: 660px;
  padding: 1rem 0.5rem;
}

/* Articles dropdown — align right edge under trigger, same as Tools */
.nav-dropdown:has([data-href="articles.html"]) .nav-dropdown-menu {
  left: auto;
  right: 0;
  transform: none;
}

.nav-dropdown.open .nav-mega-menu { display: flex; gap: 0; flex-wrap: wrap; }

.nav-mega-col {
  flex: 1;
  padding: 0 0.75rem;
  border-right: 1px solid var(--border);
}

.nav-mega-col:nth-child(3) { border-right: none; }

.nav-mega-heading {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dim);
  padding: 0.6rem 0.35rem 0.25rem;
  margin-top: 0.4rem;
  border-left: 2px solid var(--accent);
  padding-left: 0.5rem;
}

.nav-mega-col .nav-mega-heading:first-child { margin-top: 0; padding-top: 0; }

.nav-mega-col a {
  padding: 0.32rem 0.35rem;
  font-size: 0.78rem;
}

.nav-mega-viewall {
  width: 100%;
  padding: 0.6rem 0.75rem 0.25rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.nav-mega-viewall a {
  font-size: 0.75rem;
  color: var(--accent-dim);
  padding: 0;
}

.nav-mega-viewall a:hover {
  color: var(--accent);
  background: transparent;
}

/* ── LAYOUT ── */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── HERO ── */
.hero {
  padding: 5rem 0 4rem;
  max-width: 720px;
}

.hero-eyebrow {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.25rem;
}

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

.hero-intro {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 620px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #0A0A0A;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  line-height: 1;
}

.btn:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: rgba(255, 107, 0, 0.08);
  color: var(--accent-bright);
  border-color: var(--accent-bright);
  transform: translateY(-1px);
}

.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

/* ── SECTIONS ── */
.section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.section-heading {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.75rem;
}

/* ── TOOL CATEGORY LABEL ── */
.tool-category-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 2.25rem 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.tool-category-label:first-of-type { margin-top: 0; }

/* ── TOOL CARDS ── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, border-left-color 0.2s, background 0.2s, transform 0.15s, filter 0.2s;
  display: block;
  position: relative;
}

.tool-card::before,
.tool-card::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.tool-card::before {
  top: 5px;
  right: 5px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}

.tool-card::after {
  bottom: 5px;
  left: 5px;
  border-bottom: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}

a.tool-card:hover {
  border-color: var(--border-light);
  border-left-color: var(--accent);
  background: var(--card-hover);
  transform: translateY(-2px);
}

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

.tool-card.coming-soon {
  opacity: 0.38;
  pointer-events: none;
}

.tool-card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.tool-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.tool-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.tool-card-arrow {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

/* ── AD PLACEHOLDER ── */
.ad-placeholder {
  border: 1.5px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  text-align: center;
  color: var(--text-dim);
}

.ad-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: var(--text-dim);
}

.ad-size {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ── PAGE HEADER ── */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.page-header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.97rem;
  max-width: 600px;
  line-height: 1.7;
}

/* ── DIAGNOSIS FORM ── */
.diag-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.form-section-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--accent);
}

.form-section-label::before {
  content: '>_ ';
  opacity: 0.6;
  font-family: 'JetBrains Mono', monospace;
}

/* Issue selector */
.issue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.issue-option { position: relative; }

.issue-option input[type="radio"],
.issue-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.issue-option label {
  display: block;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  text-align: center;
  line-height: 1.4;
}

.issue-option input:checked + label {
  border-color: var(--accent);
  background: rgba(255, 107, 0, 0.1);
  color: var(--accent-bright);
}

.issue-option label:hover { border-color: var(--border-light); }

.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

/* Settings grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.field { display: flex; flex-direction: column; gap: 0.4rem; }

.field label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.field input,
.field select {
  background: #0A0A0A;
  border: 1px solid var(--border-light);
  border-bottom: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  color: var(--accent-bright);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23FF6B00' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  border-bottom-color: var(--accent);
  box-shadow: inset 0 0 12px rgba(255, 107, 0, 0.08);
  outline: none;
}

.field textarea {
  background: #0A0A0A;
  border: 1px solid var(--border-light);
  border-bottom: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  color: var(--accent-bright);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-family: 'JetBrains Mono', monospace;
  width: 100%;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea:focus {
  border-color: var(--accent);
  border-bottom-color: var(--accent);
  box-shadow: inset 0 0 12px rgba(255, 107, 0, 0.08);
  outline: none;
}
.field textarea::placeholder { color: rgba(255, 107, 0, 0.28); }

.field input::placeholder { color: rgba(255, 107, 0, 0.28); }

.field .field-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
}

/* Advanced toggle */
.advanced-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  margin-bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

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

#advancedPanel {
  display: none;
  margin-bottom: 1.25rem;
  padding-top: 0.5rem;
}

/* ── RESULTS ── */
#resultsWrap { display: none; margin-bottom: 3rem; }

.results-header {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.results-issue-name {
  color: var(--accent-bright);
}

.results-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Severity legend */
.sev-legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sev-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sev-dot.sev-red    { background: var(--sev-red);    box-shadow: 0 0 5px var(--sev-red); }
.sev-dot.sev-orange { background: var(--sev-orange); box-shadow: 0 0 5px var(--sev-orange); }
.sev-dot.sev-yellow { background: var(--sev-yellow); box-shadow: 0 0 5px var(--sev-yellow); }
.sev-dot.sev-green  { background: var(--sev-green);  box-shadow: 0 0 5px var(--sev-green); }

/* Result cards */
.result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.85rem;
  transition: border-left-color 0.2s;
}

.result-card:hover {
  border-left-color: var(--accent);
}

.result-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.result-dot-wrap {
  padding-top: 5px;
  flex-shrink: 0;
}

.result-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.result-rank {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 600;
}

.result-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.sev-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 20px;
}

.sev-badge.sev-red    { background: rgba(224, 82, 82, 0.15);   color: var(--sev-red); }
.sev-badge.sev-orange { background: rgba(232, 137, 42, 0.15);  color: var(--sev-orange); }
.sev-badge.sev-yellow { background: rgba(232, 200, 64, 0.15);  color: var(--sev-yellow); }
.sev-badge.sev-green  { background: rgba(63, 184, 130, 0.15);  color: var(--sev-green); }

.result-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  line-height: 1.65;
}

.result-fix {
  font-size: 0.85rem;
  background: rgba(255, 107, 0, 0.06);
  border-left: 3px solid var(--accent);
  padding: 0.6rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
  line-height: 1.65;
}

.no-results {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 1.5rem 0;
  text-align: center;
}

/* ── LIKELIHOOD BAR ── */
.results-layout {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.85rem;
  align-items: stretch;
}

.likelihood-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 0 1.25rem;
}

.lb-top-label,
.lb-bottom-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.35;
}

.lb-top-label    { color: var(--accent-bright); }
.lb-bottom-label { color: var(--text-dim); }

.lb-track {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.4rem 0;
}

.lb-line {
  flex: 1;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-bright) 0%, var(--text-dim) 100%);
  border-radius: 1px;
  min-height: 24px;
}

.lb-arrowhead {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 7px solid var(--text-dim);
  margin-top: 1px;
}

/* ── ZONE ROWS (temp tower & retraction tool) ── */
.zones-wrap { margin-bottom: 1.5rem; }

.zone-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.zone-row:first-child { border-top: 1px solid var(--border); }

.zone-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 170px;
  flex-shrink: 0;
}

.zone-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 50px;
}

.zone-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.zone-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  background: rgba(255, 107, 0, 0.1);
  color: var(--accent);
}

.zone-tag.bottom {
  background: rgba(62, 86, 110, 0.25);
  color: var(--text-dim);
}

.zone-select {
  flex: 1;
  background: #0A0A0A;
  border: 1px solid var(--border-light);
  border-bottom: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  color: var(--accent-bright);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23FF6B00' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
}

.zone-select:focus { border-color: var(--accent); }

/* ── RESULT CALLOUT ── */
.result-wrap {
  display: none;
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 3rem;
}

.result-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.result-big-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-bright);
  line-height: 1;
}

.result-big-unit {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.result-sublabel {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.result-delta {
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.result-delta.neutral { color: var(--sev-green); }
.result-delta.adjusted { color: var(--accent); }

.result-explanation {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.25rem;
}

.result-secondary {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  margin-top: 0.75rem;
  line-height: 1.65;
}

.result-warning {
  font-size: 0.85rem;
  color: var(--sev-yellow);
  background: rgba(232, 200, 64, 0.06);
  border-left: 3px solid var(--sev-yellow);
  padding: 0.6rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* Model link hint */
.model-link-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.85rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s, color 0.2s;
  background: var(--surface);
}

.model-link-hint:hover { border-color: var(--accent); color: var(--accent-bright); }

/* ── MODEL CARDS ── */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.model-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.15s, filter 0.2s;
}

.model-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.model-card:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.18);
}

.model-card-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  overflow: hidden;
  flex-shrink: 0;
}

.model-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.model-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.model-card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.model-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.model-card-tests {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.model-card-settings {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 107, 0, 0.04);
  border-left: 3px solid var(--border-light);
  padding: 0.5rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.model-card-settings strong { color: var(--text); }

.model-card-chips {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.model-card-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.model-card-download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #0A0A0A;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.2s;
}

.model-card-download:hover { background: var(--accent-bright); }

.model-card-printables {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.model-card-printables:hover {
  background: rgba(255, 107, 0, 0.08);
  color: var(--accent-bright);
  border-color: var(--accent-bright);
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 2rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover { color: var(--accent); }

/* ── SEARCHABLE SELECT ── */
.ss-wrap { position: relative; }

.ss-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s;
}

.ss-display:focus,
.ss-display.open { border-color: var(--accent); outline: none; }

.ss-placeholder {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.ss-selected-value {
  font-size: 0.9rem;
  color: var(--text);
}

.ss-arrow {
  color: var(--text-muted);
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
  transition: transform 0.2s;
}

.ss-display.open .ss-arrow { transform: rotate(180deg); }

.ss-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  z-index: 200;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.ss-dropdown.open { display: block; }

.ss-search {
  width: 100%;
  background: var(--surface);
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  padding: 0.6rem 0.85rem;
  outline: none;
}

.ss-search::placeholder { color: var(--text-dim); }

.ss-list {
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

.ss-group-label {
  padding: 0.45rem 0.85rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-dim);
  background: var(--surface);
  position: sticky;
  top: 0;
}

.ss-option {
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.12s, color 0.12s;
}

.ss-option:hover { background: rgba(255, 107, 0, 0.1); color: var(--accent-bright); }
.ss-option-active { color: var(--accent-bright) !important; }

.ss-no-results {
  padding: 1rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── DROP ZONE ── */
.drop-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--surface);
  margin-bottom: 1.5rem;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(255, 107, 0, 0.04);
}

.drop-zone.has-file {
  border-color: var(--sev-green);
  border-style: solid;
  background: rgba(63, 184, 130, 0.04);
  cursor: default;
}

.drop-zone-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
  line-height: 1;
  color: var(--text-dim);
}

.drop-zone.has-file .drop-zone-icon { color: var(--sev-green); }

.drop-zone-main {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.drop-zone-sub {
  font-size: 0.83rem;
  color: var(--text-muted);
}

.drop-zone-browse {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  font-weight: 500;
}

.drop-zone-browse:hover { color: var(--accent-bright); }

/* ── RESULT STATS GRID ── */
.result-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.result-stat { display: flex; flex-direction: column; gap: 0.2rem; }

.result-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.result-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

/* ── CALC TABLE (layer height optimizer) ── */
.calc-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.calc-table th {
  text-align: left;
  padding: 0.65rem 1.1rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.calc-table td {
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

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

.calc-table td.layer-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.calc-table tr.sweet-row td { background: rgba(255, 107, 0, 0.07); }
.calc-table tr.sweet-row td.layer-val { color: var(--accent-bright); }
.calc-table tr.ideal-row td { background: rgba(63, 184, 130, 0.08); }
.calc-table tr.ideal-row td.layer-val { color: var(--sev-green); }

/* ── RECOMMENDATION CARDS (infill optimizer) ── */
.rec-results { display: none; margin-bottom: 3rem; }

.rec-results-heading {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.rec-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.rec-card-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
}

.rec-card-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-bright);
  line-height: 1.15;
  margin-bottom: 0.15rem;
}

.rec-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.rec-card-why {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
}

.rec-support-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.rec-support-card.support-needed    { border-color: var(--accent); }
.rec-support-card.support-optional  { border-color: var(--sev-yellow); }
.rec-support-card.support-none      { border-color: var(--sev-green); }

.rec-support-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.rec-support-body {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── MATERIAL TABS (settings cheat sheet) ── */
.mat-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.mat-tab {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.mat-tab:hover { border-color: var(--border-light); color: var(--text); }
.mat-tab.active { border-color: var(--accent); color: var(--accent-bright); background: rgba(255, 107, 0, 0.08); }

.cheat-panel { display: none; }
.cheat-panel.active { display: block; }

.cheat-row {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.cheat-row:first-child { border-top: 1px solid var(--border); }

.cheat-label {
  min-width: 180px;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 0.1rem;
}

.cheat-value {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.65;
}

.cheat-value strong { color: var(--accent-bright); font-family: 'JetBrains Mono', monospace; font-weight: 700; }

.cheat-note {
  font-size: 0.83rem;
  color: var(--text-muted);
  background: rgba(255, 107, 0, 0.05);
  border-left: 3px solid var(--border-light);
  padding: 0.6rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 1rem;
  line-height: 1.7;
}

/* ── DRYING CARDS ── */
.drying-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.drying-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
}

.drying-card:hover { border-color: var(--border-light); }
.drying-card.selected { border-color: var(--accent); background: rgba(255, 107, 0, 0.07); }

.drying-card-mat {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.55rem;
}

.drying-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 0.22rem 0;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.drying-stat:last-child { border-bottom: none; }
.drying-stat strong { color: var(--text); }

/* ── TIMER ── */
.timer-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.timer-mat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.timer-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: 0.04em;
  line-height: 1;
  margin: 0.5rem 0 0.25rem;
}

.timer-display.done { color: var(--sev-green); }
.timer-display.idle { color: var(--text-dim); }

.timer-sublabel {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.timer-progress {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.75rem auto 1.5rem;
  max-width: 400px;
}

.timer-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 100%;
  transition: width 1s linear, background 0.3s;
}

.timer-progress-fill.done { background: var(--sev-green); }

.timer-controls { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.timer-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: #0A0A0A;
  cursor: pointer;
  transition: background 0.2s;
}

.timer-btn:hover { background: var(--accent-bright); border-color: var(--accent-bright); }

.timer-btn.secondary {
  background: transparent;
  color: var(--accent);
}

.timer-btn.secondary:hover { background: rgba(255, 107, 0, 0.1); }

/* ── VARIANCE MEASUREMENT INPUTS ── */
.meas-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }

.meas-row { display: flex; gap: 0.5rem; align-items: center; }

.meas-row input {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.2s;
}

.meas-row input:focus { border-color: var(--accent); }
.meas-row input::placeholder { color: var(--text-dim); }

.meas-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  min-width: 24px;
  text-align: right;
  flex-shrink: 0;
}

.meas-remove {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 1rem;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

.meas-remove:hover { border-color: var(--sev-red); color: var(--sev-red); }

.add-meas-btn {
  background: none;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  width: 100%;
  text-align: center;
  margin-bottom: 1.25rem;
}

.add-meas-btn:hover { border-color: var(--accent); color: var(--accent-bright); }

/* ── GRADE BADGE ── */
.grade-badge {
  display: inline-block;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-left: 0.75rem;
  vertical-align: middle;
}

.grade-excellent { background: rgba(63, 184, 130, 0.15); color: var(--sev-green); }
.grade-good      { background: rgba(255, 107, 0, 0.12); color: var(--accent-bright); }
.grade-fair      { background: rgba(232, 200, 64, 0.15);  color: var(--sev-yellow); }
.grade-poor      { background: rgba(224, 82, 82, 0.15);   color: var(--sev-red); }

/* ── SEARCH ── */
.search-wrap { position: relative; margin-bottom: 1.5rem; }
.search-icon { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; font-size: 1rem; }
.search-input {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-dim); }

/* ── TROUBLESHOOTING DB ── */
.db-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (max-width: 700px) { .db-grid { grid-template-columns: 1fr; } }
.db-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem 1rem; font-size: 0.9rem; }
.db-category { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.25rem; }
.db-symptom { font-family: 'Orbitron', sans-serif; font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
.db-causes { font-size: 0.8rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 0.35rem; }
.db-fixes { font-size: 0.8rem; color: var(--text-muted); line-height: 1.65; }
.db-causes strong, .db-fixes strong { color: var(--text); display: block; margin-bottom: 0.2rem; }
.db-causes ol, .db-fixes ul { padding-left: 1.25rem; margin: 0; }
.db-causes ol li, .db-fixes ul li { padding-left: 0.2rem; }
.db-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.75rem; }
.db-tag { font-size: 0.68rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 20px; background: rgba(255,107,0,0.1); color: var(--accent); }
.db-empty { text-align: center; color: var(--text-muted); padding: 3rem; font-size: 0.95rem; }

/* ── FIRMWARE DIFF ── */
.diff-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.diff-textarea {
  width: 100%; height: 220px;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-family: 'Courier New', monospace; font-size: 0.78rem;
  padding: 0.75rem; outline: none; resize: vertical; transition: border-color 0.2s;
}
.diff-textarea:focus { border-color: var(--accent); }
.diff-output { margin-top: 1.5rem; }
.diff-section { margin-bottom: 1.5rem; }
.diff-section-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.6rem; }
.diff-line { font-family: 'Courier New', monospace; font-size: 0.82rem; padding: 0.22rem 0.75rem; border-radius: 3px; margin-bottom: 2px; line-height: 1.5; word-break: break-all; }
.diff-add { background: rgba(63,184,130,0.1); color: var(--sev-green); }
.diff-remove { background: rgba(224,82,82,0.1); color: var(--sev-red); }
.diff-changed { background: rgba(232,200,64,0.08); color: var(--sev-yellow); }
.diff-same-count { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.5rem; }
.diff-empty { font-size: 0.88rem; color: var(--text-muted); padding: 1rem 0; }

/* ── CANVAS (G-code viewer) ── */
.canvas-wrap { background: #060c18; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; position: relative; }
.canvas-wrap canvas { display: block; width: 100%; height: auto; }
.canvas-controls { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.75rem 0; }
.canvas-controls input[type="range"] { flex: 1; min-width: 120px; accent-color: var(--accent); }
.canvas-layer-label { font-family: 'Rajdhani', sans-serif; font-size: 0.88rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.canvas-legend { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 1rem; }
.canvas-legend-item { display: flex; align-items: center; gap: 0.4rem; }
.canvas-legend-line { width: 24px; height: 3px; border-radius: 2px; }

/* ── PROFILE OUTPUT ── */
.profile-output {
  font-family: 'Courier New', monospace; font-size: 0.82rem; line-height: 1.75;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; white-space: pre-wrap;
  margin-bottom: 1rem; max-height: 560px; overflow-y: auto;
}
.copy-btn {
  background: none; border: 1px solid var(--border); color: var(--accent);
  font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; font-weight: 500;
  padding: 0.4rem 1rem; border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color 0.2s, color 0.2s; margin-bottom: 2rem;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent-bright); }
.copy-btn.copied { color: var(--sev-green); border-color: var(--sev-green); }

/* ── FAQ ACCORDION ── */
.faq-category-label { font-family: 'Rajdhani', sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin: 2rem 0 0.5rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
.faq-list { margin-bottom: 0.5rem; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 0; cursor: pointer; font-size: 0.92rem; font-weight: 500; color: var(--text); gap: 1rem; user-select: none; transition: color 0.2s; background: none; border: none; width: 100%; text-align: left; }
.faq-q:hover { color: var(--accent-bright); }
.faq-chevron { color: var(--text-dim); flex-shrink: 0; transition: transform 0.2s; font-size: 0.75rem; }
.faq-item[data-open="true"] .faq-chevron { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 0 1rem; font-size: 0.88rem; color: var(--text-muted); line-height: 1.8; }
.faq-item[data-open="true"] .faq-a { display: block; }
.faq-a a { color: var(--accent); text-decoration: none; }
.faq-a a:hover { color: var(--accent-bright); text-decoration: underline; }

/* ── AMS PLANNER ── */
.ams-slots { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1rem; }
.ams-slot { display: grid; grid-template-columns: 28px 1fr 1fr auto; gap: 0.65rem; align-items: center; }
.ams-slot-num { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 0.85rem; color: var(--text-dim); text-align: center; }
.ams-order-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.65rem 0.9rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.75rem; font-size: 0.88rem; }
.ams-order-num { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--text-dim); min-width: 20px; }
.ams-order-name { color: var(--text); font-weight: 500; flex: 1; }
.ams-order-purge { font-size: 0.78rem; color: var(--text-muted); }

/* ── NAV MEGA MENU FOOTER ── */
.nav-mega-viewall {
  grid-column: 1 / -1;
  width: 100%;
  border-top: 1px solid var(--border);
  padding: 0.6rem 0 0.1rem;
  margin-top: 0.4rem;
  text-align: right;
}
.nav-mega-viewall a {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-mega-viewall a:hover { color: var(--accent-bright); }

/* ── HOME PAGE ── */
.home-main { padding-top: 0; }

/* ── HOME HERO — GLITCH TERMINAL ── */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 5vw;
  display: grid;
  grid-template-columns: 1fr 640px;
  align-items: center;
  gap: 4rem;
  font-family: 'Share Tech Mono', monospace;
}

.hero-left {
  min-width: 0;
  text-align: left;
  position: relative;
  z-index: 5;
}

.hero-right {
  min-width: 0;
  position: relative;
  z-index: 5;
}

.home-h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.h1-accent { color: var(--accent); }

.home-hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 480px;
  margin: 0 0 2rem;
}

/* CRT scanlines */
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.18) 3px,
    rgba(0,0,0,0.18) 4px
  );
  pointer-events: none;
  z-index: 2;
}

/* VHS flicker */
.home-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(255,106,0,0.012) 2px,
    rgba(255,106,0,0.012) 4px
  );
  animation: vhsFlicker 0.12s steps(1) infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes vhsFlicker {
  0%   { opacity: 1; }
  33%  { opacity: 0.92; }
  66%  { opacity: 0.97; }
  100% { opacity: 1; }
}

.hero-scanline-sweep {
  position: absolute;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(255,106,0,0.12), transparent);
  animation: heroSweep 1.2s ease-out forwards;
  z-index: 20;
  pointer-events: none;
}

@keyframes heroSweep {
  0%   { top: -60px; }
  100% { top: 110%; }
}

.hero-inner {
  position: relative;
  width: 100%;
  padding: 36px 28px;
  text-align: left;
}

/* HUD corner brackets */
.hud-frame {
  position: absolute;
  inset: -20px;
  pointer-events: none;
}
.hud-frame .tl,
.hud-frame .tr,
.hud-frame .bl,
.hud-frame .br {
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: #ff6a00;
  border-style: solid;
  opacity: 0.6;
}
.hud-frame .tl { top: 0;    left: 0;   border-width: 2px 0 0 2px; }
.hud-frame .tr { top: 0;    right: 0;  border-width: 2px 2px 0 0; }
.hud-frame .bl { bottom: 0; left: 0;   border-width: 0 0 2px 2px; }
.hud-frame .br { bottom: 0; right: 0;  border-width: 0 2px 2px 0; }

/* Boot lines */
.boot-lines {
  margin-bottom: 40px;
  animation: heroFadeIn 0.4s 0.3s both;
}
.boot-line {
  font-size: 11px;
  color: rgba(255,106,0,0.27);
  letter-spacing: 2px;
  line-height: 1.9;
  font-family: 'Share Tech Mono', monospace;
}
.boot-line .ok { color: #44ff88; }

/* Status line */
.term-status {
  font-size: 11px;
  color: rgba(255,106,0,0.4);
  letter-spacing: 3px;
  margin-bottom: 28px;
  font-family: 'Share Tech Mono', monospace;
  animation: heroFadeIn 0.4s 0.8s both;
}
.term-status span { color: rgba(255,106,0,0.73); }

/* Tagline between status and headline */
.term-tagline {
  font-family: 'Share Tech Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(255,106,0,0.73);
  text-transform: uppercase;
  margin-bottom: 18px;
  text-shadow: 0 0 8px rgba(255,106,0,0.55), 0 0 20px rgba(255,106,0,0.25);
  animation: heroFadeIn 0.4s 1s both;
}

/* Glitch headline */
.glitch-headline {
  font-family: 'VT323', monospace;
  font-size: clamp(28px, 5.5vw, 62px);
  color: #ff6a00;
  line-height: 1.1;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
  text-shadow: 0 0 6px rgba(255,106,0,0.25);
  animation: heroFadeIn 0.3s 1s both;
}
.glitch-headline::before,
.glitch-headline::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  overflow: hidden;
}
.glitch-headline::before {
  color: #ff2200;
  animation: glitchTop 4s steps(1) infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}
.glitch-headline::after {
  color: #ff8c00;
  animation: glitchBot 4s steps(1) infinite;
  clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
}
@keyframes glitchTop {
  0%, 90%, 100% { transform: translate(0); opacity: 0; }
  91% { transform: translate(-3px, -1px); opacity: 0.7; }
  93% { transform: translate(3px, 1px); opacity: 0.6; }
  95% { transform: translate(-2px, 0); opacity: 0.8; }
  97% { transform: translate(0); opacity: 0; }
}
@keyframes glitchBot {
  0%, 85%, 100% { transform: translate(0); opacity: 0; }
  86% { transform: translate(4px, 1px); opacity: 0.6; }
  89% { transform: translate(-3px, -1px); opacity: 0.5; }
  92% { transform: translate(0); opacity: 0; }
}

/* Divider */
.term-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, #ff6a00, rgba(255,106,0,0));
  margin: 20px 0;
  animation: heroFadeIn 0.4s 1.2s both;
}

/* Sub headline */
.glitch-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(13px, 1.9vw, 18px);
  color: #ff9a44;
  letter-spacing: 4px;
  opacity: 0.9;
  position: relative;
  display: inline-block;
  animation: heroFadeIn 0.4s 1.4s both;
}

/* Metrics */
.term-metrics {
  display: flex;
  gap: 32px;
  margin: 28px 0 36px;
  animation: heroFadeIn 0.4s 1.6s both;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric-label {
  font-size: 9px;
  color: rgba(255,106,0,0.33);
  letter-spacing: 3px;
  font-family: 'Share Tech Mono', monospace;
}
.metric-value {
  font-size: 20px;
  color: #ff6a00;
  font-family: 'VT323', monospace;
  letter-spacing: 1px;
}

/* Terminal buttons */
.term-btns {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  animation: heroFadeIn 0.4s 1.8s both;
}
.term-btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  letter-spacing: 3px;
  padding: 14px 32px;
  background: transparent;
  border: 1px solid #ff6a00;
  color: #ff6a00;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.2s, text-shadow 0.2s;
  text-shadow: 0 0 8px rgba(255,106,0,0.4);
  box-shadow: 0 0 12px rgba(255,106,0,0.13), inset 0 0 12px rgba(255,106,0,0.07);
  text-decoration: none;
  display: inline-block;
}
.term-btn::before {
  content: '> ';
  opacity: 0.5;
}
.term-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #ff6a00;
  transform: translateX(-101%);
  transition: transform 0.25s ease;
  z-index: -1;
}
.term-btn:hover {
  color: #000;
  text-shadow: none;
  box-shadow: 0 0 24px rgba(255,106,0,0.33);
}
.term-btn:hover::after { transform: translateX(0); }
.term-btn.primary {
  background: #ff6a00;
  color: #000;
  font-weight: bold;
  text-shadow: none;
}
.term-btn.primary::after { background: #ff9a44; }
.term-btn.primary:hover { color: #000; }

/* Blinking cursor inside headline */
.hero-cursor {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: #ff6a00;
  vertical-align: text-bottom;
  margin-left: 4px;
  animation: heroCursorBlink 0.9s linear infinite;
}

@keyframes heroCursorBlink {
  0%, 49% { background: #ff6a00; }
  50%, 100% { background: transparent; }
}

@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── STATS BAR ── */
.home-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 2rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.home-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2.5rem;
}

.home-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.home-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-stat-div {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ── HOME SECTIONS ── */
.home-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem 0;
}

.home-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.home-section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.home-section-link {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.home-section-link:hover { color: var(--accent-bright); }

/* ── FEATURED TOOL CARDS ── */
.home-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.home-featured-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  transition: border-color 0.2s, border-left-color 0.2s, background 0.2s, transform 0.15s, filter 0.2s;
}
.home-featured-card:hover {
  border-color: var(--border-light);
  border-left-color: var(--accent);
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(255, 107, 0, 0.12);
}

.home-featured-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 42px;
  text-align: center;
}

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

.home-featured-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.home-featured-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.home-featured-arrow {
  font-size: 1rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.home-featured-card:hover .home-featured-arrow { transform: translateX(3px); }

/* ── CATEGORY GRID ── */
.home-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.home-cat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--cat-color, var(--accent-dim));
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.1rem;
  text-decoration: none;
  transition: border-color 0.2s, border-left-color 0.2s, background 0.2s, transform 0.15s, filter 0.2s;
}
.home-cat-card:hover {
  border-color: var(--border-light);
  border-left-color: var(--cat-color, var(--accent));
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(255, 107, 0, 0.12);
}

.home-cat-icon { font-size: 1.5rem; margin-bottom: 0.7rem; }

.home-cat-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.home-cat-count {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.home-cat-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── VALUE SECTION ── */
.home-value {
  max-width: 1400px;
  margin: 5rem auto 0;
  padding: 2.5rem 2rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-value-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.home-value-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.home-value-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.home-bullet {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.home-bullet-icon {
  color: var(--sev-green);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* ── HAMBURGER BUTTON (hidden on desktop) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  transition: background 0.2s, transform 0.25s, opacity 0.2s;
  transform-origin: center;
}
.nav-hamburger:hover span { background: var(--accent); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE MENU (hidden by default) ── */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  flex-direction: column;
  z-index: 99;
}
.nav-mobile-menu a {
  display: block;
  padding: 0.9rem 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s, background 0.15s;
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a:hover,
.nav-mobile-menu a:active {
  color: var(--accent);
  background: rgba(255, 107, 0, 0.05);
  text-shadow: 0 0 8px rgba(255, 107, 0, 0.4);
}
.nav-mobile-menu.open { display: flex; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  nav { padding: 0 1rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  main { padding: 0 1rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .diag-form { padding: 1.25rem; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .issue-grid { grid-template-columns: 1fr 1fr; }
  .sev-legend { gap: 0.75rem; }
  .likelihood-bar { display: none; }
  .results-layout { grid-template-columns: 1fr; }
  .home-hero { grid-template-columns: 1fr; padding: 3rem 1.25rem 2.5rem; gap: 2rem; }
  .hero-inner { padding: 28px 20px; }
  .glitch-headline { font-size: clamp(18px, 6vw, 32px); }
  .term-metrics { gap: 20px; flex-wrap: wrap; }
  .home-value-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .home-cat-grid { grid-template-columns: 1fr 1fr; }

  /* Stats: 2×2 grid with 5th centered underneath */
  .home-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    -webkit-mask-image: none;
    mask-image: none;
    padding: 1.25rem 0.5rem;
  }
  .home-stat-div { display: none; }
  .home-stat { padding: 0.85rem 1rem; }
  .home-stat:nth-child(9) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
    justify-content: center;
  }

  /* Hide printer diagram (too small on mobile) */
  .printer-nav { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   PREMIUM REFINEMENTS — added alongside motion.css
   ══════════════════════════════════════════════════════════════════ */

/* ── Octagonal chamfer corners + shadow system ── */
.tool-card,
.home-featured-card,
.home-cat-card,
.model-card {
  clip-path: polygon(
    12px 0%, calc(100% - 12px) 0%,
    100% 12px, 100% calc(100% - 12px),
    calc(100% - 12px) 100%, 12px 100%,
    0% calc(100% - 12px), 0% 12px
  );
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

a.tool-card:hover,
.home-featured-card:hover,
.home-cat-card:hover,
.model-card:hover {
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 16px rgba(255, 107, 0, 0.12));
}

/* ── Enhanced tool card gradient border on hover ── */
a.tool-card:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  position: relative;
}

/* ── Premium button refinement ── */
.btn {
  position: relative;
  overflow: hidden;
}

.btn:not(.btn-outline) {
  box-shadow: 0 2px 12px rgba(255, 107, 0, 0.2);
}

.btn:not(.btn-outline):hover {
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.3);
}

/* ── Better page-header ── */
.page-header h1 {
  position: relative;
}

/* ── Main workbench texture ── */
main {
  background-image:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(255, 107, 0, 0.04) 0%,
      transparent 60%
    );
}

/* ── Hero eyebrow on home page ── */
.hero-eyebrow {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ── Spool chip color override for text ── */
.spool-chip {
  color: var(--spool-color, var(--text-muted));
}

/* ── result-stats-grid spacing fix for about page ── */
.result-stats-grid {
  gap: 0.75rem;
}

/* ── DB photo placeholder ── */
.db-photo {
  width: 100%;
  height: 80px;
  background: var(--surface);
  border: 1.5px dashed var(--border-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  overflow: hidden;
}

.db-photo-placeholder {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
  padding: 0.5rem;
}

/* ── Bruno Ace SC — headings & card names ── */
h1, h2, h3,
.home-cat-name,
.home-section-title,
.db-symptom,
.rec-card-label,
.home-featured-title,
.tool-category-label,
.spool-chip {
  font-family: 'Rajdhani', sans-serif;
}

