/* ==========================================================================
   FAI DESIGN SYSTEM
   --------------------------------------------------------------------------
   One stylesheet for the whole site. Every page links this file instead of
   carrying its own copy of the component rules, which is how the four page
   variants (root, pro/, cloud/, priority/) previously drifted apart.

   The visual language is institutional: a near-white ground, hairline rules
   carrying the structure, one restrained blue used sparingly, dark slate-blue
   text instead of black, and soft blue tints for selected and informational
   states. Structure comes from borders and whitespace, not from elevation.

   RULE: components below read tokens only. No component rule may contain a
   literal hex value, a raw pixel radius, or a hand-picked shadow. If a new
   value is needed, it becomes a token first.
   ========================================================================== */


/* ==========================================================================
   1. TOKENS
   --------------------------------------------------------------------------
   Palette and typeface are matched to the reference interface: the values
   below were sampled from it directly rather than estimated by eye, and the
   face is Metropolis (Chris Simpson, SIL OFL), served from jsDelivr via
   @fontsource. Nothing here reproduces the reference's branding or layout -
   only its design language.
   ========================================================================== */

:root {
    /* ---------- Primary blue -------------------------------------------
       One hue, four steps. Used for: the active nav item, primary buttons,
       focus rings, selected states, and links. Deliberately not used for
       decoration, headings, or large fills. */
    --color-primary:         #0077C8;
    --color-primary-hover:   #005E9F;
    --color-primary-active:  #002843;
    --color-primary-subtle:  #DBECF7;  /* selected row / active nav fill   */
    --color-primary-muted:   #B7D8EF;  /* border on a selected element     */
    --color-on-primary:      #FFFFFF;

    /* ---------- Backgrounds --------------------------------------------- */
    --color-bg:              #FFFFFF;  /* page ground: cool near-white     */
    --color-surface:         #FFFFFF;  /* cards, panels, table bodies      */
    --color-surface-sunken:  #F4F4F4;  /* hover rows, inset wells          */
    --color-surface-header:  #FFFFFF;  /* table header, top nav            */
    --color-info-bg:         #DBECF7;  /* empty states, informational bars */

    /* ---------- Top bar --------------------------------------------------
       A deep blue masthead, the way a public institution's site carries its
       identity in one solid band. It is the darkest step of the same hue as
       the primary, so the palette stays a single blue. */
    --color-nav-bg:          #FFFFFF;
    --color-nav-text:        #002843;
    --color-nav-text-strong: #002843;
    --color-nav-border:      #EBEBEB;
    --color-nav-hover:       #DBECF7;
    --color-nav-active:      #DBECF7;
    --color-overlay:         rgba(0, 40, 67, 0.32);

    /* ---------- Text ----------------------------------------------------
       Never pure black. The darkest step is a dark blue-gray, which is what
       gives the interface its calm, printed-document quality. */
    --color-text:            #424448;
    --color-text-strong:     #002843;  /* page titles, table headers       */
    --color-text-secondary:  #53565A;  /* body copy                        */
    --color-text-muted:      #63666A;  /* captions, placeholders, meta     */
    --color-text-inverse:    #FFFFFF;
    --color-text-link:       var(--color-primary);

    /* ---------- Borders -------------------------------------------------
       Thin and quiet. `--color-border` is the default hairline; `-strong` is
       reserved for genuine separations (table header underline, section
       dividers, input outlines). */
    --color-border:          #E6E6E6;
    --color-border-strong:   #D0D0CE;
    --color-border-input:    #BFC0C2;
    --color-border-focus:    var(--color-primary);

    /* ---------- Status --------------------------------------------------
       Money is the only thing that is ever green. */
    --color-success:         #1B7A46;
    --color-success-subtle:  #E5F3F1;
    --color-warning:         #9A6212;
    --color-warning-subtle:  #FCF5CA;
    --color-danger:          #B3261E;
    --color-danger-subtle:   #FDEDFD;
    --color-neutral-subtle:  #F4F4F4;

    /* ---------- Brand accents --------------------------------------------
       The navy carries headings, the footer and the dark page banners; the
       brighter blue the announcement bar; orange is the one warm accent
       (footer button, banner rule); purple and the light blue appear only
       in charts and the footer's column rules. */
    --color-navy:            #002843;
    --color-navy-deep:       #001B2D;
    --color-alert:           #248AD0;
    --color-sky:             #6DB1E0;
    --color-orange:          #F68D2E;
    --color-orange-hover:    #E07A1C;
    --color-purple:          #702F8A;
    --color-section:         #F4F4F4;  /* gray page band                   */

    /* ---------- Radius --------------------------------------------------
       Subtle on purpose. Nothing rounder than 8px except true pills. */
    --radius-xs:   2px;
    --radius-sm:   3px;
    --radius-md:   3px;   /* default: inputs, buttons, panels             */
    --radius-lg:   4px;   /* cards                                        */
    --radius-pill: 3px;   /* reference site: square-ish, never pill-shaped  */

    /* ---------- Shadows --------------------------------------------------
       Near-invisible. Elevation is not a structural device in this system;
       borders are. `--shadow-md` exists only for true overlays. */
    --shadow-none: none;
    --shadow-xs:   0 1px 1px rgba(0, 40, 67, 0.04);
    --shadow-sm:   0 1px 2px rgba(0, 40, 67, 0.06);
    --shadow-md:   0 8px 24px rgba(0, 40, 67, 0.12);
    --shadow-bar:  0 -1px 0 0 var(--color-border-strong);

    /* ---------- Spacing --------------------------------------------------
       4px base scale. Component padding references these, never raw px. */
    --space-0:   0;
    --space-1:   4px;
    --space-2:   8px;
    --space-3:   12px;
    --space-4:   16px;
    --space-5:   20px;
    --space-6:   24px;
    --space-7:   32px;
    --space-8:   40px;
    --space-9:   48px;
    --space-10:  64px;

    /* ---------- Typography ------------------------------------------------
       One family. Hierarchy comes from weight, color and spacing rather than
       from size, which is why the largest step is only 32px. */
    --font-sans:  'Open Sans', sans-serif;
    --font-mono:  ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --text-2xs:   12px;
    --text-xs:    13px;
    --text-sm:    14px;
    --text-base:  15px;
    --text-md:    16px;
    --text-lg:    19px;
    --text-xl:    21px;
    --text-2xl:   26px;
    --text-3xl:   34px;

    --leading-tight:   1.25;
    --leading-snug:    1.4;
    --leading-normal:  1.55;
    --leading-relaxed: 1.65;

    --weight-normal:  400;
    --weight-medium:  600;
    --weight-semi:    600;
    --weight-bold:    700;

    --tracking-tight:  -0.02em;
    --tracking-normal: 0;
    --tracking-wide:   0.06em;  /* uppercase table headers / eyebrows      */

    /* ---------- Layout ---------------------------------------------------- */
    --measure-doc:    1200px;
    --measure-text:   78ch;
    --nav-height:     72px;
    --control-height: 40px;
    --control-height-lg: 44px;

    /* ---------- Motion -----------------------------------------------------
       Short, linear-ish, color-only. Nothing moves, scales, or bounces. */
    --transition-fast: 120ms ease;
    --transition-base: 160ms ease;
}


