/*
 * NeurodiverCity frontend template.
 *
 * Loaded after SupportPal's frontend main.min.css. Brand colours (--ndc-accent, --ndc-side-from, --ndc-side-to) are
 * set per brand by the NeurodiverCity plugin in an inline <style> after this file.
 */

/* --------------------------------------------------------------------------
 * Tokens
 * ----------------------------------------------------------------------- */

:root {
    --ndc-accent: #f40867;
    --ndc-side-from: #161e28;
    --ndc-side-to: #0c131d;

    --ndc-bg: #f6f7fb;
    --ndc-surface: #ffffff;
    --ndc-surface-2: #f8f9fb;
    --ndc-border: #e8ebf0;
    --ndc-border-soft: #eef1f5;
    --ndc-input-border: #dfe4ec;
    --ndc-text: #172033;
    --ndc-text-strong: #111827;
    --ndc-body: #374357;
    --ndc-muted: #667085;
    --ndc-subtle: #8a94a6;
    --ndc-info-bg: #f1f5fb;
    --ndc-info-text: #50637c;
    --ndc-online: #278464;
    --ndc-side-text: #c9d1de;
    --ndc-side-muted: #8390a1;

    --ndc-accent-soft: color-mix(in srgb, var(--ndc-accent) 6%, var(--ndc-surface));
    --ndc-accent-tint: color-mix(in srgb, var(--ndc-accent) 12%, var(--ndc-surface));
    --ndc-accent-line: color-mix(in srgb, var(--ndc-accent) 40%, var(--ndc-surface));
    --ndc-accent-ring: color-mix(in srgb, var(--ndc-accent) 25%, transparent);
    --ndc-accent-dark: color-mix(in srgb, var(--ndc-accent) 82%, black);
    --ndc-row-hover: color-mix(in srgb, var(--ndc-accent) 3%, var(--ndc-surface));

    --ndc-tone-1: var(--ndc-accent);
    --ndc-tone-2: #2563eb;
    --ndc-tone-3: #16a34a;
    --ndc-tone-4: #7c3aed;
    --ndc-tone-5: #ea580c;

    --ndc-radius: 14px;
    --ndc-radius-sm: 10px;
    --ndc-shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 4px 16px rgb(16 24 40 / 0.03);
    --ndc-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --ndc-top-h: 68px;
    --ndc-tabbar-h: 64px;
}

.sp-theme-dark {
    --ndc-bg: #10161e;
    --ndc-surface: #18212b;
    --ndc-surface-2: #1d2733;
    --ndc-border: #283340;
    --ndc-border-soft: #232d39;
    --ndc-input-border: #334050;
    --ndc-text: #e4e9f0;
    --ndc-text-strong: #f3f6fa;
    --ndc-body: #cdd5df;
    --ndc-muted: #a1adbd;
    --ndc-subtle: #8693a4;
    --ndc-info-bg: #1c2733;
    --ndc-info-text: #a9b8ca;
    --ndc-online: #4fc396;
    --ndc-shadow: none;
    --ndc-tone-2: #60a5fa;
    --ndc-tone-3: #4ade80;
    --ndc-tone-4: #a78bfa;
    --ndc-tone-5: #fb923c;
}

/* --------------------------------------------------------------------------
 * Base
 * ----------------------------------------------------------------------- */

html { background: var(--ndc-bg); }

body.ndc-body {
    margin: 0;
    background: var(--ndc-bg);
    color: var(--ndc-text);
    font-family: var(--ndc-font);
}

/* The brand's heading font (Settings > Brands > Theme > Fonts) for headings and the wordmark. */
.ndc-body :is(h1, h2, h3, h4, h5, h6, .ndc-brand, .ndc-top-brand) { font-family: var(--ndc-font-heading, var(--ndc-font)); }

.ndc-body a { color: var(--ndc-accent); }
.ndc-body a:hover { color: var(--ndc-accent-dark); }

svg.ndc-i { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.2em; }

.ndc-content h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.6px; line-height: 1.2; margin: 0; color: var(--ndc-text-strong); }
.ndc-content h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; margin: 0 0 14px; color: var(--ndc-text-strong); }
.ndc-content h3 { font-size: 15px; font-weight: 700; margin: 0 0 9px; }
.ndc-content h4 { font-size: 14px; font-weight: 700; margin: 0; }
.ndc-content p { line-height: 1.6; }
.ndc-content hr { border: 0; border-top: 1px solid var(--ndc-border); margin: 20px 0; }
.ndc-content .sp-description { color: var(--ndc-subtle); font-size: 12px; }
.ndc-muted { color: var(--ndc-muted); }
.ndc-panel p.ndc-muted { margin: -6px 0 18px; font-size: 14px; }

/* --------------------------------------------------------------------------
 * App shell
 * ----------------------------------------------------------------------- */

.ndc-app { --ndc-side-w: 236px; display: flex; min-height: 100vh; }

.ndc-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: var(--ndc-side-w);
    height: 100vh;
    box-sizing: border-box;
    padding: 26px 14px 18px;
    overflow-y: auto;
    background: linear-gradient(165deg, var(--ndc-side-from), var(--ndc-side-to));
    color: #fff;
    z-index: 30;
}

