/* ================================================================
   Ankolekar & Co. — shared design system
   Extends the approved "Light & Editorial" homepage
   (ankolekar-mercer-style-homepage.html). Tokens, hero, cards,
   people-grid, pub-list, panel, talk/footer, calc-nudge and reveal
   patterns are carried over unchanged; everything below the
   "INTERIOR PAGE PATTERNS" marker is new, built to match.
   ================================================================ */

:root {
  --blue: #0B41AD;
  --blue-deep: #001F52;
  --paper: #ffffff;
  --grey: #f2f5fb;
  --line: #dde4f2;
  --ink: #0f172a;
  --text-soft: #55607a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--ink); background: var(--paper); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 500; letter-spacing: -0.01em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
a { color: inherit; text-decoration: none; }

/* visually-hidden but screen-reader-accessible (used to keep heading
   hierarchy unbroken — e.g. h1 -> h2 -> h3 — without adding a visible
   duplicate label where the section title is already implied) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* skip link (accessibility) */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--blue-deep); color: #fff; padding: 12px 18px; z-index: 1000; border-radius: 0 0 8px 0; font-size: 13px; font-weight: 600; }
.skip-link:focus { left: 0; }

/* focus visibility (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px;
}

/* ---------------- header / navigation ---------------- */
header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-mark { display: block; width: 44px; height: 58px; overflow: hidden; flex: 0 0 auto; }
.logo-mark img { display: block; width: auto; height: 58px; max-width: none; }
.logo-copy { display: flex; flex-direction: column; justify-content: center; font-family: "Times New Roman", Times, serif; color: #292929; white-space: nowrap; }
.logo-name { font-size: 12pt; line-height: 1.05; font-weight: 700; }
.logo-subtitle { margin-top: 3px; font-size: 10pt; line-height: 1.05; font-weight: 400; }
.nav-links { display: flex; gap: 26px; font-size: 13.5px; font-weight: 600; color: var(--text-soft); align-items: center; }
.nav-links > a { padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav-links > a:hover, .nav-links > a.active, .nav-links .dropdown-toggle:hover, .nav-links .dropdown-toggle.active {
  color: var(--blue-deep); border-color: var(--blue);
}
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: -14px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 24px 48px -16px rgba(11,65,173,0.22); padding: 8px;
  min-width: 250px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-menu a { display: block; padding: 10px 14px; border-radius: 8px; font-weight: 500; font-size: 13.5px; color: var(--ink); border-bottom: none; }
.nav-dropdown-menu a:hover, .nav-dropdown-menu a:focus-visible { background: var(--grey); color: var(--blue-deep); }
.nav-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.btn-sm { padding: 9px 18px; font-size: 12.5px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 40px; height: 40px; font-size: 18px; color: var(--blue-deep); cursor: pointer; }
.mobile-nav { display: none; flex-direction: column; padding: 10px 24px 20px; border-top: 1px solid var(--line); }
.mobile-nav a { padding: 11px 0; font-size: 14.5px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
.mobile-nav a.sub { padding-left: 16px; font-weight: 500; font-size: 13.5px; color: var(--text-soft); }
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav.open { display: flex; }

@media (max-width: 900px) {
  .nav-links, .nav-right .btn-sm { display: none; }
  .nav-toggle { display: block; }
  .nav { padding: 10px 0; }
  .logo-mark { width: 37px; height: 50px; }
  .logo-mark img { height: 50px; }
}

/* ---------------- hero (Home only) ---------------- */
.hero { position: relative; background: var(--blue); overflow: hidden; padding: 90px 0 110px; }
.hero-art { position: absolute; inset: 0; z-index: 0; }
.blob { position: absolute; border-radius: 50%; opacity: 0.5; animation: drift 14s ease-in-out infinite; }
.blob1 { width: 480px; height: 480px; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), rgba(255,255,255,0) 70%); top: -140px; right: -80px; }
.blob2 { width: 320px; height: 320px; background: radial-gradient(circle at 60% 40%, rgba(0,31,82,0.5), rgba(0,31,82,0) 70%); bottom: -100px; right: 220px; animation-delay: -6s; }
@keyframes drift { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-20px, 18px) scale(1.05); } }
.hero .wrap { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero .eyebrow { font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.75); margin-bottom: 20px; opacity: 0; animation: rise .8s .1s ease forwards; }
.hero h1 { font-size: clamp(32px, 4vw, 46px); line-height: 1.2; color: #fff; opacity: 0; animation: rise .8s .25s ease forwards; }
.hero p { font-size: 16px; color: rgba(255,255,255,0.85); max-width: 480px; margin: 24px 0 32px; opacity: 0; animation: rise .8s .4s ease forwards; }
.hero-visual { position: relative; opacity: 0; animation: rise 1s .35s ease forwards; }
.hero-visual .frame { border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,31,82,0.5); position: relative; }
.hero-visual img { width: 100%; height: 360px; object-fit: cover; display: block; }
.hero-visual .frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(11,65,173,0.28), rgba(0,31,82,0) 60%); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; font-size: 13.5px; font-weight: 600; border-radius: 26px; transition: all .25s; border: none; cursor: pointer; font-family: inherit; }
.btn-white { background: #fff; color: var(--blue-deep); }
.btn-white:hover { background: var(--grey); transform: translateY(-2px); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-deep); }
.btn-outline { background: transparent; color: var(--blue-deep); border: 1px solid var(--line); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------- general section rhythm ---------------- */
section { padding: 90px 0; }
.band-grey { background: var(--grey); }
.label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); font-weight: 700; margin-bottom: 16px; }
h2.section-title { font-size: 30px; color: var(--blue-deep); margin-bottom: 44px; max-width: 620px; }

