/* Stella Fire training page (build 1.8). Loaded on training/index.php after support.css, which supplies the shared .sp-* parts. */

.tr { --tr-lcd: #b9e4c9; --tr-lcd-ink: #10301d; }

/* ---------- Hero ---------- */
.tr-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    grid-template-areas: "copy panel" "facts facts";
    gap: 40px 64px;
    align-items: center;
}
.tr-hero__copy { grid-area: copy; }
.tr-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.tr-hero__panel {
    grid-area: panel;
    margin: 0;
    justify-self: center;
    width: min(100%, 360px);
    aspect-ratio: 1;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
    display: grid;
    place-items: center;
    animation: tr-rise .8s cubic-bezier(.2, .8, .2, 1) both;
}
.tr-hero__panel img { width: 86%; height: auto; max-width: 100%; }
.tr-facts {
    grid-area: facts;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, .16);
}
.tr-facts div { padding: 20px 20px 0 0; }
.tr-facts div + div { padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, .12); }
.tr-facts dt { color: #aab3ba; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.tr-facts dd { margin: 6px 0 0; font-family: "Outfit", Inter, sans-serif; font-size: clamp(1.1rem, 2vw, 1.45rem); font-weight: 700; }
@keyframes tr-rise { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Outcomes ---------- */
.tr-outcomes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1.5px solid var(--sp-ink);
}
.tr-outcomes li {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 26px 26px 30px 0;
    border-bottom: 1px solid var(--sp-line);
}
.tr-outcomes li:not(:nth-child(3n + 1)) { padding-left: 26px; border-left: 1px solid var(--sp-line); }
.tr-outcomes__n { color: var(--sp-red); font-family: "Outfit", Inter, sans-serif; font-weight: 700; font-variant-numeric: tabular-nums; }
.tr-outcomes h3 { font-size: 1.2rem; font-weight: 700; }
.tr-outcomes p { margin: 0; color: var(--sp-steel); line-height: 1.55; }
.tr-formula {
    margin: 28px 0 0;
    padding: 18px 22px;
    border-left: 4px solid var(--sp-red);
    background: var(--sp-ceiling);
    font-size: 1.05rem;
    line-height: 1.5;
}

/* ---------- Job flow ---------- */
.tr-flow { padding: clamp(36px, 5vw, 56px) 0; background: var(--sp-red); color: #fff; }
.tr .tr-flow__title { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 700; margin-bottom: 26px; }
.tr-flow__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    counter-reset: none;
}
.tr-flow__steps li {
    position: relative;
    display: grid;
    justify-items: start;
    gap: 10px;
    font-weight: 700;
    font-size: 1.02rem;
}
.tr-flow__steps li::before {
    content: "";
    position: absolute;
    top: 19px;
    left: 40px;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, .45);
}
.tr-flow__steps li:last-child::before { display: none; }
.tr-flow__steps span {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: var(--sp-red-deep);
    font-variant-numeric: tabular-nums;
}