.ndc-brand {
    display: block;
    padding: 0 12px 30px;
    /* Shrink long wordmarks to fit the sidebar (less its padding); --ndc-wordmark-len is the character count, set in index.twig. */
    font-size: min(25px, calc((var(--ndc-side-w, 236px) - 52px) * 1.6 / var(--ndc-wordmark-len, 7)));
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}
.ndc-body .ndc-brand, .ndc-body .ndc-brand:hover { color: #fff; }
.ndc-brand span { color: var(--ndc-accent); }
.ndc-brand img { display: block; max-width: 100%; max-height: 40px; }

.ndc-nav ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ndc-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}
.ndc-body .ndc-nav a { color: var(--ndc-side-text); }
.ndc-body .ndc-nav a:hover { background: rgb(255 255 255 / 0.06); color: #fff; }
.ndc-body .ndc-nav a.current { background: var(--ndc-accent); color: #fff; font-weight: 600; }
.ndc-nav a > span:first-of-type { flex: 1; min-width: 0; }
.ndc-nav svg.ndc-i { width: 19px; height: 19px; }
.ndc-nav .ndc-nav-sep { height: 1px; margin: 8px 14px; background: rgb(255 255 255 / 0.1); }
.ndc-nav [data-ndc-account][hidden] { display: none; }

/*
 * Sidebar items with a sub-menu (li.ndc-has-sub): the link, a chevron button, and .ndc-sub with the sub-links.
 * Wide screens: a fly-out card beside the sidebar on hover, focus or the chevron (placed by neurodivercity.js).
 * Phones: the chevron opens the sub-links in place, inside the off-canvas sidebar.
 * The toggle and .ndc-sub carry an inline display:none, so they stay hidden on stylesheets without this support;
 * the !important display values below override it.
 */
.ndc-sub-row { position: relative; }
.ndc-sub-row > a { padding-inline-end: 40px; }
.ndc-sub-toggle {
    position: absolute;
    inset-block: 4px;
    inset-inline-end: 4px;
    display: grid !important;
    place-items: center;
    width: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.ndc-body .ndc-sub-row > a:not(.current) + .ndc-sub-toggle { color: var(--ndc-side-muted); }
.ndc-sub-toggle:hover, .ndc-sub-toggle:focus-visible { background: rgb(255 255 255 / 0.1); color: #fff; }
.ndc-sub-toggle svg.ndc-i { width: 16px; height: 16px; transition: transform 0.15s; }
[dir=rtl] .ndc-sub-toggle svg.ndc-i { transform: scaleX(-1); }

.ndc-sub {
    position: fixed;
    z-index: 70;
    display: none;
    min-width: 240px;
    max-width: 300px;
    max-height: calc(100vh - 24px);
    padding: 8px;
    overflow-y: auto;
    box-sizing: border-box;
    border: 1px solid var(--ndc-border);
    border-radius: var(--ndc-radius-sm);
    background: var(--ndc-surface);
    box-shadow: 0 12px 32px rgb(16 24 40 / 0.16), 0 2px 6px rgb(16 24 40 / 0.06);
}
.ndc-has-sub.ndc-sub-open > .ndc-sub { display: grid !important; gap: 2px; }
.ndc-sub-title { padding: 8px 10px 6px; color: var(--ndc-text-strong); font-size: 14px; font-weight: 700; }
.ndc-sub-group { padding: 10px 10px 4px; color: var(--ndc-subtle); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.ndc-nav .ndc-sub a { gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.ndc-body .ndc-nav .ndc-sub a { color: var(--ndc-body); }
.ndc-body .ndc-nav .ndc-sub a:hover, .ndc-body .ndc-nav .ndc-sub a:focus-visible { background: var(--ndc-accent-soft); color: var(--ndc-text-strong); }
.ndc-body .ndc-nav .ndc-sub a.current { background: var(--ndc-accent-tint); color: var(--ndc-accent-dark); font-weight: 600; }
.ndc-nav .ndc-sub svg.ndc-i { width: 17px; height: 17px; color: var(--ndc-subtle); }
.ndc-nav .ndc-sub a.current svg.ndc-i { color: var(--ndc-accent); }

.ndc-count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    box-sizing: border-box;
    border-radius: 10px;
    background: var(--ndc-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.ndc-count[hidden] { display: none; }
.ndc-nav a.current .ndc-count { background: #fff; color: var(--ndc-accent); }

.ndc-sidebar-bottom { margin-top: auto; padding-top: 18px; }
.ndc-sidefoot { padding: 14px 14px 0; color: #d2d8e2; font-size: 13px; line-height: 1.7; }
.ndc-sidefoot small { color: var(--ndc-side-muted); }
.ndc-language { display: flex; align-items: center; gap: 8px; margin: 12px 14px 0; color: var(--ndc-side-muted); }
.ndc-language select {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid rgb(255 255 255 / 0.14);
    border-radius: 8px;
    background: rgb(255 255 255 / 0.05);
    color: #d2d8e2;
    font-size: 13px;
}
.ndc-language select option { color: #172033; }

.ndc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.ndc-top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--ndc-top-h);
    padding: 0 36px;
    box-sizing: border-box;
    background: var(--ndc-surface);
    border-bottom: 1px solid var(--ndc-border);
}
.ndc-top-spacer { flex: 1; }
.ndc-top-brand { display: none; }

.ndc-topright { display: flex; align-items: center; gap: 10px; flex-shrink: 0; font-size: 13px; }
.ndc-status { color: var(--ndc-online); white-space: nowrap; }
.ndc-status::before { content: "●"; margin-inline-end: 6px; }

.ndc-iconbtn {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
}
.ndc-body .ndc-iconbtn { color: var(--ndc-muted); }
.ndc-body .ndc-iconbtn:hover { background: var(--ndc-surface-2); color: var(--ndc-text); }
.ndc-iconbtn svg.ndc-i { width: 20px; height: 20px; }
.ndc-dot-badge {
    position: absolute;
    top: 3px;
    inset-inline-end: 2px;
    display: grid;
    place-items: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    box-sizing: border-box;
    border: 2px solid var(--ndc-surface);
    border-radius: 9px;
    background: var(--ndc-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.ndc-user { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 22px; cursor: pointer; }
.ndc-body .ndc-user, .ndc-body .ndc-user:hover { color: var(--ndc-text); }
.ndc-user:hover { background: var(--ndc-surface-2); }
.ndc-user img { width: 34px; height: 34px; border-radius: 50%; }
.ndc-user .ndc-username { font-weight: 600; }
.ndc-user .ndc-chevron { width: 16px; height: 16px; color: var(--ndc-muted); }

.ndc-menu-panel {
    inset-inline-end: 0;
    top: calc(100% + 10px);
    min-width: 240px;
    max-width: 320px;
    padding: 6px 0;
    border: 1px solid var(--ndc-border);
    border-radius: 12px;
    background: var(--ndc-surface);
    box-shadow: 0 12px 32px rgb(16 24 40 / 0.12);
}
.ndc-menu-panel ul { margin: 0; padding: 0; list-style: none; text-align: start; }
.ndc-menu-panel a { display: block; padding: 9px 16px; color: var(--ndc-text); text-decoration: none; }
.ndc-body .ndc-menu-panel a { color: var(--ndc-text); }
.ndc-body .ndc-menu-panel a:hover, .ndc-body .ndc-menu-panel a.current { background: var(--ndc-accent-soft); color: var(--ndc-accent); }
.ndc-menu-panel a strong { display: block; font-size: 13px; }
.ndc-menu-panel a small { display: block; margin-top: 2px; color: var(--ndc-subtle); font-size: 12px; }
.ndc-menu-title { padding: 8px 16px; color: var(--ndc-subtle); font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.ndc-menu-empty { margin: 0; padding: 8px 16px 12px; color: var(--ndc-muted); font-size: 13px; }

/* Account menu */
.ndc-account-panel { width: 290px; max-width: calc(100vw - 32px); padding: 0; overflow: hidden; }
/* SupportPal's dropdown styles give each direct child a fixed width, a border and a short max height. */
.ndc-account-panel > * { width: auto; max-height: none; border: 0; box-shadow: none; }
.ndc-account-head { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--ndc-border) !important; background: var(--ndc-surface-2); }
.ndc-account-head img { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; }
.ndc-account-head span { display: grid; gap: 2px; min-width: 0; }
.ndc-account-head strong { overflow: hidden; color: var(--ndc-text-strong); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.ndc-account-head small { overflow: hidden; color: var(--ndc-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ndc-account-links.ndc-account-links { padding: 6px; }
.ndc-body .ndc-account-links a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.ndc-account-links svg.ndc-i { flex-shrink: 0; width: 18px; height: 18px; color: var(--ndc-muted); }
.ndc-body .ndc-account-links a:hover svg.ndc-i, .ndc-body .ndc-account-links a.current svg.ndc-i { color: var(--ndc-accent); }
.ndc-account-logout { border-top: 1px solid var(--ndc-border) !important; }

/* Wide screens: my name and organisation, last in the sidebar, open my menu above them (fixed, as the sidebar
   scrolls). The top bar keeps the bell. Phones keep the avatar at the top right, and Profile in the slide-out menu. */
.ndc-side-me { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgb(255 255 255 / 0.08); }
.ndc-side-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.ndc-body .ndc-side-user, .ndc-body .ndc-side-user:hover { color: #fff; text-decoration: none; }
.ndc-side-user:hover, .ndc-side-me:has(.sp-dropdown:not([style*="none"])) .ndc-side-user { background: rgb(255 255 255 / 0.06); }
.ndc-side-user:focus-visible { outline: 2px solid var(--ndc-accent); outline-offset: 2px; }
.ndc-side-user img { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; }
.ndc-side-user span { display: grid; gap: 1px; min-width: 0; line-height: 1.3; }
.ndc-side-user strong, .ndc-side-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ndc-side-user strong { font-size: 13.5px; }
.ndc-side-user small { color: var(--ndc-side-muted); font-size: 12px; }
.ndc-side-user .ndc-chevron { flex-shrink: 0; width: 16px; height: 16px; margin-inline-start: auto; color: var(--ndc-side-muted); }
.ndc-side-account-panel { position: fixed; top: auto; bottom: 84px; inset-inline-start: 14px; inset-inline-end: auto; z-index: 70; }
@media (min-width: 761px) {
    .ndc-top .ndc-account, .ndc-side-profile { display: none; }
}
@media (max-width: 760px) {
    .ndc-side-me { display: none; }
}

/* Notification bell */
.ndc-bell-panel { width: 340px; max-width: calc(100vw - 32px); }
/* SupportPal's dropdown styles give each direct child a fixed width, a border and a short max height. */
.ndc-bell-panel > * { width: auto; max-height: none; border: 0; box-shadow: none; }
.ndc-bell-panel > ul { max-height: min(420px, 60vh); overflow-y: auto; }
.ndc-bell-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ndc-bell-head form { margin: 0; }
.ndc-body .ndc-bell-head button[type=submit] {
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ndc-accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}
.ndc-body .ndc-bell-head button[type=submit]:hover { text-decoration: underline; background: none; color: var(--ndc-accent); }
.ndc-bell-item a { display: flex; align-items: flex-start; gap: 10px; }
.ndc-bell-icon { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; background: var(--ndc-surface-2, var(--ndc-accent-soft)); color: var(--ndc-muted); }
.ndc-bell-icon svg.ndc-i { width: 15px; height: 15px; }
.ndc-bell-text { flex: 1; min-width: 0; }
.ndc-bell-item:not(.unread) .ndc-bell-text strong { font-weight: 500; color: var(--ndc-muted); }
.ndc-bell-item.unread .ndc-bell-icon { background: var(--ndc-accent-soft); color: var(--ndc-accent); }
.ndc-bell-dot { flex-shrink: 0; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--ndc-accent); }

.ndc-top .sp-search {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 36px;
    background: var(--ndc-surface);
    z-index: 2;
}
.ndc-top .sp-search.sp\:hidden { display: none; }
.ndc-top .sp-search form { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--ndc-subtle); }
.ndc-top .sp-search input[type=search] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--ndc-input-border);
    border-radius: var(--ndc-radius-sm);
    background: var(--ndc-surface);
    color: var(--ndc-text);
}

.ndc-backdrop { display: none; }
.ndc-tabbar { display: none; }
.ndc-menu { display: none; }

.ndc-content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 32px 36px 40px; box-sizing: border-box; flex: 1; }

/* Page header */
.ndc-pagehead { margin-bottom: 24px; }
.ndc-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--ndc-subtle); font-size: 13px; }
.ndc-body .ndc-crumbs a { color: var(--ndc-muted); text-decoration: none; }
.ndc-body .ndc-crumbs a:hover { color: var(--ndc-accent); }
.ndc-crumbs svg.ndc-i { width: 14px; height: 14px; }
.ndc-crumb-current { display: inline-flex; align-items: center; gap: 6px; color: var(--ndc-text); }
.ndc-pagehead-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ndc-pagehead-text { min-width: 0; }
.ndc-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; }
.ndc-ticket-number { color: var(--ndc-text-strong); font-size: 28px; font-weight: 700; letter-spacing: -0.6px; }
.ndc-eyebrow { margin-bottom: 6px; color: var(--ndc-accent); font-size: 12px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
.ndc-lead { margin: 6px 0 0; color: var(--ndc-muted); font-size: 14px; line-height: 1.6; }
.ndc-actions { display: flex; align-items: center; gap: 8px; }

.ndc-columns { display: flex; gap: 20px; align-items: flex-start; }
.ndc-columns > .ndc-col-main { flex: 1; min-width: 0; }

/* User content (ticket messages, articles) must never widen the page on a phone: long URLs and email addresses wrap,
   media shrinks, and code or tables scroll in their own box. */
.ndc-content { overflow-wrap: break-word; }
.ndc-content .sp-message-text, .ndc-content .sp-article { overflow-wrap: anywhere; }
.ndc-content img, .ndc-content video, .ndc-content iframe { max-width: 100%; height: auto; }
.ndc-content pre { max-width: 100%; overflow-x: auto; }
.ndc-content .sp-message-text table, .ndc-content .sp-article table { display: block; max-width: 100%; overflow-x: auto; }
.ndc-columns > .sp-sidebar, .ndc-columns > .ndc-aside { flex: 0 0 300px; width: 300px; min-width: 0; }

/* --------------------------------------------------------------------------
 * Building blocks
 * ----------------------------------------------------------------------- */

.ndc-panel, .ndc-card, .sp-sidebar-box {
    background: var(--ndc-surface);
    border: 1px solid var(--ndc-border);
    border-radius: var(--ndc-radius);
    box-shadow: var(--ndc-shadow);
}
.ndc-panel { padding: 22px; box-sizing: border-box; }
.ndc-panel + .ndc-panel, .ndc-aside > * + * { margin-top: 18px; }
.ndc-panelhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ndc-panelhead h2 { margin: 0; }
.ndc-link { color: var(--ndc-accent); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }

.ndc-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--ndc-accent-tint);
    color: var(--ndc-accent);
}
.ndc-icon svg.ndc-i, .ndc-icon i { width: 21px; height: 21px; font-size: 18px; }

.ndc-tile { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; }
.ndc-tile svg.ndc-i { width: 19px; height: 19px; }
.ndc-tone-1 { color: var(--ndc-tone-1); background: color-mix(in srgb, var(--ndc-tone-1) 12%, var(--ndc-surface)); }
.ndc-tone-2 { color: var(--ndc-tone-2); background: color-mix(in srgb, var(--ndc-tone-2) 12%, var(--ndc-surface)); }
.ndc-tone-3 { color: var(--ndc-tone-3); background: color-mix(in srgb, var(--ndc-tone-3) 12%, var(--ndc-surface)); }
.ndc-tone-4 { color: var(--ndc-tone-4); background: color-mix(in srgb, var(--ndc-tone-4) 12%, var(--ndc-surface)); }
.ndc-tone-5 { color: var(--ndc-tone-5); background: color-mix(in srgb, var(--ndc-tone-5) 12%, var(--ndc-surface)); }

.ndc-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 6px 6px 6px 16px;
    background: var(--ndc-surface);
    border: 1px solid var(--ndc-border);
    border-radius: 12px;
    box-shadow: var(--ndc-shadow);
}
.ndc-search .ndc-search-icon { width: 19px; height: 19px; color: var(--ndc-subtle); }
.ndc-search input {
    flex: 1;
    min-width: 0;
    padding: 10px 6px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ndc-text);
    font: inherit;
    font-size: 15px;
}
.ndc-search:focus-within { border-color: var(--ndc-accent-line); box-shadow: 0 0 0 3px var(--ndc-accent-ring); }

/* Buttons. Every button shares one size, shape and type style: pink for the main action, white outlined for the
   rest. SupportPal's own unstyled buttons (e.g. "Invite User", "Add") get the secondary style. */
.ndc-btn, .ndc-content input[type=submit], .ndc-content .sp-button-submit, .ndc-content button[type=submit],
.ndc-btn-secondary, .ndc-btn-outline, .ndc-content .sp-button:not(.sp-button-submit),
.ndc-content button:not([class]):not([type=submit]), .ndc-content .sp-add-email-address, .ndc-content .sp-add-number {
    box-sizing: border-box;
    min-height: 40px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
}
.ndc-btn, .ndc-content input[type=submit], .ndc-content .sp-button-submit, .ndc-content button[type=submit] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--ndc-accent);
    border-radius: var(--ndc-radius-sm);
    background: var(--ndc-accent);
    color: #fff;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
}
.ndc-body .ndc-btn, .ndc-body .ndc-btn:hover, .ndc-body .ndc-content .sp-button-submit { color: #fff; }
.ndc-btn:hover, .ndc-content input[type=submit]:hover, .ndc-content .sp-button-submit:hover, .ndc-content button[type=submit]:hover {
    background: var(--ndc-accent-dark);
    border-color: var(--ndc-accent-dark);
    color: #fff;
}
.ndc-content input[type=submit][disabled], .ndc-content button[type=submit][disabled] { opacity: 0.55; cursor: not-allowed; }
.ndc-btn-icon { width: 44px; height: 40px; padding: 0; }
.ndc-btn-icon svg.ndc-i { width: 19px; height: 19px; }

.ndc-btn-secondary, .ndc-btn-outline, .ndc-content .sp-button:not(.sp-button-submit),
.ndc-content button:not([class]):not([type=submit]), .ndc-content .sp-add-email-address, .ndc-content .sp-add-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--ndc-input-border);
    border-radius: var(--ndc-radius-sm);
    background: var(--ndc-surface);
    color: var(--ndc-body);
    box-shadow: none;
    text-decoration: none;
    cursor: pointer;
}
.ndc-body a.ndc-btn-secondary, .ndc-body a.ndc-btn-secondary:visited { color: var(--ndc-body); }
.ndc-body .ndc-btn-secondary:hover, .ndc-content .sp-button:not(.sp-button-submit):hover,
.ndc-content button:not([class]):not([type=submit]):hover, .ndc-content .sp-add-email-address:hover, .ndc-content .sp-add-number:hover {
    border-color: var(--ndc-accent-line);
    color: var(--ndc-accent);
}
.ndc-content button:not([class]):not([type=submit]):focus-visible, .ndc-btn:focus-visible, .ndc-btn-secondary:focus-visible {
    outline: 2px solid var(--ndc-accent);
    outline-offset: 2px;
}

