/* =========================================================================
   vrai-salaire-net.fr — Design system for editorial / content pages
   Concept: "Le bulletin honnête" — the clarity & precision of a payslip,
   made warm and human. Deductions (coral) come out, net (emerald) is kept.
   ========================================================================= */

:root {
  /* Palette */
  --ink:        #0E2E3B;   /* deep teal-navy: primary text, dark sections   */
  --ink-soft:   #1B3F4E;
  --paper:      #FBF8F2;   /* warm off-white page background                 */
  --paper-2:    #F3EDE2;   /* slightly deeper warm panel                     */
  --card:       #FFFFFF;
  --emerald:    #157F5B;   /* "net / what you keep" — positive accent        */
  --emerald-d:  #0F6347;
  --coral:      #E0614B;   /* "deductions / what's taken" — used sparingly   */
  --gold:       #C2913B;   /* warm highlight: eyebrows, rules                */
  --slate:      #5C6B72;   /* muted secondary text                          */
  --line:       #E4DCCE;   /* hairline on paper                             */
  --line-ink:   rgba(255,255,255,.16);

  /* Type */
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Metrics */
  --wrap: 1080px;
  --narrow: 720px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(14,46,59,.06), 0 8px 30px rgba(14,46,59,.07);
  --shadow-lg: 0 2px 6px rgba(14,46,59,.08), 0 24px 60px rgba(14,46,59,.12);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--emerald-d); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--emerald); }

.wrap   { width: 100%; max-width: var(--wrap);   margin-inline: auto; padding-inline: 22px; }
.narrow { width: 100%; max-width: var(--narrow); margin-inline: auto; padding-inline: 22px; }

