:root {
  --ink: #152443;
  --muted: #65718a;
  --navy: #1d3f91;
  --navy-deep: #10285f;
  --blue: #1963b5;
  --sky: #e9f4fa;
  --red: #df3c3d;
  --red-deep: #bc292f;
  --paper: #ffffff;
  --canvas: #f5f7fb;
  --line: #d9e0eb;
  --success: #1d7c5c;
  --warning-bg: #fff8e9;
  --warning-line: #e8bf69;
  --radius: 18px;
  --shadow: 0 14px 36px rgba(23, 42, 75, 0.09);
  font-family: Inter, "Aptos", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

#formulaire, .results { scroll-margin-top: 102px; }

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 80% -10%, #e8f2fb 0, transparent 34rem), var(--canvas);
  font-size: 16px;
  line-height: 1.5;
}

button, input, select { font: inherit; }

button { cursor: pointer; }

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  background: var(--navy);
}

.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 15;
  color: #fff;
  background: linear-gradient(117deg, var(--navy-deep), var(--navy) 62%, #255bb2);
  box-shadow: 0 2px 10px rgba(13, 30, 71, .2);
}

.header-content, .footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.header-content { min-height: 86px; }

.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }

.brand-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
}
.brand-logo img { display: block; width: 100%; height: 100%; object-fit: contain; transform: scale(1.23); }

