.site-header {
    position: sticky;
    top: 0;
    z-index: 500;
    width: 100%;
    background-color: var(--bg-oat);
    border-bottom: 1px solid var(--line-edge);
    transition: padding var(--dur-med) var(--ease-out),
                            background-color var(--dur-fast) var(--ease-out),
                            box-shadow var(--dur-fast) var(--ease-out);
}

.site-header.is-scrolled {
    background-color: rgba(232, 223, 208, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(35, 31, 28, 0.06);
}

.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-lg) var(--space-xs);
    position: relative;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
}

.header-brand-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xs) 0;
}

.site-header .brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    outline: none;
    padding: var(--space-3xs) var(--space-2xs);
    transition: opacity var(--dur-fast) var(--ease-out),
                            transform var(--dur-fast) var(--ease-out);
}

.site-header .brand:hover { opacity: 0.85; }

.site-header .brand:active {
    transform: scale(0.98);
    opacity: 0.75;
}

.site-header .brand:focus-visible {

    outline: 2px solid var(--focus-ring);
    outline-offset: 4px;
}

.site-header .brand img {
    height: 3.2rem;
    width: auto;
    max-height: 52px;
    object-fit: contain;
    transition: height var(--dur-fast) var(--ease-out);
}

.site-header.is-scrolled .brand img {
    height: 2.6rem;
    max-height: 42px;
}

.site-nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3xl);
    padding: var(--space-xs) 0;
}

.nav-split {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    font-family: var(--nomi-a3a);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--track-wider);
    color: var(--ink-charcoal);
    text-decoration: none;
    padding: var(--space-xs) var(--space-sm);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    position: relative;
    background-color: transparent;
    border-bottom: 2px solid transparent;
    transition: color var(--dur-fast) var(--ease-out),
                            background-color var(--dur-fast) var(--ease-out),
                            border-color var(--dur-fast) var(--ease-out);
}

.nav-link:hover {
    color: var(--accent-rust);
    border-bottom-color: var(--accent-rust);
}

.nav-link:active {
    color: var(--accent-rust-active);
    background-color: var(--accent-rust-subtle);
}

.nav-link:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.nav-link[aria-current='page'] {
    color: var(--terracotta);
    border-bottom-color: var(--terracotta);
}

.nav-toggle {
    display: none;
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid var(--line-edge);
    color: var(--ink-charcoal);
    padding: var(--space-xs) var(--space-sm);
    min-height: 44px;
    min-width: 44px;

    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    font-family: var(--nomi-c03);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--track-wider);
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out),
                            border-color var(--dur-fast) var(--ease-out),
                            color var(--dur-fast) var(--ease-out);
}

.nav-toggle:hover {
    background-color: var(--surface-tint);
    border-color: var(--clay);
    color: var(--accent-rust);
}

.nav-toggle:active {
    background-color: var(--clay);
    color: var(--bg-oat);
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.nav-toggle .icon-close { display: none; }

.nav-toggle[aria-expanded='true'] .icon-menu { display: none; }

.nav-toggle[aria-expanded='true'] .icon-close { display: inline-block; }

@media (max-width: 860px) {
    .header-inner {
        flex-direction: row;
        justify-content: center;
        padding: var(--space-sm) var(--space-md);
    }

    .nav-toggle { display: inline-flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--bg-oat);
        border-bottom: 2px solid var(--ink-charcoal);
        box-shadow: 0 12px 24px rgba(35, 31, 28, 0.12);
        padding: var(--space-lg) var(--space-md);
        gap: var(--space-sm);
    }

    .site-nav.is-open,
    .site-nav[aria-hidden='false'] { display: flex; }

    .nav-split {
        flex-direction: column;
        width: 100%;
        gap: var(--space-2xs);
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        border-bottom: 1px solid var(--line-edge);
        padding: var(--space-sm) var(--space-md);
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    font-family: var(--nomi-a3a);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--track-wider);
    padding: 0.85rem 1.6rem;
    min-height: 44px;
    cursor: pointer;
    text-decoration: none;
    line-height: var(--lh-snug);
    border: 1px solid transparent;
    transition: background-color var(--dur-fast) var(--ease-out),
                            border-color var(--dur-fast) var(--ease-out),
                            color var(--dur-fast) var(--ease-out),
                            box-shadow var(--dur-fast) var(--ease-out);
}