/* ---------- Day ---------- */
.tr-day { list-style: none; margin: 0; padding: 0; display: grid; max-width: 920px; }
.tr-day__item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--sp-line);
}
.tr-day__item--practical:not(.tr-day__item--practical ~ .tr-day__item--practical) { margin-top: 26px; border-top: 1.5px solid var(--sp-ink); }
.tr-day__time {
    font-family: "Outfit", Inter, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.tr-day__time span { display: block; color: var(--sp-steel); font-family: Inter, system-ui, sans-serif; font-size: .86rem; font-weight: 500; margin-top: 4px; }
.tr-day__kind {
    display: inline-block;
    margin-bottom: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--sp-ceiling);
    color: var(--sp-steel);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.tr-day__item--practical .tr-day__kind { background: #fdecec; color: var(--sp-red-deep); }
.tr-day h3 { font-size: 1.22rem; font-weight: 700; }
.tr-day p { margin: 4px 0 0; color: var(--sp-steel); line-height: 1.5; }

/* ---------- Rig ---------- */
.tr-rig { padding: clamp(48px, 6vw, 88px) 0; background: var(--sp-panel); color: #fff; }
.tr-rig__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 40px clamp(32px, 5vw, 72px);
    align-items: center;
}
.tr-eyebrow--plain::before { display: none; }
.tr-rig h2 {
    margin: 0; font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.tr-rig__copy p:not(.sp-eyebrow) { margin: 16px 0 0; color: #c3cad0; line-height: 1.6; max-width: 34em; }

.tr-lcd {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(#e9ebec, #cfd3d6);
    box-shadow: inset 0 1px 0 #fff, 0 26px 50px rgba(0, 0, 0, .4);
    color: var(--sp-ink);
    min-width: 0;
}
.tr-lcd__bar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .12em;
}
.tr-lcd__bar span:first-child { color: var(--sp-red-deep); }
.tr-lcd__screen {
    display: grid;
    gap: 2px;
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--tr-lcd);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, .25);
    color: var(--tr-lcd-ink);
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: clamp(.74rem, 1.6vw, .95rem);
    overflow-x: auto;
}
.tr-lcd__row {
    display: grid;
    grid-template-columns: 8.5ch 10.5ch minmax(0, 1fr);
    gap: 1.5ch;
    white-space: nowrap;
    padding: 3px 0;
    opacity: 0;
    animation: tr-scan .35s steps(3) forwards;
    animation-delay: calc(var(--i) * .28s + .3s);
}
.tr-lcd__row span:last-child { overflow: hidden; text-overflow: ellipsis; }
@keyframes tr-scan { to { opacity: 1; } }
.tr-lcd__leds { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; color: #5f6a73; }
.tr-lcd__leds span { display: inline-flex; align-items: center; gap: 6px; }
.tr-lcd__leds span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #aab1b6; }
.tr-lcd__leds .on::before { background: #2fbf63; box-shadow: 0 0 8px #2fbf63; }

.tr-stations__title { margin-top: clamp(40px, 5vw, 64px) !important; font-size: 1.3rem; font-weight: 700; }
.tr-stations {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.tr-stations li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    font-weight: 600;
    line-height: 1.35;
}
.tr-stations li span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(229, 35, 41, .2);
    color: #ff8a8d;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.tr-stations__note { margin: 16px 0 0; color: #aab3ba; }

/* ---------- Assessment ---------- */
.tr-assess { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.4fr); gap: clamp(14px, 2vw, 22px); align-items: start; }
.tr-assess__card, .tr-assess__fails { padding: 26px 24px; border-radius: 14px; border: 1.5px solid var(--sp-line); }
.tr-assess__card { display: grid; align-content: start; gap: 10px; }
.tr-assess__big {
    font-family: "Outfit", Inter, sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--sp-red);
    font-variant-numeric: tabular-nums;
}
.tr-assess__big small { font-size: 1.1rem; font-weight: 700; color: var(--sp-steel); letter-spacing: 0; }
.tr-assess h3 { font-size: 1.2rem; font-weight: 700; }
.tr-assess p { margin: 0; color: var(--sp-steel); line-height: 1.55; }
.tr-assess__fails { background: #fff6f6; border-color: #f4c7c9; }
.tr-assess__fails ul { list-style: none; margin: 14px 0 16px; padding: 0; display: grid; gap: 10px; }
.tr-assess__fails li { position: relative; padding-left: 22px; line-height: 1.45; color: #3d474f; }
.tr-assess__fails li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 9px; border-radius: 2px; background: var(--sp-red); transform: rotate(45deg); }
.tr-assess__fails strong { color: var(--sp-ink); }

/* ---------- Booking ---------- */
.tr-row3 { grid-template-columns: minmax(0, .8fr) minmax(0, 1.1fr) minmax(0, 1.1fr); }
.tr-refs a { display: inline-block; margin-top: 16px; color: var(--sp-red-deep); font-weight: 700; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1000px) {
    .tr-hero__inner { grid-template-columns: 1fr; grid-template-areas: "copy" "panel" "facts"; }
    .tr-hero__panel { width: min(100%, 280px); justify-self: start; }
    .tr-outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tr-outcomes li:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
    .tr-outcomes li:nth-child(2n) { padding-left: 26px; border-left: 1px solid var(--sp-line); }
    .tr-flow__steps { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 22px; }
    .tr-flow__steps li:nth-child(4)::before { display: none; }
    .tr-rig__grid { grid-template-columns: 1fr; }
    .tr-stations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tr-assess { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tr-assess__fails { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .tr-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tr-facts div:nth-child(3) { padding-left: 0; border-left: 0; }
    .tr-outcomes { grid-template-columns: 1fr; }
    .tr-outcomes li:nth-child(2n) { padding-left: 0; border-left: 0; }
    .tr-flow__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tr-flow__steps li:nth-child(2n)::before { display: none; }
    .tr-flow__steps li:nth-child(4)::before { display: none; }
    .tr-day__item { grid-template-columns: 1fr; gap: 6px; }
    .tr-day__time { display: flex; align-items: baseline; gap: 8px; font-size: 1.2rem; }
    .tr-day__time span { margin: 0; }
    .tr-stations, .tr-assess, .tr-row3 { grid-template-columns: 1fr; }
    .tr-hero__actions .sp-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .tr-hero__panel { animation: none; }
    .tr-lcd__row { animation: none; opacity: 1; }
}
