/* pillar_3a_calculator — tool-specific design (inputs left, result column right, growth chart below). Shared: nav, footer, sidebars, ad script only. */
body[data-tool="pillar_3a_calculator"] {
  --p3-bg: #F6F5F2; --p3-card: #FFFFFF; --p3-ink: #16181D; --p3-ink2: #474C57; --p3-mute: #7D838F; --p3-line: #E3E1DB; --p3-soft: #EFEDE8;
  --p3-red: #D52B1E; --p3-red-soft: #FBE9E7; --p3-prin: #2F3440; --p3-gain: #D52B1E; --p3-alt: #8C93A1; --p3-ok: #12784A;
  --p3-sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif; --p3-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  background: var(--p3-bg); color: var(--p3-ink); font-family: var(--p3-sans);
}
body[data-tool="pillar_3a_calculator"] .dt-nav { background: var(--p3-bg); border-bottom: 1px solid var(--p3-line); }
body[data-tool="pillar_3a_calculator"] .dt-nav .navbar-brand { color: var(--p3-ink); }
.dt-bare { display: block; width: 100%; flex: 1; }
.p3x { max-width: 1120px; margin: 0 auto; padding: 32px 20px 64px; }
.p3x *, .p3x *::before, .p3x *::after { box-sizing: border-box; }
.p3-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--p3-red); }
.p3-cross { position: relative; width: 18px; height: 18px; background: var(--p3-red); border-radius: 3px; flex: none; }
.p3-cross::before, .p3-cross::after { content: ""; position: absolute; background: #fff; }
.p3-cross::before { left: 7px; top: 3px; width: 4px; height: 12px; } .p3-cross::after { left: 3px; top: 7px; width: 12px; height: 4px; }
.p3-head h1 { font-size: 46px; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.p3-head > p:last-child { margin: 12px 0 0; font-size: 18px; color: var(--p3-ink2); max-width: 66ch; line-height: 1.55; }

/* tool */
.p3 { margin-top: 26px; background: var(--p3-card); border: 1px solid var(--p3-line); border-radius: 16px; }
.p3-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.p3-in { padding: 22px 26px 26px; border-right: 1px solid var(--p3-line); }
.p3-in fieldset { border: 0; margin: 0; padding: 0 0 18px; min-width: 0; }
.p3-in fieldset + fieldset { border-top: 1px solid var(--p3-soft); padding-top: 16px; }
.p3-in legend { padding: 0; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--p3-mute); }
.p3-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: var(--p3-soft); margin-bottom: 12px; }
.p3-seg button { flex: 1 1 auto; border: 0; border-radius: 7px; background: transparent; padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 600; color: var(--p3-ink2); cursor: pointer; min-height: 36px; }
.p3-seg button[aria-pressed="true"] { background: var(--p3-card); color: var(--p3-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 -2px 0 var(--p3-red); }
.p3-seg button:focus-visible, .p3-max:focus-visible, .p3-buy summary:focus-visible { outline: 2px solid var(--p3-red); outline-offset: 2px; }
.p3-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.p3-f { margin-bottom: 12px; min-width: 0; }
.p3-f label { display: block; font-size: 13px; font-weight: 600; color: var(--p3-ink2); margin-bottom: 5px; }
.p3-box { display: flex; align-items: center; gap: 6px; border: 1px solid #D6D3CC; border-radius: 9px; background: #fff; padding: 0 10px; min-height: 44px; }
.p3-box:focus-within { border-color: var(--p3-ink); box-shadow: 0 0 0 3px rgba(213,43,30,.12); }
.p3-box span { font-size: 13px; font-weight: 600; color: var(--p3-mute); white-space: nowrap; }
.p3-box input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font-family: var(--p3-mono); font-size: 17px; font-weight: 500; color: var(--p3-ink); padding: 10px 0; font-variant-numeric: tabular-nums; }
.p3-f small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.45; color: var(--p3-mute); }
.p3-f small a { color: var(--p3-ink2); }
.p3-max { border: 0; border-radius: 6px; background: var(--p3-red); color: #fff; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 6px 10px; cursor: pointer; margin-right: -4px; }
.p3-warn { margin: -4px 0 8px; font-size: 13px; color: var(--p3-red); } .p3-warn:empty { display: none; }
.p3-buy { border: 1px dashed #D6D3CC; border-radius: 10px; padding: 0 12px; }
.p3-buy summary { cursor: pointer; padding: 11px 0; font-size: 14px; font-weight: 600; color: var(--p3-ink); }
.p3-buy[open] { padding-bottom: 10px; }
.p3-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--p3-ink2); } .p3-note:empty { display: none; }
body[data-pk="1"] .only-nopk { display: none; }
body[data-tm="rate"] .only-income, body:not([data-tm="rate"]) .only-rate { display: none; }
body:not([data-st="married"]) .only-married { display: none; }

