:root {
    --empty-ink: #183247;
    --empty-muted: #5c6f7f;
    --empty-line: #d9e2e8;
    --empty-soft: #f4f7f9;
    --empty-blue: #eaf3f8;
    --empty-green: #edf6f0;
    --empty-warm: #fbf6eb;
    --empty-primary: #315f7b;
    --empty-primary-dark: #24465b;
    --empty-stage: #090c11;
    --empty-stage-soft: #111923;
    --empty-stage-line: #33404d;
    --empty-stage-text: #f4f6f8;
    --empty-stage-muted: #aab5c1;
    --empty-stage-accent: #f1cf78;
}

* {
    box-sizing: border-box;
}

#tool-main [hidden],
#cinematic-modal[hidden] {
    display: none !important;
}

body.cinematic-open {
    overflow: hidden;
    overscroll-behavior: none;
}

body.cinematic-open :is(
    #stickyHeader,
    .site-chrome-header,
    #siteJourneyStickybar,
    .site-journey-stickybar,
    .site-chrome-fab-stack
) {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.tool-partial-ui .page-header {
    text-align: center;
}

.tool-partial-ui .page-header__title,
.tool-partial-ui .page-header__description {
    text-wrap: balance;
}

.tool-partial-ui .layout-container {
    width: min(100% - 2rem, 50rem);
    margin-inline: auto;
    padding-block: clamp(1.5rem, 4vw, 3rem);
}

.tool-card {
    overflow: clip;
    border: 1px solid var(--empty-line);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 0.5rem 1.75rem rgba(31, 54, 70, 0.07);
    scroll-margin-top: 8rem;
}

.tool-card > .card-header {
    padding: 1.15rem clamp(1.25rem, 4vw, 2rem);
    border-bottom: 1px solid #e4ebef;
    background: var(--empty-blue);
}

.tool-card .card-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    color: var(--empty-ink);
    font-size: clamp(1.2rem, 3vw, 1.55rem);
    line-height: 1.4;
    text-wrap: balance;
}

.tool-card .title-emoji {
    flex: 0 0 auto;
    font-size: 1.55em;
    line-height: 1;
}

.tool-card > .card-body,
.result-screen > .card-body {
    padding: clamp(1.25rem, 4vw, 2.2rem);
}

.intro-lead {
    color: var(--empty-ink);
    font-size: clamp(1rem, 2.5vw, 1.08rem);
    line-height: 1.75;
    text-align: center;
}

.intro-lead p {
    margin: 0;
}

.intro-lead p + p {
    margin-top: 0.45rem;
    color: var(--empty-muted);
}

.cinematic-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: clamp(0.85rem, 2.5vw, 1.25rem);
    margin-top: 1.5rem;
    padding: clamp(1rem, 3vw, 1.35rem);
    border: 1px solid #dedbd2;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f7f3ea, #eef3f5);
    color: #243b4a;
}

.cinematic-preview__mark {
    display: grid;
    width: clamp(4rem, 10vw, 5rem);
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid #c9c2b2;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    color: #7a561c;
    font-family: serif;
    font-size: clamp(2rem, 6vw, 2.8rem);
}

.cinematic-preview strong {
    display: block;
    color: #243b4a;
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    line-height: 1.45;
}

.cinematic-preview p {
    margin: 0.45rem 0 0;
    color: #526775;
    font-size: 0.95rem;
    line-height: 1.65;
}

.core-principle {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0.55rem;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.9rem;
    background: var(--empty-warm);
    color: var(--empty-ink);
    line-height: 1.6;
    text-align: center;
}

