/* ==========================================================================
   Brute Force Attack Simulator -- design tokens
   Palette: deep terminal navy, teal/cyan system accent, semantic
   blue / red / green / amber for the live-attack states.
   Type: JetBrains Mono for data & headings, Inter for body copy.
   ========================================================================== */

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

:root {
  --bg: #0a0e14;
  --bg-raise: #0d121a;
  --surface: #10151d;
  --surface-2: #161c26;
  --surface-3: #1d2531;
  --border: #232b38;
  --border-strong: #303a4a;

  --text: #e7ecf3;
  --text-dim: #93a0b4;
  --text-faint: #5c6a80;

  --accent: #4fd1c5;
  --accent-dim: #2a7a70;
  --accent-glow: rgba(79, 209, 197, 0.35);

  --indigo: #7c8cf8;

  --blue: #3da9fc;
  --blue-glow: rgba(61, 169, 252, 0.45);
  --red: #ff5c5c;
  --red-glow: rgba(255, 92, 92, 0.45);
  --green: #2ed573;
  --green-glow: rgba(46, 213, 115, 0.5);
  --amber: #ffb020;
  --amber-glow: rgba(255, 176, 32, 0.4);

  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;

  --shell: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
}

body {
  background-image:
    radial-gradient(circle at 15% 0%, rgba(79, 209, 197, 0.06), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(124, 140, 248, 0.05), transparent 40%);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: var(--font-mono);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.01em;
}

p { line-height: 1.6; color: var(--text-dim); margin: 0 0 0.75rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--accent-glow); color: #fff; }

/* Scanline texture used sparingly behind hero + guess readout */
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.015) 0px,
    rgba(255,255,255,0.015) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

/* ---------- layout shell ---------- */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
}

.brand .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.stage-track {
  display: flex;
  gap: 6px;
  align-items: center;
}

.stage-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.stage-chip.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.stage-chip.done {
  color: var(--accent);
  border-color: var(--accent-dim);
}

main { padding: 40px 0 80px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--accent);
}

/* ---------- buttons ---------- */

.btn {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.btn:hover { border-color: var(--accent-dim); background: var(--surface-3); }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #04211d;
}
.btn-primary:hover { background: #63e0d5; border-color: #63e0d5; }

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}
.btn:disabled:hover { border-color: var(--border-strong); background: var(--surface-2); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

.btn-danger {
  border-color: rgba(255, 92, 92, 0.4);
  color: var(--red);
}
.btn-danger:hover { border-color: var(--red); background: rgba(255, 92, 92, 0.08); }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- cards ---------- */

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

.card-tight { padding: 18px 20px; }

.panel-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

/* ---------- disclaimer strip ---------- */

.disclaimer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 16px;
  background: rgba(255, 176, 32, 0.03);
}

.disclaimer .tag {
  color: var(--amber);
  font-weight: 700;
}

/* ============================================================
   Landing page
   ============================================================ */

.hero {
  position: relative;
  padding: 70px 0 50px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  margin-bottom: 18px;
}

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

.hero .subtitle {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 22px;
}

.hero .lede {
  font-size: 16px;
  max-width: 620px;
  margin-bottom: 34px;
}

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

.readout-preview {
  margin-top: 46px;
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 18px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.readout-preview .digits {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blue);
}

.readout-preview .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.7;
}

.section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}

.section-head { max-width: 620px; margin-bottom: 34px; }
.section-head h2 { font-size: 24px; margin-bottom: 10px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--surface);
}

.feature-card .icon {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--accent);
  margin-bottom: 10px;
}

.feature-card h3 { font-size: 14px; margin-bottom: 6px; color: var(--text); }
.feature-card p { font-size: 13px; margin: 0; }

/* ============================================================
   Attack selection cards (Stage 2)
   ============================================================ */

.attack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

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

.attack-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
  text-align: left;
}

.attack-card:hover,
.attack-card:focus-visible {
  border-color: var(--accent-dim);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.attack-card .glyph {
  font-family: var(--font-mono);
  font-size: 26px;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

.attack-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text);
}

.attack-card .desc {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 16px;
  min-height: 42px;
}

.attack-card .reveal {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  border-top: 1px solid var(--border);
  margin-top: 0;
}

