:root {
  --bg: #f3efe8;
  --ink: #1b1a18;
  --panel: #fffcf8;
  --line: #d8cdbf;
  --accent: #163a5f;
  --accent-soft: #2d628f;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, #f9ead4 0, transparent 45%),
    radial-gradient(circle at 90% 20%, #dae9f5 0, transparent 35%),
    var(--bg);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(3px);
}

.brand {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}

nav { display: flex; gap: 14px; align-items: center; }
a { color: var(--accent); text-decoration: none; }
.pill, .cta, button {
  border: 0;
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.ghost {
  border: 1px solid var(--line);
  padding: 9px 13px;
  border-radius: 10px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.hero h1 {
  margin: 10px 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  color: #6a6258;
}

.hero-actions { display: flex; gap: 10px; margin-top: 14px; }
.cards {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.cards article, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.auth {
  max-width: 420px;
  margin: 20px auto;
}

.form-grid {
  display: grid;
  gap: 10px;
}

label { display: grid; gap: 6px; font-size: 14px; }
input, textarea, select {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #cdbda9;
  background: white;
}

.error {
  border: 1px solid #dc7c7c;
  background: #ffe8e8;
  padding: 10px;
  border-radius: 10px;
}

.dash-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 320px) 1fr;
}

.sticky { align-self: start; position: sticky; top: 14px; }
.wide { min-height: 400px; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
}

.analysis-text {
  background: #111;
  color: #f4f4f4;
  padding: 14px;
  border-radius: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
}

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.inline-form { display: inline; }

@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  .sticky { position: static; }
}

.verdict-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.verdict-chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.verdict-buy { background: #d7f5dc; color: #0a5a22; }
.verdict-hold { background: #fff2cc; color: #6f4d00; }
.verdict-wait { background: #e4ecf7; color: #1a4870; }
.verdict-avoid { background: #ffe0e0; color: #7a1414; }

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.score-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}

.score-label {
  display: block;
  font-size: 12px;
  color: #5b5248;
  text-transform: capitalize;
}

.score-value {
  font-size: 22px;
}

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

.scenario-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.tiny { font-size: 12px; color: #6a6258; margin-bottom: 8px; }
.top-gap { margin-top: 12px; }

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  font-size: 14px;
}

.review-grid.compact {
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.wizard-wrap {
  max-width: 900px;
  margin: 0 auto;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 20px;
}

.wizard-step {
  border: 1px solid var(--line);
  border-radius: 999px;
  text-align: center;
  padding: 6px 8px;
  font-size: 12px;
  background: #fff;
}

.wizard-step.active {
  background: #d9e8f6;
  border-color: #9dbbd8;
}

.wizard-form {
  max-width: 560px;
}

.wizard-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.link-btn {
  display: inline-block;
  text-align: center;
}