.core-principle strong {
    font-weight: 750;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.feature-item {
    min-width: 0;
    padding: 1rem 0.75rem;
    border-radius: 0.85rem;
    background: var(--empty-soft);
    color: var(--empty-ink);
    text-align: center;
}

.feature-icon {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 1.75rem;
    line-height: 1;
}

.feature-item strong,
.feature-item small {
    display: block;
}

.feature-item strong {
    font-size: 0.95rem;
    line-height: 1.4;
}

.feature-item small {
    margin-top: 0.25rem;
    color: var(--empty-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.evidence-note {
    width: min(100%, 43rem);
    max-width: 43rem;
    margin: 1rem auto 0;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid #d7e3ea;
    border-radius: 0.75rem;
    background: #f7fafc;
}

.evidence-note__title {
    display: flex;
    width: 100%;
    min-height: 3rem;
    box-sizing: border-box;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    color: var(--empty-ink);
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    text-align: left;
}

.evidence-note__title::-webkit-details-marker {
    display: none;
}

.evidence-note__title::after {
    width: 0.5rem;
    height: 0.5rem;
    flex: 0 0 auto;
    margin-left: auto;
    content: "";
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.12rem) rotate(45deg);
    transition: transform 160ms ease;
}

.evidence-note[open] > .evidence-note__title::after {
    transform: translateY(0.12rem) rotate(225deg);
}

.evidence-note__body {
    padding: 0.2rem 1rem 1rem;
    color: var(--empty-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.evidence-note__body p {
    margin: 0;
}

.evidence-note__body p + p {
    margin-top: 0.65rem;
}

.reference-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
}

.reference-links a {
    color: var(--empty-primary-dark);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.action-footer {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.action-footer--split {
    justify-content: space-between;
}

.tool-card .btn {
    min-width: 8rem;
    min-height: 2.75rem;
    padding: 0.78rem 1.15rem;
    border-radius: 0.7rem;
    font-weight: 750;
    line-height: 1.35;
    text-align: center;
    touch-action: manipulation;
}

.tool-card .btn-primary {
    border: 1px solid var(--empty-primary-dark);
    background: var(--empty-primary-dark);
    color: #fff;
    box-shadow: none;
}

.tool-card .btn-secondary {
    border: 1px solid #bccbd5;
    background: #fff;
    color: var(--empty-ink);
    box-shadow: none;
}

.tool-card .btn:disabled {
    border-color: #d8e0e5;
    background: #e9eef1;
    color: #80909c;
    cursor: not-allowed;
    opacity: 1;
}

.section-lead {
    margin: 0 0 1.2rem;
    color: var(--empty-muted);
    line-height: 1.7;
    text-align: center;
}

.field-label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--empty-ink);
    font-weight: 750;
}

.text-input-field {
    width: 100%;
    min-height: 7rem;
    padding: 1rem;
    resize: vertical;
    border: 1px solid #bccbd5;
    border-radius: 0.8rem;
    background: #fff;
    color: var(--empty-ink);
    font: inherit;
    line-height: 1.65;
}

.text-input-field::placeholder {
    color: #82919c;
}

.field-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.45rem;
    color: var(--empty-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.entry-template-panel {
    margin-top: 1.4rem;
}

.entry-template-panel h3 {
    margin: 0 0 0.75rem;
    color: var(--empty-ink);
    font-size: 1rem;
}

.entry-template-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    border: 0;
}

.entry-template {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 3.5rem;
    padding: 0.8rem 2.5rem 0.8rem 0.9rem;
    border: 1px solid var(--empty-line);
    border-radius: 0.8rem;
    background: #fff;
    color: var(--empty-ink);
    font: inherit;
    font-weight: 650;
    line-height: 1.4;
    text-align: left;
    touch-action: manipulation;
}

.entry-template input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.entry-template__icon {
    flex: 0 0 auto;
    font-size: 1.55rem;
}

.entry-template__check {
    position: absolute;
    right: 0.85rem;
    display: none;
    width: 1.45rem;
    height: 1.45rem;
    place-items: center;
    border-radius: 50%;
    background: var(--empty-primary);
    color: #fff;
    font-size: 0.85rem;
}

.entry-template.is-selected {
    border: 2px solid var(--empty-primary);
    background: var(--empty-blue);
    font-weight: 750;
}

.entry-template.is-selected .entry-template__check {
    display: grid;
}

.boundary-map {
    margin: 0 0 1.25rem;
    padding: clamp(1rem, 3vw, 1.35rem);
    border-radius: 1rem;
    background: linear-gradient(145deg, #f4f8fa, #fbf7ee);
}

.boundary-map--result {
    margin-top: 1.25rem;
}

.boundary-map__heading {
    text-align: center;
}

.boundary-map__heading h3 {
    margin: 0;
    color: var(--empty-ink);
    font-size: clamp(1.1rem, 2.8vw, 1.35rem);
    line-height: 1.45;
    text-wrap: balance;
}

.boundary-map__heading p {
    max-width: 42rem;
    margin: 0.45rem auto 0;
    color: var(--empty-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    text-wrap: pretty;
}

.boundary-map__figure {
    margin: 1rem 0 0;
}

.boundary-map__viewport {
    --self-left: 22%;
    --other-left: 78%;
    --self-scale: 1;
    --other-scale: 1;
    position: relative;
    width: min(100%, 38rem);
    min-height: clamp(14rem, 44vw, 18rem);
    margin-inline: auto;
    overflow: clip;
    border: 0.14rem dashed #aebbc4;
    border-radius: 1rem;
    background:
        radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.96), rgba(236, 242, 245, 0.74) 62%, rgba(226, 235, 240, 0.88));
    isolation: isolate;
}

.boundary-map__limit {
    position: absolute;
    top: 0.65rem;
    left: 50%;
    z-index: 5;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #65737d;
    font-size: 0.72rem;
    font-weight: 750;
    transform: translateX(-50%);
}

.boundary-map__viewport[data-map-state="repair"] {
    --self-left: 38%;
    --other-left: 62%;
}

.boundary-map__viewport[data-map-state="pressure"] {
    --self-left: 56%;
    --other-left: 45%;
    --self-scale: 0.58;
    --other-scale: 1.35;
}

.boundary-map__viewport[data-map-state="safety"] {
    --self-left: 74%;
    --other-left: 58%;
    --self-scale: 0.42;
    --other-scale: 1.7;
}

.boundary-map__viewport[data-map-state="safety"] .boundary-map__circle--self > span {
    opacity: 0.42;
}

.boundary-map__circle {
    position: absolute;
    top: 50%;
    display: grid;
    width: clamp(8rem, 39%, 13rem);
    aspect-ratio: 1;
    place-items: center;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(var(--circle-scale));
    transition: left 220ms ease, transform 220ms ease, opacity 220ms ease;
}

.boundary-map__circle > span {
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--empty-ink);
    font-weight: 800;
    text-align: center;
    transition: opacity 220ms ease;
}

.boundary-map__circle > span strong,
.boundary-map__circle > span small {
    display: block;
}

.boundary-map__circle > span small {
    margin-top: 0.15rem;
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.35;
}

.boundary-map__circle--self {
    --circle-scale: var(--self-scale);
    left: var(--self-left);
    z-index: 1;
    border: 0.2rem solid #3b7696;
    background: rgba(111, 174, 207, 0.34);
}

.boundary-map__circle--other {
    --circle-scale: var(--other-scale);
    left: var(--other-left);
    z-index: 2;
    border: 0.2rem dashed #a66c47;
    background: rgba(222, 165, 118, 0.32);
}

.boundary-map__legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem 1rem;
    margin-top: 0.8rem;
    color: var(--empty-muted);
    font-size: 0.875rem;
    line-height: 1.45;
}

.boundary-map__legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.boundary-map__swatch {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    border-radius: 50%;
}

.boundary-map__swatch--self {
    border: 0.13rem solid #3b7696;
    background: rgba(111, 174, 207, 0.34);
}

.boundary-map__swatch--other {
    border: 0.13rem dashed #a66c47;
    background: rgba(222, 165, 118, 0.32);
}

.boundary-map__explanation {
    min-height: 5.6rem;
    margin-top: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.82);
    color: var(--empty-ink);
    text-align: center;
}

