/* ==========================================================================
   MentalJoy public site: "Hârtie & Pin" (paper and pine).
   A calm field-journal look: cream paper with a light grain, pine-green ink
   and one persimmon accent. Headings in Fraunces, text in Atkinson
   Hyperlegible. Loaded last on public pages, after app-style.css,
   site-motion.css, site-dark.css and the inline styles in base.html, so it
   only re-skins them. Every color is a token below with a dark twin, so
   new components should use the tokens rather than hex values.
   ========================================================================== */

/* ---- Tokens -------------------------------------------------------------- */
:root[data-theme] {
    --font-display: 'Fraunces', 'Fraunces Fallback', Georgia, serif;
    --font-body: 'Atkinson Hyperlegible', 'Atkinson Fallback', sans-serif;

    --bg: #F3ECDF;
    --surface: #FBF7EF;
    --surface-2: #F7F1E6;
    --text: #22302A;
    --muted: #56625A;
    --heading: #1D3A2E;
    --brand: #1D3A2E;
    --brand-deep: #13281F;
    --brand-ink: #F6EFE2;
    --accent: #B9481F;          /* persimmon, darkened for 4.5:1 on paper */
    --accent-bright: #C8502A;
    --accent-ink: #FFF6EC;
    --line: rgba(29, 58, 46, 0.18);
    --line-strong: rgba(29, 58, 46, 0.32);
    --nav-bg: rgba(243, 236, 223, 0.88);
    --lift: 6px 6px 0 rgba(200, 80, 42, 0.9);
    --footer-bg: #1D3A2E;
    --footer-text: #E9E0CD;
    --footer-link: #F2A27F;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2  0 0 0 0 .22  0 0 0 0 .18  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --contours: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600' fill='none' stroke='%231D3A2E' stroke-opacity='.13' stroke-width='1.2'%3E%3Cpath d='M300 70c120 0 230 90 230 220s-110 250-240 240S60 420 70 290 180 70 300 70z'/%3E%3Cpath d='M300 115c95 0 185 75 185 180s-90 200-190 192S110 405 116 295 205 115 300 115z'/%3E%3Cpath d='M300 160c72 0 140 60 140 140s-68 152-145 146S160 380 164 300 228 160 300 160z'/%3E%3Cpath d='M300 205c50 0 95 42 95 98s-46 104-100 100-86-46-84-100 39-98 89-98z'/%3E%3Cpath d='M300 250c27 0 52 23 52 52s-25 57-55 55-46-25-45-55 21-52 48-52z'/%3E%3C/svg%3E");

    /* the older names used across app-style.css and inline styles */
    --color-primary: var(--brand);
    --color-primary-dark: var(--brand-deep);
    --color-primary-light: var(--brand);
    --color-secondary: var(--accent);
    --color-secondary-dark: var(--heading);
    --color-secondary-light: var(--surface-2);
    --color-text-dark: var(--text);
    --color-text-medium: var(--muted);
    --color-text-light: var(--muted);
    --color-white: var(--surface);
    --color-background-light: var(--surface);
    --color-background-medium: var(--surface-2);
    --color-border: var(--line);
    --bs-body-color: var(--text);
    --bs-secondary-color: var(--muted);
    --bs-border-color: var(--line);
}

:root[data-theme="dark"] {
    --bg: #0F1814;
    --surface: #15211C;
    --surface-2: #1A2822;
    --text: #E6DECD;
    --muted: #A9B2A3;
    --heading: #EFE6D3;
    --brand: #9CC3A5;
    --brand-deep: #B9D7BF;
    --brand-ink: #0F1814;
    --accent: #F0805A;
    --accent-bright: #F0805A;
    --accent-ink: #1A0E08;
    --line: rgba(230, 222, 205, 0.16);
    --line-strong: rgba(230, 222, 205, 0.3);
    --nav-bg: rgba(15, 24, 20, 0.86);
    --lift: 6px 6px 0 rgba(240, 128, 90, 0.85);
    --footer-bg: #0A110E;
    --footer-text: #CFC6B3;
    --footer-link: #F0805A;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .9  0 0 0 0 .88  0 0 0 0 .8  0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --contours: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600' fill='none' stroke='%239CC3A5' stroke-opacity='.14' stroke-width='1.2'%3E%3Cpath d='M300 70c120 0 230 90 230 220s-110 250-240 240S60 420 70 290 180 70 300 70z'/%3E%3Cpath d='M300 115c95 0 185 75 185 180s-90 200-190 192S110 405 116 295 205 115 300 115z'/%3E%3Cpath d='M300 160c72 0 140 60 140 140s-68 152-145 146S160 380 164 300 228 160 300 160z'/%3E%3Cpath d='M300 205c50 0 95 42 95 98s-46 104-100 100-86-46-84-100 39-98 89-98z'/%3E%3Cpath d='M300 250c27 0 52 23 52 52s-25 57-55 55-46-25-45-55 21-52 48-52z'/%3E%3C/svg%3E");
}

