/* Exposure Snapshot page styles. Tokens come from assets/brand.css (the MM design system); this file lays out the
   three screens to read like the printed sheet: paper background, slate blue calculator band, white question sheet with
   part pills, orange for the one action per screen. */

:root { --wide: 1180px; --pad: clamp(20px, 4vw, 48px); }
* { box-sizing: border-box; }
html { background: var(--mm-off-white); }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--mm-off-white); overflow-x: hidden; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--mm-orange); outline-offset: 3px; }
h1:focus, h2:focus { outline: none; }
.wrap { width: 100%; max-width: calc(var(--wide) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- top bar ---------- */
.bar { background: var(--mm-black); position: sticky; top: 0; z-index: 10; }
.bar-in { max-width: calc(var(--wide) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); height: 64px; display: flex; align-items: center; justify-content: space-between; }
.bar-logo img { height: 30px; width: auto; display: block; }
.bar-logo:hover { opacity: 1; }
.bar-step { font-size: var(--fs-small); color: var(--mm-off-white); }

.app { flex: 1; width: 100%; padding-bottom: 64px; animation: fadein var(--dur-med) var(--ease-entrance); }
.app[data-step="result"] { padding-bottom: 0; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .app { animation: none; } }

.title-xl { font-size: clamp(2.5rem, 4vw + 1rem, 4.25rem); line-height: 1.02; margin: 0 0 var(--space-4); }
.title-l { font-size: clamp(2rem, 2.4vw + 1rem, 3rem); line-height: 1.05; margin: 0 0 var(--space-3); }
.title-m { font-size: clamp(1.75rem, 1.6vw + 1rem, 2.25rem); line-height: 1.1; margin: 0 0 var(--space-2); }
.title-xl em, .title-l em, .title-m em { color: var(--mm-orange); }
.meta { font-size: var(--fs-small); color: var(--mm-grey); }

.btn { appearance: none; border: 0; cursor: pointer; background: var(--mm-orange); color: #fff; border-radius: var(--radius-pill); padding: 15px 34px; font-size: 1rem; font-weight: 400; letter-spacing: 0.01em; min-height: 52px; white-space: nowrap; transition: opacity var(--dur-fast) var(--ease-standard); }
.btn:hover { opacity: 0.85; }
.btn:disabled { background: var(--mm-ink-300); cursor: not-allowed; opacity: 1; }
.link-back, .link-inline { appearance: none; border: 0; background: none; padding: 6px 0; cursor: pointer; color: var(--mm-grey); font-size: var(--fs-small); text-decoration: underline; text-decoration-color: var(--mm-ink-300); text-underline-offset: 0.25em; }
.link-back:hover, .link-inline:hover { color: var(--mm-black); }
.form-error { margin: 8px 0 0; min-height: 1.4em; font-size: var(--fs-small); color: var(--mm-black); }
.form-error:empty { min-height: 0; margin: 0; }

/* ---------- page 1: calculator and questions ---------- */
.hero { padding-top: 56px; padding-bottom: 28px; }
.hook { font: 300 clamp(1.375rem, 1vw + 1rem, 1.875rem)/1.3 var(--font-serif); color: var(--mm-grey); margin: 0; max-width: 66ch; text-wrap: balance; }

.calc { background: var(--mm-blue); color: #fff; border-radius: var(--radius-card); padding: 28px clamp(20px, 3vw, 36px) 24px; }
.mm-kicker.on-blue { color: #fff; margin-bottom: 20px; white-space: normal; line-height: 1.4; }
.calc-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
.calc label, .calc .label { display: block; font-size: 1rem; color: #fff; margin-bottom: 10px; }
.num { width: 100%; height: 76px; border: 0; border-radius: var(--radius-1); padding: 0 16px; font: 300 1.5rem var(--font-sans); color: var(--mm-black); background: #fff; }
.num::-webkit-inner-spin-button, .num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.num { -moz-appearance: textfield; }
.hc-min { font-size: var(--fs-small); color: #fff; margin: 8px 0 0; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; cursor: pointer; margin: 10px 0 0; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, #fff 0 var(--fill, 0%), rgba(255,255,255,0.35) var(--fill, 0%) 100%); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.35); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: #fff; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; border: 2px solid var(--mm-black); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--mm-black); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seg-btn { appearance: none; cursor: pointer; border: 1px solid #fff; background: transparent; color: #fff; border-radius: var(--radius-1); height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: background var(--dur-fast), color var(--dur-fast); }
.seg-btn b { font: 300 2rem/1 var(--font-serif); }
.seg-btn span { font-size: 0.9375rem; }
.seg-btn:hover:not(:disabled) { background: rgba(255,255,255,0.14); }
.seg-btn.on { background: #fff; color: var(--mm-black); }
.calc.missing, .row.missing { outline: 2px solid var(--mm-orange); outline-offset: 4px; }

.quiz { margin-top: 48px; }
.quiz > .mm-kicker { margin-bottom: 14px; white-space: normal; }
.sheet { background: #fff; border-radius: var(--radius-card); padding: 12px clamp(16px, 2.4vw, 32px) 8px; }
.part { background: var(--mm-off-white); border-radius: var(--radius-pill); padding: 11px 20px; margin: 16px 0 4px; }
.part .mm-kicker { margin: 0; white-space: normal; line-height: 1.4; }
.row { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px 20px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--mm-rule-ink); border-radius: 2px; }
.row:last-child { border-bottom: 0; }
.row-num { font: 300 2.75rem/1 var(--font-serif); color: var(--mm-black); text-align: center; font-variant-numeric: lining-nums; }
.row-q { font-size: 1.0625rem; line-height: 1.4; color: var(--mm-black); margin: 0; max-width: 62ch; }
.row-note { font-size: var(--fs-small); line-height: 1.45; color: var(--mm-grey); margin: 3px 0 0; max-width: 70ch; }
.row-ans { display: grid; grid-template-columns: repeat(3, 92px); gap: 8px; }
.ans { appearance: none; cursor: pointer; background: #fff; border: 1px solid var(--mm-rule-strong); border-radius: var(--radius-1); height: 44px; padding: 0 8px; font-size: 0.9375rem; color: var(--mm-black); transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast); }
.ans:hover:not(:disabled) { border-color: var(--mm-black); }
.ans.on { background: var(--mm-blue); border-color: var(--mm-blue); color: #fff; }

.go { display: flex; justify-content: space-between; align-items: center; gap: 20px 40px; margin-top: 24px; flex-wrap: wrap; }
.go-note { margin: 0; color: var(--mm-grey); max-width: none; }
.go-note b { font-weight: 400; color: var(--mm-black); margin-left: 6px; white-space: nowrap; }
.go-btn { display: flex; flex-direction: column; align-items: flex-end; }

/* ---------- page 2: results and send to Alex ---------- */
.res-top { padding-top: 24px; }
.res-head { padding-top: 24px; }
.res-head .mm-kicker { margin-bottom: 12px; }
.verdict-title { font-size: clamp(3rem, 5.5vw + 0.5rem, 5.5rem); line-height: 0.95; margin: 0 0 32px; }
.verdict-title.verdict-long { font-size: clamp(2.25rem, 3vw + 1rem, 3.75rem); line-height: 1.05; max-width: 22ch; }
.verdict-title em { color: var(--mm-orange); }
.res-panel { background: #fff; border-radius: var(--radius-card); padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 56px; align-items: end; }
.res-full, .res-gaps { display: flex; flex-direction: column; min-width: 0; }
.res-gaps { padding-left: 48px; border-left: 1px solid var(--mm-rule-ink); }
.res-label { font-size: 1.125rem; color: var(--mm-grey); }
.res-kicker { margin-bottom: 12px; }
.res-full-num { font: 300 clamp(3.25rem, 7vw, 6.5rem)/0.95 var(--font-serif); letter-spacing: -0.03em; color: var(--mm-black); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; margin: 0 0 12px; }
.res-gaps-num { font: 300 clamp(3.25rem, 7vw, 6.5rem)/0.95 var(--font-serif); color: var(--mm-orange); font-variant-numeric: lining-nums; margin: 0 0 12px; }
.res-math { font-size: 1rem; color: var(--mm-black); }
.res-note { font-size: var(--fs-small); color: var(--mm-grey); margin: 10px 0 0; max-width: none; }
.closed { margin-top: 40px; }
.closed-title { font-size: clamp(1.75rem, 1.6vw + 1rem, 2.5rem); line-height: 1.1; margin: 0 0 20px; }
.closed-title em { font-style: italic; color: var(--mm-orange); }
.closed-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.closed-num { background: #fff; border-radius: var(--radius-card); padding: 28px clamp(24px, 3vw, 40px); display: flex; flex-direction: column; }
.closed-num .mm-kicker { margin-bottom: 12px; white-space: normal; line-height: 1.4; }
.closed-num b { font: 300 clamp(3.25rem, 5.5vw, 5rem)/1 var(--font-serif); letter-spacing: -0.02em; color: var(--mm-black); font-variant-numeric: tabular-nums lining-nums; }
.closed-num.before b { color: var(--mm-orange); }
.closed-save { font: 300 clamp(1.5rem, 1vw + 1rem, 1.875rem)/1.2 var(--font-serif); color: var(--mm-black); margin-top: 12px; }
.send { margin-top: 40px; background: var(--mm-blue); color: #fff; border-radius: var(--radius-card); padding: clamp(28px, 4vw, 48px); }
.send-title { font-size: clamp(2rem, 2.4vw + 1rem, 3rem); line-height: 1.05; color: #fff; margin: 0 0 16px; }
.send-title em { color: #fff; }
.send-reasons { margin: 0 0 28px; padding: 0 0 0 20px; color: #fff; }
.send-reasons li { margin: 4px 0; font-size: 1.0625rem; color: #fff; }
.send-reasons li::marker { color: #fff; }
.send-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 14px; align-items: end; }
.send-form label { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-small); color: #fff; min-width: 0; }
.send-form input { height: 52px; border: 0; border-radius: var(--radius-1); padding: 0 14px; font: 300 1rem var(--font-sans); color: var(--mm-black); background: #fff; width: 100%; }
.send-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send-known { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; }
.send-as { margin: 0; color: #fff; max-width: none; }
.send-as b { font-weight: 400; }
.send-as .link-inline { color: #fff; text-decoration-color: rgba(255,255,255,0.6); }
.send-done { font: 300 1.5rem/1.3 var(--font-serif); color: #fff; margin: 0; display: flex; align-items: center; gap: 12px; }
.send-done::before { content: ""; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23232323' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.form-error.on-blue { color: #fff; }
.legal-foot { margin-top: 64px; padding-top: 24px; padding-bottom: 48px; }
.legal-foot p { font-size: var(--fs-micro); line-height: 1.5; color: var(--mm-ink-500); margin: 0; padding-top: 20px; border-top: 1px solid var(--mm-rule-ink); max-width: none; }

/* ---------- tablet and phone ---------- */
@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr 1fr; }
  .send-form { grid-template-columns: 1fr 1fr; }
  .send-form .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 720px) {
  .hero { padding-top: 36px; }
  .calc-grid { grid-template-columns: 1fr; gap: 22px; }
  .seg { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 40px 1fr; align-items: start; }
  .row-num { font-size: 2.25rem; text-align: left; }
  .row-ans { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .go { flex-direction: column; align-items: stretch; }
  .go-btn { align-items: stretch; }
  .res-panel { grid-template-columns: 1fr; }
  .res-gaps { padding-left: 0; border-left: 0; padding-top: 20px; border-top: 1px solid var(--mm-rule-ink); }
  .closed-nums { grid-template-columns: 1fr; }
  .send-form { grid-template-columns: 1fr; }
  .send-form .btn, .send-known .btn, .send-known { width: 100%; }
}

@media print {
  .bar, .link-inline, .sent.fail { display: none !important; }
}
