.technical-docs-page {
    background: #eef4f8;
}

.technical-docs-page a:focus-visible,
.technical-docs-page button:focus-visible {
    border-radius: 4px;
    outline: 3px solid rgba(111, 175, 196, 0.46);
    outline-offset: 3px;
}

.technical-docs {
    padding: 30px 0 46px;
}

.tech-hero {
    padding: clamp(24px, 4vw, 42px) 0 24px;
}

.tech-hero h1 {
    max-width: 900px;
    margin: 0;
    color: var(--brand-primary);
    font-size: clamp(2.1rem, 4.6vw, 4rem);
    line-height: 1.03;
}

.tech-hero__meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.45fr);
    gap: 10px 18px;
    max-width: 980px;
    margin: 22px 0 0;
}

.tech-hero__meta div {
    display: grid;
    gap: 3px;
    padding: 12px 0;
    border-top: 1px solid rgba(18, 53, 91, 0.16);
}

.tech-hero__meta dt {
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.tech-hero__meta dd {
    margin: 0;
    color: #20324c;
    font-size: 0.98rem;
    font-weight: 650;
    line-height: 1.45;
}

.technical-docs__layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.technical-docs__toc {
    position: sticky;
    top: 20px;
    display: grid;
    gap: 7px;
    max-height: calc(100vh - 40px);
    padding: 16px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 26px rgba(18, 53, 91, 0.06);
}

.technical-docs__toc strong {
    margin-bottom: 4px;
    color: var(--brand-primary);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.technical-docs__toc a {
    color: #263d55;
    font-size: 0.9rem;
    line-height: 1.25;
    text-decoration: none;
}

.technical-docs__toc a:hover {
    color: var(--brand-secondary);
}

.technical-docs__content {
    min-width: 0;
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 16px 36px rgba(18, 53, 91, 0.08);
}

.tech-section {
    scroll-margin-top: 22px;
}

.tech-section + .tech-section {
    margin-top: 42px;
    padding-top: 34px;
    border-top: 1px solid rgba(18, 53, 91, 0.12);
}

.tech-section:target {
    border-left: 4px solid var(--brand-accent);
    padding-left: clamp(14px, 2vw, 22px);
}

.tech-section__eyebrow {
    margin: 0 0 8px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.tech-section h2 {
    margin: 0 0 14px;
    color: var(--brand-primary);
    font-size: clamp(1.55rem, 2.3vw, 2.15rem);
    line-height: 1.16;
}

.tech-section h3 {
    margin: 26px 0 10px;
    color: #20324c;
    font-size: 1.08rem;
    line-height: 1.25;
}

.tech-section p,
.tech-section li,
.tech-table,
.tech-equation figcaption,
.tech-callout {
    color: #263744;
    font-size: 0.98rem;
    line-height: 1.68;
}

.tech-section p {
    margin: 10px 0;
}

.tech-section a {
    color: var(--brand-primary);
    font-weight: 750;
}

.tech-equation {
    margin: 18px 0;
    padding: 16px 18px;
    overflow-x: auto;
    border: 1px solid rgba(111, 175, 196, 0.36);
    border-radius: 8px;
    background: #fbfcfe;
}

.tech-equation__math {
    min-width: min-content;
    color: #142f4c;
    font-family: var(--font-family-math);
    font-size: 1rem;
}

.tech-equation figcaption {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.tech-table-wrap {
    width: 100%;
    margin: 18px 0;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.tech-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums lining-nums;
}

.tech-table th,
.tech-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(18, 53, 91, 0.12);
    text-align: left;
    vertical-align: top;
}

.tech-table th {
    color: var(--brand-primary);
    background: #f5f8fb;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.tech-table tr:last-child td {
    border-bottom: 0;
}

.tech-table td:first-child {
    color: #172b3a;
    font-weight: 750;
}

.tech-callout {
    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid rgba(111, 175, 196, 0.34);
    border-left: 4px solid var(--brand-accent);
    border-radius: 8px;
    background: #f7fbfd;
}

.tech-callout strong {
    display: block;
    margin-bottom: 4px;
    color: var(--brand-primary);
    font-size: 0.86rem;
    text-transform: uppercase;
}

.tech-callout p {
    margin: 0;
}

.tech-callout--limit {
    border-color: rgba(199, 68, 68, 0.22);
    border-left-color: #c8891d;
    background: #fffaf0;
}

.tech-callout--note {
    border-left-color: #3e78a8;
}

.tech-norm {
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid rgba(18, 53, 91, 0.12);
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.tech-steps {
    display: grid;
    gap: 8px;
    margin: 18px 0;
    padding-left: 24px;
}

.technical-docs__end-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid rgba(18, 53, 91, 0.12);
}

.technical-docs__end-nav a {
    color: var(--brand-primary);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.technical-docs__end-nav a:hover {
    color: var(--brand-secondary);
}

.katex-display {
    margin: 0.35em 0;
}

@media (max-width: 980px) {
    .technical-docs__layout {
        grid-template-columns: 1fr;
    }

    .technical-docs__toc {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
    }

    .technical-docs__toc strong {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .technical-docs {
        padding-top: 18px;
    }

    .tech-hero__meta {
        grid-template-columns: 1fr;
    }

    .technical-docs__content {
        padding: 20px 16px;
    }

    .technical-docs__toc {
        grid-template-columns: 1fr;
    }

    .tech-section:target {
        padding-left: 12px;
    }

    .tech-table {
        min-width: 620px;
    }

    .tech-equation {
        padding: 14px 12px;
    }
}