.btn:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.btn-primary {
    background-color: var(--accent-rust);
    color: #fff;
    border-color: var(--accent-rust);
}

.btn-primary:hover {
    background-color: var(--accent-rust-hover);
    border-color: var(--accent-rust-hover);
    color: #fff;
}

.btn-primary:active {
    background-color: var(--accent-rust-active);
    border-color: var(--accent-rust-active);
    color: #fff;
}

.btn-secondary {
    background-color: var(--ink-charcoal);
    color: var(--bg-oat);
    border-color: var(--ink-charcoal);
}

.btn-secondary:hover {
    background-color: #38332e;
    border-color: #38332e;
    color: #fff;
}

.btn-secondary:active {
    background-color: #110f0e;
    border-color: #110f0e;
}

.btn-outline {
    background-color: transparent;
    color: var(--ink-charcoal);
    border-color: var(--ink-charcoal);
}

.btn-outline:hover {
    background-color: var(--ink-charcoal);
    color: var(--bg-oat);
}

.btn-outline:active {
    background-color: #110f0e;
    color: #fff;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--fs-xs);
    min-height: 38px;
}

.btn-lg {
    padding: 1.1rem 2.2rem;
    font-size: var(--fs-base);
    min-height: 52px;
}

.btn-text {
    background: transparent;
    border: none;
    padding: 0;
    min-height: auto;
    color: var(--accent-rust);
    font-family: var(--nomi-a3a);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    text-decoration: underline;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease-out);
}

.btn-text:hover { color: var(--accent-rust-hover); }

.btn-text:active { color: var(--accent-rust-active); }

.btn-text:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;

}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.field-label {
    font-family: var(--nomi-c03);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--track-wider);
    color: var(--ink-charcoal);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-label .label-req { color: var(--terracotta); }

.field-label .label-opt {
    color: var(--ink-faint);
    font-weight: var(--fw-regular);
}

.field-input,
.field-select,
.field-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    min-height: 48px;
    background-color: var(--surface-warm-white);
    border: 1px solid var(--line-edge);
    color: var(--ink-charcoal);
    font-family: var(--nomi-baa);
    font-size: var(--fs-base);
    transition: border-color var(--dur-fast) var(--ease-out),
                            background-color var(--dur-fast) var(--ease-out),
                            box-shadow var(--dur-fast) var(--ease-out);
}

.field-input:hover,
.field-select:hover,
.field-textarea:hover { border-color: var(--clay); }

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
    outline: none;
    border-color: var(--accent-rust);
    box-shadow: 0 0 0 2px var(--accent-rust-subtle);
    background-color: #fff;
}

.field-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group.has-error .field-input,
.form-group.has-error .field-select,
.form-group.has-error .field-textarea {
    border-color: var(--error-crimson);
    background-color: var(--error-bg);
}

.field-error {
    display: none;
    font-family: var(--nomi-c03);
    font-size: var(--fs-xs);
    color: var(--error-crimson);
    margin-top: var(--space-2xs);
}

.form-group.has-error .field-error { display: block; }

.field-hint {
    font-size: var(--fs-xs);
    color: var(--ink-muted);
}

.field-checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    margin-bottom: var(--space-md);
    cursor: pointer;
}

.field-checkbox-wrap input[type='checkbox'] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 1px solid var(--ink-charcoal);
    background: var(--surface-warm-white);
    cursor: pointer;
    margin-top: 0.15rem;
    display: grid;
    place-content: center;
    transition: background-color var(--dur-fast) var(--ease-out),
                            border-color var(--dur-fast) var(--ease-out);
}

