/* ==========================================================================
   Lolly Central — brand stylesheet
   Hand-written, no framework. Targets WCAG 2.2 AAA.
   Headings: Poppins (self-hosted) · Body: Calibri (system) / Carlito (self-hosted fallback)
   ========================================================================== */

/* ----- Fonts ------------------------------------------------------------- */
/* Poppins — headings */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/poppins-500-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/poppins-500-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/poppins-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/poppins-600-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/poppins-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/poppins-700-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* Carlito — metric-compatible Calibri fallback for body */
@font-face {
    font-family: 'Carlito';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/carlito-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
    font-family: 'Carlito';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/carlito-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
    font-family: 'Carlito';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/carlito-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
    font-family: 'Carlito';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/carlito-700-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ----- Design tokens ----------------------------------------------------- */
:root {
    /* Brand */
    --brand: #F78E20;          /* primary orange — fills & large non-text accents only */
    --brand-hover: #E07A0E;    /* darker orange for hover/active on fills */
    --brand-deep: #8A3F00;     /* AAA-safe "orange" text on light (≈7.5:1 on white) */
    --brand-tint: #FFF3E6;     /* soft wash for section backgrounds */
    --brand-tint-2: #FDE7CC;

    /* Ink & surfaces */
    --ink: #1A1A1A;            /* body text — ≈16:1 on white */
    --ink-soft: #3D3D3D;       /* secondary text — ≈10:1 on white */
    --surface: #FFFFFF;
    --surface-alt: #FFFFFF;    /* light mode: keep the whole page white */
    --line: #DCDCD8;
    --nav-hover: #DFE0DF;      /* neutral grey hover for the top menu pills */
    --focus: #0B3DD1;          /* high-contrast focus ring */
    --header-bg: rgba(255, 255, 255, 0.92);
    --footer-bg: #1A1A1A;

    /* Type */
    --font-head: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body: Calibri, 'Carlito', 'Segoe UI', system-ui, -apple-system, sans-serif;

    /* Shape & depth */
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 4px 16px rgba(26, 26, 26, 0.08);
    --shadow-lg: 0 12px 32px rgba(26, 26, 26, 0.14);

    /* Spacing scale (8px base) */
    --sp-1: 0.5rem;
    --sp-2: 1rem;
    --sp-3: 1.5rem;
    --sp-4: 2rem;
    --sp-5: 3rem;
    --sp-6: 4.5rem;

    --container: 1200px;
    --content: 70ch;
}

/* ----- Reset / base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;          /* 17px */
    line-height: 1.6;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 var(--sp-2);
    text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 var(--sp-2); }

a {
    color: var(--brand-deep);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    text-decoration-thickness: 0.08em;
}
a:hover { text-decoration-thickness: 0.16em; }

ul, ol { margin: 0 0 var(--sp-2); padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

strong { font-weight: 700; }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-4) 0; }

:target { scroll-margin-top: 6rem; }

/* ----- Focus visibility (WCAG 2.4.7 / 2.4.13) ---------------------------- */
:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 4px;
}
/* Remove default outline only where we provide :focus-visible */
:focus:not(:focus-visible) { outline: none; }

/* ----- Skip link (WCAG 2.4.1) -------------------------------------------- */
.skip-link {
    position: absolute;
    left: var(--sp-2);
    top: -4rem;
    z-index: 1000;
    background: var(--ink);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 600;
    transition: top 0.2s ease;
}
.skip-link:focus { top: var(--sp-2); }

/* ----- Layout helpers ---------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--sp-3);
}
.section { padding-block: var(--sp-6); }
.section--alt { background: var(--surface-alt); }
.section--tint { background: var(--brand-tint); }
.section--soft-grey { background: rgba(223, 224, 223, 0.2); }   /* 20% of #DFE0DF */
.prose { max-width: var(--content); }
.lead { font-size: 1.2rem; color: var(--ink-soft); }
.text-center { text-align: center; }

main { flex: 1 0 auto; }

/* ----- Header & brand ---------------------------------------------------- */
.site-header {
    position: sticky;
    top: 2.25rem;   /* sits directly below the sticky top contact bar */
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
    min-height: 4.5rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.3rem;
    padding: 0.4rem 0.2rem;
    flex-shrink: 0;   /* never shrink/truncate the wordmark — the menu flexes instead */
}
.brand img { width: 2.6rem; height: 2.6rem; flex-shrink: 0; }
.brand__name { white-space: nowrap; }
.brand__name span { color: var(--brand); }   /* "Lolly" in brand orange, "Central" stays ink */

/* ----- Primary navigation ------------------------------------------------ */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
}
.nav-toggle__bars { display: inline-block; width: 1.25rem; height: 0.875rem; position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after,
.nav-toggle__bars span {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span { top: 50%; transform: translateY(-50%); }
.nav-toggle__bars::after { bottom: 0; }

.primary-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: clamp(0.05rem, -0.15rem + 0.5vw, 0.25rem);
    margin: 0;
    padding: 0;
}
.primary-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem clamp(0.45rem, 0.1rem + 0.6vw, 0.9rem);
    color: var(--ink);
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(0.82rem, 0.62rem + 0.5vw, 1rem);
    border-radius: 999px;
}
.primary-nav a:hover { background: var(--nav-hover); color: var(--ink); }
.primary-nav a[aria-current="page"] {
    color: var(--brand);
}
/* Nudge the menu options down slightly so they sit a touch lower in the header. */
@media (min-width: 801px) {
    .primary-nav { transform: translateY(5px); }
}

/* ----- Buttons ----------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    border: 2px solid transparent;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: #1A1A1A; color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

/* ----- Hero -------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--surface);
}
.hero__grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: var(--sp-5);
    padding-block: var(--sp-3) var(--sp-6);
}
.hero__eyebrow {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--brand);
    margin-bottom: var(--sp-2);
}

/* Home hero greeting "speech bubble" — sits over the bot so it reads as the bot greeting you.
   Thin lolly-orange outline, white fill, with a tail pointing down toward the robot. */
