/* ═══════════════════════════════════════════════════════════
   CyberNash — styles.css
   Aesthetic: Editorial security intelligence
   Warm parchment base · ink-black type · electric teal accent
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');


/* ════════════════════════════════════════
   DESIGN TOKENS
   ════════════════════════════════════════ */
:root {
  /* Backgrounds */
  --bg:           #f2efe8;
  --bg2:          #eceae1;
  --card:         #faf9f5;

  /* Type */
  --ink:          #0f0f0f;
  --ink-dim:      #6b6860;
  --ink-faint:    #b5b2aa;

  /* Borders */
  --border:       rgba(15, 15, 15, 0.10);
  --border2:      rgba(15, 15, 15, 0.18);

  /* Teal — primary accent */
  --teal:         #007a6e;
  --teal-light:   #e0f4f2;
  --teal-mid:     #c2eae6;

  /* Semantic colours */
  --red:          #c0392b;
  --red-light:    #fdf0ee;
  --red-mid:      #f5c6c2;

  --amber:        #b45309;
  --amber-light:  #fef9ec;
  --amber-mid:    #fde68a;

  --blue:         #1d4ed8;
  --blue-light:   #eff6ff;
  --blue-mid:     #bfdbfe;

  --green:        #166534;
  --green-light:  #f0fdf4;
  --green-mid:    #bbf7d0;

  /* Shape & depth */
  --radius:       14px;
  --radius-sm:    8px;
  --shadow:       0 1px 2px rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.07);
  --shadow-lg:    0 2px 4px rgba(0,0,0,0.04), 0 8px 40px rgba(0,0,0,0.10);

  /* Typography */
  --font-sans:    'Outfit', sans-serif;
  --font-serif:   'Playfair Display', serif;
  --font-mono:    'JetBrains Mono', monospace;
}


/* ════════════════════════════════════════
   RESET & BASE
   ════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle grain texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.6;
}


/* ════════════════════════════════════════
   TOPBAR
   ════════════════════════════════════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(242, 239, 232, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border2);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  background: var(--ink);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(0, 122, 110, 0.55));
}

.brand-mark svg {
  position: relative;
  z-index: 1;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.brand-name em {
  color: var(--teal);
  font-style: normal;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-left: 1px solid var(--border2);
  padding-left: 12px;
}

/* Status pill */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.status-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.idle              { background: var(--bg2);          color: var(--ink-dim); }
.status-dot.idle::before      { background: var(--ink-faint); }

.status-dot.running           { background: var(--amber-light);  color: var(--amber); border-color: var(--amber-mid); animation: pulse-status 1s ease-in-out infinite; }
.status-dot.running::before   { background: var(--amber); }

.status-dot.done              { background: var(--teal-light);   color: var(--teal);  border-color: var(--teal-mid); }
.status-dot.done::before      { background: var(--teal); }

@keyframes pulse-status {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.clock {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}


/* ════════════════════════════════════════
   PAGE LAYOUT
   ════════════════════════════════════════ */
.layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

/* ── Sidebar ── */
.sidebar {
  width: 290px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

/* ── Main ── */
.main {
  flex: 1;
  min-width: 0;
}


/* ════════════════════════════════════════
   CARD
   ════════════════════════════════════════ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  /* overflow: hidden removed — it was clipping range input hit areas */
}

.card-head {
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.card-head-icon {
  font-size: 14px;
  line-height: 1;
}

.card-head-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.card-body {
  padding: 16px 18px;
}


/* ════════════════════════════════════════
   UPLOAD ZONE
   ════════════════════════════════════════ */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 14px;
  border: 2px dashed var(--border2);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--teal);
  background: var(--teal-light);
}

.upload-icon-wrap {
  width: 44px;
  height: 44px;
  background: var(--bg2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.2s;
}

.upload-zone:hover .upload-icon-wrap {
  transform: translateY(-2px);
}

.upload-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.upload-hint {
  font-size: 11px;
  color: var(--ink-dim);
  line-height: 1.6;
}

.upload-success {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--teal-light);
  border: 1px solid var(--teal-mid);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--teal);
  line-height: 1.6;
}