/* DataTables paging (organisation users, invites, email history): the page box is sized for its digits, so it must
   not get the general input padding, or the number disappears. */
.ndc-content .dt-inputpaging { display: flex; align-items: center; gap: 6px; }
.ndc-content .dt-inputpaging input, .ndc-content .dt-inputpaging input[type="text"] {
    box-sizing: content-box;
    width: 3ch !important;
    min-width: 3ch;
    height: 20px;
    padding: 8px 6px;
    border: 1px solid var(--ndc-input-border);
    border-radius: var(--ndc-radius-sm);
    background: var(--ndc-surface);
    color: var(--ndc-text);
    font-size: 13px;
    text-align: center;
}
.ndc-content .dt-paging-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--ndc-input-border);
    border-radius: var(--ndc-radius-sm);
    background: var(--ndc-surface);
    color: var(--ndc-body);
    cursor: pointer;
}
.ndc-content .dt-paging-button:hover:not(.disabled) { border-color: var(--ndc-accent-line); color: var(--ndc-accent); }
.ndc-content .dt-paging-button.disabled { opacity: .4; cursor: default; }
.ndc-body .ndc-btn-outline { border-color: var(--ndc-accent-line); color: var(--ndc-accent); }
.ndc-body .ndc-btn-outline:hover { background: var(--ndc-accent-soft); color: var(--ndc-accent); }
.ndc-btn-outline.sp\:hidden { display: none; }
.ndc-btn-square { width: 40px; height: 40px; padding: 0; }
.ndc-content .sp-button-sm { padding: 6px 10px; font-size: 12px; }

/* Pills (status / priority). --pill is the colour; tinted background, darker text. */
.ndc-pill {
    --pill: #64748b;
    display: inline-block;
    padding: 4px 9px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--pill) 14%, var(--ndc-surface));
    color: color-mix(in srgb, var(--pill) 75%, var(--ndc-text));
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    vertical-align: middle;
}
.sp-theme-dark .ndc-pill {
    background: color-mix(in srgb, var(--pill) 30%, var(--ndc-surface));
    color: color-mix(in srgb, var(--pill) 40%, white);
}
.ndc-title-row .ndc-pill { font-size: 12px; }

.ndc-note { padding: 18px; border-radius: var(--ndc-radius); background: var(--ndc-info-bg); color: var(--ndc-info-text); font-size: 13px; line-height: 1.6; }
.ndc-note strong { display: flex; align-items: center; gap: 8px; color: var(--ndc-text); }
.ndc-note p { margin: 8px 0 0; }
.ndc-notice { margin: 20px 0; padding: 15px 18px; border-inline-start: 4px solid var(--ndc-accent); border-radius: 8px; background: var(--ndc-accent-soft); }
.ndc-empty { padding: 28px; color: var(--ndc-subtle); text-align: center; }
.ndc-hint { color: var(--ndc-subtle); font-size: 12px; }
.ndc-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--ndc-muted); text-decoration: none; }
.ndc-body .ndc-back { color: var(--ndc-muted); }
.ndc-dot { display: inline-block; flex-shrink: 0; width: 10px; height: 10px; margin-inline-end: 6px; border-radius: 50%; vertical-align: baseline; }
.ndc-content .ndc-section-gap { margin-top: 28px; }

.ndc-content .sp-alert { margin-bottom: 18px; border-radius: 10px; }

/* --------------------------------------------------------------------------
 * Homepage
 * ----------------------------------------------------------------------- */

.ndc-hero { position: relative; margin: -32px -36px 0; padding: 34px 36px 4px; isolation: isolate; }
.ndc-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 -120px;
    z-index: -1;
    background:
        radial-gradient(60% 90% at 88% 0%, color-mix(in srgb, var(--ndc-accent) 14%, transparent), transparent 70%),
        radial-gradient(40% 60% at 60% 0%, color-mix(in srgb, var(--ndc-accent) 6%, transparent), transparent 70%);
    pointer-events: none;
}
.ndc-hero h1 { font-size: 30px; }
.ndc-hero-sub { margin: 6px 0 22px; color: var(--ndc-muted); font-size: 17px; }
.ndc-wave { display: inline-block; }

