:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --surface-muted: #e8eef8;
  --ink: #162033;
  --muted: #5d6a83;
  --line: rgba(22, 32, 51, 0.09);
  --brand: #355cff;
  --brand-deep: #1f39b8;
  --accent: #3fd5b8;
  --warn: #e6a534;
  --danger: #d65252;
  --success: #23956b;
  --shadow: 0 22px 50px rgba(36, 55, 99, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shell: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(53, 92, 255, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(63, 213, 184, 0.16), transparent 24%),
    var(--bg);
  color: var(--ink);
}

a { color: inherit; }
main { padding-bottom: 48px; }
.shell { width: min(calc(100% - 32px), var(--shell)); margin: 0 auto; }
.section { padding: 18px 0 0; }
.hero { padding: 36px 0 6px; }
.hero-grid, .tool-layout, .result-grid, .three-up {
  display: grid;
  gap: 20px;
}
.hero-grid { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr); align-items: stretch; }
.tool-layout { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.75fr); align-items: start; }
.result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 10px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 24px;
  backdrop-filter: blur(12px);
}
.hero-card {
  background: linear-gradient(180deg, rgba(53, 92, 255, 0.12), rgba(255,255,255,0.94));
}
.accent-card {
  background: linear-gradient(180deg, rgba(63, 213, 184, 0.14), rgba(255,255,255,0.95));
}
.caveat-card {
  background: linear-gradient(180deg, rgba(230, 165, 52, 0.12), rgba(255,255,255,0.95));
}
.planner { padding-bottom: 20px; }
.info-card { position: sticky; top: 20px; }
.eyebrow, .mini-label {
  display: inline-flex;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand-deep);
}
.mini-label { margin-bottom: 10px; }
.lead {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 64ch;
}
.hero h1, .section-heading h2, .card h3 {
  margin: 0;
  letter-spacing: -0.03em;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 4.1rem); line-height: 1.02; margin-top: 8px; }
.section-heading h2 { font-size: clamp(1.5rem, 2vw, 2rem); margin-top: 6px; }
.card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.cta-row, .planner-actions, .inline-actions, .table-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cta-row, .planner-actions { margin: 24px 0 18px; }
.table-header { justify-content: space-between; align-items: center; margin-bottom: 12px; }
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  border-radius: 999px;
  padding: 14px 20px;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 14px 28px rgba(53, 92, 255, 0.24);
}
.btn-secondary {
  color: var(--ink);
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(22, 32, 51, 0.08);
}
.bullet-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.65;
}
.bullet-list li + li { margin-top: 8px; }
.compact li + li { margin-top: 6px; }
.small-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}
.no-top { margin-top: 0; }
.section-heading { margin-bottom: 18px; }
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
}
label span {
  font-size: 0.95rem;
}
label.full-width { grid-column: 1 / -1; }
input, select, textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(22, 32, 51, 0.12);
  background: rgba(255,255,255,0.92);
  padding: 14px 15px;
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(53, 92, 255, 0.58);
  box-shadow: 0 0 0 4px rgba(53, 92, 255, 0.12);
}
textarea { resize: vertical; min-height: 120px; }
.result-zone.hidden { display: none; }
.top-gap { margin-top: 20px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: rgba(53, 92, 255, 0.12);
  color: var(--brand-deep);
  border: 1px solid rgba(53, 92, 255, 0.16);
}
.status-ready {
  background: rgba(35, 149, 107, 0.12);
  color: var(--success);
  border-color: rgba(35, 149, 107, 0.18);
}
.status-warn {
  background: rgba(230, 165, 52, 0.14);
  color: #9a6700;
  border-color: rgba(230, 165, 52, 0.22);
}
.status-bad {
  background: rgba(214, 82, 82, 0.14);
  color: var(--danger);
  border-color: rgba(214, 82, 82, 0.22);
}
.metric-list li strong { color: var(--ink); }
.wide-card { grid-column: span 1; }
#brief-output {
  min-height: 280px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 0.93rem;
  line-height: 1.55;
  background: #f8fbff;
}
.muted-band { padding-bottom: 8px; }
.site-footer {
  width: min(calc(100% - 32px), var(--shell));
  margin: 26px auto 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.94rem;
}
.site-footer strong {
  display: block;
  color: var(--ink);
  margin-bottom: 3px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.site-footer nav a {
  text-decoration: none;
  color: var(--brand-deep);
  font-weight: 600;
}
@media (max-width: 980px) {
  .hero-grid, .tool-layout, .result-grid, .three-up { grid-template-columns: 1fr; }
  .info-card { position: static; }
}
@media (max-width: 720px) {
  .hero { padding-top: 22px; }
  .field-grid { grid-template-columns: 1fr; }
  .shell { width: min(calc(100% - 20px), var(--shell)); }
  .card { padding: 18px; border-radius: 22px; }
  .btn { width: 100%; justify-content: center; text-align: center; }
  .table-header { align-items: flex-start; }
}
@media print {
  body { background: #fff; }
  .hero, .info-card, .site-footer, .planner-actions, .cta-row, .inline-actions { display: none !important; }
  .result-zone.hidden { display: block; }
  .card, .status-pill { box-shadow: none; background: #fff; }
}
