:root{
  --iq-flow-navy:#0b2f55;
  --iq-flow-blue:#1769e0;
  --iq-flow-blue-2:#3186f4;
  --iq-flow-ink:#17324d;
  --iq-flow-muted:#667b91;
  --iq-flow-line:#d8e4ef;
  --iq-flow-soft:#f3f7fb;
  --iq-flow-white:#fff;
  --iq-flow-radius:18px;
  --iq-flow-shadow:0 12px 32px rgba(22,60,96,.08)
}
html{scroll-behavior:smooth}
body.iq-flow-ready{background:#f7f9fc;color:var(--iq-flow-ink);line-height:1.58}
body.iq-flow-ready :where(h1,h2,h3,h4){color:var(--iq-flow-navy);letter-spacing:-.018em}
body.iq-flow-ready :where(p,li){text-wrap:pretty}
body.iq-flow-ready :where(input,select,textarea){border-color:#b9cce0;background:#fff;color:var(--iq-flow-ink)}
body.iq-flow-ready :where(input,select,textarea):focus{border-color:var(--iq-flow-blue);box-shadow:0 0 0 3px rgba(23,105,224,.13);outline:0}

/* One compact introduction treatment across calculator families. */
body.iq-flow-ready .iq-calc-hero,
body.iq-flow-ready .tax-hero{
  border-bottom:1px solid var(--iq-flow-line);
  background:linear-gradient(135deg,#f7fbff 0%,#e9f4ff 100%);
  padding-block:clamp(24px,4vw,42px)
}
body.iq-flow-ready .iq-calc-hero h1,
body.iq-flow-ready .tax-hero h1{margin:.18em 0 .22em;font-size:clamp(30px,5vw,48px);line-height:1.03}
body.iq-flow-ready .iq-calc-hero p,
body.iq-flow-ready .tax-hero p{max-width:760px;margin:0;color:#536f89;font-size:clamp(15px,2vw,18px)}
body.iq-flow-ready .iq-kicker,
body.iq-flow-ready .community-kicker{color:var(--iq-flow-blue);font-size:12px;font-weight:850;letter-spacing:.12em;text-transform:uppercase}

/* Light-hero contrast contract.
   The tax page originally used a dark hero with white labels and trust badges.
   The shared flow now uses a light hero, so every foreground on that surface
   must use an explicit dark color instead of inheriting the former white text. */
body.iq-flow-ready .tax-hero{color:var(--iq-flow-ink)}
body.iq-flow-ready .tax-hero .tax-kicker{
  border-color:#a9c9e8;background:rgba(255,255,255,.86);color:#0d5eb7;
  box-shadow:0 3px 12px rgba(22,86,150,.06)
}
body.iq-flow-ready .tax-hero .tax-trust span{
  border:1px solid #bfd5ea;background:#fff;color:#244b70;
  box-shadow:0 3px 12px rgba(22,86,150,.05)
}
body.iq-flow-ready.iq-flow-calculator>.hero{
  border-bottom:1px solid var(--iq-flow-line);background:linear-gradient(135deg,#f7fbff 0%,#e9f4ff 100%);
  padding:clamp(24px,4vw,40px) max(18px,calc((100% - 1080px)/2))
}
body.iq-flow-ready.iq-flow-calculator>.hero h1{margin:0 0 6px;color:var(--iq-flow-navy);font-size:clamp(30px,5vw,46px)}
body.iq-flow-ready.iq-flow-calculator>.hero p{max-width:720px;margin:0;color:#536f89}
body.iq-flow-ready.iq-flow-calculator>main>.box{max-width:960px;margin:24px auto;padding:clamp(18px,3vw,28px)}
body.iq-flow-ready.iq-flow-calculator>main>.note{max-width:960px;margin:16px auto;color:var(--iq-flow-muted)}

/* Calculator first, result beside it, supporting content afterward. */
body.iq-flow-ready .iq-calc-main{padding-block:clamp(20px,3vw,36px)}
body.iq-flow-ready .iq-calc-grid{align-items:start;gap:clamp(14px,2vw,24px)}
body.iq-flow-ready .iq-panel,
body.iq-flow-ready .box,
body.iq-flow-ready .tax-card,
body.iq-flow-ready .community-panel,
body.iq-flow-ready .community-notice{
  border:1px solid var(--iq-flow-line);
  border-radius:var(--iq-flow-radius);
  background:var(--iq-flow-white);
  box-shadow:var(--iq-flow-shadow)
}
body.iq-flow-ready .iq-panel{padding:clamp(18px,3vw,28px)}
body.iq-flow-ready .iq-fields{gap:14px}
body.iq-flow-ready .iq-fields label{color:#294b6a;font-weight:750}
body.iq-flow-ready .iq-calc-btn,
body.iq-flow-ready .community-primary,
body.iq-flow-ready .tax-primary{
  border:0;border-radius:12px;background:linear-gradient(135deg,var(--iq-flow-blue),var(--iq-flow-blue-2));
  color:#fff;box-shadow:0 8px 18px rgba(23,105,224,.2);font-weight:850
}
body.iq-flow-ready .iq-result{border-color:#bdd3e8;background:linear-gradient(160deg,#0b315a,#123f72);color:#fff}
body.iq-flow-ready .iq-result :where(.iq-result-label,.iq-note,.iq-formula){color:#d6e7f7}
body.iq-flow-ready .iq-result :where(.iq-result-value,strong){color:#fff}

/* Contrast contract: shared heading colors must never darken text on dark cards. */
body.iq-flow-ready :where(
  .tax-promo-card,
  .community-hero,
  .iq-result,
  .fh-hero-card,
  .fh-results-card,
  .mp-dashboard,
  .em-result,
  .finance-hero,
  .news-hero,
  .ai-brief,
  .iq-video-card,
  .iq-video-head,
  .iq-video-transcript,
  .stock-quote,
  .ai-inline-result,
  .calc-chat-head,
  .iq-formula,
  .iq-ms-watch-row,
  .iq-widget-result,
  .iq-widget-regional .result
) :where(h1,h2,h3,h4){color:#fff!important}
body.iq-flow-ready .tax-promo-card .tax-promo-copy h2{color:#fff!important;text-shadow:0 1px 1px rgba(0,20,55,.18)}
body.iq-flow-ready .tax-promo-card .tax-promo-copy p{color:#e8f3ff!important}

/* Keep the first explanation concise and visually connected to the tool. */
body.iq-flow-ready .iq-content,
body.iq-flow-ready .tax-content{
  margin-top:clamp(18px,3vw,30px);border:1px solid var(--iq-flow-line);border-radius:var(--iq-flow-radius);
  background:#fff;padding:clamp(20px,3vw,32px);box-shadow:0 8px 24px rgba(22,60,96,.05)
}
body.iq-flow-ready .iq-content>h2:first-child,
body.iq-flow-ready .tax-content>h2:first-child{margin-top:0}
body.iq-flow-ready .iq-content h2,
body.iq-flow-ready .tax-content h2{margin-top:1.35em;font-size:clamp(20px,3vw,27px)}
body.iq-flow-ready .iq-content p,
body.iq-flow-ready .tax-content p{color:#526b82}
body.iq-flow-ready .iq-related{display:flex;gap:8px;flex-wrap:wrap;margin-top:22px}
body.iq-flow-ready .iq-related a{border:1px solid #c8dbee;border-radius:999px;background:#f4f9ff;padding:8px 12px;color:#175cae;font-weight:750;text-decoration:none}

/* Preserve detailed content for readers and AdSense, but reveal it on demand. */
body.iq-flow-ready .iq-flow-more{max-width:1120px;margin:22px auto;border:1px solid var(--iq-flow-line);border-radius:var(--iq-flow-radius);background:#fff;box-shadow:var(--iq-flow-shadow);overflow:hidden}
body.iq-flow-ready .iq-flow-more>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;list-style:none;padding:18px clamp(18px,3vw,28px);color:var(--iq-flow-navy);font-size:16px;font-weight:850}
body.iq-flow-ready .iq-flow-more>summary::-webkit-details-marker{display:none}
body.iq-flow-ready .iq-flow-more>summary::after{content:'＋';flex:none;color:var(--iq-flow-blue);font-size:21px}
body.iq-flow-ready .iq-flow-more[open]>summary{border-bottom:1px solid var(--iq-flow-line);background:#f8fbff}
body.iq-flow-ready .iq-flow-more[open]>summary::after{content:'−'}
body.iq-flow-ready .iq-flow-more>.iq-quality-content{margin:0!important;background:#fff!important}
body.iq-flow-ready .iq-flow-more .iq-quality-shell{padding:clamp(20px,3vw,32px)!important}
body.iq-flow-ready .iq-quality-meta{display:flex;gap:7px;flex-wrap:wrap}
body.iq-flow-ready .iq-quality-meta span{border-radius:999px;background:#edf5fc;padding:5px 9px}

/* General pages use the same reading width and card rhythm. */
body.iq-flow-ready.iq-flow-reading main{max-width:1160px;margin-inline:auto}
body.iq-flow-ready.iq-flow-reading main>section,
body.iq-flow-ready.iq-flow-reading main>article{scroll-margin-top:120px}
body.iq-flow-ready .community-main{max-width:1160px}
body.iq-flow-ready .community-hero{border-radius:var(--iq-flow-radius);background:linear-gradient(135deg,#0b315a,#1769e0);box-shadow:var(--iq-flow-shadow)}
body.iq-flow-ready .community-hero :where(h1,p){color:#fff}
body.iq-flow-ready .community-toolbar{margin-top:28px}
body.iq-flow-ready .community-rules{border:1px solid var(--iq-flow-line);border-radius:var(--iq-flow-radius);background:#fff;padding:clamp(18px,3vw,28px)}

/* Ads remain distinct without interrupting the content flow. */
body.iq-flow-ready :where(.ad-slot,.adsbygoogle,[data-ad-slot]){clear:both}
body.iq-flow-ready .ad-slot{display:grid;min-height:96px;place-items:center;margin:24px auto;border:1px dashed #c8d7e6;border-radius:14px;background:#f4f7fa;color:#8293a5}

/* Reduce decorative density on mobile while keeping controls prominent. */
@media(max-width:760px){
  body.iq-flow-ready .iq-calc-hero,body.iq-flow-ready .tax-hero{padding:22px 16px}
  body.iq-flow-ready .iq-panel{padding:18px}
  body.iq-flow-ready .iq-content,body.iq-flow-ready .tax-content{padding:20px}
  body.iq-flow-ready .iq-flow-more{margin:16px 10px}
  body.iq-flow-ready .iq-flow-more>summary{padding:16px 18px}
  body.iq-flow-ready .iq-related{display:grid;grid-template-columns:1fr}
  body.iq-flow-ready .iq-related a{text-align:center}
}

@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