.ndc-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; }
/* Home quick links: three across when there are 3, 5 or 6, so no card sits alone on a row. */
.ndc-cards-3, .ndc-cards-5, .ndc-cards-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ndc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 140px;
    padding: 20px;
    box-sizing: border-box;
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s;
}
.ndc-body .ndc-card, .ndc-body .ndc-card:hover { color: var(--ndc-text); }
.ndc-card:hover { border-color: var(--ndc-accent-line); transform: translateY(-1px); }
.ndc-card strong { display: block; font-size: 15px; }
.ndc-card small { display: block; margin-top: 4px; color: var(--ndc-subtle); font-size: 13px; line-height: 1.45; }
.ndc-card-featured { background: var(--ndc-accent-soft); border-color: color-mix(in srgb, var(--ndc-accent) 18%, var(--ndc-surface)); }
.ndc-card-featured .ndc-icon { border-radius: 50%; background: var(--ndc-accent); color: #fff; }
.ndc-card-badge { position: absolute; top: 16px; inset-inline-end: 16px; }
.ndc-card-chevron { display: none; }

.ndc-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ndc-cols > .ndc-panel + .ndc-panel { margin-top: 0; }

/* --------------------------------------------------------------------------
 * Tables (plain and datatables)
 * ----------------------------------------------------------------------- */

.ndc-tablewrap { overflow-x: auto; }
.ndc-table, .ndc-content table.dataTable { width: 100%; border-collapse: collapse; font-size: 13px; text-align: start; }
.ndc-table th, .ndc-content table.dataTable thead th {
    padding: 11px 10px;
    background: var(--ndc-surface-2);
    border-bottom: 1px solid var(--ndc-border-soft);
    color: var(--ndc-subtle);
    font-size: 11px;
    font-weight: 600;
    text-align: start;
    white-space: nowrap;
}
.ndc-table td, .ndc-content table.dataTable tbody td { padding: 13px 10px; border-bottom: 1px solid var(--ndc-border-soft); vertical-align: middle; }
.ndc-table td:first-child { white-space: nowrap; }
.ndc-table tbody tr:last-child td { border-bottom: 0; }
.ndc-table tbody tr[data-href] { cursor: pointer; }
.ndc-table tbody tr:hover, .ndc-content table.dataTable tbody tr:hover { background: var(--ndc-row-hover); }
.ndc-body .ndc-table td a { color: var(--ndc-text); font-weight: 600; text-decoration: none; }
.ndc-body .ndc-table td a:hover { color: var(--ndc-accent); }

/* Datatables: SupportPal bleeds the table to the edge of its own padded box; we pad differently. */
.ndc-content .dt-container { margin-inline: 0; }
.ndc-content .sp-filter-results { margin-bottom: 18px; padding: 18px; border: 1px solid var(--ndc-border); border-radius: 12px; background: var(--ndc-surface-2); }
.ndc-content .dataTables_wrapper .dataTables_filter input { margin-inline-start: 6px; }

/* --------------------------------------------------------------------------
 * Self-service
 * ----------------------------------------------------------------------- */

.ndc-content ul.ndc-articles { margin: 0; padding: 0; list-style: none; }
.ndc-content ul.ndc-articles > li.ndc-article { display: flex; align-items: center; gap: 14px; margin: 0; padding: 12px 0; border: 0; border-bottom: 1px solid var(--ndc-border-soft); }
.ndc-content ul.ndc-articles > li.ndc-article:last-child { border-bottom: 0; }
.ndc-article-body, .ndc-article > a { flex: 1; min-width: 0; }
.ndc-body .ndc-article a { color: inherit; text-decoration: none; }
.ndc-article strong { display: block; color: var(--ndc-text); font-size: 13px; }
.ndc-article small { display: block; margin-top: 3px; overflow: hidden; color: var(--ndc-subtle); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ndc-article a:hover strong { color: var(--ndc-accent); }
.ndc-article .sp-article-details { margin-top: 6px; }
.ndc-views { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; color: var(--ndc-subtle); font-size: 12px; }

.ndc-categorygrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 22px; }
.ndc-category {
    display: block;
    padding: 20px;
    background: var(--ndc-surface);
    border: 1px solid var(--ndc-border);
    border-radius: var(--ndc-radius);
    box-shadow: var(--ndc-shadow);
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s;
}
.ndc-body .ndc-category, .ndc-body .ndc-category:hover { color: var(--ndc-text); }
.ndc-category:hover { border-color: var(--ndc-accent-line); transform: translateY(-1px); }
.ndc-category strong { display: block; margin: 14px 0 4px; font-size: 14px; }
.ndc-category small { color: var(--ndc-subtle); font-size: 12px; }

.ndc-content .sp-article { line-height: 1.7; color: var(--ndc-body); }
.ndc-content .sp-article img { max-width: 100%; height: auto; }

.ndc-content ul.sp-tabs { display: flex; gap: 4px; margin: -6px 0 6px; padding: 0; list-style: none; border: 0; border-bottom: 1px solid var(--ndc-border); }
.ndc-content ul.sp-tabs li, .ndc-content ul.sp-tabs li.sp-active { margin: 0; padding: 0; border: 0; background: none; }
.ndc-content ul.sp-tabs li a, .ndc-content ul.sp-tabs li.sp-active a { border: 0; border-radius: 0; background: none; }
.ndc-content .sp-tabs li a { display: block; padding: 10px 12px; color: var(--ndc-muted); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.ndc-content .sp-tabs li.sp-active a { color: var(--ndc-accent); box-shadow: inset 0 -2px 0 var(--ndc-accent); }

.sp-sidebar-box { padding: 22px; margin-bottom: 18px; }
.sp-sidebar-box h2 { font-size: 15px; margin: 0 0 12px; }
.sp-sidebar-box .sp-nav { margin: 0; padding: 0; list-style: none; }
.sp-sidebar-box .sp-nav a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; color: var(--ndc-body); text-decoration: none; }
.ndc-body .sp-sidebar-box .sp-nav a:hover { color: var(--ndc-accent); }

/* --------------------------------------------------------------------------
 * Forms
 * ----------------------------------------------------------------------- */

.ndc-content .sp-form-row { margin-bottom: 18px; }
.ndc-content .sp-form-row > label { margin-bottom: 8px; font-size: 13px; font-weight: 600; width: auto; padding: 0; text-align: start; }
.ndc-content .sp-form-row > label:empty { display: none; }
.ndc-content .sp-input-container { width: 100%; min-width: 0; }

.ndc-content input[type=text], .ndc-content input[type=email], .ndc-content input[type=password], .ndc-content input[type=number],
.ndc-content input[type=search], .ndc-content input[type=tel], .ndc-content input[type=url], .ndc-content input[type=date],
.ndc-content select:not([multiple]), .ndc-content textarea {
    box-sizing: border-box;
    max-width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--ndc-input-border);
    border-radius: var(--ndc-radius-sm);
    background: var(--ndc-surface);
    color: var(--ndc-text);
    font: inherit;
    font-size: 14px;
}
.ndc-content .ndc-search input[type=search] { padding: 10px 6px; border: 0; background: transparent; }
.ndc-content .sp-form-row input[type=text], .ndc-content .sp-form-row input[type=email], .ndc-content .sp-form-row input[type=password],
.ndc-content .sp-form-row .sp-password-container, .ndc-content .sp-form-row .sp-input-group,
.ndc-content .sp-form-row select:not([multiple]), .ndc-content .sp-form-row textarea { width: 100%; }
.ndc-content select:not([multiple]) { height: auto; line-height: 1.4; }
/* Dropdowns inside tables (e.g. organisation access levels) get a fixed 40px height from SupportPal; fit the text. */
.ndc-content table select:not([multiple]) { height: 40px; padding-top: 8px; padding-bottom: 8px; line-height: 20px; }
.ndc-content textarea { min-height: 155px; resize: vertical; }
/* Password show/hide wrapper added by script with inline sizing. */
.ndc-content .sp-input-container :has(> input[type=password]) { display: block !important; width: 100% !important; }
.ndc-content input:focus, .ndc-content select:focus, .ndc-content textarea:focus {
    outline: 3px solid var(--ndc-accent-ring);
    outline-offset: 0;
    border-color: var(--ndc-accent);
}
.ndc-content .sp-form-button { margin-top: 22px; }
.ndc-content .sp-input-container > .sp\:mt-3 { margin-bottom: 4px; }

/* Priority select tinted with the chosen priority's colour (set by neurodivercity.js). */
.ndc-content select.ndc-tinted {
    border-color: color-mix(in srgb, var(--pill) 45%, var(--ndc-surface));
    background-color: color-mix(in srgb, var(--pill) 10%, var(--ndc-surface));
    color: color-mix(in srgb, var(--pill) 70%, var(--ndc-text));
    font-weight: 600;
}

.ndc-formgrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }

/* Steps */
.ndc-steps { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: none; }
.ndc-step { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--ndc-subtle); font-size: 13px; }
.ndc-step::after { content: ""; flex: 1; height: 1px; min-width: 16px; background: var(--ndc-border); }
.ndc-step:last-child { flex: 0 1 auto; }
.ndc-step:last-child::after { display: none; }
.ndc-step-num {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: 1.5px solid var(--ndc-input-border);
    border-radius: 50%;
    background: var(--ndc-surface);
    font-size: 12px;
    font-weight: 700;
}
.ndc-step-num svg.ndc-i { width: 14px; height: 14px; }
.ndc-step-label { white-space: nowrap; }
.ndc-step-current { color: var(--ndc-text); font-weight: 600; }
.ndc-step-current .ndc-step-num { border-color: var(--ndc-accent); background: var(--ndc-accent); color: #fff; }
.ndc-step-done { color: var(--ndc-muted); }
.ndc-step-done .ndc-step-num { border-color: var(--ndc-accent); color: var(--ndc-accent); }

/* Department tiles */
/* At most four columns, each at least 260px wide. */
.ndc-deptgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(260px, (100% - 48px) / 4)), 1fr)); gap: 16px; margin: 0 0 8px; }
.ndc-department {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 4px;
    align-content: start;
    padding: 20px;
    padding-inline-end: 36px;
    box-sizing: border-box;
    background: var(--ndc-surface);
    border: 1px solid var(--ndc-border);
    border-radius: 12px;
    text-align: start;
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s;
}
.ndc-body .ndc-department, .ndc-body .ndc-department:hover { color: var(--ndc-text); }
a.ndc-department:hover { border-color: var(--ndc-accent-line); transform: translateY(-1px); }
.ndc-department.selected { padding: 19px; padding-inline-end: 35px; border: 2px solid var(--ndc-accent); background: var(--ndc-accent-soft); }
.ndc-department .ndc-icon {
    grid-row: span 2;
    width: 44px;
    height: 44px;
    margin: 0;
    border-radius: 12px;
    background: var(--ndc-accent-soft);
    color: var(--ndc-accent);
}
.ndc-department.selected .ndc-icon { background: var(--ndc-surface); }
.ndc-department strong { display: block; align-self: center; font-size: 15px; line-height: 1.3; text-wrap: balance; }
.ndc-department small { display: block; color: var(--ndc-muted); font-size: 13px; line-height: 1.55; }
.ndc-department-tick {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ndc-accent);
    color: #fff;
}
.ndc-department-tick svg.ndc-i { width: 12px; height: 12px; stroke-width: 3; }

/* Guidance panels */
.ndc-guide { padding: 20px; border-radius: var(--ndc-radius); font-size: 13px; }
.ndc-guide h2 { font-size: 15px; margin-bottom: 14px; }
.ndc-guide ul { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ndc-guide-priorities { background: var(--ndc-surface-2); border: 1px solid var(--ndc-border); }
.ndc-guide-priorities li { display: flex; gap: 12px; align-items: flex-start; }
.ndc-guide-priorities b { display: block; color: var(--ndc-text); }
.ndc-guide-priorities small { display: block; margin-top: 2px; color: var(--ndc-muted); font-size: 12px; line-height: 1.5; }
.ndc-ring {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-top: 2px;
    box-sizing: border-box;
    border: 3px solid color-mix(in srgb, var(--ring) 35%, var(--ndc-surface));
    border-radius: 50%;
    background: var(--ring);
}
.ndc-guide-helpful { background: var(--ndc-accent-soft); border: 1px solid color-mix(in srgb, var(--ndc-accent) 15%, var(--ndc-surface)); }
.ndc-guide-helpful h2 { color: var(--ndc-accent); }
.ndc-guide-helpful ul { gap: 10px; }
.ndc-guide-helpful li { display: flex; gap: 10px; align-items: flex-start; color: var(--ndc-body); line-height: 1.45; }
.ndc-guide-helpful svg.ndc-i { width: 16px; height: 16px; margin-top: 1px; color: var(--ndc-accent); stroke-width: 2.5; }

/* --------------------------------------------------------------------------
 * Ticket view
 * ----------------------------------------------------------------------- */

.ndc-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 12px; margin: 0; font-size: 13px; }
.ndc-facts dt { color: var(--ndc-subtle); }
.ndc-facts dd { margin: 0; color: var(--ndc-text); font-weight: 500; text-align: end; }
.ndc-facts-sla { display: flex; align-items: center; gap: 6px; }

