:root {
  --ink: #14211f;
  --muted: #6c7975;
  --line: #dbe3df;
  --paper: #f5f7f4;
  --card: #ffffff;
  --teal: #167a6c;
  --teal-dark: #0f5d53;
  --mint: #d9f0e8;
  --gold: #d59a45;
  --shadow: 0 18px 44px rgba(21, 57, 48, .07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", Arial, sans-serif;
}

.shell { max-width: 1120px; margin: 0 auto; padding: 52px 28px 42px; }
.hero { margin-bottom: 35px; }
.eyebrow, .panel-tag, .formula-label, .result-kicker, .opinion-label {
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 8px; }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.hero-grid { display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-top: 18px; }
h1 { margin: 0; font-size: clamp(43px, 7vw, 76px); line-height: .98; letter-spacing: -.065em; font-weight: 800; }
h1 span { color: var(--teal); }
.hero-copy { max-width: 475px; margin: 22px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.opinion-card { min-width: 255px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.55); }
.opinion-number { margin: 8px 0 7px; font-family: "DM Mono", monospace; font-size: 18px; font-weight: 500; }
.opinion-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.result-banner { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; padding: 25px 30px; border-radius: 16px; color: white; background: var(--teal-dark); box-shadow: 0 12px 28px rgba(15, 93, 83, .2); }
.result-kicker { color: #a9ddd2; }
.info-mark { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border: 1px solid currentColor; border-radius: 50%; font-size: 9px; font-style: normal; cursor: help; vertical-align: 1px; }
.composite-result { margin: 4px 0 1px; font-family: "DM Mono", monospace; font-size: 44px; letter-spacing: -.06em; }
.result-status { color: #b9d8d1; font-size: 12px; }
.result-split { display: flex; gap: 30px; padding-left: 30px; border-left: 1px solid rgba(255,255,255,.25); }
.result-split div { display: grid; gap: 5px; }
.result-split span { color: #a9ddd2; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.result-split strong { font-family: "DM Mono", monospace; font-size: 20px; font-weight: 500; }
.account-panel { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(450px, 1.5fr) auto; align-items: center; gap: 22px; margin-bottom: 22px; padding: 19px 22px; border: 1px solid var(--line); border-radius: 12px; background: #edf5f1; }
.account-panel h2 { margin-top: 4px; font-size: 19px; }
.account-status { max-width: 310px; margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.auth-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.auth-form input, #scenario-name { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; font: 12px "DM Mono", monospace; }
.auth-form button, .save-button { padding: 10px 12px; border: 0; border-radius: 6px; color: white; background: var(--teal); font: 700 11px "Manrope", sans-serif; cursor: pointer; white-space: nowrap; }
.auth-form button:hover, .save-button:hover { background: var(--teal-dark); }
.text-button { padding: 0; border: 0; color: var(--teal-dark); background: transparent; font: 700 11px "Manrope", sans-serif; cursor: pointer; white-space: nowrap; }
.account-actions { display: flex; align-items: center; gap: 12px; }
.account-actions a { text-decoration: none; }
.password-form { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 8px; padding-top: 14px; border-top: 1px solid #cfe1da; }
.password-form input { flex: 1 1 190px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; font: 12px "DM Mono", monospace; }
.password-form button:not(.text-button) { padding: 10px 12px; border: 0; border-radius: 6px; color: white; background: var(--teal); font: 700 11px "Manrope", sans-serif; cursor: pointer; }
.auth-form .text-button { grid-column: 1 / -1; justify-self: start; }
.project-tools { display: grid; grid-template-columns: auto 1fr 1fr auto auto; align-items: center; gap: 7px; grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid #cfe1da; }
.project-tools label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.project-tools select, .project-tools input { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; font: 11px "DM Mono", monospace; }
.small-button { padding: 9px 10px; border: 1px solid var(--teal); border-radius: 6px; color: var(--teal-dark); background: transparent; font: 700 10px "Manrope", sans-serif; cursor: pointer; white-space: nowrap; }
.small-button:hover { color: white; background: var(--teal); }
.report-button { color: white; background: var(--teal); }
.small-button:disabled { opacity: .45; cursor: not-allowed; }
.hidden { display: none !important; }
.workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; gap: 13px; }
.step { color: var(--gold); font-family: "DM Mono", monospace; font-size: 17px; }
h2 { margin: 4px 0 0; font-size: 25px; letter-spacing: -.04em; }
.weight-badge { margin-left: auto; padding: 6px 9px; border-radius: 5px; color: var(--teal); background: var(--mint); font-family: "DM Mono", monospace; font-size: 10px; white-space: nowrap; }
.panel-intro { min-height: 58px; margin: 19px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.field-grid { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; color: var(--ink); font-size: 11px; font-weight: 700; }
.field em { margin-left: 4px; color: var(--teal); font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.input-wrap { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfb; transition: border-color .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,122,108,.1); }
input { width: 100%; min-width: 0; padding: 11px 12px; border: 0; outline: 0; color: var(--ink); background: transparent; font-family: "DM Mono", monospace; font-size: 15px; }
.input-wrap b { padding-right: 12px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 12px; font-weight: 500; }
.formula-card { margin-top: 22px; padding: 16px; border-radius: 9px; background: #f1f7f4; }
.formula-label { color: var(--muted); font-size: 9px; }
.formula { min-height: 20px; margin: 8px 0 14px; color: var(--teal-dark); font-family: "DM Mono", monospace; font-size: 12px; white-space: nowrap; }
.formula-result { display: flex; align-items: end; justify-content: space-between; padding-top: 12px; border-top: 1px solid #d5e7df; }
.formula-result span { color: var(--muted); font-size: 11px; font-weight: 700; }
.formula-result strong { color: var(--teal); font-family: "DM Mono", monospace; font-size: 23px; font-weight: 500; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; color: var(--muted); font-size: 11px; }
.footer div { display: grid; gap: 4px; }
.footer strong { color: var(--ink); font-size: 12px; }
.footer-actions { display: flex !important; align-items: center; gap: 8px; }
.footer-actions #scenario-name { width: 155px; }
.save-button:disabled { opacity: .45; cursor: not-allowed; }
.reset-button { padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--teal-dark); background: transparent; font: inherit; cursor: pointer; }
.reset-button:hover { border-color: var(--teal); background: var(--mint); }
.reset-button span { margin-left: 5px; font-size: 15px; }
.saved-scenarios { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.saved-scenarios h2 { margin: 4px 0 12px; font-size: 20px; }
.scenario-item { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.scenario-item div { display: grid; gap: 4px; }
.scenario-item strong { color: var(--ink); font-size: 12px; }
.scenario-item span { color: var(--muted); font: 10px "DM Mono", monospace; }
.scenario-item b { color: var(--teal); font: 500 17px "DM Mono", monospace; white-space: nowrap; }
@media (max-width: 720px) {
  .shell { padding: 32px 18px; }
  .hero-grid, .result-banner, .footer { align-items: flex-start; flex-direction: column; }
  .opinion-card { width: 100%; }
  .result-split { width: 100%; padding: 18px 0 0; border-top: 1px solid rgba(255,255,255,.25); border-left: 0; }
  .workspace { grid-template-columns: 1fr; }
  .account-panel { grid-template-columns: 1fr; }
  .auth-form { grid-template-columns: 1fr; }
  .auth-form .text-button { grid-column: auto; }
  .project-tools { grid-template-columns: 1fr 1fr; }
  .project-tools label { grid-column: 1 / -1; }
  .panel-intro { min-height: 0; }
  .weight-badge { font-size: 9px; }
  .footer-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .footer-actions #scenario-name { width: 100%; }
}
