/* Qubinter v6 — site design language.
 *
 * Loaded on every public page after site-v4.css and before page stylesheets.
 * The language follows scale.com: a white page, large regular-weight headings,
 * rounded grey panels that hold one idea each, a steel-blue statement card, a
 * deep feature card, dark sections for emphasis and a black footer that ends on
 * one large line. Colours come from the brand kit (Brand Kit/README.md): Ink,
 * Steel and Slate carry the surfaces, Copper is only ever a small mark.
 * Type is Vazirmatn throughout.
 */

:root {
    --ink: #142434;
    --navy: #142434;
    --navy-2: #2b496c;
    --deep: #142434;
    --deep-2: #1b3044;
    --steel: #2b496c;
    --slate: #5b7384;
    --slate-light: #8fa5b5;
    --steel-light: #c9d6e2;
    --copper: #d6914c;
    --copper-2: #e0a66c;
    --copper-dark: #2b496c;
    --paper: #ffffff;
    --paper-2: #f3f5f7;
    --white: #fff;
    --mist: #eef1f4;
    --muted: #5b7384;
    --line: rgba(20, 36, 52, .12);
    --line-dark: rgba(255, 255, 255, .14);
    --shadow: none;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --q-night: #0d1823;
    --q-panel: #eef1f4;
    --q-sky: #8fa5b5;
    --q-font: "Vazirmatn", Tahoma, sans-serif;
    --q-ease: cubic-bezier(.2, .7, .2, 1);
    --q-r-lg: 18px;
    --q-r-md: 12px;
    --q-r-sm: 8px;
    --q-shell: min(1320px, calc(100% - var(--gutter) * 2));
}

body {
    background: #fff;
    color: var(--ink);
    font-family: var(--q-font);
    font-size: 16px;
    line-height: 1.95;
    text-rendering: optimizeLegibility;
}

button, input, select, textarea {
    font-family: inherit;
}

h1, h2, h3, h4 {
    font-family: var(--q-font);
    letter-spacing: 0;
}

::selection {
    background: var(--steel-light);
    color: var(--ink);
}

:where(a, button, input, select, textarea, [tabindex], summary):focus-visible {
    outline: 2px solid var(--copper);
    outline-offset: 3px;
}

/* The copper mark: a small square, like the tail of the Q. */
.q-mark-dot::before,
.q-label::before {
    display: inline-block;
    flex: none;
    width: 7px;
    height: 7px;
    margin-inline-end: 10px;
    background: var(--copper);
    vertical-align: .12em;
    content: "";
}

.q-label {
    display: inline-flex;
    align-items: center;
    margin: 0;
    color: var(--slate);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.6;
}

.q-on-dark .q-label,
.q-label.is-light {
    color: rgba(255, 255, 255, .7);
}

/* ---------- Type scale ---------- */

.q-display {
    margin: 0;
    font-size: clamp(38px, 5.2vw, 72px);
    font-weight: 500;
    line-height: 1.3;
    text-wrap: balance;
}

.q-h2 {
    margin: 0;
    font-size: clamp(30px, 3.4vw, 48px);
    font-weight: 500;
    line-height: 1.42;
    text-wrap: balance;
}

.q-h3 {
    margin: 0;
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 500;
    line-height: 1.55;
    text-wrap: balance;
}

.q-lede {
    margin: 0;
    color: var(--slate);
    font-size: clamp(15.5px, 1.25vw, 18px);
    line-height: 2;
    text-wrap: pretty;
}

.q-on-dark .q-lede {
    color: rgba(255, 255, 255, .7);
}

/* ---------- Buttons: label, then the arrow in its own small box ---------- */

.hp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    line-height: 1;
    white-space: nowrap;
}

.button,
.hp-btn,
.q-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 0 6px 0 18px;
    border: 1px solid var(--ink);
    border-radius: var(--q-r-sm);
    background: var(--ink);
    color: #fff;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .25s, border-color .25s, color .25s;
}

.button:not(:has(.ui-icon)),
.hp-btn:not(:has(.ui-icon)),
.q-btn:not(:has(.ui-icon)) {
    padding: 0 20px;
}

[dir="rtl"] .button,
[dir="rtl"] .hp-btn,
[dir="rtl"] .q-btn {
    padding: 0 18px 0 6px;
}

[dir="rtl"] .button:not(:has(.ui-icon)),
[dir="rtl"] .hp-btn:not(:has(.ui-icon)),
[dir="rtl"] .q-btn:not(:has(.ui-icon)) {
    padding: 0 20px;
}

.button .ui-icon,
.hp-btn .ui-icon,
.q-btn .ui-icon {
    width: 34px;
    height: 34px;
    flex: none;
    padding: 9px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .14);
    color: currentColor;
    transition: transform .3s var(--q-ease), background-color .25s;
}

.button:hover,
.hp-btn:hover,
.q-btn:hover {
    border-color: var(--steel);
    background: var(--steel);
    color: #fff;
}

.button:hover .ui-icon,
.hp-btn:hover .ui-icon,
.q-btn:hover .ui-icon {
    transform: translateX(-3px);
}

