/* ========================================================================== 
   ACCUECO STAGE 6A — ECOSHIFT: BEAT THE PEAK
   Game-specific presentation layer. Pure CSS3, no framework or CDN.
   ========================================================================== */

.page-ecoshift {
    --shift-ink: #02110d;
    --shift-deep: #031b15;
    --shift-panel: #06281f;
    --shift-panel-soft: #0a3529;
    --shift-line: rgba(225, 255, 239, 0.13);
    --shift-line-strong: rgba(225, 255, 239, 0.24);
    --shift-paper: #f3fff8;
    --shift-muted: #a9c8b9;
    --shift-green: #19ef94;
    --shift-green-soft: #8dffc4;
    --shift-cyan: #3fdcff;
    --shift-gold: #ffd66b;
    --shift-red: #ff8585;
    --shift-violet: #b7a1ff;
    --shift-shadow: 0 34px 100px rgba(0, 12, 9, 0.38);
    background: var(--shift-ink);
}

.page-ecoshift .announcement {
    background: #020d0a;
}

.page-ecoshift [hidden] {
    display: none !important;
}

.page-ecoshift button:disabled {
    cursor: not-allowed;
}

/* Hero -------------------------------------------------------------------- */

.ecoshift-hero {
    position: relative;
    min-height: 700px;
    overflow: hidden;
    border-bottom: 1px solid rgba(141, 255, 196, 0.14);
    background:
        radial-gradient(circle at 76% 40%, rgba(25, 239, 148, 0.14), transparent 28rem),
        radial-gradient(circle at 8% 12%, rgba(63, 220, 255, 0.08), transparent 32rem),
        linear-gradient(135deg, #031a14 0%, #06382a 54%, #03251d 100%);
}

.ecoshift-hero__grid {
    position: absolute;
    inset: 0;
    opacity: 0.48;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(141, 255, 196, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(141, 255, 196, 0.035) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: linear-gradient(to bottom, #000 12%, transparent 92%);
}

.ecoshift-hero__flare {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.ecoshift-hero__flare--one {
    width: 470px;
    height: 470px;
    right: -150px;
    bottom: -170px;
    border: 1px solid rgba(141, 255, 196, 0.16);
    box-shadow:
        0 0 0 80px rgba(25, 239, 148, 0.022),
        0 0 0 165px rgba(25, 239, 148, 0.015);
}

.ecoshift-hero__flare--two {
    width: 260px;
    height: 260px;
    top: 8%;
    left: -100px;
    background: rgba(63, 220, 255, 0.08);
    filter: blur(90px);
}

.ecoshift-hero__layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
    gap: clamp(3rem, 7vw, 7rem);
    align-items: center;
    min-height: 700px;
    padding-block: clamp(5rem, 9vw, 8rem);
}

.game-breadcrumb {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    margin-bottom: 1.6rem;
    color: #9fbeaf;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.game-breadcrumb a {
    color: var(--shift-green-soft);
    text-decoration: none;
}

.game-breadcrumb a:hover {
    color: #fff;
}

.ecoshift-hero__copy h1 {
    max-width: 880px;
    margin: 0 0 1.5rem;
    font-size: clamp(4rem, 8.8vw, 8.6rem);
    line-height: 0.88;
}

.ecoshift-hero__lead {
    max-width: 690px;
    margin-bottom: 2rem;
    color: #c1d9cd;
    font-size: clamp(1.05rem, 1.7vw, 1.28rem);
}

.ecoshift-hero__facts {
    display: flex;
    gap: clamp(1.2rem, 3.5vw, 3.2rem);
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
}

.ecoshift-hero__facts li {
    display: grid;
    gap: 0.1rem;
}

.ecoshift-hero__facts strong {
    color: var(--shift-green-soft);
    font-size: 1.25rem;
    line-height: 1.1;
}

.ecoshift-hero__facts span {
    color: #91b0a1;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ecoshift-hero__actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.ecoshift-hero__actions .button {
    min-width: 158px;
}

.ecoshift-hero__visual {
    display: grid;
    place-items: center;
}

.ecoshift-orbit {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 500px);
    aspect-ratio: 1;
    border: 1px solid rgba(141, 255, 196, 0.15);
    border-radius: 46px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        radial-gradient(circle, rgba(25, 239, 148, 0.12), transparent 44%),
        rgba(2, 23, 18, 0.62);
    background-size: 36px 36px, 36px 36px, auto, auto;
    box-shadow: var(--shift-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
}

.ecoshift-orbit::before {
    position: absolute;
    width: 96px;
    aspect-ratio: 1;
    content: "";
    border-radius: 50%;
    background: radial-gradient(circle at 34% 28%, #fff, var(--shift-green-soft) 25%, var(--shift-green) 62%, #07915a 100%);
    box-shadow:
        0 0 0 12px rgba(25, 239, 148, 0.06),
        0 0 62px rgba(25, 239, 148, 0.62),
        0 0 150px rgba(25, 239, 148, 0.22);
    animation: shift-core 3.5s ease-in-out infinite;
}

.ecoshift-orbit > strong {
    position: relative;
    z-index: 3;
    color: #06251c;
    font-size: 0.75rem;
    font-weight: 950;
    letter-spacing: 0.18em;
}

.ecoshift-orbit__ring {
    position: absolute;
    border: 1px solid rgba(141, 255, 196, 0.19);
    border-radius: 50%;
}

.ecoshift-orbit__ring::after {
    position: absolute;
    top: 50%;
    left: -4px;
    width: 8px;
    height: 8px;
    content: "";
    border-radius: 50%;
    background: var(--shift-green);
    box-shadow: 0 0 14px var(--shift-green);
}

.ecoshift-orbit__ring--one {
    width: 39%;
    height: 39%;
    animation: orbit-spin 13s linear infinite;
}

.ecoshift-orbit__ring--two {
    width: 61%;
    height: 61%;
    border-style: dashed;
    animation: orbit-spin 21s linear infinite reverse;
}

.ecoshift-orbit__ring--three {
    width: 80%;
    height: 80%;
    opacity: 0.55;
    animation: orbit-spin 34s linear infinite;
}

.ecoshift-orbit__sun,
.ecoshift-orbit__home,
.ecoshift-orbit__battery,
.ecoshift-orbit__bolt {
    position: absolute;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 52px;
    aspect-ratio: 1;
    color: var(--shift-paper);
    border: 1px solid rgba(141, 255, 196, 0.22);
    border-radius: 16px;
    background: rgba(3, 32, 25, 0.82);
    box-shadow: 0 15px 34px rgba(0, 0, 0, 0.24);
    font-size: 1.25rem;
}

.ecoshift-orbit__sun { top: 13%; left: 17%; color: var(--shift-gold); }
.ecoshift-orbit__home { right: 13%; top: 31%; color: var(--shift-green-soft); }
.ecoshift-orbit__battery { right: 22%; bottom: 13%; color: var(--shift-cyan); }
.ecoshift-orbit__bolt { left: 14%; bottom: 23%; color: var(--shift-green); }

@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes shift-core {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 12px rgba(25, 239, 148, 0.06), 0 0 62px rgba(25, 239, 148, 0.62), 0 0 150px rgba(25, 239, 148, 0.22); }
    50% { transform: scale(1.07); box-shadow: 0 0 0 18px rgba(25, 239, 148, 0.035), 0 0 78px rgba(25, 239, 148, 0.72), 0 0 170px rgba(25, 239, 148, 0.28); }
}

/* Game shell -------------------------------------------------------------- */

.ecoshift-play-section {
    position: relative;
    padding: clamp(4rem, 8vw, 7rem) 0 clamp(5rem, 10vw, 9rem);
    background:
        radial-gradient(circle at 90% 4%, rgba(63, 220, 255, 0.06), transparent 30rem),
        linear-gradient(180deg, #02120e, #031a14 68%, #02130f);
}

.ecoshift-play-section::before {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    opacity: 0.4;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
    background-size: 48px 48px;
}

.ecoshift-game {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: 1px solid var(--shift-line-strong);
    border-radius: clamp(24px, 4vw, 42px);
    background: rgba(3, 28, 22, 0.94);
    box-shadow: 0 50px 130px rgba(0, 8, 6, 0.46);
}

.ecoshift-noscript {
    padding: 1rem 1.3rem;
    color: #251600;
    background: var(--shift-gold);
    font-weight: 800;
}

.game-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 1.4rem;
    align-items: center;
    padding: 1.1rem clamp(1rem, 3vw, 2.2rem);
    border-bottom: 1px solid var(--shift-line);
    background: rgba(2, 20, 16, 0.84);
}

.game-toolbar__identity {
    display: flex;
    min-width: 0;
    gap: 0.8rem;
    align-items: center;
}

.game-toolbar__mark {
    display: grid;
    width: 42px;
    aspect-ratio: 1;
    flex: 0 0 auto;
    place-items: center;
    color: #03231a;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--shift-green-soft), var(--shift-green));
    box-shadow: 0 0 30px rgba(25, 239, 148, 0.23);
    font-size: 1.25rem;
    font-weight: 950;
}

.game-toolbar__identity p,
.game-toolbar__identity h2 {
    overflow: hidden;
    margin: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-toolbar__identity p {
    color: var(--shift-green-soft);
    font-size: 0.65rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.game-toolbar__identity h2 {
    font-size: 1.02rem;
    letter-spacing: -0.015em;
}

.game-toolbar__stats {
    display: flex;
    gap: 0.65rem;
}

.game-toolbar__stats > div {
    display: grid;
    min-width: 74px;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--shift-line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.game-toolbar__stats span {
    color: #8ead9f;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.game-toolbar__stats strong {
    color: var(--shift-green-soft);
    font-size: 1.05rem;
}

.game-toolbar__actions {
    display: flex;
    gap: 0.4rem;
}

.game-icon-button,
.game-control,
.game-pause,
.text-button {
    border: 0;
    cursor: pointer;
}

.game-icon-button {
    display: inline-flex;
    min-height: 42px;
    gap: 0.48rem;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.75rem;
    color: #bdd5ca;
    border: 1px solid var(--shift-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.75rem;
    font-weight: 780;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.game-icon-button:hover {
    border-color: rgba(141, 255, 196, 0.35);
    background: rgba(141, 255, 196, 0.07);
    transform: translateY(-1px);
}

.game-icon-button > span:first-child {
    display: grid;
    width: 23px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--shift-green-soft);
    border-radius: 8px;
    background: rgba(141, 255, 196, 0.08);
    font-weight: 900;
}

/* Setup ------------------------------------------------------------------- */

.game-setup {
    padding: clamp(2.2rem, 5vw, 4.8rem);
    background:
        radial-gradient(circle at 100% 0%, rgba(25, 239, 148, 0.08), transparent 26rem),
        rgba(3, 31, 24, 0.72);
}

.game-setup__intro {
    max-width: 790px;
    margin-bottom: 2rem;
}

.game-kicker {
    margin-bottom: 0.45rem;
    color: var(--shift-green-soft);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.game-setup__intro h2,
.game-statusbar h2,
.game-results h2 {
    margin-bottom: 0.9rem;
    font-size: clamp(2rem, 4.3vw, 4.2rem);
}

.game-setup__intro > p:last-child {
    max-width: 690px;
    color: var(--shift-muted);
}

.scenario-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.scenario-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    min-height: 142px;
    padding: 1.2rem;
    color: var(--shift-paper);
    text-align: left;
    border: 1px solid var(--shift-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    transition: transform 200ms ease, border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.scenario-card:hover {
    transform: translateY(-3px);
    border-color: rgba(141, 255, 196, 0.32);
}

.scenario-card.is-selected {
    border-color: rgba(25, 239, 148, 0.72);
    background:
        linear-gradient(135deg, rgba(25, 239, 148, 0.12), rgba(63, 220, 255, 0.04)),
        rgba(255, 255, 255, 0.025);
    box-shadow: inset 0 0 0 1px rgba(25, 239, 148, 0.12), 0 18px 45px rgba(0, 0, 0, 0.18);
}

.scenario-card__symbol {
    display: grid;
    width: 48px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--shift-gold);
    border: 1px solid rgba(255, 214, 107, 0.25);
    border-radius: 15px;
    background: rgba(255, 214, 107, 0.07);
    font-size: 1.3rem;
}

.scenario-card:nth-child(2) .scenario-card__symbol {
    color: var(--shift-cyan);
    border-color: rgba(63, 220, 255, 0.25);
    background: rgba(63, 220, 255, 0.07);
}

.scenario-card:nth-child(3) .scenario-card__symbol {
    color: var(--shift-violet);
    border-color: rgba(183, 161, 255, 0.25);
    background: rgba(183, 161, 255, 0.07);
}

.scenario-card__copy {
    display: grid;
    align-content: start;
    gap: 0.3rem;
}

.scenario-card__copy strong {
    font-size: 1.02rem;
}

.scenario-card__copy small {
    color: var(--shift-muted);
    line-height: 1.45;
}

.scenario-card__tag {
    position: absolute;
    right: 1rem;
    bottom: 0.85rem;
    color: #91b5a4;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

.mode-picker legend {
    width: 100%;
    margin-bottom: 0.8rem;
    color: #d7eee3;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mode-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "icon title" "icon copy";
    column-gap: 0.85rem;
    min-height: 108px;
    padding: 1.1rem;
    border: 1px solid var(--shift-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.022);
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease;
}

.mode-card.is-selected,
.mode-card:has(input:checked) {
    border-color: rgba(63, 220, 255, 0.55);
    background: rgba(63, 220, 255, 0.065);
}

.mode-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-card > span {
    grid-area: icon;
    display: grid;
    width: 43px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--shift-cyan);
    border-radius: 14px;
    background: rgba(63, 220, 255, 0.08);
    font-size: 0.9rem;
    font-weight: 900;
}

.mode-card strong {
    grid-area: title;
    align-self: end;
}

.mode-card small {
    grid-area: copy;
    color: var(--shift-muted);
}

.game-setup__actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
}

.text-button {
    padding: 0.6rem 0;
    color: var(--shift-green-soft);
    background: transparent;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: rgba(141, 255, 196, 0.28);
    text-underline-offset: 5px;
}

.text-button:hover {
    color: #fff;
    text-decoration-color: currentColor;
}

.text-button--light {
    color: #c4d9cf;
}

/* Board ------------------------------------------------------------------- */

.game-board {
    position: relative;
    padding: clamp(1.2rem, 3vw, 2.2rem);
    background:
        radial-gradient(circle at 90% 12%, rgba(63, 220, 255, 0.06), transparent 24rem),
        #031d17;
}

.game-statusbar {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0 1.4rem;
}

.game-statusbar h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 3rem);
}

.game-statusbar__right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.game-clock {
    display: grid;
    min-width: 90px;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--shift-line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.game-clock span {
    color: #8eaa9d;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.game-clock strong {
    color: var(--shift-green-soft);
    font-variant-numeric: tabular-nums;
}

.game-clock.is-warning strong {
    color: var(--shift-gold);
}

.game-clock.is-critical {
    border-color: rgba(255, 133, 133, 0.48);
    background: rgba(255, 133, 133, 0.07);
}

.game-clock.is-critical strong {
    color: var(--shift-red);
}

.game-pause {
    min-height: 42px;
    padding: 0.6rem 0.85rem;
    color: #d5eadf;
    border: 1px solid var(--shift-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    font-weight: 800;
}

.game-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.game-metrics article {
    display: grid;
    min-height: 96px;
    align-content: center;
    padding: 0.95rem 1rem;
    border: 1px solid var(--shift-line);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.023);
}

.game-metrics span {
    color: #8fac9e;
    font-size: 0.66rem;
    font-weight: 830;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.game-metrics strong {
    color: var(--shift-paper);
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
}

.game-metrics small {
    color: #718f80;
    font-size: 0.68rem;
}

.game-board__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.72fr);
    gap: 1rem;
    align-items: start;
}

.timeline-panel,
.tasks-panel {
    border: 1px solid var(--shift-line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.024);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.timeline-panel {
    min-width: 0;
    padding: 1rem;
}

.tasks-panel {
    position: sticky;
    top: calc(var(--header-height) + 16px);
    padding: 1rem;
}

.game-panel-heading {
    display: flex;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.game-panel-heading h3 {
    margin: 0;
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
}

.timeline-legend {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    color: #91ad9f;
    font-size: 0.68rem;
    font-weight: 780;
}

.timeline-legend span {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot--clean { background: var(--shift-green); box-shadow: 0 0 9px rgba(25, 239, 148, 0.7); }
.legend-dot--price { background: var(--shift-gold); }
.legend-dot--grid { background: var(--shift-red); }

.timeline-instruction {
    margin-bottom: 0.8rem;
    padding: 0.7rem 0.85rem;
    color: #b8d1c5;
    border-left: 3px solid var(--shift-green);
    border-radius: 0 10px 10px 0;
    background: rgba(25, 239, 148, 0.05);
    font-size: 0.84rem;
}

.timeline-scroll {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-color: #167954 rgba(255, 255, 255, 0.04);
    border: 1px solid var(--shift-line);
    border-radius: 16px;
    background: #021a14;
}

.timeline-grid {
    display: grid;
    grid-template-columns: 130px repeat(12, minmax(76px, 1fr));
    min-width: 1050px;
}

.timeline-cell {
    min-height: 67px;
    padding: 0.48rem 0.42rem;
    border-right: 1px solid rgba(225, 255, 239, 0.075);
    border-bottom: 1px solid rgba(225, 255, 239, 0.075);
}

.timeline-cell:nth-child(13n) {
    border-right: 0;
}

.timeline-cell--label {
    position: sticky;
    z-index: 3;
    left: 0;
    display: grid;
    align-content: center;
    padding-left: 0.75rem;
    color: #91ae9f;
    background: #05241c;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 9px 0 20px rgba(0, 12, 9, 0.2);
}

.timeline-time {
    display: grid;
    align-content: center;
    color: #d7eee3;
    background: rgba(255, 255, 255, 0.018);
    text-align: center;
    font-size: 0.72rem;
    font-weight: 850;
}

.timeline-time small {
    display: block;
    color: #658678;
    font-size: 0.55rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.timeline-signal {
    position: relative;
    display: grid;
    align-content: center;
    justify-items: center;
    overflow: hidden;
    text-align: center;
}

.timeline-signal::before {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(var(--signal, 0) * 0.52%);
    max-height: 52%;
    content: "";
    opacity: 0.28;
    background: currentColor;
}

.timeline-signal strong,
.timeline-signal small {
    position: relative;
    z-index: 1;
}

.timeline-signal strong {
    color: var(--shift-paper);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.timeline-signal small {
    color: #789589;
    font-size: 0.55rem;
}

.timeline-signal--clean { color: var(--shift-green); }
.timeline-signal--price { color: var(--shift-gold); }
.timeline-signal--grid { color: var(--shift-red); }
.timeline-signal--load { color: var(--shift-cyan); }

.timeline-slot {
    position: relative;
    display: grid;
    min-height: 98px;
    align-content: start;
    gap: 0.25rem;
    padding: 0.45rem;
    color: var(--shift-paper);
    border: 0;
    border-right: 1px solid rgba(225, 255, 239, 0.075);
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.012);
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease, box-shadow 160ms ease;
}

.timeline-slot:last-child {
    border-right: 0;
}

.timeline-slot:hover:not(:disabled),
.timeline-slot.is-valid {
    background: rgba(25, 239, 148, 0.055);
}

.timeline-slot.is-valid {
    box-shadow: inset 0 0 0 1px rgba(25, 239, 148, 0.22);
}

.timeline-slot.is-valid::after {
    position: absolute;
    top: 5px;
    right: 5px;
    content: "+";
    color: var(--shift-green-soft);
    font-size: 0.8rem;
    font-weight: 900;
}

.timeline-slot:disabled:not(.has-load) {
    opacity: 0.55;
}

.timeline-slot__empty {
    align-self: center;
    justify-self: center;
    color: #48675a;
    font-size: 0.62rem;
}

.timeline-chip {
    display: block;
    overflow: hidden;
    padding: 0.22rem 0.28rem;
    color: #02130e;
    border-radius: 6px;
    background: var(--chip-color, var(--shift-green-soft));
    font-size: 0.55rem;
    font-weight: 900;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-chip.is-continuation {
    opacity: 0.72;
}

.timeline-axis {
    display: grid;
    grid-template-columns: 3fr 3fr 2fr 4fr;
    gap: 0.4rem;
    padding: 0.55rem 0.2rem 0;
    color: #5f7f71;
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.tasks-panel__count {
    flex: 0 0 auto;
    padding: 0.35rem 0.55rem;
    color: var(--shift-green-soft);
    border: 1px solid rgba(25, 239, 148, 0.24);
    border-radius: 999px;
    background: rgba(25, 239, 148, 0.05);
    font-size: 0.65rem;
    font-weight: 850;
}

.task-list {
    display: grid;
    gap: 0.65rem;
}

.task-card {
    overflow: hidden;
    border: 1px solid var(--shift-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.018);
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.task-card.is-selected {
    border-color: rgba(25, 239, 148, 0.65);
    background: rgba(25, 239, 148, 0.06);
    transform: translateX(-3px);
}

.task-card.is-scheduled {
    box-shadow: inset 3px 0 0 var(--task-color, var(--shift-green));
}

.task-card__select {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem;
    color: var(--shift-paper);
    text-align: left;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.task-card__icon {
    display: grid;
    width: 40px;
    aspect-ratio: 1;
    place-items: center;
    color: #031b14;
    border-radius: 12px;
    background: var(--task-color, var(--shift-green-soft));
    font-size: 1rem;
    font-weight: 950;
}

.task-card__copy {
    display: grid;
    min-width: 0;
    align-content: center;
}

.task-card__copy strong {
    overflow: hidden;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-card__copy small {
    color: #8fac9e;
    font-size: 0.65rem;
}

.task-card__status {
    align-self: center;
    color: #6e8e7f;
    font-size: 0.62rem;
    font-weight: 850;
    text-align: right;
    text-transform: uppercase;
}

.task-card.is-scheduled .task-card__status {
    color: var(--shift-green-soft);
}

.task-card__controls {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.35rem;
    padding: 0 0.7rem 0.7rem;
}

.task-mini-button {
    min-height: 34px;
    padding: 0.35rem 0.45rem;
    color: #bcd4c8;
    border: 1px solid var(--shift-line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    font-size: 0.64rem;
    font-weight: 800;
}

.task-mini-button:hover:not(:disabled) {
    border-color: rgba(141, 255, 196, 0.32);
    background: rgba(141, 255, 196, 0.06);
}

.task-mini-button--remove {
    color: #ffb0b0;
}

.selection-guide {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.8rem;
    border: 1px dashed rgba(141, 255, 196, 0.18);
    border-radius: 14px;
    background: rgba(141, 255, 196, 0.025);
}

.selection-guide__icon {
    display: grid;
    width: 34px;
    aspect-ratio: 1;
    flex: 0 0 auto;
    place-items: center;
    color: var(--shift-green-soft);
    border-radius: 10px;
    background: rgba(25, 239, 148, 0.08);
}

.selection-guide strong {
    display: block;
    font-size: 0.78rem;
}

.selection-guide p {
    margin: 0;
    color: #8daa9c;
    font-size: 0.68rem;
    line-height: 1.45;
}

.game-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--shift-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.022);
}

.game-controls__secondary {
    display: flex;
    gap: 0.5rem;
}

.game-control {
    display: inline-flex;
    min-height: 42px;
    gap: 0.45rem;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.85rem;
    color: #c1d8cc;
    border: 1px solid var(--shift-line);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.75rem;
    font-weight: 800;
}

.game-control:hover:not(:disabled) {
    border-color: rgba(141, 255, 196, 0.34);
    background: rgba(141, 255, 196, 0.06);
}

.game-control:disabled {
    opacity: 0.38;
}

.game-controls__finish {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.game-controls__finish p {
    max-width: 310px;
    margin: 0;
    color: #8eac9e;
    font-size: 0.72rem;
    text-align: right;
}

.game-controls__finish .button:disabled {
    opacity: 0.45;
    box-shadow: none;
    transform: none;
}

.game-pause-overlay {
    position: absolute;
    z-index: 8;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 2rem;
    background: rgba(1, 13, 10, 0.82);
    backdrop-filter: blur(12px);
}

.game-pause-overlay > div {
    max-width: 420px;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--shift-line-strong);
    border-radius: 24px;
    background: #05271f;
    box-shadow: var(--shift-shadow);
}

.game-pause-overlay > div > span {
    display: grid;
    width: 70px;
    aspect-ratio: 1;
    place-items: center;
    margin: 0 auto 1rem;
    color: var(--shift-green-soft);
    border-radius: 50%;
    background: rgba(25, 239, 148, 0.08);
    font-size: 1.7rem;
}

/* Results ----------------------------------------------------------------- */

.game-results {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 4.6rem);
    background:
        radial-gradient(circle at 16% 20%, rgba(25, 239, 148, 0.13), transparent 25rem),
        radial-gradient(circle at 92% 8%, rgba(63, 220, 255, 0.08), transparent 22rem),
        #031f18;
}

.results-celebration span {
    position: absolute;
    width: 6px;
    height: 18px;
    border-radius: 999px;
    background: var(--shift-green);
    animation: result-float 5s ease-in-out infinite;
}

.results-celebration span:nth-child(1) { left: 6%; top: 12%; transform: rotate(18deg); }
.results-celebration span:nth-child(2) { left: 21%; top: 5%; background: var(--shift-gold); animation-delay: -1.2s; }
.results-celebration span:nth-child(3) { right: 8%; top: 13%; background: var(--shift-cyan); animation-delay: -2.1s; }
.results-celebration span:nth-child(4) { right: 23%; top: 6%; background: var(--shift-violet); animation-delay: -0.7s; }
.results-celebration span:nth-child(5) { left: 12%; bottom: 8%; background: var(--shift-cyan); animation-delay: -3s; }
.results-celebration span:nth-child(6) { right: 12%; bottom: 12%; background: var(--shift-gold); animation-delay: -1.8s; }

@keyframes result-float {
    0%, 100% { translate: 0 0; opacity: 0.35; }
    50% { translate: 0 20px; opacity: 0.9; }
}

.results-summary {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    margin-bottom: 2rem;
}

.score-orb {
    --score: 0;
    display: grid;
    width: clamp(150px, 20vw, 210px);
    aspect-ratio: 1;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #05271e 53%, transparent 54%),
        conic-gradient(var(--shift-green) calc(var(--score) * 1%), rgba(255, 255, 255, 0.075) 0);
    box-shadow: 0 0 80px rgba(25, 239, 148, 0.18);
}

.score-orb > div {
    display: flex;
    align-items: baseline;
}

.score-orb strong {
    color: var(--shift-paper);
    font-size: clamp(3.2rem, 7vw, 5.4rem);
    line-height: 1;
}

.score-orb span {
    color: #85a496;
    font-size: 0.85rem;
}

.results-summary__copy h2 {
    margin-bottom: 0.7rem;
}

.results-summary__copy > p:not(.game-kicker):not(.results-summary__scenario) {
    max-width: 650px;
    color: #c2d9cd;
    font-size: 1.05rem;
}

.results-summary__scenario {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    color: var(--shift-green-soft);
    border: 1px solid rgba(25, 239, 148, 0.25);
    border-radius: 999px;
    background: rgba(25, 239, 148, 0.05);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.result-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.result-metrics article {
    padding: 1rem;
    border: 1px solid var(--shift-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
}

.result-metrics article > span {
    display: block;
    color: #90ad9f;
    font-size: 0.65rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.result-metrics strong {
    display: block;
    margin: 0.2rem 0 0.4rem;
    color: var(--shift-paper);
    font-size: 1.8rem;
}

.result-meter {
    height: 6px;
    overflow: hidden;
    margin-bottom: 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.result-meter span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--shift-cyan), var(--shift-green));
    transition: width 900ms cubic-bezier(.2, .8, .2, 1);
}

.result-metrics small {
    color: #769486;
    font-size: 0.68rem;
    line-height: 1.4;
}

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

.result-card {
    padding: 1.2rem;
    border: 1px solid var(--shift-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
}

.result-card h3 {
    margin-bottom: 0.5rem;
}

.result-card > p:last-child {
    color: #a6c2b4;
}

.achievement-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.achievement-chip {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    padding: 0.45rem 0.65rem;
    color: #052219;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--shift-green-soft), var(--shift-green));
    font-size: 0.68rem;
    font-weight: 900;
}

.achievement-chip--muted {
    color: #9db9ac;
    border: 1px solid var(--shift-line);
    background: rgba(255, 255, 255, 0.03);
}

.game-disclaimer {
    margin: 1rem 0;
    padding: 0.8rem 0.9rem;
    color: #809f91;
    border-left: 3px solid var(--shift-gold);
    background: rgba(255, 214, 107, 0.04);
    font-size: 0.72rem;
}

.results-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    align-items: center;
}

.game-control--share {
    min-height: 52px;
    padding-inline: 1.1rem;
}

/* Learning and alpha notes ----------------------------------------------- */

.ecoshift-learning {
    position: relative;
}

.learning-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.learning-grid article {
    min-height: 270px;
    padding: 1.4rem;
    border: 1px solid rgba(4, 28, 23, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 22px 55px rgba(0, 35, 24, 0.07);
}

.learning-grid article > span {
    display: grid;
    width: 52px;
    aspect-ratio: 1;
    place-items: center;
    margin-bottom: 2.8rem;
    color: #063126;
    border-radius: 15px;
    background: linear-gradient(135deg, #a6ffd0, #2be99a);
    font-size: 1.2rem;
    font-weight: 950;
}

.learning-grid article:nth-child(2) > span { background: linear-gradient(135deg, #a7efff, #3fdcff); }
.learning-grid article:nth-child(3) > span { background: linear-gradient(135deg, #ffe8a9, #ffd66b); }
.learning-grid article:nth-child(4) > span { background: linear-gradient(135deg, #d8ccff, #b7a1ff); }

.learning-grid h3 {
    margin-bottom: 0.6rem;
}

.learning-grid p {
    color: #4b6c5e;
}

.ecoshift-alpha-notes {
    background:
        radial-gradient(circle at 100% 0%, rgba(63, 220, 255, 0.08), transparent 28rem),
        #031d17;
}

.alpha-notes {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) auto;
    gap: 2rem;
    align-items: center;
    padding: clamp(2rem, 5vw, 4rem);
    border: 1px solid var(--shift-line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.025);
}

.alpha-notes h2 {
    max-width: 760px;
    font-size: clamp(2rem, 4vw, 4rem);
}

.alpha-notes > div:first-child > p:last-child {
    max-width: 720px;
    color: #a9c5b7;
}

.alpha-notes__actions {
    display: grid;
    gap: 0.8rem;
    justify-items: start;
}

/* Dialog ------------------------------------------------------------------ */

.game-dialog {
    width: min(calc(100% - 32px), 760px);
    max-height: min(88vh, 900px);
    padding: 0;
    overflow: auto;
    color: var(--shift-paper);
    border: 1px solid var(--shift-line-strong);
    border-radius: 26px;
    background: #05271f;
    box-shadow: 0 40px 140px rgba(0, 0, 0, 0.58);
}

.game-dialog::backdrop {
    background: rgba(0, 12, 9, 0.78);
    backdrop-filter: blur(8px);
}

.game-dialog__inner {
    position: relative;
    padding: clamp(1.5rem, 5vw, 3rem);
}

.game-dialog__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: grid;
    width: 42px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--shift-paper);
    border: 1px solid var(--shift-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
    font-size: 1.5rem;
}

.game-dialog h2 {
    max-width: 620px;
    padding-right: 2.5rem;
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.help-steps {
    display: grid;
    gap: 0.65rem;
    padding: 0;
    margin: 1.5rem 0;
    list-style: none;
}

.help-steps li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    padding: 0.8rem;
    border: 1px solid var(--shift-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.help-steps li > span {
    display: grid;
    width: 32px;
    aspect-ratio: 1;
    place-items: center;
    color: #03231a;
    border-radius: 10px;
    background: var(--shift-green-soft);
    font-size: 0.75rem;
    font-weight: 950;
}

.help-steps strong {
    display: block;
}

.help-steps p {
    margin: 0;
    color: #a4c1b3;
    font-size: 0.85rem;
}

.help-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 1.3rem;
}

.help-inputs article {
    padding: 0.9rem;
    border: 1px solid rgba(63, 220, 255, 0.18);
    border-radius: 14px;
    background: rgba(63, 220, 255, 0.045);
}

.help-inputs p {
    margin: 0;
    color: #9fbdaf;
    font-size: 0.8rem;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1100px) {
    .ecoshift-hero__layout {
        grid-template-columns: 1fr minmax(330px, 0.75fr);
    }

    .game-toolbar {
        grid-template-columns: minmax(220px, 1fr) auto;
    }

    .game-toolbar__actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .game-board__layout {
        grid-template-columns: 1fr;
    }

    .tasks-panel {
        position: static;
    }

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

    .result-metrics,
    .learning-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .ecoshift-hero {
        min-height: auto;
    }

    .ecoshift-hero__layout {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-block: 4rem;
    }

    .ecoshift-hero__visual {
        width: min(100%, 500px);
        justify-self: center;
    }

    .game-toolbar {
        grid-template-columns: 1fr;
    }

    .game-toolbar__stats,
    .game-toolbar__actions {
        grid-column: auto;
        justify-content: flex-start;
    }

    .scenario-picker {
        grid-template-columns: 1fr;
    }

    .scenario-card {
        min-height: 112px;
    }

    .game-statusbar,
    .game-controls,
    .game-controls__finish,
    .results-actions {
        align-items: stretch;
    }

    .game-statusbar,
    .game-controls {
        flex-direction: column;
    }

    .game-statusbar__right,
    .game-controls__finish {
        width: 100%;
        justify-content: space-between;
    }

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

    .game-controls__finish p {
        text-align: left;
    }

    .results-summary {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .results-grid,
    .alpha-notes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .ecoshift-hero__copy h1 {
        font-size: clamp(3.25rem, 18vw, 5.2rem);
    }

    .ecoshift-orbit {
        border-radius: 28px;
    }

    .ecoshift-orbit__sun,
    .ecoshift-orbit__home,
    .ecoshift-orbit__battery,
    .ecoshift-orbit__bolt {
        width: 42px;
        border-radius: 12px;
        font-size: 1rem;
    }

    .game-toolbar__stats {
        width: 100%;
    }

    .game-toolbar__stats > div {
        flex: 1;
    }

    .game-toolbar__actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }

    .game-icon-button {
        display: grid;
        gap: 0.25rem;
        min-width: 0;
        justify-items: center;
        font-size: 0.62rem;
    }

    .game-setup,
    .game-results {
        padding: 1.25rem;
    }

    .mode-picker,
    .task-list,
    .result-metrics,
    .results-grid,
    .learning-grid,
    .help-inputs {
        grid-template-columns: 1fr;
    }

    .game-setup__actions,
    .game-statusbar__right,
    .game-controls__finish,
    .game-controls__secondary {
        flex-direction: column;
        align-items: stretch;
    }

    .game-setup__actions .button,
    .results-actions .button,
    .results-actions .game-control,
    .game-controls__finish .button {
        width: 100%;
    }

    .game-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .game-metrics article {
        min-height: 84px;
    }

    .game-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .timeline-axis {
        display: none;
    }

    .game-controls__secondary {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .score-orb {
        width: 150px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ecoshift-orbit::before,
    .ecoshift-orbit__ring,
    .results-celebration span {
        animation: none !important;
    }

    .result-meter span {
        transition: none;
    }
}

@media (forced-colors: active) {
    .scenario-card.is-selected,
    .task-card.is-selected,
    .timeline-slot.is-valid {
        outline: 3px solid Highlight;
        outline-offset: -3px;
    }

    .timeline-chip,
    .achievement-chip {
        border: 1px solid CanvasText;
    }
}

/* Keep programmatic game-section scrolling clear of the sticky site header. */
.game-setup,
.game-board,
.game-results {
    scroll-margin-top: calc(var(--header-height) + 24px);
}