/* ---- Page, type ----------------------------------------------------------- */
:root[data-theme] body.animated-background {
    background:
        var(--grain),
        var(--contours) right -180px top -120px / 760px no-repeat,
        var(--contours) left -260px top 1900px / 640px no-repeat,
        var(--bg) !important;
    background-size: auto !important;
    animation: none;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.04rem;
}

:root[data-theme] body.animated-background::before,
:root[data-theme] body.animated-background::after {
    content: none;
}

:root[data-theme] body h1, :root[data-theme] body h2, :root[data-theme] body h3,
:root[data-theme] body h4, :root[data-theme] body h5, :root[data-theme] body h6,
:root[data-theme] body .h1, :root[data-theme] body .h2, :root[data-theme] body .h3,
:root[data-theme] body .h4, :root[data-theme] body .h5 {
    font-family: var(--font-display);
    font-weight: 450;
    color: var(--heading);
    letter-spacing: -0.01em;
}

:root[data-theme] body .text-muted { color: var(--muted) !important; }
:root[data-theme] body .text-teal,
:root[data-theme] body .text-primary { color: var(--brand) !important; }
:root[data-theme] body a:not(.btn):not(.nav-link):not(.navbar-brand) { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
:root[data-theme] body ::selection { background: var(--accent-bright); color: var(--accent-ink); }

/* Small uppercase labels: navigation, buttons, pills, eyebrows. */
:root[data-theme] body .navbar-nav .nav-link,
:root[data-theme] body .btn,
:root[data-theme] body .pathway-pill-tag,
:root[data-theme] body .hero-chip-badge,
:root[data-theme] body .doctor-overlay-title,
:root[data-theme] body .badge {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ---- Navbar and footer -------------------------------------------------- */
:root[data-theme] body .navbar {
    background: var(--nav-bg) !important;
    border-bottom: 1px solid var(--line) !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
:root[data-theme] body .navbar-nav .nav-link { color: var(--text) !important; font-size: 0.78rem; font-weight: 700; }
:root[data-theme] body .navbar-nav .nav-link::after { background-color: var(--accent); }
:root[data-theme] body .navbar-nav .nav-link:hover { color: var(--accent) !important; }
:root[data-theme] body .navbar-collapse.show,
:root[data-theme] body .navbar-collapse.collapsing { background: transparent; }
:root[data-theme] body .theme-switch__btn:not(.mj-icon-btn) { border-color: var(--line-strong); background: transparent; color: var(--text); }
:root[data-theme] body .theme-switch__menu { background: var(--surface); border: 1px solid var(--line); }
:root[data-theme] body .theme-switch__menu .dropdown-item { color: var(--text); }
:root[data-theme] body .theme-switch__menu .dropdown-item i { color: var(--accent); }
:root[data-theme] body .navbar-toggler { border-color: var(--line-strong); }

:root[data-theme] body footer {
    background: var(--footer-bg) !important;
    color: var(--footer-text);
    border: 0;
    border-radius: 0 !important;
    box-shadow: none !important;
}
:root[data-theme] body footer a { color: var(--footer-link); }
:root[data-theme] body footer a:hover { color: var(--footer-text); }
/* The footer is always dark green, so it always shows the light-on-dark logo. */
:root[data-theme] body footer .logo-on-light { display: none !important; }
:root[data-theme] body footer .logo-on-dark { display: inline-block !important; }

/* ---- Buttons ------------------------------------------------------------- */
:root[data-theme] body .btn {
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: none;
}
:root[data-theme] body .btn-primary,
:root[data-theme] body .btn-success,
:root[data-theme] body .btn-secondary,
:root[data-theme] body .btn-info,
:root[data-theme] body .btn-vitaplus {
    background: var(--brand) !important;
    border: 0 !important;
    color: var(--brand-ink) !important;
}
:root[data-theme] body .btn-primary:hover,
:root[data-theme] body .btn-success:hover,
:root[data-theme] body .btn-secondary:hover,
:root[data-theme] body .btn-info:hover,
:root[data-theme] body .btn-vitaplus:hover,
:root[data-theme] body .btn-primary:focus-visible {
    background: var(--accent) !important;
    color: var(--accent-ink) !important;
    box-shadow: none;
}
/* The one action that matters most on a page stays persimmon. */
:root[data-theme] body .btn-hero-primary,
:root[data-theme] body .cas-banner-container .btn-lg {
    background: var(--accent) !important;
    color: var(--accent-ink) !important;
}
:root[data-theme] body .btn-hero-primary:hover,
:root[data-theme] body .cas-banner-container .btn-lg:hover {
    background: var(--brand) !important;
    color: var(--brand-ink) !important;
}
:root[data-theme] body .btn-outline-primary,
:root[data-theme] body .btn-outline-secondary,
:root[data-theme] body .btn-hero-call {
    background: transparent !important;
    border: 1.5px solid currentColor !important;
    border-radius: 999px;
    color: var(--brand) !important;
    box-shadow: none !important;
}
:root[data-theme] body .btn-outline-primary:hover,
:root[data-theme] body .btn-outline-secondary:hover,
:root[data-theme] body .btn-hero-call:hover {
    background: var(--brand) !important;
    border-color: var(--brand) !important;
    color: var(--brand-ink) !important;
}
:root[data-theme] body .btn-hero-primary,
:root[data-theme] body .btn-hero-outline,
:root[data-theme] body .btn-hero-call { font-size: 0.9rem; }
:root[data-theme] body .btn-hero-call { font-weight: 700; letter-spacing: 0.06em; }

/* ---- Forms --------------------------------------------------------------- */
:root[data-theme] body .form-control,
:root[data-theme] body .form-select {
    background-color: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    color: var(--text);
    box-shadow: none;
}
:root[data-theme] body .form-control:focus,
:root[data-theme] body .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200, 80, 42, 0.18);
}
:root[data-theme] body .form-control::placeholder { color: var(--muted); opacity: 0.8; }
:root[data-theme] body label,
:root[data-theme] body .form-label { color: var(--text); }
:root[data-theme] body .form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

/* ---- Home: hero ------------------------------------------------------------ */
:root[data-theme] body .hero-wrapper-c {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    overflow: visible;
    padding: 3.5rem 0 4rem;
}
:root[data-theme] body .hero-wrapper-c::before,
:root[data-theme] body .mj-aurora { display: none; }
:root[data-theme] body .hero-chip-badge {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    color: var(--accent) !important;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0;
}
:root[data-theme] body .hero-chip-badge i { color: inherit; }
:root[data-theme] body .hero-chip-badge::after {
    content: '';
    display: inline-block;
    width: 3rem;
    height: 1px;
    margin-left: 0.6rem;
    background: currentColor;
}
:root[data-theme] body .hero-main-title {
    font-family: var(--font-display);
    font-weight: 340;
    font-size: 4.6rem;
    line-height: 0.98;
    letter-spacing: -0.025em;
    color: var(--heading) !important;
}
:root[data-theme] body .hero-accent-word { color: var(--accent) !important; font-style: italic; }
:root[data-theme] body .mj-ink path { stroke: var(--accent); stroke-width: 4; opacity: 0.9; }
:root[data-theme] body .hero-description-text { color: var(--muted) !important; font-size: 1.15rem; }
:root[data-theme] body .hero-trust-row { gap: 0.5rem 1.6rem; }
:root[data-theme] body .hero-trust-item {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    padding: 0;
    color: var(--text) !important;
    font-size: 0.88rem;
    font-weight: 700;
}
:root[data-theme] body .hero-trust-item i { color: var(--accent) !important; }

/* Portrait: a tall print with a persimmon frame set just behind it. */
:root[data-theme] body .doctor-portrait-box {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    isolation: isolate;
}
:root[data-theme] body .doctor-portrait-box picture {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    max-height: 470px;
    margin: 0 auto;
}
:root[data-theme] body .doctor-portrait-box picture::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border: 1.5px solid var(--accent-bright);
    transform: translate(16px, 16px);
}
:root[data-theme] body .doctor-portrait-img {
    height: 100%;
    max-height: none;
    border-radius: 2px;
    object-position: 72% 30%;
}
:root[data-theme] body .doctor-portrait-box:hover .doctor-portrait-img { transform: none; }
:root[data-theme] body .doctor-overlay-card {
    background: transparent !important;
    border-top: 0 !important;
    padding-top: 1.9rem;
    text-align: center;
}
:root[data-theme] body .doctor-overlay-name { font-family: var(--font-display); color: var(--heading) !important; font-weight: 450; }
:root[data-theme] body .doctor-overlay-title { color: var(--accent) !important; font-size: 0.78rem; font-weight: 700; }
:root[data-theme] body .doctor-overlay-motto { color: var(--muted) !important; font-family: var(--font-display); font-size: 1.05rem; }
:root[data-theme] body .doctor-portrait-box picture { width: min(100%, 376px); }