.button-copper,
.button-primary,
.hp-btn-copper,
.hp-btn-ink {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.q-btn-light,
.q-btn-light:hover {
    border-color: #fff;
    background: #fff;
    color: var(--ink);
}

.q-btn-light .ui-icon {
    background: var(--q-panel);
}

.q-btn-light:hover .ui-icon {
    background: var(--steel-light);
}

.hp-btn-ghost,
.q-btn-ghost-dark {
    border-color: rgba(255, 255, 255, .5);
    background: rgba(13, 24, 35, .18);
    color: #fff;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.hp-btn-ghost:hover,
.q-btn-ghost-dark:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .12);
}

.q-btn-outline,
.button-outline,
.q-btn-outline:hover,
.button-outline:hover {
    border-color: rgba(20, 36, 52, .2);
    background: #fff;
    color: var(--ink);
}

.q-btn-outline .ui-icon,
.button-outline .ui-icon {
    background: var(--q-panel);
}

.q-btn-outline:hover,
.button-outline:hover {
    border-color: var(--ink);
}

/* Text link with an arrow, Scale's "Learn more". */
.q-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
}

.q-link .ui-icon {
    width: 17px;
    height: 17px;
    transition: transform .3s var(--q-ease);
}

.q-link:hover .ui-icon {
    transform: translateX(-4px);
}

.q-on-dark .q-link {
    color: #fff;
}

/* ---------- Navigation: links grouped beside the logo ---------- */

.site-nav,
.site-nav.scrolled {
    height: 72px;
    border-bottom: 1px solid transparent;
    background: rgba(255, 255, 255, .9);
    box-shadow: none;
    -webkit-backdrop-filter: saturate(1.4) blur(18px);
    backdrop-filter: saturate(1.4) blur(18px);
}

.site-nav.scrolled {
    border-bottom-color: var(--line);
}

.nav-shell,
.site-nav.scrolled .nav-shell {
    justify-content: flex-start;
    gap: clamp(24px, 3.4vw, 52px);
}

.nav-actions {
    margin-inline-start: auto;
}

.brand img {
    width: 128px;
    height: auto;
}

.nav-links {
    position: static;
    gap: clamp(18px, 2.2vw, 30px);
    margin: 0;
    transform: none;
}

.nav-link,
.home-page .nav-link {
    color: var(--ink);
    font-size: 14.5px;
    font-weight: 400;
    opacity: .82;
    transition: opacity .2s;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
}

.nav-link.active {
    font-weight: 500;
}

.nav-link::after,
.nav-link.active::after {
    display: none;
}

.nav-cta,
.home-page .nav-cta {
    min-height: 40px;
    height: 40px;
    gap: 10px;
    padding: 0 16px;
    border-radius: var(--q-r-sm);
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.nav-cta:hover {
    background: var(--steel);
}

.nav-cta .ui-icon,
.nav-cta-icon {
    color: currentColor;
}

.menu-btn,
.home-page .menu-btn {
    border-radius: var(--q-r-sm);
}

.mobile-panel {
    border-radius: 0;
    background: var(--q-night);
}

.site-announcement {
    background: var(--q-night);
    color: #fff;
    box-shadow: none;
}

.site-announcement a {
    color: var(--steel-light);
}

@media (max-width: 860px) {
    .site-nav,
    .site-nav.scrolled {
        height: 64px;
    }

    .brand img {
        width: 116px;
    }

    .mobile-panel {
        inset: 64px 0 0;
    }
}

/* ---------- Footer: directory, then one large closing line ---------- */

.site-footer,
.home-page .site-footer,
html body .site-footer {
    background: var(--q-night);
    color: #fff;
}

.q-footer-directory {
    display: grid;
    grid-template-columns: 56px repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr);
    gap: clamp(24px, 3vw, 48px);
    padding-block: clamp(64px, 8vw, 104px) clamp(48px, 6vw, 80px);
}

.q-footer-mark {
    width: 40px;
    height: auto;
}

.q-footer-directory > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.q-footer-directory span {
    margin-bottom: 8px;
    color: var(--slate-light);
    font-size: 13px;
    font-weight: 500;
}

.q-footer-directory a {
    color: rgba(255, 255, 255, .86);
    font-size: 14.5px;
    transition: color .2s;
}

.q-footer-directory a:hover {
    color: #fff;
}

.q-footer-directory p {
    max-width: 420px;
    margin: 0;
    color: rgba(255, 255, 255, .62);
    font-size: 14.5px;
    line-height: 1.95;
}

.site-footer .footer-top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: clamp(28px, 4vw, 44px);
    padding-block: 0 clamp(40px, 5vw, 64px);
    border: 0;
}

.site-footer .footer-statement p {
    max-width: 18em;
    margin: 0;
    font-size: clamp(38px, 6.4vw, 92px);
    font-weight: 400;
    line-height: 1.25;
    text-wrap: balance;
}

.site-footer .footer-conversation {
    align-self: flex-start;
    min-width: min(400px, 100%);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 24px;
    padding: 18px 20px;
    border: 0;
    border-radius: var(--q-r-md);
    background: #fff;
    color: var(--ink);
    transition: background-color .25s;
}