.ndc-content .sp-messages-container { margin: 0; padding: 0; }
.ndc-content .sp-messages-container::before, .ndc-content .sp-messages-container::after { display: none; }
.ndc-content .sp-message { display: flex; gap: 14px; padding: 0; margin-bottom: 14px; border: 0; background: none; }
.ndc-content .sp-message:last-child { margin-bottom: 0; }
.ndc-msg-avatar img { width: 38px; height: 38px; max-width: none; border-radius: 50%; }
.ndc-content .ndc-msg-card { min-width: 0; border: 1px solid var(--ndc-border); border-radius: 12px; background: var(--ndc-surface); }
.ndc-content .sp-message-header, .ndc-content .sp-message-header .sp-description { margin: 0; padding: 0; border: 0; background: none; }
.ndc-content .sp-message-header .ndc-msghead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px 0; }
.ndc-content .sp-message .sp-name { font-size: 14px; font-weight: 700; }
.ndc-content .sp-message .sp-name.ndc-operator { color: var(--ndc-text); }
.ndc-content .sp-message .sp-name.ndc-user { color: var(--ndc-text); }
.ndc-msgdate { color: var(--ndc-subtle); font-size: 12px; white-space: nowrap; }
.ndc-content .ndc-msg-card > div:nth-child(2) { padding: 8px 16px 14px; }
.ndc-content .sp-message-text { color: var(--ndc-body); font-size: 14px; line-height: 1.6; }
.ndc-content .sp-message-collapsed .ndc-msg-card { background: var(--ndc-surface-2); }

.ndc-reply { margin-top: 20px; border: 1px solid var(--ndc-border); border-radius: 12px; padding: 0 16px 16px; }
.ndc-reply.ndc-reply-first { margin: 0 0 20px; }
.ndc-reply-tabs { display: flex; gap: 4px; margin: 0 -16px 14px; padding: 0 12px; border-bottom: 1px solid var(--ndc-border); }
.ndc-reply-tab { padding: 12px 6px; margin: 0 6px -1px; color: var(--ndc-muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.ndc-reply-tab.current { color: var(--ndc-text); box-shadow: inset 0 -2px 0 var(--ndc-accent); }
.ndc-reply-tab:hover { color: var(--ndc-accent); }
.ndc-reply .sp-form-row { margin-bottom: 0; }
.ndc-reply-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
/* The toolbar's attachment label is replaced by the "Add attachment" tab (a label for the same input). */
.ndc-reply label.sp-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ndc-reply label.sp-file-input + .sp-draft-options.sp\:hidden, .ndc-reply .sp-editor-container > .sp\:flex:has(> label.sp-file-input:only-child) { display: none; }
/* The in-form resolve button stays in the DOM (ticket.js binds to it) but is triggered from the page header. */
.ndc-reply .sp-mark-resolved { display: none !important; }

.ndc-feedback { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; text-align: center; }
.ndc-feedback a { display: block; padding: 12px; border: 1px solid var(--ndc-border); border-radius: 11px; color: var(--ndc-text); text-decoration: none; }
.ndc-feedback a:hover { border-color: var(--ndc-accent-line); }

/* --------------------------------------------------------------------------
 * Ticket list & manager overview
 * ----------------------------------------------------------------------- */

.ndc-filterrow { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.ndc-filterrow input { flex: 1; min-width: 180px; }

.ndc-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.ndc-stats > .ndc-panel { margin-top: 0; }
.ndc-stat { display: block; padding: 18px; }
.ndc-body a.ndc-stat, .ndc-body a.ndc-stat:hover { color: inherit; text-decoration: none; }
a.ndc-stat:hover { border-color: var(--ndc-accent-line); }
.ndc-stat.current { border: 2px solid var(--ndc-accent); padding: 17px; }
.ndc-stat span { display: flex; align-items: center; gap: 7px; color: var(--ndc-muted); font-size: 12px; }
.ndc-stat strong { display: block; margin-top: 7px; color: var(--ndc-text-strong); font-size: 28px; line-height: 1.1; }
.ndc-managerfilters { display: grid; grid-template-columns: minmax(190px, 2fr) repeat(3, minmax(125px, 1fr)) auto; gap: 10px; margin: 18px 0; }
.ndc-managerfilters input, .ndc-managerfilters select { width: 100%; min-width: 0; }

.ndc-content .pagination, .ndc-content .sp-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.ndc-content .pagination li > *, .ndc-content .sp-pagination li > * { display: block; padding: 6px 11px; border: 1px solid var(--ndc-border); border-radius: 8px; text-decoration: none; }
.ndc-content .pagination li.active > *, .ndc-content .sp-pagination li.active > * { background: var(--ndc-accent); border-color: var(--ndc-accent); color: #fff; }

/* --------------------------------------------------------------------------
 * Top bar search, sections
 * ----------------------------------------------------------------------- */

.ndc-top-search { display: none; }
.ndc-section { margin-top: 26px; }
.ndc-section > h2 { margin-bottom: 12px; font-size: 18px; }
.ndc-panel-list { padding-block: 6px; }
.ndc-tone-6 { color: #64748b; background: color-mix(in srgb, #64748b 12%, var(--ndc-surface)); }
.ndc-row-chevron { width: 16px; height: 16px; color: var(--ndc-subtle); }

/* Category cards: tile, text, chevron. */
.ndc-content a.ndc-category { display: flex; align-items: flex-start; gap: 14px; padding: 18px; }
.ndc-category .ndc-tile { width: 44px; height: 44px; border-radius: 12px; }
.ndc-category .ndc-tile svg.ndc-i { width: 22px; height: 22px; }
.ndc-category-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ndc-content .ndc-category strong { margin: 0; }
.ndc-category-desc { color: var(--ndc-muted); font-size: 12px; line-height: 1.45; }
.ndc-category small { margin-top: 8px; }
.ndc-category-chevron { align-self: flex-end; width: 16px; height: 16px; color: var(--ndc-subtle); }

/* Featured articles */
.ndc-featured { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ndc-featured-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--ndc-surface);
    border: 1px solid var(--ndc-border);
    border-radius: var(--ndc-radius);
    box-shadow: var(--ndc-shadow);
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s;
}
.ndc-body .ndc-featured-card, .ndc-body .ndc-featured-card:hover { color: var(--ndc-text); }
.ndc-featured-card:hover { border-color: var(--ndc-accent-line); transform: translateY(-1px); }
.ndc-featured-media { display: grid; place-items: center; height: 130px; }
.ndc-featured-media img { width: 100%; height: 100%; object-fit: cover; }
.ndc-featured-media svg.ndc-i { width: 40px; height: 40px; }
.ndc-featured-body { padding: 14px 40px 16px 16px; }
.ndc-featured-body strong { display: block; font-size: 14px; }
.ndc-featured-body small { display: block; margin-top: 4px; color: var(--ndc-muted); font-size: 12px; line-height: 1.45; }
.ndc-featured-chevron { position: absolute; bottom: 16px; inset-inline-end: 14px; width: 16px; height: 16px; color: var(--ndc-subtle); }

/* Tags and chips */
.ndc-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
}
.ndc-pagehead .ndc-tag { margin-bottom: 10px; }
.ndc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.ndc-chosen-department { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--ndc-border); border-radius: var(--ndc-radius-sm); background: var(--ndc-accent-soft); }
.ndc-chosen-department-text { display: grid; flex: 1; min-width: 0; }
.ndc-chosen-department-text small { color: var(--ndc-muted); font-size: 12px; }
.ndc-chosen-department-text strong { font-size: 15px; }
.ndc-form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ndc-cc-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--ndc-accent-soft); color: var(--ndc-accent); font-size: 11px; font-weight: 600; vertical-align: 1px; }
.ndc-cc-by { display: block; margin-top: 2px; color: var(--ndc-muted); font-size: 12px; }
.ndc-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--ndc-border);
    border-radius: 10px;
    background: var(--ndc-surface);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.ndc-body .ndc-chip { color: var(--ndc-body); }
