/* =====================================================================
   platform.css – Styles for the interactive preference demo page
   Uses the same design tokens as styles.css
   ===================================================================== */

/* ── Layout ─────────────────────────────────────────────────────── */
.platform-page {
    background:
        radial-gradient(circle at top left, rgba(14, 124, 134, 0.12), transparent 30%),
        radial-gradient(circle at top right, rgba(240, 195, 108, 0.18), transparent 26%),
        linear-gradient(180deg, #f7f5f0 0%, #f6f5f1 24%, #f4f4ef 100%);
    background-repeat: no-repeat;
}

.platform-main {
    padding: 1.1rem 0 4rem;
    background: transparent;
}

.platform-view {
    display: none;
    container: platform-view / inline-size;
}

.platform-view--active,
.platform-view--entering,
.platform-view--leaving {
    display: block;
}

.platform-view--entering,
.platform-view--leaving {
    will-change: opacity, transform;
}

.platform-view--entering,
.platform-view--leaving {
    pointer-events: none;
}

.platform-view--entering.platform-view--direction-forward {
    animation: platformViewEnterForward 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.platform-view--entering.platform-view--direction-backward {
    animation: platformViewEnterBackward 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.platform-view--leaving.platform-view--direction-forward {
    animation: platformViewLeaveForward 0.22s cubic-bezier(0.4, 0, 1, 1) both;
}

.platform-view--leaving.platform-view--direction-backward {
    animation: platformViewLeaveBackward 0.22s cubic-bezier(0.4, 0, 1, 1) both;
}

@keyframes platformViewEnterForward {
    from {
        opacity: 0;
        transform: translate3d(24px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes platformViewEnterBackward {
    from {
        opacity: 0;
        transform: translate3d(-24px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes platformViewLeaveForward {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(-18px, 0, 0);
    }
}

@keyframes platformViewLeaveBackward {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(18px, 0, 0);
    }
}

@keyframes platformSpin {
    to {
        transform: rotate(360deg);
    }
}

.section-platform {
    margin-bottom: 0;
    padding: clamp(1.7rem, 3vw, 2.35rem);
}

.platform-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(20, 35, 49, 0.08);
}

.platform-header--questionnaire,
.platform-header--results {
    position: relative;
}

.platform-header::after {
    content: "";
    display: block;
    width: 3.8rem;
    height: 0.22rem;
    margin: 1rem auto 0;
    border-radius: 999px;
    background: rgba(14, 124, 134, 0.72);
}

.platform-header-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    justify-content: flex-end;
}

.section-platform .platform-header {
    margin-inline: auto;
}

.platform-header h1 {
    font-family: "Lora", serif;
    font-size: clamp(2rem, 3.8vw, 3rem);
    color: var(--ink-950);
    margin: 0.45rem auto 0;
    max-width: 14ch;
    line-height: 1.04;
}

.platform-subtitle {
    max-width: 46rem;
    margin: 0.85rem auto 0;
    color: var(--ink-700);
    font-size: 1.05rem;
    line-height: 1.72;
}

.platform-header--questionnaire .platform-subtitle {
    max-width: 48rem;
}

.platform-header-actions .btn {
    box-shadow: var(--shadow-sm);
}

.platform-header-actions .btn.btn-accent-outline,
.platform-main .btn.btn-accent-outline {
    box-shadow: none;
}

/* ── Questionnaire cards ────────────────────────────────────────── */
.questionnaire {
    container: questionnaire / inline-size;
    width: min(100%, 980px);
    min-inline-size: 0;
    max-width: 980px;
    margin: 0 auto;
}

.q-section-header {
    margin: 2.2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--teal);
    font-family: "Lora", serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ink-950);
}

.q-card {
    container: q-card / inline-size;
    position: relative;
    width: 100%;
    min-inline-size: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: clamp(0.95rem, 0.82rem + 1.05cqi, 1.55rem) clamp(0.9rem, 0.72rem + 1.3cqi, 1.6rem);
    margin-bottom: 1.2rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.98));
    backdrop-filter: blur(calc(var(--surface-blur) + 2px));
    -webkit-backdrop-filter: blur(calc(var(--surface-blur) + 2px));
    box-shadow: var(--shadow-sm);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.q-card--error {
    border-color: var(--rust);
    box-shadow: 0 0 0 3px rgba(210, 106, 70, 0.18);
}

.platform-status,
.form-alert {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(20, 35, 49, 0.08);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink-900);
    box-shadow: var(--shadow-sm);
}

.platform-status {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    max-width: min(100%, 44rem);
    margin-inline: auto;
}

.platform-status[hidden],
.form-alert[hidden] {
    display: none !important;
}

.platform-status__message {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-align: left;
    white-space: normal;
}

.platform-status--loading {
    border-color: rgba(14, 124, 134, 0.18);
    background: rgba(14, 124, 134, 0.08);
    color: var(--teal-deep);
}

.platform-status--loading .platform-status__message::before {
    content: "";
    display: inline-block;
    width: 0.95rem;
    height: 0.95rem;
    border: 2px solid rgba(14, 124, 134, 0.2);
    border-top-color: var(--teal);
    border-radius: 999px;
    animation: platformSpin 0.8s linear infinite;
}

.platform-status--error,
.form-alert {
    border-color: rgba(210, 106, 70, 0.28);
    background: rgba(210, 106, 70, 0.08);
    color: #8f381f;
}

.form-alert:focus-visible {
    outline: 3px solid rgba(210, 106, 70, 0.2);
    outline-offset: 3px;
}

.q-label {
    display: block;
    max-width: 100%;
    min-inline-size: 0;
    font-family: "Lora", serif;
    font-weight: 600;
    font-size: clamp(0.98rem, 0.92rem + 0.4cqi, 1.08rem);
    line-height: 1.35;
    color: var(--ink-950);
    margin-bottom: 0.6rem;
    padding: 0;
    float: left;
    width: 100%;
}

.questionnaire[aria-busy="true"] .q-section-header,
.questionnaire[aria-busy="true"] .q-card,
.questionnaire[aria-busy="true"] .q-actions {
    opacity: 0.72;
}

.questionnaire button:disabled,
.questionnaire input:disabled {
    cursor: not-allowed;
}

.questionnaire .btn:disabled {
    opacity: 0.72;
    box-shadow: none;
}

.q-hint,
.q-options {
    clear: both;
}

.q-hint {
    font-size: clamp(0.81rem, 0.77rem + 0.28cqi, 0.88rem);
    color: var(--ink-500);
    margin-bottom: 0.7rem;
    font-style: italic;
}

.q-options {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-inline-size: 0;
}

.q-option {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: start;
    column-gap: clamp(0.42rem, 0.36rem + 0.45cqi, 0.55rem);
    row-gap: 0;
    min-inline-size: 0;
    padding: clamp(0.54rem, 0.48rem + 0.5cqi, 0.7rem) clamp(0.62rem, 0.54rem + 0.65cqi, 0.85rem);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: clamp(0.88rem, 0.83rem + 0.35cqi, 0.95rem);
    line-height: 1.42;
    color: var(--ink-900);
    background: transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.q-option:hover {
    background: rgba(14, 124, 134, 0.06);
    border-color: rgba(14, 124, 134, 0.16);
    transform: translateX(2px);
}

.q-option input[type="radio"],
.q-option input[type="checkbox"] {
    accent-color: var(--teal);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.q-option span {
    display: inline-block;
    font-weight: 700;
    color: var(--teal-deep);
    min-width: clamp(1.45rem, 1.2rem + 0.75cqi, 2rem);
}

.q-actions {
    container: q-actions / inline-size;
    width: min(100%, 22rem);
    margin-inline: auto;
    margin-top: 2rem;
    text-align: center;
}

.btn-lg {
    min-height: 3.6rem;
    padding: 1rem 2.2rem;
    font-size: 1.1rem;
    gap: 0.5rem;
}

.q-actions .btn,
.platform-header-actions .btn,
.reported-header-meta .btn,
.back-actions .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    text-wrap: balance;
}

.q-actions .btn.btn-lg {
    width: 100%;
    min-height: clamp(3rem, 2.7rem + 1.6cqi, 3.6rem);
    padding-inline: clamp(1rem, 0.85rem + 4.6cqi, 2.2rem);
    font-size: clamp(0.98rem, 0.93rem + 0.75cqi, 1.1rem);
    line-height: 1.16;
}

/* ── Gauge ──────────────────────────────────────────────────────── */
.gauge-container {
    container: gauge / inline-size;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.6rem;
    padding: clamp(1.15rem, 1rem + 0.6vw, 1.45rem) clamp(1rem, 0.9rem + 0.5vw, 1.5rem) clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
    border: 1px solid rgba(20, 35, 49, 0.08);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(237, 243, 240, 0.92));
    box-shadow: var(--shadow-sm);
}

.gauge-wrap {
    position: relative;
    width: min(300px, 100%);
    text-align: center;
}

.gauge-svg {
    width: 100%;
    height: auto;
}

.gauge-bg {
    stroke: var(--mist);
    stroke-width: 16;
}

.gauge-fill {
    stroke: var(--teal);
    stroke-width: 16;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                stroke 0.4s ease;
}

.gauge-value {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Lora", serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--teal);
    line-height: 1;
    transition: color 0.4s ease;
}

.gauge-label {
    margin-top: 0.3rem;
    font-size: 0.88rem;
    color: var(--ink-500);
}

.gauge-comparison {
    margin-top: 0.8rem;
    min-height: 2.45rem;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    line-height: 1.2;
    text-align: center;
}

.gauge-comparison i,
.true-prefs-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.gauge-comparison--match {
    background: rgba(14, 124, 134, 0.1);
    color: var(--teal-deep);
}

.gauge-comparison--down {
    background: rgba(210, 106, 70, 0.12);
    color: #b84a2a;
}

.gauge-comparison--up {
    background: rgba(14, 124, 134, 0.1);
    color: var(--teal-deep);
}

/* ── True preferences banner ────────────────────────────────────── */
.true-prefs-banner {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(237, 243, 240, 0.88));
    border: 1px solid var(--line);
    border-top: 4px solid var(--teal);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(calc(var(--surface-blur) + 2px));
    -webkit-backdrop-filter: blur(calc(var(--surface-blur) + 2px));
    box-shadow: var(--shadow-sm);
}