.field-checkbox-wrap input[type='checkbox']:hover { border-color: var(--accent-rust); }

.field-checkbox-wrap input[type='checkbox']:checked {
    background-color: var(--accent-rust);
    border-color: var(--accent-rust);
}

.field-checkbox-wrap input[type='checkbox']:checked::before {
    content: "";
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
}

.field-checkbox-wrap input[type='checkbox']:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.field-checkbox-label {
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    color: var(--ink-charcoal);
}

.form-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.dialogue-block {
    margin: var(--space-3xl) 0;
    border-top: 1px solid var(--line-edge);
    padding-top: var(--space-2xl);
}

.dialogue-customer {
    margin-bottom: var(--space-xl);
    padding: var(--space-md) var(--space-lg);
    background-color: var(--surface-tint);
    border-left: 4px solid var(--clay);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.dialogue-attribution {
    font-family: var(--nomi-c03);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--track-wider);
    color: var(--clay);
    font-weight: var(--fw-bold);
}

.dialogue-question {
    font-family: var(--nomi-a3a);
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    line-height: var(--lh-snug);
    color: var(--ink-charcoal);
}

.dialogue-answer {
    padding-left: clamp(0.5rem, 3vw, 2rem);
    border-left: 1px solid var(--line-edge);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.dialogue-reply-label {
    font-family: var(--nomi-c03);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--track-wider);
    color: var(--terracotta);
    font-weight: var(--fw-bold);
}

.dialogue-body {
    font-size: var(--fs-md);
    line-height: var(--lh-relaxed);
    color: var(--ink-charcoal);
    max-width: var(--reading-measure);
}

.dialogue-evidence-plate {
    margin: var(--space-md) 0 var(--space-lg);
    border: 1px solid var(--line-edge);
    background-color: var(--surface-warm-white);
}

.dialogue-evidence-plate figcaption {
    padding: var(--space-sm) var(--space-md);
    font-family: var(--nomi-c03);
    font-size: var(--fs-xs);
    color: var(--ink-muted);
    border-top: 1px solid var(--line-edge);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.annotated-diagram {
    margin: var(--space-3xl) 0;
    border: 1px solid var(--line-edge);
    background: var(--surface-warm-white);
    padding: var(--space-xl);
    position: relative;
}

.diagram-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid var(--ink-charcoal);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.diagram-title {
    font-family: var(--nomi-a3a);
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    text-transform: uppercase;
    letter-spacing: var(--track-tight);
}

.diagram-plate-id {
    font-family: var(--nomi-c03);
    font-size: var(--fs-xs);
    color: var(--clay);
    letter-spacing: var(--track-wider);
}

.diagram-figure {
    width: 100%;
    position: relative;
    background: var(--bg-oat);
    border: 1px solid var(--line-edge);
    overflow: hidden;
}

.diagram-svg {
    width: 100%;
    height: auto;
    display: block;
}

.diagram-callouts {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--line-edge);
}

@media (min-width: 768px) {
    .diagram-callouts { grid-template-columns: repeat(3, 1fr); }
}

.callout-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xs);
}

.callout-datum {
    font-family: var(--nomi-c03);
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    color: var(--accent-rust);
}

.callout-label {
    font-family: var(--nomi-a3a);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--track-wide);
    color: var(--ink-charcoal);
}

.callout-desc {
    font-size: var(--fs-sm);
    color: var(--ink-muted);
    line-height: var(--lh-snug);
}

.rail-section {
    margin: var(--space-3xl) 0;
    width: 100%;
    overflow: hidden;
}

.rail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--space-md);
}

.rail-track-wrap {
    position: relative;
    width: 100%;
}

.rail-track {
    display: flex;
    gap: var(--space-lg);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: var(--space-lg);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--clay) var(--surface-tint);
}