/* ---------------- cards (solutions / services hub) ---------------- */
.cards-row { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
.cards-row::-webkit-scrollbar { height: 5px; }
.cards-row::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }
.card { min-width: 300px; scroll-snap-align: start; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(11,65,173,0.12); }
.card-art { height: 130px; }
.card-art svg { width: 100%; height: 100%; display: block; }
.card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 22px; }
.card .k { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); font-weight: 700; margin-bottom: 10px; }
.card h3 { font-size: 16px; font-weight: 500; color: var(--ink); line-height: 1.4; margin-bottom: 10px; }
.card p { font-size: 13px; color: var(--text-soft); line-height: 1.6; }
.publication-card { display: flex; flex: 1 0 300px; flex-direction: column; }
.publication-card .card-body { display: flex; flex: 1; flex-direction: column; }
.publication-card .card-download { display: inline-block; margin-top: auto; padding-top: 18px; color: var(--blue); font-size: 12.5px; font-weight: 700; }

/* ---------------- people (homepage teaser) ---------------- */
.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.person .avatar { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; margin-bottom: 16px; background: var(--grey); }
.person .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person h3 { font-size: 15px; font-weight: 500; margin-bottom: 3px; }
.person p { font-size: 12.5px; color: var(--text-soft); }
@media (max-width: 900px) { .people-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- split / panel (calculator promo) ---------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.panel { border-radius: 16px; padding: 40px; }
.panel-blue { background: var(--blue-deep); color: #fff; }
.panel-white { background: #fff; border: 1px solid var(--line); }
.panel h3 { font-size: 22px; margin-bottom: 14px; }
.panel-blue p { color: rgba(255,255,255,0.75); }
.panel-white p { color: var(--text-soft); }
.panel p { font-size: 14px; margin-bottom: 24px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* ---------------- talk / contact band ---------------- */
.talk { background: var(--grey); text-align: center; }
.talk h2 { font-size: 32px; color: var(--blue-deep); margin-bottom: 14px; }
.talk p { color: var(--text-soft); max-width: 440px; margin: 0 auto 30px; font-size: 15px; }

/* ---------------- publications list ---------------- */
.pub-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.publication-index-card { display: flex; flex-direction: column; min-height: 270px; padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: transform .25s, box-shadow .25s, border-color .25s; }
.publication-index-card:hover { transform: translateY(-3px); border-color: #b9c9e6; box-shadow: 0 12px 28px rgba(11,65,173,.09); }
.publication-index-card .publication-date { margin-bottom: 18px; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.publication-index-card h3 { margin-bottom: 12px; color: var(--blue-deep); font-family: Fraunces, Georgia, serif; font-size: 19px; font-weight: 500; line-height: 1.35; }
.publication-index-card .desc { color: var(--text-soft); font-size: 13px; line-height: 1.65; }
.publication-index-card .dl { margin-top: auto; padding-top: 22px; color: var(--blue); font-size: 12.5px; font-weight: 700; }
.pub-row { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.pub-row .cat { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: var(--blue); border-radius: 20px; padding: 5px 12px; text-align: center; }
.pub-row h3 { font-size: 15.5px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.pub-row .desc { font-size: 12.5px; color: var(--text-soft); line-height: 1.5; max-width: 640px; }
.pub-row .dl { font-size: 12.5px; font-weight: 600; color: var(--blue); white-space: nowrap; }
.pub-row.hidden { display: none; }
@media (max-width: 900px) {
  .pub-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-row { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 620px) { .pub-list { grid-template-columns: 1fr; } .publication-index-card { min-height: 0; } }

/* ---------------- footer ---------------- */
footer { padding: 0; border-top: 1px solid var(--line); }
.footer-nav { padding: 40px 0 24px; border-bottom: 1px solid var(--line); background: var(--grey); }
.footer-nav .wrap { display: flex; flex-wrap: wrap; gap: 28px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.footer-nav a:hover { color: var(--blue-deep); }
.footer-bottom { padding: 24px 0; background: var(--grey); }
.footer-bottom .wrap { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-soft); flex-wrap: wrap; gap: 12px; }
.agency-credit { flex-basis: 100%; text-align: center; padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--line); }
.agency-credit a { color: var(--blue-deep); font-weight: 600; }
.agency-credit a:hover { color: var(--blue); }

/* ---------------- reveal-on-scroll ---------------- */
.reveal { opacity: 1; transform: none; }
.js-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js-reveal .reveal.in { opacity: 1; transform: translateY(0); }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* ---------------- calculator flash target (Home cross-link) ---------------- */
#calculator { scroll-margin-top: 140px; transition: box-shadow .6s ease; }
#calculator.flash .panel-blue { box-shadow: 0 0 0 3px var(--blue); }

/* ---------------- calculator nudge (site-wide utility) ---------------- */
.calc-nudge { position: fixed; right: 26px; bottom: 26px; z-index: 200; max-width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 26px 55px -20px rgba(11,65,173,0.3); padding: 22px 24px; opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity .5s ease, transform .5s ease; }
.calc-nudge.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.calc-nudge .close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 16px; line-height: 1; color: var(--text-soft); cursor: pointer; padding: 4px; }
.calc-nudge .close:hover { color: var(--ink); }
.calc-nudge .eyebrow-mini { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); font-weight: 700; margin-bottom: 8px; }
.calc-nudge .calc-nudge-title { font-family: 'Fraunces', serif; font-weight: 500; font-size: 16px; color: var(--blue-deep); margin-bottom: 8px; }
.calc-nudge p { font-size: 12.5px; color: var(--text-soft); margin-bottom: 16px; line-height: 1.55; }
.calc-nudge a.btn { padding: 10px 18px; font-size: 12.5px; }
@media (max-width: 900px) { .calc-nudge { left: 16px; right: 16px; bottom: 16px; max-width: none; } }

/* ================================================================
   INTERIOR PAGE PATTERNS (new — extends the system above)
   ================================================================ */

/* compact page-header band, used by every interior page instead of
   repeating the animated photo hero (restraint, per D-007; also
   avoids re-using homepage photography out of context) */
.page-header { background: var(--blue-deep); padding: 60px 0 52px; color: #fff; }
.page-header .crumb { font-size: 12px; color: rgba(255,255,255,0.6); margin-bottom: 16px; }
.page-header .crumb a:hover { color: #fff; text-decoration: underline; }
.page-header .eyebrow { font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.7); font-weight: 700; margin-bottom: 14px; }
.page-header h1 { color: #fff; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.25; max-width: 720px; }
.page-header p { color: rgba(255,255,255,0.8); max-width: 620px; margin-top: 14px; font-size: 15px; }

/* services hub grid */
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.service-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 30px; transition: transform .3s, box-shadow .3s; display: block; }
.service-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(11,65,173,0.12); }
.service-card .k { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); font-weight: 700; margin-bottom: 12px; }
.service-card h3 { font-size: 19px; color: var(--blue-deep); margin-bottom: 10px; }
.service-card p { font-size: 13.5px; color: var(--text-soft); margin-bottom: 16px; }
.service-card .go { font-size: 12.5px; font-weight: 700; color: var(--blue); }
@media (max-width: 900px) { .service-grid { grid-template-columns: 1fr; } }

/* services sub-page capability list */
.capability-list { list-style: none; display: grid; gap: 12px; margin: 8px 0 44px; }
.capability-list li { padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px; color: var(--ink); }

/* publications hub filter controls */
.pub-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.pub-filters button { padding: 9px 18px; border-radius: 20px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--text-soft); cursor: pointer; transition: all .2s; font-family: inherit; }
.pub-filters button:hover { border-color: var(--blue); color: var(--blue-deep); }
.pub-filters button[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.pub-count { font-size: 12.5px; color: var(--text-soft); margin: 18px 0 8px; }

/* people page — full profiles */
.people-grid-full { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.person-card { display: flex; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.person-card .avatar { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--grey); }
.person-card .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-card h3 { font-size: 17px; color: var(--blue-deep); margin-bottom: 4px; }
.person-card .role { font-size: 12px; color: var(--blue); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.person-card p.bio { font-size: 13.5px; color: var(--text-soft); line-height: 1.6; }
@media (max-width: 900px) { .people-grid-full { grid-template-columns: 1fr; } .person-card { flex-direction: column; } }

/* about content blocks */
.about-block { padding: 32px 0; border-bottom: 1px solid var(--line); }
.about-block:last-child { border-bottom: none; }
.about-block h2 { font-size: 21px; color: var(--blue-deep); margin-bottom: 12px; }
.about-block p { font-size: 14.5px; color: var(--text-soft); max-width: 760px; margin-bottom: 12px; }
.about-block p:last-child { margin-bottom: 0; }

/* blog grid + cards */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: transform .3s, box-shadow .3s; display: block; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(11,65,173,0.12); }
.blog-card .cover { height: 140px; }
.blog-card .cover svg { width: 100%; height: 100%; display: block; }
.blog-card .body { padding: 20px; }
.blog-card .date { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue); font-weight: 700; margin-bottom: 8px; }
.blog-card h3 { font-size: 16px; color: var(--ink); margin-bottom: 8px; line-height: 1.4; }
.blog-card p { font-size: 13px; color: var(--text-soft); }
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-empty { text-align: center; padding: 60px 24px; color: var(--text-soft); border: 1px dashed var(--line); border-radius: 14px; font-size: 14px; }
.blog-empty[hidden] { display: none; }

/* blog article */
.article-body { max-width: 720px; margin: 0 auto; font-size: 16px; line-height: 1.8; color: var(--ink); }
.article-body p { margin-bottom: 22px; }
.article-body h2 { font-size: 22px; color: var(--blue-deep); margin: 40px 0 16px; }
.article-meta { max-width: 720px; margin: 0 auto 40px; display: flex; gap: 16px; align-items: center; font-size: 12.5px; color: var(--text-soft); }
.article-meta .tag { background: var(--blue); color: #fff; border-radius: 20px; padding: 4px 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 10.5px; }
.example-flag { max-width: 720px; margin: 0 auto 32px; background: var(--grey); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; font-size: 12.5px; color: var(--text-soft); }

/* contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-info address { font-style: normal; font-size: 15px; line-height: 1.9; color: var(--ink); margin-bottom: 24px; }
.contact-info h3 { font-size: 15px; color: var(--blue-deep); margin-bottom: 10px; }
.contact-info .note { font-size: 13px; color: var(--text-soft); }
.contact-form label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.contact-form .field { margin-bottom: 20px; }
.contact-form input, .contact-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-family: inherit; font-size: 14px; color: var(--ink); }
.contact-form textarea { min-height: 130px; resize: vertical; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* calculator page and terms gate */
.calc-panel { max-width: 960px; margin: 0 auto; text-align: center; }
.calculator-page-header { padding-top:42px; padding-bottom:38px; }
.calculator-section { padding-top:52px; padding-bottom:72px; }
.calc-note { max-width: 640px; margin: 28px auto 0; font-size: 13px; color: var(--text-soft); text-align: center; }
.calculator-toolbar { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:18px; text-align:left; }
.calculator-toolbar p { margin:0; color:var(--text-soft); font-size:14px; line-height:1.6; }
.calculator-terms-link { flex:0 0 auto; padding:3px 0; border:0; border-bottom:1px solid currentColor; border-radius:0; background:transparent; color:var(--blue); font:600 12.5px/1.4 'Inter',sans-serif; cursor:pointer; }
.calculator-terms-link:hover { color:var(--blue-deep); }
.calculator-form { margin-top: 0; padding: 32px; text-align: left; }
.calculator-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 22px; }
.calculator-form .field { margin: 0; }
.calculator-form label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 13px; font-weight: 700; }
.calculator-form input,.calculator-form select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: 14px/1.4 'Inter',sans-serif; }
.calculator-form input:focus,.calculator-form select:focus { outline: 3px solid rgba(11,65,173,.18); border-color: var(--blue); }
.calculator-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.calculator-result { margin-top: 24px; padding: 22px 24px; border-radius: 12px; background: var(--blue-soft); color: var(--blue-deep); }
.calculator-result.error { background: #fff0f0; color: #8d1d1d; }
.calculator-result strong { display: block; margin-top: 4px; font-family: 'Fraunces',serif; font-size: clamp(26px,4vw,38px); }
body.terms-open { overflow: hidden; }
.terms-gate { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 32px; background: rgba(0,31,82,.68); backdrop-filter: blur(5px); }
.terms-gate[hidden] { display: none; }
.terms-dialog { width: min(720px, 100%); max-height: min(700px, 86vh); display: grid; grid-template-rows: auto minmax(170px, 1fr) auto; gap: 0; overflow: hidden; background: #e5e7eb; border: 1px solid rgba(255,255,255,.55); border-radius: 18px; box-shadow: 0 24px 70px rgba(0,20,55,.3); }
.terms-heading { padding: 22px 28px 17px; border-bottom: 1px solid var(--line); }
.terms-heading .eyebrow { margin-bottom: 6px; }
.terms-heading h2 { margin: 0 0 7px; color: var(--blue-deep); font-size: clamp(21px, 2.6vw, 27px); line-height: 1.2; }
.terms-heading > p:last-child { margin: 0; color: var(--text-soft); font-size: 12.5px; line-height: 1.55; }
.terms-scroll { overflow-y: auto; margin: 14px 20px 0; padding: 21px 28px 10px; color: var(--ink); background: #fff; border: 1px solid rgba(11,31,62,.1); border-radius: 12px; box-shadow: 0 5px 18px rgba(0,31,82,.06); font-size: 13.5px; line-height: 1.68; scroll-behavior: smooth; }
.terms-scroll:focus-visible { outline: 2px solid rgba(17,24,39,.28); outline-offset: 2px; }
.terms-scroll h3 { margin: 21px 0 8px; color: var(--blue-deep); font-size: 17px; }
.terms-scroll h3:first-child { margin-top: 0; }
.terms-scroll h4 { margin: 17px 0 6px; color: var(--blue-deep); font-size: 14.5px; }
.terms-scroll p { margin: 0 0 11px; }
.terms-scroll ol { margin: 0 0 14px; padding-left: 22px; }
.terms-scroll li { margin-bottom: 8px; padding-left: 4px; }
.terms-end { margin-top: 20px; padding: 10px; border-top: 1px solid var(--line); color: var(--text-soft); text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.terms-actions { padding: 15px 28px 18px; background: #e5e7eb; }
.terms-scroll-note { margin: 0 0 8px; color: var(--text-soft); font-size: 11.5px; }
.terms-scroll-note.ready { color: var(--blue); font-weight: 600; }
.terms-consent { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.terms-consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); }
.terms-consent:has(input:disabled) { color: var(--text-soft); cursor: not-allowed; }
.terms-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 13px; }
.terms-buttons .btn { min-width: 104px; padding: 10px 18px; text-align: center; }
.terms-buttons button:disabled { opacity: .45; cursor: not-allowed; }

/* mobile section rhythm */
@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  header .nav { padding-top: 8px; padding-bottom: 8px; }
  section { padding: 56px 0; }
  .hero { padding: 48px 0 64px; }
  .page-header { padding: 40px 0 36px; }
  h2.section-title { font-size: 23px; margin-bottom: 32px; }
  .panel { padding: 26px 22px; }
  .hero-visual img { height: 260px; }
  .calc-nudge { padding: 14px 16px 16px; border-radius: 12px; }
  .calc-nudge p { display: none; }
  .calc-nudge .eyebrow-mini { margin-bottom: 4px; }
  .calc-nudge .calc-nudge-title { font-size: 14px; margin-bottom: 10px; }
  .calc-nudge a.btn { padding: 8px 14px; font-size: 11.5px; }
  .terms-gate { padding: 12px; }
  .terms-dialog { width: 100%; max-height: 88vh; border-radius: 15px; }
  .terms-heading { padding: 18px 19px 14px; }
  .terms-heading h2 { font-size: 20px; }
  .terms-heading > p:last-child { font-size: 12px; }
  .terms-scroll { margin: 11px 12px 0; padding: 18px 19px 8px; font-size: 13px; }
  .terms-actions { padding: 13px 19px 15px; }
  .terms-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .terms-buttons .btn { min-width: 0; width: 100%; }
  .calculator-fields { grid-template-columns: 1fr; }
  .calculator-form { padding: 22px 18px; }
  .calculator-toolbar { align-items:flex-start; flex-direction:column; margin-bottom:14px; }
  .calculator-actions { flex-direction: column; }
  .calculator-actions .btn { width: 100%; }
}