.true-prefs-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--teal-deep);
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.true-prefs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pref-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    padding: 0.45rem 0.85rem;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(20, 35, 49, 0.08);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    line-height: 1.4;
}

.pref-chip-label {
    font-weight: 700;
    color: var(--ink-700);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
}

.pref-chip-value {
    color: var(--ink-950);
    font-weight: 500;
}

/* ── Reported preferences section ───────────────────────────────── */
.reported-section {
    container: reported-section / inline-size;
    margin-bottom: 1.25rem;
    padding: clamp(1rem, 0.92rem + 0.4vw, 1.2rem);
    border: 1px solid rgba(20, 35, 49, 0.08);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.98));
    box-shadow: var(--shadow-sm);
}

.reported-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding: 0 0 0.95rem;
    position: sticky;
    top: 5.25rem;
    z-index: 12;
    border-bottom: 1px solid rgba(20, 35, 49, 0.08);
    background: transparent;
}

.reported-header h2 {
    font-family: "Lora", serif;
    font-size: 1.5rem;
    color: var(--ink-950);
}

.reported-header-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.probability-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.4rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--teal-deep);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
    text-wrap: balance;
    max-width: 100%;
}

.probability-pill-label,
.probability-pill-value {
    display: inline-flex;
    align-items: center;
}