/* ---------- daisyUI theme bridge ---------------------------------------
   The pages carry data-theme="fpn", a name daisyUI does not ship, so none
   of its ~30 bundled themes can shadow this and this cannot shadow them.
   Every value below points at a token above; no new color is introduced. */
[data-theme="fpn"] {
    color-scheme: light;
    --p:  #0077C8;  /* primary          -> primary blue      */
    --pf: #005E9F;  /* primary-focus                          */
    --pc: #FFFFFF;  /* primary-content                        */
    --s:  #53565A;  /* secondary        -> text-secondary     */
    --sc: #FFFFFF;
    --a:  #0077C8;  /* accent           -> primary blue       */
    --ac: #FFFFFF;
    --n:  #002843;  /* neutral          -> ink                */
    --nc: #FFFFFF;
    --b1: #FFFFFF;  /* base-100         -> surface            */
    --b2: #F4F4F4;  /* base-200         -> page ground        */
    --b3: #E6E6E6;  /* base-300         -> border             */
    --bc: #424448;  /* base-content     -> text               */
    --su: #1B7A46;  /* success          -> money green        */
    --suc: #FFFFFF;
    --in: #0077C8;  /* info             -> primary blue       */
    --inc: #FFFFFF;
    --wa: #9A6212;  /* warning                                */
    --wac: #FFFFFF;
    --er: #B3261E;  /* error                                  */
    --erc: #FFFFFF;
    --rounded-box:   4px;
    --rounded-btn:   3px;
    --rounded-badge: 999px;
    --animation-btn:   0s;   /* this site avoids flashy motion by design */
    --animation-input: 0s;
    --btn-focus-scale: 1;    /* no "pop" on focus                        */
    --tab-radius: 3px;
}


/* ==========================================================================
   2. BASE
   ========================================================================== */

body {
    font-family: var(--font-sans);
    font-weight: var(--weight-normal);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scoped under `body` because the Tailwind Play CDN injects its preflight
   (which resets headings to `font-weight: inherit`) after this stylesheet;
   a bare `h1, h2` selector loses the cascade and headings fall back to the
   body weight. */
body h1, body h2, body h3, body h4, .heading-font, .display {
    font-family: var(--font-sans);
    font-weight: var(--weight-semi);
    color: var(--color-text-strong);
    letter-spacing: var(--tracking-normal);
}
/* Large headings are light, the way the reference site sets them: h1 in a
   300 weight, h2 in regular. Smaller headings keep the semibold. */
body h1 { font-weight: 300; }
body h2 { font-weight: 400; }

/* Page title. Compact rather than oversized: hierarchy is carried by weight
   and the rule beneath it, not by scale. */
body .page-title {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: var(--text-3xl);
    line-height: var(--leading-tight);
    letter-spacing: 0;
    color: var(--color-text-strong);
}

a { color: inherit; }


/* ==========================================================================
   3. TYPOGRAPHY UTILITIES
   ========================================================================== */

/* Tabular figures: every dollar amount, percentage and score uses .num so
   digits occupy identical width and align into columns down a table. */
.num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.ident {
    font-variant-numeric: tabular-nums;
}

/* Uppercase micro-label, for tabular contexts: table headers and metric
   captions, where a short label helps scanning down a column. */
.eyebrow {
    font-size: var(--text-2xs);
    line-height: var(--leading-snug);
    font-weight: var(--weight-semi);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* Narrative section label: sentence case, because it is read rather than
   scanned. */
.label-soft {
    font-size: var(--text-sm);
    line-height: var(--leading-snug);
    font-weight: var(--weight-semi);
    letter-spacing: var(--tracking-normal);
    text-transform: none;
    color: var(--color-text-strong);
}

/* Section header: the standard heading for a block of content, with the
   hairline rule that separates it from what came before. */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-5);
    border-bottom: 1px solid var(--color-border);
}
.section-header__title {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    color: var(--color-text-strong);
    line-height: var(--leading-tight);
}