.bot-bubble {
    position: absolute;
    top: 10%;
    right: 58%;
    z-index: 3;
    white-space: nowrap;
    margin: 0;
    background: #fff;
    border: 2px solid var(--brand);
    border-radius: var(--radius);
    padding: var(--sp-1) var(--sp-3);
    color: #1A1A1A;   /* always dark — the bubble is white in both themes */
    font-size: clamp(1rem, 0.8rem + 0.6vw, 1.4rem);
    line-height: 1.2;
    box-shadow: var(--shadow);
    text-align: center;
}
/* Tail on the right edge, pointing right toward the bot's head. */
.bot-bubble::after {
    content: "";
    position: absolute;
    right: -11px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 20px;
    height: 20px;
    background: #fff;
    border-top: 2px solid var(--brand);
    border-right: 2px solid var(--brand);
}

/* Search inputs: lolly-orange focus ring instead of the default blue. */
.hero-search input:focus-visible,
.library-search input:focus-visible {
    outline: 3px solid var(--brand);
}

/* Inline image documents in the viewer. */
.viewer-image {
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.hero__media {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 10;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
/* decorative brand "blob" */
.hero__media::after {
    content: "";
    position: absolute;
    inset: auto -20% -25% auto;
    width: 60%;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(247,142,32,0.35), transparent 70%);
    z-index: -1;
}
/* Mascot variant: a transparent PNG that floats free of the photo "card" chrome. */
.hero__media--mascot {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    background: transparent;
    aspect-ratio: auto;
}
.hero__media--mascot img { width: 100%; height: auto; object-fit: contain; }
.hero__media--mascot::after { display: none; }

/* Blink: the eyes-closed image stacks over the bot and flashes in briefly on a loop. */
.bot-blink { position: relative; width: 100%; }
.hero__media--mascot .bot-blink__lids {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    animation: bot-blink 2s infinite;
}
@keyframes bot-blink {
    0%, 92%, 100% { opacity: 0; }
    94%, 96% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .hero__media--mascot .bot-blink__lids { animation: none; }
}

/* ----- Cards ------------------------------------------------------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: var(--sp-3);
}
.card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--sp-3);
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
a.card { text-decoration: none; color: inherit; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.card__icon {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    background: transparent;
    color: var(--brand);
    margin-bottom: var(--sp-1);
}
.card__icon svg { width: 100%; height: 100%; }
.card h3 { margin-bottom: 0.25rem; }
.card p { color: var(--ink-soft); margin-bottom: 0; }
/* Icon + heading on one row, content below. */
.card__head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: var(--sp-1); }
.card__head .card__icon { margin-bottom: 0; flex-shrink: 0; }
.card__head h3 { margin-bottom: 0; }
.card__image {
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: var(--sp-2);
}
.card__zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.card__video { width: 100%; border-radius: var(--radius-sm); margin-bottom: var(--sp-2); background: #000; }

/* Heading spans the card top; description + media sit alongside each other beneath it. */
.card__body-split { display: flex; align-items: flex-start; gap: var(--sp-3); }
.card__body-split .card__desc { flex: 1 1 40%; min-width: 0; margin: 0; color: var(--ink-soft); line-height: 1; }
.card__body-split .card__media { flex: 1 1 60%; min-width: 0; }
/* Video and the Carbon image share the same 16:9 box, so both cards are the same height. */
.card__body-split .card__media video,
.card__body-split .card__media .card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 0;
}
.card__body-split .card__media video { object-fit: cover; background: #000; }
.card__body-split .card__media .card__image { object-fit: contain; background: var(--surface); }
@media (max-width: 600px) {
    .card__body-split { flex-direction: column; align-items: stretch; }
}

/* Horizontal "Latest Release Notes" box below the cards. */
.release-banner {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    max-width: 51rem;
    margin-inline: auto;
    margin-top: var(--sp-4);
    padding: var(--sp-3);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.release-banner:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.release-banner__icon { flex-shrink: 0; width: 3rem; height: 3rem; color: var(--brand); display: inline-grid; place-items: center; }
.release-banner__icon svg { width: 100%; height: 100%; }
.release-banner__text { flex: 1; min-width: 0; }
.release-banner__title { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--ink); margin-bottom: 0.2rem; }
.release-banner__desc { display: block; color: var(--ink-soft); }
.release-banner__arrow { flex-shrink: 0; color: var(--brand); font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; }
@media (max-width: 560px) {
    .release-banner { flex-direction: column; text-align: center; }
    .release-banner__arrow { display: none; }
}

/* Lightbox: enlarge a card image over a dimmed backdrop with a close button. */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
    background: rgba(26, 26, 26, 0.6);
}
.lightbox[hidden] { display: none; }
.lightbox__frame { position: relative; display: inline-block; max-width: 92vw; max-height: 88vh; }
.lightbox__img,
.lightbox__video {
    display: block;
    max-width: 92vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.lightbox__video { width: min(92vw, 960px); background: #000; }
.lightbox__img[hidden], .lightbox__video[hidden] { display: none; }

/* Video preview thumbnail (opens in the lightbox) with a play badge. */
.card__video-trigger { position: relative; }
.card__play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.lightbox__close {
    position: absolute;
    top: -1rem;
    right: -1rem;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.lightbox__close:hover { background: var(--brand); color: #fff; }
.card__more {
    margin-top: auto;
    padding-top: var(--sp-1);
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--brand);
}

/* ----- Prose / legal pages ----------------------------------------------- */
.page-head {
    background:
        radial-gradient(40rem 24rem at 100% 0%, var(--brand-tint) 0%, transparent 60%),
        var(--surface-alt);
    border-bottom: 1px solid var(--line);
    padding-block: var(--sp-5);
}
/* Library listing header: no gradient, no divider line, and the gap down to the
   search box reduced to ~10% of the default. */
.page-head--tight {
    background: var(--surface-alt);
    border-bottom: 0;
    padding-bottom: 0.4rem;
}
.page-head--tight .lead { margin-bottom: 0; }
.section--tight { padding-top: 0.35rem; }

/* Plain header: drop the gradient (keeps the divider line + spacing) — used on document/video views. */
.page-head--plain { background: var(--surface-alt); }

/* ----- FAQ accordion ----------------------------------------------------- */
.faq-search { margin-top: 5px; margin-bottom: var(--sp-3); max-width: 26rem; }
.faq-search input { min-height: 38px; padding: 0.45rem 0.9rem; font-size: 0.95rem; }
.faq-list { max-width: 60rem; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
    list-style: none;
    cursor: pointer;
    padding: var(--sp-3) 0;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--ink);
}
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__q::marker { content: ""; }
.faq-item__q:hover { color: var(--brand); }
.faq-item__toggle {
    position: relative;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand);
}
.faq-item__toggle::before,
.faq-item__toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: #fff;
    border-radius: 2px;
    transform: translate(-50%, -50%);
}
.faq-item__toggle::before { width: 12px; height: 2px; }   /* horizontal bar */
.faq-item__toggle::after { width: 2px; height: 12px; }    /* vertical bar (hidden when open) */
.faq-item[open] .faq-item__toggle::after { display: none; }
.faq-item__a { padding-bottom: var(--sp-3); color: var(--ink-soft); }
.faq-item__summary { font-weight: 600; color: var(--ink); margin-bottom: var(--sp-1); }
.faq-item__a ul { margin: var(--sp-1) 0 0; }
.faq-item__a li { margin-bottom: 0.35em; }

