/* ==========================================================================
   Kzyx Solutions — design system
   Canonical tokens (consumed by the portal too — do not rename):
   --kz-accent, --kz-accent-text, --kz-accent-hover, --kz-on-accent, --kz-bg,
   --kz-surface, --kz-surface-2, --kz-text, --kz-text-muted, --kz-border,
   --kz-radius, --kz-font-brand, --kz-font-mono

   --kz-accent is decorative (fills, borders, icons, focus rings; 3:1 non-text
   contrast is enough). --kz-accent-text is the AA-compliant variant for accent
   TEXT — always use it when the accent colors letters.
   ========================================================================== */

/* ---------- self-hosted fonts (CSP: font-src 'self') ---------- */
@font-face {
    font-family: "Aldrich";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/aldrich-400-latin.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
}

/* ---------- tokens ---------- */
:root {
    --kz-accent: #00a1f1;
    --kz-accent-text: #0273ac;
    --kz-accent-hover: #0b8ed1;
    --kz-on-accent: #04222f;
    --kz-bg: #f4f6f8;
    --kz-surface: #ffffff;
    --kz-surface-2: #e9edf1;
    --kz-text: #1a1f26;
    --kz-text-muted: #55606e;
    --kz-border: #d7dde4;
    --kz-radius: 8px;
    --kz-font-brand: "Aldrich", "Segoe UI", system-ui, sans-serif;
    --kz-font-mono: "IBM Plex Mono", Consolas, "Courier New", monospace;

    /* internal (non-canonical) helpers */
    --kz-font-body: "Segoe UI", -apple-system, system-ui, "Helvetica Neue", Arial, sans-serif;
    --kz-link: #0273ac;
    --kz-shadow: 0 1px 2px rgba(16, 24, 32, 0.06), 0 4px 16px rgba(16, 24, 32, 0.07);
    --kz-shadow-lg: 0 2px 6px rgba(16, 24, 32, 0.08), 0 12px 32px rgba(16, 24, 32, 0.12);
    --kz-header-bg: rgba(255, 255, 255, 0.86);
    --kz-hero-glow: rgba(0, 161, 241, 0.10);
    --kz-danger: #b3261e;
    --kz-ok: #1a7f37;
    --kz-mark-veil: rgba(26, 31, 38, 0.05);

    color-scheme: light;
}

[data-theme="dark"] {
    --kz-accent: #29b2f6;
    --kz-accent-text: #29b2f6;
    --kz-accent-hover: #55c3f8;
    --kz-on-accent: #04222f;
    --kz-bg: #0e1116;
    --kz-surface: #161b22;
    --kz-surface-2: #1f2630;
    --kz-text: #e7ebf0;
    --kz-text-muted: #9aa6b4;
    --kz-border: #2c3540;
    --kz-link: #4fc0f8;
    --kz-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.35);
    --kz-shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
    --kz-header-bg: rgba(14, 17, 22, 0.86);
    --kz-hero-glow: rgba(41, 178, 246, 0.09);
    --kz-danger: #ff8b80;
    --kz-ok: #57c576;
    --kz-mark-veil: rgba(231, 235, 240, 0.05);

    color-scheme: dark;
}

/* no-JS / no-preference default follows the OS */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --kz-accent: #29b2f6;
        --kz-accent-text: #29b2f6;
        --kz-accent-hover: #55c3f8;
        --kz-on-accent: #04222f;
        --kz-bg: #0e1116;
        --kz-surface: #161b22;
        --kz-surface-2: #1f2630;
        --kz-text: #e7ebf0;
        --kz-text-muted: #9aa6b4;
        --kz-border: #2c3540;
        --kz-link: #4fc0f8;
        --kz-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.35);
        --kz-shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
        --kz-header-bg: rgba(14, 17, 22, 0.86);
        --kz-hero-glow: rgba(41, 178, 246, 0.09);
        --kz-danger: #ff8b80;
        --kz-ok: #57c576;
        --kz-mark-veil: rgba(231, 235, 240, 0.05);

        color-scheme: dark;
    }
}

/* ---------- base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--kz-font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--kz-text);
    background: var(--kz-bg);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-wrap: break-word;
}

img,
svg {
    max-width: 100%;
    vertical-align: middle;
}

h1,
h2,
h3,
h4 {
    font-family: var(--kz-font-brand);
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 0.6em;
    letter-spacing: 0.01em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(1.9rem, 1.2rem + 3vw, 3.1rem);
}

h2 {
    font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem);
}

h3 {
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--kz-link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--kz-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

::selection {
    background: var(--kz-accent);
    color: var(--kz-on-accent);
}

code {
    font-family: var(--kz-font-mono);
    font-size: 0.9em;
    background: var(--kz-surface-2);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

.container {
    /* rem, not px: the wide-screen root-font scaling (end of this file) then
       widens the layout and the type together. 70rem = 1120px at 16px root. */
    width: min(100% - 2.5rem, 70rem);
    margin-inline: auto;
}