/* ==========================================================================
   4. LAYOUT PRIMITIVES
   ========================================================================== */

.shell {
    max-width: var(--measure-doc);
    margin: 0 auto var(--space-5);
    padding-left: var(--space-5);
    padding-right: var(--space-5);
}

.panel {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-5);
}

/* A panel that reads as a sub-area rather than a sheet of its own. */
.panel-sunken {
    background-color: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
}

.split { display: grid; gap: var(--space-7); }

@media (min-width: 640px) {
    .shell { padding-left: var(--space-7); padding-right: var(--space-7); }
    .panel { padding: var(--space-8) var(--space-7); }
}
@media (min-width: 1024px) {
    .split { grid-template-columns: 280px minmax(0, 1fr); column-gap: var(--space-9); }
}


/* ==========================================================================
   5. FOCUS
   One visible, consistent focus treatment everywhere.
   ========================================================================== */

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-border-focus);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}


/* ==========================================================================
   6. SITE HEADER (rendered by site-chrome.js)
   Modelled on a policy-institute masthead: a bright blue announcement bar,
   then a white bar with the mark on the left, dropdown tabs in the middle
   and two solid buttons on the right. Tabs open full-width "mega" panels of
   link columns. The whole block is sticky.
   ========================================================================== */

.site-top {
    position: sticky;
    top: 0;
    z-index: 60;
    background-color: var(--color-surface);
}
.site-top .hidden { display: none !important; }
html { scroll-padding-top: var(--site-top-h, 0px); }
@media (min-width: 1024px) {
    /* Side columns that stick under the header instead of behind it. */
    body .lg\:top-8 { top: calc(var(--site-top-h, 0px) + 2rem); }
}

/* --- Announcement bar ---------------------------------------------------- */
.site-alert {
    position: relative;
    background-color: var(--color-alert);
    color: #FFFFFF;
    font-size: 14px;
    line-height: 20px;
    padding: 8px 48px;
    text-align: center;
}
.site-alert__text { margin: 0; }
.site-alert__sep { opacity: 0.85; padding: 0 2px; }
.site-alert a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 2px; }
.site-alert a:hover { text-decoration-thickness: 2px; }
.site-alert__close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 0; color: #FFFFFF; cursor: pointer;
    border-radius: var(--radius-sm);
}
.site-alert__close svg { width: 16px; height: 16px; }
.site-alert__close:hover { background-color: rgba(255, 255, 255, 0.15); }
[dir="rtl"] .site-alert__close { right: auto; left: 12px; }

/* --- White bar ----------------------------------------------------------- */
.site-nav {
    position: relative;
    background-color: var(--color-nav-bg);
    border-bottom: 1px solid var(--color-nav-border);
    box-shadow: 0 2px 6px rgba(0, 40, 67, 0.06);
}
.site-nav__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-5);
    min-height: var(--nav-height);
}
@media (min-width: 640px) {
    .site-nav__inner { padding-left: var(--space-7); padding-right: var(--space-7); }
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: var(--color-navy);
    text-decoration: none;
}
.brand__mark { width: 40px; height: 40px; color: #C9A227; flex-shrink: 0; }
/* Wordmark modelled on the reference logo's "NETWORK": wide-tracked caps in
   a medium weight. Helvetica Neue has a true 500 on Macs; the hairline
   stroke thickens it the same small amount where only regular exists. */
.brand__word {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 31px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: 0.25em;
    color: var(--color-navy);
    margin-right: -0.25em;
    -webkit-text-stroke: 0.35px currentColor;
}

/* --- Tabs ---------------------------------------------------------------- */
.tabs {
    display: none;
    align-items: center;
    gap: var(--space-2);
    margin: 0 auto;
}
@media (min-width: 1024px) { .tabs { display: flex; } }

.tab { position: static; }
.tab__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 15px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-navy);
    background: transparent;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--transition-fast);
}
.tab__btn:hover,
.tab.is-open > .tab__btn,
.tab.is-current > .tab__btn { background-color: var(--color-primary-subtle); }
.tab__chev { width: 14px; height: 14px; stroke-width: 1.8; transition: transform var(--transition-fast); }
.tab.is-open .tab__chev { transform: rotate(180deg); }
.tab__globe { width: 18px; height: 18px; }

/* Full-width dropdown panel of link columns. */
.mega {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-nav-border);
    box-shadow: 0 12px 24px rgba(0, 40, 67, 0.12);
    z-index: 70;
}
.mega[hidden] { display: none; }
.mega__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-7) var(--space-7) var(--space-8);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-6) var(--space-9);
}
.mega__head {
    margin: 0 0 var(--space-3);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
}
.mega__link {
    display: block;
    padding: 6px 0;
    color: var(--color-navy);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.45;
}
.mega__link:hover .mega__title { color: var(--color-primary); text-decoration: underline; }
.mega__link--rich { padding: 8px 0; }
.mega__link--rich .mega__title { display: block; font-weight: 700; font-size: 15px; }
.mega__desc { display: block; margin-top: 2px; color: var(--color-text-secondary); font-size: 14px; }

