@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ==========================================================================
   ehpadsdefrance.css — presentation layer for the CNSA directory profile.

   The sheet is enqueued only when FDC_Config::get('slug') === 'ehpadsdefrance',
   so it is safe to style bare elements: no other vertical of the shared theme
   ever loads it.

   Structure
   1.  Design tokens
   2.  Base and typography
   3.  Utilities
   4.  Source ribbon, masthead, navigation
   5.  Bands, sections, containers
   6.  Hero and quick search
   7.  Figure panels (dark money blocks)
   8.  Entry doors, inventory, guides, stance
   9.  Search form (no-JS GET) and directory filters
   10. Result cards, toolbar, pagination, city cloud
   11. Establishment record: header, price box, action bar
   12. Tariff table, capacity tiles, features, gauges
   13. Sidebar panels: map, identity, welcome, caution, provenance
   14. Comparator
   15. Calculator
   16. Home-care services
   17. Footer
   18. Responsive (1024 / 860 / 600)
   19. Focus, motion, print
   ========================================================================== */

/* ==========================================================================
   1. Design tokens
   The seven historic --ehpad-* palette variables are kept verbatim: the static
   guard asserts their presence and templates written before the redesign may
   still reference them. Everything else is additive.
   ========================================================================== */

:root {
    /* Historic palette — do not remove, only add alongside. */
    --ehpad-navy: #17324D;
    --ehpad-green: #2E6F62;
    --ehpad-yellow: #F2D36A;
    --ehpad-paper: #F7F8F6;
    --ehpad-ink: #19242E;
    --ehpad-coral: #BD5A4B;
    --ehpad-line: #D8E0DC;

    /* Surfaces — warm paper, never clinical white on white. */
    --ehpad-bg: #FAF8F4;
    --ehpad-surface: #FFFFFF;
    --ehpad-surface-soft: #FBFAF7;
    --ehpad-surface-sand: #F3F0E9;
    --ehpad-surface-mute: #F7F7F5;

    /* Ink scale — one strong value, four documented greys. */
    --ehpad-ink-strong: #1F2A2E;
    --ehpad-ink-muted: #46565A;
    --ehpad-ink-soft: #5F6B6E;
    --ehpad-ink-dim: #6B777A;
    --ehpad-ink-faint: #7C8A8D;
    --ehpad-ink-ghost: #9AA5A8;
    --ehpad-ink-nav: #3F4C50;
    --ehpad-ink-lead: #4A585C;

    /* Eucalyptus — the brand. Care without medical coldness. */
    --ehpad-brand: #3D6B5C;
    --ehpad-brand-dark: #2A4A40;
    --ehpad-brand-mid: #6E9C86;
    --ehpad-brand-light: #8FB8A6;
    --ehpad-brand-soft: #EFF3F0;
    --ehpad-brand-border: #D3E0D8;
    --ehpad-brand-rule: #DCE6E0;

    /* Terracotta — reserved for money and calls to action. Nothing else. */
    --ehpad-terra: #B5623A;
    --ehpad-terra-dark: #8A4A2C;
    --ehpad-terra-mid: #C87F58;
    --ehpad-terra-light: #E8A87C;
    --ehpad-terra-soft: #F8EDE6;
    --ehpad-terra-border: #EBD5C7;

    /* Rules. */
    --ehpad-rule: #E6E2DA;
    --ehpad-rule-soft: #EFECE4;
    --ehpad-rule-strong: #DCD8CE;
    --ehpad-rule-sand: #E2DED4;
    --ehpad-rule-mute: #EAE7DF;
    --ehpad-rule-track: #F0EDE5;
    --ehpad-control-border: #C9C4B8;

    /* Amber — warnings and "the source does not publish this". */
    --ehpad-amber-bg: #FBF3E9;
    --ehpad-amber-border: #EBDCC7;
    --ehpad-amber-ink: #7A5A2C;
    --ehpad-amber-title: #6B4A1E;
    --ehpad-amber-icon: #A87A3C;

    /* Dark blocks: hero aside, calculator answer, footer. */
    --ehpad-dark: #1F2A2E;
    --ehpad-dark-raise: #2A3A3E;
    --ehpad-dark-rule: #38464A;
    --ehpad-dark-rule-soft: #334347;
    --ehpad-dark-text: #A9B8B3;
    --ehpad-dark-strong: #E9EDEA;
    --ehpad-dark-dim: #6E7F7A;
    --ehpad-dark-quiet: #93A29E;
    --ehpad-dark-body: #C8D4CF;

    /* Secondary establishment family (résidence autonomie). */
    --ehpad-slate: #5F7D8C;

    /* Type. */
    --ehpad-font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --ehpad-font-sans: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --ehpad-font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

    /* Radii. */
    --ehpad-r-xs: 5px;
    --ehpad-r-sm: 7px;
    --ehpad-r-md: 9px;
    --ehpad-r-lg: 11px;
    --ehpad-r-xl: 13px;
    --ehpad-r-2xl: 14px;
    --ehpad-r-3xl: 16px;
    --ehpad-r-pill: 100px;

    /* Elevation — used twice on the whole site, on purpose. */
    --ehpad-shadow: 0 6px 22px rgba(31, 42, 46, 0.07);
    --ehpad-shadow-soft: 0 6px 22px rgba(31, 42, 46, 0.06);

    /* Rhythm. */
    --ehpad-gutter: 40px;
    --ehpad-max: 1080px;
    --ehpad-tap: 44px;
}

/* ==========================================================================
   2. Base and typography
   Newsreader carries the headings, IBM Plex Sans the body, IBM Plex Mono every
   figure. Reading comfort beats density: the target reader is a worried adult
   child of 50 to 65 searching for a parent.
   ========================================================================== */

/* Border-box is assumed by every width in this sheet (a 320px price box is
   320px including its 22px of padding). The shared parent theme does not
   guarantee it, so the reset is declared here — scoped to the EHPAD
   components so nothing else on the page is disturbed. */
.ehpad-site,
.ehpad-site *,
.ehpad-site *::before,
.ehpad-site *::after,
.ehpad-sourcebar,
.ehpad-sourcebar *,
.ehpad-masthead,
.ehpad-masthead *,
.ehpad-breadcrumb,
.ehpad-breadcrumb *,
.ehpad-actionbar,
.ehpad-actionbar *,
.ehpad-footer,
.ehpad-footer * {
    box-sizing: border-box;
}

body {
    background: var(--ehpad-bg);
    color: var(--ehpad-ink-strong);
    font-family: var(--ehpad-font-sans);
    font-size: 17px;
    line-height: 1.62;
}

.ehpad-site {
    background: var(--ehpad-bg);
    color: var(--ehpad-ink-strong);
    font-family: var(--ehpad-font-sans);
    font-size: 17px;
    line-height: 1.62;
    min-height: 60vh;
}

.ehpad-site h1,
.ehpad-site h2,
.ehpad-site h3,
.ehpad-site h4 {
    color: var(--ehpad-ink-strong);
    font-family: var(--ehpad-font-serif);
    font-weight: 500;
    letter-spacing: -0.012em;
    line-height: 1.14;
    margin: 0 0 0.5rem;
    text-wrap: balance;
}

.ehpad-site h1 { font-size: clamp(2rem, 4.6vw, 2.6rem); }
.ehpad-site h2 { font-size: clamp(1.45rem, 3vw, 1.82rem); }
.ehpad-site h3 { font-size: 1.19rem; }

.ehpad-site p { margin: 0 0 0.9rem; }
.ehpad-site p:last-child { margin-bottom: 0; }

.ehpad-site a {
    color: var(--ehpad-brand-dark);
    text-decoration: none;
}

