/* Shared look for Zach's tool pages (closing costs, monthly payment, co-op checklist).
   Same tokens, type and chrome as the homepage; nav is always solid here. */
:root {
  --ink:#000; --text:#14171a; --muted:#6b6b6b; --line:#e7e7e7;
  --bg:#fff; --soft:#f6f5f2; --stone:#eeede9; --good:#06623b;
  --serif:"Antic Didone", Georgia, serif; --sans:"Inter", system-ui, sans-serif;
  --gutter:62px;
}
* { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body { background:var(--bg); color:var(--ink); font-family:var(--sans); font-size:16px; line-height:1.6; -webkit-font-smoothing:antialiased; }
img { display:block; max-width:100%; }
a { color:inherit; text-decoration:none; }
button, input, select, textarea { font:inherit; color:inherit; }
h1,h2,h3,h4,h5,h6 { font-family:var(--serif); font-weight:400; line-height:1.15; }
p { text-wrap:pretty; }

.btn { display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:14px 26px; border:1px solid currentColor; background:transparent; font:600 14px/1 var(--sans); text-transform:uppercase; letter-spacing:.02em; cursor:pointer; transition:background .25s, color .25s; }
.btn--dark { color:#000; } .btn--dark:hover { background:#000; color:#fff; }
.btn--fill { background:#000; color:#fff; border-color:#000; } .btn--fill:hover { background:#fff; color:#000; }
.btn:active { transform:translateY(1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline:2px solid #000; outline-offset:2px; }
.btn[disabled] { opacity:.45; cursor:not-allowed; }

/* Nav (solid) */
.nav { position:sticky; top:0; z-index:50; height:90px; display:flex; align-items:center; background:#fff; box-shadow:0 1px 0 var(--line); }
.nav__in { width:100%; padding:0 var(--gutter); display:flex; align-items:center; justify-content:space-between; gap:24px; }
.nav__logo img { width:268px; height:auto; }
.nav ul { display:flex; list-style:none; }
.nav ul a { display:block; padding:21px 15px; font-size:15px; line-height:18px; text-transform:uppercase; transition:opacity .2s; white-space:nowrap; }
.nav ul a:hover { opacity:.6; }
.nav ul a[aria-current="page"] { box-shadow:inset 0 -1px 0 #000; }
.nav__burger { display:none; width:44px; height:44px; border:0; background:none; cursor:pointer; }
.menu { position:fixed; inset:0; z-index:60; background:#fff; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:22px; opacity:0; pointer-events:none; transition:opacity .3s; padding:24px; text-align:center; }
.menu.open { opacity:1; pointer-events:auto; }
.menu a { font:400 26px/1.2 var(--serif); text-transform:uppercase; }
.menu__close { position:absolute; top:24px; right:20px; width:44px; height:44px; border:0; background:none; font-size:30px; cursor:pointer; }

/* Page header */
.tool-hero { padding:72px var(--gutter) 40px; max-width:1180px; margin:0 auto; }
.eyebrow { font:600 12px/1 var(--sans); letter-spacing:.16em; text-transform:uppercase; color:var(--muted); }
.tool-hero h1 { font-size:54px; text-transform:uppercase; margin-top:14px; }
.tool-hero .lede { margin-top:16px; max-width:640px; color:var(--text); }
.tool { max-width:1180px; margin:0 auto; padding:0 var(--gutter) 96px; }

/* Forms */
.field { display:flex; flex-direction:column; gap:8px; }
.field > span, .label { font:600 12px/1.2 var(--sans); letter-spacing:.12em; text-transform:uppercase; color:var(--muted); }
.field small { font-size:12px; color:var(--muted); letter-spacing:0; text-transform:none; font-weight:400; }
.input, select.input, textarea.input { width:100%; height:52px; padding:0 16px; border:1px solid #d8d6d0; background:#fff; border-radius:0; font-size:16px; transition:border-color .2s; -webkit-appearance:none; appearance:none; }
select.input { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23000' stroke-width='1.4'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 16px center; padding-right:40px; }
.input:hover { border-color:#b9b6ae; } .input:focus { border-color:#000; outline:none; }
.input.err { border-color:#a3261b; }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.seg { display:flex; border:1px solid #d8d6d0; }
.seg button { flex:1; height:50px; border:0; background:#fff; font-size:14px; cursor:pointer; transition:background .2s, color .2s; }
.seg button + button { border-left:1px solid #d8d6d0; }
.seg button[aria-pressed="true"] { background:#000; color:#fff; }
.check { display:flex; gap:12px; align-items:flex-start; font-size:14px; cursor:pointer; }
.check input { width:18px; height:18px; margin-top:2px; accent-color:#000; flex:none; }

/* Results panels */
.panel { background:var(--soft); padding:32px; }
.lines { list-style:none; }
.lines li { display:flex; justify-content:space-between; gap:20px; padding:13px 0; border-top:1px solid #e3e1db; font-size:15px; }
.lines li:first-child { border-top:0; }
.lines li b { font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
.lines li small { display:block; color:var(--muted); font-size:12px; margin-top:2px; }
.lines li.total { border-top:1px solid #000; font-weight:600; font-size:17px; padding-top:16px; }
.big { font:400 52px/1 var(--serif); font-variant-numeric:tabular-nums; }
.note { font-size:12px; color:var(--muted); line-height:1.6; }

/* Footer */
.foot { padding:70px var(--gutter) 40px; color:var(--text); border-top:1px solid var(--line); }
.foot__info { display:grid; grid-template-columns:1fr 1fr 2fr; gap:40px; padding:0 0 50px; }
.foot h5 { font-size:22px; color:#000; margin-bottom:14px; }
.foot__col a, .foot__col p { display:block; font-size:14px; margin-bottom:6px; }
.foot__nav { display:flex; flex-wrap:wrap; gap:14px 30px; list-style:none; justify-content:flex-end; }
.foot__nav a { font-size:14px; text-transform:uppercase; padding-bottom:5px; border-bottom:1px solid transparent; transition:border-color .3s; }
.foot__nav a:hover { border-color:currentColor; }
.socials { display:flex; gap:10px; list-style:none; justify-content:flex-end; margin-top:28px; }
.socials a { width:40px; height:40px; border:1px solid #000; display:grid; place-items:center; transition:background .3s; }
.socials a:hover { background:#000; } .socials a:hover svg { fill:#fff; }
.foot__legal { display:flex; justify-content:space-between; align-items:center; gap:30px; padding:30px 0; border-top:1px solid var(--line); font-size:12px; }
.foot__legal a { font-size:14px; text-decoration:underline; }
.eho { display:inline-grid; place-items:center; width:100px; height:52px; border:1px solid var(--line); font:600 10px/1.2 var(--sans); text-align:center; color:var(--muted); letter-spacing:.08em; }
.foot__copy { padding-top:30px; border-top:1px solid var(--line); font-size:15px; }
.privacy-link { background:none; border:0; padding:0; font-size:inherit; text-decoration:underline; cursor:pointer; color:inherit; }

/* Cookie banner + privacy choices (same behavior as the homepage) */
.cookie { position:fixed; left:32px; right:32px; bottom:32px; z-index:70; background:#fff; color:#404040; box-shadow:0 0 16px rgba(0,0,0,.16); padding:20px 24px; display:flex; align-items:center; justify-content:space-between; gap:30px; font-size:14px; transform:translateY(calc(100% + 40px)); transition:transform .5s ease; }
.cookie.show { transform:none; }
.cookie h4 { font:400 24px/1.3 var(--sans); color:#000; margin-bottom:4px; }
.cookie__actions { display:flex; gap:10px; flex:none; }
.cookie button { padding:12px 24px; font-size:12px; font-weight:600; background:#fff; color:#000; border:1px solid var(--line); cursor:pointer; }
.cookie button.primary { background:#000; color:#fff; border-color:#000; }
.pmodal { position:fixed; inset:0; z-index:80; background:rgba(0,0,0,.55); display:flex; align-items:center; justify-content:center; padding:16px; opacity:0; pointer-events:none; transition:opacity .25s; }
.pmodal.open { opacity:1; pointer-events:auto; }
.pmodal__dialog { position:relative; width:min(580px,100%); max-height:88vh; overflow:auto; background:#fff; color:#404040; box-shadow:0 0 16px rgba(0,0,0,.16); padding:24px; }
.pmodal__close { position:absolute; top:24px; right:24px; width:24px; height:24px; border:0; background:none; cursor:pointer; display:grid; place-items:center; }
.pmodal h4 { font:400 24px/1.33 var(--sans); color:#000; margin:0 40px 8px 0; }
.pmodal__intro, .pcat p { font-size:12px; line-height:1.6; }
.pmodal__intro { margin-bottom:16px; }
.pcat { padding-bottom:20px; }
.pcat__head { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.pcat__title { font-size:14px; font-weight:600; color:#000; }
.pcat p { margin-top:8px; }
.always { font-size:12px; font-weight:600; color:var(--good); }
.switch { flex:none; width:40px; height:24px; border:0; border-radius:12px; background:#bbb; position:relative; cursor:pointer; transition:background .2s; }
.switch::after { content:""; position:absolute; left:2px; top:2px; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:0 2px 2px rgba(0,0,0,.15); transition:transform .2s; }
.switch[aria-checked="true"] { background:#000; }
.switch[aria-checked="true"]::after { transform:translateX(16px); }
.pmodal__actions { display:flex; gap:12px; margin-top:24px; }
.pmodal__actions button { flex:1; padding:12px 24px; font-size:12px; font-weight:600; background:#fff; color:#000; border:1px solid var(--line); cursor:pointer; }
.pmodal__actions button.primary { background:#000; color:#fff; border-color:#000; }

.reveal { opacity:0; transform:translateY(20px); transition:opacity .8s ease, transform .8s ease; }
.reveal.in { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity:1; transform:none; transition:none; } }

@media (max-width:1200px) {
  :root { --gutter:32px; }
  .nav ul { display:none; } .nav__burger { display:grid; place-items:center; }
}
@media (max-width:768px) {
  :root { --gutter:16px; }
  .nav { height:70px; } .nav__logo img { width:190px; }
  .tool-hero { padding:44px 16px 28px; } .tool-hero h1 { font-size:34px; }
  .tool { padding:0 16px 64px; }
  .panel { padding:22px 18px; }
  .big { font-size:40px; }
  .row2 { grid-template-columns:1fr; }
  .foot__info { grid-template-columns:1fr; } .foot__nav, .socials { justify-content:flex-start; }
  .foot__legal { flex-direction:column; align-items:flex-start; }
  .cookie { left:12px; right:12px; bottom:12px; flex-direction:column; align-items:stretch; gap:16px; padding:18px; }
  .cookie h4 { font-size:20px; } .cookie__actions { flex-direction:column; }
  .pmodal__actions { flex-direction:column; }
}