/* --- Right cluster: language, Login, Get Started ------------------------ */
.site-nav__right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
@media (min-width: 1024px) { .site-nav__right { margin-left: 0; } }
[dir="rtl"] .site-nav__right { margin-left: 0; margin-right: auto; }
@media (min-width: 1024px) { [dir="rtl"] .site-nav__right { margin-right: 0; } }

.tab--lang, .tab--login { position: relative; display: none; }
@media (min-width: 1024px) { .tab--lang, .tab--login { display: block; } }
.tab--lang .tab__btn { padding: 0 10px; font-size: 14px; }

.langmenu, .loginmenu {
    position: absolute;
    right: 0;
    top: calc(100% + 16px);
    background-color: var(--color-surface);
    border: 1px solid var(--color-nav-border);
    border-radius: 3px;
    box-shadow: 0 12px 24px rgba(0, 40, 67, 0.14);
    z-index: 70;
}
[dir="rtl"] .langmenu, [dir="rtl"] .loginmenu { right: auto; left: 0; }
.langmenu[hidden], .loginmenu[hidden] { display: none; }
.langmenu { min-width: 170px; padding: 6px; display: grid; }
.loginmenu { width: 340px; padding: var(--space-5); }

/* i18n.js toggles text-white / text-white/60 / font-bold on these buttons;
   the rules below win over those so the menu stays readable. */
.site-top .lang-btn {
    display: block;
    width: 100%;
    text-align: start;
    padding: 8px 12px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600 !important;
    color: var(--color-navy) !important;
    background: transparent;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
}
.site-top .lang-btn:hover { background-color: var(--color-surface-sunken); }
.site-top .lang-btn[aria-pressed="true"] {
    background-color: var(--color-primary-subtle);
    color: var(--color-navy) !important;
    font-weight: 700 !important;
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 15px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--transition-fast);
}
.btn-nav--dark { background-color: var(--color-navy); color: #FFFFFF; }
.btn-nav--dark:hover, .tab--login.is-open .btn-nav--dark { background-color: #003A61; }
.btn-nav--light { background-color: var(--color-primary-subtle); color: var(--color-navy); display: none; }
.btn-nav--light:hover { background-color: #C6E1F3; }
@media (min-width: 1024px) { .btn-nav--light { display: inline-flex; } }
.btn-nav--blue { background-color: var(--color-primary); color: #FFFFFF; }
.btn-nav--blue:hover { background-color: var(--color-primary-hover); }

/* Organization login panel. */
.login-form { margin: 0; }
.login-form__title { margin: 0 0 var(--space-3); font-size: 18px; font-weight: 400; color: var(--color-navy); }
.login-form__label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; color: var(--color-navy); }
.login-form__row { display: flex; align-items: stretch; gap: 0; }
.login-form__prefix {
    display: inline-flex; align-items: center;
    padding: 0 10px;
    font-size: 14px; color: var(--color-text-muted);
    background-color: var(--color-surface-sunken);
    border: 1px solid var(--color-border-input);
    border-right: 0;
    border-radius: 3px 0 0 3px;
}
.login-form__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 0 10px;
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--color-text);
    border: 1px solid var(--color-border-input);
    border-radius: 0;
}
.login-form__input:focus { outline: 2px solid var(--color-primary); outline-offset: -1px; }
.login-form__input[aria-invalid="true"] { border-color: var(--color-danger); }
.login-form__row .btn-nav { border-radius: 0 3px 3px 0; }
[dir="rtl"] .login-form__row { flex-direction: row; }
.login-form__help { margin: 8px 0 0; font-size: 13px; color: var(--color-text-muted); line-height: 1.45; }
.login-form__err { margin: 8px 0 0; font-size: 13px; color: var(--color-danger); font-weight: 600; }
.login-form__err[hidden] { display: none; }

/* --- Phone / tablet ------------------------------------------------------ */
.nav-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    color: var(--color-navy);
    background: transparent;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
}
.nav-burger svg { width: 26px; height: 26px; }
.nav-burger:hover { background-color: var(--color-primary-subtle); }
@media (min-width: 1024px) { .nav-burger { display: none; } }

.mobile-menu {
    border-top: 1px solid var(--color-nav-border);
    background-color: var(--color-surface);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}
@media (min-width: 1024px) { .mobile-menu { display: none !important; } }
.mobile-menu__inner { padding: var(--space-3) var(--space-5) var(--space-6); }
.mobile-menu__group { padding: var(--space-4) 0; border-bottom: 1px solid var(--color-nav-border); }
.mobile-menu__group:last-child { border-bottom: 0; }
.mobile-menu__head { margin: 0 0 var(--space-2); font-size: 17px; font-weight: 700; color: var(--color-navy); }
.mobile-menu .mega__col { margin-top: var(--space-2); }
/* The first column's heading repeats the group heading; skip it. */
.mobile-menu__group > .mega__col:nth-child(2) > .mega__head { display: none; }
.mobile-menu .mega__head { font-size: 14px; margin-bottom: 4px; }
.mobile-menu__langs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mobile-menu__langs .lang-btn { border: 1px solid var(--color-nav-border); text-align: center; }


