:root {
  --navy: #071b35;
  --navy-2: #0c294e;
  --blue: #176bff;
  --blue-soft: #eaf2ff;
  --mint: #4fd5b4;
  --orange: #ff9d55;
  --paper: #f4f7fb;
  --white: #ffffff;
  --ink: #0a1c33;
  --muted: #64748b;
  --line: #dfe7f1;
  --danger: #bf3f4d;
  --success: #13795b;
  --shadow: 0 30px 80px rgba(4, 24, 52, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
a { color: inherit; }

.site-header {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 5vw, 76px);
  background: var(--navy);
  color: var(--white);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  font: 800 21px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.04em;
}
.brand > span:last-child > span { color: #69a1ff; }
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--blue);
  color: var(--white);
  font-size: 18px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.header-meta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: #c9d7e8;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(79,213,180,.13); }

.hero {
  min-height: 390px;
  padding: 82px clamp(22px, 7vw, 112px) 124px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  background:
    radial-gradient(circle at 82% 20%, rgba(23,107,255,.34), transparent 28%),
    linear-gradient(135deg, var(--navy) 0%, #082343 70%, #0d315d 100%);
  color: var(--white);
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  right: -160px;
  top: -230px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255,255,255,.025), 0 0 0 115px rgba(255,255,255,.02);
}
.eyebrow {
  margin: 0 0 16px;
  color: #75aaff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero h1, .trust-section h2, .legal-section h2 {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.055em;
}
.hero h1 { font-size: clamp(44px, 6vw, 78px); line-height: .98; max-width: 760px; }
.hero-copy { max-width: 620px; margin: 26px 0 0; color: #b9cbe0; font-size: 17px; line-height: 1.7; }
.hero-badge {
  width: 154px;
  height: 154px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}
.hero-badge span { font: 800 34px/1 Inter, ui-sans-serif, system-ui, sans-serif; }
.hero-badge small { margin-top: 7px; color: #bfd1e6; }

.calculator-shell {
  width: min(1220px, calc(100% - 36px));
  margin: -76px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.input-panel, .result-panel { padding: clamp(28px, 4vw, 52px); }
.result-panel { background: #f9fbfe; border-left: 1px solid var(--line); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 34px; }
.panel-heading h2 { margin: 5px 0 0; font: 700 25px/1.2 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.035em; }
.step { margin: 0; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.reset-button, .annual-card button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
  padding: 7px 0;
}
.reset-button:hover, .annual-card button:hover { text-decoration: underline; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.field { display: grid; gap: 9px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field > span:first-child { font-size: 13px; font-weight: 700; color: #33445b; }
input, select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  padding: 0 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(23,107,255,.1); }
input:disabled, select:disabled { opacity: .65; background: #f4f6f9; }
.salary-field input { height: 66px; font: 700 27px/1 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.035em; padding-right: 50px; }
.money-input { position: relative; display: block; }
.money-input b {
  position: absolute;
  right: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue);
  font-size: 17px;
}
.money-input.small b { font-size: 15px; }
.money-input.small input { padding-right: 40px; }

.toggle-row {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
}
.toggle-row > span { flex: 1; display: grid; gap: 4px; }
.toggle-row strong { font-size: 14px; }
.toggle-row small { color: var(--muted); line-height: 1.4; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-row i {
  width: 44px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: #cdd7e3;
  position: relative;
  transition: background .2s;
}
.toggle-row i::after {
  content: '';
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--white);
  position: absolute;
  left: 3px;
  top: 3px;
  box-shadow: 0 2px 5px rgba(0,0,0,.15);
  transition: transform .2s;
}
.toggle-row input:checked + i { background: var(--blue); }
.toggle-row input:checked + i::after { transform: translateX(19px); }
.compact-toggle { min-height: 64px; }

.section-divider { margin: 34px 0 20px; display: flex; align-items: center; gap: 14px; }
.section-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.section-divider span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.compact-grid { gap: 15px; }

.regime-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 5px;
  border-radius: 16px;
  background: #edf2f8;
}
.regime-tabs label { cursor: pointer; }
.regime-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.regime-tabs span {
  min-height: 43px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #5c6d82;
  font-size: 13px;
  font-weight: 700;
  transition: all .2s;
}
.regime-tabs input:checked + span { background: var(--white); color: var(--blue); box-shadow: 0 5px 16px rgba(23, 52, 88, .1); }
.conditional-fields {
  margin-top: 16px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  background: var(--blue-soft);
  border-radius: 18px;
  border: 1px solid #d4e4ff;
}
.inline-note { margin: 0; color: #4c6480; font-size: 12px; line-height: 1.55; }

.result-heading { margin-bottom: 24px; }
.calculation-label { padding: 7px 11px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.net-card {
  padding: 27px 28px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: var(--white);
  box-shadow: 0 20px 44px rgba(7, 27, 53, .18);
}
.net-card p { margin: 0 0 8px; color: #b9cbe0; font-size: 13px; }
.net-value { font: 800 clamp(36px, 4vw, 53px)/1 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.055em; }
.net-card span { display: block; margin-top: 10px; color: #8fa8c5; font-size: 12px; }

.allocation { display: grid; grid-template-columns: 146px 1fr; gap: 24px; align-items: center; margin: 29px 0; }
.donut {
  width: 142px;
  height: 142px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--blue) 0 70%, var(--mint) 70% 82%, var(--orange) 82% 100%);
  position: relative;
}
.donut::before { content: ''; width: 96px; height: 96px; border-radius: 50%; background: #f9fbfe; position: absolute; }
.donut div { position: relative; z-index: 1; text-align: center; display: grid; }
.donut strong { font: 800 22px/1 Inter, ui-sans-serif, system-ui, sans-serif; }
.donut span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.allocation-legend { display: grid; gap: 12px; }
.allocation-legend > div { display: grid; grid-template-columns: 10px 1fr auto; gap: 9px; align-items: center; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.net { background: var(--blue); }
.legend-dot.ss { background: var(--mint); }
.legend-dot.irs { background: var(--orange); }
.allocation-legend p, .allocation-legend b { margin: 0; font-size: 12px; }
.allocation-legend p { color: var(--muted); }
.allocation-legend b { font-weight: 700; }

.breakdown { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 13px 0; }
.breakdown > div { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 13px; }
.breakdown span { color: var(--muted); }
.breakdown .breakdown-label { display: grid; gap: 3px; }
.breakdown .breakdown-label small { color: var(--blue); font-size: 10.5px; font-weight: 700; line-height: 1.25; }
.breakdown b { font-size: 13px; }
.negative { color: var(--danger); }
.positive { color: var(--success); }

.warning-box {
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: 13px;
  background: #fff5e9;
  border: 1px solid #ffd9ad;
  color: #775029;
  font-size: 12px;
  line-height: 1.55;
}
.warning-box p { margin: 0; }
.warning-box p + p { margin-top: 7px; }

.annual-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.annual-card > div:not(#annual-details) { display: grid; gap: 5px; }
.annual-card span { color: var(--muted); font-size: 11px; }
.annual-card strong { font: 700 17px/1.2 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.025em; }
.annual-card button { grid-column: 1 / -1; text-align: left; padding: 3px 0 0; font-size: 12px; }
#annual-details { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 10px; }
#annual-details p { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 9px 0; }
#annual-details .annual-detail-label { display: grid; gap: 2px; }
#annual-details .annual-detail-label small { color: var(--blue); font-size: 9.5px; font-weight: 700; line-height: 1.25; }
#annual-details b { font-size: 12px; }
.disclaimer { margin: 18px 0 0; color: #8694a6; font-size: 10.5px; line-height: 1.55; }

.trust-section, .legal-section {
  width: min(1180px, calc(100% - 44px));
  margin: 110px auto 0;
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 70px;
  align-items: start;
}
.trust-section h2, .legal-section h2 { font-size: clamp(34px, 4vw, 52px); line-height: 1.05; }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.trust-grid article {
  min-height: 210px;
  padding: 25px;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid var(--line);
}
.trust-grid article > span { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.trust-grid h3 { margin: 34px 0 10px; font: 700 18px/1.2 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.025em; }
.trust-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.legal-section { margin-top: 86px; padding-top: 70px; border-top: 1px solid var(--line); }
.legal-links { display: grid; }
.legal-links a {
  padding: 19px 2px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  color: #314257;
  text-decoration: none;
  font-weight: 600;
  transition: color .2s, padding .2s;
}
.legal-links a:hover { color: var(--blue); padding-left: 8px; }
.legal-links span { color: var(--blue); }

footer {
  margin-top: 100px;
  padding: 32px clamp(22px, 7vw, 112px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--navy);
  color: var(--white);
}
.footer-brand { font-size: 17px; }
.footer-brand .brand-mark { width: 31px; height: 31px; font-size: 15px; }
footer p { color: #9fb2c9; font-size: 12px; }

@media (max-width: 960px) {
  .hero { padding-bottom: 118px; }
  .hero-badge { display: none; }
  .calculator-shell { grid-template-columns: 1fr; }
  .result-panel { border-left: 0; border-top: 1px solid var(--line); }
  .trust-section, .legal-section { grid-template-columns: 1fr; gap: 35px; }
}

@media (max-width: 620px) {
  .site-header { height: 70px; }
  .header-meta { font-size: 0; }
  .hero { min-height: 350px; padding-top: 58px; }
  .hero h1 { font-size: 44px; }
  .hero-copy { font-size: 15px; }
  .calculator-shell { width: calc(100% - 20px); margin-top: -54px; border-radius: 22px; }
  .input-panel, .result-panel { padding: 25px 20px; }
  .form-grid, .conditional-fields { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .regime-tabs { grid-template-columns: 1fr; }
  .allocation { grid-template-columns: 120px 1fr; gap: 16px; }
  .donut { width: 116px; height: 116px; }
  .donut::before { width: 77px; height: 77px; }
  .annual-card { grid-template-columns: 1fr; }
  .annual-card button, #annual-details { grid-column: auto; }
  .trust-section, .legal-section { width: calc(100% - 28px); margin-top: 72px; }
  .trust-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 16px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* Legal-compliance additions */
.eligibility-toggle {
  background: rgba(255,255,255,.72);
  border-color: #bfd5fb;
}
.independence-section {
  width: min(1180px, calc(100% - 44px));
  margin: 76px auto 0;
}
.independence-card {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 60px;
  padding: clamp(30px, 5vw, 58px);
  border-radius: 26px;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 24px 60px rgba(7,27,53,.13);
}
.independence-card h2 {
  margin: 0;
  max-width: 520px;
  font: 700 clamp(30px, 4vw, 48px)/1.08 'Manrope', system-ui, sans-serif;
  letter-spacing: -.05em;
}
.independence-copy { display: grid; align-content: start; gap: 14px; }
.independence-copy p { margin: 0; color: #b9cbe0; font-size: 14px; line-height: 1.7; }
.independence-copy a { margin-top: 8px; color: #fff; font-weight: 700; text-decoration: none; }
.independence-copy a:hover { text-decoration: underline; }
.independence-copy span { color: #75aaff; }

.footer-main { display: flex; align-items: center; gap: 22px; }
.footer-main p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.footer-links a { color: #c4d2e2; font-size: 12px; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

.legal-page { min-height: 100vh; background: var(--paper); }
.legal-header { position: sticky; top: 0; z-index: 5; }
.legal-page-main {
  width: min(900px, calc(100% - 36px));
  margin: 54px auto 90px;
}
.legal-page-hero {
  padding: clamp(30px, 6vw, 64px);
  border-radius: 28px;
  background: linear-gradient(135deg, var(--navy), #0d315d);
  color: #fff;
}
.legal-page-hero h1 {
  margin: 0;
  font: 800 clamp(38px, 6vw, 64px)/1 'Manrope', system-ui, sans-serif;
  letter-spacing: -.055em;
}
.legal-page-hero p:last-child { max-width: 680px; margin: 20px 0 0; color: #bdd0e5; line-height: 1.65; }
.legal-document {
  margin-top: 24px;
  padding: clamp(26px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(7,27,53,.06);
}
.legal-document h2 { margin: 38px 0 12px; font: 700 23px/1.25 'Manrope', system-ui, sans-serif; letter-spacing: -.025em; }
.legal-document h2:first-child { margin-top: 0; }
.legal-document p, .legal-document li { color: #4d6077; line-height: 1.75; }
.legal-document ul { padding-left: 22px; }
.legal-document a { color: var(--blue); }
.legal-document .placeholder {
  padding: 16px 18px;
  border: 1px solid #ffd09a;
  border-radius: 14px;
  background: #fff7ed;
  color: #75471b;
}
.legal-document .metadata {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 9px 18px;
  margin: 18px 0;
}
.legal-document .metadata dt { color: #718096; font-weight: 700; }
.legal-document .metadata dd { margin: 0; color: #23364e; }
.legal-back { display: inline-flex; margin: 22px 0 0; color: #c9d7e8; text-decoration: none; }
.legal-back:hover { color: #fff; text-decoration: underline; }

@media (max-width: 960px) {
  .independence-card { grid-template-columns: 1fr; gap: 24px; }
  footer { align-items: flex-start; }
  .footer-main { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 620px) {
  .independence-section { width: calc(100% - 28px); margin-top: 54px; }
  .footer-links { justify-content: center; }
  .footer-main { align-items: center; }
  .legal-document .metadata { grid-template-columns: 1fr; gap: 3px; }
}

/* Exportação de relatório */
.meal-assumption { margin: 0; align-self: end; }
.export-pdf-button {
  width: 100%;
  margin-top: 18px;
  padding: 15px 17px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #c9dcff;
  border-radius: 16px;
  background: linear-gradient(135deg, #edf4ff, #f8fbff);
  color: var(--navy);
  text-align: left;
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.export-pdf-button:hover {
  transform: translateY(-1px);
  border-color: #8eb8ff;
  box-shadow: 0 12px 28px rgba(23,107,255,.10);
}
.export-pdf-button:focus-visible { outline: 3px solid rgba(23,107,255,.25); outline-offset: 2px; }
.export-pdf-button svg {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.export-pdf-button span { display: grid; gap: 3px; }
.export-pdf-button strong { font-size: 13px; }
.export-pdf-button small { color: var(--muted); font-size: 11px; }

.pdf-report { display: none; }

@media print {
  @page { size: A4; margin: 0; }
  html, body { width: 210mm; min-height: 297mm; background: #fff !important; }
  body.calculator-page { margin: 0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.calculator-page > *:not(.pdf-report) { display: none !important; }
  .pdf-report {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 13mm 14mm 11mm;
    display: block !important;
    background: #f4f7fb;
    color: #0a1c33;
    font-family: Inter, Arial, sans-serif;
  }
  .pdf-report * { box-sizing: border-box; }
  .pdf-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8mm;
  }
  .pdf-report-brand { display: flex; align-items: center; gap: 3mm; }
  .pdf-report-brand > span {
    width: 10mm;
    height: 10mm;
    display: grid;
    place-items: center;
    border-radius: 3mm;
    background: #176bff;
    color: #fff;
    font-size: 5mm;
    font-weight: 800;
  }
  .pdf-report-brand strong { font-size: 5.4mm; letter-spacing: -.35mm; }
  .pdf-report-brand em { color: #176bff; font-style: normal; }
  .pdf-report-meta { display: grid; justify-items: end; gap: 1mm; }
  .pdf-report-meta b { font-size: 3.2mm; }
  .pdf-report-meta span { color: #64748b; font-size: 2.7mm; }
  .pdf-report-hero {
    min-height: 42mm;
    padding: 8mm 9mm;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 6mm;
    background: linear-gradient(135deg, #071b35, #0d315d);
    color: #fff;
  }
  .pdf-report-hero p { margin: 0 0 2mm; color: #b9cbe0; font-size: 3.1mm; }
  .pdf-report-hero > div:first-child > strong { display: block; font-size: 12mm; line-height: 1; letter-spacing: -.8mm; }
  .pdf-report-hero > div:first-child > span { display: block; margin-top: 2mm; color: #b9cbe0; font-size: 2.8mm; }
  .pdf-report-year {
    width: 27mm;
    height: 27mm;
    display: grid;
    place-content: center;
    text-align: center;
    border: .3mm solid rgba(255,255,255,.22);
    border-radius: 50%;
    background: rgba(255,255,255,.06);
  }
  .pdf-report-year b { font-size: 6mm; }
  .pdf-report-year span { margin-top: 1mm; color: #b9cbe0; font-size: 2.2mm; }
  .pdf-summary-grid {
    margin-top: 4mm;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3mm;
  }
  .pdf-summary-grid article {
    min-height: 19mm;
    padding: 4mm;
    display: grid;
    align-content: center;
    gap: 1.5mm;
    border: .25mm solid #dfe7f1;
    border-radius: 4mm;
    background: #fff;
  }
  .pdf-summary-grid span { color: #64748b; font-size: 2.6mm; }
  .pdf-summary-grid strong { font-size: 5mm; letter-spacing: -.25mm; }
  .pdf-report-section { margin-top: 5mm; break-inside: avoid; }
  .pdf-section-title { display: flex; align-items: center; gap: 2.5mm; margin-bottom: 3mm; }
  .pdf-section-title > span {
    width: 7mm;
    height: 7mm;
    display: grid;
    place-items: center;
    border-radius: 2.2mm;
    background: #eaf2ff;
    color: #176bff;
    font-size: 2.4mm;
    font-weight: 800;
  }
  .pdf-section-title h2 { margin: 0; font-size: 4mm; letter-spacing: -.15mm; }
  .pdf-profile {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5mm;
  }
  .pdf-profile > div {
    min-height: 15mm;
    padding: 3.2mm 3.5mm;
    display: grid;
    align-content: center;
    gap: 1.2mm;
    border-radius: 3mm;
    background: #fff;
    border: .25mm solid #dfe7f1;
  }
  .pdf-profile span { color: #64748b; font-size: 2.4mm; }
  .pdf-profile strong { font-size: 3mm; line-height: 1.25; }
  .pdf-report-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
  .pdf-data-card {
    padding: 4.5mm;
    border: .25mm solid #dfe7f1;
    border-radius: 4mm;
    background: #fff;
  }
  .pdf-data-card .pdf-section-title { margin-bottom: 2mm; }
  .pdf-data-list > div {
    min-height: 8mm;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4mm;
    border-bottom: .25mm solid #edf1f6;
    font-size: 2.7mm;
  }
  .pdf-data-list > div:last-child { border-bottom: 0; }
  .pdf-data-list span { color: #52647a; }
  .pdf-data-list .pdf-rate-label { display: grid; gap: .7mm; }
  .pdf-data-list .pdf-rate-label small { color: #176bff; font-size: 2.15mm; font-weight: 700; line-height: 1.2; }
  .pdf-data-list b { white-space: nowrap; font-size: 2.9mm; }
  .pdf-data-list .pdf-negative { color: #a23b48; }
  .pdf-data-list .pdf-total-row {
    margin-top: 1.5mm;
    padding-top: 1.5mm;
    border-top: .4mm solid #cbd8e7;
  }
  .pdf-data-list .pdf-total-row span, .pdf-data-list .pdf-total-row b { color: #071b35; font-weight: 800; }
  .pdf-data-list .pdf-total-row b { font-size: 3.7mm; }
  .pdf-report-notes {
    padding: 4mm 5mm;
    border-radius: 4mm;
    background: #fff;
    border: .25mm solid #dfe7f1;
  }
  .pdf-report-notes .pdf-section-title { margin-bottom: 2mm; }
  .pdf-report-notes ul {
    margin: 0;
    padding-left: 5mm;
    display: grid;
    gap: 1.2mm;
    color: #52647a;
    font-size: 2.45mm;
    line-height: 1.45;
  }
  .pdf-report-footer {
    margin-top: 5mm;
    padding-top: 3mm;
    display: flex;
    justify-content: space-between;
    gap: 8mm;
    border-top: .25mm solid #d4deea;
    color: #64748b;
    font-size: 2.25mm;
    line-height: 1.4;
  }
  .pdf-report-footer p { max-width: 115mm; margin: 0; }
  .pdf-report-footer span { text-align: right; }
}

@media print {
  .pdf-report-hero > div:first-child > strong { font-size: 10.5mm; white-space: nowrap; }
  .pdf-section-title h2 { white-space: nowrap; }
  .pdf-report-footer {
    margin: 5mm 0 0;
    padding: 3mm 0 0;
    align-items: flex-start;
    background: transparent !important;
    color: #64748b !important;
  }
}

@media print {
  .pdf-report { position: relative; }
  .pdf-report-footer {
    position: absolute;
    left: 14mm;
    right: 14mm;
    bottom: 9mm;
  }
}

@media print {
  .pdf-profile { grid-template-columns: repeat(4, 1fr); }
  .pdf-profile strong { font-size: 2.8mm; }
  .pdf-report-notes ul { gap: .8mm; font-size: 2.3mm; line-height: 1.35; }
}

@media print {
  .pdf-report-header { margin-bottom: 5mm; }
  .pdf-report-hero { min-height: 36mm; padding: 6mm 8mm; }
  .pdf-report-year { width: 24mm; height: 24mm; }
  .pdf-summary-grid { margin-top: 3mm; }
  .pdf-summary-grid article { min-height: 16mm; padding: 3mm 4mm; }
  .pdf-report-section { margin-top: 3.5mm; }
  .pdf-section-title { margin-bottom: 2mm; }
  .pdf-profile { gap: 2mm; }
  .pdf-profile > div { min-height: 12.5mm; padding: 2.5mm 3mm; }
  .pdf-data-card { padding: 3.5mm 4mm; }
  .pdf-data-list > div { min-height: 7mm; }
  .pdf-report-notes { padding: 3mm 4mm; }
  .pdf-report-notes ul { gap: .5mm; font-size: 2.15mm; line-height: 1.28; }
  .pdf-report-footer { bottom: 7mm; font-size: 2.1mm; }
}

@media print {
  .pdf-report { height: 297mm; }
}


/* Language selector */
.header-actions { display: flex; align-items: center; gap: 12px; }
.language-switch {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 34px; padding: 0 11px; border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px; color: #fff; background: rgba(255,255,255,.08);
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-decoration: none;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.language-switch:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.42); transform: translateY(-1px); }
.language-switch:focus-visible { outline: 3px solid rgba(255,255,255,.28); outline-offset: 2px; }
@media (max-width: 620px) {
  .header-actions { gap: 8px; }
  .header-actions .header-meta { display: none; }
  .language-switch { min-width: 40px; height: 32px; }
}

/* IRS assessment analyser */
.header-tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  background: rgba(23, 107, 255, .2);
  border: 1px solid rgba(105, 161, 255, .35);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: background .2s, transform .2s, border-color .2s;
}
.header-tool-link:hover { background: rgba(23,107,255,.34); border-color: rgba(105,161,255,.62); transform: translateY(-1px); }
.header-tool-link:focus-visible { outline: 3px solid rgba(255,255,255,.25); outline-offset: 2px; }

.analysis-page { background: #f4f7fb; }
.analysis-page main { overflow: hidden; }
.analysis-hero {
  min-height: 420px;
  padding: 78px clamp(22px, 7vw, 112px) 128px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 30%, rgba(79,213,180,.22), transparent 25%),
    radial-gradient(circle at 65% 5%, rgba(23,107,255,.28), transparent 29%),
    linear-gradient(135deg, #071b35, #0b2b52 72%, #0d315d);
  position: relative;
}
.analysis-hero::after {
  content: '';
  position: absolute;
  width: 410px;
  height: 410px;
  right: -210px;
  top: -220px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(255,255,255,.025), 0 0 0 108px rgba(255,255,255,.018);
}
.analysis-hero > div:first-child { max-width: 790px; position: relative; z-index: 1; }
.analysis-hero h1 {
  margin: 0;
  max-width: 820px;
  font: 800 clamp(43px, 5.8vw, 76px)/.99 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.058em;
}
.analysis-hero > div:first-child > p:last-child { max-width: 670px; margin: 26px 0 0; color: #bfd0e3; font-size: 17px; line-height: 1.7; }
.analysis-privacy-badge {
  width: 180px;
  min-height: 180px;
  padding: 26px 22px;
  flex: 0 0 auto;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(255,255,255,.055);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 1;
}
.analysis-privacy-badge > span { color: #69a1ff; font-size: 12px; font-weight: 900; letter-spacing: .16em; }
.analysis-privacy-badge strong { margin-top: 8px; font-size: 20px; }
.analysis-privacy-badge small { margin-top: 7px; color: #bfd0e3; line-height: 1.35; }

.analysis-upload-section {
  width: min(1220px, calc(100% - 36px));
  margin: -78px auto 0;
  position: relative;
  z-index: 2;
}
.analysis-upload-card {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(420px, 1.18fr);
  gap: clamp(28px, 5vw, 65px);
  align-items: center;
  padding: clamp(30px, 4.5vw, 58px);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(4,24,52,.12);
}
.analysis-upload-copy h2 { margin: 6px 0 15px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.045em; }
.analysis-upload-copy > p:not(.step) { margin: 0; max-width: 520px; color: #64748b; line-height: 1.7; }
.analysis-security-note {
  margin-top: 24px;
  padding: 15px 17px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 14px;
  background: #edf9f5;
  color: #245b4d;
}
.analysis-security-note > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d4f3e9;
  color: #13795b;
  font-weight: 900;
}
.analysis-security-note p { margin: 1px 0 0; font-size: 13px; line-height: 1.5; }

.analysis-input-panel {
  min-width: 0;
  display: grid;
  gap: 13px;
}
.irs-upload-zone {
  min-height: 245px;
  padding: 32px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border: 2px dashed #b7c7da;
  border-radius: 22px;
  background: #f8fbff;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.irs-upload-zone:hover, .irs-upload-zone.dragging {
  border-color: #176bff;
  background: #eef5ff;
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(23,107,255,.09);
}
.irs-upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 17px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #176bff;
  color: #fff;
  box-shadow: 0 12px 25px rgba(23,107,255,.22);
}
.upload-icon svg { width: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.irs-upload-zone strong { font-size: 18px; letter-spacing: -.02em; }
.irs-upload-zone small { margin-top: 9px; color: #718198; line-height: 1.5; }

.irs-paste-zone {
  appearance: none;
  width: 100%;
  min-height: 82px;
  padding: 15px 17px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #d5e0ed;
  border-radius: 17px;
  background: #fff;
  color: #172b46;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.irs-paste-zone:hover, .irs-paste-zone:focus-visible {
  border-color: #176bff;
  background: #f7faff;
  transform: translateY(-1px);
  box-shadow: 0 11px 25px rgba(23,107,255,.08);
  outline: none;
}
.paste-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #eaf2ff;
  color: #176bff;
}
.paste-icon svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.irs-paste-zone > span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
.irs-paste-zone strong { font-size: 15px; letter-spacing: -.015em; }
.irs-paste-zone small { color: #718198; font-size: 12px; line-height: 1.4; }
.irs-paste-zone kbd {
  padding: 6px 9px;
  border: 1px solid #cad6e4;
  border-bottom-width: 2px;
  border-radius: 8px;
  background: #f7f9fc;
  color: #52657b;
  font: 800 11px/1 ui-sans-serif, system-ui, sans-serif;
  white-space: nowrap;
}
.irs-image-preview {
  min-height: 96px;
  padding: 10px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid #d7e5df;
  border-radius: 17px;
  background: #f4fbf8;
}
.irs-image-preview[hidden] { display: none; }
.irs-image-preview img {
  width: 78px;
  height: 76px;
  object-fit: cover;
  object-position: top;
  border-radius: 11px;
  border: 1px solid #d8e2ec;
  background: #fff;
}
.irs-image-preview > div { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.irs-image-preview span { grid-column: 1 / -1; color: #13795b; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.irs-image-preview strong { overflow: hidden; color: #263b51; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.irs-image-preview button {
  appearance: none;
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  background: #e4f3ed;
  color: #13795b;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.irs-image-preview button:hover { background: #d5ebe2; }
.ocr-progress {
  padding: 13px 15px;
  border: 1px solid #d9e5f4;
  border-radius: 14px;
  background: #f7faff;
}
.ocr-progress[hidden] { display: none; }
.ocr-progress > div { margin-bottom: 8px; display: flex; justify-content: space-between; gap: 15px; color: #52657b; font-size: 12px; }
.ocr-progress strong { color: #176bff; }
.ocr-progress progress { width: 100%; height: 8px; display: block; overflow: hidden; border: 0; border-radius: 999px; background: #dce8f7; accent-color: #176bff; }
.ocr-progress progress::-webkit-progress-bar { border-radius: 999px; background: #dce8f7; }
.ocr-progress progress::-webkit-progress-value { border-radius: 999px; background: #176bff; }
.ocr-progress progress::-moz-progress-bar { border-radius: 999px; background: #176bff; }
.analysis-upload-actions {
  grid-column: 1 / -1;
  margin-top: -12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid #e5ebf3;
}
.secondary-action {
  appearance: none;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid #cad6e4;
  border-radius: 12px;
  background: #fff;
  color: #176bff;
  font-weight: 800;
  cursor: pointer;
}
.secondary-action:hover { background: #f3f7fc; border-color: #9fb7d2; }
.analysis-status { margin: 0; font-size: 13px; line-height: 1.45; text-align: right; }
.analysis-status.neutral { color: #64748b; }
.analysis-status.loading { color: #176bff; font-weight: 700; }
.analysis-status.success { color: #13795b; font-weight: 700; }
.analysis-status.error { color: #bf3f4d; font-weight: 700; }

.analysis-capabilities {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.analysis-capabilities article {
  min-height: 180px;
  padding: 26px;
  border: 1px solid #dfe7f1;
  border-radius: 20px;
  background: #fff;
}
.analysis-capabilities article > span { color: #176bff; font-size: 11px; font-weight: 900; letter-spacing: .13em; }
.analysis-capabilities h3 { margin: 18px 0 8px; font-size: 18px; letter-spacing: -.025em; }
.analysis-capabilities p { margin: 0; color: #64748b; font-size: 14px; line-height: 1.55; }

.irs-analysis-results {
  width: min(1220px, calc(100% - 36px));
  margin: 72px auto 0;
  scroll-margin-top: 24px;
}
.analysis-results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}
.analysis-results-heading h2 { margin: 7px 0 5px; font-size: clamp(30px, 4vw, 47px); letter-spacing: -.052em; }
.analysis-results-heading > div:first-child > p:last-child { margin: 0; color: #64748b; }
.analysis-confidence { display: grid; justify-items: end; gap: 7px; text-align: right; }
.analysis-confidence span { color: #64748b; font-size: 13px; }
.analysis-confidence strong { padding: 8px 12px; border-radius: 999px; background: #eaf2ff; color: #176bff; font-size: 12px; }

.analysis-outcome {
  min-height: 170px;
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr);
  gap: 45px;
  align-items: center;
  border-radius: 26px;
  color: #fff;
  overflow: hidden;
  position: relative;
}
.analysis-outcome::after {
  content: '';
  position: absolute;
  width: 250px;
  height: 250px;
  right: -90px;
  top: -130px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 0 0 38px rgba(255,255,255,.035), 0 0 0 76px rgba(255,255,255,.02);
}
.analysis-outcome.refund { background: linear-gradient(135deg, #075b48, #138064); }
.analysis-outcome.pay { background: linear-gradient(135deg, #7e2835, #b84955); }
.analysis-outcome.unknown { background: linear-gradient(135deg, #071b35, #0d315d); }
.analysis-outcome > div, .analysis-outcome > p { position: relative; z-index: 1; }
.analysis-outcome > div { display: grid; gap: 8px; }
.analysis-outcome > div span { color: rgba(255,255,255,.75); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.analysis-outcome > div strong { font-size: clamp(38px, 5vw, 62px); letter-spacing: -.055em; white-space: nowrap; }
.analysis-outcome > p { margin: 0; max-width: 580px; color: rgba(255,255,255,.83); font-size: 17px; line-height: 1.65; }

.irs-key-values {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.irs-key-values article, .irs-rate-grid article {
  padding: 24px;
  display: grid;
  align-content: center;
  gap: 9px;
  border: 1px solid #dfe7f1;
  border-radius: 18px;
  background: #fff;
}
.irs-key-values span, .irs-rate-grid span { color: #64748b; font-size: 13px; }
.irs-key-values strong { font-size: clamp(20px, 2vw, 28px); letter-spacing: -.035em; }

.analysis-result-section {
  margin-top: 58px;
  padding-top: 4px;
}
.section-title { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 22px; }
.section-title > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #eaf2ff;
  color: #176bff;
  font-size: 11px;
  font-weight: 900;
}
.section-title h2 { margin: 1px 0 5px; font-size: 25px; letter-spacing: -.035em; }
.section-title p { margin: 0; color: #64748b; line-height: 1.5; }
.irs-rate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.irs-rate-grid article { min-height: 150px; }
.irs-rate-grid strong { color: #176bff; font-size: 36px; letter-spacing: -.05em; }
.irs-rate-grid small { color: #718198; line-height: 1.4; }

.irs-regime-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.regime-result-card {
  min-height: 155px;
  padding: 25px;
  border: 1px solid #dfe7f1;
  border-radius: 18px;
  background: #fff;
}
.regime-result-card > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.regime-result-card > div > span { font-size: 17px; font-weight: 800; }
.regime-result-card b { padding: 7px 10px; border-radius: 999px; background: #eef2f7; color: #52647a; font-size: 11px; white-space: nowrap; }
.regime-result-card.positive b { background: #dcf5ec; color: #13795b; }
.regime-result-card.warning b { background: #fff0e5; color: #a85e25; }
.regime-result-card p { margin: 19px 0 0; color: #64748b; line-height: 1.58; }

.irs-explanation-steps { display: grid; gap: 12px; }
.irs-explanation-steps article {
  min-height: 126px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  border: 1px solid #dfe7f1;
  border-radius: 18px;
  background: #fff;
}
.irs-explanation-steps article > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #071b35;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.irs-explanation-steps h3 { margin: 0; font-size: 16px; }
.irs-explanation-steps strong { display: block; margin-top: 7px; color: #176bff; font-size: 25px; letter-spacing: -.035em; }
.irs-explanation-steps p { margin: 8px 0 0; color: #64748b; line-height: 1.55; }

.analysis-table-wrap {
  overflow: hidden;
  border: 1px solid #dfe7f1;
  border-radius: 18px;
  background: #fff;
}
.analysis-table-wrap table { width: 100%; border-collapse: collapse; }
.analysis-table-wrap th, .analysis-table-wrap td { padding: 16px 21px; border-bottom: 1px solid #e8edf4; text-align: left; }
.analysis-table-wrap thead th { background: #f7f9fc; color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.analysis-table-wrap tbody th { color: #42536a; font-weight: 650; }
.analysis-table-wrap td { text-align: right; font-weight: 800; white-space: nowrap; }
.analysis-table-wrap tr:last-child th, .analysis-table-wrap tr:last-child td { border-bottom: 0; }

.professional-warning {
  margin-top: 52px;
  padding: clamp(27px, 4vw, 44px);
  border: 1px solid #f0c8a8;
  border-radius: 22px;
  background: #fff8f1;
  color: #5d3922;
}
.professional-warning > div { display: flex; align-items: center; gap: 13px; }
.professional-warning > div > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #ffead8;
  color: #b65c1b;
  font-weight: 900;
}
.professional-warning h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.professional-warning p, .professional-warning li { line-height: 1.65; }
.professional-warning p { margin: 18px 0 0; }
.professional-warning ul { margin: 19px 0 0; padding-left: 21px; color: #795039; }

.analysis-source-note {
  width: min(1220px, calc(100% - 36px));
  margin: 72px auto 90px;
  padding: clamp(28px, 5vw, 55px);
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 55px;
  border-radius: 25px;
  background: #071b35;
  color: #fff;
}
.analysis-source-note h2 { margin: 6px 0 0; font-size: 32px; letter-spacing: -.045em; }
.analysis-source-note > p { margin: 0; color: #bed0e4; line-height: 1.75; }

@media (max-width: 930px) {
  .analysis-hero { min-height: auto; padding-bottom: 122px; }
  .analysis-privacy-badge { width: 150px; min-height: 150px; }
  .analysis-upload-card { grid-template-columns: 1fr; }
  .analysis-capabilities { grid-template-columns: repeat(2, 1fr); }
  .irs-key-values { grid-template-columns: repeat(2, 1fr); }
  .analysis-outcome { grid-template-columns: 1fr; gap: 18px; }
  .irs-rate-grid { grid-template-columns: 1fr; }
  .analysis-source-note { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 680px) {
  .header-tool-link { padding: 0 11px; font-size: 11px; }
  .analysis-hero { display: block; padding-top: 60px; }
  .analysis-privacy-badge { width: 132px; min-height: 132px; margin-top: 35px; border-radius: 30px; justify-items: start; text-align: left; }
  .analysis-privacy-badge strong { font-size: 18px; }
  .analysis-upload-section, .irs-analysis-results, .analysis-source-note { width: min(100% - 24px, 1220px); }
  .analysis-upload-card { padding: 25px 20px; border-radius: 22px; }
  .irs-upload-zone { min-height: 215px; padding: 25px 18px; }
  .irs-paste-zone { grid-template-columns: 42px minmax(0, 1fr); }
  .irs-paste-zone kbd { display: none; }
  .irs-image-preview { grid-template-columns: 65px minmax(0, 1fr); }
  .irs-image-preview img { width: 65px; height: 65px; }
  .analysis-upload-actions { align-items: stretch; flex-direction: column; }
  .analysis-status { text-align: left; }
  .analysis-capabilities { grid-template-columns: 1fr; }
  .analysis-capabilities article { min-height: auto; }
  .analysis-results-heading { align-items: flex-start; flex-direction: column; }
  .analysis-confidence { justify-items: start; text-align: left; }
  .analysis-outcome { padding: 28px 23px; }
  .analysis-outcome > div strong { white-space: normal; font-size: 42px; }
  .irs-key-values { grid-template-columns: 1fr; }
  .irs-regime-results { grid-template-columns: 1fr; }
  .regime-result-card > div { align-items: flex-start; flex-direction: column; gap: 10px; }
  .irs-explanation-steps article { grid-template-columns: 42px 1fr; padding: 21px 18px; gap: 14px; }
  .irs-explanation-steps article > span { width: 40px; height: 40px; }
  .analysis-table-wrap { overflow-x: auto; }
  .analysis-table-wrap table { min-width: 520px; }
  .analysis-source-note { margin-bottom: 55px; }
}

/* Manual text fallback for IRS document analysis */
.irs-text-fallback {
  margin-top: 14px;
  border: 1px solid #d9e3ef;
  border-radius: 16px;
  background: #fff;
}
.irs-text-fallback summary {
  cursor: pointer;
  padding: 15px 17px;
  color: #17385d;
  font-weight: 750;
  list-style-position: inside;
}
.irs-text-fallback[open] summary { border-bottom: 1px solid #e5edf5; }
.irs-text-fallback-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}
.irs-text-fallback-body label {
  color: #415b78;
  font-size: .9rem;
  font-weight: 650;
}
.irs-text-fallback-body textarea {
  width: 100%;
  min-height: 138px;
  resize: vertical;
  border: 1px solid #cbd9e8;
  border-radius: 12px;
  padding: 12px 14px;
  color: #071b35;
  background: #fbfdff;
  font: inherit;
  line-height: 1.5;
}
.irs-text-fallback-body textarea:focus {
  outline: 3px solid rgba(27, 108, 255, .14);
  border-color: #1b6cff;
}
.irs-text-fallback-body .secondary-action { justify-self: start; }