.site-footer .footer-conversation:hover {
    background: var(--steel-light);
}

.site-footer .footer-conversation span {
    color: var(--slate);
    font-size: 13.5px;
}

.site-footer .footer-conversation b {
    font-size: 17px;
    font-weight: 500;
}

.site-footer .footer-conversation > .ui-icon {
    grid-row: 1 / 3;
    grid-column: 2;
    align-self: center;
    width: 22px;
    height: 22px;
    color: var(--ink);
}

.site-footer .footer-bottom {
    direction: rtl;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-block: 22px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .5);
    font-size: 13px;
    letter-spacing: 0;
}

@media (max-width: 900px) {
    .q-footer-directory {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .q-footer-mark-wrap,
    .q-footer-directory .q-footer-brief {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .q-footer-directory {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer .footer-statement p {
        font-size: 34px;
        line-height: 1.45;
    }
}

/* ---------- Shared building blocks (services, ROSHAN, contact, home) ---------- */

.q-shell {
    width: var(--q-shell);
    margin-inline: auto;
}

.q-section {
    padding-block: clamp(72px, 9vw, 128px);
}

.q-section-tight {
    padding-block: clamp(40px, 5vw, 72px);
}

/* A centred statement heading, Scale's section opener. */
.q-head {
    max-width: 860px;
    margin: 0 auto clamp(36px, 5vw, 64px);
    text-align: center;
}

.q-head .q-lede {
    max-width: 640px;
    margin: 16px auto 0;
}

.q-head .q-label {
    margin-bottom: 14px;
}

/* Hero: a rounded card over full-bleed footage, copy anchored to the bottom. */
.q-hero {
    padding: calc(72px + 12px) 12px 0;
}

.q-hero-card {
    position: relative;
    isolation: isolate;
    min-height: min(78vh, 760px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: var(--q-r-lg);
    background: var(--ink);
    color: #fff;
}

.q-hero-card > video,
.q-hero-card > img {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.q-hero-card::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(to top, rgba(13, 24, 35, .9) 0%, rgba(13, 24, 35, .55) 38%, rgba(13, 24, 35, .15) 72%, rgba(13, 24, 35, .3) 100%);
    content: "";
}

.q-hero-body {
    width: min(1240px, calc(100% - clamp(40px, 7vw, 112px)));
    margin-inline: auto;
    padding-block: clamp(40px, 6vw, 72px);
}

.q-hero-body h1 {
    max-width: 15em;
}

.q-hero-body .q-lede {
    max-width: 600px;
    margin-top: 18px;
    color: rgba(255, 255, 255, .8);
}

.q-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.q-hero-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 28px;
    margin-top: clamp(32px, 5vw, 56px);
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .16);
}

.q-hero-strip a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .86);
    font-size: 14.5px;
}

.q-hero-strip a:hover {
    color: #fff;
}

/* Panels */
.q-panel {
    border-radius: var(--q-r-lg);
    background: var(--q-panel);
}

.q-panel-ink {
    background: var(--ink);
    color: #fff;
}

.q-panel-steel {
    background: var(--steel);
    color: #fff;
}

.q-panel-sky {
    background: var(--q-sky);
    color: var(--ink);
}

/* Segmented tabs: one idea per panel, chosen by the reader. */
.q-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 20px;
    padding: 4px;
    border-radius: 10px;
    background: var(--q-panel);
}

.q-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--slate);
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.q-tab::before {
    width: 7px;
    height: 7px;
    background: var(--slate-light);
    content: "";
}

.q-tab[aria-selected="true"] {
    background: #fff;
    color: var(--ink);
}

.q-tab[aria-selected="true"]::before {
    background: var(--copper);
}

.q-tabs-ready [data-q-tab-panel][hidden] {
    display: none;
}

/* Statement card: one large sentence on steel blue, Scale's quote card. */
.q-statement {
    display: grid;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 80px);
    padding: clamp(32px, 5vw, 72px);
    border-radius: var(--q-r-lg);
    background: var(--q-sky);
    color: var(--ink);
}

.q-statement blockquote {
    margin: 0;
}

.q-statement blockquote p {
    margin: 0;
    font-size: clamp(24px, 2.7vw, 38px);
    font-weight: 400;
    line-height: 1.6;
    text-wrap: pretty;
}

.q-statement footer {
    margin-top: clamp(24px, 3vw, 40px);
    color: var(--ink);
    font-size: 15px;
}