/* Section header with a mascot on the right, sized to match the home hero. */
.page-head__grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
    gap: var(--sp-5);
}
.page-head__bot img { width: 100%; height: auto; }
/* The search/filter toolbar now lives in the header, just under the intro. */
.page-head .library-toolbar { margin-top: var(--sp-3); margin-bottom: 0; }
@media (max-width: 800px) {
    .page-head__grid { grid-template-columns: 1fr; }
    .page-head__bot { display: none; }   /* keep the mobile header compact */
}

/* Two-tone library page titles (e.g. "How To" orange + "Documents" ink). */
.ttl-orange { color: var(--brand); }
.ttl-ink { color: var(--ink); }
.legal h2 { margin-top: var(--sp-4); padding-top: var(--sp-2); border-top: 1px solid var(--line); }
.legal h3 { margin-top: var(--sp-3); color: var(--brand-deep); }
.legal :is(h2, h3):first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.meta-note { color: var(--ink-soft); font-size: 0.95rem; }

.callout {
    background: var(--brand-tint);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius-sm);
    padding: var(--sp-2) var(--sp-3);
    margin: var(--sp-3) 0;
}

/* ----- Footer ------------------------------------------------------------ */
.site-footer {
    flex-shrink: 0;
    background: var(--footer-bg);
    color: #ECECEC;
    padding-block: var(--sp-5) var(--sp-3);
    margin-top: var(--sp-6);
}
.site-footer a { color: #fff; }
.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--sp-4);
}
.site-footer h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: var(--sp-2); }
.footer-brand img { width: 2.4rem; height: 2.4rem; }
.footer-brand span { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.18);
    margin-top: var(--sp-4);
    padding-top: var(--sp-3);
    font-size: 0.9rem;
    color: #C9C9C9;
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    justify-content: space-between;
}

/* ----- Error / status pages ---------------------------------------------- */
.status-page { text-align: center; padding-block: var(--sp-6); }
.status-page__code {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(4rem, 2rem + 12vw, 9rem);
    line-height: 1;
    color: var(--brand);
    margin: 0;
}

/* ----- Visually-hidden (for screen-reader-only text) --------------------- */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* ----- Responsive: collapse nav on small screens ------------------------- */
@media (max-width: 800px) {
    .nav-toggle { display: inline-flex; }
    .primary-nav {
        display: none;
        position: absolute;
        left: 0; right: 0;
        top: 100%;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        padding: var(--sp-2) var(--sp-3) var(--sp-3);
    }
    .primary-nav.is-open { display: block; }
    .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0.15rem; }
    .primary-nav a { width: 100%; }
    .site-header__inner { position: relative; }

    .hero__grid { grid-template-columns: 1fr; gap: var(--sp-4); }
    .hero__media { order: -1; }
    .site-footer__grid { grid-template-columns: 1fr; gap: var(--sp-3); }
}

/* ----- Dark mode (AAA-checked) ------------------------------------------------
   Default: follow the OS setting (prefers-color-scheme), UNLESS the user has
   explicitly chosen light (data-theme="light"). An explicit data-theme="dark"
   forces dark even on a light OS. The two dark blocks below are intentionally
   identical — keep them in sync. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --brand-deep: #FFB35C;     /* light orange for text on dark ≈8:1 */
        --brand-tint: #2A2118;
        --brand-tint-2: #34281A;
        --ink: #F2F2F0;
        --ink-soft: #C9C9C5;
        --surface: #161616;
        --surface-alt: #1F1F1F;
        --line: #3A3A38;
        --nav-hover: #2E2E2E;
        --focus: #8AB4FF;
        --header-bg: rgba(22, 22, 22, 0.92);
        --footer-bg: #0D0D0D;
    }
}
:root[data-theme="dark"] {
    --brand-deep: #FFB35C;
    --brand-tint: #2A2118;
    --brand-tint-2: #34281A;
    --ink: #F2F2F0;
    --ink-soft: #C9C9C5;
    --surface: #161616;
    --surface-alt: #1F1F1F;
    --line: #3A3A38;
    --nav-hover: #2E2E2E;
    --focus: #8AB4FF;
    --header-bg: rgba(22, 22, 22, 0.92);
    --footer-bg: #0D0D0D;
}

