/* Console theme: --ink is foreground, --paper is the machine substrate. */
:root {
    --ink: #dfe6e9;
    --paper: #07090b;
    --panel: #0c1013;
    --panel-hi: #171c1e;
    --muted: #a5afb3;
    --signal: #ff4d3d;
    --cyan: #45e6d4;
    --cyan-text: #45e6d4;
    --yellow: #ffb020;
    --line: #303638;
    --line-hi: #536064;
    --mono: "Courier New", ui-monospace, monospace;
    --max: 1220px;
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(165, 175, 179, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(165, 175, 179, 0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    font-family: "Avenir Next", "Trebuchet MS", sans-serif;
    font-size: 18px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

@keyframes boot-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

@keyframes led-pulse {
    0%, 45% {
        opacity: 1;
        box-shadow: 0 0 10px var(--cyan);
    }
    55%, 100% {
        opacity: 0.28;
        box-shadow: none;
    }
}

.site-header,
.status-strip,
.command-copy {
    animation: boot-in 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.status-strip { animation-delay: 110ms; }
.command-copy { animation-delay: 210ms; }

a {
    color: inherit;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--cyan);
}

a:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    z-index: 30;
    top: 12px;
    left: 12px;
    padding: 12px 16px;
    color: var(--paper);
    background: var(--cyan);
    font-family: var(--mono);
    font-weight: 700;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

.site-header {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    border-top: 3px solid var(--signal);
}

.header-inner,
.shell {
    width: min(calc(100% - 40px), var(--max));
    margin-inline: auto;
}

.header-inner {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-family: var(--mono);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0;
    text-decoration: none;
}

.wordmark::before {
    content: "";
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    background-image: url("/assets/skynet-mark.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter: drop-shadow(0 0 7px rgba(255, 77, 61, 0.5));
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 22px;
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
}

.site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
}

.site-nav a::before {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 2px;
    background: var(--cyan);
    transition: right 180ms ease;
}

.site-nav a:hover::before,
.site-nav a:focus-visible::before {
    right: 0;
}

.site-nav a[aria-current="page"] {
    color: var(--signal);
}

.site-nav a[aria-current="page"]::before {
    right: 0;
    background: var(--signal);
}

.status-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 22px;
    width: min(calc(100% - 40px), var(--max));
    margin-inline: auto;
    padding-block: 9px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ok {
    color: var(--cyan-text);
}

.led {
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--cyan);
    animation: led-pulse 2.4s steps(1, end) 2;
}

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--paper);
}

.hero-art {
    position: absolute;
    z-index: -2;
    top: 0;
    left: 50%;
    width: max(100%, 1180px);
    height: 100%;
    transform: translateX(-50%);
    object-fit: contain;
    object-position: center;
}

.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 5%;
    left: 54%;
    width: 30%;
    height: 1px;
    background: var(--signal);
    box-shadow: 0 0 12px var(--signal);
    opacity: 0;
    animation: optical-scan 3.6s ease-out 600ms;
    pointer-events: none;
}

@keyframes optical-scan {
    15%, 70% { opacity: 0.65; }
    100% { top: 87%; opacity: 0; }
}

.command-content {
    min-height: 510px;
    display: flex;
    align-items: center;
    padding-block: 42px;
}

.command-copy {
    max-width: 580px;
}

.hero h1 {
    font-size: 88px;
    line-height: 0.98;
    margin-bottom: 26px;
    color: #f2f5f5;
    text-shadow: none;
}

.hero h1 span {
    display: block;
    margin-top: 12px;
    font-size: 32px;
    color: var(--muted);
}

.hero-directive {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 600;
}

