/* =========================================================
   NEXEN — hardware documentation page components
   Loaded AFTER style.css. Shared by CRYO3eng, ELEC3eng, and
   future physical-build writeups. Only defines what's unique
   to a documentation page: spec grid, article typography,
   equation blocks, parameter tables, assumption callouts.
   ========================================================= */

/* ---------------- Spec strip ---------------- */
.specGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line-dim);
    border: var(--edge);
}

.specItem {
    background: var(--bg-panel);
    padding: 20px 22px;
}

.specLabel {
    font-family: var(--mono);
    font-size: var(--fs-micro);
    line-height: var(--lh-micro);
    letter-spacing: var(--tr-micro);
    text-transform: uppercase;
    color: var(--label-3);
    display: block;
    margin-bottom: 8px;
}

.specValue {
    font-family: var(--display);
    font-weight: 700;
    font-size: var(--fs-headline);
    letter-spacing: var(--tr-headline);
    color: var(--label);
    line-height: var(--lh-headline);
}

.specSub {
    font-family: var(--mono);
    font-size: var(--fs-caption);
    line-height: var(--lh-caption);
    letter-spacing: var(--tr-caption);
    color: var(--label-3);
    margin-top: 4px;
    display: block;
}

/* ---------------- Article body ---------------- */
.article {
    max-width: 72ch;
}

.article h3 {
    font-family: var(--display);
    font-weight: 700;
    font-size: var(--fs-headline);
    line-height: var(--lh-headline);
    letter-spacing: var(--tr-headline);
    margin: 48px 0 14px;
}

.article h3:first-child {
    margin-top: 0;
}

.article p {
    color: var(--label);
    font-size: var(--fs-body);
    letter-spacing: var(--tr-body);
    line-height: var(--lh-body);
    margin-bottom: 16px;
}

.article p.muted {
    color: var(--label-2);
}

/* Table of contents for the physics/documentation section */
.toc {
    border: var(--edge);
    background: var(--bg-panel);
    padding: 20px 24px;
    margin-bottom: 40px;
}

.toc .tocLabel {
    font-family: var(--mono);
    font-size: var(--fs-micro);
    line-height: var(--lh-micro);
    letter-spacing: var(--tr-micro);
    text-transform: uppercase;
    color: var(--label-2);
    display: block;
    margin-bottom: 12px;
}

.toc ol {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toc a {
    font-family: var(--mono);
    font-size: var(--fs-small);
    line-height: var(--lh-small);
    letter-spacing: var(--tr-small);
    color: var(--label);
    transition: color 0.2s ease;
}

@media (hover: hover) {
    .toc a:hover {
        color: var(--accent);
    }
}

.toc a::before {
    content: "→ ";
    color: var(--accent-dim);
}

/* Equation display block */
.eqBlock {
    border: var(--edge);
    background: var(--bg-panel);
    padding: 20px 24px;
    margin: 20px 0;
    overflow-x: auto;
}

.eqBlock .katex-display {
    margin: 0;
}

.eqCaption {
    font-family: var(--mono);
    font-size: var(--fs-caption);
    line-height: var(--lh-caption);
    color: var(--label-3);
    margin-top: 10px;
    letter-spacing: var(--tr-caption);
}

/* Parameter / results tables */
.paramTable {
    width: 100%;
    border: var(--edge);
    font-family: var(--mono);
    font-size: var(--fs-small);
    line-height: var(--lh-small);
    letter-spacing: var(--tr-small);
    margin: 20px 0;
    border-collapse: collapse;
}

.paramTable th,
.paramTable td {
    padding: 12px 16px;
    border-bottom: var(--edge);
    text-align: left;
}

.paramTable th {
    color: var(--label-3);
    font-size: var(--fs-caption);
    line-height: var(--lh-caption);
    letter-spacing: var(--tr-caption);
    text-transform: uppercase;
    background: var(--bg-panel);
    font-weight: 400;
}

.paramTable td {
    color: var(--label);
}

.paramTable tr:last-child td {
    border-bottom: none;
}

.paramTable td.hi {
    color: var(--accent);
    font-weight: 700;
}

/* Assumption / note callouts */
.noteBox {
    border: 1px dashed var(--line-dim);
    padding: 16px 20px;
    margin: 20px 0;
    font-size: var(--fs-callout);
    letter-spacing: var(--tr-callout);
    color: var(--label-2);
    line-height: var(--lh-callout);
}

.noteBox .noteLabel {
    font-family: var(--mono);
    font-size: var(--fs-micro);
    line-height: var(--lh-micro);
    letter-spacing: var(--tr-micro);
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 8px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 720px) {
    .specGrid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .specGrid {
        grid-template-columns: 1fr;
    }

    .paramTable {
        font-size: var(--fs-footnote);
        line-height: var(--lh-footnote);
        letter-spacing: var(--tr-footnote);
    }

    .paramTable th,
    .paramTable td {
        padding: 10px 12px;
    }
}