/*
 * Plugmind Themes kit: layouts and parts a theme switches on in its plugmind.json, so a theme is mostly its colours.
 *
 *   "layout": "top"         the menu across a top bar on wide screens (phones keep the tab bar and the More menu)
 *   "hero": "band"          a full-width band behind the home page greeting, with the quick links over its edge
 *           "centered"      a full-width band with the greeting and search in the middle
 *           "split"         the greeting and search beside what "hero_aside" adds
 *   "hero_aside": "stats"   reply and notification counts beside the greeting; "actions": a Get help panel
 *   "footer": true          a footer with the company name and the theme credit
 *   "sidebar_style": "light" a light sidebar (with the sidebar layout)
 *   "fonts": {heading, text}  its own fonts, for brands still on Inter (head_common.twig)
 *   "home": [sections]      the home page's sections in order: cards, tickets, articles, categories, announcements
 *   "auth"                  sign-in pages: split (default), centered or plain
 *   "messages"              the ticket view: cards (default), bubbles or lines
 *   "ticket_list"           the ticket list: table (default) or cards
 *   "shape"                 corners: sharp, soft or round
 *   "depth"                 panels: flat, lines (borders) or raised (shadows)
 *   "density"               spacing: compact or roomy
 *   "inputs"                form fields: filled or underline
 *   "header"                the top bar (layout "top"): bar (default), centered, floating or search
 *   "pattern"               behind the home greeting: dots, grid, waves, rings or diagonal (a brand's picture wins)
 *   "icons"                 icon tiles: solid, outline or duotone
 *   "article"               article pages: aside (default), wide or left (contents on the left)
 *   "departments"           the department picker: cards (default), list or tiles
 *   "footer_style"          with "footer": minimal (default), columns or band
 *   "motion"                subtle or lively hover and entry effects (none for people who ask for reduced motion)
 *
 * The body carries ndc-layout-*, ndc-hero-*, ndc-side-* and ndc-<option>-<value> classes for these. A theme's tokens.css sets the --kit-*
 * colours; the defaults below follow the brand's accent. Calm uses none of this.
 */

.ndc-body {
    --kit-width: 1248px;
    --kit-top-bg: var(--ndc-surface);
    --kit-top-fg: var(--ndc-text-strong);
    --kit-top-link: var(--ndc-muted);
    --kit-top-hover: var(--ndc-accent-soft);
    --kit-top-current-bg: var(--ndc-accent-tint);
    /* The accent, pulled towards the page's text colour so it reads in light and dark mode. */
    --kit-top-current-fg: color-mix(in srgb, var(--ndc-accent) 55%, var(--ndc-text-strong));
    --kit-top-line: var(--ndc-border);
    --kit-top-stripe: transparent;
    --kit-hero-bg: var(--ndc-accent-soft);
    --kit-hero-fg: var(--ndc-text-strong);
    --kit-hero-muted: var(--ndc-muted);
    --kit-tile-bg: var(--ndc-surface);
    --kit-tile-fg: var(--ndc-text-strong);
    --kit-tile-muted: var(--ndc-subtle);
    --kit-tile-warn: #b45309;
    --kit-panel-bg: var(--ndc-text-strong);
    --kit-panel-fg: var(--ndc-surface);
    --kit-panel-item: color-mix(in srgb, var(--kit-panel-fg) 10%, var(--kit-panel-bg));
    --kit-side-bg: var(--ndc-surface);
}

/* ---------- Layout "top": the top bar (every width) ---------- */

.ndc-layout-top .ndc-main { overflow-x: clip; }
.ndc-layout-top .ndc-top {
    border-bottom: 1px solid var(--kit-top-line);
    background: var(--kit-top-bg);
    box-shadow: inset 0 4px 0 var(--kit-top-stripe);
    color: var(--kit-top-fg);
}
.ndc-body.ndc-layout-top .ndc-top-brand,
.ndc-body.ndc-layout-top .ndc-top-brand:hover { color: var(--kit-top-fg); }
.ndc-body.ndc-layout-top .ndc-top .ndc-iconbtn { color: var(--kit-top-link); }
.ndc-body.ndc-layout-top .ndc-top .ndc-iconbtn:hover { background: var(--kit-top-hover); color: var(--kit-top-fg); }
.ndc-layout-top .ndc-top .ndc-dot-badge { border-color: var(--kit-top-bg); }
.ndc-body.ndc-layout-top .ndc-top .ndc-user,
.ndc-body.ndc-layout-top .ndc-top .ndc-user:hover { color: var(--kit-top-fg); }
.ndc-layout-top .ndc-top .ndc-chevron { color: var(--kit-top-link); }
.ndc-layout-top .ndc-top .sp-search { background: var(--kit-top-bg); }
.ndc-layout-top .ndc-top .sp-search input { color: var(--kit-top-fg); }
.ndc-layout-top .kit-topnav { display: none; }