.ndc-body .ndc-chip:hover { border-color: var(--ndc-accent-line); color: var(--ndc-accent); }
.ndc-body .ndc-chip.current { background: var(--ndc-accent); border-color: var(--ndc-accent); color: #fff; }
.ndc-chip.current .ndc-count { background: #fff; color: var(--ndc-accent); }

/* Announcement cards */
.ndc-content ul.ndc-news { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ndc-content ul.ndc-news > li { margin: 0; padding: 0; border: 0; }
.ndc-news-link {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 18px 14px 14px;
    background: var(--ndc-surface);
    border: 1px solid var(--ndc-border);
    border-radius: var(--ndc-radius);
    box-shadow: var(--ndc-shadow);
    text-decoration: none;
    transition: border-color 0.15s;
}
.ndc-body .ndc-news-link, .ndc-body .ndc-news-link:hover { color: var(--ndc-text); }
.ndc-news-link:hover { border-color: var(--ndc-accent-line); }
.ndc-news-tile { display: grid; place-items: center; flex-shrink: 0; width: 76px; height: 76px; border-radius: 12px; }
.ndc-news-tile svg.ndc-i { width: 34px; height: 34px; }
.ndc-news-tile i.ndc-i { font-size: 26px; }
.ndc-news-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ndc-news-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ndc-news-date { color: var(--ndc-subtle); font-size: 12px; white-space: nowrap; }
.ndc-news-body strong { font-size: 16px; letter-spacing: -0.2px; }
.ndc-news-excerpt { color: var(--ndc-muted); font-size: 13px; line-height: 1.55; }
.ndc-news-chevron { width: 18px; height: 18px; color: var(--ndc-subtle); }
.ndc-rss { margin: 14px 0 0; font-size: 12px; text-align: center; }
.ndc-body .ndc-rss a { color: var(--ndc-subtle); }

/* Subscribe */
.ndc-subscribe-form { display: inline; margin: 0; }
.ndc-content .ndc-subscribe-form button[type=submit].ndc-btn-outline {
    border-color: var(--ndc-accent-line);
    background: var(--ndc-surface);
    color: var(--ndc-accent);
}
.ndc-content .ndc-subscribe-form button[type=submit].ndc-btn-outline:hover { background: var(--ndc-accent-soft); color: var(--ndc-accent); }
.ndc-subscribe { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--ndc-radius); background: var(--ndc-accent-soft); border: 1px solid color-mix(in srgb, var(--ndc-accent) 15%, var(--ndc-surface)); }
.ndc-subscribe-banner { margin-top: 18px; }
.ndc-subscribe-icon { color: var(--ndc-accent); }
.ndc-subscribe-icon svg.ndc-i { width: 26px; height: 26px; }
.ndc-subscribe-text { flex: 1; min-width: 0; }
.ndc-subscribe-text strong { display: block; color: var(--ndc-text-strong); font-size: 14px; }
.ndc-subscribe-text p { margin: 3px 0 0; color: var(--ndc-muted); font-size: 12px; line-height: 1.5; }
.ndc-subscribe-panel { flex-wrap: wrap; align-items: flex-start; }
.ndc-subscribe-panel .ndc-subscribe-text { flex-basis: calc(100% - 42px); }
.ndc-subscribe-panel .ndc-subscribe-form, .ndc-subscribe-panel > a { flex-basis: 100%; }
.ndc-subscribe-panel button, .ndc-subscribe-panel > a { width: 100%; }

/* --------------------------------------------------------------------------
 * Article pages
 * ----------------------------------------------------------------------- */

.ndc-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--ndc-muted); font-size: 13px; }
.ndc-meta li { display: inline-flex; align-items: center; gap: 6px; }

.ndc-article-layout { display: grid; gap: 20px; align-items: start; }
.ndc-article-layout-kb { grid-template-columns: minmax(0, 1fr) 300px; }
.ndc-article-layout-news { grid-template-columns: minmax(0, 1fr) 290px; }
.ndc-article-main { min-width: 0; display: grid; gap: 18px; }
.ndc-article-main > .ndc-panel + .ndc-panel { margin-top: 0; }
.ndc-article-toc, .ndc-article-side { display: grid; gap: 18px; position: sticky; top: calc(var(--ndc-top-h) + 20px); }
.ndc-article-toc > *, .ndc-article-side > * { margin: 0; }

.ndc-toc h3, .ndc-article-side h3 { margin: 0 0 12px; font-size: 14px; }
.ndc-toc ol { margin: 0; padding-inline-start: 18px; display: grid; gap: 8px; font-size: 13px; }
.ndc-body .ndc-toc a { color: var(--ndc-accent); text-decoration: none; }
.ndc-body .ndc-toc a:hover { text-decoration: underline; }