/* ==========================================================================
   6b. PAGE BANNERS, BREADCRUMBS, SECTION HEADINGS
   ========================================================================== */

/* Full-width navy banner with a centered title and a short orange rule. */
.page-banner {
    background-color: var(--color-navy);
    color: #FFFFFF;
    text-align: center;
    padding: 56px var(--space-5) 60px;
}
.page-banner__inner { max-width: 820px; margin: 0 auto; }
.page-banner__label { margin: 0 0 var(--space-3); font-size: 14px; font-weight: 700; color: var(--color-sky); }
body .page-banner__title {
    margin: 0;
    font-size: 34px;
    line-height: 1.25;
    font-weight: 300;
    color: #FFFFFF;
    letter-spacing: 0;
}
@media (min-width: 640px) { body .page-banner__title { font-size: 42px; } }
.page-banner__rule { display: block; width: 72px; height: 3px; margin: 22px auto 0; background-color: var(--color-orange); }
.page-banner__sub { margin: 20px auto 0; max-width: 62ch; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, 0.9); }
.page-banner .btn-primary-fin { margin-top: 28px; }

/* Gray band holding a navy text box beside a layered info card - the shape
   of an image hero, without the photograph. */
.hero {
    background-color: var(--color-section);
    padding: var(--space-8) var(--space-5);
}
.hero__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: var(--space-7);
    align-items: center;
}
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1fr 1fr; gap: 0; } }
.hero__box {
    position: relative;
    z-index: 1;
    background-color: var(--color-navy);
    color: #FFFFFF;
    padding: 44px 40px;
}
@media (min-width: 900px) { .hero__box { margin-right: -48px; } }
.hero__label { margin: 0 0 var(--space-3); font-size: 14px; font-weight: 700; color: var(--color-sky); }
body .hero__title { margin: 0; font-size: 34px; line-height: 1.25; font-weight: 300; color: #FFFFFF; }
@media (min-width: 640px) { body .hero__title { font-size: 40px; } }
.hero__text { margin: 18px 0 0; font-size: 16px; line-height: 1.65; color: #FFFFFF; font-weight: 600; }
.hero__link { display: inline-block; margin-top: 22px; color: var(--color-sky); text-decoration: underline; text-underline-offset: 3px; font-size: 16px; }
.hero__side { position: relative; padding: 24px 0 0 24px; }
.hero__side::before {
    content: "";
    position: absolute;
    left: 0; top: 0; right: 24px; bottom: 24px;
    background-color: var(--color-primary-subtle);
}
.hero__card {
    position: relative;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 36px 40px 36px 88px;
}
@media (max-width: 899px) { .hero__card { padding: 28px; } }

/* Breadcrumb trail above a banner. */
.crumbs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px var(--space-5);
    font-size: 13px;
    color: var(--color-text-muted);
}
@media (min-width: 640px) { .crumbs { padding-left: var(--space-7); padding-right: var(--space-7); } }
.crumbs a { color: var(--color-text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--color-primary); text-decoration: underline; }
.crumbs__sep { padding: 0 8px; color: var(--color-border-strong); }

/* Small blue label above a centered heading ("Work With Us" / "Help Us..."). */
.section-kicker { margin: 0; font-size: 19px; font-weight: 400; color: var(--color-primary); text-align: center; }
body .section-heading { margin: 6px 0 0; font-size: 32px; line-height: 1.3; font-weight: 400; color: var(--color-navy); text-align: center; }

/* Orange button (footer, banners). */
.btn-orange {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 28px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-navy-deep);
    background-color: var(--color-orange);
    border: 0;
    border-radius: 3px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}
.btn-orange:hover { background-color: var(--color-orange-hover); }


/* ==========================================================================
   6c. SITE FOOTER (rendered by site-chrome.js)
   ========================================================================== */