/* ---- Sections: numbered like a field journal, hairlines instead of boxes -- */
:root[data-theme] body .container { counter-reset: mj-section; }
:root[data-theme] body .section-wrapper-c,
:root[data-theme] body .cas-banner-container,
:root[data-theme] body .about-doctor-container,
:root[data-theme] body .mj-breathe {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    padding: 3.5rem 0 !important;
}
:root[data-theme] body .section-head-c {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: end;
    max-width: none;
    text-align: left;
}
:root[data-theme] body .section-head-c h2 { margin: 0; font-size: 2.9rem; font-weight: 420; color: var(--heading) !important; }
:root[data-theme] body .section-head-c h2::before {
    counter-increment: mj-section;
    content: "0" counter(mj-section) " —";
    display: block;
    margin-bottom: 0.6rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--accent);
}
:root[data-theme] body .section-head-c p { color: var(--muted) !important; }
:root[data-theme] body section.mb-4 { margin-top: 3rem; }

/* Cards: paper sheets with a hairline; they shift up-left onto a persimmon block on hover. */
:root[data-theme] body .booking-pathway-card,
:root[data-theme] body .specialty-grid-item,
:root[data-theme] body .cas-step-card,
:root[data-theme] body .home-highlight-card,
:root[data-theme] body .contact-hub-wrapper,
:root[data-theme] body .card {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}
:root[data-theme] body .booking-pathway-card,
:root[data-theme] body .specialty-grid-item,
:root[data-theme] body .home-highlight-card {
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease !important;
}
:root[data-theme] body .booking-pathway-card:hover,
:root[data-theme] body .specialty-grid-item:hover,
:root[data-theme] body .home-highlight-card:hover {
    transform: translate(-4px, -4px) !important;
    box-shadow: var(--lift) !important;
}
:root[data-theme] body .pathway-card-title,
:root[data-theme] body .specialty-item-title,
:root[data-theme] body .home-highlight-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 450;
    color: var(--heading) !important;
}
:root[data-theme] body .pathway-card-desc,
:root[data-theme] body .specialty-item-text,
:root[data-theme] body .home-highlight-desc,
:root[data-theme] body .cas-step-info p { color: var(--muted) !important; }
:root[data-theme] body .pathway-pill-tag {
    background: transparent !important;
    border: 1px solid currentColor !important;
    border-radius: 999px;
    color: var(--accent) !important;
    font-size: 0.68rem;
}
:root[data-theme] body .pathway-logo-container { background: #ffffff !important; border: 1px solid var(--line) !important; border-radius: 4px !important; }
:root[data-theme] body .pathway-bullet-list li { color: var(--text) !important; }
:root[data-theme] body .pathway-bullet-list li i { color: var(--brand) !important; }
:root[data-theme] body .specialty-icon-circle {
    width: auto !important;
    height: auto !important;
    margin-bottom: 0.6rem;
    justify-content: flex-start !important;
    background: transparent !important;
    border: 0 !important;
    color: var(--accent) !important;
    font-size: 1.6rem;
}
:root[data-theme] body .home-highlight-placeholder { background: var(--surface-2) !important; color: var(--accent) !important; }
:root[data-theme] body .home-highlight-meta .badge { background: transparent !important; border: 1px solid var(--line-strong) !important; color: var(--text) !important; }

/* CNAS steps */
:root[data-theme] body .cas-step-num {
    background: var(--accent) !important;
    color: var(--accent-ink) !important;
    font-family: var(--font-display);
    font-style: italic;
    border-radius: 50% !important;
}
:root[data-theme] body .cas-step-info strong { color: var(--heading) !important; font-family: var(--font-display); font-size: 1.1rem; font-weight: 450; }
:root[data-theme] body .mj-steps-track { background: var(--line); }
:root[data-theme] body .mj-steps-track i { background: var(--accent-bright); }
:root[data-theme] body .cas-banner-logo-img { background: #ffffff; border-radius: 4px; padding: 4px; }
:root[data-theme] body .badge.bg-success,
:root[data-theme] body .badge.bg-primary {
    background: var(--accent) !important;
    color: var(--accent-ink) !important;
    border-radius: 999px;
}

/* About + breathing card */
:root[data-theme] body .mj-breathe-orb::before { background: radial-gradient(circle at 35% 35%, var(--accent-bright), var(--brand) 70%); opacity: 0.55; }
:root[data-theme] body .mj-breathe-orb::after { border-color: var(--line-strong); }
:root[data-theme] body .mj-breathe-cue { color: var(--heading); font-family: var(--font-display); }
:root[data-theme] body .mj-breathe h2 { font-weight: 450; }
:root[data-theme] body .mj-breathe .mj-breathe-more { margin: 1rem 0 0; }
:root[data-theme] body .mj-breathe-more a { color: var(--accent); font-weight: 700; }

/* About: three plain promises in the doctor's voice, with a hand-drawn
   persimmon stroke instead of icon pills. */
:root[data-theme] body .mj-promises { margin-top: 2rem; }
:root[data-theme] body .mj-promises-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem 2rem;
}
:root[data-theme] body .mj-promises-list li {
    position: relative;
    padding-top: 1.1rem;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.55;
}
:root[data-theme] body .mj-promises-list li::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 46px;
    height: 8px;
    background: var(--accent-bright);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 8'%3E%3Cpath d='M2 5.2C8 2.4 13 2.2 18 4.4s10 2.6 15 .4 8-2.2 11-.6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 8'%3E%3Cpath d='M2 5.2C8 2.4 13 2.2 18 4.4s10 2.6 15 .4 8-2.2 11-.6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
:root[data-theme] body .mj-promises-list li:nth-child(2)::before { transform: scaleX(-1) rotate(-2deg); }
:root[data-theme] body .mj-promises-list li:nth-child(3)::before { transform: rotate(2deg); width: 40px; }
:root[data-theme] body .mj-promises-list strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--heading);
    font-family: var(--font-display);
    font-weight: 450;
    font-size: 1.14rem;
    line-height: 1.3;
}
@media (max-width: 767.98px) {
    :root[data-theme] body .mj-promises-list { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* Contact hub */
:root[data-theme] body .working-hour-row {
    background: transparent !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    color: var(--text) !important;
}
:root[data-theme] body .working-hour-row strong { color: var(--brand) !important; }
:root[data-theme] body .btn-contact-action {
    background: transparent !important;
    border: 1px solid var(--line-strong) !important;
    border-radius: 999px !important;
    color: var(--text) !important;
}
:root[data-theme] body .btn-contact-whatsapp { background: var(--brand) !important; border-color: var(--brand) !important; color: var(--brand-ink) !important; }
:root[data-theme] body .btn-contact-action:hover { border-color: var(--accent) !important; color: var(--accent) !important; }
:root[data-theme] body .btn-contact-whatsapp:hover { background: var(--accent) !important; border-color: var(--accent) !important; color: var(--accent-ink) !important; }
:root[data-theme] body .address-box-c {
    background: transparent !important;
    border: 1px dashed var(--line-strong) !important;
    border-radius: 4px !important;
    color: var(--text) !important;
}
:root[data-theme] body .map-frame-wrapper { border: 1px solid var(--line) !important; border-radius: 4px !important; }

/* Modals, dropdowns, cookie banner */
:root[data-theme] body .modal-content { background: var(--surface); color: var(--text); border-radius: 6px !important; }
:root[data-theme] body .modal-header,
:root[data-theme] body .modal-footer { background: var(--surface-2) !important; border-color: var(--line) !important; }
:root[data-theme] body #cookie-banner { background: var(--surface); color: var(--text); border-top: 1px solid var(--line); }
:root[data-theme] body #cookie-banner #accept-cookies { background: var(--brand); color: var(--brand-ink); border-radius: 999px; }
:root[data-theme] body #cookie-banner #reject-cookies { background: transparent; color: var(--text); border: 1px solid var(--line-strong); border-radius: 999px; }

/* Plain white boxes set inline in templates (style="background: #ffffff") */
:root[data-theme] body [style*="background: #ffffff"],
:root[data-theme] body [style*="background: rgb(255, 255, 255)"],
:root[data-theme] body [style*="background-color: #ffffff"],
:root[data-theme] body [style*="background-color: rgb(255, 255, 255)"],
:root[data-theme] body [style*="background: #f8faf9"],
:root[data-theme] body [style*="background: rgb(248, 250, 249)"] { background: var(--surface) !important; }

/* ---- Inner pages: a big serif page title under the persimmon eyebrow ------- */
:root[data-theme] body [data-page-header] h1 {
    font-size: 3.4rem;
    font-weight: 360 !important;
    line-height: 1.02;
    letter-spacing: -0.02em;
    color: var(--heading) !important;
    max-width: 18ch;
    margin: 0.4rem 0 1rem;
}
:root[data-theme] body [data-page-header] { padding-top: 2.5rem !important; }

/* ---- Articles and announcements -------------------------------------------- */
:root[data-theme] body .announcement-card,
:root[data-theme] body .article-card {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease !important;
}
:root[data-theme] body .announcement-card:hover,
:root[data-theme] body .article-card:hover { transform: translate(-4px, -4px) !important; box-shadow: var(--lift) !important; }
:root[data-theme] body .card-body-fixed { background: var(--surface) !important; }
:root[data-theme] body .card-title-fixed,
:root[data-theme] body .card-title-fixed a { font-family: var(--font-display); font-weight: 450; font-size: 1.3rem; color: var(--heading) !important; }
:root[data-theme] body .card-title-fixed a:hover,
:root[data-theme] body .article-card:hover .card-title-fixed a { color: var(--accent) !important; }
:root[data-theme] body .card-preview-fixed { color: var(--muted) !important; }
:root[data-theme] body .card-author-tag { color: var(--muted) !important; }
:root[data-theme] body .card-date-badge {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    color: var(--accent) !important;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}
:root[data-theme] body .btn-card-action {
    background: transparent !important;
    border: 1.5px solid currentColor !important;
    border-radius: 999px !important;
    color: var(--brand) !important;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: none !important;
}
:root[data-theme] body .btn-card-action:hover { background: var(--brand) !important; border-color: var(--brand) !important; color: var(--brand-ink) !important; transform: none; }
:root[data-theme] body .announcement-image-frame { background: var(--surface-2) !important; border-color: var(--line) !important; }
/* Corners inside cards follow the cards' 4px. Panels, frames and images set
   inside them use Bootstrap's .rounded utilities (6-16px) or older radii from
   app-style.css; the image strip of an article or announcement card is square
   and its card's overflow clips it to the card's corner. */
:root[data-theme] body :is(.card, .booking-pathway-card, .contact-hub-wrapper, .modal-body) :is(.rounded, .rounded-3, .rounded-4),
:root[data-theme] body .article-cover-frame,
:root[data-theme] body .announcement-image-frame,
:root[data-theme] body .article-content img { border-radius: 4px !important; }
:root[data-theme] body .content-card-media { border-radius: 0; }
:root[data-theme] body .pathway-logo-container:not(:has(img)) { background: transparent !important; border: 0 !important; }
:root[data-theme] body .pathway-logo-container:not(:has(img)) i { color: var(--accent) !important; }

:root[data-theme] body .badge.bg-light { background: transparent !important; border: 1px solid var(--line-strong) !important; }
:root[data-theme] body .badge.text-dark,
:root[data-theme] body .badge.text-success { color: var(--text) !important; }

/* Article body */
:root[data-theme] body .article-content { color: var(--text) !important; }
:root[data-theme] body .article-content :is(h1, h2, h3, h4) { color: var(--heading); font-weight: 450; }
:root[data-theme] body .article-content a { color: var(--accent); }
:root[data-theme] body .article-content blockquote {
    background: transparent;
    border-left: 2px solid var(--accent-bright);
    border-radius: 0;
    color: var(--heading);
    font-family: var(--font-display);
    font-size: 1.35rem;
    line-height: 1.4;
}
:root[data-theme] body .article-safety-note { background: var(--surface-2) !important; border-color: var(--line) !important; border-left: 3px solid var(--accent-bright) !important; color: var(--text); }
:root[data-theme] body .article-safety-note a { color: var(--accent); }

/* ---- Booking -------------------------------------------------------------- */
:root[data-theme] body .bg-white,
:root[data-theme] body .bg-light { background-color: var(--surface) !important; }
:root[data-theme] body .border { border-color: var(--line) !important; }
:root[data-theme] body .slot-option label {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    color: var(--heading);
}
:root[data-theme] body .slot-option label:hover { border-color: var(--accent); background: var(--surface-2); }
:root[data-theme] body .slot-radio:checked + label,
:root[data-theme] body .slot-radio:checked + label * {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--brand-ink) !important;
}
:root[data-theme] body .slot-radio:focus-visible + label { outline-color: var(--accent); }
:root[data-theme] body .slot-radio:disabled + label { background: transparent; color: var(--muted); }
:root[data-theme] body .suggested-slot { border-radius: 4px !important; text-transform: none; letter-spacing: 0.02em; font-size: 0.86rem; }
:root[data-theme] body .suggested-slot[aria-pressed="true"] { background: var(--brand) !important; color: var(--brand-ink) !important; }

/* ---- Phones --------------------------------------------------------------- */
@media (max-width: 767.98px) {
    :root[data-theme] body .hero-wrapper-c { padding: 2rem 0 3rem; }
    :root[data-theme] body .hero-main-title { font-size: 2.9rem; }
    :root[data-theme] body .section-head-c { grid-template-columns: 1fr; gap: 0.75rem; }
    :root[data-theme] body .section-head-c h2 { font-size: 2.1rem; }
    :root[data-theme] body [data-page-header] h1 { font-size: 2.4rem; }
    :root[data-theme] body .doctor-portrait-box picture { width: calc(100% - 16px); margin-left: 0; }
}

/* ---- Page load ------------------------------------------------------------ */
/* One orchestrated entrance: the hero lines rise in turn while the portrait
   is uncovered from the bottom up. Off under reduced motion. */
@keyframes mjPaperRise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes mjPaperReveal { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes mjFrameIn { from { opacity: 0; transform: none; } to { opacity: 1; transform: translate(16px, 16px); } }
@media (prefers-reduced-motion: no-preference) {
    .mj-motion body [data-hero-item] { animation: mjPaperRise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
    .mj-motion body [data-hero-item]:nth-child(1) { animation-delay: 0.05s; }
    .mj-motion body [data-hero-item]:nth-child(2) { animation-delay: 0.18s; }
    .mj-motion body [data-hero-item]:nth-child(3) { animation-delay: 0.36s; }
    .mj-motion body [data-hero-item]:nth-child(4) { animation-delay: 0.5s; }
    .mj-motion body [data-hero-item]:nth-child(5) { animation-delay: 0.62s; }
    .mj-motion body .doctor-portrait-box picture img { animation: mjPaperReveal 1.4s cubic-bezier(0.65, 0, 0.2, 1) 0.3s both; }
    .mj-motion body .doctor-portrait-box picture::after { animation: mjFrameIn 1s cubic-bezier(0.2, 0.7, 0.2, 1) 1.1s both; }
}