main {
    flex: 1 0 auto;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 100;
    background: var(--kz-surface);
    color: var(--kz-text);
    padding: 0.6rem 1rem;
    border-radius: 0 0 var(--kz-radius) 0;
    box-shadow: var(--kz-shadow);
}

.skip-link:focus {
    left: 0;
}

/* Screen-reader-only content (hidden headings, link hints). */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.eyebrow {
    font-family: var(--kz-font-mono);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--kz-accent-text);
    margin: 0 0 0.75rem;
}

.muted {
    color: var(--kz-text-muted);
}

/* ---------- header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--kz-header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--kz-border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 4rem;
    position: relative;
}

/* brand lockup: inline SVG chevrons + HTML text (page fonts apply, CSP-safe) */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--kz-text);
    text-decoration: none;
    line-height: 1;
}

.brand:hover {
    text-decoration: none;
}

.brand__chevrons {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--kz-accent);
}

.brand__chev {
    width: 0.62rem;
    height: 1.45rem;
    stroke: currentColor;
    stroke-width: 10;
    fill: none;
}

.brand__k6 {
    font-family: var(--kz-font-brand);
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    transform: translateY(0.05em);
}

.brand__word {
    font-family: var(--kz-font-mono);
    font-weight: 500;
    font-size: 0.66rem;
    letter-spacing: 0.28em;
    color: var(--kz-text-muted);
    text-transform: uppercase;
    margin-left: 0.35rem;
    transform: translateY(0.12em);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.site-nav a {
    display: inline-block;
    padding: 0.45rem 0.8rem;
    border-radius: var(--kz-radius);
    color: var(--kz-text);
    font-size: 0.95rem;
}

.site-nav a:hover {
    background: var(--kz-surface-2);
    text-decoration: none;
}

.site-nav a[aria-current="page"] {
    color: var(--kz-accent-text);
    font-weight: 600;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    font-family: var(--kz-font-mono);
    font-size: 0.78rem;
    border: 1px solid var(--kz-border);
    border-radius: var(--kz-radius);
    overflow: hidden;
}

.lang-switch a,
.lang-switch span {
    padding: 0.32rem 0.55rem;
    color: var(--kz-text-muted);
}

.lang-switch a:hover {
    background: var(--kz-surface-2);
    text-decoration: none;
}

.lang-switch [aria-current="true"] {
    background: var(--kz-accent);
    color: var(--kz-on-accent);
    font-weight: 500;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--kz-border);
    border-radius: var(--kz-radius);
    background: transparent;
    color: var(--kz-text);
    cursor: pointer;
}

.icon-btn:hover {
    background: var(--kz-surface-2);
}

.icon-btn svg {
    width: 1.1rem;
    height: 1.1rem;
}

/* theme toggle shows the icon of the theme you would switch TO */
.theme-icon-dark,
[data-theme="dark"] .theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-icon-dark {
    display: block;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-icon-light {
        display: none;
    }

    :root:not([data-theme="light"]) .theme-icon-dark {
        display: block;
    }
}

.login-link {
    font-size: 0.85rem;
    color: var(--kz-text-muted);
    padding: 0.4rem 0.6rem;
    border-radius: var(--kz-radius);
}

.login-link:hover {
    background: var(--kz-surface-2);
    text-decoration: none;
}

/* Logout is a POST form; make the wrapper layout-transparent and reset the
   button so it looks and sits like the adjacent .login-link anchors. */
.auth-form {
    display: contents;
}

button.login-link {
    background: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
}

.footer-logout {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
}

.footer-logout:hover {
    text-decoration: underline;
}