/* results */
.p3-out { padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.p3-stick { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.p3-hero { background: var(--p3-ink); color: #fff; border-radius: 14px; padding: 18px 20px 16px; position: relative; overflow: hidden; }
.p3-hero::after { content: ""; position: absolute; right: -26px; top: -26px; width: 96px; height: 96px; border-radius: 50%; background: var(--p3-red); opacity: .9; }
.p3-hero span { position: relative; z-index: 1; display: block; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: #C9CCD3; }
.p3-hero b { position: relative; z-index: 1; display: block; margin-top: 4px; font-size: 48px; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.p3-hero small { position: relative; z-index: 1; display: block; margin-top: 6px; font-size: 13px; color: #C9CCD3; }
.p3-rec { width: 100%; border-collapse: collapse; font-size: 14px; }
.p3-rec caption { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--p3-mute); padding-bottom: 6px; }
.p3-rec th { text-align: left; font-weight: 500; color: var(--p3-ink2); padding: 6px 8px 6px 0; border-bottom: 1px dotted var(--p3-line); }
.p3-rec td { text-align: right; font-family: var(--p3-mono); font-variant-numeric: tabular-nums; white-space: nowrap; padding: 6px 0; border-bottom: 1px dotted var(--p3-line); }
.p3-rec tr.sum th, .p3-rec tr.sum td { font-weight: 700; color: var(--p3-ink); border-bottom: 1px solid var(--p3-ink); }
.p3-bal span { display: block; font-size: 13px; font-weight: 600; color: var(--p3-ink2); }
.p3-bal > b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.p3-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--p3-soft); margin: 10px 0 8px; }
.p3-bar i { display: block; height: 100%; } #p3BarP { background: var(--p3-prin); } #p3BarG { background: var(--p3-gain); }
.p3-bal dl { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; font-size: 13px; }
.p3-bal dl div { display: flex; gap: 8px; align-items: baseline; } .p3-bal dt { color: var(--p3-ink2); } .p3-bal dd { margin: 0; font-family: var(--p3-mono); font-weight: 500; }
.kp, .kg, .ka { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.kp { background: var(--p3-prin); } .kg { background: var(--p3-gain); } .ka { height: 2px; width: 16px; background: var(--p3-alt); vertical-align: 3px; }
.p3-alt { margin: 8px 0 0; font-size: 13px; color: var(--p3-mute); }
.p3-wd h3 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--p3-mute); }
.p3-wrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; margin-bottom: 12px; }
.p3-wrow span { font-size: 14px; font-weight: 600; color: var(--p3-ink); } .p3-wrow b { font-family: var(--p3-mono); font-size: 15px; font-variant-numeric: tabular-nums; }
.p3-wbar { grid-column: 1 / -1; height: 8px; background: var(--p3-soft); border-radius: 4px; overflow: hidden; }
.p3-wbar i { display: block; height: 100%; background: var(--p3-alt); border-radius: 4px; }
.p3-wrow.split .p3-wbar i { background: var(--p3-red); }
.p3-wrow small { grid-column: 1 / -1; font-size: 12px; color: var(--p3-mute); }
.p3-wgain { margin: 0; font-size: 14px; color: var(--p3-ink2); } .p3-wgain b { color: var(--p3-ok); }
.p3-chart { border-top: 1px solid var(--p3-line); padding: 18px 26px 16px; }
.p3-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--p3-ink2); }
.p3-legend em { font-style: normal; }
#p3Chart svg { width: 100%; height: auto; display: block; margin-top: 8px; font-family: var(--p3-mono); font-size: 11px; }
#p3Chart text { fill: var(--p3-mute); } #p3Chart .g { stroke: var(--p3-soft); }
#p3Chart .bp { fill: var(--p3-prin); } #p3Chart .bg { fill: var(--p3-gain); }
#p3Chart .alt { fill: none; stroke: var(--p3-alt); stroke-width: 2; stroke-dasharray: 5 4; }
.p3-assume { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--p3-mute); }