/* ----- Reduced motion (WCAG 2.3.3) --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ----- High-contrast / forced colours ------------------------------------ */
@media (forced-colors: active) {
    .btn, .card, .nav-toggle { border: 1px solid; }
    .primary-nav a[aria-current="page"] { box-shadow: none; text-decoration: underline; }
}

/* ==========================================================================
   Support library (SharePoint-driven)
   ========================================================================== */

/* ----- Navigation dropdowns (folders with sub-folders) ------------------- */
.has-sub { position: relative; }
.nav-sub-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    padding: 0.5rem clamp(0.45rem, 0.1rem + 0.6vw, 0.9rem);
    background: none;
    border: 0;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(0.82rem, 0.62rem + 0.5vw, 1rem);
    color: var(--ink);
    border-radius: 999px;
    cursor: pointer;
}
.nav-sub-toggle:hover { background: var(--nav-hover); color: var(--ink); }
.nav-sub-toggle[aria-current="page"] { color: var(--brand); }
.nav-sub-toggle__caret { transition: transform 0.18s ease; }
.nav-sub-toggle[aria-expanded="true"] .nav-sub-toggle__caret { transform: rotate(180deg); }

.subnav { display: none; }
.has-sub:hover > .subnav,
.has-sub:focus-within > .subnav,
.nav-sub-toggle[aria-expanded="true"] + .subnav { display: block; }

.subnav__list { list-style: none; margin: 0; padding: 0; }
.subnav__list .subnav__list {
    margin-left: 0.6rem;
    padding-left: 0.4rem;
    border-left: 2px solid var(--line);
}
.subnav__list a {
    display: block;
    min-height: 44px;
    padding: 0.5rem 0.7rem;
    color: var(--ink);
    text-decoration: none;
    border-radius: 999px;
    font-family: var(--font-head);
    font-weight: 600;
}
.subnav__list a:hover { background: var(--nav-hover); color: var(--ink); }
.subnav__list a[aria-current="page"] { color: var(--brand); }

@media (min-width: 801px) {
    .subnav {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 16rem;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-lg);
        padding: 0.5rem;
        z-index: 200;
    }
}
@media (max-width: 800px) {
    .nav-sub-toggle { width: 100%; justify-content: space-between; }
    .subnav { padding-left: 0.6rem; }
}

/* ----- Breadcrumb -------------------------------------------------------- */
.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0 0 var(--sp-2);
    font-size: 0.95rem;
}
.breadcrumb li + li::before { content: "/"; margin: 0 0.5rem; color: var(--ink-soft); }
.breadcrumb a { color: var(--brand); }
.breadcrumb [aria-current="page"] { color: var(--ink-soft); }

/* ----- Library toolbar: search + tag pills ------------------------------- */
.library-toolbar { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.library-search { display: flex; gap: 0.5rem; max-width: 36rem; }
.library-search input {
    flex: 1;
    min-height: 44px;
    padding: 0.6rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font: inherit;
    background: var(--surface);
    color: var(--ink);
}
.tag-filter { border: 0; padding: 0; margin: 0; }
.tag-filter legend {
    font-family: var(--font-head);
    font-weight: 600;
    padding: 0;
    margin-bottom: 0.5rem;
}
.tag-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
/* Wrapper anchors the hidden checkbox at the pill (not the page origin), so focusing it on
   toggle never makes the browser jump-scroll. The label is the clickable, visible pill. */
.tag-pill { position: relative; display: inline-flex; }
.tag-pill__input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.tag-pill__label {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.32rem 0.72rem;
    border: 1px solid #DFE0DF;
    border-radius: 999px;
    background: #DFE0DF;
    cursor: pointer;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.76rem;
    color: #41413B;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.tag-pill__label:hover { border-color: var(--brand); }
.tag-pill:has(.tag-pill__input:checked) .tag-pill__label { background: var(--brand); color: var(--ink); border-color: var(--brand); }
.tag-pill:has(.tag-pill__input:focus-visible) .tag-pill__label { outline: 3px solid var(--focus); outline-offset: 3px; }

.result-count { font-family: var(--font-head); font-weight: 600; color: var(--ink-soft); margin: var(--sp-2) 0; }
.result-count a { margin-left: 0.5rem; color: var(--brand); }

/* ----- File list --------------------------------------------------------- */
.file-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.file-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--sp-2) var(--sp-3);
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.file-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.file-card__link {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 15rem;
}
.file-card__icon { font-size: 1.8rem; flex-shrink: 0; line-height: 1; }
.file-card__title { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: var(--ink); }
.file-card__meta { display: block; color: var(--ink-soft); font-size: 0.9rem; }
.file-card__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
    display: inline-block;
    padding: 0.16rem 0.52rem;
    border-radius: 999px;
    background: #DFE0DF;
    color: #41413B;
    font-family: var(--font-head);
    font-size: 0.64rem;
    font-weight: 600;
    text-decoration: none;
}
a.chip:hover { background: #d1d2d0; }

/* ----- Document viewer --------------------------------------------------- */
.viewer-layout { display: grid; grid-template-columns: 1fr 18rem; gap: var(--sp-4); align-items: start; }
.viewer-frame {
    width: 100%;
    height: 80vh;
    min-height: 32rem;
    border: 0;
    border-radius: var(--radius);
    background: var(--surface-alt);
}
/* Viewer links (Download the file / Back to …) in lolly orange. */
.viewer-main a, .viewer-meta > p > a { color: var(--brand); }
/* Book a Demo CTA under the document Details block. */
.viewer-demo-btn { display: flex; width: 100%; justify-content: center; margin-top: var(--sp-3); }
.viewer-video { width: 100%; border-radius: var(--radius); background: #000; }
.viewer-meta {
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--sp-3);
}
/* Keep the Details card + Book a Demo button pinned while scrolling a long document. */
.viewer-side { position: sticky; top: 6rem; align-self: start; }
.viewer-meta h2 { font-size: 1.1rem; margin-top: 0; }
.viewer-meta dt {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    margin-top: var(--sp-2);
}
.viewer-meta dd { margin: 0; }
.viewer-meta__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
@media (max-width: 800px) {
    .viewer-layout { grid-template-columns: 1fr; }
    .viewer-side { position: static; }
    .viewer-frame { height: 60vh; min-height: 20rem; }
    .viewer-image { max-height: 60vh; width: auto; max-width: 100%; margin-inline: auto; }
}

/* ----- Home / site-wide search box --------------------------------------- */
.hero-search { display: flex; gap: 0.5rem; margin-top: var(--sp-3); margin-left: auto; max-width: 40rem; transform: translate(50px, -5px); position: relative; z-index: 2; }

/* Search field wrapper holding the input + voice (mic) button. */
.hero-search__field { position: relative; flex: 1; display: flex; }
.hero-search__field input { flex: 1; padding-right: 2.6rem; }
.search-mic {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--brand);
    cursor: pointer;
}
.search-mic[hidden] { display: none; }
.search-mic:hover { background: var(--brand-tint); }
.search-mic.is-listening { color: #fff; background: var(--brand); animation: search-mic-pulse 1.2s infinite; }
@keyframes search-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(247, 142, 32, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(247, 142, 32, 0); }
}