/* ---------- Typography ------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 2.2em 0 .6em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); margin: 1.8em 0 .4em; }
p  { margin: 0 0 1.1em; }
strong { font-weight: 650; }

.eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
  display: inline-flex; align-items: center; gap: .5em;
}
.eyebrow::before { content:""; width: 26px; height: 2px; background: var(--gold); display:inline-block; }

.lead { font-size: 1.18rem; color: var(--ink-soft); }
.muted { color: var(--slate); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Header / nav ---------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,248,242,.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 700; font-size: 1.12rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--emerald), var(--ink));
  position: relative;
}
.brand .mark::after { content:"€"; position:absolute; inset:0; display:grid; place-items:center; color:#fff; font-weight:700; font-size:16px; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { font-size: .95rem; font-weight: 550; color: var(--ink-soft); text-decoration: none; }
.nav a:hover { color: var(--emerald); }
.nav .cta {
  background: var(--ink); color: #fff; padding: .5rem .95rem; border-radius: 999px; font-weight: 600;
}
.nav .cta:hover { background: var(--emerald-d); color: #fff; }
.nav-toggle { display:none; background:none; border:0; font-size:1.5rem; cursor:pointer; color:var(--ink); }

@media (max-width: 760px) {
  .nav { position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: .4rem 22px 1rem;
    transform: translateY(-130%); transition: transform .28s ease; box-shadow: var(--shadow); }
  .nav.open { transform: translateY(0); }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav .cta { text-align: center; margin-top: .7rem; }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--body); font-weight: 650; font-size: 1rem;
  padding: .85rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary { background: var(--emerald); color: #fff; box-shadow: 0 6px 18px rgba(21,127,91,.28); }
.btn-primary:hover { background: var(--emerald-d); color:#fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.08rem; }

/* ---------- Hero ------------------------------------------------------- */
.hero { padding: clamp(2.4rem, 6vw, 4.6rem) 0 clamp(2rem, 4vw, 3rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.6rem, 4vw, 3.2rem); align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- The signature element: the payslip strip ------------------ */
.payslip {
  background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: clamp(1.3rem, 3vw, 1.9rem); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.payslip::before {
  content:""; position:absolute; left:0; top:0; bottom:0; width:6px;
  background: linear-gradient(var(--coral), var(--emerald));
}
.payslip .ps-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .55rem 0; }
.payslip .ps-row + .ps-row { border-top: 1px dashed var(--line); }
.payslip .ps-label { font-size: .98rem; color: var(--slate); }
.payslip .ps-val { font-family: var(--display); font-weight: 600; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.payslip .ps-val.minus { color: var(--coral); }
.payslip .ps-net { margin-top: .4rem; padding-top: .9rem; border-top: 2px solid var(--ink); }
.payslip .ps-net .ps-label { color: var(--ink); font-weight: 600; font-size: 1.05rem; }
.payslip .ps-net .ps-val { color: var(--emerald-d); font-size: clamp(1.7rem, 4vw, 2.3rem); }
.payslip .ps-cap { margin-top: 1rem; font-size: .82rem; color: var(--slate); }

/* The big number block (landing pages) */
.bignum { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums;
  font-size: clamp(2.6rem, 9vw, 4.6rem); line-height: 1; color: var(--emerald-d); letter-spacing: -.03em; }
.bignum small { display:block; font-family:var(--body); font-weight:600; font-size:1rem; color:var(--slate); letter-spacing:0; margin-top:.6rem; }

/* ---------- Sections & panels ----------------------------------------- */
section { padding: clamp(2rem, 4vw, 3rem) 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow); }
.panel-warm { background: var(--paper-2); }
.dark { background: var(--ink); color: #EDF3F2; }
.dark h1, .dark h2, .dark h3 { color: #fff; }
.dark .muted { color: #9DB2B8; }
.dark a { color: #6FD0AC; }

/* ---------- Cards grid ------------------------------------------------- */
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .2s ease; }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 { margin: .1rem 0 .4rem; font-size: 1.15rem; }
.card p { margin: 0; font-size: .96rem; color: var(--slate); }
.card .big { font-family: var(--display); font-weight: 700; font-size: 1.7rem; color: var(--emerald-d); font-variant-numeric: tabular-nums; }

/* salary quick-links grid */
.sal-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: .7rem; }
.sal-links a {
  display: flex; flex-direction: column; gap: .15rem; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; color: var(--ink);
  transition: border-color .15s ease, transform .12s ease;
}
.sal-links a:hover { border-color: var(--emerald); transform: translateY(-2px); }
.sal-links .g { font-weight: 700; font-family: var(--display); font-variant-numeric: tabular-nums; }
.sal-links .n { font-size: .85rem; color: var(--slate); }
.sal-links .n b { color: var(--emerald-d); font-weight: 650; }

/* ---------- Tables ----------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.data caption { text-align: left; padding: 1rem 1.1rem .4rem; font-size: .85rem; color: var(--slate); }
table.data th, table.data td { padding: .75rem 1.1rem; text-align: right; border-top: 1px solid var(--line); font-size: .97rem; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { border-top: 0; background: var(--paper-2); font-weight: 650; color: var(--ink); font-family: var(--body); }
table.data tbody tr:hover { background: #FAFCFB; }
table.data .pos { color: var(--emerald-d); font-weight: 600; }
table.data .neg { color: var(--coral); }

/* ---------- FAQ / accordion ------------------------------------------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: .8rem; overflow: hidden; box-shadow: var(--shadow); }
.faq-item summary { cursor: pointer; padding: 1.05rem 1.2rem; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--display); font-size: 1.5rem; color: var(--emerald); transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 1.2rem 1.2rem; color: var(--ink-soft); }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Callouts --------------------------------------------------- */
.callout { border-left: 4px solid var(--gold); background: var(--paper-2); padding: 1rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.4rem 0; }
.callout strong { color: var(--ink); }
.callout.tip { border-color: var(--emerald); }
.callout.warn { border-color: var(--coral); }

/* ---------- Breadcrumb ------------------------------------------------- */
.crumb { font-size: .85rem; color: var(--slate); padding: 1rem 0 0; }
.crumb a { color: var(--slate); text-decoration: none; }
.crumb a:hover { color: var(--emerald); text-decoration: underline; }
.crumb span { margin: 0 .4rem; }

/* ---------- Ad slots (unobtrusive, labelled) -------------------------- */
.ad-slot { margin: 2.2rem auto; max-width: 728px; min-height: 90px; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #F7F2E8, #F7F2E8 10px, #F3EDE2 10px, #F3EDE2 20px);
  border: 1px dashed var(--line); border-radius: 10px; color: var(--slate); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.ad-label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); text-align: center; margin-bottom: .3rem; }

/* ---------- Footer ----------------------------------------------------- */
.site-footer { background: var(--ink); color: #C7D6DB; margin-top: 3rem; padding: 3rem 0 2rem; }
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 .9rem; }
.site-footer a { color: #C7D6DB; text-decoration: none; font-size: .93rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1.6rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-bottom { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--line-ink); font-size: .82rem; color: #8FA6AC; display:flex; flex-wrap:wrap; gap:.6rem 1.2rem; justify-content: space-between; }

/* ---------- Article prose --------------------------------------------- */
.prose { font-size: 1.06rem; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose h2 { scroll-margin-top: 84px; }
.prose h3 { scroll-margin-top: 84px; }

/* table of contents */
.toc { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin: 1.6rem 0; }
.toc strong { display:block; font-family: var(--display); margin-bottom:.5rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* utilities */
.center { text-align: center; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.pill { display:inline-block; background: var(--paper-2); border:1px solid var(--line); border-radius:999px; padding:.25rem .7rem; font-size:.8rem; color:var(--ink-soft); font-weight:600; }

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

/* =========================================================================
   Calculator (homepage hero) — autonomous, premium
   ========================================================================= */
.calc {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }

.calc-form { padding: clamp(1.4rem, 3vw, 2.2rem); }
.calc-form h2 { margin: 0 0 1.2rem; font-size: 1.3rem; }
.calc-field { margin-bottom: 1.1rem; }
.calc-field > label { display: block; font-size: .82rem; font-weight: 600; color: var(--slate); letter-spacing: .02em; margin-bottom: .4rem; text-transform: uppercase; }

.calc-amount { display: flex; align-items: stretch; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; background: #fff; }
.calc-amount:focus-within { border-color: var(--emerald); box-shadow: 0 0 0 4px rgba(21,127,91,.12); }
.calc-amount input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.1rem);
  color: var(--ink); padding: .55rem .9rem; font-variant-numeric: tabular-nums;
}
.calc-amount .unit { display: grid; place-items: center; padding: 0 1rem; font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--slate); background: var(--paper-2); }

.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 460px) { .calc-row { grid-template-columns: 1fr; } }

.calc-select { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: .7rem .8rem; font-family: var(--body); font-size: 1rem; color: var(--ink); background: #fff; cursor: pointer; }
.calc-select:focus { outline: 0; border-color: var(--emerald); }

/* segmented control for status */
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; }
@media (max-width: 460px) { .seg { grid-template-columns: 1fr 1fr; } }
.seg label {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: .6rem .5rem; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: .92rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; text-align: center;
  transition: all .14s ease; background: #fff;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:hover { border-color: var(--emerald); }
.seg input:checked + span { color: var(--emerald-d); }
.seg label:has(input:checked) { border-color: var(--emerald); background: rgba(21,127,91,.07); box-shadow: 0 0 0 3px rgba(21,127,91,.10); }

/* chips */
.calc-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .3rem; }
.calc-chips button {
  border: 1px solid var(--line); background: var(--paper-2); color: var(--ink-soft);
  border-radius: 999px; padding: .35rem .8rem; font-size: .85rem; font-weight: 600; cursor: pointer;
  font-variant-numeric: tabular-nums; transition: all .14s ease;
}
.calc-chips button:hover { border-color: var(--emerald); color: var(--emerald-d); }
.calc-chips button.active { background: var(--emerald); color: #fff; border-color: var(--emerald); }

/* results panel (dark, premium) */
.calc-result { background: var(--ink); color: #EAF2F0; padding: clamp(1.4rem, 3vw, 2.2rem); display: flex; flex-direction: column; }
.calc-result .res-eyebrow { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: #7Fd0b0; margin: 0 0 .3rem; font-weight: 600; }
.calc-result .res-net { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 7vw, 3.6rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.calc-result .res-net-sub { color: #9DB2B8; font-size: .95rem; margin: .35rem 0 1.2rem; }

/* stacked bar */
.res-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.1); margin-bottom: .5rem; }
.res-bar i { display: block; height: 100%; transition: width .5s cubic-bezier(.22,1,.36,1); }
.res-bar .b-net { background: #2BB98A; }
.res-bar .b-tax { background: var(--gold); }
.res-bar .b-contrib { background: var(--coral); }
.res-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; color: #9DB2B8; margin-bottom: 1.2rem; }
.res-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.res-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.res-lines { border-top: 1px solid var(--line-ink); }
.res-line { display: flex; justify-content: space-between; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid var(--line-ink); font-variant-numeric: tabular-nums; }
.res-line .l { color: #C7D6DB; font-size: .95rem; }
.res-line .v { font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: #fff; }
.res-line .v.minus { color: #F0917E; }
.res-line.is-net .l { color: #fff; font-weight: 600; }
.res-line.is-net .v { color: #6FD0AC; font-size: 1.3rem; }

.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.1rem; }
.res-grid .cell { background: rgba(255,255,255,.05); border-radius: 10px; padding: .7rem .8rem; }
.res-grid .cell .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8FA6AC; }
.res-grid .cell .x { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: #fff; font-variant-numeric: tabular-nums; margin-top: .15rem; }
.res-note { margin-top: 1rem; font-size: .82rem; color: #F0C98A; }
.res-foot { margin-top: auto; padding-top: 1rem; font-size: .76rem; color: #7E969C; }

/* =========================================================================
   Calculator — responsive hardening (mobile fit)
   ========================================================================= */
.calc > * { min-width: 0; }              /* allow grid children to shrink */
.calc-form, .calc-result { min-width: 0; overflow-wrap: anywhere; }
.calc-amount input { min-width: 0; width: 100%; }
.calc-select { min-width: 0; max-width: 100%; }
.res-line { gap: .6rem; }
.res-line .l { min-width: 0; }

@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .calc-amount input { font-size: 1.7rem; }
  .calc-result .res-net { font-size: 2.6rem; }
  .res-grid { grid-template-columns: 1fr 1fr; }
  .calc-chips button { padding: .32rem .6rem; font-size: .8rem; }
}
@media (max-width: 380px) {
  .res-grid { grid-template-columns: 1fr; }
  .seg { grid-template-columns: 1fr 1fr; }
}

/* =========================================================================
   Multilingual additions: skip link, language flag switcher
   ========================================================================= */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
  padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 200; }
.skip-link:focus { left: 0; }

.header-right { display: flex; align-items: center; gap: .6rem; }

/* =========================================================================
   Language bar — all flags always visible, small & compact (no dropdown)
   ========================================================================= */
.header-right { display: flex; align-items: center; gap: .5rem; }

.lang-bar { display: inline-flex; align-items: center; gap: .12rem; }
.lang-flag {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .18rem; border-radius: 5px; border: 1px solid transparent;
  line-height: 0; transition: border-color .14s ease, background .14s ease, transform .1s ease;
}
.lang-flag .flag {
  width: 20px; height: 14px; border-radius: 2px; display: block;
  box-shadow: 0 0 0 1px rgba(14,46,59,.12);
}
.lang-flag:hover { background: var(--paper-2); border-color: var(--line); transform: translateY(-1px); }
.lang-flag.is-current { border-color: var(--emerald); box-shadow: 0 0 0 2px rgba(21,127,91,.15); }
.lang-flag.is-current .flag { box-shadow: 0 0 0 1px rgba(21,127,91,.4); }

@media (max-width: 760px) {
  .header-right { gap: .4rem; }
  .lang-bar { gap: .1rem; }
  .lang-flag { padding: .14rem; }
  .lang-flag .flag { width: 17px; height: 12px; }
}
@media (max-width: 400px) {
  .lang-flag { padding: .1rem; }
  .lang-flag .flag { width: 15px; height: 11px; }
}

/* =========================================================================
   Calculator: family situation (2-col segment) + single-parent checkbox
   ========================================================================= */
.seg.seg-2 { grid-template-columns: 1fr 1fr; }
.calc-check { margin-top: -.2rem; }
.calc-check .check {
  display: flex; align-items: flex-start; gap: .55rem; cursor: pointer;
  font-size: .9rem; color: var(--ink-soft); line-height: 1.35;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px;
  padding: .6rem .7rem; transition: border-color .14s ease, background .14s ease;
}
.calc-check .check:hover { border-color: var(--emerald); }
.calc-check input[type="checkbox"] {
  width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--emerald); cursor: pointer;
}
.calc-check .check:has(input:checked) { border-color: var(--emerald); background: rgba(21,127,91,.07); }

/* =========================================================================
   Simplified badge + advanced calculator link + advanced calculator layout
   ========================================================================= */
.calc-badge {
  display: inline-block; vertical-align: middle; margin-left: .5rem;
  font-family: var(--font-body); font-size: .62rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--emerald-d); background: rgba(21,127,91,.10);
  border: 1px solid rgba(21,127,91,.25); border-radius: 999px; padding: .25rem .6rem;
}
.calc-advanced-link { text-align: center; margin: 1.6rem 0 0; }
.btn-dark { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn-dark:hover { background: #16404f; border-color: #16404f; color: #fff; }

/* Advanced calculator: sectioned form */
.calc-advanced .calc-form { padding-bottom: .4rem; }
.calc-sec {
  font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; color: var(--ink);
  margin: 1.4rem 0 .8rem; padding-top: 1rem; border-top: 1px solid var(--line);
}
.calc-advanced .calc-form > .calc-sec:first-of-type { border-top: none; padding-top: 0; margin-top: .2rem; }
.calc-sub { margin-top: .2rem; }
.calc-amount.sm input { font-size: 1.05rem; font-weight: 600; padding: .55rem .7rem; }
.calc-amount.sm .unit { font-size: .95rem; }
.field-help { font-size: .78rem; color: var(--slate); margin: .35rem 0 0; line-height: 1.4; }
.res-hsinfo {
  font-size: .85rem; color: #C7D6DB; margin: .2rem 0 0;
  padding: .5rem .7rem; background: rgba(255,255,255,.05); border-radius: 8px;
}
.res-hsinfo strong { color: #fff; }