/* ════════════════════════════════════════
   HARDENING SLIDERS
   ════════════════════════════════════════ */
.harden-item {
  margin-bottom: 14px;
}

.harden-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.harden-label {
  font-size: 12px;
  font-weight: 500;
}

.harden-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg2);
  color: var(--teal);
  padding: 1px 7px;
  border-radius: 4px;
  min-width: 32px;
  text-align: center;
}

/* Custom visual track */

.harden-track {
  width: 100%;
  height: 4px;
  background: var(--bg2);
  border-radius: 2px;
  overflow: hidden;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.harden-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--teal);
  transition: width 0.15s;
}

input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 20;
  pointer-events: auto;
  margin: 0;
  padding: 0;
}

.harden-track,
.harden-fill {
  pointer-events: none;
}

/* Ensure slider-wrap creates its own stacking context */
.slider-wrap {
  position: relative;
  height: 20px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  isolation: isolate;
}

.harden-desc {
  font-size: 10px;
  color: var(--ink-faint);
  margin-top: 3px;
}


/* ════════════════════════════════════════
   DEFENSE SCORE CARD
   ════════════════════════════════════════ */
.score-card {
  background: linear-gradient(135deg, var(--teal-light) 0%, var(--card) 100%);
  border: 1px solid var(--teal-mid);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 14px 0;
}

.score-label-sm {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-dim);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.score-top {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 8px;
}

.score-num {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}

.score-denom {
  font-size: 14px;
  color: var(--ink-dim);
}

.score-bar-wrap {
  height: 5px;
  background: rgba(0, 122, 110, 0.15);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.score-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.35s, background 0.35s;
}

.score-posture {
  font-size: 12px;
  font-weight: 600;
}


/* ════════════════════════════════════════
   ADVANCED PARAMETERS PANEL
   ════════════════════════════════════════ */
.adv-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-dim);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.adv-toggle:hover,
.adv-toggle[aria-expanded="true"] {
  background: var(--teal-light);
  border-color: var(--teal);
  color: var(--teal);
}

.adv-arrow {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.2s;
}

.adv-toggle[aria-expanded="true"] .adv-arrow {
  transform: rotate(90deg);
}

.adv-panel {
  display: none;
  padding-top: 14px;
}

.adv-panel.open {
  display: block;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Parameter items inside the panel */
.param-section-title {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal);
  margin: 14px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--teal-mid);
}

.param-section-title:first-child {
  margin-top: 0;
}

.param-item {
  margin-bottom: 12px;
}

.param-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.param-name {
  font-size: 11px;
  color: var(--ink-dim);
}

.param-val {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--blue);
  background: var(--blue-light);
  padding: 1px 6px;
  border-radius: 3px;
}


/* ════════════════════════════════════════
   RUN BUTTON
   ════════════════════════════════════════ */
.btn-run {
  position: relative;
  width: 100%;
  padding: 13px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.22s, box-shadow 0.22s;
}

/* Teal shimmer overlay */
.btn-run::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(0, 122, 110, 0.3));
  opacity: 0;
  transition: opacity 0.22s;
}

.btn-run:hover:not(:disabled)::before  { opacity: 1; }
.btn-run:hover:not(:disabled)          { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,0,0,0.25); }
.btn-run:active:not(:disabled)         { transform: translateY(0); }
.btn-run:disabled                      { opacity: 0.35; cursor: not-allowed; }


/* ════════════════════════════════════════
   IDLE SCREEN
   ════════════════════════════════════════ */
.idle-screen {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 56px 40px;
  text-align: center;
  overflow: hidden;
}

/* Decorative blobs */
.idle-screen::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--teal-light) 0%, transparent 70%);
  border-radius: 50%;
}

