:root {
    --burden-canvas: #f7f8fa;
    --burden-surface: #ffffff;
    --burden-subtle: #f1f3f4;
    --burden-soft: #f3f6f6;
    --burden-selected: #eef6f6;
    --burden-info: #f1f6f7;
    --burden-success: #f1f6f2;
    --burden-warm: #faf6ea;
    --burden-ink: #202124;
    --burden-text: #3c4043;
    --burden-muted: #5f6368;
    --burden-brand: #176b74;
    --burden-brand-dark: #10565d;
    --burden-focus: #0b66a0;
    --burden-radius: 1rem;
    --burden-control-radius: 0.75rem;
}

* {
    box-sizing: border-box;
}

body.tool-standard-ui.burden-tool {
    padding-top: calc(var(--header-height, 4.0625rem) + env(safe-area-inset-top, 0px));
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    background: var(--burden-canvas);
    color: var(--burden-text);
    scrollbar-gutter: stable;
}

.burden-tool .container {
    width: min(100% - 2rem, 48rem);
    max-width: 48rem;
    margin-inline: auto;
    padding-inline: 0;
}

.burden-tool .header {
    position: relative;
    z-index: 10;
    margin: 0;
    padding: clamp(1.5rem, 4vw, 2.25rem) 1rem;
    background: var(--burden-info);
    text-align: center;
}

.burden-tool .header .container {
    width: min(100%, 48rem);
}

.burden-tool .header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin: 0;
    color: var(--burden-ink);
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    line-height: 1.28;
    word-break: keep-all;
}

.burden-tool .header h1 .emoji {
    font-size: 1.15em;
    line-height: 1;
}

.burden-tool .header p {
    max-width: 40rem;
    margin: 0.7rem auto 0;
    color: var(--burden-muted);
    font-size: 1rem;
    line-height: 1.7;
    word-break: keep-all;
}

.burden-main {
    padding-block: clamp(1rem, 3vw, 2rem) 4rem;
}

.tool-panel,
.result-panel {
    padding: clamp(1.1rem, 3vw, 2rem);
    border: 0;
    border-radius: var(--burden-radius);
    background: var(--burden-surface);
    box-shadow: none;
}

#intro-card[hidden],
#question-flow[hidden],
#result-card[hidden] {
    display: none !important;
}

.burden-tool .btn {
    min-height: 2.75rem;
    border: 0;
    border-radius: var(--burden-control-radius);
    font: inherit;
    font-weight: 750;
    line-height: 1.3;
    cursor: pointer;
}

.burden-tool .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.72rem 1rem;
    box-shadow: none;
}

.burden-tool .btn-primary {
    background: var(--burden-brand);
    color: #fff;
}

.burden-tool .btn-secondary {
    background: var(--burden-subtle);
    color: var(--burden-ink);
}

.burden-tool .btn:disabled {
    cursor: not-allowed;
    opacity: 0.46;
}

.burden-tool .btn:focus-visible,
.response-choice:has(input:focus),
.response-choice:has(input:focus-visible),
.safety-followup__choice:has(input:focus-visible),
.all-scenes-details summary:focus-visible,
.result-safety-card a:focus-visible,
.next-tool-card:focus-visible {
    outline: 3px solid var(--burden-focus);
    outline-offset: 3px;
}

.intro-heading-row {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
}

.intro-hero-emoji {
    font-size: 4rem;
    line-height: 1;
    text-align: center;
}

.intro-heading-copy h2 {
    margin: 0;
    color: var(--burden-ink);
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    line-height: 1.45;
    word-break: keep-all;
}

.intro-heading-copy p {
    margin: 0.55rem 0 0;
    color: var(--burden-muted);
    line-height: 1.7;
}

.intro-principle {
    margin-top: 1.5rem;
    padding: 1.15rem 1.25rem;
    border-radius: var(--burden-control-radius);
    background: var(--burden-warm);
}

.intro-principle strong {
    color: var(--burden-ink);
    font-size: 1.05rem;
}