.rail-item {
    flex: 0 0 clamp(280px, 60vw, 420px);
    scroll-snap-align: start;
    border: 1px solid var(--line-edge);
    background-color: var(--surface-warm-white);
    display: flex;
    flex-direction: column;
}

.rail-item-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background-color: var(--surface-tint);
}

.rail-item-content {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.rail-item-caption {
    font-family: var(--nomi-a3a);
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
}

.rail-item-meta {
    font-family: var(--nomi-c03);
    font-size: var(--fs-xs);
    color: var(--clay);
    letter-spacing: var(--track-wider);
}

.rail-item-text {
    font-size: var(--fs-sm);
    color: var(--ink-muted);
    line-height: var(--lh-snug);
}

.rail-controls {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.rail-progress-bar {
    flex: 1;
    height: 2px;
    background-color: var(--line-edge);
    position: relative;
}

.rail-progress-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 25%;
    background-color: var(--accent-rust);
    transition: width var(--dur-fast) var(--ease-out), left var(--dur-fast) var(--ease-out);
}

.rail-nav-btn {
    background: var(--surface-tint);
    border: 1px solid var(--line-edge);
    color: var(--ink-charcoal);
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out),
                            border-color var(--dur-fast) var(--ease-out),
                            color var(--dur-fast) var(--ease-out);
}

.rail-nav-btn:hover {
    background-color: var(--clay);
    border-color: var(--clay);
    color: var(--bg-oat);
}

.rail-nav-btn:active {
    background-color: var(--accent-rust);
    border-color: var(--accent-rust);
}

.rail-nav-btn:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .rail-track {
        display: flex;
        flex-direction: column;
        overflow-x: visible;
    }
    .rail-item { flex: 1 1 auto; }
    .rail-controls { display: none; }
}

.model-stage-wrapper {
    margin: var(--space-3xl) 0;
    border: 1px solid var(--line-edge);
    background: var(--surface-warm-white);
    padding: var(--space-xl);
}

.model-stage-header {
    border-bottom: 1px solid var(--line-edge);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.model-stage-title {
    font-family: var(--nomi-a3a);
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--track-wide);
}

.model-stage-hint {
    font-family: var(--nomi-c03);
    font-size: var(--fs-xs);
    color: var(--clay);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
}

[data-model-stage] {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 320px;
    background-color: var(--surface-tint);
    border: 1px solid var(--line-edge);
    overflow: hidden;
    touch-action: pan-y;
}

[data-model-still] {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[data-model-canvas] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

[data-model-stage][data-model-live] [data-model-still] { display: none; }

[data-model-stage][data-model-live] [data-model-canvas] {
    opacity: 1;
    pointer-events: auto;
}

.estimator-widget {
    margin: var(--space-3xl) 0;
    border: 2px solid var(--ink-charcoal);
    background-color: var(--surface-paper);
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.estimator-title {
    font-family: var(--nomi-a3a);
    font-size: var(--fs-2xl);
    font-weight: var(--fw-extrabold);
    letter-spacing: var(--track-tight);
    margin-bottom: var(--space-2xs);
}

.estimator-subtitle {
    font-size: var(--fs-sm);
    color: var(--ink-muted);
    margin-bottom: var(--space-xl);
}

.estimator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

@media (min-width: 900px) {
    .estimator-grid { grid-template-columns: 1.2fr 0.8fr; }
}

.estimator-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.estimator-output-panel {
    background-color: var(--ink-charcoal);
    color: var(--bg-oat);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-lg);
    border: 1px solid var(--ink-charcoal);
}

.estimator-output-label {
    font-family: var(--nomi-c03);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--track-wider);
    color: var(--ink-on-dark-muted);
}

.estimator-output-figure {
    font-family: var(--nomi-c03);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: var(--fw-bold);
    color: #fff;
    line-height: var(--lh-tight);
    margin: var(--space-2xs) 0;
}