/* Orange clear (✕) button inside search inputs instead of the browser's default. */
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    height: 16px;
    width: 16px;
    cursor: pointer;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F78E20' stroke-width='2.5' stroke-linecap='round'><path d='M6 6l12 12M18 6 6 18'/></svg>") center / contain no-repeat;
}
.hero-search input {
    flex: 1;
    min-height: 48px;
    padding: 0.7rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font: inherit;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow);
}
@media (max-width: 520px) { .hero-search { flex-direction: column; } }

/* ----- Predictive search (typeahead) dropdown ---------------------------- */
/* The list is portaled to <body> and positioned by JS (so the hero's overflow:hidden
   never clips it). Every colour is a theme token, so it reads in light and dark. */
.ta-list {
    position: absolute;
    z-index: 1000;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    max-height: min(60vh, 22rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.ta-list[hidden] { display: none; }
.ta-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 44px;                 /* comfortable tap target */
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--ink);
    font-family: var(--font-body);
}
.ta-option__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-option__kind {
    flex: 0 0 auto;
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
/* Mouse hover and keyboard highlight share one active style. */
.ta-option.is-active,
.ta-option:hover { background: var(--brand-tint); }
.ta-option.is-active .ta-option__kind,
.ta-option:hover .ta-option__kind { color: var(--brand-deep); }
/* Matched portion of the label. brand-deep is AAA-legible on surface and on the tint. */
.ta-mark { color: var(--brand-deep); font-weight: 700; background: transparent; }
.ta-empty {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.4rem 0.75rem;
    color: var(--ink-soft);
    font-family: var(--font-body);
}
@media (prefers-reduced-motion: reduce) { .ta-list { scroll-behavior: auto; } }

/* ----- Document grid (folder contents + search results) ------------------ */
.doc-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
    gap: var(--sp-3);
}
.doc-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.doc-card__link { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.doc-card__thumb {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
.doc-card__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.doc-card__icon { font-size: 3.2rem; line-height: 1; }
.doc-card__kind {
    position: absolute;
    left: 0.6rem;
    bottom: 0.6rem;
    background: rgba(26, 26, 26, 0.82);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}
.doc-card__body { display: flex; flex-direction: column; gap: 0.25rem; padding: var(--sp-2) var(--sp-3); }
.doc-card__title { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--ink); line-height: 1.3; }
.doc-card__meta { color: var(--ink-soft); font-size: 0.85rem; }
.doc-card__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0 var(--sp-3) var(--sp-3); margin-top: auto; }

/* ----- Header cluster (nav + theme toggle) ------------------------------- */
.site-header__end { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; }