.idle-screen::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--amber-light) 0%, transparent 70%);
  border-radius: 50%;
}

.idle-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--teal-light);
  border: 1px solid var(--teal-mid);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--teal);
}

.idle-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.idle-sub {
  position: relative;
  z-index: 1;
  font-size: 15px;
  color: var(--ink-dim);
  line-height: 1.7;
  max-width: 460px;
  margin: 0 auto 28px;
}

.idle-steps {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
}

.step:first-child { border-radius: 8px 0 0 8px; }
.step:last-child  { border-radius: 0 8px 8px 0; }
.step + .step     { border-left: none; }

.step-num {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 800;
  color: var(--teal);
}

.idle-hint {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.8;
}

.idle-hint code {
  font-family: var(--font-mono);
  background: var(--teal-light);
  color: var(--teal);
  padding: 1px 6px;
  border-radius: 3px;
}


/* ════════════════════════════════════════
   RESULTS — SECTIONS
   ════════════════════════════════════════ */
.section {
  margin-bottom: 28px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-sub {
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 16px;
}


/* ════════════════════════════════════════
   ALERT BANNER
   ════════════════════════════════════════ */
.alert-banner {
  display: none;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  box-shadow: var(--shadow);
}

.alert-banner.danger  { background: var(--red-light);   border: 1px solid var(--red-mid);   color: var(--red); }
.alert-banner.warning { background: var(--amber-light); border: 1px solid var(--amber-mid); color: var(--amber); }
.alert-banner.safe    { background: var(--teal-light);  border: 1px solid var(--teal-mid);  color: var(--teal); }

.alert-icon-wrap {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.alert-banner.danger  .alert-icon-wrap { background: var(--red-mid); }
.alert-banner.warning .alert-icon-wrap { background: var(--amber-mid); }
.alert-banner.safe    .alert-icon-wrap { background: var(--teal-mid); }

.alert-text strong {
  display: block;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}


/* ════════════════════════════════════════
   METRIC CARDS
   ════════════════════════════════════════ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.metric-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Coloured bottom stripe */
.metric-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
}

.metric-card.c-teal::after  { background: var(--teal); }
.metric-card.c-red::after   { background: var(--red); }
.metric-card.c-amber::after { background: var(--amber); }
.metric-card.c-blue::after  { background: var(--blue); }
.metric-card.c-green::after { background: var(--green); }
.metric-card.c-ink::after   { background: var(--ink); }

.metric-emoji {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 10px;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 6px;
}

.metric-value {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.metric-card.c-teal  .metric-value { color: var(--teal); }
.metric-card.c-red   .metric-value { color: var(--red); }
.metric-card.c-amber .metric-value { color: var(--amber); }
.metric-card.c-blue  .metric-value { color: var(--blue); }
.metric-card.c-green .metric-value { color: var(--green); }
.metric-card.c-ink   .metric-value { color: var(--ink); font-size: 18px; padding-top: 4px; }

.metric-sub {
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.5;
}


/* ════════════════════════════════════════
   NASH EQUILIBRIUM CARD
   ════════════════════════════════════════ */
.nash-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  overflow: hidden;
}

/* Large ghost watermark text */
.nash-card::before {
  content: 'EQUILIBRIUM';
  position: absolute;
  right: -8px; top: 16px;
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 800;
  color: rgba(0, 122, 110, 0.04);
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.nash-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nash-badge.b-pure  { background: var(--teal-light);  color: var(--teal);    border: 1px solid var(--teal-mid); }
.nash-badge.b-mixed { background: var(--amber-light); color: var(--amber);   border: 1px solid var(--amber-mid); }
.nash-badge.b-none  { background: var(--bg2);         color: var(--ink-dim); border: 1px solid var(--border); }

.nash-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.nash-body {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.75;
}

.nash-body strong {
  color: var(--ink);
  font-weight: 600;
}

/* Defender vs attacker split */
.nash-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.nash-side {
  padding: 18px;
  border-radius: 10px;
  text-align: center;
}

.nash-side.ns-def { background: var(--blue-light); border: 1px solid var(--blue-mid); }
.nash-side.ns-atk { background: var(--red-light);  border: 1px solid var(--red-mid); }

.nash-side-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
}

.nash-side-value {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.nash-side.ns-def .nash-side-value { color: var(--blue); }
.nash-side.ns-atk .nash-side-value { color: var(--red); }

.nash-side-note {
  font-size: 11px;
  color: var(--ink-dim);
  margin-top: 6px;
  line-height: 1.5;
}

/* Action callout at bottom of Nash card */
.nash-action {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.75;
}

.nash-action strong {
  color: var(--ink);
  font-weight: 600;
}


/* ════════════════════════════════════════
   SCENARIO TABLE
   ════════════════════════════════════════ */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.scenario-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.scenario-table th {
  padding: 12px 18px;
  text-align: left;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.scenario-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.scenario-table tr:last-child td { border-bottom: none; }
.scenario-table tr:hover td      { background: var(--bg); }

.scenario-label {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 2px;
}

.scenario-desc {
  font-size: 11px;
  color: var(--ink-faint);
}

.bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--bg2);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s;
}

.bar-pct {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

.risk-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.risk-tag.low  { background: var(--teal-light);  color: var(--teal);  border: 1px solid var(--teal-mid); }
.risk-tag.mid  { background: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-mid); }
.risk-tag.high { background: var(--red-light);   color: var(--red);   border: 1px solid var(--red-mid); }


/* ════════════════════════════════════════
   SUGGESTION CARDS
   ════════════════════════════════════════ */
.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sug-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.18s, box-shadow 0.18s;
}