.q-statement footer b {
    display: inline-block;
    margin-inline-end: 8px;
    padding: 2px 10px;
    border-radius: 4px;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.q-statement .q-label {
    color: var(--ink);
}

/* Pillars: heading on one side, a ruled list on the other. */
.q-pillars {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: clamp(32px, 6vw, 112px);
    align-items: start;
}

.q-pillars-head {
    position: sticky;
    top: 112px;
}

.q-pillars-head .q-lede {
    margin-top: 16px;
}

.q-pillars ol,
.q-pillars ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.q-pillar {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 4px 18px;
    padding: clamp(22px, 3vw, 34px) 0;
    border-bottom: 1px solid var(--line);
}

.q-pillar:first-child {
    padding-top: 0;
}

.q-pillar-icon {
    grid-row: 1 / 4;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--steel);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.q-pillar:nth-child(2) .q-pillar-icon {
    background: var(--slate);
}

.q-pillar:nth-child(3) .q-pillar-icon {
    background: var(--ink);
}

.q-pillar:nth-child(4) .q-pillar-icon {
    background: var(--q-sky);
    color: var(--ink);
}

.q-pillar h3 {
    margin: 2px 0 0;
    font-size: clamp(19px, 1.6vw, 22px);
    font-weight: 500;
    line-height: 1.6;
}

.q-pillar p {
    margin: 4px 0 0;
    color: var(--slate);
    font-size: 15.5px;
    line-height: 1.95;
}

.q-pillar .q-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: var(--q-r-sm);
    background: var(--q-panel);
    color: var(--ink);
    font-size: 14.5px;
}

.q-note b {
    font-weight: 500;
}

/* Feature cards on a panel. */
.q-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.q-card {
    padding: clamp(20px, 2.4vw, 28px);
    border-radius: var(--q-r-md);
    background: #fff;
}

.q-card h3 {
    margin: 0;
    font-size: 18.5px;
    font-weight: 500;
    line-height: 1.6;
}

.q-card p {
    margin: 8px 0 0;
    color: var(--slate);
    font-size: 15px;
    line-height: 1.9;
}

/* Closing call to action over footage. */
.q-cta-card {
    position: relative;
    isolation: isolate;
    min-height: clamp(380px, 52vh, 520px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: clamp(32px, 5vw, 64px);
    border-radius: var(--q-r-lg);
    background: var(--ink);
    color: #fff;
}

.q-cta-card > img,
.q-cta-card > video {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.q-cta-card::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 24, 35, .9), rgba(13, 24, 35, .35) 60%, rgba(13, 24, 35, .2));
    content: "";
}

.q-cta-card h2 {
    max-width: 14em;
}

.q-cta-card .q-lede {
    max-width: 560px;
    margin-top: 12px;
    color: rgba(255, 255, 255, .8);
}

/* Dark stat tiles, Scale's results band; only for facts we can state. */
.q-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.q-fact {
    padding: 22px 24px;
    border-radius: var(--q-r-md);
    background: rgba(255, 255, 255, .06);
}

.q-fact span {
    display: block;
    color: rgba(255, 255, 255, .6);
    font-size: 13.5px;
}

.q-fact b {
    display: block;
    margin-top: 28px;
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 400;
    line-height: 1.2;
}

.q-fact small {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, .62);
    font-size: 14px;
    line-height: 1.8;
}

/* Forms, Scale's demo form: outlined fields in a two-column grid. */
.q-form {
    display: grid;
    gap: 12px;
}

.q-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.q-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.q-field label {
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
}

.q-field label small {
    color: var(--slate);
    font-size: 13px;
    font-weight: 400;
}

.q-field input,
.q-field select,
.q-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid rgba(20, 36, 52, .18);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
}

.q-field textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.9;
}

.q-field input:focus,
.q-field select:focus,
.q-field textarea:focus {
    border-color: var(--steel);
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 73, 108, .15);
}

.q-field [aria-invalid="true"] {
    border-color: #a63d2f;
}

.q-field .field-error {
    color: #a63d2f;
    font-size: 13.5px;
}

.q-field .field-help {
    color: var(--slate);
    font-size: 13px;
}

@media (max-width: 900px) {
    .q-pillars,
    .q-statement {
        grid-template-columns: minmax(0, 1fr);
    }

    .q-pillars-head {
        position: static;
    }
}

@media (max-width: 640px) {
    .q-hero {
        padding: calc(64px + 8px) 8px 0;
    }

    .q-hero-card {
        min-height: 82vh;
    }

    .q-hero-body {
        width: calc(100% - 40px);
    }

    .q-cards,
    .q-form-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .q-actions .button,
    .q-actions .q-btn {
        flex: 1 1 100%;
        justify-content: space-between;
    }
}

/* ---------- Knowledge: masthead, filters, cards ---------- */

.kb-hero {
    padding: clamp(120px, 14vw, 176px) 0 clamp(40px, 5vw, 64px);
    text-align: center;
}

.kb-hero h1 {
    max-width: 15em;
    margin: 0 auto;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 500;
    line-height: 1.35;
    text-wrap: balance;
}

.kb-hero > .shell > p {
    max-width: 620px;
    margin: 18px auto 0;
    color: var(--slate);
    font-size: clamp(15.5px, 1.3vw, 18px);
    text-wrap: pretty;
}

.kb-search {
    max-width: 640px;
    margin: clamp(30px, 4vw, 44px) auto 0;
}

.kb-search-field {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--q-r-md);
    background: #fff;
    transition: border-color .2s;
}

.kb-search-field:focus-within {
    border-color: var(--steel);
}

.kb-search-field label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.kb-search-field input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 0;
    background: none;
    color: var(--ink);
    font-size: 15px;
    outline: none;
}

.kb-search-field button {
    height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--q-r-sm);
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.kb-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.kb-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
    transition: background-color .2s, border-color .2s, color .2s;
}

