/* Mortgage Dungeon brand tokens — values from src/lib/theme/brand-tokens.css (repo). */
:root {
  --ink: #1a120b;
  --navy: #103050;
  --navy-deep: #0b1a2e;
  --flame: #3b7dd6;
  --wood: #e8c595;
  --wood-deep: #c4923a;
  --page: #f7f4ef;
  --surface: #ffffff;
  --border: #d9d0c3;
  --fg: #1b2433;
  --muted: #5c6675;
  --ok: #1f6b3a;
  --bad: #9b2c1f;
  --font-display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-sans: "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 0.5rem;
  --card-radius: 0.625rem;
  --shadow: 0 10px 28px -18px rgba(16, 48, 80, 0.28);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--fg); font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 2px; }
a:hover { color: var(--flame); }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 2px; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; color: var(--fg); }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: .25rem 0 1rem; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin: 0 0 .75rem; }
h3 { font-size: 1.25rem; margin: 0 0 .5rem; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--wood-deep); margin: 0; }
.lead { font-size: 1.2rem; color: var(--fg); max-width: 44rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Header: logo artwork sits on a black field, so the bar is ink. */
.site-header { background: var(--ink); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .5rem; padding-bottom: .5rem; flex-wrap: wrap; }
.site-header .logo img { display: block; width: 132px; height: auto; }
.site-header .hdr-contact { color: #f4f7fb; font-size: .95rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.site-header .hdr-contact a { color: #f4f7fb; }

.state-bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.state-bar .wrap { display: flex; align-items: center; gap: .75rem; padding-top: .6rem; padding-bottom: .6rem; flex-wrap: wrap; font-size: .95rem; }
select, input, textarea { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .75rem; min-height: 2.75rem; width: 100%; }
.state-bar select { width: auto; }
textarea { min-height: 6rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--flame); }

section { padding: 3rem 0; }
.hero { padding: 3.5rem 0 2.5rem; }
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-radius); box-shadow: var(--shadow); padding: 1.5rem; }
.card ul { padding-left: 1.2rem; margin: .5rem 0 0; }
.card li { margin: .3rem 0; }
.note { border-left: 4px solid var(--wood-deep); background: #fffcf7; padding: .9rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; font-size: .95rem; }

/* One solid button color: brand navy (--md-btn-primary-bg). */
.btn { display: inline-block; background: var(--navy); color: #fff; border: 1px solid var(--navy); border-radius: var(--radius); padding: .75rem 1.25rem; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; min-height: 2.75rem; }
.btn:hover, .btn:focus-visible { background: var(--navy-deep); color: #fff; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.link-btn { background: none; border: 0; color: var(--navy); text-decoration: underline; font: inherit; cursor: pointer; padding: .75rem 0; }

/* Calculator */
.example-flag { display: inline-block; background: #fff4dc; border: 1px solid var(--wood-deep); color: var(--ink); font-weight: 700; font-size: .85rem; padding: .2rem .6rem; border-radius: var(--radius); }
.fields { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .fields { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .3rem; }
.field .hint { display: block; font-size: .825rem; color: var(--muted); margin-top: .25rem; }
.field.full { grid-column: 1 / -1; }
.check { display: flex; gap: .6rem; align-items: flex-start; }
.check input { width: 1.15rem; min-height: 1.15rem; height: 1.15rem; margin-top: .3rem; flex: 0 0 auto; }
.results { margin-top: 1.5rem; }
.results dl { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; margin: 0; }
.results dt { color: var(--muted); }
.results dd { margin: 0; font-family: var(--font-mono); font-weight: 600; text-align: right; }
.flags { list-style: none; padding: 0; margin: 1rem 0 0; }
.flags li { padding: .55rem .8rem; border-radius: var(--radius); margin: .4rem 0; border: 1px solid var(--border); }
.flags li.pass { border-color: #9cc9aa; background: #eef7f0; }
.flags li.fail { border-color: #e0a59b; background: #fbefec; }
.flags li.info { background: #f2f5f9; }
.flags strong { margin-right: .35rem; }

/* Form */
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--bad); font-size: .875rem; margin-top: .25rem; min-height: 0; }
.form-status { margin-top: 1rem; font-weight: 600; }
.form-status.ok { color: var(--ok); }
.form-status.bad { color: var(--bad); }
.consent-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; background: #fffcf7; font-size: .9rem; }

/* Footer */
.site-footer { background: var(--navy-deep); color: #dfe6ef; font-size: .875rem; padding: 2.5rem 0; }
.site-footer a { color: #ffffff; }
.site-footer p { margin: .5rem 0; }
.site-footer .eho { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; }
.eho-logo { flex: 0 0 auto; color: #ffffff; }
.eho p { margin: 0; }
.site-footer .disc-state { border-top: 1px solid rgba(255,255,255,.15); padding-top: .75rem; margin-top: .75rem; }
.missing { background: #fff1b8; color: #3a2a00; padding: 0 .2rem; border-radius: .2rem; }
.site-footer .missing { color: #3a2a00; }

.legal h2 { margin-top: 2rem; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
.mt { margin-top: 1.5rem; }
fieldset.bare { border: 0; padding: 0; margin: 0; }
fieldset.bare legend { font-weight: 600; font-size: .95rem; margin-bottom: .3rem; padding: 0; }
.consent-after { margin: .6rem 0 0; }
.narrow { max-width: 48rem; }