/* ----- Theme toggle ------------------------------------------------------ */
/* Light/dark switch — white track + orange thumb (light), inverts when dark. */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    flex-shrink: 0;
    transform: translateY(3px);   /* line up with the nudged-down menu (5px down, then 2px up) */
}
.theme-toggle__track {
    position: relative;
    display: block;
    width: 39px;
    height: 21px;
    border-radius: 999px;
    border: 2px solid var(--brand);
    background: #fff;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}
.theme-toggle__thumb {
    position: absolute;
    top: 50%;
    left: 2px;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--brand);
    transition: left 0.18s ease, background-color 0.18s ease;
}
.theme-toggle[aria-checked="true"] .theme-toggle__track { background: var(--brand); }
.theme-toggle[aria-checked="true"] .theme-toggle__thumb { left: calc(100% - 17px); background: #fff; }
.theme-toggle:hover .theme-toggle__track { border-color: var(--brand-hover); }

/* Keep the header on one row on small phones (burger + theme toggle must fit). */
@media (max-width: 480px) {
    .brand { font-size: 1.1rem; gap: 0.4rem; }
    .brand img { width: 2rem; height: 2rem; }
    .brand__name { min-width: 0; }
    .site-header__end { gap: 0.5rem; }
}

/* ----- Pagination -------------------------------------------------------- */
.pager { margin-top: var(--sp-4); }
.pager ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0;
    margin: 0;
}
.pager a,
.pager__current,
.pager__disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    font-family: var(--font-head);
    font-weight: 600;
    text-decoration: none;
}
.pager a { color: var(--ink); background: var(--surface); }
.pager a:hover { background: var(--brand-tint); color: var(--brand-deep); border-color: var(--brand); }
.pager__current { background: var(--brand); color: #1A1A1A; border-color: var(--brand); }
.pager__disabled { color: var(--ink-soft); opacity: 0.5; }
.pager__gap { display: inline-flex; align-items: center; min-width: 1.5rem; justify-content: center; color: var(--ink-soft); }

/* ----- Cookie consent banner --------------------------------------------- */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: var(--surface);
    border-top: 3px solid var(--brand);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.16);
    padding: var(--sp-3);
}
.cookie-banner__inner {
    max-width: var(--container);
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2) var(--sp-3);
    justify-content: space-between;
}
.cookie-banner__text { flex: 1; min-width: 16rem; margin: 0; color: var(--ink); }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media (max-width: 560px) {
    .cookie-banner__inner { flex-direction: column; align-items: stretch; }
    .cookie-banner__text { min-width: 0; }
    .cookie-banner__actions { width: 100%; }
    .cookie-banner__actions .btn { flex: 1 1 0; justify-content: center; min-width: 0; }
}

/* ----- Top contact bar --------------------------------------------------- */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 101;
    background: var(--brand);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
}
.top-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.25rem;
    gap: var(--sp-2);
}
.top-bar a { color: #fff; text-decoration: none; }
.top-bar a:hover { text-decoration: underline; }
.top-bar__links { display: flex; align-items: center; gap: var(--sp-2); }

/* Support page: intro text on the left, embedded JotForm on the right (stacks on narrow screens). */
.support-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: var(--sp-5);
    align-items: start;
}
.support-intro .lead { margin-bottom: var(--sp-2); }
.support-form iframe { display: block; width: 100%; }
@media (max-width: 900px) {
    .support-layout { grid-template-columns: 1fr; gap: var(--sp-3); }
}

/* ----- Document engagement (likes + views) ------------------------------- */
.engagement {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-3);
}
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0.4rem 0.9rem;
    border: 2px solid var(--brand);
    border-radius: 999px;
    background: var(--surface);
    color: var(--brand);
    font-family: var(--font-head);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}
.like-btn__icon { width: 1.25rem; height: 1.25rem; transition: fill 0.18s ease; }
.like-btn:hover { background: var(--brand-tint); }
.like-btn[aria-pressed="true"] { background: var(--brand); color: #fff; }
.like-btn[aria-pressed="true"] .like-btn__icon { fill: #fff; }
.view-count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--ink-soft);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
}
.view-count svg { width: 1.2rem; height: 1.2rem; }

/* Read-only like/view counts on document cards. */
.doc-card__stats {
    display: flex;
    gap: var(--sp-2);
    margin-top: 0.25rem;
    color: var(--ink-soft);
    font-size: 0.85rem;
}
.doc-card__stat { display: inline-flex; align-items: center; gap: 0.3rem; }
.doc-card__stat svg { width: 1rem; height: 1rem; }