@media (min-width: 761px) {
    .ndc-layout-top .ndc-sidebar,
    .ndc-layout-top .ndc-backdrop { display: none; }
    .ndc-layout-top .ndc-top { gap: 20px; padding: 0 max(36px, calc((100% - var(--kit-width)) / 2 + 36px)); }
    .ndc-layout-top .ndc-top-brand {
        display: block;
        flex-shrink: 0;
        padding: 0;
        font-size: min(22px, calc(220px * 1.6 / var(--ndc-wordmark-len, 7)));
    }
    .ndc-layout-top .ndc-top-brand img { max-height: 32px; }

    .ndc-layout-top .kit-topnav { display: block; min-width: 0; overflow-x: auto; scrollbar-width: none; }
    .ndc-layout-top .kit-topnav::-webkit-scrollbar { display: none; }
    .ndc-layout-top .kit-topnav > ul { display: flex; align-items: center; gap: 2px; }
    .ndc-layout-top .kit-topnav .ndc-nav-sep { display: none; }
    .ndc-body.ndc-layout-top .kit-topnav a {
        gap: 7px;
        padding: 8px 12px;
        border-radius: 8px;
        background: none;
        color: var(--kit-top-link);
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
    }
    .ndc-body.ndc-layout-top .kit-topnav a:hover,
    .ndc-body.ndc-layout-top .kit-topnav a:focus-visible { background: var(--kit-top-hover); color: var(--kit-top-fg); }
    .ndc-body.ndc-layout-top .kit-topnav a.current { background: var(--kit-top-current-bg); color: var(--kit-top-current-fg); }
    .ndc-layout-top .kit-topnav svg.ndc-i { display: none; }
    .ndc-layout-top .kit-topnav a > span:first-of-type { flex: none; }

    /* The account menu opens from the top bar, and search is the icon (the menu takes the bar's room). */
    .ndc-layout-top .ndc-top .ndc-account { display: block; }
    .ndc-layout-top .ndc-has-top-search .ndc-top-search { display: none; }
    .ndc-layout-top .ndc-has-top-search .sp-search-button { display: grid; }
}

.ndc-layout-top .ndc-content { max-width: var(--kit-width); }

/* ---------- Light sidebar (sidebar layout) ---------- */

.ndc-side-light {
    --ndc-side-text: var(--ndc-body);
    --ndc-side-muted: var(--ndc-subtle);
}
.ndc-side-light .ndc-sidebar { border-inline-end: 1px solid var(--ndc-border); background: var(--kit-side-bg); color: var(--ndc-text); }
.ndc-body.ndc-side-light .ndc-brand,
.ndc-body.ndc-side-light .ndc-brand:hover { color: var(--ndc-text-strong); }
.ndc-body.ndc-side-light .ndc-nav a:hover { background: var(--ndc-accent-soft); color: var(--ndc-text-strong); }
.ndc-body.ndc-side-light .ndc-nav a.current { background: var(--ndc-accent-tint); color: color-mix(in srgb, var(--ndc-accent) 55%, var(--ndc-text-strong)); }
.ndc-body.ndc-side-light .ndc-nav a.current .ndc-count { background: var(--ndc-accent); color: #fff; }
.ndc-side-light .ndc-nav .ndc-nav-sep { background: var(--ndc-border); }
.ndc-side-light .ndc-sub-toggle:hover, .ndc-side-light .ndc-sub-toggle:focus-visible { background: var(--ndc-accent-soft); color: var(--ndc-text-strong); }
.ndc-body.ndc-side-light .ndc-side-user,
.ndc-body.ndc-side-light .ndc-side-user:hover { color: var(--ndc-text-strong); }
.ndc-side-light .ndc-sidefoot, .ndc-side-light .ndc-language { color: var(--ndc-muted); }

/* ---------- Home: hero styles ---------- */

/* Full width: out to the window's edges, with the text kept in line with the page. */
.ndc-hero-band .ndc-hero,
.ndc-hero-centered .ndc-hero {
    margin: -32px calc(50% - 50vw) 0;
    padding: 44px calc(50vw - 50%) 40px;
    background: var(--kit-hero-bg);
    color: var(--kit-hero-fg);
}
.ndc-hero-band .ndc-hero::before,
.ndc-hero-centered .ndc-hero::before { display: none; }
.ndc-hero-band .ndc-hero h1,
.ndc-hero-centered .ndc-hero h1 { color: var(--kit-hero-fg); font-size: 34px; letter-spacing: -0.8px; }
.ndc-hero-band .ndc-hero .ndc-eyebrow,
.ndc-hero-centered .ndc-hero .ndc-eyebrow { color: var(--kit-hero-muted); }
.ndc-hero-band .ndc-hero-sub,
.ndc-hero-centered .ndc-hero-sub { color: var(--kit-hero-muted); }
.ndc-hero-band .ndc-wave,
.ndc-hero-centered .ndc-wave { display: none; }

/* Band: greeting beside the aside, search under both, quick links over the band's lower edge. */
.ndc-hero-band .ndc-hero,
.ndc-hero-split .ndc-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 32px;
    align-items: end;
}
.ndc-hero-band .ndc-hero { padding-bottom: 92px; }
.ndc-hero-band .ndc-hero > *,
.ndc-hero-split .ndc-hero > * { grid-column: 1; }
.ndc-hero-band .ndc-hero-sub { margin-bottom: 0; font-size: 16px; }
.ndc-hero-band .ndc-hero .ndc-search { grid-column: 1 / -1; margin-top: 24px; border-color: transparent; }
.ndc-hero-band .ndc-cards { position: relative; margin-top: -54px; }
.ndc-hero-band .ndc-card-featured { background: var(--ndc-surface); border-color: var(--ndc-accent); box-shadow: 0 0 0 1px var(--ndc-accent) inset, var(--ndc-shadow); }