.estimator-output-subnote {
    font-family: var(--nomi-c03);
    font-size: var(--fs-sm);
    color: #f1a384;
}

.estimator-disclaimer {
    font-size: var(--fs-xs);
    line-height: var(--lh-snug);
    color: var(--ink-on-dark-muted);
    border-top: 1px solid rgba(232, 223, 208, 0.2);
    padding-top: var(--space-md);
}

.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.choice-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.choice-label input[type='radio'] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.choice-box {
    padding: 0.65rem 1rem;
    min-height: 44px;
    background-color: var(--bg-oat);
    border: 1px solid var(--line-edge);
    font-family: var(--nomi-a3a);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--ink-charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xs);
    transition: background-color var(--dur-fast) var(--ease-out),
                            border-color var(--dur-fast) var(--ease-out),
                            color var(--dur-fast) var(--ease-out);
}

.choice-label:hover .choice-box {
    border-color: var(--clay);
    background-color: var(--surface-warm-white);
}

.choice-label input[type='radio']:focus-visible + .choice-box {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.choice-label input[type='radio']:checked + .choice-box {
    background-color: var(--terracotta);
    border-color: var(--terracotta);
    color: #fff;
}

.slider-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.slider-val-readout {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.slider-val-figure {
    font-family: var(--nomi-c03);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--accent-rust);
}

.range-input {
    width: 100%;
    height: 8px;
    background: var(--surface-tint);
    border: 1px solid var(--line-edge);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--accent-rust);
    cursor: pointer;
    border: 1px solid var(--ink-charcoal);
    transition: background-color var(--dur-fast) var(--ease-out);
}

.range-input::-webkit-slider-thumb:hover { background: var(--accent-rust-hover); }

.range-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--accent-rust);
    cursor: pointer;
    border: 1px solid var(--ink-charcoal);
    transition: background-color var(--dur-fast) var(--ease-out);
}

.range-input:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.site-footer {
    margin-top: auto;
    background-color: var(--bg-oat);
    border-top: 2px solid var(--ink-charcoal);
    padding: var(--space-xl) clamp(1rem, 4vw, 2.5rem);
    display: flex;
    justify-content: center;
}

.footer-column {
    width: 100%;
    max-width: 860px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-sm);
}

.footer-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

.footer-brand .brand {
    display: inline-block;
    text-decoration: none;
    transition: opacity var(--dur-fast) var(--ease-out);
}

.footer-brand .brand:hover { opacity: 0.85; }

.footer-brand .brand:active { opacity: 0.7; }

.footer-brand .brand:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 4px;
}

.footer-brand img {
    height: 2.5rem;
    width: auto;
    max-height: 40px;
    object-fit: contain;
}

.footer-tagline {
    font-family: var(--nomi-a3a);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    color: var(--ink-charcoal);
    max-width: 68ch;
}

.footer-rule {
    width: 60px;
    height: 1px;
    background-color: var(--line-edge);
}

.footer-contact {
    font-style: normal;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-xs) var(--space-md);
    font-size: var(--fs-xs);
    color: var(--ink-muted);
}

.footer-contact .contact-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3xs);
}

.footer-contact a {
    color: var(--ink-charcoal);
    font-family: var(--nomi-c03);
    font-weight: var(--fw-bold);
    text-decoration: none;
    padding: 0 var(--space-3xs);
    transition: color var(--dur-fast) var(--ease-out);
}

.footer-contact a:hover { color: var(--accent-rust); }

.footer-contact a:active { color: var(--accent-rust-active); }

.footer-contact a:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
}

.footer-nav a {
    font-family: var(--nomi-a3a);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--track-wider);
    color: var(--ink-charcoal);
    text-decoration: none;
    padding: var(--space-3xs) var(--space-xs);
    transition: color var(--dur-fast) var(--ease-out);
}

.footer-nav a:hover { color: var(--accent-rust); }

.footer-nav a:active { color: var(--accent-rust-active); }

