:root {
  --ink: #121820;
  --muted: #68717d;
  --line: #d7dde1;
  --soft: #f4f6f7;
  --green: #146b53;
  --green-dark: #0c4f3c;
  --green-soft: #eaf4ef;
  --gold: #e2b765;
  --blue: #7da3bf;
  --peach: #d99572;
  --white: #fff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fafbfb; color: var(--ink); font-family: "Manrope", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a, .brand, .ad-placement { user-select: none; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; stroke-width: 2; }

.site-header { position: relative; z-index: 2; width: 100%; height: 76px; padding: 0 max(24px, calc((100% - 1180px) / 2)); display: flex; align-items: center; border-bottom: 1px solid var(--line); background: white; }
.edge-shadow { position: relative; z-index: 3; width: 100%; height: 14px; pointer-events: none; }
.header-edge-shadow { margin-bottom: -14px; background: linear-gradient(to bottom, rgba(18,24,32,.055) 0, rgba(18,24,32,.025) 5px, transparent 14px); }
.footer-edge-shadow { margin-top: -14px; background: linear-gradient(to top, rgba(18,24,32,.055) 0, rgba(18,24,32,.025) 5px, transparent 14px); }
.brand { display: inline-flex; align-items: center; gap: 7px; width: max-content; }
.brand-name { font-size: 18px; font-weight: 800; line-height: 1; letter-spacing: -.035em; }
.brand-name > span { color: var(--green); }
.brand-mark { width: 25px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: #252526; }
.brand-mark img { width: 19px; height: 19px; }
.header-facts { margin-left: auto; padding: 3px; display: flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.mobile-calculator-link { display: none; }
.mobile-calculator-link .header-facts-info img, .legal-back .header-facts-info img { width: 16px; height: 16px; }
.header-fact { height: 30px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #59645e; font-size: 10px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 7px rgba(18,24,32,.025); }
.header-fact img { width: 14px; height: 14px; opacity: .7; }

.hero { width: min(calc(100% - 48px), 1120px); margin: 0 auto; padding: 72px 0 60px; }
.hero-frame { padding: 3px; border: 1px solid var(--line); border-radius: 15px; background: var(--soft); box-shadow: 0 2px 5px rgba(20,33,30,.10); }
.hero-content { position: relative; isolation: isolate; overflow: hidden; padding: 36px 40px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.hero-layout { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 22px; }
.hero-heading { position: relative; isolation: isolate; width: fit-content; max-width: 100%; }
.hero-heading::before { content: ""; position: absolute; z-index: -1; top: -9px; right: -10px; width: 48%; height: 72px; background: radial-gradient(ellipse at 58% 50%, rgba(255,255,255,.96) 0%, rgba(255,255,255,.92) 34%, rgba(255,255,255,.7) 53%, rgba(255,255,255,.32) 70%, rgba(255,255,255,.08) 84%, transparent 100%); filter: blur(3px); pointer-events: none; }
.hero h1 { max-width: none; margin: 0; font-family: "Rubik", "Manrope", system-ui, sans-serif; font-size: 50px; font-weight: 600; line-height: 1.05; letter-spacing: -.025em; white-space: nowrap; }
.hero-title-tail { display: inline-block; white-space: nowrap; }
.hero-benefits { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; color: #59645e; font-size: 10px; font-weight: 700; }
.hero-benefits span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.hero-benefits svg { width: 13px; height: 13px; color: var(--green); stroke-width: 2.4; }
.hero-support { position: relative; isolation: isolate; width: fit-content; max-width: 100%; display: grid; gap: 10px; }
.hero-support::before { content: ""; position: absolute; z-index: -1; inset: -12px -16px; border-radius: 18px; background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.96) 0%, rgba(255,255,255,.9) 52%, rgba(255,255,255,.68) 72%, rgba(255,255,255,.2) 88%, transparent 100%); filter: blur(3px); pointer-events: none; }
.hero-note { width: 100%; padding: 3px; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: stretch; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.hero-note-copy { min-height: 30px; padding: 6px 10px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; color: #59645e; font-size: 10px; font-weight: 700; line-height: 1.35; box-shadow: 0 2px 7px rgba(18,24,32,.025); }
.hero-facts { width: fit-content; max-width: 100%; padding: 3px; display: flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.fact-pair { display: contents; }
.fact-pair:not(:first-child) > .header-facts-info { display: none; }
.mobile-free-fact { display: none; }
.hero-preview { position: absolute; z-index: 0; top: -13px; right: -34px; width: 465px; padding: 14px; display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 13px; background: #fafafa; opacity: .22; pointer-events: none; transform: rotate(-.2deg); -webkit-mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.3) 15%, #000 32%); mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.3) 15%, #000 32%); }
.hero-preview-summary { position: relative; isolation: isolate; min-height: 64px; margin-bottom: 10px; padding: 10px 18px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #aeb8bd; border-radius: 10px; background: var(--soft); }
.hero-preview-summary::before { content: ""; position: absolute; z-index: 0; inset: 4px; border: 1px solid #aeb8bd; border-radius: 7px; background: white; }
.hero-preview-summary > span { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; }
.hero-preview-summary > span + span { padding-left: 18px; border-left: 1px solid #aeb8bd; }
.hero-preview-summary strong { color: var(--ink); font-size: 20px; line-height: 1.1; }
.hero-preview-summary small { margin-top: 2px; color: #59645e; font-size: 9px; font-weight: 700; }
.hero-preview-summary > .hero-preview-badge { position: absolute; z-index: 2; bottom: 0; min-height: 20px; margin: 0; padding: 0 7px; display: flex; align-items: center; gap: 3px; border: 1px solid #aeb8bd; border-radius: 5px; background: white; color: #59645e; white-space: nowrap; transform: translateY(50%); }
.hero-preview-badge b { color: var(--ink); }
.hero-preview-badge-left { left: calc(50% - 12px); transform: translate(-100%, 50%) !important; }
.hero-preview-badge-right { right: 12px; }
.hero-preview-bar { height: 9px; display: flex; overflow: hidden; border-radius: 99px; background: #edf0ee; }
.hero-preview-bar i:nth-child(1) { width: 79.95%; background: #78c9a9; }
.hero-preview-bar i:nth-child(2) { width: 8.37%; background: var(--gold); }
.hero-preview-bar i:nth-child(3) { width: 4.03%; background: var(--blue); }
.hero-preview-bar i:nth-child(4) { width: 7.65%; background: var(--peach); }
.hero-preview-legend { display: flex; gap: 12px; color: #59645e; font-size: 9px; font-weight: 700; }
.hero-preview-legend span { display: inline-flex; align-items: center; gap: 5px; }
.hero-preview-legend i { width: 6px; height: 6px; border-radius: 50%; background: #78c9a9; }
.hero-preview-legend span:nth-child(2) i { background: var(--gold); }
.hero-preview-legend span:nth-child(3) i { background: var(--blue); }
.hero-preview-legend span:nth-child(4) i { background: var(--peach); }

.ad-placement { color: #969da5; text-align: center; }
.ad-leaderboard { width: min(calc(100% - 48px), 728px); margin: -22px auto 54px; }
.ad-label { display: block; margin-bottom: 5px; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ad-unit-shell { position: relative; width: 100%; min-height: 90px; display: grid; place-items: center; overflow: hidden; border: 1px dashed var(--line); background: #f3f4f4; }
.responsive-ad { width: 100%; min-height: 90px; }
.ad-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #969da5; font: 400 9px "DM Mono", monospace; letter-spacing: .02em; }
.ad-placement.is-configured .ad-placeholder { display: none; }
.ad-placement.is-unfilled { display: none; }
.hero-preview-periods { height: 42px; padding: 3px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; border: 1px solid #aeb8bd; border-radius: 9px; background: var(--soft); }
.hero-preview-periods span { height: 34px; display: grid; place-items: center; color: #59645e; font-size: 9px; font-weight: 700; }
.hero-preview-periods span:first-child { border-radius: 6px; background: white; color: #303030; box-shadow: 0 1px 4px rgba(18,24,32,.1); }
.hero-preview-breakdown { padding: 0 14px 8px; display: grid; border: 1px solid #aeb8bd; border-top: 0; border-radius: 0 0 10px 10px; background: #fafafa; }
.hero-preview-breakdown > div { min-height: 29px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #aeb8bd; color: #59645e; font-size: 9px; font-weight: 700; }
.hero-preview-breakdown > div:last-child { border-bottom: 0; }
.hero-preview-breakdown strong { color: var(--ink); font-size: 9px; font-variant-numeric: tabular-nums; }
.hero-preview-breakdown > .hero-preview-income { min-height: 34px; padding: 0 10px; justify-content: flex-start; gap: 3px; border: 1px solid #aeb8bd; border-radius: 7px; background: white; }
.hero-preview-income span { color: #59645e; }

.calculator-shell { width: min(calc(100% - 48px), 1120px); margin: 0 auto 78px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(410px, 1fr); align-items: start; gap: 18px; overflow: visible; }
.calculator-column { min-width: 0; display: grid; align-content: start; gap: 30px; }
.calculator-form { position: relative; min-width: 0; padding: 38px 26px 24px; overflow: visible; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 2px 5px rgba(20,33,30,.10); }
.optional-card { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 2px 5px rgba(20,33,30,.10); }
.optional-card { padding: 38px 26px 24px; }
.card-topbar { position: absolute; z-index: 2; top: 3px; left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; transform: translateY(-50%); }
.card-plaque { min-height: 32px; margin: 0; padding: 0 13px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: 0 2px 7px rgba(18,24,32,.025); color: #1b7f62; font-size: 12px; font-weight: 800; letter-spacing: .09em; line-height: 1.2; text-transform: uppercase; }
.card-info { min-height: 32px; margin-bottom: 16px; padding: 6px 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); color: #59645e; font-size: 11px; font-weight: 500; line-height: 1.35; }
.card-info svg { flex: 0 0 auto; width: 14px; height: 14px; color: #68756f; }
.card-info > img { flex: 0 0 auto; width: 14px; height: 14px; opacity: .8; }
.card-info strong { color: #46514b; font-size: 11px; font-weight: 800; }
.card-info .info-separator { margin: 0 .55em; }

.settings-list { display: grid; gap: 16px; }
.setting-row { position: relative; isolation: isolate; min-width: 0; height: 38px; padding-left: 10px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, .82fr); align-items: center; gap: 18px; }
.setting-row::before { content: ""; position: absolute; z-index: -1; inset: 1px 0; border-radius: 7px; background: #f8f9f9; }
.setting-row:has(.custom-select.open) { z-index: 60; }
.setting-label { min-width: 0; display: flex; align-items: center; gap: 10px; color: #48534d; font-size: 11px; font-weight: 700; line-height: 1.35; }
.setting-label svg { flex: 0 0 auto; width: 16px; height: 16px; color: var(--ink); stroke-width: 1.8; }
.setting-row > .money-input, .setting-row > .compact-money-input, .setting-row > .percent-input, .setting-row > .custom-select, .setting-row > .stepper, .setting-row > .age-switch { min-width: 0; width: 100%; }
.money-input, .compact-money-input, .percent-input, .select-trigger, .stepper { height: 38px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.money-input, .compact-money-input, .percent-input { cursor: text; }
.money-input:focus-within, .compact-money-input:focus-within, .percent-input:focus-within, .select-trigger:focus-visible, .stepper:focus-within { border-color: #929da3; outline: 0; box-shadow: 0 0 0 3px rgba(18,24,32,.085); }
.money-input { display: flex; align-items: center; }
.money-input > span { padding-left: 13px; color: #68756f; font: 600 13px "Manrope", system-ui, sans-serif; }
.money-input input { width: 100%; height: 100%; min-width: 0; padding: 0 7px; border: 0; outline: 0; background: transparent; color: #59645e; font-size: 13px; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.compact-money-input { display: flex; align-items: center; }
.compact-money-input span { padding-left: 13px; color: #68756f; font: 600 13px "Manrope", system-ui, sans-serif; }
.compact-money-input input { min-width: 0; width: 100%; height: 100%; padding: 0 13px 0 5px; border: 0; outline: 0; background: transparent; color: #59645e; font-size: 13px; font-weight: 700; }
.percent-input { display: flex; align-items: center; }
.percent-input input { min-width: 0; width: 100%; height: 100%; padding: 0 6px 0 14px; border: 0; outline: 0; background: transparent; color: #59645e; font-size: 13px; font-weight: 700; }
.percent-input > span { padding-right: 13px; color: #68756f; font: 600 13px "Manrope", system-ui, sans-serif; }
.stepper { display: grid; grid-template-columns: 38px 1fr 38px; overflow: hidden; }
.stepper button { display: grid; place-items: center; border: 0; background: #f7f9f8; color: #627169; cursor: pointer; }
.stepper button:hover { background: #e5e9ea; color: #303a40; }
.stepper button:first-child { border-right: 1px solid var(--line); }
.stepper button:last-child { border-left: 1px solid var(--line); }
.stepper svg { width: 14px; }
.stepper input { min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; outline: 0; background: white; color: #59645e; text-align: center; font: 700 13px "Manrope", system-ui, sans-serif; }
.age-switch { height: 38px; padding: 3px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.age-switch button { min-width: 0; padding: 0 4px; border: 0; border-radius: 5px; background: transparent; color: #728078; font-size: 10px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.age-switch button.active { background: white; color: #303030; box-shadow: 0 1px 4px rgba(18,24,32,.1); }
.age-switch button:focus-visible { outline: 2px solid #929da3; outline-offset: -2px; }

.custom-select { position: relative; }
.select-trigger { width: 100%; padding: 0 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; color: var(--ink); text-align: left; cursor: pointer; }
.select-trigger > span { overflow: hidden; color: #59645e; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger svg { width: 15px; color: #78847e; }
.select-trigger svg:last-child { transition: transform .16s ease; }
.custom-select.open .select-trigger { border-color: #929da3; box-shadow: 0 0 0 3px rgba(18,24,32,.085); }
.custom-select.open .select-trigger svg:last-child { transform: rotate(180deg); }
.select-popover { position: absolute; z-index: 50; top: calc(100% + 7px); left: 0; right: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 16px 38px rgba(18,24,32,.16); }
.select-popover[hidden] { display: none; }
.state-popover { left: auto; right: 0; width: 280px; min-width: 280px; border-bottom-right-radius: 4px; }
#employment-popover, #hsa-popover, #status-popover { left: auto; right: 0; width: max-content; min-width: 100%; max-width: calc(100vw - 24px); }
#employment-options .select-option > span { white-space: nowrap; }
#hsa-options .select-option > span, #hsa-options .select-option > small { white-space: nowrap; }
#status-options .select-option > span { white-space: nowrap; }
.option-search { height: 38px; margin: 10px; padding: 0 11px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fafafa; }
.option-search:focus-within { border-color: #969696; box-shadow: 0 0 0 3px rgba(18,24,32,.07); }
.option-search svg { width: 14px; color: #777; }
.option-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.option-list { max-height: 284px; padding: 0 7px 7px; display: grid; gap: 3px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #bac4bf transparent; }
.option-list::-webkit-scrollbar { width: 8px; }
.option-list::-webkit-scrollbar-track { background: transparent; }
.option-list::-webkit-scrollbar-thumb { border: 2px solid white; border-radius: 99px; background: #bac4bf; }
.option-list::-webkit-scrollbar-thumb:hover { background: #bac4bf; }
.compact-options { max-height: none; padding-top: 7px; }
.select-option { width: 100%; min-height: 37px; padding: 7px 9px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 0; border-radius: 7px; background: white; color: #303030; text-align: left; font-family: "Manrope", system-ui, sans-serif; font-size: 12px; font-weight: 600; cursor: pointer; }
.select-option small { color: #858585; font: 400 10.5px "DM Mono", monospace; letter-spacing: .03em; }
.select-option:hover, .select-option:focus-visible { outline: 0; background: #f1f1f1; color: var(--ink); }
.select-option[aria-selected="true"] { background: #e7e7e7; color: var(--ink); }
.select-option[aria-selected="true"] small { display: none; }
.select-option[aria-selected="true"]::after { content: ""; flex: 0 0 auto; width: 14px; height: 14px; background: center / 14px 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23146b53' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
#hsa-options .select-option[aria-selected="true"] small { display: inline; }
#hsa-options .select-option[aria-selected="true"]::after { content: none; }
.select-empty { margin: 0; padding: 20px; color: var(--muted); text-align: center; font-size: 11px; }
.result-panel { position: relative; min-width: 0; padding: 38px 24px 24px; container-type: inline-size; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 2px 5px rgba(20,33,30,.10); }
.takehome-card { padding: 0; }
.result-section { border: 1px solid var(--line); border-radius: 11px; }
.result-section { background: #fafafa; }
.retention-summary { margin-bottom: 12px; padding: 5px 2px 0; }
.result-heading { position: relative; isolation: isolate; min-height: 0; margin-bottom: 25px; padding: 10px 16px; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); }
.result-heading::before { content: ""; position: absolute; z-index: 0; inset: 4px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.result-metric { position: relative; z-index: 1; min-width: 0; padding-left: 18px; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid var(--line); }
.result-metric-primary { padding-left: 0; border-left: 0; }
.result-metric > span { margin-top: 0; color: #59645e; font-size: 10px; font-weight: 700; line-height: 1.15; }
.metric-badge { position: absolute; z-index: 2; bottom: 0; min-height: 24px; padding: 0 9px; display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 6px; background: white; color: #59645e; font-size: 10px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 7px rgba(18,24,32,.025); transform: translateY(50%); }
.metric-badge strong { color: var(--ink); font-weight: inherit; }
.metric-badge-takehome { left: calc(50% - 14px); transform: translate(-100%, 50%); }
.metric-badge-taxes { right: 14px; }
.result-amount { margin: 0; font: 700 clamp(20px, 2.4vw, 20px) "Manrope", system-ui, sans-serif; letter-spacing: -.035em; }
.result-tax-amount { margin: 0; color: #303030; font-size: 20px; font-weight: 700; letter-spacing: -.025em; }
.money-cents { display: inline-block; margin-left: 1px; font-size: .58em; line-height: 1; vertical-align: baseline; letter-spacing: 0; }
.period-switch { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.period-switch button { height: 34px; padding: 0 8px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #728078; font-size: 10px; font-weight: 700; cursor: pointer; }
.period-switch button.active { background: white; color: #303030; box-shadow: 0 1px 4px rgba(18,24,32,.1); }
.result-section { margin-top: 12px; padding: 14px 16px; }
.breakdown-card { padding-bottom: 10px; }
.tax-bar { height: 9px; display: flex; overflow: hidden; border-radius: 99px; background: #edf0ee; }
.tax-bar span { display: block; min-width: 0; transition: width .2s ease; }
#take-home-bar { background: #9fd9c2; }
#contributions-bar { background: #9db783; }
#federal-bar { background: var(--gold); }
#state-bar { background: var(--blue); }
#local-bar { background: #9b8fc1; }
#payroll-bar { background: var(--peach); }
.tax-legend { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 12px; color: #59645e; font-size: 10px; font-weight: 700; }
.tax-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { position: relative; top: .5px; width: 7px; height: 7px; border-radius: 50%; }
.take-home-dot { background: #78c9a9; }.contributions-dot { background: #829d68; }.federal-dot { background: var(--gold); }.state-dot { background: var(--blue); }.local-dot { background: #9b8fc1; }.payroll-dot { background: var(--peach); }
.receipt > div { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.receipt > .receipt-income { min-height: 40px; padding: 0 12px; justify-content: flex-start; gap: 3px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.receipt > div:last-child { border-bottom: 0; }
.receipt > div:not([hidden]):not(:has(~ div:not([hidden]))) { border-bottom: 0; }
.receipt span { color: #59645e; font-size: 11px; }
.receipt .tax-label { display: inline-flex; align-items: center; color: #59645e; font-size: 10px; font-weight: 700; }
.receipt .tax-label > span { color: inherit; font-size: inherit; font-weight: inherit; }
.receipt .tax-label small { color: inherit; font-size: inherit; font-weight: inherit; }
.receipt .tax-label small::before { content: "·"; margin: 0 .55em; font-size: 13px; line-height: 0; vertical-align: -.04em; }
.receipt strong { font: 700 11px "Manrope", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.receipt .credit-row strong { color: var(--green); }
.result-scope { margin: 11px 0 0; }
.withholding-card { position: relative; min-width: 0; padding: 38px 24px 24px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 2px 5px rgba(20,33,30,.10); }
.withholding-grid { display: grid; gap: 20px; }
.withholding-result { position: relative; isolation: isolate; min-width: 0; min-height: 70px; margin: 0; padding: 10px 16px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); }
.withholding-result::before { content: ""; position: absolute; z-index: 0; inset: 4px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.withholding-metric { position: relative; z-index: 1; min-width: 0; padding-left: 18px; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid var(--line); }
.withholding-metric-primary { padding-left: 0; border-left: 0; }
.withholding-metric strong { color: var(--ink); font-size: 18px; line-height: normal; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.withholding-metric > span { color: #59645e; font-size: 10px; font-weight: 700; line-height: 1.15; }
.withholding-result[data-outcome="refund"] .withholding-metric-primary strong { color: var(--green); }
.withholding-input-badge { right: 10px; bottom: 0; min-height: 22px; padding-inline: 8px; font-size: 9px; transform: translateY(50%); }
.mixed-outcome { margin: 16px 0 0; }

.support-card { position: relative; min-width: 0; padding: 38px 26px 24px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 2px 5px rgba(20,33,30,.10); }
.faq-list, .methodology-list { display: grid; gap: 8px; }
.faq-row, .methodology-row { min-height: 50px; padding: 8px 12px; display: grid; grid-template-columns: 17px minmax(0, 1fr); align-items: center; gap: 9px; border-radius: 9px; background: #f7f8f8; }
.faq-row > svg, .methodology-row > svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--ink); stroke-width: 1.8; }
.faq-row > span, .methodology-row > span { min-width: 0; display: grid; gap: 2px; }
.faq-row strong, .methodology-row strong { color: #46514c; font-size: 10px; font-weight: 700; }
.faq-row small, .methodology-row small { color: #68717d; font-size: 10px; font-weight: 500; line-height: 1.35; }
.source-strip { width: fit-content; max-width: 100%; margin-top: 16px; padding: 3px; display: flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.source-strip > span, .source-strip a { height: 30px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #59645e; font-size: 10px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 7px rgba(18,24,32,.025); }
.source-strip svg { width: 14px; height: 14px; color: var(--ink); stroke-width: 1.8; }
.source-strip > .source-icon { width: 30px; padding: 0; justify-content: center; }
.source-strip a:hover { color: var(--ink); }
.header-sources { flex: 0 0 auto; margin: 0 0 0 8px; }

footer { position: relative; z-index: 1; width: 100%; height: 76px; padding: 0 max(24px, calc((100% - 1180px) / 2)); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; border-top: 1px solid var(--line); background: white; }
.footer-note { width: fit-content; max-width: 100%; padding: 3px; justify-self: end; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.header-facts-info, .footer-note-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 2px 7px rgba(18,24,32,.025); }
.header-facts-info img, .footer-note-icon img { width: 14px; height: 14px; opacity: .7; }
.footer-note-copy { min-height: 30px; padding: 0 10px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: white; text-align: center; box-shadow: 0 2px 7px rgba(18,24,32,.025); }
.footer-note-copy p { margin: 0; color: #59645e; font-size: 10px; font-weight: 700; line-height: 1.3; letter-spacing: 0; }
.footer-meta { min-height: 24px; padding-left: 24px; justify-self: end; display: flex; align-items: center; justify-content: flex-end; gap: 16px; border-left: 1px solid var(--line); text-align: right; }
.footer-link { color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: 0; }
.footer-link:hover { color: var(--ink); text-decoration: none; }
.footer-meta strong { display: block; font-size: 12px; letter-spacing: 0; white-space: nowrap; }

.legal-body { min-height: 100vh; display: flex; flex-direction: column; }
.legal-back { margin-left: auto; }
.legal-back .header-fact:hover { color: var(--ink); }
.legal-main { width: min(calc(100% - 48px), 860px); margin: 0 auto; padding: 64px 0; flex: 1; }
.legal-card { position: relative; padding: 38px 36px 24px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 2px 5px rgba(20,33,30,.10); }
.legal-summary { display: grid; gap: 9px; }
.legal-note { width: fit-content; max-width: 100%; padding: 3px; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: stretch; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.legal-note-copy { min-height: 30px; padding: 6px 10px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; color: #59645e; font-size: 10px; font-weight: 700; line-height: 1.35; box-shadow: 0 2px 7px rgba(18,24,32,.025); }
.legal-facts { width: fit-content; max-width: 100%; padding: 3px; display: flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.legal-copy { margin-top: 18px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; }
.legal-copy p { margin: 0; color: #59645e; font-size: 11px; font-weight: 500; line-height: 1.7; }
.legal-copy p + p { margin-top: 13px; }
.legal-copy strong { color: var(--ink); font-weight: 700; }
.legal-copy a { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.legal-details { width: fit-content; max-width: 100%; margin-top: 18px; padding: 3px; display: flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.legal-details a.header-fact:hover { color: var(--ink); text-decoration: none; }
.legal-footer { margin-top: auto; }

@media (min-width: 1200px) {
  .footer-note-copy p { white-space: nowrap; }
}

@media (max-width: 1199px) {
  .header-sources { display: none; }
}

@media (max-width: 1120px) {
  .hero h1 {
    font-size: clamp(44px, 4.5vw, 50px);
    white-space: normal;
  }
  .hero-preview { right: clamp(-150px, calc(72.5vw - 846px), -34px); }
}

@media (max-width: 960px) {
  .hero h1 { font-size: clamp(34px, 4.6vw, 44px); }
  .hero-preview { right: clamp(-285px, calc(48.2vw - 613px), -150px); }
  .calculator-shell { grid-template-columns: 1fr; max-width: 680px; margin-bottom: 72px; row-gap: 30px; overflow: visible; }
  .calculator-column { display: contents; }
  .calculator-form { order: 1; }
  .result-panel { order: 2; }
  .optional-card { order: 3; }
  .withholding-card { order: 4; }
  .methodology-card { order: 5; }
  .faq-card { order: 6; }
  footer { height: auto; padding-block: 30px; grid-template-columns: 1fr 1.5fr; gap: 28px; }
  .footer-meta { grid-column: 1 / -1; width: 100%; padding: 18px 0 0; justify-content: flex-start; border-top: 1px solid var(--line); border-left: 0; text-align: left; }
}

@media (max-width: 680px) {
  .site-header { height: 64px; padding-inline: 20px; }
  .header-facts { display: none; }
  .mobile-calculator-link { display: flex; }
  .legal-back { display: flex; }
  .hero { width: calc(100% - 24px); padding: 36px 0 48px; }
  .hero-content { padding: 34px 26px 32px; }
  .hero h1 { font-size: clamp(24px, 6.5vw, 34px); }
  .hero-benefits { display: none; }
  .hero-support { width: 100%; }
  .hero-facts, .legal-facts, .legal-details { width: 100%; max-width: 100%; padding: 0; display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; border: 0; background: transparent; }
  .fact-pair { width: max-content; max-width: 100%; padding: 3px; display: grid; grid-template-columns: 30px auto; align-items: stretch; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
  .fact-pair:not(:first-child) > .header-facts-info { display: grid; }
  .fact-pair > .header-facts-info { height: 30px; }
  .fact-pair > .header-fact { justify-content: flex-start; }
  .hero-facts .fact-pair { grid-template-columns: auto; }
  .hero-facts .mobile-free-fact { display: grid; }
  .ad-leaderboard { width: calc(100% - 32px); margin: -16px auto 42px; }
  .ad-unit-shell, .responsive-ad { min-height: 50px; }
  .calculator-shell { width: calc(100% - 28px); margin-bottom: 36px; gap: 30px; scroll-margin-top: 24px; }
  .calculator-form { padding: 38px 16px 20px; border-radius: 12px; }
  .result-panel { padding: 38px 16px 20px; border-radius: 12px; }
  .optional-card { padding: 38px 16px 20px; border-radius: 12px; }
  .withholding-card { padding: 38px 16px 20px; border-radius: 12px; }
  .support-card { padding: 38px 16px 20px; border-radius: 12px; }
  .card-topbar { left: 14px; right: 14px; }
  .setting-row { height: 38px; padding-left: 8px; grid-template-columns: minmax(0, 1fr) minmax(128px, .9fr); gap: 10px; }
  .setting-label { gap: 7px; font-size: 10px; }
  .setting-label svg { width: 14px; height: 14px; }
  .result-heading { grid-template-columns: 1fr 1fr; }
  .period-switch { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .period-switch button { width: auto; }
  .state-popover { min-width: 100%; }
  footer { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand meta" "note note"; gap: 18px 16px; padding: 27px 20px; }
  .footer-brand, footer > .brand { grid-area: brand; align-self: center; }
  .footer-note { grid-area: note; width: 100%; max-width: none; justify-self: stretch; }
  .footer-note-copy { padding-block: 6px; justify-content: flex-start; text-align: left; }
  .footer-meta { grid-area: meta; grid-column: auto; width: auto; padding: 0; justify-self: end; justify-content: flex-end; gap: 14px; border: 0; text-align: right; }
  .source-strip { width: 100%; }
  .legal-main { width: calc(100% - 32px); padding: 48px 0; }
  .legal-card { padding: 38px 20px 20px; border-radius: 12px; }
  .legal-copy { padding: 17px 16px; }
  .legal-footer { grid-template-columns: auto minmax(0, 1fr); }
}

@media (max-width: 380px) {
  .withholding-input-badge { right: 7px; padding-inline: 6px; font-size: 8px; }
}

@container (max-width: 430px) {
  .result-heading { padding-bottom: 16px; }
}

@media (max-width: 960px) and (orientation: landscape) {
  .hero { padding-top: 40px; }
  .hero-preview { right: -34px; }
  .calculator-shell { margin-bottom: 40px; scroll-margin-top: 24px; }
}

@media (max-width: 680px) and (orientation: portrait) {
  .hero-preview { right: -285px; }
}

@media (min-width: 681px) and (max-width: 960px) and (orientation: portrait) {
  footer {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "brand meta" "note note";
    gap: 18px 16px;
    padding: 27px 24px;
  }
  .footer-brand, footer > .brand { grid-area: brand; align-self: center; }
  .footer-note { grid-area: note; width: 100%; max-width: none; justify-self: stretch; }
  .footer-note-copy { padding-block: 6px; justify-content: flex-start; text-align: left; }
  .footer-meta {
    grid-area: meta;
    grid-column: auto;
    width: auto;
    padding: 0;
    justify-self: end;
    justify-content: flex-end;
    gap: 14px;
    border: 0;
    text-align: right;
  }
  .legal-footer { grid-template-columns: auto minmax(0, 1fr); }
}

@media (max-width: 680px) and (orientation: landscape) {
  .hero-benefits { width: calc(100% + 32px); margin-inline: -16px; display: flex; flex-wrap: nowrap; justify-content: space-between; column-gap: 8px; }
  .hero-facts .mobile-free-fact { display: none; }
}

@media (max-width: 960px) and (orientation: landscape) {
  footer { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand meta" "note note"; gap: 18px 16px; padding: 27px 20px; }
  .footer-brand, footer > .brand { grid-area: brand; align-self: center; }
  .footer-note { grid-area: note; width: 100%; max-width: none; justify-self: stretch; }
  .footer-note-copy { padding-block: 6px; justify-content: flex-start; text-align: left; }
  .footer-meta { grid-area: meta; grid-column: auto; width: auto; padding: 0; justify-self: end; justify-content: flex-end; gap: 14px; border: 0; text-align: right; }
  .legal-footer { grid-template-columns: auto minmax(0, 1fr); }
}

@media (min-width: 760px) and (max-width: 960px) and (orientation: landscape) {
  .mobile-calculator-link { margin-left: 8px; display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