/* ----- Footer accreditations --------------------------------------------- */
.footer-accreditations {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: var(--sp-4);
    padding-top: var(--sp-3);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.accreditation-logo { height: 64px; width: auto; }
.accreditation {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    color: #fff;
}

/* ==========================================================================
   "Ask ALI" support bot
   Themed entirely with the site design tokens, so light/dark follows the rest
   of the site with no extra rules. Launcher pinned bottom-right; drawer slides
   in from the right.
   ========================================================================== */

/* ----- Launcher (floating, bottom-right) --------------------------------- */
.askali-launcher {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem;
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.askali-launcher:hover { background: var(--brand-hover); transform: translateY(-2px); }
.askali-launcher__label { white-space: nowrap; }

/* Inline launcher next to the home-page search button: an on-brand outline button that reads in
   both themes (brand-deep is contrast-checked in light AND dark), filling orange on hover. */
.askali-search-btn { background: transparent; color: var(--brand); border-color: var(--brand); }
.askali-search-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.askali-search-btn svg { color: currentColor; }

/* The HTML `hidden` attribute must win over the component's display rules below. */
#askali-drawer [hidden] { display: none !important; }

/* ----- Drawer ------------------------------------------------------------ */
.askali-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1101;
    width: 460px;
    max-width: 92vw;
    background: var(--surface);
    color: var(--ink);
    box-shadow: -4px 0 30px rgba(26, 26, 26, 0.22);
    transform: translateX(110%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.askali-drawer.is-open { transform: translateX(0); }
.askali-drawer__inner { display: flex; flex-direction: column; height: 100%; }

/* ----- Header ------------------------------------------------------------ */
.askali-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    /* Dark bar (echoes the site footer) with white text — strong contrast, unlike white-on-orange. */
    background: var(--footer-bg);
    color: #fff;
}
.askali-header__title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;   /* allow the text block to shrink/ellipsis rather than push the buttons */
}
.askali-header__titletext { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.askali-header__name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.askali-header__sub {
    font-weight: 400;
    font-size: 0.72rem;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.askali-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
    flex-shrink: 0;
}
.askali-header__actions { display: flex; gap: 0.15rem; flex-shrink: 0; }
.askali-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.askali-iconbtn:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.askali-iconbtn[aria-pressed="true"] { background: rgba(255, 255, 255, 0.28); color: #fff; }

/* ----- Messages ---------------------------------------------------------- */
.askali-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.1rem 1rem;
    background: var(--surface);
}
.askali-welcome {
    padding: 1rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    background: var(--brand-tint);
    text-align: center;
}
.askali-welcome__title { font-family: var(--font-head); font-weight: 700; margin-bottom: 0.3rem; }
.askali-welcome__sub { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }

.askali-msg {
    display: flex;
    flex-direction: column;
    max-width: 90%;
    animation: askaliFade 0.25s ease-out;
}
@keyframes askaliFade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.askali-msg.is-user { align-self: flex-end; }
.askali-msg.is-assistant { align-self: flex-start; max-width: 96%; }

.askali-msg__bubble {
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    line-height: 1.55;
    word-wrap: break-word;
}
.askali-msg.is-user .askali-msg__bubble {
    background: var(--brand);
    color: #fff;
    border-bottom-right-radius: 4px;
    white-space: pre-wrap;
}
.askali-msg.is-assistant .askali-msg__bubble {
    background: var(--surface-alt);
    color: var(--ink);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
}

/* Markdown inside assistant bubbles */
.askali-msg.is-assistant .askali-msg__bubble p { margin: 0 0 0.5rem; }
.askali-msg.is-assistant .askali-msg__bubble p:last-child { margin-bottom: 0; }
.askali-msg.is-assistant .askali-msg__bubble ul,
.askali-msg.is-assistant .askali-msg__bubble ol { padding-left: 1.3rem; margin: 0.4rem 0; }
.askali-msg.is-assistant .askali-msg__bubble li { margin: 0.15rem 0; }
.askali-msg.is-assistant .askali-msg__bubble h1,
.askali-msg.is-assistant .askali-msg__bubble h2,
.askali-msg.is-assistant .askali-msg__bubble h3 {
    font-family: var(--font-head);
    margin: 0.6rem 0 0.25rem;
    font-size: 1rem;
}
.askali-msg.is-assistant .askali-msg__bubble a { color: var(--brand-deep); text-decoration: underline; }
.askali-msg.is-assistant .askali-msg__bubble code {
    background: rgba(127, 127, 127, 0.16);
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
    font-size: 0.85em;
}
.askali-msg.is-assistant .askali-msg__bubble pre {
    background: #1f2937;
    color: #f1f5f9;
    padding: 0.6rem 0.7rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 0.5rem 0;
}
.askali-msg.is-assistant .askali-msg__bubble pre code { background: transparent; color: inherit; padding: 0; }

/* ----- Thinking indicator ------------------------------------------------ */
.askali-thinking {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1.1rem;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.9rem;
}
.askali-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    animation: askaliBounce 1.2s infinite ease-in-out;
}
.askali-dot:nth-child(2) { animation-delay: 0.15s; }
.askali-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes askaliBounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
    40%           { transform: scale(1);   opacity: 1; }
}
.askali-thinking__text { margin-left: 0.4rem; }

/* ----- Error banner ------------------------------------------------------ */
.askali-error {
    flex-shrink: 0;
    padding: 0.55rem 1rem;
    border-top: 1px solid var(--line);
    background: var(--brand-tint-2);
    color: var(--brand-deep);
    font-size: 0.9rem;
}

/* ----- Input row --------------------------------------------------------- */
.askali-input {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.7rem 0.8rem;
    border-top: 1px solid var(--line);
    background: var(--surface);
}
.askali-input textarea {
    flex: 1;
    max-height: 140px;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.4;
    resize: none;
}
.askali-input textarea:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 1px;
    border-color: var(--brand);
}
.askali-sendbtn,
.askali-micbtn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.askali-sendbtn { border: none; background: var(--brand); color: #fff; }
.askali-sendbtn:hover { background: var(--ink); transform: scale(1.05); }
.askali-sendbtn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.askali-micbtn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); }
.askali-micbtn:hover { color: var(--brand); border-color: var(--brand); }
.askali-micbtn.is-listening {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    animation: askaliMicPulse 1.2s ease-in-out infinite;
}
@keyframes askaliMicPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    50%      { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* ----- Mobile ------------------------------------------------------------ */
@media (max-width: 600px) {
    .askali-drawer { width: 100vw; max-width: 100vw; }
    .askali-launcher__label { display: none; }
    .askali-launcher { padding: 0.7rem; }
    .askali-header__sub { display: none; }
}

/* ==========================================================================
   Ranked search results
   ========================================================================== */
.result-count__badge {
    display: inline-block;
    margin: 0 0.4rem;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    border: 1px solid var(--brand);
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 600;
    vertical-align: 1px;
}

.search-results {
    list-style: none;
    margin: var(--sp-2) 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.search-result {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.search-result:hover { border-color: var(--brand); box-shadow: var(--shadow); }

.search-result__rank {
    flex-shrink: 0;
    width: 1.9rem;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--brand);
    text-align: right;
    line-height: 1.6;
}
.search-result__thumb {
    flex-shrink: 0;
    width: 84px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--brand-tint);
    color: var(--brand-deep);
}
.search-result__thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-result__icon svg { width: 28px; height: 28px; }
.search-result__icon { display: inline-flex; }

.search-result__body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.search-result__title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
    text-decoration: none;
}
.search-result__title:hover { color: var(--brand); text-decoration: underline; }
.search-result__desc {
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.search-result__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.9rem;
    margin-top: 0.15rem;
    color: var(--ink-soft);
    font-size: 0.82rem;
}
.search-result__stat { display: inline-flex; align-items: center; gap: 0.3rem; }
.search-result__stat svg { width: 15px; height: 15px; }
.chip--sm { font-size: 0.72rem; padding: 0.1rem 0.5rem; }

/* "Not finding what you need? Why not ask ALI?" prompt under the results */
.ask-ali-prompt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: var(--sp-3);
    padding: var(--sp-2);
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink-soft);
    text-align: center;
}

@media (max-width: 560px) {
    .search-result__thumb { display: none; }
    .search-result__rank { width: 1.4rem; }
}