.ehpad-site a:hover,
.ehpad-site a:focus {
    color: var(--ehpad-terra);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ehpad-site strong { font-weight: 600; }

.ehpad-site img { max-width: 100%; height: auto; }

/* ==========================================================================
   3. Utilities
   .mono is already emitted by the existing templates; .ehpad-num, .ehpad-lbl
   and .ehpad-na are the mockups' .num / .lbl / .na renamed into the namespace.
   ========================================================================== */

.mono,
.ehpad-num {
    font-family: var(--ehpad-font-mono);
    font-variant-numeric: tabular-nums;
}

.ehpad-lbl {
    color: var(--ehpad-ink-faint);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* A missing value is written, never guessed. Italic + grey, always with text. */
.ehpad-na {
    color: var(--ehpad-ink-ghost);
    font-style: italic;
}

.ehpad-muted { color: var(--ehpad-ink-dim); }

.ehpad-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ehpad-stack { display: grid; gap: 1rem; align-content: start; }

.ehpad-eyebrow,
.ehpad-kicker {
    color: var(--ehpad-ink-faint);
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    margin: 0 0 0.55rem;
    text-transform: uppercase;
}

.ehpad-text-link,
.ehpad-source-line a {
    color: var(--ehpad-brand-dark);
    font-weight: 500;
}

/* ==========================================================================
   4. Source ribbon, masthead, navigation
   The ribbon states the provenance before anything else is read: the site's
   only claim to authority is that it copies an official register verbatim.
   ========================================================================== */

/* The ribbon, masthead, breadcrumb, action bar and footer usually sit in the
   theme's header.php / footer.php, outside the .ehpad-site wrapper. They need
   the type and link reset applied directly, or the parent theme's underlined
   default link leaks through. */
.ehpad-sourcebar,
.ehpad-masthead,
.ehpad-breadcrumb,
.ehpad-actionbar,
.ehpad-footer {
    font-family: var(--ehpad-font-sans);
    line-height: 1.6;
}

.ehpad-masthead a,
.ehpad-breadcrumb a,
.ehpad-actionbar a,
.ehpad-footer a { text-decoration: none; }

.ehpad-masthead a:hover:not(.ehpad-nav-cta):not(.ehpad-brand),
.ehpad-masthead a:focus:not(.ehpad-nav-cta):not(.ehpad-brand),
.ehpad-breadcrumb a:hover,
.ehpad-breadcrumb a:focus {
    color: var(--ehpad-brand-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ehpad-sourcebar {
    background: var(--ehpad-brand-dark);
    color: #D6E3DC;
    font-size: 0.84rem;
    letter-spacing: 0.01em;
    padding: 9px var(--ehpad-gutter);
}

.ehpad-sourcebar-inner {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 0 auto;
    max-width: var(--ehpad-max);
    text-align: center;
}

.ehpad-sourcebar a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }
.ehpad-sourcebar-icon { flex-shrink: 0; }

.ehpad-masthead {
    background: var(--ehpad-surface);
    border-bottom: 1px solid var(--ehpad-rule);
}

.ehpad-masthead-inner {
    align-items: center;
    display: flex;
    gap: 32px;
    justify-content: space-between;
    margin: 0 auto;
    max-width: var(--ehpad-max);
    padding: 18px var(--ehpad-gutter);
}

.ehpad-brand {
    align-items: center;
    display: flex;
    gap: 11px;
    min-height: var(--ehpad-tap);
}

.ehpad-brand:hover { text-decoration: none; }
.ehpad-brand-mark { flex-shrink: 0; }

.ehpad-brand-name {
    color: var(--ehpad-ink-strong);
    font-family: var(--ehpad-font-serif);
    font-size: 1.31rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.ehpad-brand-tld { color: var(--ehpad-brand); }

.ehpad-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    font-size: 0.97rem;
}

.ehpad-nav-link {
    align-items: center;
    color: var(--ehpad-ink-nav);
    display: inline-flex;
    min-height: var(--ehpad-tap);
}

.ehpad-nav-link[aria-current],
.ehpad-nav-link.is-current {
    border-bottom: 2px solid var(--ehpad-brand);
    color: var(--ehpad-ink-strong);
    font-weight: 600;
}

.ehpad-nav-cta {
    align-items: center;
    background: var(--ehpad-terra);
    border-radius: var(--ehpad-r-sm);
    color: #FFFFFF;
    display: inline-flex;
    font-size: 0.94rem;
    font-weight: 500;
    gap: 7px;
    min-height: var(--ehpad-tap);
    padding: 10px 17px;
}

.ehpad-nav-cta:hover,
.ehpad-nav-cta:focus {
    background: var(--ehpad-terra-dark);
    color: #FFFFFF;
    text-decoration: none;
}

/* ==========================================================================
   5. Bands, sections, containers
   ========================================================================== */

.ehpad-container {
    margin: 0 auto;
    width: min(var(--ehpad-max), calc(100% - 2 * var(--ehpad-gutter)));
}

.ehpad-band { padding: 52px var(--ehpad-gutter); }
.ehpad-band > .ehpad-container { width: min(var(--ehpad-max), 100%); }

.ehpad-band--paper { background: var(--ehpad-bg); }

.ehpad-band--surface {
    background: var(--ehpad-surface);
    border-bottom: 1px solid var(--ehpad-rule);
    border-top: 1px solid var(--ehpad-rule);
}

.ehpad-band--green {
    background: var(--ehpad-brand-soft);
    border-bottom: 1px solid var(--ehpad-brand-rule);
    border-top: 1px solid var(--ehpad-brand-rule);
}

.ehpad-band--sand {
    background: var(--ehpad-surface-sand);
    border-top: 1px solid var(--ehpad-rule-sand);
}

.ehpad-band--dark {
    background: var(--ehpad-dark);
    color: var(--ehpad-dark-strong);
}

.ehpad-band--dark h2,
.ehpad-band--dark h3 { color: #FFFFFF; }
.ehpad-band--dark p { color: var(--ehpad-dark-text); }
.ehpad-band--dark a { color: #FFFFFF; }

.ehpad-section { padding: 3rem 0; }

.ehpad-section-head {
    align-items: flex-end;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 26px;
}

.ehpad-section-title { margin-bottom: 8px; }

.ehpad-section-sub {
    color: var(--ehpad-ink-dim);
    font-size: 1.03rem;
    margin: 0;
}

.ehpad-section-link {
    font-size: 0.97rem;
    font-weight: 500;
    min-height: var(--ehpad-tap);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.ehpad-split {
    display: flex;
    gap: 52px;
    align-items: flex-start;
}

.ehpad-split-aside { width: 330px; flex-shrink: 0; }
.ehpad-split-body { flex-grow: 1; min-width: 0; }

.ehpad-intro-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
}

.ehpad-breadcrumb {
    align-items: center;
    background: var(--ehpad-surface);
    border-bottom: 1px solid var(--ehpad-rule);
    color: var(--ehpad-ink-faint);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.87rem;
    gap: 0.45rem;
    margin: 0 0 1.5rem;
    padding: 13px 0;
}

.ehpad-breadcrumb a { color: var(--ehpad-ink-faint); }
.ehpad-breadcrumb > span[aria-hidden] { color: var(--ehpad-ink-ghost); }
.ehpad-breadcrumb > span:last-child { color: var(--ehpad-ink-muted); }

.ehpad-page-heading {
    padding: 0.5rem 0 1.5rem;
}

.ehpad-page-heading h1 { color: var(--ehpad-ink-strong); }

.ehpad-page-heading p {
    color: var(--ehpad-ink-soft);
    font-size: 1.03rem;
    margin: 0;
}

.ehpad-page-heading strong { color: var(--ehpad-ink-strong); font-weight: 600; }

/* ==========================================================================
   6. Hero and quick search
   ========================================================================== */

.ehpad-hero {
    background: linear-gradient(180deg, #FFFFFF 0%, #F3F0E9 100%);
    border-bottom: 1px solid var(--ehpad-rule);
    color: var(--ehpad-ink-strong);
    padding: 60px var(--ehpad-gutter) 52px;
}

.ehpad-hero > .ehpad-container { width: min(var(--ehpad-max), 100%); }

.ehpad-hero h1 {
    color: var(--ehpad-ink-strong);
    font-size: clamp(2.1rem, 5vw, 3.13rem);
    margin-bottom: 20px;
    max-width: 640px;
}

.ehpad-hero .ehpad-eyebrow { color: var(--ehpad-brand-dark); }

.ehpad-hero--green {
    background: linear-gradient(180deg, #FFFFFF 0%, #EFF3F0 100%);
    border-bottom: 1px solid var(--ehpad-brand-rule);
}

.ehpad-hero-grid {
    align-items: flex-start;
    display: flex;
    gap: 56px;
}

.ehpad-hero-main {
    flex-grow: 1;
    max-width: 580px;
    min-width: 0;
}

.ehpad-lead,
.ehpad-hero-lead {
    color: var(--ehpad-ink-lead);
    font-size: 1.12rem;
    line-height: 1.6;
    margin-bottom: 14px;
    max-width: 640px;
}

.ehpad-hero-sub {
    color: var(--ehpad-ink-dim);
    font-size: 0.97rem;
    margin-bottom: 30px;
    max-width: 640px;
}

.ehpad-badge {
    align-items: center;
    background: var(--ehpad-brand-soft);
    border: 1px solid var(--ehpad-brand-border);
    border-radius: var(--ehpad-r-pill);
    color: var(--ehpad-brand-dark);
    display: inline-flex;
    font-size: 0.79rem;
    font-weight: 500;
    gap: 8px;
    margin-bottom: 22px;
    padding: 6px 13px;
}

.ehpad-badge-dot {
    background: var(--ehpad-brand);
    border-radius: 50%;
    height: 6px;
    width: 6px;
    flex-shrink: 0;
}

/* Single-field search box sitting inside the hero. */
.ehpad-quicksearch {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule-strong);
    border-radius: var(--ehpad-r-2xl);
    box-shadow: var(--ehpad-shadow);
    padding: 22px;
}

.ehpad-quicksearch-label {
    color: var(--ehpad-ink-nav);
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.ehpad-quicksearch-row { display: flex; gap: 10px; }

.ehpad-quicksearch-field {
    align-items: center;
    background: var(--ehpad-surface-soft);
    border: 1px solid var(--ehpad-rule-strong);
    border-radius: var(--ehpad-r-md);
    display: flex;
    flex-grow: 1;
    gap: 10px;
    min-width: 0;
    padding: 0 14px;
}

.ehpad-quicksearch-field svg { flex-shrink: 0; }

.ehpad-quicksearch-input {
    background: transparent;
    border: 0;
    color: var(--ehpad-ink-strong);
    flex-grow: 1;
    font-family: var(--ehpad-font-sans);
    font-size: 1rem;
    min-height: var(--ehpad-tap);
    min-width: 0;
    outline: none;
    padding: 13px 0;
}

.ehpad-quicksearch-submit {
    background: var(--ehpad-brand);
    border: 0;
    border-radius: var(--ehpad-r-md);
    color: #FFFFFF;
    cursor: pointer;
    font-family: var(--ehpad-font-sans);
    font-size: 1rem;
    font-weight: 500;
    min-height: var(--ehpad-tap);
    padding: 13px 24px;
    white-space: nowrap;
}

.ehpad-quicksearch-submit:hover,
.ehpad-quicksearch-submit:focus { background: var(--ehpad-brand-dark); }

.ehpad-quicklinks {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.ehpad-quicklinks-label { color: var(--ehpad-ink-faint); font-size: 0.84rem; }

.ehpad-chip {
    background: var(--ehpad-surface-sand);
    border: 1px solid var(--ehpad-rule-sand);
    border-radius: var(--ehpad-r-pill);
    color: var(--ehpad-ink-nav);
    display: inline-flex;
    align-items: center;
    font-size: 0.84rem;
    padding: 5px 11px;
}

.ehpad-chip:hover,
.ehpad-chip:focus {
    background: var(--ehpad-brand-soft);
    border-color: var(--ehpad-brand-border);
    color: var(--ehpad-brand-dark);
    text-decoration: none;
}

/* ==========================================================================
   7. Figure panels — the dark blocks that carry a single number
   ========================================================================== */

.ehpad-figure-panel {
    background: var(--ehpad-dark);
    border-radius: var(--ehpad-r-3xl);
    color: var(--ehpad-dark-strong);
    padding: 28px;
    width: 340px;
    flex-shrink: 0;
}

.ehpad-figure-label {
    color: var(--ehpad-brand-light);
    font-size: 0.79rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.ehpad-figure-value {
    align-items: baseline;
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.ehpad-figure-value > .ehpad-num,
.ehpad-figure-amount {
    color: #FFFFFF;
    font-family: var(--ehpad-font-serif);
    font-size: 3.3rem;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    line-height: 1;
}

.ehpad-figure-unit { color: var(--ehpad-dark-text); font-size: 1.13rem; }

.ehpad-figure-note {
    color: var(--ehpad-dark-text);
    font-size: 0.87rem;
    margin-bottom: 22px;
}

.ehpad-figure-rule {
    background: var(--ehpad-dark-rule);
    height: 1px;
    margin-bottom: 20px;
}

.ehpad-figure-rows { display: flex; flex-direction: column; gap: 14px; }

.ehpad-figure-row {
    align-items: baseline;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.ehpad-figure-row-key { color: var(--ehpad-dark-text); font-size: 0.87rem; }

.ehpad-figure-row-value {
    color: #FFFFFF;
    font-family: var(--ehpad-font-mono);
    font-size: 0.94rem;
    font-variant-numeric: tabular-nums;
}

.ehpad-figure-row-value--accent { color: var(--ehpad-terra-light); }

.ehpad-figure-aside {
    background: var(--ehpad-dark-raise);
    border-radius: var(--ehpad-r-lg);
    margin-top: 22px;
    padding: 14px;
}

.ehpad-figure-aside p {
    color: var(--ehpad-dark-body);
    font-size: 0.84rem;
    line-height: 1.5;
    margin: 0;
}

.ehpad-figure-aside strong { color: #FFFFFF; font-weight: 600; }

.ehpad-stat-panel {
    background: var(--ehpad-dark-raise);
    border-radius: var(--ehpad-r-xl);
    padding: 20px;
    width: 300px;
    flex-shrink: 0;
}

.ehpad-stat-label {
    color: var(--ehpad-brand-light);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.ehpad-stat-value {
    color: #FFFFFF;
    font-family: var(--ehpad-font-serif);
    font-size: 2.6rem;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    line-height: 1;
}

.ehpad-stat-text {
    color: var(--ehpad-dark-text);
    font-size: 0.87rem;
    line-height: 1.5;
    margin-top: 8px;
}

/* ==========================================================================
   8. Entry doors, record inventory, guides, editorial stance
   ========================================================================== */

.ehpad-doors {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ehpad-door {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-2xl);
    display: flex;
    flex-direction: column;
    padding: 26px;
}

.ehpad-door:hover { border-color: var(--ehpad-brand-border); text-decoration: none; }

/* The money door is the only one allowed to wear terracotta. */
.ehpad-door--accent { border: 2px solid var(--ehpad-terra); padding: 25px; }
.ehpad-door--accent:hover { border-color: var(--ehpad-terra-dark); }

.ehpad-door-icon {
    align-items: center;
    background: var(--ehpad-brand-soft);
    border-radius: var(--ehpad-r-lg);
    display: grid;
    height: 44px;
    justify-items: center;
    margin-bottom: 18px;
    place-items: center;
    width: 44px;
}

.ehpad-door-icon--accent { background: var(--ehpad-terra-soft); }

.ehpad-door-title { font-size: 1.25rem; margin-bottom: 9px; }

.ehpad-door-text {
    color: var(--ehpad-ink-dim);
    flex-grow: 1;
    font-size: 0.97rem;
    line-height: 1.55;
    margin: 0;
}

.ehpad-door-more {
    align-items: center;
    color: var(--ehpad-brand-dark);
    display: inline-flex;
    font-size: 0.94rem;
    font-weight: 500;
    gap: 7px;
    margin-top: 18px;
    min-height: var(--ehpad-tap);
}

.ehpad-door--accent .ehpad-door-more { color: var(--ehpad-terra); }

.ehpad-inventory {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ehpad-inventory-item {
    background: var(--ehpad-surface-soft);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-lg);
    display: flex;
    gap: 13px;
    padding: 16px;
}

.ehpad-inventory-icon { flex-shrink: 0; margin-top: 2px; }

.ehpad-inventory-title {
    color: var(--ehpad-ink-strong);
    font-family: var(--ehpad-font-sans);
    font-size: 0.97rem;
    font-weight: 600;
    letter-spacing: 0;
    margin-bottom: 3px;
}

.ehpad-inventory-text {
    color: var(--ehpad-ink-dim);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.ehpad-guides {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ehpad-guide {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-xl);
    display: flex;
    flex-direction: column;
    padding: 22px;
}

.ehpad-guide:hover { border-color: var(--ehpad-brand-border); text-decoration: none; }

.ehpad-guide-tag {
    color: var(--ehpad-brand);
    font-family: var(--ehpad-font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    margin-bottom: 11px;
    text-transform: uppercase;
}

.ehpad-guide-tag--aid { color: var(--ehpad-terra); }

.ehpad-guide-title { font-size: 1.09rem; margin-bottom: 8px; }

.ehpad-guide-text {
    color: var(--ehpad-ink-dim);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.ehpad-stance { display: flex; gap: 40px; align-items: flex-start; }
.ehpad-stance-icon { flex-shrink: 0; margin-top: 4px; }
.ehpad-stance-body { flex-grow: 1; min-width: 0; }
.ehpad-stance-title { font-size: 1.44rem; margin-bottom: 12px; }

.ehpad-stance-grid {
    display: grid;
    gap: 26px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
}

.ehpad-stance-text {
    color: var(--ehpad-ink-muted);
    font-size: 0.94rem;
    line-height: 1.55;
    margin: 0;
}

.ehpad-independence {
    color: var(--ehpad-ink-soft);
    font-size: 0.9rem;
    margin-top: 1.25rem;
    max-width: 720px;
}

.ehpad-source-line {
    color: var(--ehpad-ink-soft);
    font-size: 0.87rem;
    margin: 1.75rem 0 0;
}

/* ==========================================================================
   9. Search form (no-JS GET) and directory filters
   Every filter is a plain form control inside a GET form: each combination has
   its own address, shareable and bookmarkable, with or without JavaScript.
   ========================================================================== */

/* Touch-target floor. Every real control clears 44px before any component
   style is applied; --ehpad-tap carries the same value everywhere else.
   Visually hidden proxies are excluded: their label is the target. */
.ehpad-site button,
.ehpad-site select,
.ehpad-site textarea,
.ehpad-site input:not([type="hidden"]):not(.ehpad-filter-input):not(.ehpad-choice-input):not(.ehpad-gir-input) {
    min-height: 44px;
}

.ehpad-search-form {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-2xl);
    color: var(--ehpad-ink-strong);
    margin: 1.5rem 0;
    padding: 22px;
}

.ehpad-hero .ehpad-search-form {
    box-shadow: var(--ehpad-shadow);
    border-color: var(--ehpad-rule-strong);
}

.ehpad-search-grid {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ehpad-search-grid label {
    color: var(--ehpad-ink-nav);
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.ehpad-search-grid input,
.ehpad-search-grid select,
.ehpad-sort-select,
.ehpad-amount-field input {
    background: var(--ehpad-surface-soft);
    border: 1px solid var(--ehpad-rule-strong);
    border-radius: var(--ehpad-r-md);
    color: var(--ehpad-ink-strong);
    font-family: var(--ehpad-font-sans);
    font-size: 0.97rem;
    min-height: var(--ehpad-tap);
    padding: 0.7rem 0.8rem;
    width: 100%;
}

.ehpad-search-grid input::placeholder { color: var(--ehpad-ink-ghost); }

.ehpad-search-grid input:hover,
.ehpad-search-grid select:hover { border-color: var(--ehpad-brand-border); }

.ehpad-search-submit { align-self: end; }

.ehpad-search-submit button,
.ehpad-button,
.ehpad-search-form button,
.ehpad-compare-trigger {
    align-items: center;
    background: var(--ehpad-brand);
    border: 1px solid var(--ehpad-brand);
    border-radius: var(--ehpad-r-md);
    color: #FFFFFF;
    cursor: pointer;
    display: inline-flex;
    font-family: var(--ehpad-font-sans);
    font-size: 0.97rem;
    font-weight: 500;
    gap: 0.5rem;
    justify-content: center;
    min-height: var(--ehpad-tap);
    padding: 0.7rem 1.15rem;
    text-decoration: none;
}

.ehpad-search-submit button { width: 100%; }

.ehpad-button-secondary,
.ehpad-compare-trigger {
    background: var(--ehpad-surface);
    border-color: var(--ehpad-brand-border);
    color: var(--ehpad-brand-dark);
}

.ehpad-search-form button:hover,
.ehpad-button:hover,
.ehpad-button:focus,
.ehpad-compare-trigger:hover,
.ehpad-compare-trigger:focus {
    background: var(--ehpad-brand-dark);
    border-color: var(--ehpad-brand-dark);
    color: #FFFFFF;
    text-decoration: none;
}

.ehpad-button--accent { background: var(--ehpad-terra); border-color: var(--ehpad-terra); }
.ehpad-button--accent:hover,
.ehpad-button--accent:focus { background: var(--ehpad-terra-dark); border-color: var(--ehpad-terra-dark); }

.ehpad-compare-trigger[aria-pressed="true"] {
    background: var(--ehpad-brand-soft);
    border-color: var(--ehpad-brand);
    color: var(--ehpad-brand-dark);
    font-weight: 600;
}

.ehpad-compare-trigger[aria-pressed="true"]::before { content: '\2713\00a0'; }

.ehpad-directory {
    align-items: flex-start;
    display: flex;
    gap: 24px;
}

.ehpad-filters {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 16px;
    width: 244px;
}

.ehpad-filter {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-xl);
    padding: 20px;
}

.ehpad-filter-title { font-size: 1.06rem; margin-bottom: 14px; }

.ehpad-filter-hint {
    color: var(--ehpad-ink-faint);
    font-size: 0.81rem;
    margin: -8px 0 14px;
}

.ehpad-filter-list { display: flex; flex-direction: column; gap: 2px; }

.ehpad-filter-option {
    align-items: center;
    border-radius: var(--ehpad-r-sm);
    cursor: pointer;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-height: var(--ehpad-tap);
    padding: 0 4px;
}

.ehpad-filter-option:hover { background: var(--ehpad-surface-soft); }

.ehpad-filter-option > span:first-child {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

/* The real control stays in the DOM and keeps the form working without JS. */
.ehpad-filter-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    margin: 0;
}

.ehpad-filter-box {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-control-border);
    border-radius: var(--ehpad-r-xs);
    flex-shrink: 0;
    height: 18px;
    position: relative;
    width: 18px;
}

.ehpad-filter-input:checked + .ehpad-filter-box {
    background: var(--ehpad-brand);
    border-color: var(--ehpad-brand);
}

.ehpad-filter-input:checked + .ehpad-filter-box::after {
    border: 2.4px solid #FFFFFF;
    border-left: 0;
    border-top: 0;
    content: '';
    height: 9px;
    left: 5px;
    position: absolute;
    top: 2px;
    transform: rotate(43deg);
    width: 5px;
}

/* Aid-related filters carry the money colour, like everywhere else. */
.ehpad-filter--aid .ehpad-filter-input:checked + .ehpad-filter-box {
    background: var(--ehpad-terra);
    border-color: var(--ehpad-terra);
}

.ehpad-filter-label { font-size: 0.85rem; }

.ehpad-filter-count {
    color: var(--ehpad-ink-ghost);
    font-family: var(--ehpad-font-mono);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.ehpad-filter-range { margin-top: 4px; }

.ehpad-filter-range input[type="range"] {
    accent-color: var(--ehpad-brand);
    min-height: var(--ehpad-tap);
    width: 100%;
}

.ehpad-range-scale {
    color: var(--ehpad-ink-dim);
    display: flex;
    font-family: var(--ehpad-font-mono);
    font-size: 0.81rem;
    font-variant-numeric: tabular-nums;
    justify-content: space-between;
}

.ehpad-range-scale strong { color: var(--ehpad-ink-strong); font-weight: 600; }

.ehpad-filter-actions { display: grid; gap: 8px; }

.ehpad-filter-note {
    background: var(--ehpad-surface-sand);
    border: 1px solid var(--ehpad-rule-sand);
    border-radius: var(--ehpad-r-xl);
    color: var(--ehpad-ink-soft);
    font-size: 0.81rem;
    line-height: 1.5;
    padding: 18px;
}

.ehpad-filter-note strong { font-weight: 600; }

/* ==========================================================================
   10. Result cards, toolbar, pagination, city cloud
   ========================================================================== */

.ehpad-results-column {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 14px;
    min-width: 0;
}

.ehpad-toolbar {
    align-items: center;
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-lg);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    padding: 10px 16px;
}

.ehpad-toolbar-count { color: var(--ehpad-ink-soft); font-size: 0.87rem; }
.ehpad-toolbar-count strong { color: var(--ehpad-ink-strong); font-weight: 600; }

.ehpad-toolbar-sort {
    align-items: center;
    display: flex;
    gap: 9px;
}

.ehpad-toolbar-sort-label { color: var(--ehpad-ink-faint); font-size: 0.85rem; }

.ehpad-sort-select { width: auto; min-width: 180px; }

.ehpad-results {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

/* Optional three-up presentation for landing pages. */
.ehpad-results--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ehpad-results--grid .ehpad-card { grid-template-columns: 1fr; }
.ehpad-results--grid .ehpad-card-facts { grid-column: 1; grid-row: auto; text-align: left; }

/* .ehpad-card and .ehpad-result share the same visual: the record row, with
   the establishment on the left and the money on the right. .ehpad-card is the
   historic markup (flat children), .ehpad-result the mockup-faithful one. */
.ehpad-card,
.ehpad-result {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-xl);
    padding: 20px;
}

.ehpad-card {
    align-items: start;
    column-gap: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 172px;
    row-gap: 0.4rem;
}

.ehpad-card > * { grid-column: 1; min-width: 0; }

.ehpad-card-top {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}

.ehpad-card-top .ehpad-kicker {
    background: var(--ehpad-brand);
    border-radius: var(--ehpad-r-xs);
    color: #FFFFFF;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    margin: 0;
    padding: 4px 9px;
    text-transform: none;
}

.ehpad-card h2,
.ehpad-result-title {
    font-size: 1.31rem;
    margin: 0;
}

.ehpad-card h2 a,
.ehpad-result-title a { color: var(--ehpad-ink-strong); }

.ehpad-finess {
    color: var(--ehpad-ink-ghost);
    font-family: var(--ehpad-font-mono);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.ehpad-card-place,
.ehpad-result-address {
    align-items: center;
    color: var(--ehpad-ink-dim);
    display: flex;
    font-size: 0.9rem;
    gap: 8px;
    margin: 0;
}

.ehpad-result-facts,
.ehpad-card .ehpad-facts--inline {
    color: var(--ehpad-ink-soft);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.87rem;
    gap: 18px;
    margin-top: 11px;
}

.ehpad-result-facts strong { color: var(--ehpad-ink-strong); font-weight: 600; }

/* Right-hand money column. */
.ehpad-card-facts {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    text-align: right;
}

.ehpad-card-facts > div + div { margin-top: 0.75rem; }

.ehpad-card-facts dt {
    color: var(--ehpad-ink-faint);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.ehpad-card-facts dd {
    color: var(--ehpad-ink-strong);
    font-family: var(--ehpad-font-mono);
    font-size: 1.06rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    margin: 0.15rem 0 0;
}

.ehpad-card .ehpad-compare-trigger {
    grid-column: 1;
    justify-self: start;
    margin-top: 0.55rem;
}

.ehpad-result-body {
    display: flex;
    gap: 22px;
    justify-content: space-between;
}

.ehpad-result-main { flex-grow: 1; min-width: 0; }

.ehpad-result-price {
    flex-shrink: 0;
    text-align: right;
    width: 168px;
}

.ehpad-result-price-label {
    color: var(--ehpad-ink-faint);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.ehpad-result-price-value {
    color: var(--ehpad-ink-strong);
    font-family: var(--ehpad-font-serif);
    font-size: 1.69rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    line-height: 1.1;
}

.ehpad-result-price-unit {
    color: var(--ehpad-ink-faint);
    font-size: 0.81rem;
    margin-bottom: 12px;
}

/* An establishment that never declared a price says so, and nothing else. */
.ehpad-result-price-absent {
    color: var(--ehpad-ink-ghost);
    font-size: 0.94rem;
    font-style: italic;
    margin-bottom: 4px;
}

.ehpad-result-price-note {
    color: var(--ehpad-ink-faint);
    font-size: 0.78rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.ehpad-result-link {
    background: var(--ehpad-surface-soft);
    border: 1px solid var(--ehpad-rule-strong);
    border-radius: var(--ehpad-r-sm);
    color: var(--ehpad-brand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.87rem;
    min-height: var(--ehpad-tap);
    padding: 9px;
    text-align: center;
}

.ehpad-result-link:hover,
.ehpad-result-link:focus {
    background: var(--ehpad-brand-soft);
    border-color: var(--ehpad-brand-border);
    text-decoration: none;
}

.ehpad-empty {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-2xl);
    color: var(--ehpad-ink-soft);
    margin: 1rem 0 2rem;
    padding: 2rem;
}

.ehpad-empty h2 { margin-bottom: 0.5rem; }

.ehpad-pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 14px 0;
}

.ehpad-pagination .page-numbers,
.ehpad-pagination a,
.ehpad-page-item {
    align-items: center;
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-sm);
    color: var(--ehpad-ink-muted);
    display: inline-flex;
    font-size: 0.94rem;
    justify-content: center;
    min-height: var(--ehpad-tap);
    min-width: var(--ehpad-tap);
    padding: 0 11px;
    text-decoration: none;
}

.ehpad-pagination .page-numbers.current,
.ehpad-page-item.is-current {
    background: var(--ehpad-brand);
    border-color: var(--ehpad-brand);
    color: #FFFFFF;
    font-weight: 600;
}

.ehpad-pagination .page-numbers.dots {
    background: transparent;
    border: 0;
    color: var(--ehpad-ink-ghost);
    min-width: auto;
}

.ehpad-pagination a:hover,
.ehpad-pagination a:focus {
    border-color: var(--ehpad-brand-border);
    color: var(--ehpad-brand-dark);
    text-decoration: none;
}

.ehpad-cities {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-xl);
    padding: 22px;
}

.ehpad-cities-title { font-size: 1.25rem; margin-bottom: 14px; }

.ehpad-cities-list { display: flex; flex-wrap: wrap; gap: 8px; }

.ehpad-city {
    align-items: center;
    background: var(--ehpad-surface-sand);
    border: 1px solid var(--ehpad-rule-sand);
    border-radius: var(--ehpad-r-pill);
    color: var(--ehpad-ink-nav);
    display: inline-flex;
    font-size: 0.87rem;
    gap: 7px;
    padding: 7px 13px;
}

.ehpad-city:hover,
.ehpad-city:focus {
    background: var(--ehpad-brand-soft);
    border-color: var(--ehpad-brand-border);
    color: var(--ehpad-brand-dark);
    text-decoration: none;
}

.ehpad-city-count {
    color: var(--ehpad-ink-ghost);
    font-family: var(--ehpad-font-mono);
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   11. Establishment record: header, price box, action bar
   ========================================================================== */

.ehpad-profile-head,
.ehpad-profile-hero {
    align-items: flex-start;
    display: flex;
    gap: 40px;
    justify-content: space-between;
    padding: 1rem 0 1.75rem;
}

.ehpad-profile-head > div:first-child,
.ehpad-profile-hero > div:first-child { flex-grow: 1; min-width: 0; }

.ehpad-profile-head h1 {
    color: var(--ehpad-ink-strong);
    font-size: clamp(1.9rem, 4vw, 2.38rem);
    margin-bottom: 11px;
}

.ehpad-profile-place,
.ehpad-profile-address,
.ehpad-profile-manager {
    align-items: center;
    color: var(--ehpad-ink-soft);
    display: flex;
    font-size: 1rem;
    gap: 9px;
    margin: 0 0 7px;
}

.ehpad-id-stamp {
    background: var(--ehpad-surface-sand);
    border: 1px solid var(--ehpad-rule-sand);
    border-radius: var(--ehpad-r-lg);
    display: grid;
    gap: 0.25rem;
    margin: 0;
    padding: 0.85rem 1.1rem;
}

.ehpad-id-stamp span {
    color: var(--ehpad-ink-faint);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.ehpad-id-stamp strong {
    font-family: var(--ehpad-font-mono);
    font-size: 0.97rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

/* Establishment badges: type, legal status, aid, dedicated units. */
.ehpad-tags {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 13px;
}

.ehpad-tag {
    background: var(--ehpad-brand-soft);
    border: 1px solid var(--ehpad-brand-border);
    border-radius: var(--ehpad-r-sm);
    color: var(--ehpad-brand-dark);
    display: inline-flex;
    align-items: center;
    font-size: 0.81rem;
    padding: 5px 11px;
}

.ehpad-tag--type {
    background: var(--ehpad-brand);
    border-color: var(--ehpad-brand);
    color: #FFFFFF;
    font-weight: 600;
}

.ehpad-tag--ra {
    background: var(--ehpad-slate);
    border-color: var(--ehpad-slate);
    color: #FFFFFF;
    font-weight: 600;
}

.ehpad-tag--aid {
    background: var(--ehpad-terra-soft);
    border-color: var(--ehpad-terra-border);
    color: var(--ehpad-terra-dark);
}

.ehpad-tag--muted {
    background: var(--ehpad-surface-mute);
    border-color: var(--ehpad-rule-mute);
    color: var(--ehpad-ink-faint);
}

/* The price box: the reason the site exists. */
.ehpad-price-box {
    background: var(--ehpad-surface-soft);
    border: 2px solid var(--ehpad-terra);
    border-radius: var(--ehpad-r-2xl);
    flex-shrink: 0;
    padding: 22px;
    width: 320px;
}

.ehpad-price-headline {
    color: var(--ehpad-ink-faint);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    margin-bottom: 11px;
    text-transform: uppercase;
}

.ehpad-price-amount {
    align-items: baseline;
    display: flex;
    gap: 7px;
    margin-bottom: 3px;
}

.ehpad-price-amount > .ehpad-num,
.ehpad-price-figure {
    color: var(--ehpad-ink-strong);
    font-family: var(--ehpad-font-serif);
    font-size: 2.5rem;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    line-height: 1;
}

.ehpad-price-unit { color: var(--ehpad-ink-dim); font-size: 1rem; }

.ehpad-price-detail {
    color: var(--ehpad-ink-faint);
    font-size: 0.84rem;
    margin-bottom: 16px;
}

.ehpad-price-breakdown {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-md);
    margin-bottom: 14px;
    padding: 13px;
}

.ehpad-price-breakdown-row {
    display: flex;
    font-size: 0.87rem;
    gap: 12px;
    justify-content: space-between;
}

.ehpad-price-breakdown-row + .ehpad-price-breakdown-row { margin-top: 6px; }
.ehpad-price-breakdown-row > span:first-child { color: var(--ehpad-ink-dim); }

.ehpad-price-breakdown-row > .ehpad-num,
.ehpad-price-breakdown-row > span:last-child { color: var(--ehpad-ink-strong); }

.ehpad-price-cta {
    align-items: center;
    background: var(--ehpad-terra);
    border-radius: var(--ehpad-r-md);
    color: #FFFFFF;
    display: flex;
    font-size: 0.94rem;
    font-weight: 500;
    gap: 8px;
    justify-content: center;
    min-height: var(--ehpad-tap);
    padding: 13px;
}

.ehpad-price-cta:hover,
.ehpad-price-cta:focus { background: var(--ehpad-terra-dark); color: #FFFFFF; text-decoration: none; }

.ehpad-price-stamp {
    color: var(--ehpad-ink-faint);
    font-size: 0.78rem;
    margin-top: 10px;
    text-align: center;
}

/* Contact strip: the point is to let the reader call the establishment
   directly, not to route them through us. */
.ehpad-actionbar {
    background: var(--ehpad-brand-soft);
    border-bottom: 1px solid var(--ehpad-brand-rule);
    border-top: 1px solid var(--ehpad-brand-rule);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 1.5rem;
    padding: 16px 0;
}

.ehpad-action {
    align-items: center;
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-brand-border);
    border-radius: var(--ehpad-r-sm);
    color: var(--ehpad-brand-dark);
    display: inline-flex;
    font-size: 0.94rem;
    gap: 8px;
    min-height: var(--ehpad-tap);
    padding: 11px 18px;
}

.ehpad-action:hover,
.ehpad-action:focus { border-color: var(--ehpad-brand); text-decoration: none; }

.ehpad-action--primary {
    background: var(--ehpad-brand);
    border-color: var(--ehpad-brand);
    color: #FFFFFF;
    font-weight: 500;
}

.ehpad-action--primary:hover,
.ehpad-action--primary:focus { background: var(--ehpad-brand-dark); color: #FFFFFF; }

.ehpad-action-icon { flex-shrink: 0; }

.ehpad-profile-grid {
    align-items: start;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) 310px;
}

.ehpad-profile-main,
.ehpad-profile-aside {
    align-content: start;
    display: grid;
    gap: 20px;
    min-width: 0;
}

.ehpad-panel,
.ehpad-source-panel {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-2xl);
    padding: 26px;
}

.ehpad-panel h2,
.ehpad-source-panel h2,
.ehpad-panel-title {
    color: var(--ehpad-ink-strong);
    font-size: 1.56rem;
    margin: 0 0 6px;
}

.ehpad-panel h3 { font-size: 1.13rem; margin-bottom: 13px; }

.ehpad-panel-head {
    align-items: baseline;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 6px;
}

.ehpad-panel-head .ehpad-panel-title { margin-bottom: 0; }

.ehpad-panel-stamp { color: var(--ehpad-ink-faint); font-size: 0.84rem; }

.ehpad-panel-intro {
    color: var(--ehpad-ink-dim);
    font-size: 0.94rem;
    margin-bottom: 20px;
}

/* Registry-style key/value list. */
.ehpad-facts { display: grid; gap: 0; margin: 0; }

.ehpad-facts > div {
    border-bottom: 1px solid var(--ehpad-rule-soft);
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(150px, 0.42fr) 1fr;
    padding: 0.7rem 0;
}

.ehpad-facts > div:last-child { border-bottom: 0; }

.ehpad-facts dt {
    color: var(--ehpad-ink-faint);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.ehpad-facts dd {
    color: var(--ehpad-ink-strong);
    font-size: 0.97rem;
    margin: 0;
}

.ehpad-action-panel { display: grid; gap: 0.7rem; }
.ehpad-action-panel h2 { margin-bottom: 0.4rem; }

/* ==========================================================================
   12. Tariff table, capacity tiles, features, gauges
   ========================================================================== */

.ehpad-tariff-wrap {
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-lg);
    overflow-x: auto;
}

.ehpad-tariff {
    border-collapse: collapse;
    min-width: 560px;
    width: 100%;
}

.ehpad-tariff caption {
    color: var(--ehpad-ink-dim);
    font-size: 0.94rem;
    padding: 0 0 12px;
    text-align: left;
}

.ehpad-tariff thead th {
    background: var(--ehpad-surface-sand);
    border-bottom: 1px solid var(--ehpad-rule);
    color: var(--ehpad-ink-muted);
    font-size: 0.81rem;
    font-weight: 600;
    padding: 11px 14px;
    text-align: right;
}

.ehpad-tariff thead th:first-child { text-align: left; }

.ehpad-tariff tbody th,
.ehpad-tariff-label {
    border-bottom: 1px solid var(--ehpad-rule-soft);
    color: var(--ehpad-ink-strong);
    font-size: 0.94rem;
    font-weight: 400;
    padding: 12px 14px;
    text-align: left;
}

.ehpad-tariff td,
.ehpad-tariff-cell {
    border-bottom: 1px solid var(--ehpad-rule-soft);
    font-family: var(--ehpad-font-mono);
    font-size: 0.94rem;
    font-variant-numeric: tabular-nums;
    padding: 12px 14px;
    text-align: right;
    white-space: nowrap;
}

.ehpad-tariff tbody tr:nth-child(even) th,
.ehpad-tariff tbody tr:nth-child(even) td,
.ehpad-tariff-row--alt { background: var(--ehpad-surface-soft); }

.ehpad-tariff tbody tr:last-child th,
.ehpad-tariff tbody tr:last-child td { border-bottom: 0; }

.ehpad-tariff-cell--total { font-weight: 600; }

.ehpad-tariff .ehpad-na,
.ehpad-tariff-cell--absent {
    color: var(--ehpad-ink-ghost);
    font-family: var(--ehpad-font-sans);
    font-style: italic;
}

.ehpad-gir-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
}

.ehpad-gir {
    background: var(--ehpad-brand-soft);
    border-radius: var(--ehpad-r-lg);
    padding: 15px;
}

/* GIR 5-6 always stays with the resident: it wears the money colour. */
.ehpad-gir--charge { background: var(--ehpad-terra-soft); }

.ehpad-gir-label {
    color: var(--ehpad-ink-faint);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.ehpad-gir-value {
    color: var(--ehpad-ink-strong);
    font-family: var(--ehpad-font-mono);
    font-size: 1.31rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.ehpad-gir-unit { color: var(--ehpad-ink-dim); font-size: 0.87rem; font-weight: 400; }

.ehpad-gir-note { color: var(--ehpad-terra-dark); font-size: 0.78rem; margin-top: 4px; }

.ehpad-capacity-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.ehpad-capacity-tile {
    background: var(--ehpad-surface-soft);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-lg);
    padding: 16px;
}

.ehpad-capacity-tile--ash {
    background: var(--ehpad-terra-soft);
    border-color: var(--ehpad-terra-border);
}

.ehpad-capacity-value {
    color: var(--ehpad-ink-strong);
    font-family: var(--ehpad-font-mono);
    font-size: 1.75rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    line-height: 1.15;
}

.ehpad-capacity-tile--ash .ehpad-capacity-value,
.ehpad-capacity-tile--ash .ehpad-capacity-label { color: var(--ehpad-terra-dark); }

.ehpad-capacity-label { color: var(--ehpad-ink-dim); font-size: 0.87rem; margin-top: 3px; }

/* Equipment grid: present and absent are both stated, never implied. */
.ehpad-features {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ehpad-feature {
    align-items: center;
    background: var(--ehpad-surface-soft);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-md);
    display: flex;
    gap: 11px;
    min-height: var(--ehpad-tap);
    padding: 12px 14px;
}

.ehpad-feature--absent {
    background: var(--ehpad-surface-mute);
    border-color: var(--ehpad-rule-mute);
    color: var(--ehpad-ink-faint);
}

.ehpad-feature-mark { flex-shrink: 0; }
.ehpad-feature-label { font-size: 0.94rem; }
.ehpad-feature--absent .ehpad-feature-label { color: var(--ehpad-ink-faint); }

/* Operating indicators. The national average is a marker on the track, not a
   verdict: we publish the two numbers side by side and stop there. */
.ehpad-gauges { display: flex; flex-direction: column; gap: 15px; }

.ehpad-gauge-head {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 7px;
}

.ehpad-gauge-name { font-size: 0.97rem; font-weight: 500; }

.ehpad-gauge-figures { color: var(--ehpad-ink-dim); font-size: 0.87rem; }

.ehpad-gauge-value {
    color: var(--ehpad-ink-strong);
    font-family: var(--ehpad-font-mono);
    font-size: 1.06rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.ehpad-gauge-average { font-family: var(--ehpad-font-mono); font-variant-numeric: tabular-nums; }

.ehpad-gauge-track {
    background: var(--ehpad-rule-track);
    border-radius: var(--ehpad-r-pill);
    height: 9px;
    position: relative;
}

/* Width and marker offset come from the template as inline custom properties:
   style="--ehpad-gauge-fill:55%;--ehpad-gauge-mark:71%". */
.ehpad-gauge-fill {
    background: var(--ehpad-brand-mid);
    border-radius: var(--ehpad-r-pill);
    height: 9px;
    left: 0;
    max-width: 100%;
    position: absolute;
    top: 0;
    width: var(--ehpad-gauge-fill, 0%);
}

.ehpad-gauge-fill--under { background: var(--ehpad-terra-mid); }

.ehpad-gauge-mark {
    background: var(--ehpad-ink-muted);
    height: 17px;
    left: var(--ehpad-gauge-mark, 50%);
    position: absolute;
    top: -4px;
    width: 2px;
}

.ehpad-gauge-note {
    color: var(--ehpad-ink-faint);
    font-size: 0.81rem;
    margin-top: 6px;
}

/* Pale green explanatory note with an icon. */
.ehpad-info,
.ehpad-data-note {
    background: var(--ehpad-brand-soft);
    border: 0;
    border-radius: var(--ehpad-r-lg);
    color: var(--ehpad-ink-muted);
    display: flex;
    font-size: 0.9rem;
    gap: 11px;
    line-height: 1.55;
    margin: 0;
    padding: 15px;
}

.ehpad-info-icon { flex-shrink: 0; margin-top: 2px; }
.ehpad-info-text { margin: 0; }

/* ==========================================================================
   13. Sidebar panels: map, identity, welcome, caution, provenance
   ========================================================================== */

.ehpad-mapcard {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-2xl);
    overflow: hidden;
}

.ehpad-map {
    background: #E4E8E2;
    height: 190px;
    position: relative;
    width: 100%;
}

.ehpad-map-placeholder {
    background-image: linear-gradient(#D9DFD8 1px, transparent 1px), linear-gradient(90deg, #D9DFD8 1px, transparent 1px);
    background-size: 34px 34px;
    inset: 0;
    position: absolute;
}

.ehpad-map-pin {
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -100%);
}

.ehpad-map-cluster {
    align-items: center;
    background: var(--ehpad-brand);
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    color: #FFFFFF;
    display: grid;
    font-size: 0.81rem;
    font-weight: 600;
    height: 34px;
    place-items: center;
    width: 34px;
}

.ehpad-map-cluster--large {
    background: var(--ehpad-terra);
    font-size: 0.87rem;
    height: 42px;
    width: 42px;
}

.ehpad-map-attribution {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--ehpad-r-xs);
    bottom: 10px;
    color: var(--ehpad-ink-soft);
    font-size: 0.72rem;
    padding: 4px 9px;
    position: absolute;
    right: 12px;
}

.ehpad-mapcard-body { padding: 15px; }

.ehpad-map-coords {
    color: var(--ehpad-ink-muted);
    font-family: var(--ehpad-font-mono);
    font-size: 0.87rem;
    font-variant-numeric: tabular-nums;
}

.ehpad-map-link {
    align-items: center;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 10px;
    min-height: var(--ehpad-tap);
}

.ehpad-idcard {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-2xl);
    padding: 20px;
}

.ehpad-idcard h3 { font-size: 1.13rem; margin-bottom: 15px; }

.ehpad-idcard-list { display: flex; flex-direction: column; gap: 12px; margin: 0; }

.ehpad-idcard-row { margin: 0; }

.ehpad-idcard-label {
    color: var(--ehpad-ink-faint);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.ehpad-idcard-value {
    color: var(--ehpad-ink-strong);
    font-size: 0.94rem;
    margin: 0;
}

.ehpad-idcard-value--mono {
    font-family: var(--ehpad-font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.ehpad-idcard-sep { background: var(--ehpad-rule-soft); height: 1px; }

.ehpad-welcome-list { display: flex; flex-direction: column; gap: 8px; }

.ehpad-welcome-item {
    align-items: center;
    display: flex;
    font-size: 0.9rem;
    gap: 9px;
}

.ehpad-welcome-item--absent { color: var(--ehpad-ink-ghost); }

.ehpad-welcome-dot {
    background: var(--ehpad-brand);
    border-radius: 50%;
    flex-shrink: 0;
    height: 7px;
    width: 7px;
}

.ehpad-welcome-item--absent .ehpad-welcome-dot { background: #D6D2C8; }

/* Amber caution: everything the source does not publish, and everything an
   estimate cannot know. Never used for a value we do have. */
.ehpad-caution,
.ehpad-warning,
.ehpad-notice-panel {
    background: var(--ehpad-amber-bg);
    border: 1px solid var(--ehpad-amber-border);
    border-radius: var(--ehpad-r-2xl);
    color: var(--ehpad-amber-ink);
    padding: 19px;
}

.ehpad-caution-body { display: flex; gap: 10px; }
.ehpad-caution-icon { flex-shrink: 0; margin-top: 2px; }

.ehpad-caution-title,
.ehpad-notice-panel h2,
.ehpad-notice-panel h3 {
    color: var(--ehpad-amber-title);
    font-family: var(--ehpad-font-sans);
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: 0;
    margin: 0 0 5px;
}

.ehpad-caution-text,
.ehpad-caution p,
.ehpad-warning p,
.ehpad-notice-panel p {
    color: var(--ehpad-amber-ink);
    font-size: 0.87rem;
    line-height: 1.5;
    margin: 0;
}

.ehpad-caution-list { display: flex; flex-direction: column; gap: 8px; }

.ehpad-caution-foot {
    border-top: 1px solid var(--ehpad-amber-border);
    margin-top: 14px;
    padding-top: 14px;
}

.ehpad-caution a,
.ehpad-warning a,
.ehpad-notice-panel a { color: var(--ehpad-amber-title); font-weight: 500; }

/* Sand provenance panel: where each figure comes from, and when. */
.ehpad-provenance,
.ehpad-source-panel,
.ehpad-note,
.ehpad-callout {
    background: var(--ehpad-surface-sand);
    border: 1px solid var(--ehpad-rule-sand);
    border-radius: var(--ehpad-r-2xl);
    padding: 19px;
}

.ehpad-source-panel { margin: 1.5rem 0 2rem; padding: 24px; }

.ehpad-note strong,
.ehpad-callout strong { display: block; margin-bottom: 0.35rem; }

.ehpad-provenance-list {
    color: var(--ehpad-ink-soft);
    display: flex;
    flex-direction: column;
    font-size: 0.84rem;
    gap: 7px;
    margin: 0;
}

.ehpad-provenance-row {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin: 0;
}

.ehpad-provenance-row > .ehpad-num,
.ehpad-provenance-date {
    font-family: var(--ehpad-font-mono);
    font-variant-numeric: tabular-nums;
}

.ehpad-provenance-link {
    align-items: center;
    display: inline-flex;
    font-size: 0.87rem;
    font-weight: 500;
    margin-top: 12px;
    min-height: var(--ehpad-tap);
}

.ehpad-provenance-note {
    color: var(--ehpad-ink-faint);
    font-size: 0.81rem;
    line-height: 1.5;
    margin-top: 10px;
}

/* ==========================================================================
   14. Comparator
   Differences are written in words. Colour never carries the meaning alone.
   ========================================================================== */

.ehpad-compare-tray {
    align-items: center;
    background: var(--ehpad-surface-sand);
    border: 1px solid var(--ehpad-rule-sand);
    border-radius: var(--ehpad-r-lg);
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin: 1rem 0 1.5rem;
    padding: 0.75rem 1.1rem;
}

.ehpad-compare-tray[hidden] { display: none; }
.ehpad-compare-tray strong { font-weight: 600; }
.ehpad-compare-tray [data-compare-count] {
    font-family: var(--ehpad-font-mono);
    font-variant-numeric: tabular-nums;
}
.ehpad-compare-tray [data-compare-message] { color: var(--ehpad-ink-soft); font-size: 0.9rem; }
.ehpad-compare-tray .ehpad-button { margin-left: auto; }

.ehpad-compare-table-wrap {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-2xl);
    overflow-x: auto;
}

.ehpad-compare-table {
    border-collapse: collapse;
    min-width: 700px;
    width: 100%;
}

.ehpad-compare-table caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.ehpad-compare-table th,
.ehpad-compare-table td {
    border-bottom: 1px solid var(--ehpad-rule-soft);
    padding: 0.9rem 1rem;
    text-align: left;
    vertical-align: top;
}

.ehpad-compare-table thead th {
    background: var(--ehpad-surface-sand);
    border-bottom: 1px solid var(--ehpad-rule);
    color: var(--ehpad-ink-strong);
    font-family: var(--ehpad-font-serif);
    font-size: 1.06rem;
    font-weight: 500;
}

.ehpad-compare-table thead th a { color: var(--ehpad-ink-strong); }

.ehpad-compare-table thead small {
    color: var(--ehpad-ink-faint);
    display: block;
    font-family: var(--ehpad-font-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    margin-top: 0.35rem;
}

.ehpad-compare-table tbody th {
    color: var(--ehpad-ink-soft);
    font-size: 0.87rem;
    font-weight: 600;
    width: 32%;
}

.ehpad-compare-table tbody tr:nth-child(even) { background: var(--ehpad-surface-soft); }

.ehpad-value { color: var(--ehpad-ink-strong); font-size: 0.97rem; }

.ehpad-diff-state {
    color: var(--ehpad-terra-dark);
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.ehpad-mobile-compare { display: none; }

.ehpad-compare-card {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-xl);
    padding: 1rem 1.15rem;
}

.ehpad-compare-card h2 { font-size: 1.06rem; margin-bottom: 0.6rem; }

.ehpad-compare-card p {
    border-bottom: 1px solid var(--ehpad-rule-soft);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0;
    padding: 0.5rem 0;
}

.ehpad-compare-card p:last-child { border-bottom: 0; }

.ehpad-mobile-diff { color: var(--ehpad-terra-dark); font-weight: 600; }

/* ==========================================================================
   15. Calculator
   ========================================================================== */

.ehpad-calc {
    align-items: flex-start;
    display: flex;
    gap: 26px;
}

.ehpad-calc-form {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 16px;
    width: 430px;
}

.ehpad-calc-output {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 16px;
    min-width: 0;
}

.ehpad-privacy-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.ehpad-privacy-badge {
    align-items: center;
    background: var(--ehpad-brand-soft);
    border: 1px solid var(--ehpad-brand-border);
    border-radius: var(--ehpad-r-pill);
    color: var(--ehpad-brand-dark);
    display: inline-flex;
    font-size: 0.84rem;
    gap: 7px;
    padding: 7px 13px;
}

.ehpad-step {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-2xl);
    padding: 22px;
}

.ehpad-step-head {
    align-items: center;
    display: flex;
    gap: 11px;
    margin-bottom: 16px;
}

.ehpad-step-number {
    align-items: center;
    background: var(--ehpad-brand);
    border-radius: 50%;
    color: #FFFFFF;
    display: grid;
    font-size: 0.87rem;
    font-weight: 600;
    height: 26px;
    place-items: center;
    width: 26px;
}

.ehpad-step-title { font-size: 1.25rem; margin: 0; }

.ehpad-calc-establishment {
    background: var(--ehpad-brand-soft);
    border: 1px solid var(--ehpad-brand-border);
    border-radius: var(--ehpad-r-lg);
    margin-bottom: 14px;
    padding: 14px;
}

.ehpad-calc-establishment-name { font-size: 0.97rem; font-weight: 600; margin-bottom: 3px; }
.ehpad-calc-establishment-meta { color: var(--ehpad-ink-soft); font-size: 0.87rem; }

.ehpad-calc-establishment-rates {
    border-top: 1px solid #D9E3DC;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    padding-top: 10px;
}

.ehpad-calc-rate-label { color: var(--ehpad-ink-dim); font-size: 0.78rem; }

.ehpad-calc-rate-value {
    font-family: var(--ehpad-font-mono);
    font-size: 0.94rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.ehpad-field { margin-bottom: 18px; }

.ehpad-field-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.ehpad-field-hint {
    color: var(--ehpad-ink-faint);
    font-size: 0.84rem;
    margin-bottom: 10px;
}

.ehpad-gir-picker {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ehpad-gir-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    margin: 0;
}

.ehpad-gir-option {
    align-items: center;
    background: var(--ehpad-surface-soft);
    border: 1px solid var(--ehpad-rule-strong);
    border-radius: var(--ehpad-r-sm);
    color: var(--ehpad-ink-muted);
    cursor: pointer;
    display: flex;
    font-family: var(--ehpad-font-sans);
    font-size: 0.9rem;
    justify-content: center;
    min-height: var(--ehpad-tap);
    padding: 11px 6px;
    text-align: center;
}

.ehpad-gir-input:checked + .ehpad-gir-option,
.ehpad-gir-option[aria-pressed="true"],
.ehpad-gir-option.is-selected {
    background: var(--ehpad-brand);
    border-color: var(--ehpad-brand);
    color: #FFFFFF;
    font-weight: 600;
}

.ehpad-amount-field {
    align-items: center;
    background: var(--ehpad-surface-soft);
    border: 1px solid var(--ehpad-rule-strong);
    border-radius: var(--ehpad-r-md);
    display: flex;
    gap: 10px;
    padding: 0 14px;
}

.ehpad-amount-field input {
    background: transparent;
    border: 0;
    color: var(--ehpad-ink-strong);
    flex-grow: 1;
    font-family: var(--ehpad-font-mono);
    font-size: 1.06rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    min-height: var(--ehpad-tap);
    outline: none;
    padding: 12px 0;
}

.ehpad-amount-unit { color: var(--ehpad-ink-faint); font-size: 1rem; white-space: nowrap; }

.ehpad-choice-list { display: flex; flex-direction: column; gap: 8px; }

.ehpad-choice {
    align-items: center;
    background: var(--ehpad-surface-soft);
    border: 1px solid var(--ehpad-rule-strong);
    border-radius: var(--ehpad-r-md);
    cursor: pointer;
    display: flex;
    gap: 11px;
    min-height: var(--ehpad-tap);
    padding: 12px 14px;
}

.ehpad-choice-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    margin: 0;
}

.ehpad-choice-box {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-control-border);
    border-radius: var(--ehpad-r-xs);
    flex-shrink: 0;
    height: 19px;
    position: relative;
    width: 19px;
}

.ehpad-choice-input:checked + .ehpad-choice-box {
    background: var(--ehpad-brand);
    border-color: var(--ehpad-brand);
}

.ehpad-choice-input:checked + .ehpad-choice-box::after {
    border: 2.4px solid #FFFFFF;
    border-left: 0;
    border-top: 0;
    content: '';
    height: 10px;
    left: 6px;
    position: absolute;
    top: 2px;
    transform: rotate(43deg);
    width: 5px;
}

.ehpad-calc-submit {
    background: var(--ehpad-terra);
    border: 0;
    border-radius: var(--ehpad-r-md);
    color: #FFFFFF;
    cursor: pointer;
    font-family: var(--ehpad-font-sans);
    font-size: 1rem;
    font-weight: 500;
    min-height: var(--ehpad-tap);
    padding: 14px;
    width: 100%;
}

.ehpad-calc-submit:hover,
.ehpad-calc-submit:focus { background: var(--ehpad-terra-dark); }

.ehpad-calc-answer {
    background: var(--ehpad-dark);
    border-radius: var(--ehpad-r-3xl);
    color: var(--ehpad-dark-strong);
    padding: 28px;
}

.ehpad-calc-answer .ehpad-figure-label { margin-bottom: 14px; }

.ehpad-calc-answer-value {
    align-items: baseline;
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.ehpad-calc-answer-amount {
    color: #FFFFFF;
    font-family: var(--ehpad-font-serif);
    font-size: 3.7rem;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    line-height: 1;
}

.ehpad-calc-answer-unit { color: var(--ehpad-dark-text); font-size: 1.25rem; }

.ehpad-calc-answer p { color: var(--ehpad-dark-text); font-size: 0.94rem; margin: 0; }
.ehpad-calc-answer p .ehpad-num { color: #FFFFFF; }

.ehpad-calc-summary {
    border-top: 1px solid var(--ehpad-dark-rule);
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
}

.ehpad-calc-summary-cell {
    background: var(--ehpad-dark-raise);
    border-radius: var(--ehpad-r-lg);
    flex-grow: 1;
    padding: 14px;
}

.ehpad-calc-summary-label { color: var(--ehpad-brand-light); font-size: 0.78rem; margin-bottom: 4px; }

.ehpad-calc-summary-value {
    color: #FFFFFF;
    font-family: var(--ehpad-font-mono);
    font-size: 1.31rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.ehpad-calc-summary-value--deducted { color: var(--ehpad-terra-light); }

.ehpad-calc-arrow { display: grid; place-items: center; width: 30px; }

/* Line-by-line ledger. Each line names the rule that produces it. */
.ehpad-ledger { display: flex; flex-direction: column; }

.ehpad-ledger-row {
    align-items: flex-start;
    border-bottom: 1px solid var(--ehpad-rule-soft);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 14px 0;
}

.ehpad-ledger-row--total { border-bottom: 2px solid var(--ehpad-rule-strong); }
.ehpad-ledger-row--total .ehpad-ledger-label { font-weight: 600; }

.ehpad-ledger-row--final { border-bottom: 0; padding: 18px 0 4px; align-items: center; }

.ehpad-ledger-label { font-size: 0.97rem; font-weight: 500; }

.ehpad-ledger-label--aid { color: var(--ehpad-brand-dark); }
.ehpad-ledger-label--pending { color: var(--ehpad-amber-icon); }
.ehpad-ledger-label--void { color: var(--ehpad-ink-ghost); }

.ehpad-ledger-hint { color: var(--ehpad-ink-faint); font-size: 0.84rem; }

.ehpad-ledger-amount {
    font-family: var(--ehpad-font-mono);
    font-size: 1.03rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ehpad-ledger-amount--credit { color: var(--ehpad-brand); }
.ehpad-ledger-amount--void { color: var(--ehpad-ink-ghost); }
.ehpad-ledger-amount--total { font-weight: 600; }

.ehpad-ledger-amount--final {
    color: var(--ehpad-terra);
    font-family: var(--ehpad-font-serif);
    font-size: 1.75rem;
    font-weight: 600;
}

.ehpad-ledger-row--final .ehpad-ledger-label { font-size: 1.06rem; font-weight: 600; }

.ehpad-help-dot {
    align-items: center;
    background: var(--ehpad-brand-soft);
    border-radius: 50%;
    color: var(--ehpad-brand);
    display: inline-grid;
    font-size: 0.69rem;
    font-weight: 700;
    height: 17px;
    place-items: center;
    width: 17px;
}

.ehpad-crosslink {
    align-items: center;
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.ehpad-crosslink-text { min-width: 0; }
.ehpad-crosslink h3 { font-size: 1.13rem; margin-bottom: 6px; }
.ehpad-crosslink p { color: var(--ehpad-ink-dim); font-size: 0.9rem; line-height: 1.5; margin: 0; }

/* ==========================================================================
   16. Home-care services
   ========================================================================== */

.ehpad-services {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ehpad-service {
    background: var(--ehpad-surface);
    border: 1px solid var(--ehpad-rule);
    border-radius: var(--ehpad-r-xl);
    padding: 22px;
}

.ehpad-service-head {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 13px;
}

.ehpad-service-icon {
    align-items: center;
    background: var(--ehpad-brand-soft);
    border-radius: var(--ehpad-r-lg);
    display: grid;
    flex-shrink: 0;
    height: 40px;
    place-items: center;
    width: 40px;
}

.ehpad-service-icon--accent { background: var(--ehpad-terra-soft); }

.ehpad-service-title { font-size: 1.19rem; margin: 0; }

.ehpad-service-scale {
    color: var(--ehpad-ink-ghost);
    font-family: var(--ehpad-font-mono);
    font-size: 0.78rem;
}

.ehpad-service-text {
    color: var(--ehpad-ink-soft);
    font-size: 0.94rem;
    line-height: 1.55;
    margin-bottom: 14px;
}

.ehpad-service-meta {
    border-top: 1px solid var(--ehpad-rule-soft);
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-top: 13px;
}

.ehpad-service-meta-row {
    display: flex;
    font-size: 0.87rem;
    gap: 12px;
    justify-content: space-between;
}

.ehpad-service-meta-key { color: var(--ehpad-ink-faint); }

.ehpad-service-meta-value { font-weight: 500; }
.ehpad-service-meta-value--free { color: var(--ehpad-brand); }
.ehpad-service-meta-value--funding { color: var(--ehpad-brand-dark); }

/* Cost comparison bars: home versus establishment, same scale, no verdict. */
.ehpad-compare-cost { display: flex; flex-direction: column; gap: 15px; }

.ehpad-cost-head {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.ehpad-cost-name { font-size: 0.9rem; font-weight: 500; }

.ehpad-cost-value {
    font-family: var(--ehpad-font-mono);
    font-size: 1.13rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.ehpad-cost-value--home { color: var(--ehpad-brand); }
.ehpad-cost-value--ehpad { color: var(--ehpad-terra); }

.ehpad-bar {
    background: var(--ehpad-rule-soft);
    border-radius: var(--ehpad-r-pill);
    height: 8px;
    overflow: hidden;
}

/* Set the share inline: style="--ehpad-bar-fill:48%". */
.ehpad-bar-fill {
    background: var(--ehpad-brand);
    border-radius: var(--ehpad-r-pill);
    height: 8px;
    max-width: 100%;
    width: var(--ehpad-bar-fill, 0%);
}

.ehpad-bar-fill--ehpad { background: var(--ehpad-terra); }

.ehpad-cost-note { color: var(--ehpad-ink-faint); font-size: 0.81rem; margin-top: 6px; }

/* ==========================================================================
   17. Footer
   ========================================================================== */

.ehpad-footer {
    background: var(--ehpad-dark);
    color: var(--ehpad-dark-text);
    padding: 44px var(--ehpad-gutter) 30px;
}

.ehpad-footer-inner { margin: 0 auto; max-width: var(--ehpad-max); }

.ehpad-footer-grid {
    display: grid;
    gap: 36px;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    margin-bottom: 32px;
}

.ehpad-footer-brand {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.ehpad-footer-brand span {
    color: #FFFFFF;
    font-family: var(--ehpad-font-serif);
    font-size: 1.19rem;
}

.ehpad-footer-text {
    color: var(--ehpad-dark-quiet);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}

.ehpad-footer-col { display: flex; flex-direction: column; gap: 2px; }

.ehpad-footer-heading {
    color: var(--ehpad-dark-dim);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.ehpad-footer-link {
    align-items: center;
    color: var(--ehpad-dark-text);
    display: inline-flex;
    font-size: 0.9rem;
    min-height: var(--ehpad-tap);
}

.ehpad-footer a,
.ehpad-footer-link { color: var(--ehpad-dark-text); }

.ehpad-footer a:hover,
.ehpad-footer a:focus,
.ehpad-footer-link:hover,
.ehpad-footer-link:focus { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }

.ehpad-footer-bottom {
    border-top: 1px solid var(--ehpad-dark-rule-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    padding-top: 22px;
}

.ehpad-footer-legal { color: var(--ehpad-dark-dim); font-size: 0.81rem; margin: 0; }

/* ==========================================================================
   18. Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    :root { --ehpad-gutter: 28px; }

    .ehpad-hero-grid,
    .ehpad-split,
    .ehpad-stance,
    .ehpad-calc { flex-direction: column; gap: 32px; }

    .ehpad-figure-panel,
    .ehpad-stat-panel,
    .ehpad-price-box,
    .ehpad-calc-form,
    .ehpad-split-aside { width: 100%; max-width: 100%; }

    .ehpad-hero-main { max-width: 100%; }

    .ehpad-profile-grid { grid-template-columns: 1fr; }
    .ehpad-profile-head,
    .ehpad-profile-hero { flex-direction: column; gap: 24px; }

    .ehpad-directory { flex-direction: column; }
    .ehpad-filters { flex-direction: row; flex-wrap: wrap; width: 100%; }
    .ehpad-filter { flex: 1 1 260px; }
    .ehpad-filter-note { flex: 1 1 100%; }

    .ehpad-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ehpad-capacity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ehpad-search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .ehpad-masthead-inner { flex-wrap: wrap; gap: 12px; }
    .ehpad-nav { gap: 16px; width: 100%; }

    .ehpad-doors,
    .ehpad-services,
    .ehpad-inventory,
    .ehpad-stance-grid,
    .ehpad-gir-grid,
    .ehpad-features { grid-template-columns: 1fr; }

    .ehpad-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ehpad-results--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .ehpad-profile-grid,
    .ehpad-intro-grid { grid-template-columns: 1fr; }

    .ehpad-card { grid-template-columns: 1fr; }
    .ehpad-card-facts {
        border-top: 1px solid var(--ehpad-rule-soft);
        display: flex;
        flex-wrap: wrap;
        gap: 1.5rem;
        grid-column: 1;
        grid-row: auto;
        margin-top: 0.6rem;
        padding-top: 0.75rem;
        text-align: left;
    }
    .ehpad-card-facts > div + div { margin-top: 0; }

    .ehpad-result-body { flex-direction: column; gap: 16px; }
    .ehpad-result-price {
        border-top: 1px solid var(--ehpad-rule-soft);
        padding-top: 14px;
        text-align: left;
        width: 100%;
    }

    .ehpad-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .ehpad-calc-summary { flex-direction: column; }
    .ehpad-calc-arrow { display: none; }

    .ehpad-crosslink { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 600px) {
    :root { --ehpad-gutter: 18px; }

    body,
    .ehpad-site { font-size: 16px; }

    .ehpad-container { width: min(100% - 1.5rem, var(--ehpad-max)); }

    .ehpad-hero { padding: 36px var(--ehpad-gutter) 32px; }
    .ehpad-band { padding: 36px var(--ehpad-gutter); }

    .ehpad-quicksearch-row { flex-direction: column; }
    .ehpad-quicksearch-submit { width: 100%; }

    .ehpad-search-grid,
    .ehpad-results,
    .ehpad-results--grid,
    .ehpad-guides,
    .ehpad-capacity-grid,
    .ehpad-footer-grid { grid-template-columns: 1fr; }

    .ehpad-panel,
    .ehpad-source-panel,
    .ehpad-step { padding: 20px; }

    .ehpad-facts > div { grid-template-columns: 1fr; gap: 0.15rem; }

    .ehpad-profile-head { display: block; }
    .ehpad-id-stamp { margin-top: 1rem; }

    .ehpad-actionbar { flex-direction: column; }
    .ehpad-action { justify-content: flex-start; width: 100%; }

    .ehpad-compare-table-wrap { display: none; }
    .ehpad-mobile-compare { display: grid; gap: 1rem; }

    .ehpad-figure-value > .ehpad-num,
    .ehpad-figure-amount { font-size: 2.6rem; }
    .ehpad-calc-answer-amount { font-size: 2.8rem; }

    .ehpad-toolbar { flex-direction: column; align-items: stretch; }
    .ehpad-sort-select { width: 100%; }
}

/* Coarse pointers get full-size targets even on the small decorative pills. */
@media (pointer: coarse) {
    .ehpad-chip,
    .ehpad-city,
    .ehpad-tag { min-height: var(--ehpad-tap); }
}

/* ==========================================================================
   19. Focus, motion, print
   ========================================================================== */

:focus-visible {
    outline: 3px solid var(--ehpad-brand);
    outline-offset: 3px;
}

.ehpad-filter-input:focus-visible + .ehpad-filter-box,
.ehpad-choice-input:focus-visible + .ehpad-choice-box,
.ehpad-gir-input:focus-visible + .ehpad-gir-option {
    outline: 3px solid var(--ehpad-brand);
    outline-offset: 3px;
}

.ehpad-band--dark :focus-visible,
.ehpad-footer :focus-visible,
.ehpad-figure-panel :focus-visible,
.ehpad-calc-answer :focus-visible {
    outline-color: var(--ehpad-yellow);
}

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

/* A record is often printed and carried to a family meeting: keep the figures,
   drop the navigation, and spell out every link target. */
@media print {
    body,
    .ehpad-site {
        background: #FFFFFF;
        color: #000000;
        font-size: 11pt;
    }

    .ehpad-sourcebar,
    .ehpad-masthead,
    .ehpad-nav,
    .ehpad-footer,
    .ehpad-actionbar,
    .ehpad-compare-tray,
    .ehpad-compare-trigger,
    .ehpad-price-cta,
    .ehpad-map,
    .ehpad-filters,
    .ehpad-pagination,
    .ehpad-cities,
    .ehpad-quicksearch,
    .ehpad-search-form { display: none !important; }

    .ehpad-profile-grid,
    .ehpad-directory,
    .ehpad-calc { display: block; }

    .ehpad-panel,
    .ehpad-idcard,
    .ehpad-mapcard,
    .ehpad-price-box,
    .ehpad-source-panel,
    .ehpad-provenance,
    .ehpad-caution,
    .ehpad-notice-panel,
    .ehpad-card,
    .ehpad-result {
        background: #FFFFFF;
        border: 1px solid #B9B9B9;
        border-radius: 0;
        box-shadow: none;
        break-inside: avoid;
        margin-bottom: 10pt;
        padding: 10pt;
    }

    .ehpad-price-box { border-width: 2px; }

    .ehpad-panel h2,
    .ehpad-idcard h3 { color: #000000; }

    .ehpad-gauge-track { background: #E4E4E4; }
    .ehpad-gauge-fill { background: #777777; }
    .ehpad-gauge-mark { background: #000000; }

    .ehpad-site a { color: #000000; text-decoration: underline; }

    .ehpad-site a[href^="http"]::after {
        content: ' (' attr(href) ')';
        font-size: 8pt;
        word-break: break-all;
    }

    .ehpad-source-panel,
    .ehpad-provenance { break-inside: avoid; }
}

/* ================================================================
   12. CALCULATEUR DE RESTE À CHARGE, PASTILLES ET ENVELOPPES DE PAGE
   Écrit après le socle : ces composants n'existaient pas quand le
   design system a été posé. Mêmes tokens, aucune valeur en dur.
   ================================================================ */

/* --- Pastilles : conteneur et deux variantes sémantiques --------- */
.ehpad-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: 0 0 .75rem;
    padding: 0;
    list-style: none;
}

.ehpad-chip--type {
    background: var(--ehpad-brand);
    border-color: var(--ehpad-brand);
    color: #fff;
    font-weight: 600;
}

.ehpad-chip--ash {
    background: var(--ehpad-terra-soft);
    border-color: var(--ehpad-terra-border);
    color: var(--ehpad-terra-dark);
}

/* --- Enveloppes de page : crochets de style, sans mise en forme --- */
.ehpad-front,
.ehpad-listing,
.ehpad-single,
.ehpad-comparator,
.ehpad-calc { display: block; }

/* --- Une jauge d'indicateur (le pluriel existe déjà) -------------- */
.ehpad-gauge { display: block; }
.ehpad-gauge + .ehpad-gauge { margin-top: 1.1rem; }

/* --- Calculateur : deux colonnes, formulaire puis résultat -------- */
.ehpad-calc-grid {
    display: grid;
    grid-template-columns: minmax(0, 430px) minmax(0, 1fr);
    gap: 1.4rem;
    align-items: start;
    margin: 1.5rem 0 2.5rem;
}

.ehpad-calc-form { display: grid; gap: 1rem; align-content: start; }

.ehpad-calc-fields { display: grid; gap: .9rem; margin-top: 1rem; }

.ehpad-calc-field { display: grid; gap: .3rem; margin: 0 0 .9rem; }

.ehpad-calc-field label {
    font-size: .92rem;
    font-weight: 600;
    color: var(--ehpad-ink-muted);
}

.ehpad-calc-establishment {
    padding: .9rem 1rem;
    background: var(--ehpad-brand-soft);
    border: 1px solid var(--ehpad-brand-border);
    border-radius: var(--ehpad-r-lg);
    margin-bottom: .9rem;
}

.ehpad-calc-establishment-name { margin: 0; font-weight: 600; }
.ehpad-calc-establishment-meta { margin: .2rem 0 0; font-size: .9rem; color: var(--ehpad-ink-soft); }

.ehpad-calc-resultat { display: grid; gap: 1rem; align-content: start; }

.ehpad-calc-invite {
    padding: 1.5rem;
    background: var(--ehpad-surface-sand);
    border: 1px dashed var(--ehpad-rule-strong);
    border-radius: var(--ehpad-r-2xl);
    color: var(--ehpad-ink-dim);
}

/* Le chiffre : bloc sombre, terre cuite réservée à l'argent. */
.ehpad-calc-figure {
    padding: 1.6rem;
    background: var(--ehpad-dark);
    border-radius: var(--ehpad-r-3xl);
    color: var(--ehpad-dark-strong);
}

.ehpad-calc-figure-label {
    margin: 0 0 .6rem;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ehpad-brand-light);
}

.ehpad-calc-figure-value {
    margin: 0;
    font-family: var(--ehpad-font-serif);
    font-size: clamp(2.1rem, 6vw, 3.2rem);
    font-weight: 500;
    line-height: 1;
    color: #fff;
}

.ehpad-calc-answer-unit {
    font-family: var(--ehpad-font-sans);
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--ehpad-dark-text);
}

.ehpad-calc-figure-note {
    margin: .8rem 0 0;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--ehpad-dark-text);
}

/* Le détail, ligne à ligne. */
.ehpad-calc-table { margin-top: 0; }

.ehpad-calc-table .ehpad-tariff-label {
    display: grid;
    gap: .25rem;
    font-weight: 600;
}

.ehpad-calc-note,
.ehpad-calc-message {
    font-weight: 400;
    font-size: .86rem;
    line-height: 1.5;
    color: var(--ehpad-ink-dim);
}

.ehpad-calc-message { color: var(--ehpad-amber-ink); }

/* Les trois états. « non calculable » n'est jamais un zéro muet. */
.ehpad-calc-state {
    font-family: var(--ehpad-font-sans);
    font-size: .84rem;
    font-style: italic;
    color: var(--ehpad-ink-ghost);
}

.ehpad-calc-row td,
.ehpad-calc-row th { vertical-align: top; }

.ehpad-calc-row--non_applicable { background: var(--ehpad-surface-mute); }
.ehpad-calc-row--non_calculable { background: var(--ehpad-amber-bg); }
.ehpad-calc-row--non_calculable .ehpad-calc-state { color: var(--ehpad-amber-title); }

.ehpad-calc-row--total th,
.ehpad-calc-row--total td {
    border-top: 2px solid var(--ehpad-rule-strong);
    font-size: 1.05rem;
    font-weight: 600;
}

.ehpad-calc-row--total .ehpad-tariff-cell--total {
    font-family: var(--ehpad-font-serif);
    font-size: 1.5rem;
    color: var(--ehpad-terra);
}

.ehpad-calc-reserves ul { margin: .6rem 0 .8rem; padding-left: 1.1rem; }
.ehpad-calc-reserves li { margin-bottom: .45rem; line-height: 1.55; }

@media (max-width: 980px) {
    .ehpad-calc-grid { grid-template-columns: 1fr; }
}