.attack-card:hover .reveal,
.attack-card:focus-visible .reveal {
  max-height: 220px;
  margin-top: 14px;
  padding-top: 14px;
}

.reveal .how { font-size: 12px; color: var(--text-faint); margin-bottom: 10px; }

.reveal .sample-guesses {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--indigo);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.reveal .sample-guesses span:last-child { color: var(--text-faint); }

.attack-card .select-hint {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.attack-card:hover .select-hint,
.attack-card:focus-visible .select-hint { opacity: 1; }

/* ============================================================
   Configure page (Stage 3)
   ============================================================ */

.selected-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 30px;
}

.selected-banner .glyph { font-family: var(--font-mono); font-size: 22px; color: var(--accent); }
.selected-banner .label { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.1em; }
.selected-banner .name { font-family: var(--font-mono); font-size: 16px; font-weight: 700; }

.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 30px;
}

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

.type-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}

.type-card.selected {
  border-color: var(--accent);
  background: rgba(79, 209, 197, 0.06);
}

.type-card .glyph { font-family: var(--font-mono); font-size: 20px; margin-bottom: 8px; display: block; color: var(--accent); }
.type-card h4 { font-size: 15px; margin-bottom: 4px; }
.type-card .spec { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }

.config-columns {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

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

.field-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: block;
}

.pw-input-wrap { position: relative; margin-bottom: 20px; }

.pw-input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.06em;
  background: var(--bg-raise);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  padding: 15px 46px 15px 16px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pw-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.pw-input.invalid { border-color: var(--red); }
.pw-input.valid { border-color: var(--green); }

.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
}
.pw-toggle:hover { color: var(--text); }

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

.req-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

.req-item .indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.req-item.ok { color: var(--green); }
.req-item.ok .indicator { background: var(--green); box-shadow: 0 0 6px var(--green-glow); }
.req-item.bad { color: var(--red); }
.req-item.bad .indicator { background: var(--red); box-shadow: 0 0 6px var(--red-glow); }

.status-line {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  text-align: center;
  border: 1px solid var(--border);
  color: var(--text-faint);
}
.status-line.ok { color: var(--green); border-color: rgba(46, 213, 115, 0.35); background: rgba(46, 213, 115, 0.06); }
.status-line.bad { color: var(--red); border-color: rgba(255, 92, 92, 0.3); background: rgba(255, 92, 92, 0.05); }

/* AI preview */

.ai-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--surface);
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.ai-preview.active { opacity: 1; pointer-events: auto; }

.ai-preview .overall {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.ai-preview .overall .score {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 800;
  color: var(--accent);
}
.ai-preview .overall .of10 { font-family: var(--font-mono); color: var(--text-faint); font-size: 14px; }

.dim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
}
.dim-row .dim-name { color: var(--text-dim); }
.dim-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 100px;
}
.dim-tag.veryhigh, .dim-tag.high { color: var(--green); background: rgba(46, 213, 115, 0.1); }
.dim-tag.moderate { color: var(--amber); background: rgba(255, 176, 32, 0.1); }
.dim-tag.low, .dim-tag.verylow { color: var(--red); background: rgba(255, 92, 92, 0.1); }

.simulate-config {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 600px) { .simulate-config { grid-template-columns: 1fr; } }

.limit-field label { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 6px; }
.limit-field input {
  width: 100%;
  font-family: var(--font-mono);
  background: var(--bg-raise);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 10px;
  outline: none;
}
.limit-field input:focus { border-color: var(--accent); }

/* ============================================================
   Simulation page (Stage 4)
   ============================================================ */

.sim-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) { .sim-layout { grid-template-columns: 1fr; } }

.readout-stage {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 24px;
  background: radial-gradient(circle at 50% 0%, rgba(79, 209, 197, 0.05), transparent 60%), var(--surface);
  text-align: center;
  overflow: hidden;
}

.readout-stage .status-text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 22px;
  transition: color 0.15s ease;
}

.guess-box {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(30px, 6vw, 52px);
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 22px 34px;
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  color: var(--blue);
  background: rgba(61, 169, 252, 0.06);
  box-shadow: 0 0 24px var(--blue-glow);
  transition: color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, transform 0.12s ease;
  word-break: break-all;
  max-width: 100%;
}

.readout-stage.state-changing .guess-box { transform: scale(1.01); }

