/* Shared layout, adapted from the supplied costofsoftware design guide.
   Loaded last; preserves section markup and calculator behavior. */
:root {
  --page-width:1180px; --gutter:22px; --wrap:1180px;
  --ink:#1d1d1f; --navy:#1d1d1f; --bg:#fff; --sub:#6e6e73;
  --muted:#6e6e73; --gold:#0066cc; --rule:#d2d2d7;
  --ui-font:-apple-system,BlinkMacSystemFont,Inter,"Hiragino Sans","Yu Gothic",Meiryo,"Segoe UI",sans-serif;
}
body[data-atf-page] {margin:0;background:#fff;color:#1d1d1f;font-family:var(--ui-font);font-size:16px;line-height:1.65;overflow-x:visible}
body[data-atf-page] *,body[data-atf-page] *::before,body[data-atf-page] *::after {box-sizing:border-box}
body[data-atf-page] .wrap,
body.article-page[data-atf-page] main .wrap {
  width:calc(100% - 44px);max-width:1180px;margin-inline:auto;padding-inline:0;
}
body[data-atf-page] .wrap .wrap {width:100%;max-width:none;margin:0;padding-inline:0}
body[data-atf-page] main {padding-top:36px;padding-bottom:48px;min-width:0}
body[data-atf-page] .wide {max-width:100%;width:100%;margin-inline:0}
body[data-atf-page] .wrap.wide {width:calc(100% - 44px);max-width:1180px;margin-inline:auto}
body[data-atf-page] h1,body[data-atf-page] h2,body[data-atf-page] h3,
body[data-atf-page] h1 *,body[data-atf-page] h2 *,body[data-atf-page] h3 * {
  font-family:var(--ui-font);font-weight:600;font-style:normal;text-transform:none;letter-spacing:-.025em;color:#1d1d1f;
}
body[data-atf-page] h1 {font-size:clamp(32px,4vw,48px);line-height:1.12;margin:0 0 20px;max-width:1100px}
body[data-atf-page="home"] h1,body[data-atf-page="category"] h1 {font-size:clamp(36px,4.5vw,64px);line-height:1.08}
body[data-atf-page] h2 {font-size:28px;line-height:1.2;margin:28px 0 14px;padding:0;border:0}
body[data-atf-page] h3 {font-size:22px;line-height:1.3;margin:24px 0 12px}
body[data-atf-page] a {color:#0066cc;text-decoration:none;border-bottom:0;overflow-wrap:anywhere}
body[data-atf-page] a:hover {text-decoration:underline;text-underline-offset:3px}
body[data-atf-page] a:focus-visible,body[data-atf-page] button:focus-visible,
body[data-atf-page] input:focus-visible,body[data-atf-page] select:focus-visible,
body[data-atf-page] textarea:focus-visible {outline:3px solid #0071e3;outline-offset:3px}
body[data-atf-page] p {max-width:none}
body[data-atf-page] header.site {background:#fff;border-bottom:1px solid #e8e8ed}
body[data-atf-page] header.site .wrap {display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding-block:18px}
body[data-atf-page] header.site .brand,body[data-atf-page] header.site .logo,
body[data-atf-page] header.site .bt,body[data-atf-page] header.site .bn {
  color:#1d1d1f;font-family:var(--ui-font);font-size:17px;font-weight:600;text-transform:none;letter-spacing:-.02em;border:0;
}
body[data-atf-page] header.site .brand {align-items:flex-start}
body[data-atf-page] header.site .tl,body[data-atf-page] header.site .bt>span {
  font-family:var(--ui-font);font-size:12px;line-height:1.4;letter-spacing:0;text-transform:none;color:#6e6e73;margin-top:4px;
}
body[data-atf-page] header.site nav {display:flex;align-items:center;gap:6px 18px;flex-wrap:wrap;margin:0}
body[data-atf-page] header.site nav a {display:inline-flex;align-items:center;min-height:44px;margin:0;font-family:var(--ui-font);font-size:14px;font-weight:400;letter-spacing:0;text-transform:none;color:#424245}
body[data-atf-page] .hero {padding:12px 0 28px}
body[data-atf-page] .hero h1 {margin:0 auto 20px}
body[data-atf-page] .standfirst,body[data-atf-page] .lede {font-family:var(--ui-font);color:#6e6e73;font-size:19px;line-height:1.55;margin-top:16px}
body[data-atf-page] .meta,body[data-atf-page] .byline,body[data-atf-page] .kicker,
body[data-atf-page] .k,body[data-atf-page] .section-kicker {text-transform:none;letter-spacing:0;font-family:var(--ui-font);color:#6e6e73}
body[data-atf-page] .rule {display:none}
body[data-atf-page] .card,body[data-atf-page] .note,body[data-atf-page] .answer,
body[data-atf-page] .example,body[data-atf-page] .loan-warning,body[data-atf-page] .market-card,
body[data-atf-page] .provider-card {background:#f5f5f7;color:#1d1d1f;border:0;border-radius:24px;padding:24px;min-width:0}
body[data-atf-page] .card h3,body[data-atf-page] .note h3,body[data-atf-page] .provider-card h3,
body[data-atf-page] .market-card h3 {margin-top:0}
body[data-atf-page] .card p,body[data-atf-page] .note p,body[data-atf-page] .market-card p,
body[data-atf-page] .provider-card p {color:#424245}
body[data-atf-page] .card a,body[data-atf-page] .note a,body[data-atf-page] .market-card a {color:#0066cc}
body[data-atf-page] .tool {background:#f5f5f7;color:#1d1d1f;border:1px solid #e8e8ed;border-radius:24px;padding:24px;min-width:0;max-width:100%}
body[data-atf-page] .tool label,body[data-atf-page] .tool span,body[data-atf-page] .tool strong,
body[data-atf-page] .tool .b,body[data-atf-page] .tool .m {font-family:var(--ui-font);text-transform:none;letter-spacing:0}
body[data-atf-page] .home-hero {background:#f5f5f7;color:#1d1d1f;border-radius:24px;padding:40px;margin:0 0 28px}
body[data-atf-page] .home-hero h1 {color:#1d1d1f}
body[data-atf-page] .home-hero .kicker,body[data-atf-page] .home-hero .lede {color:#6e6e73}
body[data-atf-page] .home-hero .hero-actions .primary-action {background:#0071e3;color:#fff;border-color:#0071e3}
body[data-atf-page] .home-hero .hero-actions .secondary-action {background:#fff;color:#0066cc;border-color:#0066cc}
body[data-atf-page] .home-hero .hero-actions a:hover {background:#0066cc;color:#fff}
body[data-atf-page] .provider-card .provider-exit {background:#0071e3;color:#fff;border-radius:999px}
body[data-atf-page] .provider-card .provider-exit:hover {background:#0066cc}
body[data-atf-page] input,body[data-atf-page] select,body[data-atf-page] textarea {
  font-family:var(--ui-font);font-size:16px;max-width:100%;color:#1d1d1f;background:#fff;
}
body[data-atf-page] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body[data-atf-page] select,body[data-atf-page] button {min-height:44px}
body[data-atf-page] button,body[data-atf-page] .btn,body[data-atf-page] .primary-action {
  font-family:var(--ui-font);font-size:16px;font-weight:500;letter-spacing:0;text-transform:none;
  color:#fff;background:#0071e3;border:1px solid #0071e3;border-radius:999px;min-height:44px;padding:10px 20px;line-height:1.4;
}
body[data-atf-page] .secondary-action {color:#0066cc;background:#fff;border:1px solid #0066cc;border-radius:999px;min-height:44px;padding:10px 20px}
body[data-atf-page] .hero-actions,body[data-atf-page] .quick-actions {display:flex;flex-wrap:wrap;gap:12px;align-items:center}
body[data-atf-page] .hero-actions a,body[data-atf-page] .quick-actions a {min-height:44px;display:inline-flex;align-items:center}
body[data-atf-page] .ptable {display:block;max-width:100%;overflow-x:auto;margin:20px 0;border:1px solid #e8e8ed;border-radius:16px;background:#fff}
body[data-atf-page] .ptable table {margin:0;min-width:640px;width:100%}
body[data-atf-page] table {font-family:var(--ui-font);color:#1d1d1f}
body[data-atf-page] th,body[data-atf-page] td {font-family:var(--ui-font);font-size:14px;line-height:1.5}
body[data-atf-page] th {background:#f5f5f7;color:#1d1d1f;font-weight:600;text-transform:none;letter-spacing:0}
body[data-atf-page] .cards,body[data-atf-page] .grid,body[data-atf-page] .row,
body[data-atf-page] .quote-columns,body[data-atf-page] .market-grid {min-width:0}
body[data-atf-page] .cards>*,body[data-atf-page] .grid>*,body[data-atf-page] .row>*,
body[data-atf-page] .quote-columns>* {min-width:0}
body[data-atf-page] footer.site {background:#f5f5f7;border-top:0;margin-top:24px}
body[data-atf-page] footer.site .wrap {padding-block:28px 36px;font-family:var(--ui-font);font-size:13px;line-height:1.65;color:#6e6e73}
body[data-atf-page] footer.site a {color:#424245;min-height:44px;display:inline-flex;align-items:center}
body[data-atf-page] footer.site .links,body[data-atf-page] footer.site nav {display:flex;gap:4px 20px;flex-wrap:wrap;margin-bottom:16px}
/* Domain home: spacious hero, six topic cards, compact source/method section. */
body[data-atf-page="home"] main {padding-top:0}
body[data-atf-page="home"] .hero {padding:72px 0 48px;text-align:center}
body[data-atf-page="home"] .hero h1 {max-width:900px}
body[data-atf-page="home"] .hero .standfirst {max-width:760px;margin:24px auto}
body[data-atf-page="home"] .hero-actions {max-width:930px;margin:28px auto 0;justify-content:center}
body[data-atf-page="home"] .hero-actions a {border:1px solid #0071e3;border-radius:999px;padding:10px 20px;background:#fff;color:#0066cc;font-size:15px;letter-spacing:0}
body[data-atf-page="home"] .hero-actions a:first-child {background:#0071e3;color:#fff}
body[data-atf-page="home"] .pubs {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:24px 0 40px}
body[data-atf-page="home"] .pub {background:#f5f5f7;border:0;border-radius:24px;padding:32px;display:flex;flex-direction:column;min-width:0;margin:0}
body[data-atf-page="home"] .pub:nth-child(3n+2) {background:#f0f5fb}
body[data-atf-page="home"] .pub .k {font-size:13px;color:#6e6e73;margin-bottom:14px}
body[data-atf-page="home"] .pub h3 {font-size:30px;margin:0 0 12px;line-height:1.15}
body[data-atf-page="home"] .pub h3 a {color:#1d1d1f}
body[data-atf-page="home"] .pub p {margin:0 0 20px;font-size:16px;line-height:1.6;color:#424245}
body[data-atf-page="home"] .pub .go {margin-top:auto;font-size:15px;line-height:1.8}
body[data-atf-page="home"] .pub .go a {display:inline-flex;align-items:center;min-height:44px;border:1px solid #0071e3;border-radius:999px;padding:8px 16px}
body[data-atf-page="home"] .steps {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:24px 0 40px;border:0}
body[data-atf-page="home"] .steps .s {padding:0;border:0}
body[data-atf-page="home"] .steps .n {color:#0066cc;font-family:var(--ui-font);font-size:16px;letter-spacing:0}
body[data-atf-page="home"] .steps h3 {margin:8px 0 12px}
body[data-atf-page="home"] .steps p {font-size:16px;color:#6e6e73;margin:0}
@media(max-width:700px) {
  body[data-atf-page] main {padding-top:28px}
  body[data-atf-page] header.site .wrap {align-items:flex-start;gap:8px;padding-block:14px}
  body[data-atf-page] header.site nav {width:100%;gap:0 16px}
  body[data-atf-page] h1 {font-size:32px}
  body[data-atf-page="home"] h1,body[data-atf-page="category"] h1 {font-size:36px}
  body[data-atf-page] h2 {font-size:25px}
  body[data-atf-page] h3 {font-size:21px}
  body[data-atf-page] .home-hero {grid-template-columns:1fr;gap:24px;padding:24px}
  body[data-atf-page] .standfirst,body[data-atf-page] .lede {font-size:18px}
  body[data-atf-page] .hero {padding-top:8px}
  body[data-atf-page="home"] .hero {padding:40px 0 28px}
  body[data-atf-page="home"] .pubs,body[data-atf-page="home"] .steps {grid-template-columns:1fr}
  body[data-atf-page="home"] .pub {padding:24px}
  body[data-atf-page="home"] .pub h3 {font-size:28px}
}

/* 2026-10-26: boxed links keep their own bottom border (the shared link rule removes border-bottom) */
body[data-atf-page] .hero-compare a,body[data-atf-page] .quick-actions a,
body[data-atf-page] .article-cards a,body[data-atf-page] .plan-links a,
body[data-atf-page] .hub-topics a,body[data-atf-page] a.hub-feature,
body[data-atf-page] a.hub-guide {border-bottom:1px solid var(--rule,#d2d2d7)}
body[data-atf-page] .quick-actions a {border-bottom-color:var(--ink,#1d1d1f)}
body[data-atf-page] .home-actions a.action {border-bottom:1px solid var(--ink,#1d1d1f)}
body[data-atf-page] .hero-compare a:hover,body[data-atf-page] .quick-actions a:hover {border-bottom-color:var(--gold,#96803f)}

/* 2026-10-26: domain-wide bar so every section page links back to the All the fees home */
#atf-site-nav {background:#fff;border-bottom:1px solid #e8e8ed}
#atf-site-nav .atf-wrap {box-sizing:border-box;width:calc(100% - 44px);max-width:1180px;margin-inline:auto;
  display:flex;flex-wrap:nowrap;overflow-x:auto;gap:0 20px;scrollbar-width:none}
#atf-site-nav .atf-wrap::-webkit-scrollbar {display:none}
#atf-site-nav a {flex:0 0 auto;white-space:nowrap;display:inline-flex;align-items:center;min-height:44px;
  font-family:var(--ui-font,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:12px;line-height:1.2;
  color:#424245;text-decoration:none;border:0;overflow-wrap:normal}
#atf-site-nav a:hover {text-decoration:underline;text-underline-offset:3px}
#atf-site-nav a[aria-current] {font-weight:600;color:#1d1d1f}

/* 2026-10-26: filled buttons inside cards keep white text (card link colour must not override them) */
body[data-atf-page] .card a.btn,body[data-atf-page] .note a.btn,body[data-atf-page] .market-card a.btn,
body[data-atf-page] .card a.primary-action,body[data-atf-page] .market-card a.primary-action {color:#fff}