.intro-principle p {
    margin: 0.45rem 0 0;
    line-height: 1.72;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.feature-item {
    display: grid;
    grid-template-columns: 2.7rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    min-width: 0;
    padding: 1rem;
    border: 0;
    border-radius: var(--burden-control-radius);
    background: var(--burden-soft);
    box-shadow: none;
}

.feature-icon {
    font-size: 2.2rem;
    line-height: 1.1;
    text-align: center;
}

.feature-item h3 {
    margin: 0;
    color: var(--burden-ink);
    font-size: 1rem;
    line-height: 1.45;
}

.feature-item p {
    margin: 0.3rem 0 0;
    color: var(--burden-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.scene-prompt {
    display: grid;
    grid-template-columns: 2.2rem minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: var(--burden-control-radius);
    background: var(--burden-info);
}

.scene-prompt > span {
    font-size: 1.8rem;
    line-height: 1.2;
}

.scene-prompt p {
    margin: 0;
    line-height: 1.7;
}

.scene-prompt strong {
    color: var(--burden-ink);
}

.tool-time-note,
.privacy-notice {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.45rem;
    color: var(--burden-muted);
    text-align: center;
}

.tool-time-note {
    margin: 1.15rem 0 0;
    font-size: 0.92rem;
}

.intro-start-btn,
.restart-btn {
    width: fit-content;
    min-width: 13rem;
    margin: 1.15rem auto 0;
}

.privacy-notice {
    margin: 1rem 0 0;
    font-size: 0.86rem;
    line-height: 1.6;
}

.question-flow {
    min-width: 0;
}

.progress-indicator-wrapper {
    padding: 0.8rem 1rem;
}

.progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--burden-ink);
    font-size: 0.92rem;
}

.progress-track {
    height: 0.5rem;
    margin-top: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e6e8;
}

.progress-bar {
    width: 5%;
    height: 100%;
    border-radius: inherit;
    background: var(--burden-brand);
    transition: width 180ms ease;
}

.question-card {
    min-width: 0;
    padding: 1rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none !important;
}

.question-instruction {
    margin: 0.9rem 0 0;
    padding: 0.9rem 1rem;
    border-radius: var(--burden-control-radius);
    background: var(--burden-soft);
    color: var(--burden-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: center;
}

.question-wrapper {
    min-height: 24rem;
    margin-top: 1rem;
}

.question-shell {
    min-width: 0;
    padding: 1.25rem;
    border: 0;
    border-radius: var(--burden-radius);
    background: var(--burden-surface);
    box-shadow: none;
}

.question-area-label {
    margin: 0;
    color: var(--burden-brand-dark);
    font-size: 0.88rem;
    font-weight: 750;
    line-height: 1.45;
}

.question-heading {
    display: grid;
    grid-template-columns: 3.4rem minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    margin-top: 0.8rem;
}

.question-emoji {
    display: block;
    font-size: 2.65rem;
    line-height: 1.1;
    text-align: center;
}

.question-copy {
    margin: 0;
    color: var(--burden-text);
    font-size: clamp(1.07rem, 2vw, 1.2rem);
    font-weight: 500;
    line-height: 1.68;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.question-copy strong {
    color: var(--burden-ink);
    font-weight: 800;
}

.response-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 1.25rem;
}

.response-choice {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 7.6rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.85rem 0.55rem;
    border: 0;
    border-radius: var(--burden-control-radius);
    background: var(--burden-subtle);
    cursor: pointer;
    text-align: center;
}

body.tool-standard-ui .response-choice {
    color: var(--burden-text);
}

.response-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.response-choice__emoji {
    font-size: 2.55rem;
    line-height: 1;
}

.response-choice__label {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.42;
    word-break: keep-all;
}

.response-choice:has(input:checked) {
    background: var(--burden-selected);
    color: var(--burden-ink);
}

.response-choice:has(input:checked)::after {
    content: "✓";
    position: absolute;
    top: 0.55rem;
    right: 0.6rem;
    color: var(--burden-brand);
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
}

.response-choice:has(input:checked) .response-choice__label {
    font-weight: 850;
}

.question-nav {
    display: flex;
    gap: 0.65rem;
    justify-content: center;
    margin-top: 0.9rem;
}

#prev-btn,
#next-btn {
    flex: 1 1 0;
    min-width: 10rem;
}

.safety-followup {
    min-width: 0;
    margin: 1rem 0 0;
    padding: 1rem;
    border: 0;
    border-radius: var(--burden-control-radius);
    background: var(--burden-warm);
}

.safety-followup legend {
    padding: 0;
    color: var(--burden-ink);
    font-weight: 800;
    line-height: 1.55;
}

.safety-followup > p {
    margin: 0.35rem 0 0;
    color: var(--burden-muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.safety-followup__choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.safety-followup__choice {
    display: flex;
    min-width: 0;
    min-height: 2.75rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.65rem;
    background: var(--burden-surface);
    cursor: pointer;
    line-height: 1.45;
}

.safety-followup__choice input {
    flex: 0 0 auto;
    inline-size: 1.1rem;
    block-size: 1.1rem;
    accent-color: var(--burden-brand);
}

.result-panel {
    display: grid;
    gap: 1rem;
    background: transparent;
    padding: 0;
}

.result-header,
.response-summary,
.domain-summary,
.priority-section,
.result-safety-card,
.result-next-tools {
    padding: clamp(1.1rem, 3vw, 1.5rem);
    border: 0;
    border-radius: var(--burden-radius);
    background: var(--burden-surface);
    box-shadow: none;
}

.result-header {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    background: var(--burden-info);
}

.result-safety-card {
    background: var(--burden-warm);
}

.result-safety-card p {
    margin: 0.55rem 0 0;
    line-height: 1.65;
}

.result-safety-card ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.result-safety-card a {
    display: inline-flex;
    min-width: 2.75rem;
    min-height: 2.75rem;
    align-items: center;
    color: var(--burden-brand-dark);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.excluded-counts {
    margin: 0.8rem 0 0;
    color: var(--burden-muted);
    font-size: 0.86rem;
    line-height: 1.55;
    text-align: center;
}

.result-hero-emoji {
    font-size: 4.5rem;
    line-height: 1;
    text-align: center;
}

.result-header h2 {
    margin: 0;
    color: var(--burden-ink);
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    line-height: 1.4;
}

.result-header p {
    margin: 0.55rem 0 0;
    color: var(--burden-muted);
    line-height: 1.65;
}

.result-panel h3 {
    margin: 0;
    color: var(--burden-ink);
    font-size: 1.15rem;
    line-height: 1.5;
}

.summary-count-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 1rem;
}

.summary-count {
    min-width: 0;
    padding: 1rem 0.65rem;
    border-radius: var(--burden-control-radius);
    background: var(--burden-soft);
    text-align: center;
}

.summary-count--clear {
    background: var(--burden-success);
}

.summary-count--mixed {
    background: var(--burden-warm);
}

.summary-count > span {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.summary-count strong {
    display: block;
    margin-top: 0.45rem;
    color: var(--burden-ink);
    font-size: 1.45rem;
}

.summary-count small {
    display: block;
    margin-top: 0.3rem;
    color: var(--burden-muted);
    font-size: 0.82rem;
    line-height: 1.42;
    word-break: keep-all;
}

#domain-results,
.priority-scenes {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.domain-row {
    padding: 0.9rem 1rem;
    border-radius: var(--burden-control-radius);
    background: var(--burden-soft);
}

.domain-row__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    color: var(--burden-ink);
    font-weight: 750;
    line-height: 1.45;
}

.domain-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    margin-top: 0.5rem;
    color: var(--burden-muted);
    font-size: 0.85rem;
}

.domain-count {
    font-weight: 700;
}

.domain-count strong {
    color: var(--burden-ink);
}

.priority-section > p {
    margin: 0.45rem 0 0;
    color: var(--burden-muted);
    line-height: 1.65;
}

.scene-card {
    padding: 1rem;
    border: 0;
    border-radius: var(--burden-control-radius);
    background: var(--burden-soft);
}

.scene-card__answer {
    margin: 0;
    color: var(--burden-brand-dark);
    font-size: 0.83rem;
    font-weight: 800;
}

.scene-card h3 {
    margin: 0.35rem 0 0;
    color: var(--burden-ink);
    font-size: 1.04rem;
    line-height: 1.55;
}

.scene-card__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.scene-card__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.7rem;
}

.scene-detail {
    min-width: 0;
    padding: 0.75rem;
    border-radius: 0.65rem;
    background: var(--burden-surface);
}

.scene-detail--repair {
    background: var(--burden-success);
}

.scene-detail--release {
    background: var(--burden-info);
}

.scene-detail strong {
    display: block;
    color: var(--burden-ink);
    font-size: 0.86rem;
}

.scene-detail p {
    margin: 0.3rem 0 0;
    font-size: 0.9rem;
    line-height: 1.55;
}

.scene-action,
.scene-empty,
.empty-scene-note {
    margin: 0.7rem 0 0;
    padding: 0.8rem;
    border-radius: 0.65rem;
    background: var(--burden-info);
    line-height: 1.6;
}

.scene-action strong {
    color: var(--burden-brand-dark);
}

.all-scenes-details {
    margin-top: 0.85rem;
}

.all-scenes-details summary {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.9rem;
    border-radius: var(--burden-control-radius);
    background: var(--burden-subtle);
    color: var(--burden-ink);
    cursor: pointer;
    font-weight: 800;
    line-height: 1.45;
}

.priority-scenes--extra {
    margin-top: 0.7rem;
}

.next-tool-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.next-tool-card {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    min-height: 4.8rem;
    padding: 0.95rem 1rem;
    border: 0;
    border-radius: var(--burden-control-radius);
    background: var(--burden-soft);
    color: var(--burden-text);
    text-decoration: none;
}

.next-tool-card > span:first-child {
    font-size: 1.75rem;
    line-height: 1.2;
    text-align: center;
}

.next-tool-card strong,
.next-tool-card small {
    display: block;
}

.next-tool-card strong {
    color: var(--burden-ink);
    line-height: 1.45;
}

.next-tool-card small {
    margin-top: 0.25rem;
    color: var(--burden-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.restart-btn {
    display: flex !important;
}

.result-disclaimer {
    margin: 0;
    padding: 0.7rem 1rem;
    color: var(--burden-muted);
    font-size: 0.84rem;
    line-height: 1.65;
    text-align: center;
}

.notification {
    position: fixed;
    left: 50%;
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 1700;
    max-width: min(90vw, 30rem);
    padding: 0.75rem 1rem;
    border-radius: var(--burden-control-radius);
    background: var(--burden-ink);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 0.6rem);
    transition: opacity 160ms ease, transform 160ms ease;
}

.notification.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (hover: hover) and (pointer: fine) {
    .burden-tool .btn:not(:disabled):hover,
    .response-choice:hover,
    .next-tool-card:hover {
        background: var(--burden-selected);
        color: var(--burden-ink);
    }

    .burden-tool .btn-primary:not(:disabled):hover {
        background: var(--burden-brand-dark);
        color: #fff;
    }
}

@media (max-width: 48rem) {
    body.tool-standard-ui.burden-tool {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }

    .burden-tool .container {
        width: min(100% - 1rem, 48rem);
    }

    .burden-tool .header {
        padding-block: 1.3rem;
    }

    .burden-tool .header p {
        font-size: 0.94rem;
    }

    .burden-main {
        padding-block: 0.75rem calc(5.7rem + env(safe-area-inset-bottom));
    }

    .tool-panel {
        padding: 1rem;
    }

    .intro-heading-row {
        grid-template-columns: 3.5rem minmax(0, 1fr);
        align-items: start;
    }

    .intro-hero-emoji {
        font-size: 3.2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .feature-item {
        grid-template-columns: 2.35rem minmax(0, 1fr);
        padding: 0.85rem;
    }

    .feature-icon {
        font-size: 1.95rem;
    }

    .question-card {
        padding: 0.5rem;
    }

    .question-shell {
        padding: 1rem;
    }

    .question-heading {
        grid-template-columns: 3rem minmax(0, 1fr);
        gap: 0.7rem;
    }

    .question-emoji {
        font-size: 2.35rem;
    }

    .response-grid {
        gap: 0.5rem;
    }

    .response-choice {
        min-height: 7.2rem;
        padding-inline: 0.35rem;
    }

    .response-choice__emoji {
        font-size: 2.25rem;
    }

    .response-choice__label {
        font-size: 0.84rem;
    }

    .question-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1050;
        margin: 0;
        padding: 0.65rem calc(5rem + env(safe-area-inset-right)) calc(0.65rem + env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
        background: rgba(255, 255, 255, 0.97);
    }

    #prev-btn,
    #next-btn {
        width: auto;
        min-width: 0;
    }

    .result-header {
        grid-template-columns: 4rem minmax(0, 1fr);
        padding: 1rem;
    }

    .result-hero-emoji {
        font-size: 3.6rem;
    }

    .summary-count-grid {
        gap: 0.5rem;
    }

    .summary-count {
        padding: 0.85rem 0.35rem;
    }

    .summary-count strong {
        font-size: 1.25rem;
    }

    .scene-card__grid,
    .scene-card__actions {
        grid-template-columns: 1fr;
    }

    .restart-btn {
        width: calc(100% - 2rem);
        min-width: 0;
    }

    .notification {
        bottom: calc(5.3rem + env(safe-area-inset-bottom));
    }
}

@media (max-width: 25rem) {
    .response-grid,
    .safety-followup__choices,
    .summary-count-grid {
        grid-template-columns: 1fr;
    }

    .response-choice {
        min-height: 4.8rem;
        align-items: center;
        justify-content: flex-start;
        flex-direction: row;
        padding-inline: 1rem;
        text-align: left;
    }

    .response-choice__label {
        font-size: 0.9rem;
    }

    .safety-followup__choice {
        min-height: 2.75rem;
    }
}

/* #intro-card and .feature-item get their surface flipped to a dark
   background by shared site styles, but their headings/text stay pinned to
   --burden-ink/--burden-muted (fixed dark colors meant for the fixed light
   cards elsewhere in this tool). Reset those specific spots to a light
   color so they stay readable against the flipped dark surface. */
@media (prefers-color-scheme: dark) {
    .intro-heading-copy h2,
    .intro-heading-copy p,
    .feature-item h3,
    .feature-item p,
    .scene-prompt p,
    .scene-prompt strong {
        color: #e8eaed;
    }

    .tool-time-note,
    .privacy-notice {
        color: #b9c6d1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (forced-colors: active) {
    .response-choice input {
        position: static;
        width: 1rem;
        height: 1rem;
        overflow: visible;
        clip: auto;
        clip-path: none;
        white-space: normal;
    }

    .response-choice,
    .safety-followup,
    .safety-followup__choice,
    .all-scenes-details summary,
    .result-safety-card,
    .result-safety-card a,
    .burden-tool .btn,
    .next-tool-card {
        border: 1px solid CanvasText;
        forced-color-adjust: auto;
    }

    .response-choice:has(input:checked) {
        outline: 3px solid Highlight;
    }

    .response-choice:has(input:checked)::after {
        display: none;
    }
}

body.burden-tool #intro-card .intro-start-btn {
    display: flex !important;
    margin: 1.15rem auto 0 !important;
    align-items: center;
    justify-content: center;
}

/* Keep the privacy promise readable without presenting it as another card. */
body.burden-tool #intro-card .privacy-notice {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