.site-footer { background-color: var(--color-navy); color: #FFFFFF; margin-top: var(--space-10); }
.site-footer__inner { max-width: 1100px; margin: 0 auto; padding: 0 var(--space-5); }
@media (min-width: 640px) { .site-footer__inner { padding-left: var(--space-7); padding-right: var(--space-7); } }

.site-footer__stay { padding: 56px 0 44px; text-align: center; }
.site-footer__label { margin: 0; font-size: 19px; color: var(--color-sky); }
body .site-footer__h { margin: 8px 0 26px; font-size: 26px; line-height: 1.35; font-weight: 400; color: #FFFFFF; }
@media (min-width: 640px) { body .site-footer__h { font-size: 32px; } }

.site-footer__cols { padding: 8px 0 52px; }
.site-footer__cols--top { padding-top: 52px; }
.site-footer__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 32px; }
@media (min-width: 900px) { .site-footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.site-footer__colhead {
    margin: 0 0 18px;
    padding-bottom: 14px;
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    border-bottom: 2px solid var(--color-sky);
}
.site-footer__colhead.fc2 { border-bottom-color: var(--color-orange); }
.site-footer__colhead.fc3 { border-bottom-color: #9B59B6; }
.site-footer__colhead.fc4 { border-bottom-color: var(--color-primary); }
.site-footer__col ul { list-style: none; margin: 0; padding: 0; }
.site-footer__col li { margin: 0 0 10px; }
.site-footer__col a { color: #FFFFFF; font-size: 14px; text-decoration: none; }
.site-footer__col a:hover { text-decoration: underline; }

.site-footer__bar { background-color: var(--color-navy-deep); padding: 18px 0; }
.site-footer__barrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; font-size: 13px; }
.site-footer__barrow p { margin: 0; }
.site-footer__barrow a { color: #FFFFFF; text-decoration: none; }
.site-footer__barrow a:hover { text-decoration: underline; }

/* A page-specific notice (disclaimers) that sits above the site footer. */
.page-notes { background-color: var(--color-section); margin-top: var(--space-9); padding: var(--space-8) 0; }
.page-notes + .site-footer { margin-top: 0; }


/* Secondary toolbar: the strip under the nav holding search, filters and
   view switches. White, hairline-bounded, compact. */
.toolbar {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}
.toolbar__inner {
    max-width: var(--measure-doc);
    margin: 0 auto;
    padding: var(--space-3) var(--space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}
@media (min-width: 640px) {
    .toolbar__inner { padding-left: var(--space-7); padding-right: var(--space-7); }
}


/* ==========================================================================
   7. FORM CONTROLS
   A visible hairline box with a plain white interior. On focus the border
   turns blue and a soft blue ring appears - no glow, no scale, no shadow.
   ========================================================================== */

.fld,
.input {
    width: 100%;
    min-height: var(--control-height-lg);
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-sans);
    font-size: var(--text-md);
    font-weight: var(--weight-normal);
    line-height: var(--leading-snug);
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border-input);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
    appearance: none;
}
.fld::placeholder,
.input::placeholder {
    color: var(--color-text-muted);
    font-weight: var(--weight-normal);
}
.fld:hover,
.input:hover { border-color: var(--color-border-strong); }

.fld:focus, .fld:focus-visible,
.input:focus, .input:focus-visible {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px var(--color-primary-subtle);
}
.fld:disabled,
.input:disabled {
    background-color: var(--color-surface-sunken);
    color: var(--color-text-muted);
    border-color: var(--color-border);
    cursor: not-allowed;
}
.fld[aria-invalid="true"],
.input[aria-invalid="true"] { border-color: var(--color-danger); }

select.fld,
select.input {
    padding-right: var(--space-8);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23647481' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    background-size: 16px 16px;
}

/* Search field: the magnifier sits inside the box's own left padding. */
.fld-search {
    padding-left: var(--space-8);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23647481' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left var(--space-3) center;
    background-size: 16px 16px;
}

/* Unit affix ($, %, per month): a plain character inside the field's own
   padding - no divider, gutter, or background of its own. */
.affix-group { position: relative; display: block; }
.affix {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    font-size: var(--text-base);
    color: var(--color-text-muted);
    pointer-events: none;
    white-space: nowrap;
}
.affix-left  { left: var(--space-3); }
.affix-right { right: var(--space-3); }

input[type="checkbox"],
input[type="radio"] { accent-color: var(--color-primary); }

.field-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--weight-semi);
    color: var(--color-text-strong);
    margin-bottom: var(--space-2);
}
.field-help {
    font-size: var(--text-xs);
    line-height: var(--leading-snug);
    color: var(--color-text-muted);
    margin-top: var(--space-2);
}


/* ==========================================================================
   8. BUTTONS
   Understated. The primary button is the only saturated element on a
   typical page, and there is at most one of them in view.
   ========================================================================== */

.btn-primary-fin,
.btn-secondary-fin,
.btn-ghost-fin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 42px;
    padding: 0 30px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: var(--weight-bold);
    line-height: 1;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--transition-fast),
                border-color var(--transition-fast),
                color var(--transition-fast);
}

.btn-primary-fin {
    color: var(--color-on-primary);
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-primary-fin:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}
.btn-primary-fin:active {
    background-color: var(--color-primary-active);
    border-color: var(--color-primary-active);
}

.btn-secondary-fin {
    color: var(--color-navy);
    background-color: var(--color-primary-subtle);
    border-color: var(--color-primary-subtle);
}
.btn-secondary-fin:hover {
    background-color: #C6E1F3;
    border-color: #C6E1F3;
}
.btn-secondary-fin:active { background-color: var(--color-primary-muted); }

.btn-ghost-fin {
    color: var(--color-text-secondary);
    background-color: transparent;
    border-color: transparent;
    font-weight: var(--weight-medium);
}
.btn-ghost-fin:hover {
    background-color: var(--color-surface-sunken);
    color: var(--color-text-strong);
}

.btn-primary-fin:disabled,
.btn-secondary-fin:disabled,
.btn-ghost-fin:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Square icon button, for toolbar affordances (filter, calendar, chevrons). */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--control-height);
    height: var(--control-height);
    padding: 0;
    color: var(--color-text-secondary);
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}
.btn-icon:hover {
    background-color: var(--color-surface-sunken);
    color: var(--color-text-strong);
}

/* A button sitting on the primary blue, where one exists. */
.btn-on-navy {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--control-height-lg);
    padding: 0 var(--space-5);
    font-size: var(--text-base);
    font-weight: var(--weight-semi);
    color: var(--color-on-primary);
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}
.btn-on-navy:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.75);
}