.ndc-helpful { display: grid; gap: 10px; font-size: 13px; font-weight: 600; }
.ndc-helpful-row .ndc-helpful { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ndc-helpful-buttons { display: flex; gap: 8px; }
.ndc-content .ndc-helpful .sp-rate-article {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--ndc-input-border);
    border-radius: 9px;
    background: var(--ndc-surface);
    color: var(--ndc-muted);
    box-shadow: none;
    cursor: pointer;
}
.ndc-content .ndc-helpful .sp-rate-article[data-rating="1"]:hover, .ndc-content .ndc-helpful .sp-rate-article[data-rating="1"].selected { border-color: #16a34a; color: #16a34a; }
.ndc-content .ndc-helpful .sp-rate-article[data-rating="0"]:hover, .ndc-content .ndc-helpful .sp-rate-article[data-rating="0"].selected { border-color: var(--ndc-accent); color: var(--ndc-accent); }
.ndc-content .ndc-helpful .sp-rate-article.selected { background: var(--ndc-surface-2); }

.ndc-content ul.ndc-related { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ndc-related a { display: flex; align-items: center; gap: 12px; padding: 8px 0; text-decoration: none; }
.ndc-body .ndc-related a { color: var(--ndc-text); }
.ndc-related a > span:not(.ndc-tile) { flex: 1; min-width: 0; }
.ndc-related strong { display: block; font-size: 13px; font-weight: 500; line-height: 1.4; }
.ndc-related small { display: block; margin-top: 2px; color: var(--ndc-subtle); font-size: 12px; }
.ndc-related a:hover strong { color: var(--ndc-accent); }
.ndc-related .ndc-tile { width: 32px; height: 32px; border-radius: 8px; }
.ndc-related .ndc-tile svg.ndc-i { width: 16px; height: 16px; }
.ndc-related > li > a > svg.ndc-i { width: 15px; height: 15px; color: var(--ndc-subtle); }

.ndc-need-help h2 { display: flex; align-items: center; gap: 8px; }
.ndc-need-help p { margin: 0 0 14px; color: var(--ndc-body); font-size: 13px; }
.ndc-need-help .ndc-btn { width: 100%; box-sizing: border-box; }

.ndc-callout { display: flex; gap: 14px; margin-top: 24px; padding: 18px 20px; border-radius: 12px; }
.ndc-callout > svg.ndc-i { width: 26px; height: 26px; flex-shrink: 0; }
.ndc-callout p { margin: 4px 0 14px; font-size: 13px; }
.ndc-callout-info { background: var(--ndc-info-bg); color: var(--ndc-info-text); }
.ndc-callout-info > svg.ndc-i { color: #2563eb; }
.ndc-callout strong { color: var(--ndc-text); }

/* Article card: generous padding, a comfortable reading width, and "was this helpful?" at the foot. */
.ndc-content .ndc-article-card { padding: 36px 44px; }
.ndc-article-foot { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--ndc-border-soft); }
.ndc-article-foot .ndc-helpful { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; font-size: 14px; }
.ndc-content .ndc-article-foot .ndc-helpful .sp-rate-article { gap: 8px; width: auto; height: 38px; padding: 0 16px; font-size: 13px; font-weight: 600; }

/* Article body typography */
.ndc-content .sp-article { max-width: 72ch; font-size: 16px; line-height: 1.75; overflow-wrap: break-word; }
.ndc-content .sp-article > :first-child { margin-top: 0; }
.ndc-content .sp-article > :last-child { margin-bottom: 0; }
.ndc-content .sp-article p { margin: 0 0 1.1em; }
.ndc-content .sp-article h2 { margin: 1.8em 0 0.5em; color: var(--ndc-text-strong); font-size: 21px; line-height: 1.3; scroll-margin-top: calc(var(--ndc-top-h) + 16px); }
.ndc-content .sp-article h3 { margin: 1.5em 0 0.4em; color: var(--ndc-text-strong); font-size: 17px; line-height: 1.35; scroll-margin-top: calc(var(--ndc-top-h) + 16px); }
.ndc-content .sp-article ul, .ndc-content .sp-article ol { margin: 0 0 1.1em; padding-inline-start: 1.4em; }
.ndc-content .sp-article li { margin: 0.35em 0; padding-inline-start: 0.2em; }
.ndc-content .sp-article li::marker { color: var(--ndc-accent); font-weight: 700; }
.ndc-body .ndc-content .sp-article a { color: var(--ndc-accent); font-weight: 500; text-decoration: underline; text-decoration-color: var(--ndc-accent-line);
                                       text-decoration-thickness: 1.5px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.ndc-body .ndc-content .sp-article a:hover { text-decoration-color: currentColor; }
.ndc-content .sp-article hr { margin: 2em 0; border: 0; border-top: 1px solid var(--ndc-border); }
.ndc-content .sp-article strong { color: var(--ndc-text); }
.ndc-content .sp-article img { border-radius: 12px; }
.ndc-content .sp-article blockquote {
    margin: 20px 0;
    padding: 18px 20px;
    border: 0;
    border-radius: 12px;
    background: color-mix(in srgb, #16a34a 9%, var(--ndc-surface));
    color: var(--ndc-text);
    font-weight: 600;
}
.ndc-content .sp-article code { padding: 2px 6px; border-radius: 6px; background: var(--ndc-surface-2); font-size: 0.9em; }
.ndc-content .sp-article table { width: 100%; border-collapse: collapse; }
.ndc-content .sp-article th, .ndc-content .sp-article td { padding: 8px 10px; border: 1px solid var(--ndc-border); }

/* --------------------------------------------------------------------------
 * Article comments
 * ----------------------------------------------------------------------- */

.ndc-count-muted { margin-inline-start: 6px; background: var(--ndc-surface-2); color: var(--ndc-muted); vertical-align: 2px; }
.ndc-comments .ndc-panelhead { margin-bottom: 16px; }
.ndc-comments .ndc-panelhead select { padding: 6px 10px; font-size: 12px; }

/* Avatars in SupportPal's tables (e.g. organisation members): small and round. The theme's image rules would otherwise
   let them fill the cell. */
.ndc-content table img.sp-avatar { width: 32px; height: 32px; max-width: none; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.ndc-comment-avatar { flex-shrink: 0; width: 36px; height: 36px; max-width: none; border-radius: 50%; }
.ndc-comment-avatar-blank { display: grid; place-items: center; background: var(--ndc-surface-2); color: var(--ndc-subtle); }
.ndc-comment-avatar-blank svg.ndc-i { width: 18px; height: 18px; }

.ndc-content .ndc-comment-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 10px;
    border: 1px solid var(--ndc-border);
    border-radius: 12px;
    background: var(--ndc-surface-2);
    color: var(--ndc-subtle);
    font-size: 14px;
    font-weight: 400;
    cursor: text;
}
.ndc-content .ndc-comment-prompt:hover { border-color: var(--ndc-accent-line); }
.ndc-comment-prompt-text { flex: 1; }
.ndc-comment-prompt .fa-solid { font-size: 12px; }
.ndc-comment-form-wrap { margin-top: 12px; }

.ndc-comment-form .sp-form-row { margin-bottom: 12px; }
.ndc-content .ndc-comment-form textarea, .ndc-content .ndc-comment-form .tox-tinymce { min-height: 110px; border: 1px solid var(--ndc-input-border); border-radius: var(--ndc-radius-sm); background: var(--ndc-surface); }
.ndc-comment-captcha input { max-width: 260px; }
.ndc-replying-to { align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; background: var(--ndc-accent-soft); font-size: 13px; }
.ndc-replying-to[style*="block"] { display: flex !important; }
.ndc-comment-form-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; }
.ndc-comment-form-foot .sp-form-button { margin: 0 0 0 auto; }
.ndc-check { display: inline-flex; align-items: center; gap: 8px; color: var(--ndc-muted); font-size: 13px; cursor: pointer; }
.ndc-comment-captcha { flex-basis: 100%; }

.ndc-content .ndc-link-button {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--ndc-accent);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ndc-content .sp-comments-block { margin-top: 20px; }
.ndc-comment { display: flex; gap: 12px; padding: 16px 0; border-top: 1px solid var(--ndc-border-soft); }
.ndc-comment-reply { padding: 12px 0 0; border-top: 0; }
.ndc-comment-reply .ndc-comment-avatar { width: 28px; height: 28px; }
.ndc-comment-body { flex: 1; min-width: 0; }
.ndc-content .ndc-comment-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.ndc-comment-head .sp-name { color: var(--ndc-text-strong); font-size: 14px; font-weight: 700; }
.ndc-staff {
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--ndc-accent-tint);
    color: var(--ndc-accent);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}
.ndc-comment-meta { color: var(--ndc-subtle); font-size: 12px; }
.ndc-body .ndc-comment-meta a { color: var(--ndc-muted); }
.ndc-comment-text { margin-top: 4px; color: var(--ndc-body); font-size: 14px; line-height: 1.6; }
.ndc-comment-text > :first-child { margin-top: 0; }
.ndc-comment-text > :last-child { margin-bottom: 0; }
.ndc-comment-deleted { color: var(--ndc-subtle); font-style: italic; }
.ndc-comment-collapsed { display: inline-block; margin-top: 4px; color: var(--ndc-subtle); font-size: 13px; font-style: italic; cursor: pointer; }

.ndc-comment-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; font-size: 12px; }
.ndc-vote { display: inline-flex; align-items: center; border: 1px solid var(--ndc-border); border-radius: 999px; }
.ndc-vote .sp-rate-comment { display: grid; place-items: center; width: 30px; height: 26px; color: var(--ndc-subtle); cursor: pointer; }
.ndc-vote .sp-rate-comment + .sp-rate-comment { border-inline-start: 1px solid var(--ndc-border); }
.ndc-body .ndc-vote .sp-rate-comment:hover { color: var(--ndc-text); }
/* article.js marks the user's vote with sp:text-secondary on the icon. */
.ndc-vote .sp-rate-comment[data-score="1"] i.sp\:text-secondary { color: #16a34a; }
.ndc-vote .sp-rate-comment[data-score="-1"] i.sp\:text-secondary { color: var(--ndc-accent); }
.ndc-vote .sp-comment-rating { padding: 0 10px 0 6px; color: var(--ndc-muted); font-weight: 600; }
.ndc-comment-reply-link { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; cursor: pointer; }
.ndc-body .ndc-comment-reply-link { color: var(--ndc-muted); }
.ndc-body .ndc-comment-reply-link:hover { color: var(--ndc-accent); }
.ndc-comment-reply-link svg.ndc-i { width: 14px; height: 14px; }

.ndc-comment-replies { margin-top: 4px; padding-inline-start: 14px; border-inline-start: 2px solid var(--ndc-border-soft); }
.ndc-comment-replies .ndc-comment-replies { padding-inline-start: 12px; }

/* --------------------------------------------------------------------------
 * Responsive
 * ----------------------------------------------------------------------- */

@media (min-width: 1025px) {
    .ndc-has-top-search .ndc-top-search {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 0 1 440px;
        padding: 0 14px;
        border: 1px solid var(--ndc-border);
        border-radius: 10px;
        background: var(--ndc-surface-2);
        color: var(--ndc-subtle);
    }
    .ndc-has-top-search .ndc-top-search input {
        flex: 1;
        min-width: 0;
        padding: 10px 0;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--ndc-text);
        font: inherit;
        font-size: 13px;
    }
    .ndc-has-top-search .ndc-top-search:focus-within { border-color: var(--ndc-accent-line); box-shadow: 0 0 0 3px var(--ndc-accent-ring); }
    .ndc-has-top-search .sp-search-button { display: none; }
}

@media (max-width: 1280px) {
    .ndc-article-layout-kb, .ndc-article-layout-news { grid-template-columns: minmax(0, 1fr) 270px; }
    .ndc-content .ndc-article-card { padding: 28px; }
}

@media (max-width: 960px) {
    .ndc-article-layout-kb, .ndc-article-layout-news { grid-template-columns: minmax(0, 1fr); }
    .ndc-article-toc, .ndc-article-side { position: static; }
    /* Below the article and comments on narrow screens, the contents list no longer helps. */
    .ndc-article-side .ndc-toc { display: none; }
    .ndc-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
    .ndc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ndc-cols, .ndc-formgrid { grid-template-columns: minmax(0, 1fr); }
    .ndc-cols > .ndc-panel + .ndc-panel { margin-top: 0; }
    .ndc-columns { flex-direction: column; align-items: stretch; }
    .ndc-columns > .sp-sidebar, .ndc-columns > .ndc-aside { flex: 1 1 auto; width: auto; }
    .ndc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ndc-managerfilters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Error pages (403): lock icon beside the reason and the ways forward. */
.ndc-error-page { display: flex; align-items: flex-start; gap: 20px; max-width: 640px; padding: 8px 0; }
.ndc-error-icon { display: grid; flex-shrink: 0; place-items: center; width: 52px; height: 52px; border-radius: var(--ndc-radius-sm); background: var(--ndc-accent-tint); color: var(--ndc-accent); }
.ndc-error-icon svg.ndc-i { width: 24px; height: 24px; }
.ndc-error-text { display: grid; gap: 8px; min-width: 0; }
.ndc-error-reason { margin: 0; color: var(--ndc-text-strong); font-size: 16px; font-weight: 600; line-height: 1.45; }
.ndc-error-text .ndc-hint { margin: 0; font-size: 14px; line-height: 1.5; }
.ndc-error-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ndc-error-actions a { display: inline-flex; align-items: center; gap: 8px; }
.ndc-error-actions svg.ndc-i { width: 16px; height: 16px; }
@media (max-width: 560px) {
    .ndc-error-page { flex-direction: column; gap: 14px; }
}

@media (max-width: 1024px) {
    .ndc-app { --ndc-side-w: 212px; }
    .ndc-content { padding: 26px 24px 34px; }
    .ndc-hero { margin: -26px -24px 0; padding: 28px 24px 4px; }
    .ndc-top, .ndc-top .sp-search { padding: 0 24px; }
}

/* Phone: off-canvas sidebar ("More"), brand in the top bar, bottom tab bar. */
@media (max-width: 760px) {
    .ndc-sidebar {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        --ndc-side-w: 272px;
        width: 272px;
        transform: translateX(-100%);
        transition: transform 0.2s;
        z-index: 60;
    }
    [dir=rtl] .ndc-sidebar { transform: translateX(100%); }

    /* Sub-menus open in place. */
    .ndc-sub { position: static; min-width: 0; max-width: none; max-height: none; margin: 4px 0 2px; padding: 0 0 0 30px; overflow: visible;
               border: 0; border-radius: 0; background: none; box-shadow: none; }
    [dir=rtl] .ndc-sub { padding: 0 30px 0 0; }
    .ndc-sub-title { display: none; }
    .ndc-sub-group { color: var(--ndc-side-muted); }
    .ndc-body .ndc-nav .ndc-sub a { color: var(--ndc-side-text); }
    .ndc-body .ndc-nav .ndc-sub a:hover, .ndc-body .ndc-nav .ndc-sub a:focus-visible { background: rgb(255 255 255 / 0.06); color: #fff; }
    .ndc-body .ndc-nav .ndc-sub a.current { background: rgb(255 255 255 / 0.1); color: #fff; }
    .ndc-nav .ndc-sub svg.ndc-i { color: var(--ndc-side-muted); }
    .ndc-has-sub.ndc-sub-open .ndc-sub-toggle svg.ndc-i { transform: rotate(90deg); }
    .ndc-app.ndc-open .ndc-sidebar { transform: translateX(0); }
    .ndc-app.ndc-open .ndc-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgb(12 19 29 / 0.45); }

    .ndc-top { min-height: 58px; padding: 0 16px; gap: 6px; }
    .ndc-top .sp-search { padding: 0 16px; }
    .ndc-top-brand { display: block; padding: 0; font-size: min(22px, calc(52vw * 1.6 / var(--ndc-wordmark-len, 7))); }
    .ndc-body .ndc-top-brand, .ndc-body .ndc-top-brand:hover { color: var(--ndc-text-strong); }
    .ndc-top-brand img { max-height: 30px; }
    .sp-theme-dark .ndc-top-brand img { filter: none; }
    .ndc-status, .ndc-username, .ndc-user .ndc-chevron { display: none; }
    .ndc-user { padding: 0; }
    .ndc-user img { width: 32px; height: 32px; }

    .ndc-content { padding: 20px 16px calc(var(--ndc-tabbar-h) + 28px + env(safe-area-inset-bottom, 0px)); }
    .ndc-hero { margin: -20px -16px 0; padding: 24px 16px 2px; }
    .ndc-hero h1 { font-size: 25px; }
    .ndc-hero-sub { font-size: 15px; margin-bottom: 16px; }
    .ndc-content h1, .ndc-ticket-number { font-size: 23px; }
    .ndc-panel { padding: 16px; }
    .ndc-crumbs { font-size: 12px; }

    /* Home quick links become full-width rows. */
    .ndc-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .ndc-card { flex-direction: row; align-items: center; min-height: 0; padding: 14px 16px; gap: 14px; }
    .ndc-card small { display: none; }
    .ndc-card-text { flex: 1; }
    .ndc-card-badge { position: static; }
    .ndc-card-chevron { display: block; width: 18px; height: 18px; color: var(--ndc-subtle); }

    .ndc-content .ndc-article-card { padding: 20px; }
    .ndc-content .sp-article { font-size: 15px; }
    .ndc-deptgrid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .ndc-department { padding: 16px; padding-inline-end: 32px; }
    .ndc-department.selected { padding: 15px; padding-inline-end: 31px; }
    .ndc-categorygrid, .ndc-featured { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .ndc-news-link { gap: 12px; padding: 12px; }
    .ndc-news-tile { width: 52px; height: 52px; }
    .ndc-news-tile svg.ndc-i { width: 24px; height: 24px; }
    .ndc-news-body strong { font-size: 15px; }
    .ndc-news-chevron { display: none; }
    .ndc-subscribe-banner { flex-wrap: wrap; }
    .ndc-subscribe-banner .ndc-subscribe-text { flex-basis: calc(100% - 42px); }
    .ndc-subscribe-banner .ndc-subscribe-form, .ndc-subscribe-banner > a { flex-basis: 100%; }
    .ndc-subscribe-banner button, .ndc-subscribe-banner > a.ndc-btn { width: 100%; }
    .ndc-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
    .ndc-chip { flex-shrink: 0; }
    .ndc-steps .ndc-step-label { display: none; }
    .ndc-steps .ndc-step-current .ndc-step-label { display: inline; }
    .ndc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ndc-managerfilters { grid-template-columns: minmax(0, 1fr); }
    .ndc-feedback { grid-template-columns: minmax(0, 1fr); }
    .ndc-hide-sm { display: none; }
    .ndc-pagehead-row .ndc-actions { width: 100%; }
    .ndc-pagehead-row .ndc-actions .ndc-btn-outline { flex: 1; }

    .ndc-tabbar {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 50;
        display: flex;
        height: calc(var(--ndc-tabbar-h) + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-sizing: border-box;
        background: var(--ndc-surface);
        border-top: 1px solid var(--ndc-border);
        box-shadow: 0 -4px 16px rgb(16 24 40 / 0.05);
    }
    .ndc-tabbar > a, .ndc-tabbar > button {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
        color: var(--ndc-muted);
        font: inherit;
        font-size: 11px;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
    }
    .ndc-body .ndc-tabbar > a { color: var(--ndc-muted); }
    .ndc-body .ndc-tabbar > a.current { color: var(--ndc-accent); }
    .ndc-tabbar svg.ndc-i { width: 22px; height: 22px; }
    .ndc-tabbar .ndc-dot-badge { top: 6px; inset-inline-end: calc(50% - 22px); }
}

/* Small chips (organisation, two-factor status, member count) */
.ndc-chip.ndc-chip-sm { gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--ndc-surface-2); color: var(--ndc-body); font-size: 12px; font-weight: 600; }
.ndc-chip-sm svg.ndc-i { width: 14px; height: 14px; }
.ndc-chip-sm.ndc-chip-good { border-color: color-mix(in srgb, var(--ndc-online) 30%, var(--ndc-surface)); background: color-mix(in srgb, var(--ndc-online) 10%, var(--ndc-surface)); color: var(--ndc-online); }
.ndc-chip-sm.ndc-chip-warn { border-color: color-mix(in srgb, #d97706 30%, var(--ndc-surface)); background: color-mix(in srgb, #d97706 10%, var(--ndc-surface)); color: #b45309; }

/* Profile */
.ndc-profile { display: grid; gap: 20px; }
.ndc-content .ndc-profile-hero.sp-form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin: 0; }
.ndc-profile-photo { position: relative; flex-shrink: 0; cursor: pointer; }
.ndc-profile-photo img.sp-avatar { display: block; width: 84px; height: 84px; border-radius: 50%; box-shadow: 0 0 0 4px var(--ndc-surface), 0 0 0 5px var(--ndc-border); }
.ndc-profile-photo-edit { position: absolute; inset-inline-end: -2px; bottom: -2px; display: grid; place-items: center; width: 30px; height: 30px;
                          border: 3px solid var(--ndc-surface); border-radius: 50%; background: var(--ndc-accent); color: #fff; }
.ndc-profile-photo-edit svg.ndc-i { width: 14px; height: 14px; }
.ndc-profile-photo:hover .ndc-profile-photo-edit { background: var(--ndc-accent-dark); }
.ndc-profile-id { flex: 1 1 260px; min-width: 0; }
.ndc-profile-id h2 { margin: 0; color: var(--ndc-text-strong); font-size: 22px; line-height: 1.25; }
.ndc-profile-id p { margin: 2px 0 10px; color: var(--ndc-muted); font-size: 14px; overflow-wrap: anywhere; }
.ndc-profile-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ndc-profile-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ndc-profile-photo-actions .sp-button { margin: 0; }

.ndc-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.ndc-profile-col { display: grid; gap: 20px; min-width: 0; }
.ndc-profile-col > .ndc-panel + .ndc-panel { margin-top: 0; }
.ndc-profile-card > header { display: flex; align-items: flex-start; gap: 14px; margin: -2px 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--ndc-border-soft); }
.ndc-profile-card > header .ndc-icon { flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; background: var(--ndc-accent-soft); color: var(--ndc-accent); }
.ndc-profile-card > header .ndc-icon svg.ndc-i { width: 19px; height: 19px; }
.ndc-profile-card > header h2 { margin: 0; font-size: 16px; }
.ndc-profile-card > header p { margin: 2px 0 0; color: var(--ndc-muted); font-size: 13px; }
.ndc-profile-card > .sp-form-row:last-child, .ndc-profile-card > .ndc-profile-org > .sp-form-row:last-child { margin-bottom: 0; }
.ndc-form-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0 16px; }
.ndc-profile-org .sp-input-container br { display: none; }
.ndc-profile-org .sp-input-container .sp-button { margin: 12px 8px 0 0; }

.ndc-setting-list { display: grid; margin: 0; padding: 0; list-style: none; }
.ndc-setting-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 0; border-top: 1px solid var(--ndc-border-soft); }
.ndc-setting-list li:first-child { padding-top: 0; border-top: 0; }
.ndc-setting-list li:last-child { padding-bottom: 0; }
.ndc-setting-text { display: grid; gap: 2px; flex: 1 1 220px; }
.ndc-setting-text strong { color: var(--ndc-text); font-size: 14px; }
.ndc-setting-text small { color: var(--ndc-muted); font-size: 13px; }
.ndc-setting-list .sp-button { margin: 0; }

.ndc-segmented { display: inline-flex; flex-wrap: wrap; padding: 3px; border: 1px solid var(--ndc-border); border-radius: 10px; background: var(--ndc-surface-2); }
.ndc-content .ndc-segmented label { position: relative; margin: 0; font-weight: 500; cursor: pointer; }
.ndc-segmented input { position: absolute; opacity: 0; pointer-events: none; }
.ndc-segmented span { display: block; padding: 7px 14px; border-radius: 7px; color: var(--ndc-muted); font-size: 13px; }
.ndc-segmented input:checked + span { background: var(--ndc-surface); color: var(--ndc-text); font-weight: 600; box-shadow: 0 1px 2px rgb(16 24 40 / 0.1); }
.ndc-segmented input:focus-visible + span { outline: 2px solid var(--ndc-accent); outline-offset: 1px; }
.ndc-content .sp-form-row > .sp-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }

.ndc-savebar { position: sticky; bottom: 16px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
               padding: 12px 12px 12px 20px; border: 1px solid var(--ndc-border); border-radius: var(--ndc-radius); background: var(--ndc-surface);
               box-shadow: 0 8px 24px rgb(16 24 40 / 0.1); }
.ndc-savebar > span { color: var(--ndc-muted); font-size: 13px; }
.ndc-savebar input[type=submit] { margin: 0; }

/* Organisation pages */
.ndc-org-body { padding-top: 18px; }
.ndc-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ndc-toolbar-end { justify-content: flex-end; }
.ndc-toolbar .ndc-btn { display: inline-flex; align-items: center; gap: 8px; }
.ndc-toolbar .ndc-btn svg.ndc-i { width: 17px; height: 17px; }
.ndc-filter { display: flex; flex: 0 1 380px; align-items: center; gap: 8px; min-width: 0; padding: 0 12px; border: 1px solid var(--ndc-input-border); border-radius: 10px; background: var(--ndc-surface); }
.ndc-filter:focus-within { border-color: var(--ndc-accent-line); box-shadow: 0 0 0 3px var(--ndc-accent-ring); }
.ndc-filter svg.ndc-i { flex-shrink: 0; width: 17px; height: 17px; color: var(--ndc-subtle); }
.ndc-content .ndc-filter input { flex: 1; min-width: 0; height: 40px; padding: 0; border: 0; background: transparent; box-shadow: none; outline: 0; color: var(--ndc-text); font-size: 14px; }
.ndc-callout.ndc-callout-compact { align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 14px; font-size: 13px; line-height: 1.55; }
.ndc-callout-compact > svg.ndc-i { width: 18px; height: 18px; margin-top: 1px; }
.ndc-org-transfer { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--ndc-border); }
.ndc-org-transfer h3 { margin: 0 0 4px; font-size: 16px; }
.ndc-org-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 20px; }
.ndc-org-form > .sp-form-row:first-of-type, .ndc-org-form > .sp-form-button, .ndc-org-form > .sp-form-full { grid-column: 1 / -1; }

@media (max-width: 1024px) {
    .ndc-profile-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .ndc-profile-hero { justify-content: center; text-align: center; }
    .ndc-profile-chips, .ndc-profile-photo-actions { justify-content: center; }
    .ndc-profile-photo-actions { width: 100%; }
    .ndc-savebar { bottom: calc(var(--ndc-tabbar-h) + 10px + env(safe-area-inset-bottom, 0px)); }
    .ndc-savebar > span { display: none; }
    .ndc-savebar input[type=submit] { width: 100%; }
    .ndc-filter { flex-basis: 100%; }
    .ndc-toolbar .ndc-btn { width: 100%; justify-content: center; }
}

@media print {
    .ndc-sidebar, .ndc-top, .ndc-tabbar { display: none; }
    .ndc-content { padding: 0; }
    .ndc-panel { border: 0; box-shadow: none; padding: 0; }
    .ndc-hero::before { display: none; }
}