.hero .lede {
    max-width: 44ch;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.command-rail {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-block: 16px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
}

.eyebrow,
.kicker,
.meta,
.label {
    margin: 0 0 13px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.eyebrow {
    color: var(--signal);
}

.kicker {
    color: var(--cyan-text);
}

/* Titles stay in Title Case: no text-transform here. */
h1,
h2,
h3 {
    margin-top: 0;
    font-family: var(--mono);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: 0;
}

h1 {
    max-width: 16ch;
    margin-bottom: 24px;
    font-size: 64px;
}

h2 {
    font-size: 34px;
}

h3 {
    font-size: 22px;
}

.lede {
    max-width: 58ch;
    font-size: 21px;
    line-height: 1.5;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 12px 18px;
    border: 1px solid var(--line-hi);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 160ms linear, color 160ms linear, box-shadow 160ms linear;
}

.button:hover {
    color: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 24px rgba(69, 230, 212, 0.22);
}

.button--primary {
    color: var(--paper);
    background: var(--signal);
    border-color: var(--signal);
}

.button--primary:hover {
    color: var(--paper);
    background: #ff6b5c;
    border-color: #ff6b5c;
    box-shadow: 0 0 28px rgba(255, 77, 61, 0.4);
}

.band {
    border-block: 1px solid var(--line);
    background:
        linear-gradient(rgba(165, 175, 179, 0.035) 1px, transparent 1px) 0 0 / 100% 34px,
        var(--panel);
}

.band .shell {
    padding-block: 34px 42px;
}

.path-list,
.lesson-grid,
.term-grid,
.tip-list {
    display: grid;
    gap: 1px;
    margin: 34px 0 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--line);
    background: var(--line);
}

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

.path-list li {
    min-height: 216px;
    padding: 24px;
    background: var(--paper);
}

.path-list li,
.lesson-grid article,
.term-grid article,
.tip-list article {
    position: relative;
    transition: background 200ms linear;
}

.path-list li::after,
.lesson-grid article::after,
.tip-list article::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cyan);
    transition: width 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.path-list li:hover,
.lesson-grid article:hover,
.term-grid article:hover,
.tip-list article:hover {
    background: var(--panel-hi);
}

.path-list li:hover::after,
.lesson-grid article:hover::after,
.tip-list article:hover::after {
    width: 100%;
}

.path-list a,
.lesson-grid a {
    display: block;
    font-family: var(--mono);
    font-size: 20px;
    font-weight: 700;
}

.section {
    padding-block: 60px;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(280px, 1.3fr);
    gap: 48px;
    align-items: end;
}

.section-heading p {
    max-width: 58ch;
    margin: 0;
    color: var(--muted);
}

.lesson-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lesson-grid article {
    min-height: 210px;
    padding: 26px;
    background: var(--paper);
}

.status {
    color: var(--cyan-text);
}

.principle {
    max-width: 32ch;
    border-left: 3px solid var(--signal);
    padding: 4px 0 4px 24px;
    font-family: var(--mono);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.16;
    text-shadow: 0 0 26px rgba(255, 77, 61, 0.24);
}

.page-intro {
    position: relative;
    padding-block: 48px 40px;
    border-bottom: 1px solid var(--line);
    border-left: 4px solid var(--signal);
    background: var(--paper) url("/assets/machine-core.webp") right center / 950px auto no-repeat;
}

.page-intro .shell {
    padding-right: 26%;
}

.page-intro h1 {
    max-width: 22ch;
    font-size: 48px;
    line-height: 1.12;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(180px, 0.32fr) minmax(0, 0.68fr);
    gap: 52px;
    padding-block: 56px 84px;
}

.article-nav {
    align-self: start;
    position: sticky;
    top: 24px;
    padding-top: 12px;
    border-top: 2px solid var(--signal);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
    border-left: 1px solid var(--line);
    padding-left: 18px;
}

.article-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-block: 2px;
}

.prose {
    max-width: 68ch;
}

.prose h2 {
    margin-top: 56px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.prose h2:first-child {
    margin-top: 0;
}

.callout,
.exercise {
    margin-block: 34px;
    padding: 24px;
    border-block: 1px solid var(--line);
    border-left: 3px solid var(--yellow);
    background: var(--panel);
}

.callout .label {
    color: var(--yellow);
}

.exercise {
    border-left-color: var(--cyan);
}

.exercise .label {
    color: var(--cyan-text);
}

.callout > :last-child,
.exercise > :last-child {
    margin-bottom: 0;
}

code {
    padding: 0.14em 0.4em;
    border: 1px solid var(--line-hi);
    background: var(--panel-hi);
    color: var(--cyan-text);
    font-family: var(--mono);
    font-size: 0.86em;
}

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

.tip-list article,
.term-grid article {
    padding: 26px;
    background: var(--paper);
}

.tip-list h2,
.term-grid h2,
.tip-list h3,
.term-grid h3 {
    margin-bottom: 10px;
    font-size: 19px;
    line-height: 1.2;
}

.jump-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
}