/* Centered: everything in the middle. */
.ndc-hero-centered .ndc-hero { text-align: center; border-bottom: 1px solid var(--ndc-border); margin-bottom: 24px; }
.ndc-hero-centered .ndc-hero .ndc-search { max-width: 640px; margin-inline: auto; }
.ndc-hero-centered .kit-stats, .ndc-hero-centered .kit-actions { justify-content: center; margin: 0 auto 18px; }

/* Split: the greeting and search on the left, the aside on the right (the aside spans their rows). */
.ndc-hero-split .ndc-hero { align-items: center; padding-bottom: 8px; }
.ndc-hero-split .ndc-hero h1 { font-size: 38px; line-height: 1.1; }
.ndc-hero-split .ndc-hero .ndc-search { margin-bottom: 18px; }

/* ---------- Parts beside the greeting ---------- */

.kit-stats { display: flex; gap: 10px; }
.ndc-hero-band .kit-stats, .ndc-hero-split .kit-stats { grid-column: 2; grid-row: 1 / span 3; }
.kit-stat {
    display: block;
    min-width: 136px;
    padding: 12px 16px;
    border-radius: var(--ndc-radius);
    background: var(--kit-tile-bg);
    color: var(--kit-tile-fg);
    text-align: start;
    text-decoration: none;
}
.ndc-body a.kit-stat, .ndc-body a.kit-stat:hover { color: var(--kit-tile-fg); }
.ndc-body a.kit-stat:hover { background: color-mix(in srgb, var(--kit-tile-bg) 88%, var(--kit-tile-fg)); }
.kit-stat small { display: block; color: var(--kit-tile-muted); font-size: 12.5px; }
.kit-stat b { display: block; margin-top: 2px; font-size: 24px; line-height: 1.2; }
.kit-stat-warn b { color: var(--kit-tile-warn); }

.kit-actions {
    display: grid;
    gap: 8px;
    width: 340px;
    max-width: 100%;
    padding: 18px;
    box-sizing: border-box;
    border-radius: calc(var(--ndc-radius) + 4px);
    background: var(--kit-panel-bg);
    color: var(--kit-panel-fg);
    text-align: start;
}
.ndc-hero-band .kit-actions, .ndc-hero-split .kit-actions { grid-column: 2; grid-row: 1 / span 3; }
.kit-actions strong { font-size: 16px; }
.ndc-body .kit-actions a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    background: var(--kit-panel-item);
    color: var(--kit-panel-fg);
    font-weight: 600;
    text-decoration: none;
}
.ndc-body .kit-actions a:hover { background: color-mix(in srgb, var(--kit-panel-fg) 18%, var(--kit-panel-bg)); color: var(--kit-panel-fg); }
.kit-actions a svg.ndc-i { width: 18px; height: 18px; }
.kit-actions a span { flex: 1; }

/* ---------- Footer ---------- */

.kit-foot { border-top: 1px solid var(--ndc-border); background: var(--ndc-surface); }
.kit-foot-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 16px;
    max-width: var(--kit-width);
    margin: 0 auto;
    padding: 16px 36px;
    box-sizing: border-box;
    color: var(--ndc-subtle);
    font-size: 13px;
}

/* ---------- Tablets and phones ---------- */

@media (max-width: 1024px) {
    .ndc-hero-band .ndc-hero, .ndc-hero-centered .ndc-hero { margin-top: -26px; padding-top: 32px; }
    .kit-foot-inner { padding: 16px 24px; }
}

