/* ═══════════════════════════════════════════════════════════════
   PicDriver Photography Gear Selection Tools
   Design System & Dark Mode Studio Styles
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #101420;
  --bg-tertiary: #161c2d;
  --bg-card: #141926;
  --bg-card-hover: #1a2133;
  --bg-surface: #1e263a;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-highlight: rgba(56, 189, 248, 0.35);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-indigo: #6366f1;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Roboto Mono', Menlo, Consolas, monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.65);
  --shadow-cyan: 0 0 24px rgba(56, 189, 248, 0.2);
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ════════════════ SITE HEADER ════════════════ */
.site-header {
  background-color: #05070a;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
}

.header-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 0 16px var(--accent-cyan-glow);
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-name span {
  color: var(--accent-cyan);
}

.brand-badge {
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-cyan);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.35rem;
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-cyan);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #05070a;
    flex-direction: column;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    z-index: 1001;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
  }
  .nav-links.open,
  .nav-links.show { display: flex; }
}

/* ════════════════ BREADCRUMB ════════════════ */
.breadcrumb-container {
  width: 100%;
  max-width: 1440px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

.breadcrumb a:hover {
  color: var(--accent-cyan);
}

.breadcrumb-sep {
  opacity: 0.4;
}

/* ════════════════ HERO BANNER ════════════════ */
.hero-section {
  width: 100%;
  max-width: 1440px;
  margin: 1.25rem auto 0;
  padding: 0 1.5rem;
}

.hero-banner {
  background: linear-gradient(135deg, rgba(20, 25, 38, 0.95), rgba(16, 20, 32, 0.95));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.banner-pills {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.pill-tool-type {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 189, 248, 0.28);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill-status {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.banner-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin-bottom: 0.4rem;
}

.banner-title span {
  background: linear-gradient(135deg, var(--accent-cyan), #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.banner-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 960px;
  line-height: 1.55;
}

/* ════════════════ 15 QUICK-SWITCH TOOL CHIPS ════════════════ */
.tool-strip-section {
  width: 100%;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-top: 1.25rem;
  position: sticky;
  top: 61px;
  z-index: 90;
  backdrop-filter: blur(12px);
}

.tool-strip-wrapper {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}

.tool-strip-wrapper::-webkit-scrollbar {
  height: 4px;
}

.tool-strip-wrapper::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}

.tool-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition);
  text-decoration: none;
}

.tool-chip:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.tool-chip.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(99, 102, 241, 0.16));
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

.chip-badge {
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.tool-chip.active .chip-badge {
  background: rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
}

/* ════════════════ 6 HORIZONTAL STATUS CARDS ════════════════ */
.metrics-section {
  width: 100%;
  max-width: 1440px;
  margin: 1.25rem auto 0;
  padding: 0 1.5rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
  width: 100%;
}

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

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

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  transition: var(--transition);
  cursor: pointer;
}

.metric-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.metric-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-sub {
  font-size: 0.72rem;
  color: var(--accent-emerald);
  margin-top: 0.25rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ════════════════ MAIN STUDIO WORKSPACE ════════════════ */
.studio-main {
  width: 100%;
  max-width: 1440px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 1.5rem;
  flex: 1;
}

.studio-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 1.5rem;
  align-items: start;
}

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