.sug-card:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-lg);
}

.sug-icon-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.sug-icon-wrap.t-critical { background: var(--red-light);   border: 1px solid var(--red-mid); }
.sug-icon-wrap.t-warning  { background: var(--amber-light); border: 1px solid var(--amber-mid); }
.sug-icon-wrap.t-good     { background: var(--teal-light);  border: 1px solid var(--teal-mid); }
.sug-icon-wrap.t-info     { background: var(--blue-light);  border: 1px solid var(--blue-mid); }

.sug-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sug-badge.t-critical { background: var(--red-light);   color: var(--red);   border: 1px solid var(--red-mid); }
.sug-badge.t-warning  { background: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-mid); }
.sug-badge.t-good     { background: var(--teal-light);  color: var(--teal);  border: 1px solid var(--teal-mid); }
.sug-badge.t-info     { background: var(--blue-light);  color: var(--blue);  border: 1px solid var(--blue-mid); }

.sug-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.sug-body {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.75;
}


/* ════════════════════════════════════════
   UTILITIES
   ════════════════════════════════════════ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0 16px;
}

/* Staggered fade-up entrance */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.45s ease forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.delay-1 { animation-delay: 0.06s; }
.delay-2 { animation-delay: 0.12s; }
.delay-3 { animation-delay: 0.18s; }
.delay-4 { animation-delay: 0.24s; }


/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 900px) {
  .layout       { flex-direction: column; }
  .sidebar      { width: 100%; position: static; max-height: none; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .topbar       { padding: 0 16px; }
  .layout       { padding: 16px; }
  .idle-screen  { padding: 32px 20px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .nash-split   { grid-template-columns: 1fr; }
  .brand-sub    { display: none; }
}

/* ── Sample data button ── */
.sample-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 4px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.sample-divider::before,
.sample-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border2);
}

.btn-sample {
  width: 100%;
  padding: 9px 0;
  background: var(--teal-light);
  color: var(--teal);
  border: 1.5px solid var(--teal-mid);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  letter-spacing: .01em;
}
.btn-sample:hover {
  background: var(--teal-mid);
  border-color: var(--teal);
}