@media (max-width: 760px) {
    .ndc-hero-band .ndc-hero, .ndc-hero-centered .ndc-hero { margin-top: -20px; padding-top: 26px; }
    .ndc-hero-band .ndc-hero { padding-bottom: 70px; }
    .ndc-hero-band .ndc-hero, .ndc-hero-split .ndc-hero { grid-template-columns: minmax(0, 1fr); }
    .ndc-hero-band .ndc-hero h1, .ndc-hero-centered .ndc-hero h1, .ndc-hero-split .ndc-hero h1 { font-size: 26px; }
    .ndc-hero-band .kit-stats, .ndc-hero-split .kit-stats,
    .ndc-hero-band .kit-actions, .ndc-hero-split .kit-actions { grid-column: 1; grid-row: auto; margin-top: 18px; }
    .kit-stat { flex: 1; min-width: 0; }
    .kit-actions { width: 100%; }
    .ndc-hero-band .ndc-cards { margin-top: -44px; }
    /* Clear of the tab bar at the bottom. */
    .kit-foot-inner { padding: 14px 16px calc(var(--ndc-tabbar-h) + 18px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Home page sections ("home": cards first, then the rest in a grid) ---------- */

.kit-home { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.kit-home > .ndc-panel + .ndc-panel { margin-top: 0; }
.kit-home > :only-child, .kit-home > :nth-child(3):last-child { grid-column: 1 / -1; }
/* The wider column goes to the tickets, wherever the theme puts them. Wide screens only: this beats the one-column
   rule for phones, which is less specific. */
@media (min-width: 761px) {
    .kit-home:has(> .kit-home-tickets:nth-child(2)) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
}
.kit-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.kit-topic {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--ndc-border-soft);
    border-radius: var(--ndc-radius-sm);
    background: var(--ndc-bg);
    text-decoration: none;
}
.ndc-body .kit-topic, .ndc-body .kit-topic:hover { color: var(--ndc-text); }
.kit-topic:hover { border-color: var(--ndc-accent-line); }
.kit-topic strong { display: block; font-size: 14px; }
.kit-topic small { color: var(--ndc-subtle); font-size: 12.5px; }
.kit-news { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.kit-news a { display: flex; align-items: center; gap: 12px; padding: 8px 0; text-decoration: none; }
.ndc-body .kit-news a, .ndc-body .kit-news a:hover { color: var(--ndc-text); }
.kit-news a:hover strong { color: var(--ndc-accent); }
.kit-news strong { display: block; font-size: 14px; }
.kit-news small { color: var(--ndc-subtle); font-size: 12.5px; }

/* ---------- Sign-in pages ("auth": split, centered or plain) ---------- */

/* Centered: one card, with the brand in a compact band above the form. */
.ndc-auth-style-centered .ndc-auth-card { grid-template-columns: minmax(0, 1fr); max-width: 34rem; min-height: 0; }
.ndc-auth-style-centered .ndc-auth-hero { gap: 0; padding: 1.75rem 2rem; }
.ndc-auth-style-centered .ndc-auth-hero-copy,
.ndc-auth-style-centered .ndc-auth-features { display: none; }

/* Plain: the form straight on the page, under the wordmark. */
.ndc-auth-style-plain .ndc-auth-card { grid-template-columns: minmax(0, 1fr); max-width: 30rem; min-height: 0; background: transparent; box-shadow: none; }
.ndc-auth-style-plain .ndc-auth-hero { gap: 0; padding: 0 0 0.5rem; background: none; color: var(--ndc-text-strong); }
.ndc-auth-style-plain .ndc-auth-hero::before, .ndc-auth-style-plain .ndc-auth-hero::after { display: none; }
.ndc-auth-style-plain .ndc-auth-hero-copy,
.ndc-auth-style-plain .ndc-auth-features { display: none; }
.ndc-auth-style-plain .ndc-auth-main { padding-inline: 0; background: none; }
.ndc-auth-style-plain .ndc-auth-eyebrow { color: var(--ndc-muted); }

/* ---------- The ticket view's messages ("messages": cards, bubbles or lines) ---------- */

/* Bubbles: a conversation, the customer's own messages on the right in the accent's tint. */
.ndc-msgs-bubbles .ndc-content .sp-message:has(.sp-name.ndc-user) { flex-direction: row-reverse; }
.ndc-msgs-bubbles .ndc-content .ndc-msg-card { max-width: min(88%, 760px); border-radius: 4px 18px 18px 18px; }
.ndc-msgs-bubbles .ndc-content .sp-message:has(.sp-name.ndc-user) .ndc-msg-card {
    border-color: transparent;
    border-radius: 18px 4px 18px 18px;
    background: var(--ndc-accent-soft);
}

/* Lines: one flat thread, messages divided by a rule. */
.ndc-msgs-lines .ndc-content .sp-message { margin-bottom: 0; padding: 4px 0 12px; border-bottom: 1px solid var(--ndc-border); }
.ndc-msgs-lines .ndc-content .sp-message + .sp-message { padding-top: 12px; }
.ndc-msgs-lines .ndc-content .ndc-msg-card,
.ndc-msgs-lines .ndc-content .sp-message-collapsed .ndc-msg-card { border: 0; border-radius: 0; background: none; }
.ndc-msgs-lines .ndc-content .sp-message-header .ndc-msghead { padding: 6px 0 0; }
.ndc-msgs-lines .ndc-content .ndc-msg-card > div:nth-child(2) { padding: 6px 0 0; }

/* ---------- Ticket lists ("ticket_list": table or cards) ---------- */

.ndc-list-cards .ndc-table thead { display: none; }
.ndc-list-cards .ndc-table, .ndc-list-cards .ndc-table tbody { display: block; }
.ndc-list-cards .ndc-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-bottom: 10px;
    padding: 14px 16px;
    border: 1px solid var(--ndc-border);
    border-radius: var(--ndc-radius-sm);
    background: var(--ndc-surface);
}
.ndc-list-cards .ndc-table tr:hover { border-color: var(--ndc-accent-line); }
.ndc-list-cards .ndc-table td { padding: 0; border: 0; }
.ndc-list-cards .ndc-table td:nth-child(2) { flex: 1 1 100%; order: -1; font-size: 15px; }

@media (max-width: 760px) {
    .kit-home { grid-template-columns: minmax(0, 1fr); }
    .ndc-msgs-bubbles .ndc-content .ndc-msg-card { max-width: 100%; }
}

/* ==========================================================================
 * The theme's look: "shape", "depth", "density", "inputs", "header", "pattern", "icons", "article", "departments",
 * "footer_style" and "motion". The body carries ndc-<option>-<value>; Calm sets none of them.
 * ======================================================================= */

/* ---------- Shape: corners ---------- */

.ndc-body.ndc-shape-sharp { --ndc-radius: 4px; --ndc-radius-sm: 3px; --kit-pill: 3px; --kit-tile-r: 4px; }
.ndc-body.ndc-shape-soft { --ndc-radius: 12px; --ndc-radius-sm: 9px; --kit-pill: 9px; --kit-tile-r: 10px; }
.ndc-body.ndc-shape-round { --ndc-radius: 22px; --ndc-radius-sm: 14px; --kit-pill: 999px; --kit-tile-r: 50%; }

:is(.ndc-shape-sharp, .ndc-shape-soft, .ndc-shape-round) :is(.ndc-btn, .ndc-btn-secondary, .ndc-btn-outline, .ndc-search, .ndc-search .ndc-btn, .kit-foot-band-btn),
:is(.ndc-shape-sharp, .ndc-shape-soft, .ndc-shape-round) .ndc-content :is(input[type=submit], .sp-button, .sp-button-submit, button[type=submit]),
:is(.ndc-shape-sharp, .ndc-shape-soft, .ndc-shape-round) .ndc-auth-submit { border-radius: var(--kit-pill); }
:is(.ndc-shape-sharp, .ndc-shape-soft, .ndc-shape-round) :is(.ndc-tile, .ndc-icon, .ndc-card .ndc-icon, .ndc-department .ndc-icon) { border-radius: var(--kit-tile-r); }
:is(.ndc-shape-sharp, .ndc-shape-soft, .ndc-shape-round) :is(.ndc-department, .kit-topic, .kit-actions, .ndc-msg-card) { border-radius: var(--ndc-radius); }
.ndc-body.ndc-layout-top:is(.ndc-shape-sharp, .ndc-shape-soft, .ndc-shape-round) .kit-topnav a { border-radius: var(--kit-pill); }
.ndc-shape-round .ndc-content :is(input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input[type=url], input[type=number], select:not([multiple])) { border-radius: 999px; padding-inline: 18px; }
.ndc-shape-sharp .ndc-pill { border-radius: 3px; }

/* ---------- Depth: flat, lines or raised ---------- */

.ndc-depth-flat { --ndc-shadow: none; }
.ndc-depth-flat :is(.ndc-panel, .ndc-card, .sp-sidebar-box, .ndc-department, .ndc-search) { border-color: transparent; }
.ndc-depth-flat .ndc-card:hover, .ndc-depth-flat a.ndc-department:hover { border-color: var(--ndc-accent-line); }

.ndc-depth-lines { --ndc-shadow: none; }
.ndc-depth-lines :is(.ndc-panel, .ndc-card, .sp-sidebar-box, .ndc-department, .ndc-search, .kit-stat) {
    border-color: color-mix(in srgb, var(--ndc-text-strong) 16%, var(--ndc-surface));
}
.ndc-depth-lines .ndc-panelhead { padding-bottom: 10px; border-bottom: 1px solid var(--ndc-border); }

.ndc-body.ndc-depth-raised { --ndc-shadow: 0 1px 2px rgb(16 24 40 / 0.06), 0 12px 32px -12px rgb(16 24 40 / 0.18); }
.sp-theme-dark .ndc-body.ndc-depth-raised { --ndc-shadow: 0 14px 34px -14px rgb(0 0 0 / 0.7); }
.ndc-depth-raised :is(.ndc-panel, .ndc-card, .sp-sidebar-box, .ndc-department, .ndc-search) { border-color: transparent; }
.ndc-depth-raised .ndc-department { box-shadow: var(--ndc-shadow); }
.sp-theme-dark .ndc-depth-raised :is(.ndc-panel, .ndc-card, .sp-sidebar-box, .ndc-department, .ndc-search) { border-color: var(--ndc-border-soft); }

/* ---------- Density: compact or roomy ---------- */

.ndc-density-compact .ndc-panel { padding: 16px 18px; }
.ndc-density-compact :is(.ndc-cards, .ndc-deptgrid, .kit-home) { gap: 12px; }
.ndc-density-compact .ndc-table td, .ndc-density-compact .ndc-table th { padding-block: 8px; }

.ndc-density-roomy .ndc-panel { padding: 30px 32px; }
.ndc-density-roomy :is(.ndc-cards, .ndc-deptgrid, .kit-home) { gap: 22px; }
.ndc-density-roomy .ndc-panel + .ndc-panel { margin-top: 24px; }
.ndc-density-roomy .ndc-table td { padding-block: 15px; }

/* Quick link cards keep the phone layout (one row each) on small screens. */
@media (min-width: 761px) {
    .ndc-density-compact .ndc-card { min-height: 112px; padding: 16px; gap: 10px; }
    .ndc-density-roomy .ndc-card { min-height: 160px; padding: 26px; gap: 18px; }
}

/* ---------- Inputs: filled or underlined ---------- */

.ndc-inputs-filled .ndc-content :is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=url], input[type=date], select:not([multiple]), textarea),
.ndc-inputs-filled .ndc-auth-main :is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], textarea) {
    border-color: transparent;
    background: color-mix(in srgb, var(--ndc-text-strong) 6%, var(--ndc-surface));
}
.ndc-inputs-filled .ndc-content .ndc-search input[type=search] { background: transparent; }
.ndc-inputs-filled .ndc-search { background: color-mix(in srgb, var(--ndc-text-strong) 4%, var(--ndc-surface)); }