.probability-pill-value {
    font-variant-numeric: tabular-nums;
}

.probability-pill--high {
    border-color: rgba(14, 124, 134, 0.22);
    color: var(--teal-deep);
}

.probability-pill--mid {
    border-color: rgba(212, 168, 67, 0.24);
    color: #966f16;
}

.probability-pill--low {
    border-color: rgba(210, 106, 70, 0.28);
    color: #a24628;
}

.btn-sm {
    min-height: 2.4rem;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    gap: 0.35rem;
    line-height: 1;
}

.reported-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: 1.1rem;
}

.toggle-card {
    container: toggle-card / inline-size;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: clamp(1rem, 0.92rem + 0.35vw, 1.2rem) clamp(1rem, 0.94rem + 0.3vw, 1.25rem);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.98));
    backdrop-filter: blur(calc(var(--surface-blur) + 2px));
    -webkit-backdrop-filter: blur(calc(var(--surface-blur) + 2px));
    box-shadow: none;
}

.toggle-card-title {
    font-family: "Lora", serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink-950);
    margin-bottom: 0.8rem;
}

.toggle-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--ink-700);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.18;
    text-align: center;
    white-space: normal;
    text-wrap: balance;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    border-color: var(--teal);
    color: var(--teal-deep);
}

.toggle-btn:focus-visible {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(14, 124, 134, 0.16);
}