.kb-chip:hover {
    border-color: var(--ink);
}

.kb-chip.active {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.kb-section {
    padding-block: clamp(40px, 5vw, 72px);
}

.kb-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px 32px;
    margin-bottom: clamp(22px, 3vw, 36px);
}

.kb-section-head h2 {
    margin: 0;
    font-size: clamp(26px, 2.8vw, 38px);
    font-weight: 500;
    line-height: 1.4;
}

.kb-section-head p {
    max-width: 520px;
    margin: 6px 0 0;
    color: var(--slate);
    font-size: 15px;
}

.kb-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 14.5px;
    font-weight: 600;
}

.kb-link .ui-icon {
    transition: transform .3s var(--q-ease);
}

.kb-link:hover .ui-icon {
    transform: translateX(-4px);
}

.kb-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 22px);
}

.kb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--q-r-md);
    background: var(--q-panel);
    transition: background-color .25s;
}

.kb-card:hover {
    background: #e6eaee;
}

.kb-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    margin: 8px 8px 0;
    border-radius: 10px;
    background: var(--ink);
}

.kb-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s var(--q-ease);
}

.kb-card:hover .kb-card-media img {
    transform: scale(1.03);
}

/* Without a cover, the card shows the Q mark on its section colour. */
.kb-art {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--ink);
}

.kb-art img {
    width: 22%;
    height: auto;
    min-width: 56px;
    max-width: 120px;
    object-fit: contain;
    transform: none !important;
}

.kb-art.is-research {
    background: var(--steel);
}

.kb-art.is-insight,
.kb-art.is-news {
    background: var(--slate);
}

.kb-art.is-field-note,
.kb-art.is-case-note {
    background: var(--steel-light);
}

.kb-art span {
    position: absolute;
    inset-inline-start: 16px;
    bottom: 12px;
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
}

.kb-art.is-field-note span,
.kb-art.is-case-note span {
    color: var(--ink);
}

.kb-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 20px 20px;
}

.kb-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    color: var(--slate);
    font-size: 13px;
}

.kb-meta b {
    color: var(--ink);
    font-weight: 600;
}

.kb-card h3 {
    margin: 10px 0 0;
    font-size: clamp(17px, 1.35vw, 19.5px);
    font-weight: 600;
    line-height: 1.7;
    text-wrap: pretty;
}

.kb-card h3 a::after {
    position: absolute;
    inset: 0;
    content: "";
}

.kb-card p {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--slate);
    font-size: 14.5px;
    line-height: 1.9;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.kb-card-foot {
    margin-top: auto;
    padding-top: 16px;
    color: var(--slate);
    font-size: 13px;
}

/* The lead story spans the grid: media on one side, copy on the other. */
.kb-card-feature {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}

.kb-card-feature .kb-card-media {
    aspect-ratio: auto;
    min-height: 360px;
    margin: 8px;
}

.kb-card-feature .kb-card-body {
    justify-content: center;
    padding: clamp(24px, 3.4vw, 52px);
}

.kb-card-feature h3 {
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.5;
    font-weight: 500;
}

.kb-card-feature p {
    font-size: 15.5px;
    -webkit-line-clamp: 4;
}

.kb-topics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(10px, 1.2vw, 16px);
}

.kb-topic {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 190px;
    padding: 22px;
    border-radius: var(--q-r-md);
    background: var(--q-panel);
    transition: background-color .25s;
}

.kb-topic:hover {
    background: #e6eaee;
}

.kb-topic h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.kb-topic p {
    margin: 8px 0 0;
    color: var(--slate);
    font-size: 14px;
    line-height: 1.85;
}

.kb-topic span {
    margin-top: auto;
    padding-top: 16px;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 600;
}

.kb-empty {
    grid-column: 1 / -1;
    padding: clamp(32px, 5vw, 64px);
    border-radius: var(--q-r-md);
    background: var(--q-panel);
    text-align: center;
}

.kb-empty h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.kb-empty p {
    margin: 8px auto 18px;
    color: var(--slate);
}

.kb-standard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: clamp(28px, 5vw, 80px);
    padding: clamp(32px, 5vw, 72px);
    border-radius: var(--q-r-lg);
    background: var(--ink);
    color: #fff;
}

.kb-standard h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 500;
    line-height: 1.45;
}

.kb-standard > div > p {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, .66);
}

.kb-standard ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.kb-standard li {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.kb-standard li:first-child {
    padding-top: 0;
}

.kb-standard h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.kb-standard li p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, .62);
    font-size: 14.5px;
}

.kb-standard .kb-link {
    margin-top: 26px;
    color: #fff;
}

/* Sub-navigation shared by the knowledge pages. */
.kh-subnav {
    border-bottom: 1px solid var(--line);
    background: rgba(244, 246, 248, .9);
}

.kh-subnav-brand span {
    color: var(--copper);
}

/* Archive headers (insights, research). */
.kh-archive-hero {
    padding-top: clamp(40px, 6vw, 80px);
    background: var(--paper);
}

.kh-archive-frame {
    border-radius: var(--q-r-lg);
    box-shadow: none;
}

