:root {
  --ink: #17172e;
  --muted: #62647b;
  --line: #dcddef;
  --paper: #ffffff;
  --canvas: #f7f6ff;
  --teal: #6547e8;
  --teal-dark: #4932ba;
  --teal-soft: #efedff;
  --navy: #1d214c;
  --aqua: #08a9a8;
  --aqua-bright: #18d5d1;
  --coral: #f85f78;
  --amber: #9a5b08;
  --amber-soft: #fff5df;
  --red: #a12c31;
  --red-soft: #fff0f0;
  --shadow: 0 18px 50px rgba(20, 35, 38, .1);
  --shadow-soft: 0 8px 28px rgba(20, 35, 38, .065);
  --radius-large: 18px;
  --radius-card: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { max-width: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; min-width: 0; max-width: 100%; background: radial-gradient(circle at 92% 2%, rgba(24,213,209,.16), transparent 25rem), radial-gradient(circle at 5% 34%, rgba(108,76,255,.1), transparent 31rem), var(--canvas); overflow-x: clip; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button, input, select, textarea { font: inherit; }
a { color: var(--teal-dark); }
.ui-icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: .75rem 1rem; background: var(--ink); color: white; border-radius: .4rem; }
.skip-link:focus { top: 1rem; }

.scroll-up-control { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 40; display: grid; gap: 9px; }
.scroll-up-button, .scroll-down-button { position: relative; display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border: 1px solid rgba(255,255,255,.58); border-radius: 50%; background: linear-gradient(145deg, #7658ff, #5031d5 58%, #13aaa9); color: white; cursor: pointer; box-shadow: 0 13px 28px rgba(49,32,151,.32), inset 0 1px rgba(255,255,255,.35); transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.scroll-down-button { background: linear-gradient(145deg, #13aaa9, #5031d5 48%, #7658ff); }
.scroll-up-button::before, .scroll-down-button::before { content: ""; position: absolute; inset: -5px; border: 2px solid rgba(101,71,232,.28); border-radius: inherit; opacity: 0; pointer-events: none; }
.scroll-up-button:hover, .scroll-down-button:hover { transform: translateY(-3px); filter: saturate(1.12); box-shadow: 0 17px 34px rgba(49,32,151,.4), inset 0 1px rgba(255,255,255,.35); }
.scroll-up-button:focus-visible, .scroll-down-button:focus-visible { outline: 3px solid rgba(24,213,209,.7); outline-offset: 4px; }
.scroll-up-button.awaiting-scroll, .scroll-down-button.awaiting-scroll { transform: scale(.92); }
.scroll-up-arrow, .scroll-down-arrow { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1; transform: translateY(-1px); }
.scroll-up-status { position: absolute; right: 64px; bottom: 8px; width: max-content; max-width: min(230px, calc(100vw - 100px)); padding: 8px 11px; border: 1px solid rgba(101,71,232,.2); border-radius: 8px; background: rgba(18,17,55,.95); color: white; font-size: .72rem; font-weight: 750; line-height: 1.25; opacity: 0; transform: translateX(8px) scale(.96); pointer-events: none; box-shadow: 0 8px 22px rgba(20,18,62,.24); transition: opacity .18s ease, transform .18s ease; }
.scroll-up-status.visible { opacity: 1; transform: none; }
.scroll-up-button.scrolling-section .scroll-up-arrow { animation: scroll-arrow-step .72s ease; }
.scroll-up-button.scrolling-to-top .scroll-up-arrow { animation: scroll-arrow-top .9s ease; }
.scroll-down-button.scrolling-section .scroll-down-arrow { animation: scroll-arrow-step-down .72s ease; }
.scroll-down-button.scrolling-to-bottom .scroll-down-arrow { animation: scroll-arrow-bottom .9s ease; }
.scroll-up-button.scrolling-section::before, .scroll-up-button.scrolling-to-top::before, .scroll-down-button.scrolling-section::before, .scroll-down-button.scrolling-to-bottom::before { animation: scroll-button-ring .8s ease-out; }

.site-header { position: relative; z-index: 5; background: linear-gradient(105deg, #090b29 0%, #181443 55%, #382070 100%); color: white; border-bottom: 3px solid transparent; border-image: linear-gradient(90deg, var(--aqua-bright), #7658ff, var(--coral)) 1; box-shadow: 0 6px 24px rgba(18,13,64,.2); }
.header-inner { max-width: 1240px; margin: auto; min-height: 78px; padding: 0 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 13px; color: white; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.48); border-radius: 11px; background: rgba(255,255,255,.055); font: 700 25px Georgia, serif; box-shadow: inset 0 1px rgba(255,255,255,.08); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.05rem; letter-spacing: .01em; }
.brand small { margin-top: 2px; color: #c8c9ec; font-size: .76rem; }
.brand-version { display: inline-block; margin-left: .45em; padding-left: .55em; border-left: 1px solid rgba(255,255,255,.34); color: var(--aqua-bright); font-weight: 700; white-space: nowrap; }
.privacy-note { display: inline-flex; align-items: center; gap: 8px; color: #d8d9f4; font-size: .82rem; }
.privacy-note .ui-icon { color: var(--aqua-bright); font-size: 1.05rem; filter: drop-shadow(0 0 7px rgba(24,213,209,.45)); }

.page-shell { max-width: 1280px; margin: auto; padding: 30px 28px 52px; }
.intro { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; min-height: 270px; gap: 34px; margin-bottom: 22px; padding: 36px 38px; overflow: hidden; border: 1px solid rgba(139,118,255,.4); border-radius: 22px; background: linear-gradient(90deg, rgba(7,9,37,.98) 0%, rgba(10,12,48,.94) 43%, rgba(11,15,63,.54) 74%, rgba(15,18,73,.16) 100%), url("images/legal-protection-background-v2.webp") center right / cover no-repeat; box-shadow: 0 24px 65px rgba(28,20,92,.25), 0 0 0 1px rgba(255,255,255,.04) inset; }
.intro::after { content: ""; position: absolute; z-index: -1; right: 12%; bottom: -90px; width: 290px; height: 190px; border-radius: 50%; background: rgba(24,213,209,.24); filter: blur(72px); pointer-events: none; }
.intro-copy { max-width: 760px; }
.intro h1 { display: flex; flex-wrap: nowrap; gap: .22em; margin: 6px 0 12px; color: white; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: clamp(1.8rem, 2.65vw, 2.75rem); font-weight: 820; line-height: 1.04; letter-spacing: -.045em; white-space: nowrap; }
.intro p:not(.eyebrow) { max-width: 680px; margin: 0; color: #d0d3ed; line-height: 1.6; }
.intro .eyebrow { color: var(--aqua-bright); text-shadow: 0 0 18px rgba(24,213,209,.34); }
.eyebrow, .result-kicker { margin: 0; color: var(--teal); font-size: .74rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.scope-badge { align-self: flex-start; flex: 0 0 auto; padding: 12px 18px; border: 1px solid rgba(118,88,255,.5); border-left: 3px solid var(--aqua-bright); border-radius: 10px; background: rgba(12,13,49,.68); box-shadow: 0 10px 30px rgba(4,8,36,.3); backdrop-filter: blur(9px); }
.scope-badge span, .scope-badge strong { display: block; }
.scope-badge span { color: #b8bce2; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.scope-badge strong { margin-top: 3px; color: white; }
.hero-highlights { display: flex; flex-wrap: wrap; gap: 9px; margin: 21px 0 0; padding: 0; list-style: none; }
.hero-highlights li { display: flex; align-items: center; gap: 9px; min-width: 164px; padding: 9px 11px; border: 1px solid rgba(151,138,255,.24); border-radius: 11px; background: rgba(255,255,255,.085); box-shadow: 0 6px 18px rgba(2,6,32,.16); backdrop-filter: blur(9px); }
.hero-highlights .ui-icon { flex: 0 0 auto; color: var(--aqua-bright); font-size: 1.12rem; filter: drop-shadow(0 0 7px rgba(24,213,209,.35)); }
.hero-highlights strong, .hero-highlights small { display: block; }
.hero-highlights strong { color: white; font-size: .72rem; }
.hero-highlights small { margin-top: 1px; color: #bfc2e3; font-size: .65rem; }

.workspace { display: grid; grid-template-columns: minmax(320px, .78fr) minmax(0, 1.62fr); gap: 22px; align-items: start; }
.workspace > *, .form-grid > *, .income-row > *, .documentation-grid > *, .doc-columns > * { min-width: 0; }
.input-column { display: grid; grid-column: 2; gap: 16px; }
.section-block, .result-panel, .warnings-panel, .details-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-soft); }
.section-block { position: relative; padding: 28px; overflow: hidden; }
.section-block::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--teal), var(--aqua-bright), var(--coral)); opacity: .9; }
.section-block, .result-panel, .documentation-card, .legal-disclaimer, .storage-panel { max-width: 100%; overflow-wrap: anywhere; }
.section-heading { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; margin-bottom: 24px; }
.section-heading.with-action { grid-template-columns: 40px 1fr auto; }
.section-heading h2 { margin: 0 0 4px; font-size: 1.05rem; }
.section-heading p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.step-number { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(108,76,255,.16); border-radius: 11px; background: linear-gradient(145deg, #f3f0ff, #e8e3ff); color: var(--teal-dark); box-shadow: 0 5px 15px rgba(108,76,255,.13); font-size: .86rem; font-weight: 800; }

.form-grid { display: grid; gap: 18px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact { gap: 14px 18px; }
.field label, .field > label, fieldset legend, .partial-note label { display: block; margin-bottom: 7px; color: #263a3d; font-size: .82rem; font-weight: 650; }
.field label span, .note-field label span { color: var(--muted); font-weight: 400; }
.field label.field-label-with-help, label.field-label-with-help { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.field label > .field-label-text, label > .field-label-text { flex: 1 1 auto; min-width: 0; color: inherit; font-weight: inherit; line-height: 1.35; }
.field-label-with-help > .tooltip-wrap { margin: -4px 0 0; }
input, select, textarea { width: 100%; max-width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #b9c7c6; border-radius: 9px; background: #fff; color: var(--ink); box-shadow: inset 0 1px 2px rgba(20,35,38,.025); transition: border-color .15s, box-shadow .15s, background .15s; }
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #849795; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(108,76,255,.27); outline-offset: 2px; border-color: var(--teal); }
:where(input, select, textarea):required:not(:disabled) { border-color: #a996ff; background-color: #f3f0ff; box-shadow: inset 0 0 0 1px rgba(108,76,255,.035); }
:where(input, select, textarea):required:not(:disabled):hover { border-color: #8068ef; background-color: #f3f0ff; }
:where(input, select, textarea):required:not(:disabled):focus,
:where(input, select, textarea):required:not(:disabled):focus-visible { border-color: var(--teal); background-color: #f3f0ff; box-shadow: 0 0 0 4px rgba(108,76,255,.1); }
:where(input, select, textarea):required:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #f3f0ff inset; }
.amount-input:has(input:required) > span { color: #4932ba; }
[aria-invalid="true"] { border-color: var(--red); background: #fffafa; }
.field-error { display: block; min-height: 1.15em; margin-top: 5px; color: var(--red); font-size: .76rem; }
.legal-period-chip { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding: 11px 13px; border-radius: 9px; background: var(--teal-soft); color: var(--teal-dark); font-size: .82rem; font-weight: 650; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 4px rgba(8,169,168,.14); }
.legal-period-chip.invalid { background: var(--red-soft); color: var(--red); }
.legal-period-chip.invalid .status-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(161,44,49,.1); }
.special-case-panel { margin-top: 16px; padding: 17px; border: 1px solid #d7bd82; border-radius: 7px; background: #fffaf0; }
.special-case-heading { display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: start; }
.special-case-heading > span { padding: 5px 8px; border-radius: 5px; background: var(--amber-soft); color: var(--amber); font-size: .7rem; font-weight: 800; }
.special-case-heading strong { display: block; font-size: .86rem; }
.special-case-heading p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.support-confirm { margin: 15px 0; padding: 10px 12px; border-radius: 6px; background: white; }
.support-fraction-field { margin-top: 15px; }
.support-fraction-field legend { margin-bottom: 7px; }
.fraction-input { display: flex; align-items: center; gap: 8px; }
.fraction-input input { width: 74px; text-align: center; font-variant-numeric: tabular-nums; }
.fraction-input > span { color: var(--muted); font-weight: 800; }
.fraction-input small { color: var(--muted); font-size: .72rem; line-height: 1.35; }
.support-period-note { margin: 14px 0 0; padding: 9px 11px; border-radius: 5px; background: var(--red-soft); color: var(--red); font-size: .75rem; font-weight: 650; }
.tooltip-wrap { position: relative; display: inline-flex !important; flex: 0 0 auto; margin-left: 6px; vertical-align: middle; color: inherit !important; font-weight: 400 !important; }
.tooltip-trigger { display: inline-grid; place-items: center; width: 26px; min-width: 26px; height: 26px; min-height: 26px; padding: 0; border: 1px solid #8aa29f; border-radius: 50%; background: white; color: var(--teal-dark); cursor: help; font-size: .68rem; font-weight: 800; line-height: 1; }
.tooltip-trigger:hover, .tooltip-trigger:focus-visible { border-color: var(--teal); background: var(--teal-soft); }
.tooltip-content { position: fixed; z-index: 1000; left: 18px; top: 18px; width: min(370px, calc(100vw - 36px)); max-height: calc(100vh - 36px); padding: 12px 14px; border-radius: 9px; background: #17183d; color: white !important; box-shadow: 0 9px 26px rgba(18,14,60,.28); opacity: 0; visibility: hidden; transform: translateY(4px); pointer-events: none; overflow-wrap: anywhere; font-size: .75rem !important; font-weight: 500 !important; line-height: 1.5; text-align: left; transition: opacity .12s, transform .12s; }
.tooltip-content::after { content: ""; position: absolute; top: 100%; left: var(--tooltip-arrow, 50%); border: 6px solid transparent; border-top-color: #17183d; transform: translateX(-50%); }
.tooltip-wrap:hover .tooltip-content, .tooltip-wrap:focus-within .tooltip-content, .tooltip-wrap.open .tooltip-content { opacity: 1; visibility: visible; transform: none; }
.tooltip-wrap.tooltip-below .tooltip-content::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #17183d; }
.segmented label { position: relative; }
.segmented .tooltip-wrap { position: relative; justify-self: end; margin: 0; }
.segmented .tooltip-trigger { width: 24px; min-width: 24px; height: 24px; min-height: 24px; font-size: .58rem; }
.court-adjustment-panel { border-color: #c9c1f4; background: #faf9ff; }
.court-adjustment-panel.tort-case { border-color: #dfb3b5; background: #fff7f7; }
.court-adjustment-panel.tort-case .special-case-heading > span { background: var(--red-soft); color: var(--red); }
#court-tort-values { margin-top: 14px; }

.income-row { display: grid; grid-template-columns: minmax(210px, .75fr) minmax(340px, 1.25fr); gap: 22px; align-items: start; }
.amount-input { position: relative; }
.amount-input input { padding-right: 34px; border-radius: 9px; font-variant-numeric: tabular-nums; }
.amount-input > span { position: absolute; top: 50%; right: 12px; z-index: 1; color: #77798d; font-size: .75rem; font-weight: 650; line-height: 1; transform: translateY(-50%); pointer-events: none; }
fieldset { margin: 0; padding: 0; border: 0; }
.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; min-height: 46px; padding: 3px; border: 1px solid #b9c7c6; border-radius: 9px; background: #f4f6f5; }
.segmented label { display: grid; grid-template-columns: minmax(0, 1fr) 26px; align-items: center; min-width: 0; min-height: 38px; margin: 0; padding: 2px 4px 2px 10px; border: 1px solid transparent; border-radius: 6px; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s, color .15s; }
.segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.segmented .segmented-label { display: block; min-width: 0; padding-left: 20px; text-align: center; color: inherit; font-size: .79rem; line-height: 1.25; }
.segmented label:hover { border-color: #d6d4e6; background: rgba(255,255,255,.68); color: var(--navy); }
.segmented label:has(input:checked) { border-color: #dcd9ef; background: white; color: var(--teal-dark); box-shadow: 0 2px 7px rgba(20,35,38,.12); font-weight: 700; }
.segmented label:has(input:focus-visible) { outline: 3px solid rgba(108,76,255,.27); outline-offset: 1px; }
.info-text { display: flex; gap: 9px; margin: 13px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.info-text span { flex: 0 0 auto; display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid #8ba3a1; border-radius: 50%; color: var(--teal); font-weight: 700; }
.income-details { margin-top: 14px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfc; }
.income-details summary { padding: 14px 16px; color: var(--navy); cursor: pointer; font-size: .82rem; font-weight: 750; }
.income-details[open] summary { border-bottom: 1px solid var(--line); }
.income-details-body { padding: 17px 16px; }
.income-component-grid, .deduction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
.deduction-profile-heading, .deduction-values-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 15px; }
.deduction-profile-heading strong, .deduction-values-heading strong { font-size: .84rem; }
.deduction-profile-heading p, .deduction-values-heading p { margin: 3px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.deduction-profile-heading > span { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-size: .66rem; font-weight: 750; }
.deduction-profile-heading > span.special { background: var(--amber-soft); color: var(--amber); }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.profile-checks { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 8px 0 4px; }
.profile-checks .check-row { margin: 8px 0; }
.rate-input { display: flex; align-items: stretch; }
.rate-input input { border-radius: 6px 0 0 6px; }
.rate-input span { display: grid; place-items: center; padding: 0 14px; border: 1px solid #b9c7c6; border-left: 0; border-radius: 0 6px 6px 0; background: #edf1f0; color: var(--muted); font-size: .78rem; font-weight: 700; }
.payroll-special-details { margin: 12px 0 18px; border: 1px solid #dce4e3; border-radius: 6px; background: white; }
.payroll-special-details summary { padding: 11px 13px; border: 0 !important; color: var(--muted); font-size: .74rem; }
.payroll-special-body { padding: 14px 13px; border-top: 1px solid #e7eceb; }
.deduction-values-heading { margin: 21px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.field-muted { opacity: .58; }
input:disabled, select:disabled { cursor: not-allowed; background: #edf1f0; color: #73817f; }
.income-component-grid small, .deduction-grid small { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.compact-amount { max-width: 330px; }
.income-sources-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin: 20px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.income-sources-heading strong { font-size: .84rem; }
.income-sources-heading p { margin: 3px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.compact-empty { padding: 13px 15px; }
.combination-order { margin-top: 15px; padding: 16px; border: 1px solid #c9c1f4; border-radius: 9px; background: #faf9ff; }
.combination-total { align-self: end; min-height: 44px; padding: 7px 11px; border-radius: 6px; background: var(--teal-soft); }
.combination-total span, .combination-total strong { display: block; }
.combination-total span { color: var(--muted); font-size: .68rem; }
.combination-total strong { margin-top: 2px; color: var(--teal-dark); font-size: .9rem; font-variant-numeric: tabular-nums; }
.settlement-mode-field { max-width: 620px; margin-bottom: 18px; }
.period-settlement-panel { border: 1px solid #cbd9e1; background: #f7fafc; border-radius: 12px; padding: 18px; }
.wide-dialog { width: min(920px, calc(100vw - 28px)); }
.settlement-derived { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 16px 0; padding: 13px 15px; border-radius: 9px; background: var(--teal-soft); color: var(--navy); }
.settlement-derived strong { font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.income-source-table td:nth-child(3) { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.standalone-check { align-self: end; min-height: 44px; margin: 0; padding: 9px 0; }
.net-bridge { margin-top: 18px; overflow: hidden; border: 1px solid #c9c1f4; border-radius: 10px; background: white; }
.net-bridge > div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 14px; border-top: 1px solid #edf1f0; font-size: .78rem; }
.net-bridge > div:first-child { border-top: 0; }
.net-bridge span { color: var(--muted); }
.net-bridge strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.net-bridge .subtract strong { color: var(--red); }
.net-bridge .add strong { color: var(--teal); }
.net-bridge .net-total { align-items: center; padding: 15px 14px; background: var(--teal-soft); }
.net-bridge .net-total span { color: var(--teal-dark); font-weight: 750; }
.net-bridge .net-total strong { color: var(--teal-dark); font-size: 1.15rem; }

.button, .icon-button { border: 0; cursor: pointer; font-weight: 700; }
.button { min-height: 39px; padding: 8px 13px; border-radius: 6px; }
.button-secondary { border: 1px solid #9ab1af; background: white; color: var(--teal-dark); }
.button-secondary:hover { background: var(--teal-soft); }
.button-primary { background: var(--teal); color: white; }
.button-primary:hover { background: var(--teal-dark); }
.button-quiet { background: transparent; color: var(--muted); }
.button-quiet:hover { background: #edf1f0; color: var(--ink); }
.empty-overview { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px dashed #bdccca; border-radius: 7px; background: #fafcfb; }
.empty-overview-icon { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #e7eeed; color: var(--muted); font-weight: 750; }
.empty-overview strong { font-size: .84rem; }
.empty-overview p { margin: 3px 0 0; color: var(--muted); font-size: .76rem; }
.dependent-table-wrap { max-width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.dependent-table { width: 100%; max-width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }
.dependent-table th { padding: 10px 12px; background: #edf2f1; color: var(--muted); font-size: .67rem; letter-spacing: .04em; text-transform: uppercase; overflow-wrap: anywhere; }
.dependent-table td { padding: 13px 12px; border-top: 1px solid var(--line); color: #34484b; font-size: .78rem; vertical-align: middle; }
.dependent-table tbody tr:first-child td { border-top: 0; }
.dependent-table tbody tr:hover { background: #fafcfc; }
.person-cell strong, .person-cell span { display: block; }
.person-cell strong { color: var(--ink); font-size: .82rem; }
.person-cell span { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.dependent-status { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 7px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-size: .67rem; font-weight: 750; overflow-wrap: anywhere; }
.dependent-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dependent-status[data-status="review"] { background: var(--amber-soft); color: var(--amber); }
.dependent-status[data-status="excluded"] { background: #edf1f0; color: var(--muted); }
.dependent-status[data-status="special"] { background: var(--red-soft); color: var(--red); }
.dependent-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.table-action { min-height: 32px; padding: 5px 8px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--teal-dark); cursor: pointer; font-size: .71rem; font-weight: 700; }
.table-action:hover { border-color: #b7c9c7; background: var(--teal-soft); }
.table-action.delete { color: var(--red); }
.table-action.delete:hover, .table-action.confirm-delete { border-color: #e4b7b9; background: var(--red-soft); }
.table-action.confirm-delete { color: var(--red); }
.dependent-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 11px; color: var(--ink); box-shadow: 0 28px 80px rgba(10,30,32,.3); }
.dependent-dialog::backdrop { background: rgba(10, 28, 31, .62); backdrop-filter: blur(2px); }
.dependent-dialog[open] { animation: dialog-in .14s ease-out; }
.dialog-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 23px 25px 19px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 4px 0 0; font-size: 1.1rem; }
.dialog-close { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #edf1f0; color: var(--muted); cursor: pointer; font-size: 1.35rem; line-height: 1; }
.dialog-close:hover { background: #dfe7e6; color: var(--ink); }
.dialog-body { max-height: calc(100vh - 190px); padding: 22px 25px; overflow-y: auto; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 25px; border-top: 1px solid var(--line); background: #f8faf9; }
.check-row { display: flex; gap: 10px; align-items: center; margin: 14px 0; font-size: .82rem; font-weight: 600; }
.check-row input { width: 18px; min-height: 18px; accent-color: var(--teal); }
.certificate-entry-toggle { margin-top: 18px; padding: 14px 15px; border: 1px solid #c9c1f4; border-radius: 9px; background: linear-gradient(135deg, #f5f2ff, #ecfbfb); color: var(--teal-dark); font-weight: 750; }
.certificate-entry-toggle:hover { border-color: var(--teal); }
.partial-note, .dependent-income { margin-top: 12px; padding: 14px; background: var(--amber-soft); border-radius: 6px; }
.note-field { margin-top: 14px; }

.result-column { position: sticky; top: 58px; display: grid; grid-column: 1; gap: 14px; max-height: calc(100vh - 70px); padding-right: 4px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.result-panel { overflow: hidden; border-color: #beb3f4; box-shadow: 0 22px 58px rgba(58,40,152,.16); }
.result-kicker { padding: 22px 24px 0; }
.result-placeholder { padding: 35px 28px 45px; text-align: center; }
.placeholder-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 16px; border: 1px solid rgba(108,76,255,.14); border-radius: 16px; background: linear-gradient(145deg, #f3f0ff, #e4fafa); color: var(--teal); box-shadow: 0 8px 22px rgba(108,76,255,.13); font-size: 1.5rem; }
.result-placeholder h2, .blocked-result h2 { margin: 0 0 7px; font-size: 1rem; }
.result-placeholder p, .blocked-result p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.primary-result { margin-top: 16px; padding: 26px 24px 24px; background: linear-gradient(125deg, #6547e8 0%, #5342d5 53%, #087f96 120%); color: white; }
.primary-result span, .primary-result strong, .primary-result small, .protected-result span, .protected-result strong { display: block; }
.primary-result span, .protected-result span { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.primary-result strong { margin: 7px 0 2px; font-size: clamp(2rem, 4vw, 2.8rem); font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.primary-result small { color: #d9dbfa; }
.protected-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 19px 24px; border-bottom: 1px solid var(--line); }
.protected-result span { max-width: 190px; color: var(--muted); line-height: 1.4; }
.protected-result strong { color: var(--navy); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.result-facts { margin: 0; padding: 13px 24px 18px; }
.result-facts div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; border-bottom: 1px solid #edf1f0; font-size: .79rem; }
.result-facts div:last-child { border: 0; }
.result-facts dt { color: var(--muted); }
.result-facts dd { margin: 0; text-align: right; font-weight: 650; }
.blocked-result { display: flex; gap: 13px; padding: 28px 24px 34px; }
.blocked-result > span { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--amber-soft); color: var(--amber); font-weight: 800; }

.warnings-panel { padding: 19px 21px; }
.warnings-panel h2 { margin: 0 0 12px; font-size: .88rem; }
.warning-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 11px 0; border-top: 1px solid #edf1f0; }
.warning-item:first-child { border-top: 0; }
.warning-level { align-self: start; justify-self: start; max-width: 100%; padding: 3px 6px; border-radius: 4px; background: var(--teal-soft); color: var(--teal-dark); font-size: .59rem; font-weight: 800; letter-spacing: .04em; }
.warning-item[data-level="NOTICE"] .warning-level, .warning-item[data-level="REVIEW"] .warning-level { background: var(--amber-soft); color: var(--amber); }
.warning-item[data-level="SPECIAL"] .warning-level, .warning-item[data-level="ERROR"] .warning-level { background: var(--red-soft); color: var(--red); }
.warning-item p { margin: 0; color: #44575a; font-size: .76rem; line-height: 1.45; }
.warning-copy { min-width: 0; width: 100%; overflow-wrap: anywhere; }
.warning-target-link { display: inline-flex; margin-top: 6px; color: var(--teal-dark); font-size: .7rem; font-weight: 750; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.warning-target-link:hover, .warning-target-link:focus-visible { color: #4e35c7; }
.warning-target-highlight { animation: warning-target-pulse 1.8s ease-out; }
@keyframes warning-target-pulse {
  0%, 28% { outline: 4px solid rgba(255,122,77,.38); outline-offset: 3px; }
  100% { outline: 0 solid transparent; outline-offset: 7px; }
}
.details-panel { overflow: hidden; }
.details-panel summary { padding: 17px 20px; color: var(--teal-dark); cursor: pointer; font-size: .82rem; font-weight: 700; }
.details-list { margin: 0; padding: 0 20px 18px; }
.details-list div { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 12px; padding: 7px 0; font-size: .75rem; border-top: 1px solid #edf1f0; }
.details-list dt, .details-list dd { min-width: 0; hyphens: auto; overflow-wrap: break-word; word-break: normal; }
.details-list dt { color: var(--muted); }
.details-list dd { margin: 0; font-weight: 600; }
.details-list .detail-row-wide { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 9px 0; }

.message { margin-bottom: 18px; padding: 14px 16px; border-radius: 7px; }
.message-error { border: 1px solid #e5aeb0; background: var(--red-soft); color: var(--red); }
.legal-disclaimer { margin-top: 28px; padding: 20px 22px; border: 1px solid #d7e0df; border-left: 4px solid #7b9391; border-radius: 12px; background: rgba(233,238,237,.88); }
.legal-disclaimer strong { font-size: .82rem; }
.legal-disclaimer p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }
footer { max-width: 1240px; margin: 0 auto; padding: 20px 28px 36px; display: flex; justify-content: space-between; color: var(--muted); font-size: .74rem; }
.footer-navigation { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 14px; }
.footer-navigation button, .footer-navigation a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 2px; }
.footer-navigation button { border: 0; background: transparent; color: var(--teal-dark); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-navigation button:hover, .footer-navigation button:focus-visible { color: var(--ink); }

.module-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; width: 100%; margin: 0 0 22px; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-soft); }
.module-switch button { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 62px; padding: 10px 14px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; text-align: left; }
.module-switch button > .ui-icon { flex: 0 0 auto; width: 25px; height: 25px; color: var(--teal); }
.module-switch button strong, .module-switch button small { display: block; }
.module-switch button strong { color: var(--ink); font-size: .82rem; }
.module-switch button small { margin-top: 2px; color: var(--muted); font-size: .68rem; line-height: 1.25; }
.module-switch button:hover { border-color: #c8d9d7; background: #f7fbfa; }
.module-switch button.active { border-color: #7658ff; background: linear-gradient(120deg, #6547e8 0%, #5144dc 55%, #087f96 135%); color: white; box-shadow: 0 10px 26px rgba(85,60,211,.28); }
.module-switch button.active .ui-icon, .module-switch button.active strong { color: white; }
.module-switch button.active small { color: #cce8e5; }
.application-mode { display: grid; grid-template-columns: minmax(190px, .72fr) minmax(360px, 1.28fr); align-items: center; gap: 10px 18px; margin: -10px 0 22px; padding: 14px; border: 1px solid #d4d0f5; border-radius: 14px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-soft); }
.application-mode-heading { display: flex; align-items: center; gap: 11px; min-width: 0; }
.application-mode-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(145deg, #6547e8, #087f96); color: white; font-size: .8rem; font-weight: 850; box-shadow: 0 7px 18px rgba(85,60,211,.22); }
.application-mode-heading strong, .application-mode-heading span { display: block; }
.application-mode-heading strong { font-size: .84rem; }
.application-mode-heading div > span { margin-top: 2px; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.application-mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 4px; border: 1px solid #dedcf0; border-radius: 11px; background: #f5f4fb; }
.application-mode-options button { min-width: 0; min-height: 52px; padding: 8px 11px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.application-mode-options strong, .application-mode-options small { display: block; }
.application-mode-options strong { color: var(--ink); font-size: .78rem; line-height: 1.25; }
.application-mode-options small { margin-top: 3px; color: inherit; font-size: .64rem; line-height: 1.3; }
.application-mode-options button:hover { border-color: #c8c3ee; background: white; }
.application-mode-options button.active { border-color: #6547e8; background: linear-gradient(120deg, #6547e8, #5144dc 60%, #087f96 135%); color: #dffcf9; box-shadow: 0 7px 18px rgba(85,60,211,.22); }
.application-mode-options button.active strong { color: white; }
.application-mode-status { grid-column: 1 / -1; margin: 0; padding-top: 8px; border-top: 1px solid #ebe9f5; color: var(--teal-dark); font-size: .7rem; font-weight: 700; }
.page-shell:not(.expert-mode) [data-expert-only] { display: none !important; }
.page-shell.expert-mode [data-standard-only] { display: none !important; }
.standard-mode-summary { align-self: stretch; min-height: 76px; padding: 11px 13px; border: 1px solid #c9c3ef; border-radius: 9px; background: linear-gradient(125deg, #f5f2ff, #eefafa); }
.standard-mode-summary span, .standard-mode-summary strong, .standard-mode-summary small { display: block; }
.standard-mode-summary span { color: var(--teal-dark); font-size: .65rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.standard-mode-summary strong { margin-top: 3px; font-size: .84rem; }
.standard-mode-summary small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.data-update-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px 13px; margin: -10px 0 22px; padding: 12px 14px; border: 1px solid #cfe3e2; border-radius: 11px; background: linear-gradient(115deg, rgba(238,251,250,.97), rgba(246,244,255,.97)); box-shadow: 0 8px 24px rgba(8,127,150,.07); }
.data-update-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(145deg, #08a9a8, #6547e8); color: white; font-size: 1.25rem; font-weight: 800; box-shadow: 0 7px 17px rgba(8,127,150,.2); }
.data-update-copy strong, .data-update-copy span { display: block; }
.data-update-copy strong { color: var(--ink); font-size: .84rem; }
.data-update-copy span { margin-top: 2px; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.data-update-toolbar .button { white-space: nowrap; }
.data-update-status { grid-column: 2 / -1; margin: -3px 0 0; color: #416265; font-size: .69rem; line-height: 1.4; }
.data-update-status[data-state="checking"] { color: var(--teal-dark); }
.data-update-status[data-state="available"] { color: var(--amber); font-weight: 750; }
.data-update-status[data-state="notice"] { color: #6c4c0b; }
.data-update-status[data-state="error"] { color: var(--red); }
.example-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: -10px 0 22px; padding: 12px 14px; border: 1px solid #d7d1fa; border-radius: 11px; background: linear-gradient(115deg, rgba(244,241,255,.96), rgba(235,251,250,.96)); box-shadow: 0 8px 24px rgba(85,60,211,.08); }
.example-toolbar-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(145deg, #6c4cff, #078ca0); color: white; font-size: .75rem; font-weight: 850; letter-spacing: -.03em; box-shadow: 0 7px 17px rgba(85,60,211,.22); }
.example-toolbar-copy strong, .example-toolbar-copy span { display: block; }
.example-toolbar-copy strong { color: var(--ink); font-size: .84rem; }
.example-toolbar-copy span { margin-top: 2px; color: var(--muted); font-size: .73rem; line-height: 1.4; }
.example-toolbar .button { white-space: nowrap; }
.example-status { grid-column: 2 / -1; min-height: 0; margin: -4px 0 0; color: var(--teal-dark); font-size: .72rem; font-weight: 700; }
.example-status:empty { display: none; }
.example-intro { margin: 0 0 18px; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.example-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.example-choice { min-width: 0; min-height: 174px; padding: 18px; border: 1px solid #c9d9d7; border-radius: 11px; background: linear-gradient(145deg, #fff, #f5fbfa); color: var(--ink); cursor: pointer; font: inherit; text-align: left; transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
.example-choice.complex { border-color: #cfc6fb; background: linear-gradient(145deg, #fff, #f5f2ff); }
.example-choice.extreme { grid-column: 1 / -1; min-height: 150px; border-color: #ffc3a7; background: linear-gradient(135deg, #fff8f3, #f5f0ff 58%, #eefcfa); }
.example-choice.clear { grid-column: 1 / -1; min-height: 126px; border-color: #9fdad5; background: linear-gradient(135deg, #f1fffd, #f7f5ff); }
.example-choice:hover, .example-choice:focus-visible { transform: translateY(-2px); border-color: var(--teal); box-shadow: 0 13px 28px rgba(25,74,77,.14); outline: none; }
.example-choice-tag { display: inline-flex; margin-bottom: 14px; padding: 4px 8px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-size: .65rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.example-choice.complex .example-choice-tag { background: #ebe6ff; color: #5439c8; }
.example-choice.extreme .example-choice-tag { background: #ffe4d6; color: #a13b16; }
.example-choice.clear .example-choice-tag { background: #d9f7f3; color: #08766f; }
.example-choice strong, .example-choice > span:last-child { display: block; }
.example-choice strong { margin-bottom: 7px; font-size: .94rem; }
.example-choice > span:last-child { color: var(--muted); font-size: .76rem; line-height: 1.5; }
.example-warning { margin: 16px 0 0; padding: 11px 13px; border-radius: 7px; background: var(--amber-soft); color: #684b10; font-size: .75rem; line-height: 1.5; }
.legal-update-dialog { width: min(680px, calc(100vw - 28px)); }
.legal-update-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 16px 0; }
.legal-update-summary > div { padding: 11px 12px; border: 1px solid #e0e4ef; border-radius: 8px; background: #fafbff; }
.legal-update-summary span, .legal-update-summary strong { display: block; }
.legal-update-summary span { color: var(--muted); font-size: .67rem; }
.legal-update-summary strong { margin-top: 3px; font-size: .8rem; overflow-wrap: anywhere; }
.legal-update-changes { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.legal-update-changes li { padding: 10px 12px; border-left: 3px solid var(--aqua); border-radius: 6px; background: #f2fbfa; color: #36585b; font-size: .75rem; line-height: 1.45; }
.legal-update-changes strong, .legal-update-changes span { display: block; }
.legal-update-changes span { margin-top: 3px; color: var(--muted); }
.legal-update-changes a { display: inline-block; margin-top: 5px; font-weight: 700; }
.legal-update-assurance { display: grid; gap: 3px; margin-top: 16px; padding: 12px 13px; border: 1px solid #dec98e; border-radius: 7px; background: #fff9e9; }
.legal-update-assurance strong { color: #6c4c0b; font-size: .76rem; }
.legal-update-assurance span { color: #6a5b3a; font-size: .71rem; line-height: 1.45; }
.layout-toolbar { position: sticky; z-index: 30; top: 8px; display: flex; justify-content: flex-start; margin: -10px 0 14px; pointer-events: none; }
.result-visibility-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 7px 11px; border: 1px solid #c9c1f4; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--teal-dark); box-shadow: 0 8px 22px rgba(44,31,115,.13); backdrop-filter: blur(8px); cursor: pointer; font: inherit; font-size: .74rem; font-weight: 750; pointer-events: auto; }
.result-visibility-toggle:hover { border-color: var(--teal); background: #faf9ff; }
.visibility-switch { position: relative; display: inline-block; flex: 0 0 auto; width: 34px; height: 20px; border-radius: 999px; background: #d4d9df; transition: background .15s ease; }
.visibility-switch span { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(17,25,35,.28); transition: transform .15s ease; }
.result-visibility-toggle[aria-pressed="true"] .visibility-switch { background: linear-gradient(135deg, #6c4cff, #078ca0); }
.result-visibility-toggle[aria-pressed="true"] .visibility-switch span { transform: translateX(14px); }
.page-shell.results-hidden .result-column { display: none; }
.page-shell.results-hidden .workspace { grid-template-columns: minmax(0, 1fr); }
.page-shell.results-hidden .input-column { grid-column: 1; }
.module-intro { margin: 4px 0 20px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.72); }
.module-intro h2 { margin: 4px 0 7px; font-size: clamp(1.35rem, 3vw, 1.8rem); }
.module-intro > p:last-child { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.55; }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.storage-panel { padding: 20px; }
.storage-panel h2 { margin: 0 0 7px; font-size: .95rem; }
.storage-panel > p { color: var(--muted); font-size: .76rem; line-height: 1.5; }
.action-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 10px; }
.full-width { display: flex; width: 100%; justify-content: center; align-items: center; margin-top: 8px; text-align: center; text-decoration: none; }
.danger { color: var(--red); }
.storage-status { min-height: 1.2em; margin: 10px 0 0 !important; }
.paccount-breakdown { margin: 0; padding: 14px 24px 20px; }
.paccount-breakdown div { display: flex; justify-content: space-between; gap: 15px; padding: 8px 0; border-bottom: 1px solid #edf1f0; font-size: .78rem; }
.paccount-breakdown dt { color: var(--muted); }
.paccount-breakdown dd { margin: 0; text-align: right; font-weight: 700; }
.paccount-note { margin: 0; padding: 15px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; line-height: 1.5; }
.paccount-children { margin: 20px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 7px; }
.paccount-children legend { padding: 0 7px; color: var(--navy); font-size: .8rem; font-weight: 750; }
.child-benefit-grid { display: grid; grid-template-columns: minmax(70px,.5fr) minmax(150px,1fr) minmax(170px,1fr); gap: 9px 12px; align-items: center; }
.child-benefit-grid > strong { color: var(--muted); font-size: .67rem; text-transform: uppercase; }
.child-benefit-grid > label { font-size: .78rem; font-weight: 650; }
.subsection-title { margin: 24px 0 13px; font-size: .88rem; }
.form-group-title { margin: 16px 0 9px; color: var(--navy); font-size: .79rem; }

.documentation-hero { margin-bottom: 20px; padding: 32px; border-radius: var(--radius-large); background: linear-gradient(100deg, rgba(8,10,40,.98), rgba(34,24,87,.89) 62%, rgba(23,39,100,.62)), url("images/legal-protection-background-v2.webp") center right / cover no-repeat; color: white; box-shadow: 0 18px 46px rgba(31,22,97,.2); }
.documentation-hero .eyebrow { color: var(--aqua-bright); }
.documentation-hero h2 { margin: 6px 0 9px; font: 800 clamp(1.65rem, 3vw, 2.2rem) Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.025em; }
.documentation-hero p:last-child { max-width: 760px; margin: 0; color: #d5d6ef; line-height: 1.55; }
.documentation-toc { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.documentation-toc a { padding: 7px 10px; border-radius: 5px; background: var(--teal-soft); text-decoration: none; font-size: .76rem; font-weight: 700; }
.documentation-toc a:hover { background: #ddd7ff; }
.documentation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.documentation-card { scroll-margin-top: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 4px 16px rgba(20,35,38,.035); }
.documentation-card-wide { grid-column: 1 / -1; }
.documentation-card h3 { display: inline; margin: 0; font-size: 1.05rem; }
.documentation-card h4 { margin: 0 0 9px; font-size: .86rem; }
.documentation-card p, .documentation-card li, .doc-definitions { color: #45595c; font-size: .8rem; line-height: 1.55; }
.documentation-card ul, .documentation-card ol { margin: 13px 0 0; padding-left: 20px; }
.documentation-card li + li { margin-top: 5px; }
.doc-step { display: inline-grid; place-items: center; width: 27px; height: 27px; margin-right: 8px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-size: .76rem; font-weight: 800; }
.doc-callout { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--amber); background: var(--amber-soft); color: #5e451d; font-size: .77rem; line-height: 1.5; }
.doc-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 17px; }
.doc-definitions { margin: 15px 0 0; }
.doc-definitions div { display: grid; grid-template-columns: minmax(175px, .45fr) minmax(0, 1fr); gap: 14px; padding: 8px 0; border-top: 1px solid #edf1f0; }
.doc-definitions dt { color: var(--navy); font-weight: 750; overflow-wrap: anywhere; }
.doc-definitions dd { margin: 0; }
.documentation-card details { border-top: 1px solid #e5eceb; }
.documentation-card details:first-of-type { margin-top: 16px; }
.documentation-card summary { padding: 12px 0; color: var(--teal-dark); cursor: pointer; font-size: .82rem; font-weight: 700; }
.documentation-card details p { margin: 0 0 13px; }
.legal-page { scroll-margin-top: 20px; }
.legal-page-hero { margin-bottom: 18px; padding: 31px 32px; border-radius: var(--radius-large); background: linear-gradient(105deg, rgba(8,10,40,.98), rgba(52,30,117,.9) 62%, rgba(8,127,150,.7)), url("images/legal-protection-background-v2.webp") center right / cover no-repeat; color: white; box-shadow: 0 18px 46px rgba(31,22,97,.2); }
.legal-home-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; background: rgba(255,255,255,.11); color: white; font-size: .78rem; font-weight: 750; text-decoration: none; backdrop-filter: blur(5px); transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.legal-home-link:hover { border-color: rgba(255,255,255,.72); background: rgba(255,255,255,.2); transform: translateX(-2px); }
.legal-home-link:focus-visible { outline: 3px solid var(--aqua-bright); outline-offset: 3px; }
.legal-home-link span { font-size: 1rem; line-height: 1; }
.legal-page-hero .eyebrow { color: var(--aqua-bright); }
.legal-page-hero h2 { margin: 6px 0 9px; font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -.025em; }
.legal-page-hero p:last-child { max-width: 800px; margin: 0; color: #d5d6ef; line-height: 1.55; }
.legal-completion-warning { margin-bottom: 16px; padding: 14px 16px; border: 1px solid #e2b65f; border-left: 5px solid #b66c0b; border-radius: 10px; background: #fff4d8; color: #5b3d0b; font-size: .8rem; line-height: 1.55; box-shadow: 0 7px 20px rgba(105,67,10,.08); }
.legal-page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.legal-card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 5px 18px rgba(20,35,38,.045); overflow-wrap: anywhere; }
.legal-card-wide { grid-column: 1 / -1; }
.legal-card h3 { margin: 0 0 11px; color: var(--navy); font-size: 1rem; }
.legal-card h3:not(:first-child) { margin-top: 21px; }
.legal-card p, .legal-card li, .legal-card address, .legal-facts { color: #45595c; font-size: .8rem; line-height: 1.62; }
.legal-card p { margin: 0 0 13px; }
.legal-card p:last-child { margin-bottom: 0; }
.legal-address { margin: 0 0 16px; font-style: normal; }
.legal-placeholder { padding: 1px 4px; border-radius: 3px; background: #fff0bd; color: #704708 !important; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.legal-source-note { padding: 13px 15px; border-left: 3px solid var(--aqua); border-radius: 5px; background: #effafa; color: #36585b; font-size: .77rem; line-height: 1.55; }
.legal-facts { margin: 15px 0 0; }
.legal-facts div { display: grid; grid-template-columns: minmax(170px, .35fr) minmax(0, 1fr); gap: 15px; padding: 10px 0; border-top: 1px solid #edf1f0; }
.legal-facts dt { color: var(--navy); font-weight: 750; }
.legal-facts dd { margin: 0; }
.legal-card code { padding: 2px 5px; border-radius: 4px; background: #efedff; color: var(--teal-dark); font-size: .75rem; overflow-wrap: anywhere; }
.method-card > p, .legal-sources-card > p { max-width: 980px; }
.method-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.method-step { position: relative; padding: 15px 14px; border: 1px solid #dfe6ff; border-radius: 9px; background: linear-gradient(145deg, #fbfbff, #f1faff); }
.method-step > span { display: grid; place-items: center; width: 25px; height: 25px; margin-bottom: 10px; border-radius: 7px; background: linear-gradient(135deg, var(--teal-dark), var(--aqua)); color: white; font-size: .72rem; font-weight: 800; }
.method-step h4 { color: var(--navy); line-height: 1.35; }
.method-step p { margin: 0; font-size: .74rem; }
.method-equation { margin: 20px 0; padding: 15px 18px; border: 1px solid #d9d5ff; border-radius: 10px; background: #f9f8ff; }
.method-equation > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 8px 0; color: #394e52; font-size: .78rem; }
.method-equation > div + div { border-top: 1px solid #e7e4f7; }
.method-equation strong { color: var(--teal-dark); text-align: right; overflow-wrap: anywhere; }
.method-equation .method-equation-result { margin-top: 3px; border-top: 2px solid var(--teal); color: var(--navy); font-weight: 800; }
.compact-equation { margin-top: 18px; }
.method-notes p { margin: 0; }
.method-notes > div { padding: 16px; border-radius: 9px; background: var(--teal-soft); }
.legal-source-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 20px; }
.legal-source-list { display: grid; gap: 8px; margin: 0 !important; padding: 0 !important; list-style: none; }
.legal-source-list li { margin: 0 !important; }
.legal-source-list a { display: block; min-height: 100%; padding: 12px 13px; border: 1px solid #e3e6ee; border-radius: 8px; background: #fcfdff; text-decoration: none; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.legal-source-list a:hover { border-color: var(--teal); transform: translateY(-1px); box-shadow: 0 5px 14px rgba(28,41,71,.08); }
.legal-source-list strong, .legal-source-list span { display: block; }
.legal-source-list strong { color: var(--teal-dark); font-size: .78rem; line-height: 1.4; }
.legal-source-list span { margin-top: 3px; color: #607174; font-size: .7rem; line-height: 1.4; }

@media (max-width: 920px) {
  .intro { min-height: 230px; padding: 30px; background-position: 58% center; }
  .intro-copy { max-width: 680px; }
  .intro h1 { display: block; white-space: normal; }
  .intro h1 span { display: block; }
  .workspace { grid-template-columns: 1fr; }
  .input-column, .result-column { grid-column: 1; }
  .result-column { position: static; grid-row: auto; max-height: none; padding-right: 0; overflow: visible; scrollbar-gutter: auto; }
  .result-panel { display: grid; grid-template-columns: 1fr; }
  .documentation-grid { grid-template-columns: 1fr; }
  .method-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-source-groups { grid-template-columns: 1fr; }
  .application-mode { grid-template-columns: 1fr; }
  .application-mode-status { grid-column: 1; }
  .documentation-card-wide { grid-column: auto; }
  .dependent-table-wrap { overflow: visible; border: 0; }
  .dependent-table, .dependent-table tbody, .dependent-table tr, .dependent-table td { display: block; width: 100%; }
  .dependent-table thead { display: none; }
  .dependent-table tbody { display: grid; gap: 10px; }
  .dependent-table tr { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: white; }
  .dependent-table td { display: flex; justify-content: space-between; gap: 15px; padding: 6px 0; border: 0; text-align: right; overflow-wrap: anywhere; }
  .dependent-table td::before { content: attr(data-label); flex: 0 1 44%; color: var(--muted); font-size: .68rem; font-weight: 700; text-align: left; text-transform: uppercase; }
  .dependent-table .person-cell { text-align: left; }
  .dependent-table .person-cell::before, .dependent-table .dependent-actions-cell::before { display: none; }
  .dependent-actions-cell { padding-top: 10px !important; border-top: 1px solid #edf1f0 !important; }
  .dependent-actions { width: 100%; justify-content: flex-end; }
}
@media (max-width: 650px) {
  .header-inner { min-height: 68px; padding: 10px 18px; }
  .header-inner, .page-shell { padding-left: 18px; padding-right: 18px; }
  .page-shell { padding-top: 26px; padding-bottom: 34px; }
  .privacy-note, .scope-badge { display: none; }
  .brand-mark { width: 36px; height: 36px; font-size: 21px; }
  .brand strong { font-size: .96rem; }
  .brand small { font-size: .69rem; }
  .intro { display: block; min-height: 0; margin-bottom: 18px; padding: 25px 20px; background: linear-gradient(90deg, rgba(7,9,37,.98), rgba(14,15,66,.82)), url("images/legal-protection-background-v2.webp") center right / cover no-repeat; }
  .intro h1 { font-size: clamp(1.75rem, 9vw, 2.25rem); }
  .hero-highlights { display: grid; grid-template-columns: 1fr; gap: 7px; margin-top: 18px; }
  .hero-highlights li { min-width: 0; }
  .section-block { padding: 20px 17px; }
  .special-case-panel, .combination-order, .period-settlement-panel { padding: 14px; }
  .two-columns, .income-row { grid-template-columns: 1fr; }
  .three-columns { grid-template-columns: 1fr; }
  .child-benefit-grid { grid-template-columns: 1fr; }
  .child-benefit-grid > strong { display: none; }
  .child-benefit-grid > label:not(:first-of-type) { margin-top: 10px; }
  .module-switch { display: grid; grid-template-columns: 1fr; width: 100%; }
  .module-switch button { width: 100%; min-height: 44px; }
  .application-mode { margin-top: -10px; padding: 12px; }
  .application-mode-options { grid-template-columns: 1fr; }
  .application-mode-options button { min-height: 48px; }
  .data-update-toolbar { grid-template-columns: auto minmax(0, 1fr); }
  .data-update-toolbar .button { grid-column: 1 / -1; width: 100%; }
  .data-update-status { grid-column: 1 / -1; }
  .example-toolbar { grid-template-columns: auto minmax(0, 1fr); margin-top: -10px; }
  .example-toolbar .button { grid-column: 1 / -1; width: 100%; }
  .example-status { grid-column: 1 / -1; }
  .example-choice-grid { grid-template-columns: 1fr; }
  .example-choice { min-height: 0; }
  .layout-toolbar { margin-top: -8px; }
  .result-visibility-toggle { width: 100%; justify-content: center; min-height: 44px; }
  .module-intro { padding: 19px 17px; }
  .documentation-grid, .doc-columns, .method-flow, .legal-source-groups { grid-template-columns: 1fr; }
  .legal-page-grid { grid-template-columns: 1fr; }
  .legal-card-wide { grid-column: auto; }
  .legal-page-hero { padding: 24px 20px; }
  .legal-card { padding: 20px 17px; }
  .legal-facts div { grid-template-columns: 1fr; gap: 4px; }
  .documentation-card-wide { grid-column: auto; }
  .documentation-hero { padding: 22px 19px; }
  .documentation-card { padding: 20px 17px; }
  .legal-update-summary { grid-template-columns: 1fr; }
  .documentation-toc { gap: 6px; padding: 11px; }
  .documentation-toc a { flex: 1 1 calc(50% - 6px); text-align: center; }
  .doc-definitions div { grid-template-columns: 1fr; gap: 3px; }
  .method-equation > div { grid-template-columns: 1fr; gap: 3px; }
  .method-equation strong { text-align: left; }
  .tooltip-trigger { width: 24px; min-width: 24px; height: 24px; min-height: 24px; }
  .segmented .tooltip-trigger { width: 24px; min-width: 24px; height: 24px; min-height: 24px; }
  .income-component-grid, .deduction-grid, .profile-grid { grid-template-columns: 1fr; }
  .deduction-profile-heading { flex-direction: column; }
  .income-sources-heading { flex-direction: column; }
  .net-bridge > div { align-items: flex-start; flex-direction: column; gap: 3px; }
  .section-heading.with-action { grid-template-columns: 34px 1fr; }
  .section-heading.with-action .button { grid-column: 2; justify-self: start; }
  .dependent-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  .dialog-header, .dialog-body, .dialog-actions { padding-left: 17px; padding-right: 17px; }
  .dialog-body { max-height: calc(100vh - 176px); }
  .segmented .segmented-label { font-size: .73rem; }
  .protected-result { align-items: flex-start; flex-direction: column; }
  .primary-result strong { font-size: clamp(1.75rem, 10vw, 2.35rem); overflow-wrap: anywhere; }
  .result-facts div, .paccount-breakdown div { align-items: flex-start; flex-direction: column; gap: 4px; }
  .result-facts dd, .paccount-breakdown dd { text-align: left; }
  .details-list div { grid-template-columns: 1fr; gap: 4px; }
  .details-list dd { padding-bottom: 3px; }
  .settlement-derived { align-items: flex-start; flex-direction: column; gap: 5px; }
  .empty-overview { align-items: flex-start; }
  .fraction-input { align-items: flex-start; flex-wrap: wrap; }
  .fraction-input small { flex-basis: 100%; }
  .action-row { display: grid; grid-template-columns: 1fr; }
  .action-row .button { width: 100%; min-height: 44px; }
  .dialog-actions { flex-wrap: wrap; }
  footer { align-items: flex-start; flex-direction: column; gap: 8px; padding-left: 18px; padding-right: 18px; }
  .footer-navigation { justify-content: flex-start; }
  .scroll-up-control { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .scroll-up-button, .scroll-down-button { width: 48px; height: 48px; }
  .scroll-up-status { right: 57px; bottom: 5px; }
}

@media (max-width: 420px) {
  .header-inner, .page-shell { padding-left: 12px; padding-right: 12px; }
  .page-shell { padding-top: 20px; }
  .intro h1 { font-size: 1.72rem; }
  .hero-highlights small { font-size: .67rem; }
  .section-block { padding: 17px 13px; border-radius: 8px; }
  .section-heading { grid-template-columns: 28px 1fr; gap: 9px; }
  .section-heading.with-action { grid-template-columns: 28px 1fr; }
  .step-number { width: 27px; height: 27px; }
  .special-case-heading { grid-template-columns: 1fr; }
  .segmented { grid-template-columns: 1fr; gap: 3px; }
  .segmented label { min-height: 44px; }
  .segmented .segmented-label { padding-left: 22px; }
  .check-row { align-items: flex-start; }
  .check-row input { flex: 0 0 20px; width: 20px; min-height: 20px; }
  .rate-input span { padding: 0 9px; }
  .paccount-children { padding: 12px; }
  .documentation-toc a { flex-basis: 100%; }
  .documentation-hero h2 { font-size: 1.55rem; }
  .legal-page-hero h2 { font-size: 1.55rem; }
  .dialog-header { gap: 12px; }
  .dialog-actions { display: grid; grid-template-columns: 1fr; }
  .dialog-actions .button { width: 100%; min-height: 44px; }
  .dependent-dialog { width: calc(100vw - 12px); max-height: calc(100vh - 12px); }
  .dialog-body { padding: 17px 13px; }
  .dialog-header, .dialog-actions { padding-left: 13px; padding-right: 13px; }
}

@supports (height: 100dvh) {
  .dependent-dialog { max-height: calc(100dvh - 20px); }
  .dialog-body { max-height: calc(100dvh - 176px); }
}

@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }

@keyframes scroll-arrow-step { 0% { transform: translateY(-1px); } 38% { transform: translateY(-11px); opacity: .35; } 42% { transform: translateY(9px); opacity: 0; } 100% { transform: translateY(-1px); opacity: 1; } }
@keyframes scroll-arrow-top { 0% { transform: translateY(-1px); } 24%, 58% { transform: translateY(-10px); opacity: .45; } 26%, 60% { transform: translateY(8px); opacity: .1; } 100% { transform: translateY(-1px); opacity: 1; } }
@keyframes scroll-arrow-step-down { 0% { transform: translateY(-1px); } 38% { transform: translateY(10px); opacity: .35; } 42% { transform: translateY(-10px); opacity: 0; } 100% { transform: translateY(-1px); opacity: 1; } }
@keyframes scroll-arrow-bottom { 0% { transform: translateY(-1px); } 24%, 58% { transform: translateY(10px); opacity: .45; } 26%, 60% { transform: translateY(-8px); opacity: .1; } 100% { transform: translateY(-1px); opacity: 1; } }
@keyframes scroll-button-ring { 0% { opacity: .8; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.45); } }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .scroll-up-button .scroll-up-arrow, .scroll-down-button .scroll-down-arrow, .scroll-up-button::before, .scroll-down-button::before { animation: none !important; }
}

@media (forced-colors: active) {
  button, a, input, select, textarea, summary { forced-color-adjust: auto; }
  .module-switch button.active, .button-primary, .scroll-up-button, .scroll-down-button { border: 2px solid ButtonText; }
  :focus-visible { outline: 3px solid Highlight !important; outline-offset: 3px; }
}
