:root {
  --ink: #0a0b0d;
  --surface: #121417;
  --surface-raised: #191c20;
  --surface-soft: #20242a;
  --line: rgba(255, 255, 255, 0.12);
  --line-gold: rgba(215, 177, 93, 0.42);
  --text: #f3f0e9;
  --muted: #b4b0a7;
  --gold: #d7b15d;
  --gold-light: #f1d88f;
  --green: #a9d599;
  --coral: #f0a68f;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  background:
    radial-gradient(900px 620px at 90% -80px, rgba(154, 109, 29, 0.18), transparent 68%),
    linear-gradient(155deg, #111214 0%, #0a0b0d 56%, #0c0f11 100%);
  min-height: 100vh;
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.site-header {
  max-width: 1280px;
  margin: auto;
  min-height: 82px;
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; letter-spacing: .12em; font-size: .85rem; font-weight: 700; }
.brand b { color: var(--gold); font-weight: 700; }
.brand-mark { width: 29px; height: 29px; border: 1px solid var(--gold); border-radius: 50%; display: grid; place-items: center; color: var(--gold); font-family: var(--serif); font-size: 1rem; letter-spacing: 0; }
.status-pill { border: 1px solid var(--line-gold); color: var(--gold-light); padding: 7px 11px; border-radius: 100px; font-size: .66rem; font-weight: 700; letter-spacing: .1em; }

main { max-width: 1280px; padding: 0 38px 70px; margin: auto; }
.hero { max-width: 870px; padding: 86px 0 57px; }
.eyebrow { color: var(--gold); font-weight: 700; font-size: .7rem; letter-spacing: .16em; margin: 0 0 15px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(2.75rem, 7vw, 5.7rem); line-height: .98; letter-spacing: -.055em; margin-bottom: 28px; }
h1 em { color: var(--gold-light); font-style: italic; }
.hero-copy { max-width: 735px; color: var(--muted); font-size: 1.1rem; line-height: 1.75; }
.governance-note { display: flex; gap: 14px; align-items: flex-start; max-width: 810px; border-left: 2px solid var(--gold); margin-top: 34px; padding: 10px 0 10px 18px; background: linear-gradient(90deg, rgba(215,177,93,.1), transparent); }
.governance-note span { color: var(--gold); line-height: 1.45; }
.governance-note p { color: #d6d1c6; line-height: 1.55; margin: 0; font-size: .91rem; }

.workspace { display: grid; grid-template-columns: minmax(330px, .92fr) minmax(420px, 1.08fr); border: 1px solid var(--line); background: rgba(18,20,23,.94); box-shadow: 0 26px 90px rgba(0,0,0,.28); }
.input-panel, .result-panel { padding: 39px; }
.input-panel { border-right: 1px solid var(--line); }
.panel-heading h2 { font-size: 2rem; margin-bottom: 10px; }
.panel-heading > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; font-size: .88rem; }
.example-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0 28px; }
.example-button { border: 1px solid var(--line); background: transparent; color: #d8d3c9; border-radius: 100px; padding: 8px 11px; font-size: .71rem; text-align: left; transition: .18s ease; }
.example-button:hover, .example-button:focus-visible, .example-button.is-active { border-color: var(--gold); background: rgba(215,177,93,.11); color: var(--gold-light); outline: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #d7d2c8; font-size: .76rem; font-weight: 600; line-height: 1.25; }
.field small { color: #898984; font-size: .68rem; }
input[type="number"], select { color: var(--text); background: #0e1012; border: 1px solid #383d42; min-height: 43px; border-radius: 8px; padding: 9px 10px; outline: none; }
select { width: 100%; }
input[type="number"]:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215,177,93,.14); }
.toggle-field { background: #101214; border: 1px solid #383d42; border-radius: 8px; padding: 10px; justify-content: center; }
.toggle-field label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--gold); width: 16px; height: 16px; }
.advanced-controls { margin-top: 21px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.advanced-controls summary { list-style: none; padding: 16px 0; cursor: pointer; color: #e0dbd0; font-weight: 700; font-size: .83rem; display: flex; justify-content: space-between; }
.advanced-controls summary::-webkit-details-marker { display: none; }
.advanced-controls summary span { color: var(--muted); font-weight: 400; font-size: .72rem; }
.advanced-controls[open] summary { color: var(--gold-light); }
.advanced-controls .form-grid { padding: 3px 0 20px; }
.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 25px; }
.primary-button { border: 1px solid var(--gold); background: var(--gold); color: #15120c; padding: 13px 17px; min-height: 48px; border-radius: 7px; font-weight: 800; font-size: .85rem; transition: transform .16s ease, background .16s ease; }
.primary-button:hover, .primary-button:focus-visible { background: var(--gold-light); transform: translateY(-1px); outline: none; }
.text-button { color: var(--muted); background: none; border: 0; padding: 8px 0; font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover, .text-button:focus-visible { color: var(--gold-light); outline: none; }
.form-footnote { color: #8f8e89; font-size: .73rem; line-height: 1.5; margin: 17px 0 0; }

.result-panel { background: linear-gradient(145deg, rgba(36,33,26,.46), rgba(21,24,27,.9) 35%); }
.score-line { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 7px 0 25px; border-bottom: 1px solid var(--line); }
.score-label { color: var(--muted); font-size: .82rem; margin-bottom: 8px; }
.score { color: var(--gold-light); font-family: var(--serif); font-size: clamp(4rem, 8vw, 6.2rem); line-height: .86; letter-spacing: -.06em; margin: 0; }
.score-band { border: 1px solid var(--line-gold); color: var(--gold-light); padding: 8px 11px; border-radius: 100px; white-space: nowrap; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 7px; }
.baseline-card { display: grid; grid-template-columns: 1fr 1fr; margin: 22px 0 21px; background: rgba(0,0,0,.17); border: 1px solid var(--line); }
.baseline-card div { padding: 14px 16px; }
.baseline-card div + div { border-left: 1px solid var(--line); }
.baseline-card span { display: block; color: var(--muted); font-size: .69rem; margin-bottom: 5px; }
.baseline-card strong { font-family: var(--serif); font-weight: 400; color: #f5efdf; font-size: 1.3rem; }
.interpretation { font-family: var(--serif); color: #ece8de; font-size: 1.22rem; line-height: 1.5; margin-bottom: 13px; }
.method-note { color: var(--muted); font-size: .78rem; line-height: 1.55; margin: 0; }
.section-rule { width: 55px; border-top: 2px solid var(--gold); margin: 35px 0 21px; }
.contribution-section h3 { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; margin-bottom: 8px; }
.contribution-section > p { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.contribution-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-top: 23px; }
.contribution-columns h4 { color: var(--gold-light); font-size: .74rem; margin-bottom: 11px; text-transform: uppercase; letter-spacing: .06em; }
.contributor-list { list-style: none; padding: 0; margin: 0; }
.contributor-list li { border-top: 1px solid var(--line); padding: 10px 0; display: flex; justify-content: space-between; gap: 10px; color: #d8d4cb; font-size: .76rem; line-height: 1.3; }
.contributor-list span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.positive { color: var(--green); } .negative { color: var(--coral); }

.model-card { display: grid; grid-template-columns: .82fr 1.18fr; gap: 50px; margin-top: 55px; padding: 40px; border: 1px solid var(--line); background: #111315; }
.model-card h2, .proving-ground h2 { font-size: 2.15rem; line-height: 1.08; margin-bottom: 16px; }
.model-card > div > p:not(.eyebrow), .model-card-note, .proving-ground > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; font-size: .88rem; }
.metrics-grid { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.metrics-grid div { padding: 13px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metrics-grid dt { color: var(--muted); font-size: .67rem; margin-bottom: 5px; }
.metrics-grid dd { color: #ede8dc; margin: 0; font-family: var(--serif); font-size: 1rem; }
.model-card-note { grid-column: 1 / -1; margin: -23px 0 0; }
.proving-ground { padding: 74px 0 20px; max-width: 815px; }
.proving-ground h2 { font-size: clamp(2.15rem, 4.8vw, 3.5rem); }
footer { max-width: 1280px; border-top: 1px solid var(--line); margin: auto; padding: 22px 38px 30px; color: #858783; display: flex; justify-content: space-between; gap: 20px; font-size: .69rem; }

@media (max-width: 820px) {
  .site-header, main, footer { padding-left: 20px; padding-right: 20px; }
  .hero { padding: 58px 0 40px; }
  .workspace, .model-card { grid-template-columns: 1fr; }
  .input-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .input-panel, .result-panel, .model-card { padding: 27px 22px; }
  .model-card { gap: 27px; }
}
@media (max-width: 490px) {
  .status-pill { display: none; }
  .form-grid, .contribution-columns { grid-template-columns: 1fr; }
  .score-line { align-items: flex-start; flex-direction: column; }
  .baseline-card { grid-template-columns: 1fr; }
  .baseline-card div + div { border-left: 0; border-top: 1px solid var(--line); }
  footer { flex-direction: column; }
}