.readout-stage.state-incorrect .guess-box {
  border-color: var(--red);
  color: var(--red);
  background: rgba(255, 92, 92, 0.08);
  box-shadow: 0 0 26px var(--red-glow);
}
.readout-stage.state-incorrect .status-text { color: var(--red); }

.readout-stage.state-correct .guess-box {
  border-color: var(--green);
  color: var(--green);
  background: rgba(46, 213, 115, 0.1);
  box-shadow: 0 0 34px var(--green-glow);
}
.readout-stage.state-correct .status-text { color: var(--green); }

.readout-stage.state-idle .guess-box {
  border-color: var(--border-strong);
  color: var(--text-faint);
  box-shadow: none;
  background: transparent;
}
.readout-stage.state-idle .status-text { color: var(--text-faint); }

.result-banner {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.controls-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.stat-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface);
}

.stat-tile .label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.stat-tile .value { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--text); }
.stat-tile .value.accent-text { color: var(--accent); }

.progress-track {
  height: 6px;
  border-radius: 100px;
  background: var(--surface-3);
  overflow: hidden;
  margin-top: 18px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  width: 0%;
  transition: width 0.2s ease;
}

.log-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  max-height: 560px;
}

.log-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.log-head .panel-label { margin: 0; }

.log-body {
  overflow-y: auto;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.log-row {
  display: grid;
  grid-template-columns: 70px 1fr 60px;
  gap: 10px;
  padding: 6px 20px;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

.log-row .n { color: var(--text-faint); }
.log-row .g { color: var(--text); word-break: break-all; }
.log-row .r { text-align: right; font-weight: 700; }
.log-row .r.ok { color: var(--green); }
.log-row .r.no { color: var(--red); }
.log-row.current { background: rgba(61, 169, 252, 0.06); }
.log-row.current .g { color: var(--blue); }

.log-body::-webkit-scrollbar { width: 8px; }
.log-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
.log-body::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   Report page (Stage 5)
   ============================================================ */

.report-hero {
  text-align: center;
  padding: 36px 0 10px;
}

.report-hero .verdict {
  font-family: var(--font-mono);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.report-hero .verdict.cracked { color: var(--red); }
.report-hero .verdict.held { color: var(--green); }

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 26px 0 36px;
}

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

.rating-block {
  text-align: center;
  padding: 36px 0 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}

.rating-block .panel-label { text-align: center; }

.rating-block .score {
  font-family: var(--font-mono);
  font-size: clamp(48px, 9vw, 76px);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.rating-block .of10 { font-family: var(--font-mono); color: var(--text-faint); font-size: 18px; }

.profile-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}

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

.profile-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
  text-align: center;
}
.profile-tile .glyph { font-size: 18px; margin-bottom: 8px; display: block; }
.profile-tile .name { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.profile-tile .score { font-family: var(--font-mono); font-size: 20px; font-weight: 700; margin-bottom: 6px; }

.aspect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 30px;
}

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

.aspect-card {
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
}
.aspect-card.strong { border-color: rgba(46, 213, 115, 0.35); background: rgba(46, 213, 115, 0.05); }
.aspect-card.weak { border-color: rgba(255, 92, 92, 0.3); background: rgba(255, 92, 92, 0.05); }

.aspect-card .kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.aspect-card.strong .kicker { color: var(--green); }
.aspect-card.weak .kicker { color: var(--red); }
.aspect-card .aname { font-family: var(--font-mono); font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.aspect-card p { font-size: 13px; margin: 0; color: var(--text-dim); }

.recommendation-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  background: var(--surface);
  margin-bottom: 36px;
}

.recommendation-card p { color: var(--text); font-size: 15px; line-height: 1.75; margin: 0; }

.chart-card { margin-bottom: 24px; }
.chart-card canvas { max-height: 300px; }

.report-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* ============================================================
   Misc / footer
   ============================================================ */

footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  text-align: center;
}
footer p { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin: 0; }

.error-banner {
  border: 1px solid rgba(255, 92, 92, 0.35);
  background: rgba(255, 92, 92, 0.06);
  color: var(--red);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 24px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border-strong);
  color: var(--text-faint);
}

@keyframes pulse-fade {
  0% { opacity: 1; }
  100% { opacity: 0.55; }
}

.loading-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-fade 1s ease-in-out infinite alternate;
}