.nav-toggle {
    display: none;
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.62rem 1.35rem;
    border-radius: var(--kz-radius);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: 0.98rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn--primary {
    background: var(--kz-accent);
    color: var(--kz-on-accent);
}

.btn--primary:hover {
    background: var(--kz-accent-hover);
    color: var(--kz-on-accent);
}

.btn--ghost {
    border-color: var(--kz-border);
    color: var(--kz-text);
    background: transparent;
}

.btn--ghost:hover {
    background: var(--kz-surface-2);
    border-color: var(--kz-text-muted);
    color: var(--kz-text);
}

/* ---------- sections ---------- */
.section {
    padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
}

.section--tint {
    background: var(--kz-surface);
    border-block: 1px solid var(--kz-border);
}

.section__head {
    max-width: 46rem;
    margin-bottom: 2.25rem;
}

.section__head p {
    color: var(--kz-text-muted);
    font-size: 1.05rem;
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(4rem, 3rem + 6vw, 7.5rem);
    border-bottom: 1px solid var(--kz-border);
    background:
        radial-gradient(56rem 30rem at 85% -20%, var(--kz-hero-glow), transparent 60%),
        var(--kz-bg);
}

.hero__mark {
    position: absolute;
    right: -4rem;
    top: 50%;
    translate: 0 -50%;
    width: clamp(20rem, 40vw, 34rem);
    color: var(--kz-mark-veil);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    max-width: 44rem;
}

.hero h1 {
    margin-bottom: 0.5em;
}

.hero__lead {
    font-size: clamp(1.05rem, 1rem + 0.5vw, 1.25rem);
    color: var(--kz-text-muted);
    max-width: 38rem;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

/* ---------- cards ---------- */
.grid {
    display: grid;
    gap: 1.25rem;
}

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

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

.grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
    .grid--3,
    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--kz-surface);
    border: 1px solid var(--kz-border);
    border-radius: var(--kz-radius);
    padding: 1.5rem;
    box-shadow: var(--kz-shadow);
}

.card h3 {
    margin-bottom: 0.4em;
}

/* Demoted card heading (correct outline level, h3 appearance — W-PUB-11). */
.card h2.card-heading {
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
    margin-bottom: 0.4em;
}

.card p {
    color: var(--kz-text-muted);
    margin-bottom: 0;
}

.card--lift {
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.card--lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--kz-shadow-lg);
    border-color: var(--kz-accent);
}

.card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: var(--kz-radius);
    background: color-mix(in srgb, var(--kz-accent) 14%, transparent);
    color: var(--kz-accent);
    margin-bottom: 1rem;
}

.card__icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* brand chevron used as a card icon (narrower than the square icon glyphs) */
.card__icon--chev svg {
    width: 0.9rem;
}

.card ul {
    color: var(--kz-text-muted);
    margin: 0.75rem 0 0;
    padding-left: 1.2rem;
}

.card ul li {
    margin-bottom: 0.35rem;
}

.card ul li::marker {
    color: var(--kz-accent-text);
}

/* ---------- process steps ---------- */
.steps {
    counter-reset: step;
}

.step {
    position: relative;
    background: var(--kz-surface);
    border: 1px solid var(--kz-border);
    border-radius: var(--kz-radius);
    padding: 1.4rem 1.4rem 1.2rem;
}

.step::before {
    counter-increment: step;
    content: "0" counter(step);
    display: block;
    font-family: var(--kz-font-mono);
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    color: var(--kz-accent-text);
    margin-bottom: 0.6rem;
}

.step h3 {
    font-size: 1.05rem;
    margin-bottom: 0.3em;
}