.ndc-inputs-underline .ndc-content :is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url], input[type=date], select:not([multiple])),
.ndc-inputs-underline .ndc-auth-main :is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel]) {
    padding-inline: 2px;
    border-width: 0 0 2px;
    border-color: color-mix(in srgb, var(--ndc-text-strong) 22%, var(--ndc-surface));
    border-radius: 0;
    background: transparent;
}
.ndc-inputs-underline .ndc-content :is(input, select):focus,
.ndc-inputs-underline .ndc-auth-main input:focus { outline: 0; border-color: var(--ndc-accent); }

/* ---------- Header (layout "top", wide screens) ---------- */

@media (min-width: 761px) {
    /* Centered: the logo in the middle, the menu on its own row under it. */
    .ndc-layout-top.ndc-header-centered .ndc-top {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        grid-template-areas: ". brand right" "nav nav nav";
        row-gap: 4px;
        padding-block: 14px 8px;
    }
    .ndc-layout-top.ndc-header-centered .ndc-top-brand { grid-area: brand; justify-self: center; }
    .ndc-layout-top.ndc-header-centered .ndc-topright { grid-area: right; justify-self: end; }
    .ndc-layout-top.ndc-header-centered .kit-topnav { grid-area: nav; justify-self: center; }
    .ndc-layout-top.ndc-header-centered .ndc-top-spacer { display: none; }
    .ndc-body.ndc-layout-top.ndc-header-centered .kit-topnav a.current { background: none; box-shadow: inset 0 -2px var(--ndc-accent); border-radius: 0; }

    /* Floating: the bar as a rounded strip that stands off the page. */
    .ndc-layout-top.ndc-header-floating .ndc-top {
        top: 12px;
        width: min(var(--kit-width), calc(100% - 48px));
        margin: 12px auto 0;
        padding: 0 14px 0 22px;
        border: 1px solid var(--kit-top-line);
        border-radius: 999px;
        box-shadow: 0 10px 30px -14px rgb(16 24 40 / 0.35);
    }
    .ndc-body.ndc-layout-top.ndc-header-floating .kit-topnav a { border-radius: 999px; }
    .ndc-header-floating.ndc-hero-band .ndc-hero,
    .ndc-header-floating.ndc-hero-centered .ndc-hero { margin-top: calc(-44px - var(--ndc-top-h)); padding-top: calc(56px + var(--ndc-top-h)); }
    .ndc-header-floating.ndc-hero-band .ndc-content,
    .ndc-header-floating.ndc-hero-centered .ndc-content { position: relative; }

    /* Search: a search box across the bar on every page but home (home has its own), the menu on a row under it. */
    .ndc-layout-top.ndc-header-search .ndc-top { flex-wrap: wrap; row-gap: 0; padding-top: 10px; }
    .ndc-layout-top.ndc-header-search .kit-topnav { order: 5; flex-basis: 100%; margin-inline: -12px; padding-block: 4px 6px; }
    .ndc-layout-top.ndc-header-search .ndc-has-top-search .ndc-top-search {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 0 1 520px;
        margin-inline: auto;
        padding: 0 16px;
        border: 1px solid var(--kit-top-line);
        border-radius: 999px;
        background: color-mix(in srgb, var(--kit-top-fg) 6%, var(--kit-top-bg));
        color: var(--kit-top-link);
    }
    .ndc-layout-top.ndc-header-search .ndc-top-search input { flex: 1; min-width: 0; padding: 11px 0; border: 0; outline: 0; background: transparent; color: var(--kit-top-fg); font: inherit; font-size: 14px; }
    .ndc-layout-top.ndc-header-search .ndc-has-top-search .ndc-top-spacer { display: none; }
    .ndc-layout-top.ndc-header-search .ndc-top-brand { order: -1; }
    .ndc-layout-top.ndc-header-search .ndc-has-top-search .sp-search-button { display: none; }
}