.footer-nav a:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-3xs) var(--space-sm);
    font-size: var(--fs-2xs);
    color: var(--ink-muted);
}

.footer-legal a {
    color: var(--ink-muted);
    text-decoration: none;
    padding: var(--space-3xs);
    transition: color var(--dur-fast) var(--ease-out);
}

.footer-legal a:hover {
    color: var(--accent-rust);
    text-decoration: underline;
}

.footer-legal a:active { color: var(--accent-rust-active); }

.footer-legal a:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.legal-sep { color: var(--line-edge); }

.footer-cookie-btn {
    font-family: var(--nomi-baa);
    font-size: var(--fs-2xs);
    color: var(--ink-muted);
    text-decoration: underline;
    padding: var(--space-3xs);
}

.footer-cookie-btn:hover { color: var(--accent-rust); }

.footer-cookie-btn:active { color: var(--accent-rust-active); }

.footer-copy {
    margin-top: var(--space-3xs);
    font-size: var(--fs-2xs);
    color: var(--ink-faint);
    line-height: var(--lh-snug);
}

.footer-subcopy { margin-top: 2px; }

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background-color: var(--ink-charcoal);
    color: var(--bg-oat);
    border-top: 2px solid var(--terracotta);
    padding: var(--space-sm) clamp(1rem, 3vw, 2rem);
    box-shadow: 0 -4px 16px rgba(35, 31, 28, 0.2);
    max-height: 20vh;
}

.cookie-banner[hidden] { display: none !important; }

.cookie-banner-inner {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.cookie-banner-copy { flex: 1; }

.cookie-banner-text {
    font-size: var(--fs-xs);
    line-height: var(--lh-snug);
    color: var(--bg-oat);
    max-width: none;
    margin: 0;
}

.cookie-policy-link {
    color: #fff;
    text-decoration: underline;
    font-weight: var(--fw-medium);
}

.cookie-policy-link:hover { color: var(--terracotta); }

.cookie-policy-link:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.cookie-banner .btn-outline {
    border-color: var(--line-edge);
    color: var(--bg-oat);
}

.cookie-banner .btn-outline:hover {
    background-color: var(--bg-oat);
    color: var(--ink-charcoal);
}

.cookie-banner .btn-outline:active {
    background-color: var(--surface-tint);
    color: var(--ink-charcoal);
}

@media (max-width: 640px) {
    .cookie-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
    .cookie-banner-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.chat-launcher {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: 850;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background-color: var(--ink-charcoal);
    color: var(--bg-oat);
    border: 1px solid var(--terracotta);
    padding: 0.75rem 1.15rem;
    min-height: 48px;
    cursor: pointer;
    box-shadow: var(--shadow-lift);
    font-family: var(--nomi-a3a);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--track-wider);
    transition: background-color var(--dur-fast) var(--ease-out),
                            border-color var(--dur-fast) var(--ease-out),
                            color var(--dur-fast) var(--ease-out),
                            transform var(--dur-fast) var(--ease-out),
                            bottom var(--dur-med) var(--ease-out);
}

.chat-launcher[hidden] { display: none !important; }

.chat-launcher:hover {
    background-color: var(--accent-rust);
    border-color: var(--accent-rust);
    color: #fff;
}

.chat-launcher:active {
    background-color: var(--accent-rust-active);
    transform: scale(0.97);
}

.chat-launcher:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

body:has(.cookie-banner:not([hidden])) .chat-launcher { bottom: calc(4.75rem + var(--space-md)); }

@media (max-width: 640px) {
    body:has(.cookie-banner:not([hidden])) .chat-launcher { bottom: calc(6.5rem + var(--space-sm)); }
}

.chat-launcher .icon-close { display: none; }

.chat-launcher[aria-expanded='true'] .icon-chat { display: none; }

.chat-launcher[aria-expanded='true'] .icon-close { display: inline-block; }

.chat-unread-badge {
    background-color: var(--accent-rust);
    color: #fff;
    font-family: var(--nomi-c03);
    font-size: var(--fs-2xs);
    font-weight: var(--fw-bold);
    padding: 2px 6px;
    line-height: 1;
}

.chat-unread-badge[hidden] { display: none !important; }

.chat-panel {
    position: fixed;
    bottom: calc(var(--space-lg) + 56px);
    right: var(--space-lg);
    z-index: 860;
    width: clamp(300px, 92vw, 380px);
    max-height: min(540px, 78vh);
    background-color: var(--surface-warm-white);
    border: 2px solid var(--ink-charcoal);
    box-shadow: 0 16px 36px rgba(35, 31, 28, 0.22);
    display: flex;
    flex-direction: column;
}

.chat-panel[hidden] { display: none !important; }

body:has(.cookie-banner:not([hidden])) .chat-panel { bottom: calc(5rem + 56px); }

@media (max-width: 640px) {
    .chat-panel {
        right: var(--space-sm);
        left: var(--space-sm);
        width: auto;
        bottom: calc(var(--space-sm) + 52px);
    }
    body:has(.cookie-banner:not([hidden])) .chat-panel { bottom: calc(6.5rem + 52px); }
}

.chat-panel-header {
    background-color: var(--ink-charcoal);
    color: var(--bg-oat);
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-panel-title {
    font-family: var(--nomi-a3a);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--track-wider);
}

.chat-panel-subtitle {
    font-family: var(--nomi-c03);
    font-size: var(--fs-2xs);
    color: var(--ink-on-dark-muted);
}

.chat-close-btn {
    background: transparent;
    border: none;
    color: var(--bg-oat);
    padding: var(--space-2xs);
    min-height: 36px;
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease-out),
                            background-color var(--dur-fast) var(--ease-out);
}