/* ════════════════ LEFT COLUMN: GEAR SELECTOR PANEL ════════════════ */
.selector-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card-frame {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.form-label span.label-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.custom-select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.custom-select:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.custom-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.custom-range {
  flex: 1;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.slider-val-badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  min-width: 65px;
  text-align: center;
}

.customizer-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.btn-secondary {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.65rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-secondary:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* ════════════════ RIGHT COLUMN: RECOMMENDATION & VISUALIZER ════════════════ */
.gear-dashboard-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Big Gear Deck Cards */
.gear-deck {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

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

.gear-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.gear-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}

.gear-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.gear-card-name {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.gear-card-icon {
  font-size: 0.95rem;
}

.gear-card-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.gear-card-value.accent-cyan { color: var(--accent-cyan); }
.gear-card-value.accent-amber { color: var(--accent-amber); }
.gear-card-value.accent-emerald { color: var(--accent-emerald); }
.gear-card-value.accent-purple { color: var(--accent-purple); }

.gear-card-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Interactive Sensor Canvas Visualizer */
.visualizer-card {
  background: #080a0f;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-md);
}

.visualizer-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}

.visualizer-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.visualizer-title span {
  color: var(--accent-cyan);
}

.visualizer-viewport {
  position: relative;
  width: 100%;
  height: 280px;
  background: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

#sensor-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sensor-legend {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* Detailed Compatibility & Specs Grid */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
}

.detail-header {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-key {
  color: var(--text-muted);
}

.detail-val {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.detail-val.tag-val {
  background: var(--bg-tertiary);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--accent-cyan);
}

/* Pro Advice Callout */
.pro-card {
  background: linear-gradient(135deg, rgba(20, 25, 38, 0.95), rgba(24, 32, 50, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.pro-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.pro-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pro-bullets li {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.pro-bullets li::before {
  content: "✦";
  color: var(--accent-cyan);
  font-weight: bold;
}

/* Action Deck */
.action-deck {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  border: none;
  color: #ffffff;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-outline:hover {
  background: var(--bg-card);
  border-color: rgba(56, 189, 248, 0.3);
}

/* ════════════════ 15-TOOL MATRIX TABLE ════════════════ */
.matrix-section {
  width: 100%;
  max-width: 1440px;
  margin: 3rem auto 0;
  padding: 0 1.5rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.section-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 800px;
}

.matrix-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.matrix-table th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.matrix-table tbody tr {
  cursor: pointer;
  transition: var(--transition);
}

.matrix-table tbody tr:hover td {
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-primary);
}

.matrix-table tbody tr.active td {
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent-cyan);
}

.matrix-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  vertical-align: middle;
}

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

.tool-name-cell {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.gear-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
}

.tag-body { background: rgba(56, 189, 248, 0.15); color: var(--accent-cyan); }
.tag-lens { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.tag-compat { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.tag-acc { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); }

/* ════════════════ EDUCATIONAL PHOTOGRAPHY GUIDE ════════════════ */
.guide-section {
  width: 100%;
  max-width: 1440px;
  margin: 3rem auto 0;
  padding: 0 1.5rem;
}

.guide-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
}

.guide-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.guide-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.guide-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.guide-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-formula-box {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent-cyan);
  padding: 0.5rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* ════════════════ FAQ ACCORDION SECTION ════════════════ */
.faq-section {
  width: 100%;
  max-width: 1440px;
  margin: 3rem auto 0;
  padding: 0 1.5rem;
}

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 1.1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-question:hover {
  color: var(--accent-cyan);
}

.faq-chevron {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: transform 0.25s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  padding: 0 1.25rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
  transition: max-height 0.3s ease-in-out;
}

/* ════════════════ TOAST NOTIFICATION ════════════════ */
.gear-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--accent-cyan);
  color: var(--text-primary);
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.75), 0 0 16px var(--accent-cyan-glow);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 1000;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(16px); }
}

/* ════════════════ SITE FOOTER ════════════════ */
.site-footer {
  background-color: #05070a;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  padding: 2.5rem 1.5rem;
}