/* ==========================================================================
   9. SEGMENTED CONTROL
   Built on a peer-checked pattern so the underlying radio inputs, names and
   values are completely unchanged. The selected option is a solid blue pill;
   the rest are quiet uppercase text.
   ========================================================================== */

.seg {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1);
    background-color: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
}
.seg-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 var(--space-4);
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: var(--weight-semi);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}
.seg-label:hover { color: var(--color-text-strong); }
.seg input:checked + .seg-label {
    color: var(--color-on-primary);
    background-color: var(--color-primary);
}
.seg input:focus-visible + .seg-label {
    outline: 2px solid var(--color-border-focus);
    outline-offset: 2px;
}

/* 1-5 rating variant: the numerals are far narrower than the anchor captions
   printed beneath them, so each option takes an equal share of the full width
   instead. Sentence-cased and un-tracked, since these are numerals. */
.seg-scale {
    display: flex;
    width: 100%;
    min-width: 260px;
    gap: var(--space-1);
}
.seg-scale label { flex: 1 1 0; display: flex; }
.seg-scale .seg-label {
    width: 100%;
    letter-spacing: var(--tracking-normal);
    text-transform: none;
    font-variant-numeric: tabular-nums;
}


/* ==========================================================================
   10. TABLES
   Structured and administrative: bold dark headers over a strong hairline,
   thin column dividers, quiet zebra-free rows with a soft blue hover.
   ========================================================================== */

.table-wrap {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-base);
}
.data-table thead th {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    vertical-align: bottom;
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--color-text-strong);
    background-color: var(--color-surface-header);
    border-bottom: 1px solid var(--color-border-strong);
    white-space: nowrap;
}
/* Thin vertical rules between columns, as in an administrative register. */
.data-table thead th + th { border-left: 1px solid var(--color-border); }
.data-table tbody td {
    padding: var(--space-3) var(--space-4);
    vertical-align: top;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background-color: var(--color-surface-sunken); }
.data-table tbody tr.is-selected td {
    background-color: var(--color-primary-subtle);
    color: var(--color-text-strong);
}
.data-table .cell-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--color-text-strong);
    font-weight: var(--weight-medium);
}

/* Sort affordance in a header cell. */
.th-sort {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    width: 100%;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
.th-sort__icon { width: 12px; height: 12px; color: var(--color-text-muted); flex-shrink: 0; }


/* ==========================================================================
   11. CARDS, CALLOUTS AND BADGES
   ========================================================================== */

.card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-none);
}
.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border);
}
.card__title {
    font-size: var(--text-md);
    font-weight: var(--weight-bold);
    color: var(--color-text-strong);
}
.card__meta {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}
.card__body { padding: var(--space-5); }

/* Informational area / empty state: a soft blue field with centered muted
   text. The one place a tinted fill covers real width. */
.callout {
    background-color: var(--color-info-bg);
    border: 1px solid var(--color-primary-muted);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    color: var(--color-text-secondary);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
}
.callout-empty {
    background-color: var(--color-info-bg);
    border: 1px solid var(--color-primary-muted);
    border-radius: var(--radius-md);
    padding: var(--space-8) var(--space-5);
    text-align: center;
    color: var(--color-text-secondary);
    font-size: var(--text-md);
}
.callout-note {
    background-color: var(--color-surface-sunken);
    border-left: 3px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

/* Outlined pill badges, as in a legend row. Tinted fill, matching border,
   dark readable text - never a solid saturated block. */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px var(--space-3);
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border-strong);
    background-color: var(--color-neutral-subtle);
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
    font-weight: var(--weight-semi);
    line-height: var(--leading-snug);
    white-space: nowrap;
}
.badge-info    { background-color: var(--color-primary-subtle); border-color: var(--color-primary-muted); color: var(--color-primary-active); }
.badge-success { background-color: var(--color-success-subtle); border-color: var(--color-success);       color: var(--color-success); }
.badge-warning { background-color: var(--color-warning-subtle); border-color: var(--color-warning);       color: var(--color-warning); }
.badge-danger  { background-color: var(--color-danger-subtle);  border-color: var(--color-danger);        color: var(--color-danger); }