/* ==========================================================================
   Authentication: welcome gate, account chip
   ========================================================================== */
.welcome-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(1200px 600px at 50% -10%, var(--brand-tint), transparent),
        var(--surface);
    color: var(--ink);
    font-family: var(--font-body);
}
.welcome { width: 100%; max-width: 34rem; padding: var(--sp-3); text-align: center; }
.welcome__card {
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-4) var(--sp-3);
}
.welcome__logo { display: block; margin: 0 auto var(--sp-1); }
.welcome__title { font-family: var(--font-head); font-size: 1.8rem; margin: 0 0 var(--sp-2); }
.welcome__title span { color: var(--brand); }
.welcome__lead { font-size: 1.05rem; line-height: 1.6; }
.welcome__hint { color: var(--ink-soft); font-size: 0.95rem; }
.welcome__cta { margin-top: var(--sp-2); }
.welcome__error {
    background: var(--brand-tint-2);
    color: var(--brand-deep);
    border: 1px solid var(--brand);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    margin-bottom: var(--sp-2);
}
.welcome__staff { margin-top: var(--sp-3); font-size: 0.9rem; }
.welcome__staff a { color: var(--ink-soft); }
.welcome__staff-muted { color: var(--ink-soft); opacity: 0.7; }

/* Account chip in the header */
.user-chip { position: relative; }
.user-chip__menu summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
}
.user-chip__menu summary::-webkit-details-marker { display: none; }
.user-chip__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
}
.user-chip__pop {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem;
    z-index: 1200;
    text-align: left;
}
.user-chip__name { font-family: var(--font-head); font-weight: 700; }
.user-chip__site { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 0.5rem; }
.user-chip__link {
    display: block;
    padding: 0.35rem 0;
    color: var(--brand-deep);
    border-top: 1px solid var(--line);
}
.user-chip__signout {
    margin-top: 0.4rem;
    width: 100%;
    border: 1px solid var(--line);
    background: var(--surface-alt);
    color: var(--ink);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    cursor: pointer;
    font-family: var(--font-body);
}
.user-chip__signout:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ==========================================================================
   Admin area
   ========================================================================== */
.btn--sm { min-height: 36px; padding: 0.4rem 0.9rem; font-size: 0.9rem; }

.admin-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: var(--sp-1); }
.admin-nav a {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
}
.admin-nav a:hover { border-color: var(--brand); }
.admin-nav a.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

.admin-toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: space-between; align-items: center; margin-bottom: var(--sp-3); }
.admin-window { display: inline-flex; gap: 0.4rem; align-items: center; color: var(--ink-soft); }
.admin-window a { padding: 0.25rem 0.7rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 0.85rem; }
.admin-window a.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.admin-export { display: inline-flex; gap: 0.5rem; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-2); margin-bottom: var(--sp-3); }
.stat-card { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-2); text-align: center; }
.stat-card__num { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.9rem; color: var(--brand-deep); }
.stat-card__lbl { color: var(--ink-soft); font-size: 0.85rem; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--sp-2); }
.admin-panel { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-2); }
.admin-panel h2 { font-size: 1.1rem; margin: 0 0 var(--sp-1); }
.admin-subh { font-size: 0.95rem; margin: var(--sp-2) 0 0.4rem; color: var(--ink-soft); }
.admin-flag { font-size: 0.7rem; font-weight: 600; color: var(--brand-deep); background: var(--brand-tint); border-radius: 999px; padding: 0.05rem 0.5rem; vertical-align: 2px; }

/* Sparkline (page views per day) */
.spark { display: flex; align-items: flex-end; gap: 2px; height: 70px; }
.spark__bar { flex: 1; min-height: 2px; background: var(--brand); border-radius: 2px 2px 0 0; opacity: 0.85; }

/* Horizontal bar rows */
.barrow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.5rem; padding: 0.2rem 0; font-size: 0.9rem; }
.barrow__lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barrow__track { grid-column: 1 / 2; height: 6px; background: var(--brand-tint); border-radius: 999px; overflow: hidden; }
.barrow__fill { display: block; height: 100%; background: var(--brand); }
.barrow__num { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th { text-align: left; color: var(--ink-soft); font-weight: 600; padding: 0.3rem 0.4rem; }
.admin-table td { padding: 0.3rem 0.4rem; border-top: 1px solid var(--line); }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table--bordered { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }

.kv { list-style: none; margin: 0; padding: 0; }
.kv li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; border-top: 1px solid var(--line); }
.kv li:first-child { border-top: none; }
.kv span { color: var(--ink-soft); }

.admin-list { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.admin-list li { margin: 0.2rem 0; }
.admin-list__n { color: var(--ink-soft); font-size: 0.82rem; }
.admin-list--warn li { color: var(--brand-deep); }

.admin-pick { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: var(--sp-1) 0; }
.admin-pick select { padding: 0.5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); min-width: 16rem; max-width: 100%; font-family: var(--font-body); }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-top: 1px solid var(--line); }

/* ==========================================================================
   Related documents (View page)
   ========================================================================== */
.related-docs { margin-top: var(--sp-3); border-top: 1px solid var(--line); padding-top: var(--sp-2); }
.related-docs h2 { font-size: 1.05rem; margin: 0 0 var(--sp-1); }
.related-docs ul { list-style: none; margin: 0; padding: 0; }
.related-docs li { margin: 0.3rem 0; }
.related-docs a { display: flex; align-items: center; gap: 0.5rem; color: var(--ink); text-decoration: none; padding: 0.4rem 0.5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.related-docs a:hover { border-color: var(--brand); color: var(--brand-deep); }
.related-docs__icon svg { width: 20px; height: 20px; }
.related-docs__icon { display: inline-flex; color: var(--brand-deep); }