.kh-archive-title h1 {
    font-weight: 600;
}

.kh-archive-content .kh-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 22px);
}

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

.knowledge-reading-page {
    background: var(--paper);
}

.ka-head {
    padding: clamp(56px, 8vw, 104px) 0 clamp(28px, 4vw, 44px);
    text-align: center;
}

.ka-crumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 10px;
    color: var(--slate);
    font-size: 14px;
}

.ka-crumbs a:hover {
    color: var(--ink);
}

.ka-head h1 {
    max-width: 21em;
    margin: 18px auto 0;
    font-size: clamp(32px, 4.2vw, 56px);
    font-weight: 500;
    line-height: 1.4;
    text-wrap: balance;
}

.ka-head .ka-title-en {
    margin: 10px 0 0;
    color: var(--slate);
    font-size: 16px;
}

.ka-deck {
    max-width: 680px;
    margin: 18px auto 0;
    color: var(--slate);
    font-size: clamp(16px, 1.3vw, 18.5px);
    line-height: 2;
    text-wrap: pretty;
}

.ka-byline {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 22px;
    margin-top: 28px;
    color: var(--slate);
    font-size: 14px;
}

.ka-author {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 600;
}

.ka-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    flex: none;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
}

.ka-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ka-cover {
    width: min(1180px, calc(100% - var(--gutter) * 2));
    aspect-ratio: 21 / 9;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--q-r-lg);
    background: var(--ink);
}

.ka-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ka-cover .kb-art {
    position: relative;
    height: 100%;
}

.ka-cover .kb-art img {
    width: 9%;
    min-width: 64px;
    height: auto;
    object-fit: contain;
}

.ka-layout {
    width: min(1180px, calc(100% - var(--gutter) * 2));
    display: grid;
    grid-template-columns: 220px minmax(0, 700px) 220px;
    justify-content: space-between;
    gap: 40px;
    margin: 0 auto;
    padding-block: clamp(44px, 6vw, 80px) clamp(64px, 8vw, 112px);
}

.ka-main {
    grid-column: 2;
}

.ka-toc {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 104px;
    align-self: start;
    font-size: 14px;
}

.ka-toc > span {
    display: block;
    margin-bottom: 12px;
    color: var(--ink);
    font-weight: 600;
}

.ka-toc nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-inline-start: 14px;
    border-inline-start: 1px solid var(--line);
}

.ka-toc nav a,
.ka-toc nav small {
    display: block;
    padding: 4px 0;
    color: var(--slate);
    line-height: 1.7;
}

.ka-toc nav a:hover,
.ka-toc nav a.active,
.ka-toc nav a[aria-current] {
    color: var(--ink);
}

.ka-toc [data-scroll-top] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    color: var(--slate);
}

.ka-tools {
    grid-column: 3;
    grid-row: 1;
    position: sticky;
    top: 104px;
    align-self: start;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--slate);
    font-size: 14px;
}

.ka-tools span {
    width: 100%;
}

.ka-tools button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

.ka-tools button:hover {
    border-color: var(--ink);
}

.ka-tools small {
    width: 100%;
}

.ka-takeaways {
    margin: 0 0 40px;
    padding: 24px 26px;
    border-radius: var(--q-r-md);
    background: var(--q-panel);
}

.ka-takeaways h2 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
}

.ka-takeaways ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ka-takeaways li {
    position: relative;
    padding: 6px 20px 6px 0;
    font-size: 15.5px;
    line-height: 1.9;
}

.ka-takeaways li::before {
    position: absolute;
    top: 1.05em;
    right: 0;
    width: 7px;
    height: 7px;
    background: var(--copper);
    content: "";
}

.ka-docmeta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px;
    margin: 0 0 32px;
    overflow: hidden;
    border-radius: var(--q-r-md);
    background: var(--line);
}

.ka-docmeta div {
    padding: 16px 18px;
    background: var(--q-panel);
}

.ka-docmeta span {
    display: block;
    color: var(--slate);
    font-size: 13px;
}

.ka-docmeta b {
    font-weight: 600;
}

.ka-method {
    margin: 0 0 40px;
    padding: 22px 24px;
    border-inline-start: 3px solid var(--steel);
    background: var(--mist);
    border-radius: 0 var(--q-r-sm) var(--q-r-sm) 0;
}

.ka-method h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.ka-method p {
    margin: 6px 0 0;
    color: var(--ink);
    font-size: 15px;
}

.ka-prose {
    color: #1d2f40;
    font-size: 17.5px;
    line-height: 2.15;
}

.ka-prose > :first-child {
    margin-top: 0;
}

.ka-prose h2 {
    margin: 2.1em 0 .6em;
    color: var(--ink);
    font-size: clamp(23px, 2vw, 28px);
    font-weight: 600;
    line-height: 1.55;
    scroll-margin-top: 104px;
}

.ka-prose h3 {
    margin: 1.8em 0 .5em;
    color: var(--ink);
    font-size: 19.5px;
    font-weight: 600;
    line-height: 1.6;
    scroll-margin-top: 104px;
}

.ka-prose p {
    margin: 0 0 1.25em;
}

