:root {
    color-scheme: dark;
    --black: #000;
    --panel: #181818;
    --panel-soft: #101010;
    --line: #555;
    --text: #fff;
    --heading: #ffff99;
    --link: #ff6600;
    --blue: #0099ff;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--black); }

body {
    height: auto;
    min-height: 100vh;
    margin: 0;
    overflow: auto;
    color: var(--text);
    background: var(--black);
    font: 14px/1.55 Arial, Helvetica, sans-serif;
}

a { color: var(--link); text-decoration: none; }
a:visited { color: var(--link); }
a:hover, a:focus-visible { color: #ff8a3d; text-decoration: underline; }

.archive-shell {
    width: min(1440px, calc(100% - 40px));
    margin: 0 auto;
    padding: 18px 0 40px;
}

.site-hero {
    display: grid;
    grid-template-columns: minmax(220px, 390px) 1fr;
    gap: 24px;
    align-items: center;
    min-height: 126px;
    padding: 14px 20px;
    border: 1px solid #333;
    border-top: 4px solid var(--link);
    background: linear-gradient(120deg, #080808, #18120d);
}

.logo-mark {
    padding: 8px;
    border: 1px solid #6d421f;
    background: #030303;
}

.site-logo { display: block; width: min(100%, 360px); height: auto; }

.hero-copy { text-align: right; }
.section-label {
    color: var(--link);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 3px 0;
    color: #fff8e8;
    font-size: clamp(20px, 3vw, 34px);
    line-height: 1.05;
    text-transform: uppercase;
}

.hero-copy p { margin: 4px 0 0; color: #cfc1ad; }

.archive-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 24px;
    padding: 10px 14px;
    border: 1px solid #333;
    border-top: 0;
    background: #0b0b0b;
}

.archive-content {
    min-width: 0;
    margin-top: 0;
    padding: clamp(16px, 3vw, 30px);
    overflow-x: auto;
    border: 1px solid #444;
    border-radius: 10px;
    background: var(--panel);
}

.archive-content > :first-child { margin-top: 0; }
.archive-content > :last-child { margin-bottom: 0; }

.archive-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin-top: 18px;
}

.archive-grid .track-nav {
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
}

.tutorials-index {
    width: 100% !important;
    table-layout: auto;
}

.tutorials-index .tutorial-column {
    width: 100%;
    padding: 0 0 24px;
}

.tutorials-index .tutorial-list-column {
    width: 100% !important;
    height: auto !important;
    margin: 0;
}

.text18pix { font-size: 18px; font-weight: bold; color: var(--heading); }
.text16pix { font-size: 16px; font-weight: bold; color: var(--heading); }
.text14pix { font-size: 14px; font-weight: bold; color: var(--heading); }

h1, h2, h3, h4 { color: var(--heading); }
hr { border: 0; border-top: 1px solid #444; }
img { max-width: 100%; height: auto; }
iframe { max-width: 100%; border: 0; }
table { max-width: 100%; color: var(--text); }
td, th { color: var(--text); }
pre { overflow-x: auto; white-space: pre-wrap; }

.broken-link { text-decoration: line-through dotted; }

@media (max-width: 980px) {
    .archive-shell { width: min(100% - 24px, 1440px); padding-top: 12px; }
    .site-hero { grid-template-columns: 1fr; gap: 10px; }
    .hero-copy { text-align: left; }
    .archive-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
    .archive-grid .track-nav { position: static; max-height: none; overflow: visible; }
    .archive-content { padding: 14px 10px; }
    .tutorials-index,
    .tutorials-index > tbody,
    .tutorials-index > tbody > tr,
    .tutorials-index > tbody > tr > td {
        display: block;
        width: 100% !important;
        min-width: 0;
    }
    .tutorials-index { overflow-wrap: anywhere; }
    .tutorials-index > tbody > tr > td > table {
        width: 100% !important;
        max-width: 100%;
    }
    .tutorials-index > tbody > tr:nth-child(2) > td > table > tbody > tr,
    .tutorials-index > tbody > tr:nth-child(2) > td > table > tbody > tr > td {
        display: block;
        width: 100% !important;
    }
    .tutorials-index > tbody > tr:nth-child(2) > td > table > tbody > tr > td:first-child {
        display: none;
    }
    .tutorial-list-column > tbody > tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }
    .tutorial-list-column > tbody > tr > td {
        min-width: 0;
        grid-column: 1;
    }
    .tutorial-list-column > tbody > tr > td:first-child,
    .tutorial-list-column > tbody > tr > td:nth-child(3) {
        display: none;
    }
}