.chat-close-btn:hover {
    color: var(--accent-rust);
    background-color: rgba(255, 255, 255, 0.08);
}

.chat-close-btn:active { color: var(--accent-rust-active); }

.chat-close-btn:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.chat-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    background-color: var(--bg-oat);
}

.chat-step[hidden] { display: none !important; }

.chat-intro-note {
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    margin-bottom: var(--space-sm);
}

.chat-transcript {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-height: 180px;
    max-height: 280px;
    overflow-y: auto;
    padding: var(--space-xs);
    border: 1px solid var(--line-edge);
    background: var(--surface-warm-white);
}

.chat-msg {
    padding: var(--space-xs) var(--space-sm);
    max-width: 85%;
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
}

.chat-msg-operator {
    align-self: flex-start;
    background-color: var(--surface-tint);
    border-left: 2px solid var(--terracotta);
    color: var(--ink-charcoal);
}

.chat-msg-visitor {
    align-self: flex-end;
    background-color: var(--ink-charcoal);
    color: var(--bg-oat);
}

.chat-msg-time {
    display: block;
    font-family: var(--nomi-c03);
    font-size: var(--fs-2xs);
    color: var(--ink-faint);
    margin-top: var(--space-3xs);
}

.chat-panel-footer {
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--line-edge);
    background-color: var(--surface-warm-white);
}

.chat-send-form {
    display: flex;
    gap: var(--space-2xs);
}

.chat-send-input {
    flex: 1;
    min-height: 40px;
    padding: 0.5rem var(--space-xs);
    border: 1px solid var(--line-edge);
    background-color: #fff;
    font-size: var(--fs-sm);
}

.chat-send-input:focus {
    outline: none;
    border-color: var(--accent-rust);
}

.chat-send-btn {
    padding: 0.5rem 0.85rem;
    min-height: 40px;
    background-color: var(--accent-rust);
    color: #fff;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--dur-fast) var(--ease-out);
}

.chat-send-btn:hover { background-color: var(--accent-rust-hover); }

.chat-send-btn:active { background-color: var(--accent-rust-active); }

.chat-send-btn:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}