.ka-prose a {
    color: var(--steel);
    text-decoration: underline;
    text-decoration-color: var(--steel-light);
    text-underline-offset: 4px;
}

.ka-prose blockquote {
    margin: 2em 0;
    padding: 4px 22px 4px 0;
    border-right: 3px solid var(--copper);
    color: var(--ink);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.9;
}

.ka-prose ul,
.ka-prose ol {
    margin: 0 0 1.4em;
    padding-right: 1.3em;
}

.ka-prose li {
    margin: .3em 0;
}

.ka-prose img {
    margin: 2em auto;
    border-radius: var(--q-r-md);
}

.ka-prose code {
    padding: .1em .4em;
    border-radius: 6px;
    background: var(--mist);
    font-size: .88em;
}

.ka-prose pre {
    direction: ltr;
    padding: 18px 20px;
    overflow-x: auto;
    border-radius: var(--q-r-md);
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    line-height: 1.7;
}

.ka-prose pre code {
    padding: 0;
    background: none;
}

.ka-prose table {
    width: 100%;
    margin: 2em 0;
    border-collapse: collapse;
    font-size: 15px;
}

.ka-prose th,
.ka-prose td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: right;
}

.ka-resources,
.ka-author-card {
    margin-top: 48px;
    padding: 26px;
    border-radius: var(--q-r-md);
    background: var(--q-panel);
}

.ka-resources h2 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
}

.ka-resources p {
    margin: 0 0 16px;
    color: var(--slate);
    font-size: 14.5px;
}

.ka-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
}

.ka-author-card {
    display: flex;
    gap: 18px;
}

.ka-author-card .ka-avatar {
    width: 56px;
    height: 56px;
    font-size: 17px;
}

.ka-author-card small {
    color: var(--slate);
    font-size: 13px;
}

.ka-author-card h3 {
    margin: 2px 0 0;
    font-size: 18px;
    font-weight: 600;
}

.ka-author-card b {
    color: var(--slate);
    font-size: 14px;
    font-weight: 500;
}

.ka-author-card p {
    margin: 8px 0 0;
    font-size: 14.5px;
}

.ka-next {
    padding-block: clamp(56px, 7vw, 96px);
    background: #fff;
    border-top: 1px solid var(--line);
}

.ka-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px 40px;
    margin-top: clamp(40px, 5vw, 64px);
    padding: clamp(28px, 4vw, 48px);
    border-radius: var(--q-r-lg);
    background: var(--ink);
    color: #fff;
}

.ka-cta h2 {
    margin: 0;
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 600;
    line-height: 1.5;
}

.ka-cta p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .66);
}

.ka-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kh-progress {
    height: 2px;
    background: transparent;
}

.kh-progress i {
    background: var(--copper);
}

@media (max-width: 1100px) {
    .kb-grid,
    .kh-archive-content .kh-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kb-topics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ka-layout {
        grid-template-columns: minmax(0, 1fr);
        justify-content: center;
        max-width: 760px;
    }

    .ka-main,
    .ka-toc,
    .ka-tools {
        grid-column: 1;
        grid-row: auto;
        position: static;
    }

    .ka-toc {
        display: none;
    }

    .ka-tools {
        order: 2;
    }

    .ka-tools span,
    .ka-tools small {
        width: auto;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 15px;
    }

    .kb-grid,
    .kh-archive-content .kh-grid,
    .kb-topics {
        grid-template-columns: minmax(0, 1fr);
    }

    .kb-card-feature {
        grid-template-columns: minmax(0, 1fr);
    }

    .kb-card-feature .kb-card-media {
        min-height: 0;
        aspect-ratio: 16 / 10;
        margin: 8px 8px 0;
    }

    .kb-topic {
        min-height: 0;
    }

    .kb-standard {
        grid-template-columns: minmax(0, 1fr);
    }

    .ka-cover {
        aspect-ratio: 16 / 10;
        border-radius: var(--q-r-md);
    }

    .ka-prose {
        font-size: 16.5px;
        line-height: 2.05;
    }

    .site-footer .footer-statement p {
        font-size: 32px;
        line-height: 1.5;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.kb-chip-select {
    position: relative;
    padding: 0;
}

.kb-chip-select select {
    height: 36px;
    padding: 0 16px 0 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font-size: 14px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.kb-chip-select::after {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 7px;
    height: 7px;
    border-bottom: 1.5px solid currentColor;
    border-left: 1.5px solid currentColor;
    transform: translateY(-70%) rotate(-45deg);
    pointer-events: none;
    content: "";
}

.kb-card p.kb-meta {
    display: flex;
    margin: 0;
    overflow: visible;
    font-size: 13px;
}

.kb-card p.kb-card-foot {
    margin-top: auto;
    padding-top: 16px;
}

.kb-center {
    justify-content: center;
}

.kb-head-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
}

/* Archive headers read like the knowledge hub: light, centred, one search row. */
html body .kh-archive-hero,
html body .kh-archive-hero.is-research {
    padding: clamp(56px, 8vw, 104px) 0 clamp(24px, 3vw, 40px);
    background: var(--paper);
    color: var(--ink);
}

html body .kh-archive-hero > .kh-archive-frame {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

html body .kh-archive-intro,
html body .is-research .kh-archive-intro {
    min-height: 0;
    justify-content: center;
    padding: 0;
    background: none;
    color: var(--ink);
    text-align: center;
}

html body .kh-archive-title h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(34px, 4.6vw, 60px);
    font-weight: 600;
    line-height: 1.35;
    text-wrap: balance;
}

html body .kh-archive-title p {
    max-width: 620px;
    margin: 16px auto 0;
    color: var(--slate);
    font-size: clamp(15.5px, 1.3vw, 18px);
}

html body .kh-archive-tools {
    max-width: 860px;
    margin: clamp(28px, 4vw, 40px) auto 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--q-r-md);
    background: #fff;
}

html body .kh-archive-tools label > span {
    color: var(--slate);
    font-size: 12px;
}

html body .kh-archive-result {
    color: var(--slate);
}

html body.knowledge-archive-page .kh-archive-hero .kh-archive-intro,
html body.knowledge-archive-page .kh-archive-hero.is-research .kh-archive-intro {
    background: none;
    color: var(--ink);
}

html body.knowledge-archive-page .kh-archive-hero .kh-archive-intro::before,
html body.knowledge-archive-page .kh-archive-hero .kh-archive-intro::after {
    display: none;
}

html body.knowledge-archive-page .kh-archive-hero .kh-archive-title p {
    color: var(--slate);
}

html body .kh-subnav a,
html body .kh-subnav-brand {
    font-size: 14px;
}

html:not(.js-ready) .q-tabs {
    display: none;
}

/* ---------- Contact: Scale's demo page — form beside a statement card ---------- */

.contact-page {
    background: #fff;
}

.ct {
    padding: calc(72px + clamp(32px, 5vw, 64px)) 0 clamp(24px, 3vw, 40px);
}

.ct-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    align-items: start;
    gap: clamp(28px, 5vw, 72px);
}