.brand h1, .brand p { margin: 0; }
.brand h1 { font-size: 1.35rem; line-height: 1.15; font-weight: 760; letter-spacing: -.02em; }
.eyebrow { margin: 0 0 5px; color: inherit; font-size: .72rem; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow-blue { color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.version-chip, .caa-chip {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;
}
.version-chip { color: #e5efff; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.11); }

.button {
  min-height: 44px;
  padding: 10px 17px;
  border: 0;
  border-radius: 11px;
  font-weight: 750;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(25, 99, 181, .36);
  outline-offset: 2px;
}
.button-primary { color: white; background: var(--red); box-shadow: 0 8px 20px rgba(223,60,61,.23); }
.button-primary:hover { background: var(--red-deep); }
.button-secondary { color: var(--navy); border: 1px solid #b9cde3; background: #f7fbff; }
.button-secondary:hover { background: #eaf3fb; }
.button-quiet { min-height: 36px; padding: 6px 11px; color: white; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.33); font-size: .82rem; }

.intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 35px; padding: 56px 4px 30px; }
.intro h2 { margin: 0 0 10px; max-width: 650px; font-size: clamp(1.85rem, 3.5vw, 2.75rem); letter-spacing: -.045em; line-height: 1.08; }
.agreement-subtitle { max-width: 660px; margin: 0 0 8px; color: #3d6392; font-size: .94rem; font-weight: 680; }
.intro > div > p:last-child { max-width: 660px; margin: 0; color: var(--muted); font-size: 1.03rem; }

.privacy-note {
  display: flex;
  gap: 11px;
  padding: 15px;
  border: 1px solid #cae2ed;
  border-radius: 13px;
  color: #1b577c;
  background: #f1fbff;
  font-size: .86rem;
  line-height: 1.4;
}
.privacy-note > span { font-size: 1.65rem; color: var(--blue); line-height: 1; }
.intro-aside { flex: 0 0 min(330px, 32%); }
.contact-note { margin-top: 10px; padding: 11px 14px; border: 1px solid #d7e3ef; border-radius: 11px; color: #4c5c73; background: rgba(255,255,255,.68); font-size: .78rem; line-height: 1.4; }
.contact-note p { margin: 0; }
.contact-note p + p { margin-top: 4px; }
.contact-note a { color: var(--navy); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 2px; }

.panel, .scenario-card, .caa-panel, .departure-agenda {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.panel { padding: clamp(22px, 3vw, 34px); }
.panel-heading, .results-heading, .caa-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-heading { margin-bottom: 25px; }
.panel h2, .results h2, .caa-panel h3 { margin: 0; letter-spacing: -.03em; }
.panel h2, .results h2 { font-size: 1.55rem; }
.required-note { margin: 6px 0 0; color: var(--muted); font-size: .82rem; }
.required-note span, .field b { color: var(--red); }

form { margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 30px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 14px; color: var(--navy); font-size: .96rem; font-weight: 800; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; align-content: start; gap: 6px; min-width: 0; color: var(--ink); font-size: .9rem; font-weight: 650; }
.field-label { display: inline-flex; align-items: center; min-height: 24px; }
.field-label > label { font: inherit; }
.field small, .choice-field small { color: var(--muted); font-size: .76rem; font-weight: 450; }
.health-main-label { color: var(--muted); font-size: .74rem; font-weight: 600; }
.health-coverage-field { gap: 6px; }
.health-spouse-option { display: flex; align-items: flex-start; gap: 8px; margin-top: 3px; color: #364b69; font-size: .8rem; font-weight: 650; line-height: 1.35; cursor: pointer; }
.health-spouse-option input { width: 18px; height: 18px; flex: 0 0 18px; margin: 1px 0 0; padding: 0; accent-color: var(--red); }
.health-coverage-field small { max-width: 34rem; line-height: 1.35; }
.optional-label { margin-left: 4px; color: var(--muted); font-size: .76rem; font-style: normal; font-weight: 500; }
input, select {
  width: 100%;
  height: 43px;
  padding: 9px 11px;
  border: 1px solid #bdc9d9;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
}
input:hover, select:hover { border-color: #7897bd; }
input:invalid:not(:placeholder-shown) { border-color: var(--red); }
.input-with-suffix { position: relative; display: block; }
.input-with-suffix input { padding-right: 45px; }
.input-with-suffix > span:last-child { position: absolute; top: 10px; right: 12px; color: var(--muted); font-size: .86rem; font-weight: 600; pointer-events: none; }
.choice-field { display: flex; align-items: flex-start; gap: 10px; margin-top: 19px; padding: 12px 13px; border: 1px solid #d2dbe7; border-radius: 10px; background: #f8fafc; font-size: .88rem; }
.choice-field input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--red); }
.choice-field strong, .choice-field small { display: block; }
.choice-field small .note-mark { display: inline-grid; margin: 0 0 0 5px; vertical-align: middle; }

/* Option facultative, volontairement plus discrète que les données de base. */
.reclassification-drawer { margin-top: 27px; overflow: hidden; border: 1px solid #e0e7ef; border-radius: 14px; background: #fbfcfe; }
.reclassification-drawer summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 17px; cursor: pointer; list-style: none; }
.reclassification-drawer summary::-webkit-details-marker { display: none; }
.reclassification-drawer summary:focus-visible { outline: 3px solid rgba(25, 99, 181, .25); outline-offset: -3px; }
.reclassification-drawer[open] summary { border-bottom: 1px solid #e5ebf2; background: #f6f9fc; }
.drawer-copy { min-width: 0; }
.reclassification-label { display: block; margin: 0 0 2px; color: #6e819d; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.drawer-title { display: block; color: #284a87; font-size: .93rem; font-weight: 780; letter-spacing: -.015em; }
.drawer-meta { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.optional-chip { flex: 0 0 auto; padding: 4px 8px; border: 1px solid #d7e1eb; border-radius: 999px; color: #6a7890; background: #fff; font-size: .7rem; font-weight: 720; }
.drawer-chevron { color: #53749a; font-size: 1.1rem; line-height: 1; transition: transform .18s ease; }
.reclassification-drawer[open] .drawer-chevron { transform: rotate(180deg); }
.reclassification-content { display: grid; gap: 14px; padding: 15px 17px 17px; }
.reclassification-intro { max-width: 870px; margin: 0; color: #6b7b91; font-size: .79rem; line-height: 1.43; }
.reclassification-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; border: 0; }
.reclassification-modes legend { grid-column: 1 / -1; width: 100%; margin: 0 0 2px; padding: 0; color: #314665; font-size: .91rem; font-weight: 760; }
.reclassification-option { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 10px; min-height: 76px; padding: 12px; border: 1px solid #d8e2ed; border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.reclassification-option:hover { border-color: #a7bfdc; }
.reclassification-option:has(input:focus-visible) { outline: 3px solid rgba(25, 99, 181, .24); outline-offset: 2px; }
.reclassification-option.is-selected { border-color: #3977be; background: #f0f7fd; box-shadow: inset 0 0 0 1px #3977be; }
.reclassification-option-renounce.is-selected { border-color: #e15a60; background: #fff5f5; box-shadow: inset 0 0 0 1px #e15a60; }
.reclassification-option input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); }
.reclassification-option-renounce input, .renounce-confirmation input { accent-color: var(--red); }
.reclassification-option span { display: grid; gap: 3px; }
.reclassification-option strong { color: #304563; font-size: .86rem; line-height: 1.3; }
.reclassification-option small { color: #6b7b91; font-size: .74rem; line-height: 1.34; }
.reclassification-panel { display: grid; gap: 10px; padding: 15px; border-left: 3px solid #3977be; border-radius: 11px; background: #f4f8fc; }
.reclassification-panel[hidden] { display: none; }
.reclassification-panel-renounce { border-left-color: #e15a60; background: #fff6f6; }
.training-range-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.training-range-heading label, .reclassification-panel > label { color: #344b6b; font-size: .83rem; font-weight: 760; line-height: 1.34; }
.training-range-heading output { flex: 0 0 auto; color: #1e5fae; font-size: 1.16rem; font-weight: 800; white-space: nowrap; }
#training-months { width: 100%; min-height: 32px; margin: -2px 0 0; accent-color: var(--red); cursor: pointer; }
.training-range-scale { position: relative; min-height: 29px; color: #6d7e94; font-size: .7rem; line-height: 1.2; }
.training-range-scale span { position: absolute; top: 0; white-space: nowrap; }
.training-range-scale span:nth-child(1) { left: 0; }
.training-range-scale span:nth-child(2) { left: 28.571%; transform: translateX(-50%); text-align: center; }
.training-range-scale span:nth-child(3) { right: 0; }
.reclassification-help { max-width: 880px; margin: 0; color: #6b7b91; font-size: .77rem; line-height: 1.43; }
.training-results-title { margin: 1px 0 -1px; color: #405976; font-size: .77rem; font-weight: 760; }
.training-scenario-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.training-scenario-preview article { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid #d7e3ed; border-radius: 10px; background: #fff; }
.training-scenario-preview strong { color: #344b6b; font-size: .76rem; }
.training-scenario-preview b { color: #1e5fae; font-size: .96rem; }
.training-scenario-preview small { color: #6a7a91; font-size: .73rem; line-height: 1.35; }
.training-scenario-preview em { color: #b2501c; font-size: .68rem; font-style: normal; font-weight: 700; line-height: 1.3; }
#employment-start-date { width: min(100%, 280px); height: 43px; padding-inline: 11px; background: #fff; }
.renounce-confirmation { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.renounce-confirmation input { width: 20px; height: 20px; flex: 0 0 20px; margin: 1px 0 0; }
.renounce-confirmation span { display: grid; gap: 3px; }
.renounce-confirmation strong { color: #6f3037; font-size: .84rem; line-height: 1.35; }
.renounce-confirmation small { color: #8a6266; font-size: .75rem; line-height: 1.35; }
.reclassification-date-state { min-height: 1.2em; margin: 8px 0 0; color: #667891; font-size: .77rem; line-height: 1.35; }
.reclassification-date-state:empty { display: none; }
.reclassification-summary { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; color: #355273; background: #eaf4fc; font-size: .77rem; line-height: 1.42; }
.reclassification-summary strong { color: #234f88; }

.parameter-line { display: flex; align-items: flex-start; gap: 10px; margin-top: 27px; padding: 12px 14px; border-radius: 10px; color: #415676; background: #f2f7fb; font-size: .85rem; }
.parameter-line p { margin: 0; }
.parameter-icon { display: grid; width: 18px; height: 18px; flex: 0 0 18px; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-size: .72rem; font-weight: 800; }
.form-footer { display: flex; justify-content: flex-end; align-items: center; gap: 15px; margin-top: 25px; }
.form-error { flex: 1; margin: 0; color: #a52429; font-size: .87rem; font-weight: 600; }
.form-actions { display: flex; gap: 10px; }

.results { padding: 52px 0 40px; }
.results-heading { margin-bottom: 19px; }
.print-input-summary { display: none; }
.calculation-status { display: flex; align-items: center; gap: 7px; margin: 6px 0 0; color: var(--success); font-size: .83rem; font-weight: 700; }
.calculation-status span { font-size: .6rem; }

.shared-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-card { min-height: 94px; padding: 14px 16px; border: 1px solid #d8e5f0; border-radius: 13px; background: #f6fbfe; }
.stat-card span, .stat-card small { display: block; color: var(--muted); font-size: .76rem; font-weight: 650; }
.stat-card strong { display: inline-block; margin: 3px 4px 0 0; color: var(--navy); font-size: 1.25rem; letter-spacing: -.025em; }
.reference-date-note { margin: 10px 2px 23px; color: var(--muted); font-size: .82rem; }
.reference-date-note strong { color: var(--ink); }
.note-mark { display: inline-grid; width: 20px; height: 20px; margin-left: 4px; padding: 0; border: 0; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-size: .72rem; font-style: normal; font-weight: 800; line-height: 1; vertical-align: text-bottom; cursor: pointer; appearance: none; touch-action: manipulation; }
.note-mark:focus-visible { outline: 3px solid rgba(25, 99, 181, .36); outline-offset: 2px; }
.current-salary-card { display: grid; grid-template-columns: minmax(155px, .8fr) 2.4fr; align-items: center; gap: 22px; margin: 0 0 23px; padding: 18px 20px; border: 1px solid #d8e5f0; border-radius: 14px; background: #fff; }
.current-salary-card h3 { margin: 0; color: var(--navy); font-size: 1.1rem; letter-spacing: -.02em; }
.current-salary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.current-salary-grid > div { min-width: 0; padding-left: 14px; border-left: 1px solid #dce5ef; }
.current-salary-grid dt, .current-salary-grid small { display: block; color: var(--muted); font-size: .73rem; font-weight: 650; }
.current-salary-grid dd { margin: 3px 0 0; }
.current-salary-grid dd strong { display: block; color: var(--ink); font-size: 1.06rem; letter-spacing: -.02em; }
.current-salary-grid dd span { display: block; margin-top: 1px; color: var(--muted); font-size: .76rem; }
.current-salary-grid dd b { color: var(--navy); }

.scenario-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.scenario-card { overflow: hidden; }
.scenario-header { min-height: 94px; padding: 23px 25px 20px; color: white; background: linear-gradient(115deg, var(--navy-deep), var(--navy)); }
.constrained-card .scenario-header { background: linear-gradient(115deg, #9f2737, var(--red)); }
.scenario-kicker { margin: 0 0 2px; opacity: .82; font-size: .75rem; font-weight: 720; letter-spacing: .12em; text-transform: uppercase; }
.scenario-header h3 { margin: 0; font-size: 1.38rem; letter-spacing: -.025em; }
.indemnity-breakdown { margin: 0; padding: 0 25px; background: #fff; }
.indemnity-breakdown > div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.indemnity-breakdown dt { max-width: 63%; color: #41506a; font-size: .83rem; font-weight: 650; }
.indemnity-breakdown dt .coefficient-inline { display: block; margin-top: 2px; color: var(--muted); font-size: .72rem; font-weight: 500; }
.indemnity-breakdown dt .coefficient-inline span { color: var(--navy); font-weight: 750; }
.indemnity-breakdown dd { min-width: 126px; margin: 0; text-align: right; }
.indemnity-breakdown dd strong, .indemnity-breakdown dd small { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.indemnity-breakdown dd strong { color: var(--ink); font-size: .9rem; }
.indemnity-breakdown dd strong > span, .indemnity-breakdown dd small > span { color: var(--muted); font-size: .73rem; font-weight: 650; }
.indemnity-breakdown dd b { color: inherit; font-weight: 760; white-space: nowrap; }
.indemnity-breakdown dd small { color: var(--muted); font-size: .77rem; }
.renunciation-indemnity { background: #fff; }
.renunciation-indemnity dt { color: #24638f; }
.renunciation-indemnity dt > small { display: block; margin-top: 2px; color: #59718a; font-size: .71rem; font-weight: 500; line-height: 1.3; }
.renunciation-indemnity dd strong { color: #1d5d90; }
.result-primary { padding: 21px 25px 18px; background: #eff8fc; }
.constrained-card .result-primary { background: #fff5f5; }
.result-primary span { display: block; color: var(--muted); font-size: .85rem; font-weight: 650; }
.result-primary > strong { display: block; margin: 3px 0; color: var(--navy-deep); font-size: clamp(1.72rem, 4vw, 2.25rem); letter-spacing: -.045em; line-height: 1.08; }
.constrained-card .result-primary > strong { color: #a52a36; }
.result-primary small { color: var(--muted); font-size: .82rem; }
.result-primary b { color: var(--ink); }
.result-primary .result-total-net { display: block; margin-top: 7px; font-size: .96rem; font-weight: 700; }
.result-primary .result-total-net b { font-size: 1.04rem; }
.result-lines { margin: 0; padding: 0 25px; }
.result-lines > div { display: flex; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.result-lines dt { max-width: 54%; color: #41506a; font-size: .85rem; font-weight: 650; }
.result-lines dt span { display: block; margin-top: 2px; color: var(--muted); font-size: .73rem; font-weight: 450; white-space: pre-line; }
.result-lines dt .note-mark { display: inline-grid; margin-top: 0; color: white; font-size: .65rem; font-weight: 800; white-space: normal; }
.result-lines dd { min-width: 172px; margin: 0; text-align: right; }
.result-lines dd strong, .result-lines dd small { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.result-lines dd strong { color: var(--ink); font-size: .95rem; }
.result-lines dd strong > span, .result-lines dd small > span { color: var(--muted); font-size: .73rem; font-weight: 650; }
.result-lines dd b { color: inherit; font-weight: 760; white-space: nowrap; }
.result-lines dd small { color: var(--muted); font-size: .77rem; }
.result-lines dd .monthly-line { margin-top: 4px; font-size: .7rem; }
.result-lines dd .monthly-line b { color: var(--muted); font-weight: 650; }
.result-lines dd .monthly-line i { font-style: normal; }
.result-lines dd .monthly-line em { color: var(--ink); font-style: normal; white-space: nowrap; }
.result-lines dd .redeployment-cap-note { display: block; margin-top: 6px; color: #8a5b1d; font-size: .68rem; font-weight: 650; line-height: 1.35; }
.renunciation-status { background: #fff; }
.renunciation-status dd { max-width: 62%; }
.result-lines .renunciation-status dd strong { display: block; color: #24638f; font-size: .82rem; line-height: 1.35; }
.cost-line { display: flex; justify-content: space-between; gap: 15px; padding: 12px 25px; color: #fff; background: #1f765b; font-size: .84rem; }
.cost-line-muted { color: #233348; background: #edf1f6; }

/* This compact panel appears only when the protected statutory / collective
   rights exceed one of the agreement's reference caps.  It explains why the
   displayed total must remain above that cap rather than being cut down. */
.protected-cap-summary {
  --protected-cap-share: 0%;
  margin: 14px 16px 18px;
  padding: 16px;
  border: 1px solid #ebcc8d;
  border-radius: 13px;
  background: linear-gradient(135deg, #fffaf0, #fffdf8);
  color: #493817;
}
.protected-cap-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.protected-cap-heading p { margin: 0 0 2px; color: #95703a; font-size: .65rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.protected-cap-heading h4 { margin: 0; color: #614309; font-size: .98rem; letter-spacing: -.018em; line-height: 1.2; }
.protected-cap-chip { flex: 0 0 auto; padding: 4px 8px; border: 1px solid #e2bd74; border-radius: 999px; color: #75500f; background: #fff3d9; font-size: .65rem; font-weight: 800; white-space: nowrap; }
.protected-cap-description { margin: 9px 0 0; color: #705c34; font-size: .76rem; line-height: 1.4; }
.protected-cap-excess { margin: 10px 0 9px; color: #96601b; font-size: .77rem; font-weight: 650; }
.protected-cap-excess strong { color: #a25012; font-size: 1.12rem; letter-spacing: -.025em; }
.protected-cap-track { position: relative; height: 9px; overflow: hidden; border-radius: 999px; background: #f4d9aa; }
.protected-cap-track > span { display: block; width: var(--protected-cap-share); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #43856e, #69a385); }
.protected-cap-track::after { position: absolute; top: -2px; bottom: -2px; left: var(--protected-cap-share); width: 2px; background: #9c5c13; content: ""; }
.protected-cap-track-labels { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; color: #856f49; font-size: .64rem; line-height: 1.25; }
.protected-cap-track-labels span:last-child { text-align: right; }
.protected-cap-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 13px 0 0; }
.protected-cap-metrics > div { min-width: 0; padding: 8px 9px; border: 1px solid rgba(227, 197, 138, .72); border-radius: 8px; background: rgba(255, 255, 255, .67); }
.protected-cap-metrics dt { color: #8a734d; font-size: .63rem; font-weight: 680; line-height: 1.25; }
.protected-cap-metrics dd { margin: 2px 0 0; color: #543608; font-size: .83rem; font-weight: 800; letter-spacing: -.012em; white-space: nowrap; }
.protected-cap-footnote { margin: 11px 0 0; padding-top: 9px; border-top: 1px solid rgba(227, 197, 138, .72); color: #806944; font-size: .68rem; line-height: 1.36; }

.caa-panel { margin-top: 20px; padding: 27px; box-shadow: none; }
.caa-heading { margin-bottom: 20px; }
.caa-heading h3 { font-size: 1.25rem; }
.caa-heading p:not(.eyebrow) { max-width: 690px; margin: 5px 0 0; color: var(--muted); font-size: .88rem; }
.caa-chip { align-self: flex-start; color: #8c5b04; background: #fff3d6; }
.caa-grid { display: grid; grid-template-columns: repeat(4, 1fr); align-items: start; gap: 12px; }
.caa-grid article { min-height: 112px; padding: 15px; border: 1px solid #d4e5ec; border-radius: 12px; background: #f5fbfd; }
.caa-grid span, .caa-grid small { display: block; color: var(--muted); font-size: .76rem; font-weight: 650; }
.caa-grid strong { display: block; overflow-wrap: anywhere; margin: 3px 0; color: var(--navy); font-size: 1.22rem; letter-spacing: -.025em; line-height: 1.15; }
.caa-grid b { color: var(--ink); }
.caa-indemnity-card { display: flex; flex-direction: column; gap: 10px; }
.caa-indemnity-card > div + div { padding-top: 10px; border-top: 1px solid #d4e5ec; }
.caa-indemnity-total strong { color: var(--blue); }
.caa-indemnity-amounts { margin-top: 7px; padding-top: 7px; }
.caa-notice-card { display: flex; flex-direction: column; }
.caa-duration { margin-top: 2px; color: var(--blue) !important; }
.caa-amounts { display: grid; gap: 6px; margin: 10px 0 0; padding-top: 9px; border-top: 1px solid #d4e5ec; }
.caa-amounts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.caa-amounts dt { color: var(--muted); font-size: .75rem; font-weight: 650; }
.caa-amounts dd { margin: 0; color: var(--navy); font-size: .95rem; font-weight: 800; letter-spacing: -.015em; text-align: right; white-space: nowrap; }
.caa-costs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 14px; overflow: hidden; border-radius: 10px; background: #d3dae2; }
.caa-costs div { display: flex; justify-content: space-between; gap: 14px; padding: 12px 15px; background: #edf3f6; font-size: .87rem; }
.caa-costs div:first-child { color: white; background: #1f765b; }
.caa-checklist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.check-item { padding: 6px 9px; border-radius: 999px; color: #556278; background: #f1f3f6; font-size: .76rem; font-weight: 600; }
.check-item.good { color: #176d52; background: #e5f5ee; }
.check-item.caution { color: #8b5b03; background: #fff3d7; }

.departure-agenda { margin-top: 20px; padding: clamp(20px, 3vw, 30px); box-shadow: none; }
.agenda-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.agenda-heading h3 { margin: 0; color: var(--navy); font-size: 1.28rem; letter-spacing: -.025em; }
.agenda-heading p:not(.eyebrow) { max-width: 720px; margin: 5px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.48; }
.agenda-heading p strong { color: var(--ink); }
.agenda-date-chips { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: 9px; }
.agenda-start-chip { display: block; flex: 0 0 auto; min-width: 185px; padding: 10px 13px; border: 1px solid #c8deeb; border-radius: 11px; color: #1b577c; background: #eef8fc; text-align: left; cursor: pointer; }
.agenda-start-chip span { display: block; color: var(--muted); font-size: .69rem; font-weight: 720; letter-spacing: .04em; }
.agenda-start-chip input { width: 100%; height: 34px; margin-top: 5px; padding: 4px 8px; border: 1px solid #a9c9dc; border-radius: 7px; color: var(--navy); background: #fff; font: inherit; font-size: .92rem; font-weight: 800; letter-spacing: -.01em; }
.agenda-start-chip input:hover { border-color: #5a8dac; }
.agenda-start-chip input:focus { outline: 3px solid rgba(25, 99, 181, .22); outline-offset: 1px; }
.agenda-start-chip-caa { border-color: #b9dccb; color: #176d52; background: #edf8f2; }
.agenda-start-chip-caa input { border-color: #9dcbb3; }
.agenda-start-chip-caa input:hover { border-color: #4d9b75; }
.agenda-scenarios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.agenda-card { overflow: hidden; border: 1px solid #d6e1ec; border-radius: 14px; background: #fff; }
.agenda-card > header { padding: 16px 19px 15px; color: #fff; background: linear-gradient(115deg, var(--navy-deep), var(--navy)); }
.agenda-constrained > header { background: linear-gradient(115deg, #9f2737, var(--red)); }
.agenda-caa { margin-top: 18px; }
.agenda-caa > header { background: linear-gradient(115deg, #176d52, #2d9473); }
.agenda-card > header p { margin: 0 0 2px; color: inherit; opacity: .82; font-size: .7rem; font-weight: 760; letter-spacing: .11em; text-transform: uppercase; }
.agenda-card > header h4 { margin: 0; color: inherit; font-size: 1.1rem; letter-spacing: -.018em; }
.agenda-list { margin: 0; padding: 0; list-style: none; }
.agenda-item { display: grid; grid-template-columns: minmax(105px, .55fr) minmax(0, 1.45fr); gap: 14px; padding: 15px 17px; background: #fff; }
.agenda-item + .agenda-item { border-top: 1px solid #e5ebf2; }
.agenda-item-date { margin: 1px 0 0; color: #2a6697; font-size: .76rem; font-weight: 780; line-height: 1.35; text-align: right; }
.agenda-item-content { position: relative; min-width: 0; padding-left: 15px; border-left: 2px solid #c7dfee; }
.agenda-item-content::before { content: ""; position: absolute; top: 3px; left: -6px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px #96bdd8; }
.agenda-item-eyebrow { margin: 0 0 2px; color: #5681a3; font-size: .67rem; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.agenda-item h5 { margin: 0; color: var(--ink); font-size: .93rem; letter-spacing: -.012em; line-height: 1.3; }
.agenda-item-description { margin: 4px 0 0; color: #5c6b80; font-size: .78rem; line-height: 1.43; }
.agenda-item-subtle { background: #fbfdff; }
.agenda-item-subtle .agenda-item-content { border-left-color: #d7e0e9; }
.agenda-item-subtle .agenda-item-content::before { background: #8395a9; box-shadow: 0 0 0 1px #c1cbd7; }
.agenda-item-final { background: #f5fbf8; }
.agenda-item-final .agenda-item-content { border-left-color: #99cfb9; }
.agenda-item-final .agenda-item-content::before { background: #218367; box-shadow: 0 0 0 1px #7fbea5; }
.agenda-item-reserve { background: #fffaf0; }
.agenda-item-reserve .agenda-item-content { border-left-color: #edc972; }
.agenda-item-reserve .agenda-item-content::before { background: #bd8617; box-shadow: 0 0 0 1px #e1ba59; }
.agenda-amounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 10px 0 0; padding: 9px 10px; border-radius: 8px; background: rgba(234, 244, 249, .76); }
.agenda-amounts > div { min-width: 0; }
.agenda-amounts dt { color: #627087; font-size: .68rem; font-weight: 650; line-height: 1.25; }
.agenda-amounts dd { margin: 2px 0 0; color: var(--navy); font-size: .82rem; font-weight: 800; white-space: nowrap; }
.agenda-item-final .agenda-amounts { background: rgba(224, 244, 235, .8); }
.agenda-item-reserve .agenda-amounts { background: rgba(255, 241, 203, .72); }
.agenda-disclaimer { margin: 16px 2px 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }

.note-dialog { position: fixed; z-index: 100; inset: 0; display: grid; min-height: 100vh; min-height: 100dvh; place-items: center; padding: 20px; }
.note-dialog-backdrop { position: absolute; inset: 0; background: rgba(13, 29, 58, .56); }
.note-dialog-panel { position: relative; width: min(540px, 100%); max-height: min(680px, calc(100vh - 40px)); overflow: auto; padding: 24px; border: 1px solid #d5e0ed; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgba(8, 22, 49, .3); }
.note-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.note-dialog-header .eyebrow { margin-top: 2px; }
.note-dialog-close { display: grid; width: 34px; height: 34px; flex: 0 0 34px; padding: 0; border: 1px solid #c7d5e3; border-radius: 50%; place-items: center; color: var(--navy); background: #f5f9fd; font-size: 1.4rem; line-height: 1; }
.note-dialog-close:hover { color: white; border-color: var(--navy); background: var(--navy); }
.note-dialog-close:focus-visible { outline: 3px solid rgba(25, 99, 181, .36); outline-offset: 2px; }
.note-dialog-panel h2 { margin: 2px 42px 12px 0; color: var(--navy); font-size: 1.25rem; letter-spacing: -.02em; line-height: 1.25; }
.note-dialog-text { margin: 0; color: #3c4e69; font-size: .95rem; line-height: 1.58; white-space: pre-line; }
body.note-dialog-open { overflow: hidden; }

.notice { margin-top: 20px; padding: 16px 18px; border: 1px solid var(--warning-line); border-radius: 12px; background: var(--warning-bg); color: #6c5421; font-size: .85rem; }
.notice p { margin: 4px 0 0; }
.notice-info { border-color: #c8dfeb; background: #f1f8fc; color: #285a78; }
.site-footer { margin-top: 10px; padding: 24px 0; color: #68758a; border-top: 1px solid #d7deea; font-size: .8rem; }

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .intro { padding-top: 38px; }
  .shared-stats, .caa-grid { grid-template-columns: repeat(2, 1fr); }
  .current-salary-card { grid-template-columns: 1fr; gap: 14px; }
  .caa-heading { display: block; }
  .caa-chip { margin-top: 10px; }
  .agenda-heading { display: block; }
  .agenda-date-chips { justify-content: flex-start; margin-top: 11px; }
  .agenda-start-chip { text-align: left; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 28px, 1180px); }
  .header-content { min-height: 74px; }
  .header-actions .version-chip { display: none; }
  .print-button { font-size: .75rem; }
  .brand-logo { width: 43px; height: 43px; }
  .brand h1 { font-size: 1.08rem; }
  .intro, .panel-heading, .results-heading { display: block; }
  .intro { padding-bottom: 23px; }
  .privacy-note { margin-top: 19px; }
  .required-note, .calculation-status { margin-top: 10px; }
  .panel { padding: 20px 16px; }
  .form-grid, .scenario-grid, .agenda-scenarios { grid-template-columns: 1fr; }
  .form-grid { gap: 23px; }
  .field-grid { grid-template-columns: 1fr; }
  .reclassification-drawer { margin-top: 26px; }
  .reclassification-drawer summary { padding: 12px 14px; }
  .reclassification-content { padding: 14px; }
  .reclassification-modes, .training-scenario-preview { grid-template-columns: 1fr; }
  .reclassification-option { min-height: 68px; }
  .training-range-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .training-range-scale { display: flex; justify-content: space-between; gap: 7px; }
  .training-range-scale span, .training-range-scale span:nth-child(1), .training-range-scale span:nth-child(2), .training-range-scale span:nth-child(3) { position: static; transform: none; text-align: center; }
  .form-footer { display: block; }
  .form-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .form-footer .button { width: 100%; }
  .form-error { margin-bottom: 12px; }
  .agenda-date-chips { display: grid; grid-template-columns: 1fr; }
  .agenda-start-chip { width: 100%; min-width: 0; }
  .shared-stats { grid-template-columns: 1fr 1fr; }
  .current-salary-grid { grid-template-columns: 1fr; gap: 8px; }
  .current-salary-grid > div { padding: 0; border-left: 0; }
  .scenario-header, .result-primary { padding-left: 19px; padding-right: 19px; }
  .result-lines { padding: 0 19px; }
  .cost-line { padding-left: 19px; padding-right: 19px; }
  .protected-cap-summary { margin: 12px 12px 16px; padding: 14px; }
  .caa-panel { padding: 20px 16px; }
  .caa-grid { grid-template-columns: 1fr 1fr; }
  .caa-costs { grid-template-columns: 1fr; }
  .agenda-item { grid-template-columns: 1fr; gap: 7px; }
  .agenda-item-date { text-align: left; }
  .agenda-item-content { padding-left: 13px; }
  .agenda-amounts { gap: 7px 9px; }
  .note-dialog { align-items: end; padding: 0; }
  .note-dialog-panel { width: 100%; max-height: 78vh; max-height: 78dvh; padding: 21px 20px calc(27px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
  .note-dialog-panel h2 { font-size: 1.16rem; }
  .note-dialog-text { font-size: .94rem; }
  .footer-content { display: block; }
  .footer-content span { display: block; margin: 3px 0; }
}

@media (max-width: 420px) {
  .header-content { gap: 10px; }
  .header-actions { display: flex; flex: 0 0 auto; }
  .brand { gap: 9px; }
  .brand-logo { width: 37px; height: 37px; flex-basis: 37px; }
  .brand h1 { font-size: .95rem; }
  .brand .eyebrow { margin-bottom: 2px; font-size: .62rem; letter-spacing: .08em; }
  .print-button { min-height: 32px; padding: 5px 8px; font-size: .68rem; white-space: nowrap; }
  .shared-stats, .caa-grid { grid-template-columns: 1fr; }
  .caa-grid article { min-height: 92px; }
  .protected-cap-heading { display: block; }
  .protected-cap-chip { display: inline-block; margin-top: 8px; }
  .protected-cap-metrics { grid-template-columns: 1fr; }
}

@media print {
  :root { background: #fff; }
  body { background: #fff; font-size: 10pt; }
  .note-mark, .parameter-icon { display: none !important; }
  .site-header { position: static; color: #152443; background: #fff; box-shadow: none; border-bottom: 2px solid #1d3f91; }
  .header-content { min-height: 58px; }
  .brand-logo { width: 38px; height: 38px; border: 1px solid #ccd4df; }
  .header-actions, .intro, .form-panel, .site-footer, .note-dialog { display: none !important; }
  .shell { width: 100%; }
  main.shell { padding: 0; }
  .results { padding: 18px 0 0; }
  .results-heading { display: flex; }
  .print-input-summary { display: block; break-inside: avoid; margin: 0 0 9px; padding: 7px 10px 8px; border: 1px solid #ccd8e5; border-left: 3px solid #1d3f91; border-radius: 5px; }
  .print-input-summary-title { margin: 0 0 5px; color: #1d3f91; font-size: 8.5pt; font-weight: 800; }
  .print-input-summary dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; margin: 0; }
  .print-input-summary dl > div { min-width: 0; }
  .print-input-summary dt { color: #657389; font-size: 7.4pt; line-height: 1.14; }
  .print-input-summary dd { margin: 1px 0 0; color: #152443; font-size: 8.2pt; font-weight: 720; line-height: 1.16; overflow-wrap: anywhere; }
  .shared-stats { grid-template-columns: repeat(3, 1fr); }
  .scenario-grid, .caa-grid { grid-template-columns: 1fr 1fr; }
  .scenario-card, .caa-panel, .notice, .departure-agenda { break-inside: avoid; box-shadow: none; }
  .scenario-header { min-height: auto; padding: 12px 15px; }
  .indemnity-breakdown { padding: 0 15px; }
  .indemnity-breakdown > div { padding: 8px 0; }
  .result-primary { padding: 13px 15px; }
  .result-lines { padding: 0 15px; }
  .result-lines > div { padding: 8px 0; }
  .cost-line { padding: 8px 15px; }
  .protected-cap-summary { margin: 7px 10px 10px; padding: 9px 10px; border-radius: 6px; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .protected-cap-heading p { margin-bottom: 1px; font-size: 6.3pt; }
  .protected-cap-heading h4 { font-size: 8.5pt; }
  .protected-cap-chip { padding: 3px 6px; font-size: 6.3pt; }
  .protected-cap-description { margin-top: 5px; font-size: 7pt; }
  .protected-cap-excess { margin: 5px 0 5px; font-size: 7pt; }
  .protected-cap-excess strong { font-size: 9.5pt; }
  .protected-cap-track { height: 6px; }
  .protected-cap-track-labels { margin-top: 3px; font-size: 6pt; }
  .protected-cap-metrics { gap: 4px; margin-top: 7px; }
  .protected-cap-metrics > div { padding: 5px 6px; border-radius: 4px; }
  .protected-cap-metrics dt { font-size: 6pt; }
  .protected-cap-metrics dd { margin-top: 1px; font-size: 7.5pt; }
  .protected-cap-footnote { margin-top: 6px; padding-top: 5px; font-size: 6.3pt; }
  .caa-panel { margin-top: 12px; padding: 16px; }
  .departure-agenda { margin-top: 12px; padding: 14px; }
  .agenda-heading { margin-bottom: 12px; }
  .agenda-heading h3 { font-size: 1.08rem; }
  .agenda-heading p:not(.eyebrow), .agenda-disclaimer { font-size: 8pt; }
  .agenda-scenarios { gap: 10px; }
  .agenda-card { break-inside: avoid; border-radius: 8px; }
  .agenda-card > header { padding: 9px 11px; }
  .agenda-card > header h4 { font-size: 9.5pt; }
  .agenda-item { grid-template-columns: 86px 1fr; gap: 9px; padding: 9px 10px; }
  .agenda-item-date { font-size: 7.4pt; }
  .agenda-item-content { padding-left: 10px; }
  .agenda-item-content::before { top: 2px; left: -5px; width: 7px; height: 7px; }
  .agenda-item-eyebrow { font-size: 6.5pt; }
  .agenda-item h5 { font-size: 8.5pt; }
  .agenda-item-description { font-size: 7.4pt; }
  .agenda-amounts { margin-top: 6px; padding: 6px 7px; }
  .agenda-amounts dt { font-size: 6.4pt; }
  .agenda-amounts dd { font-size: 7.4pt; }
  .agenda-caa { margin-top: 10px; }
  .notice { font-size: 8.5pt; }
}