.boundary-map__explanation strong {
    display: block;
    font-size: 1rem;
    line-height: 1.45;
}

.boundary-map__explanation p {
    margin: 0.3rem 0 0;
    color: var(--empty-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.boundary-map__controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.boundary-map__controls button {
    min-height: 2.75rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid #c8d4dc;
    border-radius: 0.75rem;
    background: #fff;
    color: var(--empty-ink);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 650;
    line-height: 1.35;
    touch-action: manipulation;
}

.boundary-map__controls button[aria-pressed="true"] {
    border: 0.18rem solid var(--empty-primary);
    background: var(--empty-blue);
    font-weight: 800;
    box-shadow: inset 0 0 0 0.12rem #fff;
}

.boundary-map__note {
    margin: 0.8rem 0 0;
    color: var(--empty-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: center;
}

.reflection-fieldset {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    border: 0;
}

.reflection-legend {
    margin: 0 0 0.15rem;
    padding: 0;
    color: var(--empty-ink);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.45;
}

.reflection-option {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.85rem;
    min-height: 5.4rem;
    padding: 1rem 3rem 1rem 1rem;
    border: 1px solid var(--empty-line);
    border-radius: 0.9rem;
    background: #fff;
    color: var(--empty-ink);
    cursor: pointer;
}

.reflection-option input {
    position: absolute;
    width: 1px !important;
    min-width: 0 !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: 0;
    overflow: hidden;
    opacity: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.reflection-marker {
    display: none;
}

.reflection-option.is-selected {
    border: 2px solid var(--empty-primary);
    background: var(--empty-blue);
}

.reflection-option.is-selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    right: 1rem;
    color: var(--empty-primary);
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
    transform: translateY(-50%);
}

.reflection-option.is-selected .reflection-copy strong {
    font-weight: 900;
}

.reflection-emoji {
    font-size: 2rem;
    line-height: 1;
}

.reflection-copy,
.reflection-copy strong,
.reflection-copy small {
    display: block;
}

.reflection-copy strong {
    font-size: 1rem;
    line-height: 1.45;
}

.reflection-copy small {
    margin-top: 0.25rem;
    color: var(--empty-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.result-screen > .card-body {
    padding-top: clamp(1.5rem, 5vw, 2.5rem);
}

.result-hero {
    text-align: center;
}

.result-emoji {
    display: block;
    font-size: clamp(3.75rem, 12vw, 5.5rem);
    line-height: 1;
}

.result-eyebrow {
    margin: 1rem 0 0.35rem;
    color: var(--empty-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.result-hero h2 {
    margin: 0;
    color: var(--empty-ink);
    font-size: clamp(1.55rem, 5vw, 2.15rem);
    line-height: 1.35;
    text-wrap: balance;
}

.result-hero > p:last-child {
    max-width: 39rem;
    margin: 0.8rem auto 0;
    color: var(--empty-muted);
    line-height: 1.75;
}

.incident-echo {
    margin-top: 1.5rem;
    padding: 1rem 1.1rem;
    border-radius: 0.8rem;
    background: var(--empty-soft);
    color: var(--empty-ink);
}

.incident-echo strong {
    font-size: 0.86rem;
}

.incident-echo p {
    margin: 0.45rem 0 0;
    color: var(--empty-muted);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.result-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    min-width: 0;
    padding: 1.1rem;
    border-radius: 0.9rem;
    background: var(--empty-soft);
}

.result-item > span {
    font-size: 1.55rem;
    line-height: 1.2;
}

.result-item h3 {
    margin: 0;
    color: var(--empty-ink);
    font-size: 1rem;
    line-height: 1.45;
}

.result-item p {
    margin: 0.4rem 0 0;
    color: var(--empty-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.responsibility-note {
    margin: 1rem 0 0;
    padding: 1rem 1.1rem;
    border-radius: 0.85rem;
    background: var(--empty-green);
    color: #365545;
    font-size: 0.9rem;
    line-height: 1.7;
}

.next-tools-section {
    margin-top: 1.75rem;
}

.next-tools-section > h3 {
    margin: 0 0 0.85rem;
    color: var(--empty-ink);
    font-size: 1.08rem;
    text-align: center;
}

.next-tools-grid {
    display: grid;
    gap: 0.7rem;
}

.next-tool-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.8rem;
    min-height: 4.75rem;
    padding: 1rem;
    border: 1px solid var(--empty-line);
    border-radius: 0.85rem;
    background: #fff;
    color: var(--empty-ink);
    text-decoration: none;
}

.next-tool-card__icon {
    font-size: 1.75rem;
}

.next-tool-card strong,
.next-tool-card small {
    display: block;
}

.next-tool-card strong {
    line-height: 1.4;
}

/* site-chrome.js's shared :where(.next-tool-card, ...) strong rule flips this
   to var(--color-primary-dark) (light blue in dark mode) via !important, but
   this card's own background stays hardcoded #fff in both modes. Pin the text
   back to a readable dark ink with matching !important + ID specificity. */
#next-tools-grid .next-tool-card strong {
    color: var(--empty-ink) !important;
}

.next-tool-card small {
    margin-top: 0.25rem;
    color: var(--empty-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

/* Cinematic stage */
.cinematic-modal {
    position: fixed;
    inset: 0;
    /* Below the site-wide emergency-help modal (z-index: 5100 !important in
       site-chrome.js) so a dialog the user opened before entering the
       cinematic stays visible and reachable. */
    z-index: 5050;
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: max(0.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    overflow: hidden;
    background: var(--empty-stage);
    color: var(--empty-stage-text);
}

.cinematic-modal.is-active {
    display: flex;
}

.cinematic-topbar,
.cinematic-nav,
.cinematic-progress {
    width: min(100%, 64rem);
    margin-inline: auto;
    flex: 0 0 auto;
}

.cinematic-topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.75rem;
}

.cinematic-text-button,
.cinematic-nav-button {
    min-height: 2.75rem;
    border: 1px solid var(--empty-stage-line);
    border-radius: 0.65rem;
    background: #151d26;
    color: var(--empty-stage-text);
    font: inherit;
    font-weight: 700;
    touch-action: manipulation;
}

.cinematic-text-button {
    padding: 0.55rem 0.8rem;
}

#close-cinematic-btn {
    justify-self: start;
}

#skip-cinematic-btn {
    justify-self: end;
}

.cinematic-progress-text {
    min-width: 0;
    color: var(--empty-stage-muted);
    font-size: clamp(0.875rem, 2vw, 0.95rem);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
}

.cinematic-progress {
    height: 0.25rem;
    margin-top: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: #29323c;
}

.cinematic-progress > span {
    display: block;
    width: 5%;
    height: 100%;
    border-radius: inherit;
    background: var(--empty-stage-accent);
    transition: width 220ms ease;
}

.cinematic-content {
    width: min(100%, 64rem);
    min-height: 0;
    margin-inline: auto;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
}

.cinematic-scene {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    width: 100%;
    min-height: 100%;
    padding: clamp(1.5rem, 5vh, 3.5rem) clamp(0rem, 2vw, 1.5rem);
    opacity: 0;
    text-align: center;
    transition: opacity 220ms ease;
}

.cinematic-scene.is-active {
    display: flex;
    opacity: 1;
}

.cinematic-scene h2 {
    max-width: 50rem;
    margin: 0.55rem 0 1.2rem;
    color: var(--empty-stage-text);
    font-size: clamp(1.55rem, 4vw, 2.45rem);
    line-height: 1.35;
    text-wrap: balance;
}

.cinematic-scene > p {
    max-width: 48rem;
    margin: 0.35rem 0;
    color: #d2d9e0;
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    line-height: 1.75;
    text-wrap: pretty;
}

.scene-symbol {
    font-size: clamp(3.5rem, 10vw, 6rem);
    line-height: 1.15;
    filter: saturate(0.92);
}

.scene-kicker {
    color: var(--empty-stage-accent) !important;
    font-size: 0.88rem !important;
    font-weight: 750;
    letter-spacing: 0.08em;
}

.scene-lead,
.scene-question {
    color: #fff !important;
    font-size: clamp(1.2rem, 3vw, 1.55rem) !important;
    font-weight: 750;
}

.scene-highlight {
    margin-top: 1.15rem !important;
    color: var(--empty-stage-accent) !important;
    font-weight: 750;
}

.scene-explanation {
    width: min(100%, 52rem);
    margin-top: 0.3rem !important;
    color: var(--empty-stage-muted) !important;
    font-size: 0.94rem !important;
    line-height: 1.75 !important;
}

.scene-footnote {
    margin-top: 1.15rem !important;
    color: var(--empty-stage-muted) !important;
    font-size: 0.9rem !important;
}

.scene-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.75rem, 2vw, 1.2rem);
    width: min(100%, 48rem);
    margin: 0.25rem auto 0.8rem;
}

.scene-compare > div {
    min-width: 0;
    padding: clamp(1rem, 3vw, 1.45rem);
    border: 1px solid var(--empty-stage-line);
    border-radius: 1rem;
    background: var(--empty-stage-soft);
}

.scene-compare strong {
    display: block;
    color: #fff;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.5;
}

.scene-compare p {
    margin: 0.55rem 0 0;
    color: var(--empty-stage-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.scene-perspective-emoji {
    display: block;
    margin-bottom: 0.65rem;
    font-size: clamp(3.6rem, 8vw, 5.75rem);
    line-height: 1;
    filter: drop-shadow(0 0.65rem 1.2rem rgba(0, 0, 0, 0.22));
}

.cinematic-scene--stage.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(5rem, 13vw, 8rem) minmax(0, 1fr);
    grid-template-areas:
        "kicker kicker kicker"
        "title title title"
        "left symbol right";
    align-content: safe center;
    column-gap: clamp(0.8rem, 2.5vw, 1.6rem);
    row-gap: 0.8rem;
}

.cinematic-scene--stage > .scene-kicker {
    grid-area: kicker;
    justify-self: center;
    width: min(100%, 48rem);
    font-size: clamp(0.98rem, 1.6vw, 1.08rem) !important;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-align: center;
}

.cinematic-scene--stage > h2 {
    grid-area: title;
    justify-self: center;
    width: min(100%, 50rem);
    text-align: center;
}

.cinematic-scene--stage > .scene-symbol {
    grid-area: symbol;
    align-self: center;
    font-size: clamp(4.25rem, 10vw, 7rem);
    filter: drop-shadow(0 0 1.4rem rgba(241, 207, 120, 0.13));
}

.cinematic-scene--stage > .scene-compare {
    display: contents;
}

.cinematic-scene--stage > .scene-compare > :first-child {
    grid-area: left;
}

.cinematic-scene--stage > .scene-compare > :last-child {
    grid-area: right;
}

.cinematic-scene--stage > .scene-compare > div {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 0;
    min-height: clamp(9rem, 24vh, 13rem);
    padding: clamp(1rem, 2.4vw, 1.35rem);
    border: 1px solid rgba(170, 181, 193, 0.32);
    border-radius: 1rem;
    background: rgba(17, 25, 35, 0.82);
    box-shadow: none;
    text-align: center;
}

.cinematic-scene--stage .scene-compare strong {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.cinematic-scene--stage .scene-compare p {
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
    line-height: 1.7;
}

.cinematic-scene--stage .scene-explanation {
    font-size: clamp(0.98rem, 1.5vw, 1.08rem) !important;
}

.cinematic-scene--stage > .scene-compare > :first-child {
    text-align: center;
}

.cinematic-scene--stage > .scene-compare > :last-child {
    text-align: center;
}

.cinematic-scene--stage > :not(.scene-kicker):not(h2):not(.scene-symbol):not(.scene-compare) {
    grid-column: 1 / -1;
    justify-self: center;
}

.scene-choice-fieldset {
    width: min(100%, 42rem);
    margin: 1rem 0 0;
    padding: 0;
    border: 0;
}

.scene-choice-fieldset legend {
    width: 100%;
    margin-bottom: 0.7rem;
    color: var(--empty-stage-muted);
    font-size: 0.9rem;
    font-weight: 650;
    text-align: center;
}

.scene-choice-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.scene-choice-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.72rem 0.85rem;
    border: 1px solid var(--empty-stage-line);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.035);
    color: var(--empty-stage-text);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

.scene-choice-option input {
    position: absolute;
    width: 1px !important;
    height: 1px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    opacity: 0;
    white-space: nowrap;
}

.scene-choice-option.is-selected {
    border: 2px solid #dcc173;
    background: rgba(241, 207, 120, 0.11);
    color: #fff8e7;
    font-weight: 850;
}

.cinematic-scene--statement .scene-symbol {
    display: grid;
    width: 5rem;
    height: 5rem;
    place-items: center;
    border: 1px solid var(--empty-stage-line);
    border-radius: 50%;
    color: var(--empty-stage-accent);
    font-size: 2.3rem;
}

.hinge-lines {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    width: min(100%, 42rem);
    margin-bottom: 1rem;
}

.hinge-lines p {
    margin: 0;
    padding: 1.15rem;
    border-radius: 0.9rem;
    background: var(--empty-stage-soft);
}

.hinge-lines strong,
.hinge-lines span {
    display: block;
}

.hinge-lines strong {
    color: var(--empty-stage-accent);
    font-size: 1.35rem;
}

.hinge-lines span {
    margin-top: 0.3rem;
    color: #d8dee4;
}

.repair-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin: 1rem 0 0.4rem;
}

.repair-steps span {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-weight: 700;
}

.fading-question {
    color: #74818d !important;
    font-size: clamp(1.1rem, 3vw, 1.4rem) !important;
    text-decoration: line-through;
    text-decoration-thickness: 0.08em;
}

.empty-mark {
    color: var(--empty-stage-accent);
    font-family: serif;
    font-size: clamp(6rem, 22vw, 11rem);
    font-weight: 400;
    line-height: 1;
    text-shadow: 0 0 2.5rem rgba(241, 207, 120, 0.12);
}

.cinematic-scene--final blockquote {
    max-width: 46rem;
    margin: 1rem 0;
    padding: 1.1rem 1.3rem;
    border: 1px solid var(--empty-stage-line);
    border-radius: 1rem;
    background: var(--empty-stage-soft);
    color: #fff;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: 700;
    line-height: 1.7;
}

.cinematic-nav {
    display: grid;
    grid-template-columns: minmax(7.5rem, auto) 1fr minmax(7.5rem, auto);
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
}

.cinematic-nav-button {
    padding: 0.65rem 1rem;
}

.cinematic-nav-button:disabled {
    color: #6d7883;
    cursor: not-allowed;
    opacity: 0.65;
}

.cinematic-keyboard-hint {
    color: #74818d;
    font-size: 0.875rem;
    text-align: center;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

:is(
    .tool-card button,
    .tool-card textarea,
    .tool-card summary,
    .tool-card a,
    #cinematic-modal button
):focus-visible {
    outline: 3px solid #4b86aa;
    outline-offset: 3px;
}

#cinematic-modal button:focus-visible {
    outline-color: var(--empty-stage-accent);
}

.reflection-option:has(input:focus-visible) {
    outline: 3px solid #4b86aa;
    outline-offset: 3px;
}

.entry-template:has(input:focus-visible) {
    outline: 3px solid #4b86aa;
    outline-offset: 3px;
}

.scene-choice-option:has(input:focus-visible) {
    outline: 3px solid var(--empty-stage-accent);
    outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
    .evidence-note__title:hover {
        background: #edf6fb;
        color: var(--empty-ink);
    }

    .tool-card .btn:not(:disabled):hover,
    .entry-template:hover,
    .next-tool-card:hover {
        border-color: #8eb5ce;
        background: #edf6fb;
        color: var(--empty-ink);
        transform: none;
        box-shadow: none;
    }

    .tool-card .btn-primary:not(:disabled):hover {
        border-color: #234d67;
        background: #396d8b;
        color: #fff;
    }

    .cinematic-text-button:hover,
    .cinematic-nav-button:not(:disabled):hover {
        border-color: #617183;
        background: #202b37;
        color: #fff;
    }

    .scene-choice-option:hover {
        border-color: #7d8d9c;
        background: #1b2530;
    }

    .boundary-map__controls button:hover {
        border-color: #93b5c9;
        background: #edf6fb;
    }
}

@media (max-width: 48rem) {
    .tool-partial-ui .layout-container {
        width: min(100% - 1.25rem, 50rem);
        padding-block: 1.2rem 2rem;
    }

    .tool-card {
        border-radius: 1rem;
    }

    .feature-grid,
    .result-grid {
        grid-template-columns: 1fr;
    }

    .feature-item {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 0.05rem 0.75rem;
        padding: 0.85rem 1rem;
        text-align: left;
    }

    .feature-icon {
        grid-row: 1 / 3;
        align-self: center;
        margin: 0;
    }

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

    .result-item {
        padding: 1rem;
    }

    .cinematic-modal {
        padding-inline: max(0.75rem, env(safe-area-inset-left));
    }

    .cinematic-scene {
        padding-block: 1.25rem;
    }

    .cinematic-scene--stage.is-active {
        grid-template-columns: minmax(0, 1fr) clamp(4.5rem, 16vw, 6rem) minmax(0, 1fr);
        grid-template-areas:
            "kicker kicker kicker"
            "title title title"
            "left symbol right";
    }

    .cinematic-scene--stage > .scene-symbol {
        font-size: clamp(4rem, 12vw, 6rem);
    }

    .cinematic-scene--stage > .scene-compare > div {
        min-height: 9rem;
        text-align: center;
    }

    .scene-compare {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 30rem) {
    .cinematic-topbar {
        grid-template-columns: 1fr 1fr;
    }

    .cinematic-progress-text {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    #close-cinematic-btn,
    #skip-cinematic-btn {
        grid-row: 1;
    }

    .cinematic-preview {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 1rem;
        text-align: left;
    }

    .cinematic-preview__mark {
        width: 3.75rem;
        margin: 0;
        font-size: 2rem;
    }

    .action-footer--split {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .action-footer--split .btn {
        min-width: 0;
    }

    .reflection-option {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.7rem;
    }

    .reflection-emoji {
        display: none;
    }

    .hinge-lines {
        grid-template-columns: 1fr;
    }

    .scene-choice-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .boundary-map__controls {
        grid-template-columns: 1fr;
    }

    .boundary-map__viewport {
        min-height: 14rem;
    }

    .boundary-map__circle {
        width: clamp(7.25rem, 42%, 9rem);
    }

    .cinematic-scene--stage.is-active {
        grid-template-columns: minmax(0, 1fr) clamp(3.8rem, 19vw, 4.8rem) minmax(0, 1fr);
        grid-template-areas:
            "kicker kicker kicker"
            "title title title"
            "left symbol right";
        column-gap: 0.65rem;
        row-gap: 0.7rem;
    }

    .cinematic-scene--stage > .scene-compare > div {
        min-height: 0;
        padding: 0.8rem 0.45rem;
    }

    .cinematic-scene--stage > .scene-symbol {
        font-size: clamp(3.4rem, 17vw, 4.4rem);
    }

    .scene-perspective-emoji {
        font-size: clamp(2.65rem, 13vw, 3.5rem);
    }

    .cinematic-scene--stage .scene-compare strong {
        font-size: 0.95rem;
    }

    .cinematic-scene--stage .scene-compare p {
        font-size: 0.875rem;
        line-height: 1.55;
    }

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

    .cinematic-keyboard-hint {
        display: none;
    }
}

@media (max-height: 35rem) and (orientation: landscape) {
    .cinematic-modal {
        padding-top: max(0.4rem, env(safe-area-inset-top));
        padding-bottom: max(0.4rem, env(safe-area-inset-bottom));
    }

    .cinematic-scene {
        justify-content: flex-start;
        padding-block: 0.8rem;
    }

    .scene-symbol {
        font-size: 3rem;
    }

    .cinematic-scene h2 {
        margin-block: 0.25rem 0.65rem;
    }
}

/* .result-screen sits inside the shared .card component, whose background
   flips to a dark surface in dark mode (var(--color-surface)), but the
   result heading/eyebrow/summary stay pinned to the fixed dark --empty-ink/
   --empty-muted tokens. Reset those specific spots to a light color so they
   stay readable against the flipped dark surface. */
@media (prefers-color-scheme: dark) {
    .result-hero h2 {
        color: #e8eaed;
    }

    .result-eyebrow,
    .result-hero > p:last-child {
        color: #bdc1c6;
    }

    /* #entry-screen/#reflection-screen share the same .tool-card > .card-header
       that site-chrome.js flips to a dark surface, but their .card-title stays
       pinned to the fixed --empty-ink token. #intro-title already gets a light
       color via the #intro-screen/#intro-card ID-collision rule in
       tools/tool-polish.css, so it does not need repeating here. */
    #entry-title,
    #reflection-title {
        color: #e8eaed;
    }

    /* #intro-screen's own background flips dark via the same ID-collision
       rule, but this body content stays pinned to the fixed --empty-ink/
       --empty-muted tokens and local hex colors. */
    #intro-screen .intro-lead p,
    #intro-screen .feature-item strong,
    #intro-screen .evidence-note__title,
    #intro-screen .cinematic-preview strong {
        color: #e8eaed;
    }

    #intro-screen .intro-lead p + p,
    #intro-screen .feature-item small,
    #intro-screen .cinematic-preview p {
        color: #bdc1c6;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }

    .cinematic-progress > span,
    .cinematic-scene,
    .boundary-map__circle,
    .boundary-map__circle > span {
        transition: none !important;
    }
}

@media (forced-colors: active) {
    .evidence-note,
    .cinematic-preview,
    .cinematic-preview__mark {
        border-color: CanvasText;
        background: Canvas;
        color: CanvasText;
    }

    .cinematic-preview strong,
    .cinematic-preview p {
        color: CanvasText;
    }

    .cinematic-preview__mark {
        color: Highlight;
    }

    .tool-card,
    .entry-template,
    .reflection-option,
    .boundary-map__controls button,
    .next-tool-card,
    .text-input-field {
        border: 1px solid CanvasText;
        background: Canvas;
        color: CanvasText;
        box-shadow: none;
    }

    .entry-template.is-selected,
    .reflection-option.is-selected {
        border: 3px solid Highlight;
    }

    .boundary-map__controls button[aria-pressed="true"] {
        border: 3px solid Highlight;
        background: Canvas;
        color: CanvasText;
        box-shadow: none;
    }

    .boundary-map__viewport,
    .boundary-map__explanation {
        border: 1px solid CanvasText;
        background: Canvas;
        color: CanvasText;
    }

    .boundary-map__circle--self,
    .boundary-map__swatch--self {
        border-color: CanvasText;
        background: Canvas;
    }

    .boundary-map__circle--other,
    .boundary-map__swatch--other {
        border-color: Highlight;
        background: Canvas;
    }

    .entry-template__check {
        background: Highlight;
        color: HighlightText;
    }

    .reflection-option.is-selected::after {
        color: Highlight;
    }

    .cinematic-modal {
        background: Canvas;
        color: CanvasText;
    }

    .cinematic-scene h2,
    .cinematic-scene > p,
    .scene-compare strong,
    .scene-question,
    .cinematic-scene--final blockquote {
        color: CanvasText !important;
    }

    .scene-highlight,
    .scene-kicker,
    .empty-mark {
        color: Highlight !important;
        text-decoration: underline;
    }

    .scene-compare > div,
    .hinge-lines p,
    .scene-choice-option,
    .cinematic-scene--final blockquote,
    .cinematic-text-button,
    .cinematic-nav-button {
        border: 1px solid CanvasText;
        background: Canvas;
        color: CanvasText;
    }

    .cinematic-scene--stage > .scene-compare > div {
        border: 1px solid CanvasText;
        background: Canvas;
    }

    .scene-choice-option.is-selected {
        border: 3px solid Highlight;
    }

    .cinematic-progress {
        border: 1px solid CanvasText;
        background: Canvas;
    }

    .cinematic-progress > span {
        background: Highlight;
    }

    :is(.tool-card, #cinematic-modal) :focus-visible {
        outline-color: Highlight;
    }
}

@media print {
    .cinematic-modal,
    .action-footer,
    .next-tools-section {
        display: none !important;
    }
}