.ct-main .q-lede {
    max-width: 620px;
    margin-top: 14px;
}

.ct-form {
    margin-top: clamp(28px, 4vw, 40px);
}

.ct-privacy {
    margin: 4px 0 6px;
    color: var(--slate);
    font-size: 14px;
    line-height: 1.9;
}

.ct-privacy a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ct-message {
    margin-top: 24px;
    padding: 16px 18px;
    border-radius: var(--q-r-sm);
    font-size: 15px;
}

.ct-message.is-success {
    background: #e7f1ea;
    color: #1f4a2c;
}

.ct-message.is-error {
    background: #f8e9e6;
    color: #7a2a1f;
}

.ct-message ul {
    margin: 6px 0 0;
    padding-right: 18px;
}

.ct-aside {
    position: sticky;
    top: 96px;
    padding: clamp(28px, 4vw, 48px);
    border-radius: var(--q-r-lg);
}

.ct-aside h2 {
    margin: 0;
    font-size: clamp(24px, 2.4vw, 34px);
    font-weight: 400;
    line-height: 1.55;
    text-wrap: balance;
}

.ct-aside > p {
    margin: 14px 0 0;
    font-size: 15.5px;
    line-height: 2;
}

.ct-steps {
    margin: clamp(24px, 3vw, 36px) 0 0;
    padding: 0;
    border-top: 1px solid rgba(20, 36, 52, .2);
    list-style: none;
}

.ct-steps li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(20, 36, 52, .2);
}

.ct-steps span {
    width: 30px;
    height: 30px;
    display: grid;
    flex: none;
    place-items: center;
    border-radius: 7px;
    background: var(--ink);
    color: #fff;
    font-size: 14px;
}

.ct-steps b {
    display: block;
    font-size: 16px;
    font-weight: 500;
}

.ct-steps small {
    color: rgba(20, 36, 52, .78);
    font-size: 14px;
}

.ct-direct {
    margin: 22px 0 0;
    font-size: 14.5px;
}

.ct-direct a {
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ct-alternatives {
    padding-bottom: clamp(56px, 7vw, 96px);
}

.ct-alt {
    display: flex;
    flex-direction: column;
    background: var(--q-panel);
    transition: background-color .25s;
}

.ct-alt:hover {
    background: #e6eaee;
}

.ct-alt .q-link {
    margin-top: 18px;
}

@media (max-width: 960px) {
    .ct-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ct-aside {
        position: static;
    }
}

/* Privacy: same flat Ink masthead as the other hero cards. */
html body.privacy-page {
    background: #fff;
}

html body.privacy-page .legal-hero {
    padding-top: calc(72px + 12px);
    background: #fff;
}

html body.privacy-page .legal-hero-frame {
    border-radius: var(--q-r-lg);
    background: var(--ink);
    box-shadow: none;
}

html body.privacy-page .legal-hero-frame::before,
html body.privacy-page .legal-hero-frame::after {
    display: none;
}

html body.privacy-page .legal-hero h1 {
    font-weight: 500;
}

html body.knowledge-hub-page,
html body.knowledge-archive-page,
html body.knowledge-reading-page {
    background: #fff;
}