.step p {
    color: var(--kz-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* ---------- signals / fact strip ---------- */
.signals {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

@media (max-width: 900px) {
    .signals {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .signals {
        grid-template-columns: 1fr;
    }
}

.signal {
    border-left: 3px solid var(--kz-accent);
    padding-left: 1rem;
}

.signal h3 {
    font-family: var(--kz-font-mono);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    margin-bottom: 0.25em;
}

.signal p {
    color: var(--kz-text-muted);
    font-size: 0.92rem;
    margin: 0;
}

/* ---------- CTA banner ---------- */
.cta-banner {
    background: var(--kz-surface);
    border: 1px solid var(--kz-border);
    border-radius: calc(var(--kz-radius) * 2);
    box-shadow: var(--kz-shadow);
    padding: clamp(2rem, 1.5rem + 3vw, 3.5rem);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cta-banner h2 {
    margin-bottom: 0.25em;
}

.cta-banner p {
    color: var(--kz-text-muted);
    margin: 0;
}

/* ---------- forms ---------- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

@media (max-width: 620px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-field--full {
    grid-column: 1 / -1;
}

.form-field label {
    font-weight: 600;
    font-size: 0.92rem;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
    font: inherit;
    color: var(--kz-text);
    background: var(--kz-surface);
    border: 1px solid var(--kz-border);
    border-radius: var(--kz-radius);
    padding: 0.6rem 0.8rem;
    width: 100%;
}

.form-field textarea {
    resize: vertical;
    min-height: 9rem;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: 2px solid var(--kz-accent);
    outline-offset: 0;
    border-color: var(--kz-accent);
}

.form-field .field-hint {
    font-weight: 400;
    color: var(--kz-text-muted);
}

.field-validation-error {
    color: var(--kz-danger);
    font-size: 0.85rem;
}

.input-validation-error {
    border-color: var(--kz-danger) !important;
}

.validation-summary-errors {
    border: 1px solid var(--kz-danger);
    border-radius: var(--kz-radius);
    background: color-mix(in srgb, var(--kz-danger) 8%, var(--kz-surface));
    color: var(--kz-danger);
    padding: 0.8rem 1rem;
    margin-bottom: 1.25rem;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 1.2rem;
}

.validation-summary-valid {
    display: none;
}

.consent-row {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.consent-row input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.22rem;
    accent-color: var(--kz-accent);
    flex-shrink: 0;
}

.consent-row label {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--kz-text-muted);
}

/* honeypot — visually removed, still submittable by naive bots */
.hp-field {
    position: absolute !important;
    left: -6000px !important;
    top: auto !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-note {
    font-size: 0.85rem;
    color: var(--kz-text-muted);
}

.alert {
    border-radius: var(--kz-radius);
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.5rem;
    border: 1px solid;
}

.alert--success {
    border-color: var(--kz-ok);
    background: color-mix(in srgb, var(--kz-ok) 10%, var(--kz-surface));
    color: var(--kz-ok);
}

/* ---------- contact layout ---------- */
.contact-layout {
    display: grid;
    grid-template-columns: minmax(16rem, 2fr) 3fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 820px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

.contact-info .contact-mail {
    font-family: var(--kz-font-mono);
    font-size: 0.95rem;
    word-break: break-all;
}

.contact-info dl {
    margin: 1.25rem 0 0;
}

.contact-info dt {
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-info dd {
    margin: 0.15rem 0 1rem;
    color: var(--kz-text-muted);
    font-size: 0.92rem;
}

/* ---------- prose (legal pages, about) ---------- */
.prose {
    max-width: 48rem;
}

.prose h2 {
    margin-top: 2.2em;
    font-size: 1.35rem;
}

.prose h3 {
    margin-top: 1.6em;
}

.prose ul {
    padding-left: 1.3rem;
}

.prose li {
    margin-bottom: 0.4rem;
}

.prose address {
    font-style: normal;
}

/* legal placeholders that MUST be completed before go-live */
.placeholder {
    background: color-mix(in srgb, #e6a700 25%, var(--kz-surface));
    border: 1px dashed #b98a00;
    border-radius: 4px;
    padding: 0 0.35rem;
    font-family: var(--kz-font-mono);
    font-size: 0.9em;
    color: var(--kz-text);
}

.notice {
    border: 1px solid var(--kz-border);
    border-left: 3px solid var(--kz-accent);
    border-radius: var(--kz-radius);
    background: var(--kz-surface);
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.75rem;
    color: var(--kz-text-muted);
    font-size: 0.95rem;
}

/* ---------- page hero (subpages) ---------- */
.page-head {
    padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0;
}

.page-head p {
    color: var(--kz-text-muted);
    font-size: 1.05rem;
    max-width: 44rem;
}

/* ---------- footer ---------- */
.site-footer {
    margin-top: auto;
    background: var(--kz-surface);
    border-top: 1px solid var(--kz-border);
    padding-block: 2.75rem 1.5rem;
    font-size: 0.92rem;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 720px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.site-footer h2 {
    font-family: var(--kz-font-mono);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--kz-text-muted);
    margin-bottom: 0.9rem;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li {
    margin-bottom: 0.45rem;
}

.site-footer a {
    color: var(--kz-text);
}

.site-footer a:hover {
    color: var(--kz-accent-text);
}

.site-footer .footer-tagline {
    color: var(--kz-text-muted);
    max-width: 22rem;
    margin-top: 0.9rem;
}

.footer-mail {
    font-family: var(--kz-font-mono);
    font-size: 0.88rem;
}

.site-footer__bottom {
    border-top: 1px solid var(--kz-border);
    padding-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    justify-content: space-between;
    color: var(--kz-text-muted);
    font-size: 0.85rem;
}

/* ---------- error page ---------- */
.error-card {
    max-width: 34rem;
    margin: clamp(3rem, 8vh, 6rem) auto;
    text-align: center;
}

.error-card .brand__chevrons {
    justify-content: center;
    margin-bottom: 1.25rem;
}

.error-card .brand__chev {
    width: 1rem;
    height: 2.2rem;
}

/* ---------- mobile navigation ----------
   Breakpoint at 880px: below it the DE nav strings + brand + header tools do
   not reliably fit one row (W-PUB-06), so the nav collapses into the panel. */
@media (max-width: 880px) {
    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem;
        background: var(--kz-surface);
        border-bottom: 1px solid var(--kz-border);
        box-shadow: var(--kz-shadow-lg);
        padding: 0.75rem 1.25rem 1rem;
        margin-left: 0;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 0.7rem 0.8rem;
    }

    .brand__word {
        display: none;
    }

    .site-nav .login-link {
        display: block;
        border-top: 1px solid var(--kz-border);
        border-radius: 0;
        margin-top: 0.35rem;
        padding-top: 0.85rem;
        color: var(--kz-text-muted);
        font-size: 0.85rem;
    }
}

/* Auth links render once inside #site-nav (see _AuthLinks.cshtml); on desktop
   they sit at the end of the nav row in the compact login-link style. */
@media (min-width: 881px) {
    .site-nav a.login-link {
        color: var(--kz-text-muted);
        font-size: 0.85rem;
    }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ---------- FAQ (native <details>/<summary>, zero JS — W-PUB-26) ---------- */
.faq {
    display: grid;
    gap: 0.75rem;
    max-width: 48rem;
}

.faq__item {
    background: var(--kz-surface);
    border: 1px solid var(--kz-border);
    border-radius: var(--kz-radius);
    box-shadow: var(--kz-shadow);
}

.faq__question {
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Hide the native marker in both engines, then draw our own chevron. */
.faq__question::-webkit-details-marker {
    display: none;
}

.faq__question::after {
    content: "+";
    font-family: var(--kz-font-mono);
    font-size: 1.25rem;
    line-height: 1;
    color: var(--kz-accent-text);
    flex: none;
}

.faq__item[open] > .faq__question::after {
    content: "−";
}

.faq__item[open] > .faq__question {
    border-bottom: 1px solid var(--kz-border);
}

.faq__question:focus-visible {
    outline: 2px solid var(--kz-accent);
    outline-offset: -2px;
    border-radius: var(--kz-radius);
}

.faq__answer {
    padding: 1rem 1.25rem;
    color: var(--kz-text-muted);
}

.faq__answer p {
    margin: 0;
}

/* ---------- project vignettes (W-PUB-23 — placeholder content) ---------- */
.case__meta {
    font-family: var(--kz-font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--kz-text-muted);
    margin-bottom: 0.5rem;
}

.case {
    margin: 0.75rem 0 0;
}

.case dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--kz-accent-text);
    margin-top: 0.7rem;
}

.case dd {
    margin: 0.2rem 0 0;
    color: var(--kz-text-muted);
    font-size: 0.95rem;
}

/* ---------- print (legal pages are the ones people archive — W-PUB-27) ---------- */
@media print {
    /* Chrome/Edge honour this; it drops the dark theme's backgrounds for paper. */
    :root {
        color-scheme: light;
    }

    .site-header,
    .site-footer,
    .skip-link,
    .hero__mark,
    .nav-toggle,
    #theme-toggle,
    .lang-switch,
    .cta-banner {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    main,
    .section,
    .page-head {
        padding: 0;
        margin: 0;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    .prose {
        max-width: none;
    }

    /* Keep headings with the text they introduce. */
    h1, h2, h3 {
        page-break-after: avoid;
        break-after: avoid;
    }

    p, li, address {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    /* A printed page has no hyperlinks — spell the target out. Skip in-page
       and mailto/tel links, whose text already carries the address. */
    .prose a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        word-break: break-all;
    }

    /* Unfilled legal placeholders must stay obvious on paper too, where the
       amber highlight may not print. */
    .placeholder {
        background: transparent;
        border: 1px dashed #000;
        color: #000;
    }

    .notice {
        border: 1px solid #000;
        background: transparent;
    }
}

/* ---------- wide-screen scaling ----------
   The design is rem-based throughout (type, spacing, and the 70rem content
   containers), so stepping the root font up on large viewports scales the
   whole layout proportionally instead of leaving a small island of 16px UI
   in an ocean of empty space. Steps, not vw-fluid: predictable rendering at
   common monitor widths, and no drift on odd window sizes. Loaded by both
   the public site and the portal (site.css is included everywhere). */
@media (min-width: 1920px) {
    html {
        font-size: 17px;
    }
}

@media (min-width: 2560px) {
    html {
        font-size: 19px;
    }
}

@media (min-width: 3400px) {
    html {
        font-size: 21px;
    }
}
