/* Body styles of the generated content pages: Learn, Classics, Verification (tools/content/).
 * Site chrome, the design tokens, .panel and .chart-frame live in site.css; so do the Learn layout
 * and the inline example. This file holds what the pages' text and plots need beyond that: the
 * reading defaults, and the legend and hover readout that charts.js draws under every plot.
 * It is what was left of tutorial.css once the tutorials were deleted (2026-10-11): every rule
 * here matched something on those pages. */

h1,
h2 {
    letter-spacing: 0;
}

main a:not(.primary-link):not(.nav-link):not(.app-brand):not(.records-title):not(.records-action) {
    color: var(--accent);
    font-weight: 750;
    text-decoration: none;
}
main a:not(.primary-link):not(.nav-link):not(.app-brand):not(.records-title):not(.records-action):hover { text-decoration: underline; }

main {
    display: grid;
    gap: 12px;
}

p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.56;
}

label {
    display: block;
    margin-bottom: 2px;
    color: var(--text-dim);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Under every plot (charts.js renderSeriesPlot). */
.legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    color: var(--text-dim);
    font-size: 0.78rem;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-line {
    width: 22px;
    height: 4px;
    border-radius: 999px;
}

/* A dashed or dot-dashed curve gets the same stroke in its legend swatch (charts.js renderSeriesPlot sets
   spheres-legend-dashed for any dashed series, -electric / -magnetic for the calculator's multipole strokes
   and -dotted for a dotted one). The calculator's sphere card carries the same rules scoped to itself in
   spheres.css; the content pages need them on every plot. */
.legend-line.spheres-legend-dashed,
.legend-line.spheres-legend-electric,
.legend-line.spheres-legend-magnetic,
.legend-line.spheres-legend-dotted {
    display: inline-block;
    flex: 0 0 auto;
    width: 30px;
    height: 3px;
    border-radius: 0;
}

.legend-line.spheres-legend-dashed {
    background: repeating-linear-gradient(90deg, var(--legend-color) 0 5px, transparent 5px 8px) !important;
}

.legend-line.spheres-legend-electric {
    background: repeating-linear-gradient(90deg, var(--legend-color) 0 9px, transparent 9px 13px) !important;
}

.legend-line.spheres-legend-magnetic {
    background: repeating-linear-gradient(90deg, var(--legend-color) 0 9px, transparent 9px 12px, var(--legend-color) 12px 14px, transparent 14px 17px) !important;
}

.legend-line.spheres-legend-dotted {
    background: repeating-linear-gradient(90deg, var(--legend-color) 0 3px, transparent 3px 7px) !important;
}

.hover-readout {
    min-height: 42px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-dim);
    font-size: 0.82rem;
}

.hover-readout .hover-empty {
    color: var(--text-soft);
}

.hover-readout .hover-wavelength,
.hover-readout .hover-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface2);
    font-weight: 700;
}

.hover-readout .hover-wavelength {
    color: var(--text);
}

.hover-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* The sketch of a setup (tools/content/build-content.py sketch_svg): the geometry's bands or shells and its source,
   drawn inline before an example's caption, a classic's title and a benchmark row's facts. */
.learn-sketch { flex: 0 0 auto; width: 72px; height: 72px; color: var(--text-dim); }
.learn-example-head, .learn-classic-head { display: flex; gap: 12px; align-items: flex-start; }
.learn-example-head > div, .learn-classic-head > div { min-width: 0; }