/* ---------- Pattern: behind the home page greeting ---------- */

.ndc-hero { --kit-ink: color-mix(in srgb, var(--ndc-accent) 16%, transparent); }
.ndc-hero-band .ndc-hero, .ndc-hero-centered .ndc-hero { --kit-ink: color-mix(in srgb, var(--kit-hero-fg) 11%, transparent); }
:is(.ndc-pattern-dots, .ndc-pattern-grid, .ndc-pattern-waves, .ndc-pattern-rings, .ndc-pattern-diagonal) .ndc-hero:not(.kit-hero-photo) { position: relative; isolation: isolate; }
:is(.ndc-pattern-dots, .ndc-pattern-grid, .ndc-pattern-waves, .ndc-pattern-rings, .ndc-pattern-diagonal) .ndc-hero:not(.kit-hero-photo)::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    /* Light on the side with the greeting, stronger towards the far side. */
    -webkit-mask-image: linear-gradient(100deg, transparent 20%, #000 75%);
    mask-image: linear-gradient(100deg, transparent 20%, #000 75%);
}
.ndc-hero-centered:is(.ndc-pattern-dots, .ndc-pattern-grid, .ndc-pattern-waves, .ndc-pattern-rings, .ndc-pattern-diagonal) .ndc-hero::after {
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, transparent 25%, #000 80%);
    mask-image: radial-gradient(ellipse at 50% 40%, transparent 25%, #000 80%);
}
.ndc-pattern-dots .ndc-hero::after { background: radial-gradient(var(--kit-ink) 1.4px, transparent 1.9px) 0 0 / 18px 18px; }
.ndc-pattern-grid .ndc-hero::after {
    background:
        linear-gradient(var(--kit-ink) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, var(--kit-ink) 1px, transparent 1px) 0 0 / 32px 32px;
}
.ndc-pattern-diagonal .ndc-hero::after { background: repeating-linear-gradient(135deg, var(--kit-ink) 0 1.5px, transparent 1.5px 14px); }
.ndc-pattern-rings .ndc-hero::after {
    background: repeating-radial-gradient(circle at 96% 0%, transparent 0 34px, var(--kit-ink) 34px 36px);
}
/* Waves: rows of arcs. */
.ndc-pattern-waves .ndc-hero::after {
    background: radial-gradient(circle at 50% 100%, transparent 13px, var(--kit-ink) 13.5px 15px, transparent 15.5px) 0 0 / 36px 18px;
}
/* Soft and split heroes have no band; the pattern sits in the page's own colours. It reaches half a screen either side of
   the hero, which with the sidebar is further than the main column goes, so the main column clips it at its own edges
   (overflow-x: clip, not hidden: it makes no scroll box, so the sticky top bar still sticks). Without that, the page grew
   wider than the window and showed a sideways scrollbar. */
:is(.ndc-hero-soft, .ndc-hero-split) .ndc-hero:not(.kit-hero-photo)::after { inset: -32px calc(50% - 50vw) -8px; }
.ndc-main { overflow-x: clip; }

/* The brand's picture: under a wash of the hero's colour, so the text stays readable. */
.ndc-hero.kit-hero-photo {
    position: relative;
    background:
        linear-gradient(100deg, color-mix(in srgb, var(--kit-hero-bg) 92%, transparent) 32%, color-mix(in srgb, var(--kit-hero-bg) 40%, transparent)),
        var(--kit-hero-image) center / cover no-repeat;
}
.ndc-hero.kit-hero-photo::before { display: none; }
:is(.ndc-hero-soft, .ndc-hero-split) .ndc-hero.kit-hero-photo { margin-bottom: 22px; padding: 32px 32px 14px; border-radius: var(--ndc-radius); }

/* ---------- Icons: solid, outline or duotone tiles ---------- */

.ndc-icons-solid .ndc-icon, .ndc-icons-solid .ndc-department .ndc-icon { background: var(--ndc-accent); color: #fff; }
.ndc-icons-solid :is(.ndc-tone-1, .ndc-tone-2, .ndc-tone-3, .ndc-tone-4, .ndc-tone-5, .ndc-tone-6).ndc-tile { color: #fff; }
.ndc-icons-solid .ndc-tile.ndc-tone-1 { background: var(--ndc-tone-1); }
.ndc-icons-solid .ndc-tile.ndc-tone-2 { background: var(--ndc-tone-2); }
.ndc-icons-solid .ndc-tile.ndc-tone-3 { background: var(--ndc-tone-3); }
.ndc-icons-solid .ndc-tile.ndc-tone-4 { background: var(--ndc-tone-4); }
.ndc-icons-solid .ndc-tile.ndc-tone-5 { background: var(--ndc-tone-5); }
.ndc-icons-solid .ndc-tile.ndc-tone-6 { background: #64748b; }

.ndc-icons-outline :is(.ndc-icon, .ndc-tile) { background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, currentColor 40%, transparent); }
.ndc-icons-outline .ndc-card-featured .ndc-icon { background: transparent; color: var(--ndc-accent); }

.ndc-icons-duotone :is(.ndc-icon, .ndc-tile) {
    background: linear-gradient(140deg, color-mix(in srgb, currentColor 26%, var(--ndc-surface)), color-mix(in srgb, currentColor 6%, var(--ndc-surface)));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 22%, transparent);
}
.ndc-icons-duotone :is(.ndc-icon, .ndc-tile) svg.ndc-i :is(path, circle, rect, polygon, ellipse) { fill: currentColor; fill-opacity: 0.16; }
.ndc-icons-duotone .ndc-card-featured .ndc-icon { background: var(--ndc-accent); box-shadow: none; color: #fff; }
.ndc-icons-duotone .ndc-card-featured .ndc-icon svg.ndc-i :is(path, circle, rect, polygon, ellipse) { fill-opacity: 0.3; }

/* ---------- Article page: wide or with the contents on the left ---------- */

@media (min-width: 1025px) {
    .ndc-article-wide .ndc-article-layout { grid-template-columns: minmax(0, 1fr); max-width: 860px; margin-inline: auto; }
    .ndc-article-wide .ndc-article-side { display: contents; }
    .ndc-article-wide .ndc-article-side .ndc-toc { order: -1; }
    .ndc-article-wide .ndc-article-side > :not(.ndc-toc) { order: 2; }
    .ndc-article-wide .ndc-pagehead { max-width: 860px; margin-inline: auto; }

    .ndc-article-left .ndc-article-layout-kb,
    .ndc-article-left .ndc-article-layout-news { grid-template-columns: 280px minmax(0, 1fr); }
    .ndc-article-left .ndc-article-side { order: -1; }
}

/* ---------- Submit a request: the department picker as a list or small tiles ---------- */

.ndc-departments-list .ndc-deptgrid { grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 760px; }
.ndc-departments-list .ndc-department { align-items: center; padding: 14px 44px 14px 16px; }
.ndc-departments-list .ndc-department.selected { padding: 13px 43px 13px 15px; }
.ndc-departments-list a.ndc-department::after {
    content: "";
    position: absolute;
    inset-inline-end: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    border: solid var(--ndc-subtle);
    border-width: 2px 2px 0 0;
    transform: translateY(-50%) rotate(45deg);
}
[dir=rtl] .ndc-departments-list a.ndc-department::after { transform: translateY(-50%) rotate(-135deg); }
.ndc-departments-list .ndc-department .ndc-icon { grid-row: span 2; }

.ndc-departments-tiles .ndc-deptgrid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.ndc-departments-tiles .ndc-department { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 22px 16px; text-align: center; }
.ndc-departments-tiles .ndc-department.selected { padding: 21px 15px; }
.ndc-departments-tiles .ndc-department .ndc-icon { width: 52px; height: 52px; margin-bottom: 8px; }

/* ---------- Footer: columns or a get help band ---------- */

.kit-foot-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 28px 40px;
    max-width: var(--kit-width);
    margin: 0 auto;
    padding: 34px 36px 26px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--ndc-border);
    font-size: 14px;
}
.kit-foot-cols strong { display: block; margin-bottom: 10px; color: var(--ndc-text-strong); font-size: 14px; }
.kit-foot-cols p { margin: 0 0 14px; color: var(--ndc-muted); line-height: 1.5; }
.kit-foot-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.kit-foot-nav ul ul, .kit-foot-nav .ndc-nav-sep, .kit-foot-nav .ndc-sub-toggle, .kit-foot-nav svg, .kit-foot-nav .ndc-count { display: none; }
.ndc-body .kit-foot-nav a { color: var(--ndc-muted); text-decoration: none; }
.ndc-body .kit-foot-nav a:hover { color: var(--ndc-accent); text-decoration: underline; }

.kit-foot-band { background: var(--ndc-accent); color: #fff; }
.kit-foot-band-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    max-width: var(--kit-width);
    margin: 0 auto;
    padding: 30px 36px;
    box-sizing: border-box;
}
.kit-foot-band strong { font-size: 20px; }
.kit-foot-band p { margin: 4px 0 0; opacity: 0.88; }
.ndc-body a.kit-foot-band-btn {
    padding: 12px 22px;
    border-radius: var(--ndc-radius-sm);
    background: #fff;
    color: color-mix(in srgb, var(--ndc-accent) 70%, #000);
    font-weight: 700;
    text-decoration: none;
}
.ndc-body a.kit-foot-band-btn:hover { background: color-mix(in srgb, #fff 88%, var(--ndc-accent)); }
.kit-foot-band { border-bottom: 1px solid rgb(255 255 255 / 0.16); }
.kit-foot-band ~ .kit-foot-inner { max-width: none; padding-inline: max(36px, calc((100% - var(--kit-width)) / 2 + 36px)); background: var(--ndc-accent); color: rgb(255 255 255 / 0.78); }

/* ---------- Motion: subtle or lively (only for people who haven't asked for less motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
    .ndc-motion-subtle :is(.ndc-card, .ndc-department, .kit-topic, .kit-stat) { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s; }
    .ndc-motion-subtle :is(.ndc-card, a.ndc-department, .kit-topic):hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgb(16 24 40 / 0.35); }
    .ndc-motion-subtle .ndc-content > * { animation: kit-rise 0.35s ease-out backwards; }

    .ndc-motion-lively :is(.ndc-card, .ndc-department, .kit-topic, .kit-stat, .ndc-btn) { transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease; }
    .ndc-motion-lively :is(.ndc-card, a.ndc-department, .kit-topic):hover { transform: translateY(-4px); box-shadow: 0 16px 30px -16px rgb(16 24 40 / 0.45); }
    .ndc-motion-lively :is(.ndc-card, a.ndc-department):hover :is(.ndc-icon, .ndc-tile) { transform: scale(1.08) rotate(-4deg); }
    .ndc-motion-lively :is(.ndc-icon, .ndc-tile) { transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
    .ndc-motion-lively .ndc-btn:active { transform: scale(0.97); }
    .ndc-motion-lively .ndc-cards > * { animation: kit-rise 0.45s ease-out backwards; }
    .ndc-motion-lively .ndc-cards > :nth-child(2) { animation-delay: 0.05s; }
    .ndc-motion-lively .ndc-cards > :nth-child(3) { animation-delay: 0.1s; }
    .ndc-motion-lively .ndc-cards > :nth-child(4) { animation-delay: 0.15s; }
    .ndc-motion-lively .ndc-cards > :nth-child(n+5) { animation-delay: 0.2s; }
}
/* From a visible start, so a page caught mid-animation still reads. */
@keyframes kit-rise { from { opacity: 0.4; transform: translateY(8px); } }

/* ---------- Tablets and phones ---------- */

@media (max-width: 760px) {
    .kit-foot-cols { grid-template-columns: minmax(0, 1fr); padding: 26px 20px 20px; }
    .kit-foot-band-inner { padding: 24px 20px; }
    .kit-foot-band ~ .kit-foot-inner { padding-inline: 20px; }
    .ndc-density-roomy .ndc-panel { padding: 22px 20px; }
    :is(.ndc-hero-soft, .ndc-hero-split) .ndc-hero.kit-hero-photo { padding: 22px 18px; }
}