.toggle-btn.active {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

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

.toggle-btn.diff:not(.active) {
    border-color: var(--rust);
    color: var(--rust);
    background: rgba(210, 106, 70, 0.08);
}

/* ── Back / actions ─────────────────────────────────────────────── */
.back-actions {
    text-align: center;
    margin-top: 1.8rem;
}

.method-note {
    margin-top: 0.4rem;
    font-size: 0.95rem;
    color: var(--ink-500);
    max-width: 44rem;
    margin-inline: auto;
}

.demo-disclaimer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--ink-500);
    background: rgba(20, 35, 49, 0.05);
    border: 1px solid rgba(20, 35, 49, 0.08);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.2rem;
    display: inline-block;
    line-height: 1.55;
}

.demo-disclaimer i {
    margin-right: 0.3rem;
    font-size: 0.72rem;
    opacity: 0.7;
}

@container platform-view (max-width: 52rem) {
    .platform-header {
        margin-bottom: 1.6rem;
        padding-bottom: 1rem;
    }

    .platform-header-actions {
        position: static;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .platform-header h1 {
        max-width: 100%;
        font-size: clamp(1.95rem, 7cqi, 2.55rem);
    }

    .platform-subtitle {
        font-size: 0.98rem;
        line-height: 1.62;
    }

    .platform-subtitle br,
    .demo-disclaimer br {
        display: none;
    }

    .platform-status {
        display: flex;
        width: 100%;
        max-width: none;
    }

    .true-prefs-banner {
        padding: 0.95rem 1rem;
    }

    .true-prefs-chips {
        gap: 0.35rem;
    }

    .pref-chip {
        font-size: 0.76rem;
        padding: 0.35rem 0.65rem;
    }

    .method-note {
        font-size: 0.9rem;
    }
}

@container platform-view (max-width: 38rem) {
    .section-platform {
        padding: 1.4rem;
    }

    .q-section-header {
        margin-top: 1.85rem;
        font-size: 1.08rem;
    }

    .platform-header-actions,
    .reported-header-meta {
        width: 100%;
    }

    .platform-header-actions .btn,
    .reported-header-meta .btn,
    .back-actions .btn,
    .q-actions .btn {
        width: 100%;
    }
}

@container questionnaire (max-width: 42rem) {
    .q-card {
        margin-bottom: 1rem;
    }

    .q-actions {
        margin-top: 1.65rem;
    }
}

@container questionnaire (max-width: 30rem) {
    .q-card {
        padding: 0.95rem 0.9rem;
    }

    .q-option {
        padding: 0.54rem 0.6rem;
    }
}

@container q-card (max-width: 28rem) {
    .q-label {
        font-size: 1.02rem;
    }

    .q-option {
        gap: 0.5rem;
    }

    .q-option input[type="radio"],
    .q-option input[type="checkbox"] {
        margin-top: 0.25rem;
    }

    .q-option span {
        min-width: 1.75rem;
    }
}

@container q-card (max-width: 22rem) {
    .q-label {
        line-height: 1.3;
    }

    .q-hint {
        margin-bottom: 0.6rem;
    }

    .q-option {
        gap: 0.45rem;
        padding: 0.56rem 0.62rem;
        font-size: 0.9rem;
    }

    .q-option span {
        min-width: 1.55rem;
    }
}

@container q-actions (max-width: 22rem) {
    .q-actions .btn.btn-lg {
        width: 100%;
    }
}

@container gauge (max-width: 24rem) {
    .gauge-wrap {
        width: min(210px, 100%);
    }

    .gauge-value {
        font-size: 2rem;
    }

    .gauge-comparison {
        width: 100%;
    }

    .demo-disclaimer {
        display: block;
        width: 100%;
        padding: 0.75rem 0.9rem;
    }
}

@container reported-section (max-width: 42rem) {
    .reported-header {
        flex-direction: column;
        gap: 0.5rem;
        position: static;
        padding: 0;
        border-bottom: none;
        background: transparent;
    }

    .reported-header-meta {
        justify-content: center;
        margin-left: 0;
        width: 100%;
    }

    .probability-pill {
        width: 100%;
        justify-content: center;
    }
}

@container toggle-card (max-width: 18rem) {
    .toggle-options {
        display: grid;
        grid-template-columns: 1fr;
    }

    .toggle-btn {
        width: 100%;
    }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .platform-main {
        padding: 1rem 0 3rem;
    }

    .section-platform {
        padding: 1.45rem;
    }

    .platform-header {
        margin-bottom: 1.6rem;
        padding-bottom: 1rem;
    }

    .platform-header h1 {
        font-size: clamp(1.95rem, 8vw, 2.55rem);
    }

    .platform-subtitle {
        font-size: 0.98rem;
        line-height: 1.62;
    }

    .platform-subtitle br,
    .demo-disclaimer br {
        display: none;
    }

    .q-section-header {
        margin-top: 1.85rem;
        font-size: 1.08rem;
    }

    .q-card {
        padding: 1.2rem 1rem;
    }

    .q-label {
        font-size: 1.02rem;
    }

    .q-option {
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.65rem 0.75rem;
    }

    .q-option input[type="radio"],
    .q-option input[type="checkbox"] {
        margin-top: 0.25rem;
    }

    .q-option span {
        min-width: 1.75rem;
    }

    .gauge-container {
        padding: 1.2rem 1rem 1.1rem;
    }

    .gauge-wrap {
        width: 220px;
    }

    .gauge-value {
        font-size: 2.2rem;
        top: 55%;
    }

    .gauge-comparison {
        width: 100%;
    }

    .reported-grid {
        grid-template-columns: 1fr;
    }

    .reported-header {
        flex-direction: column;
        gap: 0.5rem;
        position: static;
        padding: 0;
        border-bottom: none;
        background: transparent;
    }

    .platform-header-actions {
        position: static;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .reported-header-meta {
        justify-content: center;
        margin-left: 0;
        width: 100%;
    }

    .method-note {
        font-size: 0.9rem;
    }

    .platform-status {
        display: flex;
        width: 100%;
        max-width: none;
    }

    .reported-section,
    .gauge-container {
        padding-inline: 1rem;
    }

    .true-prefs-banner {
        padding: 0.95rem 1rem;
    }

    .true-prefs-chips {
        gap: 0.35rem;
    }

    .pref-chip {
        font-size: 0.76rem;
        padding: 0.35rem 0.65rem;
    }

    .toggle-card {
        padding: 1rem;
    }

    .demo-disclaimer {
        display: block;
        width: 100%;
        padding: 0.75rem 0.9rem;
    }

    .platform-header-actions .btn,
    .back-actions .btn {
        white-space: normal;
    }
}

@media (max-width: 560px) {
    .platform-main {
        padding-bottom: 2.5rem;
    }

    .platform-header-actions,
    .reported-header-meta {
        width: 100%;
    }

    .platform-header-actions .btn,
    .reported-header-meta .btn,
    .back-actions .btn,
    .q-actions .btn {
        width: 100%;
    }

    .platform-status,
    .form-alert {
        width: 100%;
        max-width: none;
    }

    .gauge-wrap {
        width: min(210px, 100%);
    }

    .gauge-value {
        font-size: 2rem;
    }

    .probability-pill {
        width: 100%;
        white-space: normal;
    }

    .reported-header-meta {
        gap: 0.75rem;
    }

    .true-prefs-title {
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .section-platform {
        padding: 1.35rem;
    }

    .q-card {
        padding: 1rem;
    }

    .platform-header h1 {
        max-width: 100%;
    }

    .toggle-btn {
        font-size: 0.76rem;
        padding: 0.35rem 0.6rem;
    }

    .probability-pill {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .platform-view--entering.platform-view--direction-forward,
    .platform-view--entering.platform-view--direction-backward,
    .platform-view--leaving.platform-view--direction-forward,
    .platform-view--leaving.platform-view--direction-backward {
        animation: none;
    }

    .platform-status--loading .platform-status__message::before {
        animation: none;
    }
}