/* article */
.p3-adwrap { margin: 40px 0 8px; }
.p3-article, .p3-faq, .p3-more { max-width: 740px; margin: 0 auto; }
.p3-article { margin-top: 44px; font-size: 17px; line-height: 1.72; color: var(--p3-ink2); }
.p3-article h2, .p3-faq h2, .p3-more h2 { font-size: 27px; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; color: var(--p3-ink); margin: 50px 0 12px; }
.p3-article h2:first-child { margin-top: 0; }
.p3-article p { margin: 0 0 14px; } .p3-article b { color: var(--p3-ink); } .p3-article a { color: var(--p3-ink); }
.p3-article ul { padding-left: 1.2em; } .p3-article li { margin: 7px 0; }
.p3-eq { font-family: var(--p3-mono); font-size: 14.5px; background: var(--p3-card); border: 1px solid var(--p3-line); border-left: 4px solid var(--p3-red); border-radius: 6px; padding: 12px 14px; color: var(--p3-ink); overflow-wrap: anywhere; }
.p3-table { overflow-x: auto; margin: 14px 0 18px; border: 1px solid var(--p3-line); border-radius: 12px; background: var(--p3-card); }
.p3-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.p3-table th[scope="col"] { text-align: left; padding: 11px 14px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--p3-mute); border-bottom: 1px solid var(--p3-line); }
.p3-table tbody th { text-align: left; font-weight: 600; color: var(--p3-ink); padding: 9px 14px; border-bottom: 1px solid var(--p3-soft); white-space: nowrap; }
.p3-table td { padding: 9px 14px; border-bottom: 1px solid var(--p3-soft); color: var(--p3-ink); font-family: var(--p3-mono); font-size: 14px; white-space: nowrap; }
.p3-table tr:last-child td, .p3-table tr:last-child th { border-bottom: 0; }
.p3-src { font-size: 15px; } .p3-checked { font-size: 14px; color: var(--p3-mute); }
.p3-q { border-bottom: 1px solid var(--p3-line); }
.p3-q summary { list-style: none; cursor: pointer; padding: 16px 32px 16px 0; position: relative; font-size: 18px; font-weight: 700; }
.p3-q summary::-webkit-details-marker { display: none; }
.p3-q summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 24px; font-weight: 400; color: var(--p3-red); }
.p3-q[open] summary::after { content: "\2212"; }
.p3-q p { margin: 0 0 18px; font-size: 17px; line-height: 1.7; color: var(--p3-ink2); }
.p3-more > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.p3-more a { display: block; text-decoration: none; padding: 14px 16px; border: 1px solid var(--p3-line); border-radius: 12px; background: var(--p3-card); color: var(--p3-ink); }
.p3-more a:hover { border-color: var(--p3-red); }
.p3-more b { display: block; font-size: 15px; } .p3-more span { display: block; font-size: 13px; color: var(--p3-mute); margin-top: 2px; }

@media (max-width: 920px) {
  .p3-grid { grid-template-columns: minmax(0, 1fr); }
  .p3-in { border-right: 0; border-bottom: 1px solid var(--p3-line); }
}
@media (max-width: 640px) {
  .p3x { padding: 22px 14px 48px; }
  .p3-head h1 { font-size: 34px; }
  .p3-head > p:last-child { font-size: 16px; }
  .p3-in, .p3-out { padding: 18px 16px 20px; }
  .p3-chart { padding: 16px 12px 14px; }
  .p3-row2 { grid-template-columns: minmax(0, 1fr); }
  .p3-hero b { font-size: 40px; }
  .p3-article { font-size: 16px; }
  .p3-article h2, .p3-faq h2, .p3-more h2 { font-size: 23px; margin-top: 40px; }
  .p3-more > div { grid-template-columns: minmax(0, 1fr); }
}

/* compact result bar (phones/tablets: the result column sits below the long form) */
.p3-mini { display: none; }
@media (max-width: 920px) {
  .p3-mini { display: flex; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 5; margin: -18px -16px 16px; padding: 10px 16px; background: var(--p3-ink); color: #fff; border-bottom: 3px solid var(--p3-red); border-radius: 15px 15px 0 0; }
  .p3-mini span { display: flex; flex-direction: column; min-width: 0; }
  .p3-mini span + span { text-align: right; }
  .p3-mini small { font-size: 11px; color: #C9CCD3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .p3-mini b { font-size: 20px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .p3-in { border-radius: 16px 16px 0 0; }
}
@media (min-width: 641px) and (max-width: 920px) { .p3-mini { margin: -22px -26px 16px; padding: 10px 26px; } }
@media (min-width: 921px) {
  .p3-stick { position: sticky; top: 16px; }
}