/* A classic paper inside the Learn section that explains it (tools/content/build-content.py classic_markup). */
.learn-classic { margin: 18px 0; padding: 14px; display: grid; gap: 10px; border-left: 3px solid var(--accent); }
.learn-classic-kicker { display: block; color: var(--text-soft); font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.learn-article .learn-classic-title { margin: 2px 0 4px; font-size: .98rem; }
.learn-classic-cite, .learn-article .learn-classic-cite { margin: 0; color: var(--text-soft); font-size: .76rem; line-height: 1.45; }
.learn-classic-shows, .learn-article .learn-classic-shows { margin: 0; color: var(--text); font-size: .86rem; }
.learn-classic-facts { margin: 0; display: grid; gap: 6px; }
.learn-classic-facts div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 8px; font-size: .78rem; line-height: 1.5; }
.learn-classic-facts dt { color: var(--text-soft); font-weight: 700; }
.learn-classic-facts dd { margin: 0; color: var(--text-dim); }
.learn-classic-tally { display: inline-block; margin-left: 6px; color: var(--accent); font-weight: 700; }
.learn-classic-script { align-self: center; font-size: .78rem; color: var(--text-dim); }
@media (max-width: 700px) {
    .learn-classic-facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* learn/index.html: chapters per geometry, filtered by the switch through data-scope (site.css). */
.learn-index-chapters { display: grid; gap: 14px; max-width: 58rem; }
.learn-index-chapter { padding: 14px 16px; }
.learn-index-chapter h2 { margin: 0 0 8px; color: var(--text-soft); font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.learn-index-chapter ol { margin: 0; padding-left: 1.4rem; display: grid; gap: 10px; }
.learn-index-chapter li { color: var(--text-dim); font-size: .86rem; line-height: 1.5; }
.learn-index-chapter li::marker { color: var(--text-soft); font-size: .78rem; }
.learn-index-title { font-weight: 700; }
.learn-index-chapter p { margin: 2px 0 0; font-size: .82rem; }
.learn-index-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.learn-index-tag { display: inline-block; padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-soft); font-size: .7rem; }
main a.learn-index-classic { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); font-weight: 650; }

/* Long heading metas (the Learn index's counts, a benchmark row's crumbs) shrink and wrap on a phone instead of
   pushing the page wider; site.css gives the meta flex: 0 0 auto for the calculator's short ones. */
.learn-index .section-heading-meta, .verification-row-page .section-heading-meta { flex: 1 1 12rem; min-width: 0; white-space: normal; text-align: right; }
@media (max-width: 700px) {
    .learn-index .section-heading-meta, .verification-row-page .section-heading-meta { flex-basis: 100%; text-align: left; }
}

/* verification/<id>.html: one benchmark row in full. */
.learn-figure figcaption { font-size: .8rem; }
.learn-figure .learn-example-readouts li:last-child { color: var(--text-soft); }
.verification-row-body > * { min-width: 0; }
.verification-row-body h3, .verification-row-body h3 a, .verification-row-body dd, .verification-row-facts dd a { overflow-wrap: anywhere; }
.verification-row-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.verification-row-facts { display: grid; gap: 10px; }
.verification-row-body { min-width: 0; display: grid; gap: 14px; }
.verification-row-body h3 { margin: 0 0 6px; color: var(--text); font-size: .92rem; font-weight: 600; }
.verification-row-body code { font-size: .78rem; overflow-wrap: anywhere; }
.verification-row-body pre { margin: 8px 0 0; padding: 10px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface2); font: .74rem/1.5 var(--font-data); color: var(--text); }
.verification-row-doc p, .verification-row-report-body p, .verification-row-body li { color: var(--text-dim); font-size: .84rem; line-height: 1.55; margin: 0 0 8px; }
.verification-row-report-body table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: .76rem; }
.verification-row-report-body th, .verification-row-report-body td { padding: 4px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; color: var(--text-dim); }
.verification-row-report-body th { color: var(--text); font-weight: 600; }
.verification-row-report-body h1, .verification-row-report-body h2 { margin: 12px 0 6px; font-size: .9rem; color: var(--text); }
.verification-row-report-body em { color: var(--text-soft); }
.verification-detail { display: inline-block; margin-top: 4px; font-size: .74rem; white-space: nowrap; }
.verification-source .learn-sketch { width: 28px; height: 28px; vertical-align: middle; margin-right: 8px; }
@media (max-width: 900px) {
    .verification-row-layout { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
    .section-band {
        padding: 8px 0;
    }

    .panel {
        padding: 10px;
    }
}

/* A reference drawn as points (learn-example.js, a comparison figure with few samples): an open circle in the legend. */
.legend-row .legend-line.spheres-legend-marker { width: 9px !important; height: 9px !important; border-radius: 50% !important; background: transparent !important; border: 1.8px solid var(--legend-color) !important; }