.jump-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration-color: var(--line-hi);
}

.jump-nav a:hover {
    text-decoration-color: var(--cyan);
}

.glossary-search {
    max-width: 560px;
    margin-top: 26px;
}

.glossary-search label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
}

.glossary-search input {
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border: 1px solid var(--line-hi);
    background: var(--panel);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 16px;
}

.site-nav .nav-enrol{
    color:var(--paper);background:var(--cyan);
    padding:.35rem .85rem;border-radius:0;
}
.site-nav .nav-enrol:hover,.site-nav .nav-enrol:focus-visible{
    background:var(--ink);color:var(--paper);
}
.glossary-search input::placeholder {

    color: var(--muted);
}

.glossary-search input:focus-visible {
    border-color: var(--cyan);
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

.glossary-search p {
    margin: 10px 0 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
}

mark {
    padding: 0 2px;
    background: var(--cyan);
    color: var(--paper);
}

.tip-list p,
.term-grid p,
.path-list p,
.lesson-grid p {
    color: var(--muted);
    font-size: 16px;
}

.term-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-footer {
    padding-block: 34px;
    border-top: 1px solid var(--line);
    background: var(--panel);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.reveal {
    opacity: 1;
}

.reveal.is-visible {
    animation: content-arrive 500ms ease;
}

@keyframes content-arrive {
    from { transform: translateY(10px); }
}

@media (max-width: 1000px) {
    .path-list,
    .lesson-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .command-copy {
        max-width: 500px;
    }

    .hero-art {
        left: 56%;
    }

    .page-intro {
        background-position: right -150px center;
    }

    .page-intro .shell {
        padding-right: 18%;
    }
}

@media (max-width: 800px) {
    body {
        font-size: 17px;
    }

    .header-inner,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        padding-block: 18px;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .status-strip {
        font-size: 10px;
        letter-spacing: 0;
    }

    .section-heading,
    .article-layout {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 68px;
    }

    .hero-art {
        left: 64%;
        opacity: 0.42;
    }

    .page-intro {
        background-image: none;
    }

    .page-intro .shell {
        padding-right: 0;
    }

    .page-intro h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 28px;
    }

    .path-list,
    .lesson-grid,
    .tip-list,
    .term-grid {
        grid-template-columns: 1fr;
    }

    .path-list li,
    .lesson-grid article,
    .tip-list article,
    .term-grid article {
        min-height: auto;
    }

    .article-nav {
        position: static;
    }

    .principle {
        max-width: none;
        font-size: 26px;
    }
}

@media (max-width: 540px) {
    .header-inner {
        gap: 10px;
        padding-block: 12px;
    }

    .site-nav {
        gap: 0 17px;
        font-size: 12px;
    }

    .status-strip {
        gap: 6px 12px;
    }

    .status-strip > :last-child {
        display: none;
    }

    .command-content {
        min-height: 500px;
        padding-block: 90px 26px;
    }

    .command-copy {
        width: 100%;
    }

    .hero-art {
        top: -75px;
        left: auto;
        right: -70px;
        width: 560px;
        height: 299px;
        opacity: 1;
        transform: none;
    }

    .hero::after {
        left: 50%;
        animation-name: none;
    }

    .hero .eyebrow {
        max-width: 16ch;
        font-size: 10px;
    }

    .hero h1 {
        font-size: 60px;
        margin-bottom: 20px;
    }

    .hero h1 span {
        font-size: 23px;
        margin-top: 5px;
    }

    .hero-directive {
        font-size: 17px;
    }

    .hero .lede {
        font-size: 16px;
    }

    .actions {
        margin-top: 22px;
        gap: 9px;
    }

    .hero .button {
        width: 100%;
        min-height: 46px;
    }

    .hero .button:not(.button--primary) {
        min-height: 40px;
        padding-block: 8px;
    }

    .command-rail {
        font-size: 10px;
    }

    .command-rail > :nth-child(2) {
        display: none;
    }

    .band .shell,
    .section {
        padding-block: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .site-header,
    .status-strip,
    .command-copy {
        opacity: 1;
        transform: none;
    }

    .led {
        opacity: 1;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