/* Key figure, for a total or headline number. */
.stat { display: flex; flex-direction: column; gap: var(--space-1); }
.stat__label {
    font-size: var(--text-2xs);
    font-weight: var(--weight-semi);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.stat__value {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    color: var(--color-text-strong);
    font-variant-numeric: tabular-nums;
    line-height: var(--leading-tight);
}
.stat__value--money { color: var(--color-success); }


/* ==========================================================================
   12. LINKS AND DIVIDERS
   ========================================================================== */

.link {
    color: var(--color-text-link);
    text-decoration: none;
    font-weight: var(--weight-medium);
    transition: color var(--transition-fast);
}
.link:hover { color: var(--color-primary-hover); text-decoration: underline; }

.divider { height: 1px; background-color: var(--color-border); border: 0; margin: var(--space-6) 0; }
.divider-strong { height: 1px; background-color: var(--color-border-strong); border: 0; margin: var(--space-6) 0; }


/* ==========================================================================
   13. PRINT
   The packet generator depends on this layer. Tints and fills are dropped so
   the printed sheet is plain black on white.
   ========================================================================== */

@media print {
    .no-print { display: none !important; }
    body { background: #FFFFFF; color: #000000; }
    .panel, .card, .table-wrap {
        border-color: #999999;
        border-radius: 0;
        box-shadow: none;
    }
    .callout, .callout-empty, .callout-note, .badge {
        background: transparent !important;
        border-color: #999999;
    }
    .page-banner, .hero, .page-notes { background: none !important; color: #000000; padding: 0 0 12px; }
    body .page-banner__title, .page-banner__sub, .page-banner__label { color: #000000 !important; }
    .page-banner__rule, .page-banner .btn-primary-fin { display: none; }
}

/* ==========================================================================
   RIGHT-TO-LEFT (Dari)
   i18n.js sets <html dir="rtl"> when the Dari dictionary is active, which
   handles text flow, list markers and form-control alignment on its own.
   What it cannot do is flip the places where this stylesheet - or a Tailwind
   utility in the markup - names a physical side. Those are mirrored here,
   one block per source, so adding an `ml-` or a `text-right` to a page means
   adding one line below rather than hunting for what broke.

   Only sides that carry meaning are flipped. Symmetric padding pairs
   (.shell, .site-nav__inner, .toolbar__inner) are already equal on both
   sides and are left alone.
   ========================================================================== */


/* --- Absolutely positioned affixes -------------------------------------- */
[dir="rtl"] .affix-left  { left: auto; right: var(--space-3); }
[dir="rtl"] .affix-right { right: auto; left: var(--space-3); }

/* --- Form controls: the select chevron and the search magnifier both sit
       in one side's padding, so the padding and the icon move together. --- */
[dir="rtl"] select.fld,
[dir="rtl"] select.input {
    padding-right: var(--space-3);
    padding-left: var(--space-8);
    background-position: left var(--space-3) center;
}
[dir="rtl"] .fld-search {
    padding-left: var(--space-3);
    padding-right: var(--space-8);
    background-position: right var(--space-3) center;
}

/* --- Data table: header text, the column rules, and the figures column -- */
[dir="rtl"] .data-table thead th { text-align: right; }
[dir="rtl"] .data-table thead th + th {
    border-left: 0;
    border-right: 1px solid var(--color-border);
}
[dir="rtl"] .data-table .cell-num { text-align: left; }

/* --- Note callout's accent bar ------------------------------------------ */
[dir="rtl"] .callout-note {
    border-left: 0;
    border-right: 3px solid var(--color-border-strong);
}

/* --- calculator.css: disclosure heading, two-column card divider -------- */
[dir="rtl"] .disclosure { text-align: right; }
@media (min-width: 768px) {
    [dir="rtl"] .calc-card .calc-section:nth-child(2n) {
        border-left: 0;
        border-right: 1px solid var(--color-border);
    }
}

/* --- Tailwind utilities used in the markup ------------------------------ */
[dir="rtl"] .text-left  { text-align: right; }
[dir="rtl"] .text-right { text-align: left; }

[dir="rtl"] .ml-px       { margin-left: 0; margin-right: 1px; }
[dir="rtl"] .ml-2        { margin-left: 0; margin-right: 0.5rem; }
[dir="rtl"] .ml-\[27px\] { margin-left: 0; margin-right: 27px; }

[dir="rtl"] .pl-4        { padding-left: 0; padding-right: 1rem; }
[dir="rtl"] .pl-5        { padding-left: 0; padding-right: 1.25rem; }
[dir="rtl"] .pl-6        { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .pl-\[34px\] { padding-left: 0; padding-right: 34px; }

[dir="rtl"] .pr-\[40px\] { padding-right: 0; padding-left: 40px; }
[dir="rtl"] .pr-\[76px\] { padding-right: 0; padding-left: 76px; }
[dir="rtl"] .pr-\[92px\] { padding-right: 0; padding-left: 92px; }

[dir="rtl"] .border-l-2 {
    border-left-width: 0;
    border-right-width: 2px;
    border-right-style: solid;
}

@media (min-width: 640px) {
    [dir="rtl"] .sm\:pl-5 { padding-left: 0; padding-right: 1.25rem; }
    [dir="rtl"] .sm\:pr-5 { padding-right: 0; padding-left: 1.25rem; }
}
@media (min-width: 1024px) {
    [dir="rtl"] .lg\:pr-\[14rem\]    { padding-right: 0; padding-left: 14rem; }
    [dir="rtl"] .lg\:right-\[-1rem\] { right: auto; left: -1rem; }
}
@media (min-width: 1280px) {
    [dir="rtl"] .xl\:pr-\[16rem\]       { padding-right: 0; padding-left: 16rem; }
    [dir="rtl"] .xl\:right-\[-1\.5rem\] { right: auto; left: -1.5rem; }
}

/* An inline border-left on the character-warning callout in packet.html;
   an inline style can only be beaten with !important. */
[dir="rtl"] [style*="border-left"] {
    border-left: 0 !important;
    border-right: 2px solid var(--color-warning) !important;
}

/* Icons that point somewhere - a "next" arrow, not a printer - are mirrored
   in RTL. Tagged per icon rather than per button, because the same button
   class also carries print and download icons, which must not flip. */
[dir="rtl"] .rtl-flip { transform: scaleX(-1); }