.footer-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.footer-logo span {
  color: var(--accent-cyan);
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

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

/* ════════════════ DYNAMIC TOOL PANELS & SHOWDOWN ════════════════ */
.tool-specific-controls {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.tool-dynamic-panel {
  margin-bottom: 1.5rem;
}

.dynamic-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.dynamic-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.dynamic-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
}

.dynamic-card-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-info { background: rgba(56, 189, 248, 0.15); color: var(--accent-cyan); border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-danger { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.3); }

/* Showdown Comparison Table */
.showdown-table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

.showdown-table th,
.showdown-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.showdown-table th {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 700;
}

.showdown-table th:first-child { width: 28%; }
.showdown-table th:nth-child(2),
.showdown-table th:nth-child(3) { width: 36%; }

.showdown-table td.winner {
  color: var(--accent-cyan);
  font-weight: 700;
  background: rgba(56, 189, 248, 0.05);
}

.winner-tag {
  font-size: 0.68rem;
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  margin-left: 0.4rem;
  display: inline-block;
}

/* Flange & Gauge Bars */
.flange-meter {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.flange-bar-track {
  flex: 1;
  height: 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.flange-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.stat-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .stat-grid-2 { grid-template-columns: 1fr; }
}

.stat-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.stat-box-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-box-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-box-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}


/* ==========================================================================
   Universal Mobile & Tablet Responsiveness Suite (320px - 1040px)
   ========================================================================== */

/* 1. Fluid Media & Canvas Scaling */
img, canvas, svg, video {
  max-width: 100% !important;
  height: auto !important;
}

/* 2. Responsive Touch-Scroll Tables */
table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

.table-responsive,
.table-container,
.table-wrap,
.table-wrapper,
.matrix-container,
.data-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 3. Tablet Breakpoint (<= 1040px) */
@media (max-width: 1040px) {
  .workspace,
  .studio-layout,
  .finder-workspace,
  .simulator-grid,
  .layout-grid,
  .remover-workspace {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .sidebar-panel,
  .controls-sidebar {
    border-left: none !important;
    border-top: 1px solid var(--border, rgba(255,255,255,0.1));
  }
}

/* 4. Mobile Portrait & Landscape (<= 768px) */
@media (max-width: 768px) {
  .site-header {
    height: auto !important;
    padding: 10px 16px !important;
  }

  .header-inner,
  .header-container {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    width: 100%;
  }

  .logo,
  .brand-logo,
  .logo-wrap {
    font-size: 1.15rem !important;
  }

  .menu-toggle {
    display: block !important;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0a0d14;
    flex-direction: column;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.1));
    z-index: 1000;
  }

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

  .hero {
    padding: 28px 16px 20px !important;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 5.5vw, 2.3rem) !important;
    line-height: 1.2 !important;
  }

  .hero p {
    font-size: 0.92rem !important;
  }

  .page-wrapper,
  .portal-main,
  .container {
    padding: 16px 12px 40px !important;
  }

  .workspace,
  .studio-layout,
  .finder-workspace,
  .remover-workspace {
    padding: 0 !important;
    gap: 16px !important;
  }

  .panel-card,
  .results-card,
  .sidebar-panel,
  .stage-area,
  .card {
    padding: 16px 14px !important;
    border-radius: 12px !important;
  }

  .metrics-grid,
  .data-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .calc-grid,
  .features-grid,
  .steps-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .tool-chips-grid,
  .chips-bar,
  .preset-chip-group,
  .mode-tabs {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .tool-chip,
  .preset-btn,
  .mode-tab-btn {
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
  }

  .btn-primary,
  .btn-secondary,
  .action-btn,
  .btn-action {
    min-height: 44px;
    width: 100%;
    justify-content: center;
  }

  .btn-group,
  .action-btns,
  .download-row {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
  }

  th, td {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
  }
}

/* 5. Small Handsets (<= 480px) */
@media (max-width: 480px) {
  .hero-pill,
  .hero-badge {
    font-size: 0.72rem !important;
    padding: 3px 10px !important;
  }

  .form-group {
    margin-bottom: 14px !important;
  }

  .form-control,
  .form-select,
  .control-input,
  .control-select,
  input[type="text"],
  input[type="number"],
  select {
    font-size: 16px !important; /* Prevents auto-zoom in iOS Safari */
    min-height: 42px;
  }

  .info-section,
  .guide-section,
  .faq-section {
    padding: 24px 12px !important;
  }
}
