/* LightSound Labs — pages styled after the LightSound hub (black field, Cinzel, monospace chrome) */
:root {
    --void: #000000;
    --text: #f4f2ec;
    --text-mid: #d8d4cc;
    --text-dim: #9a9690;
    --line: rgba(244, 242, 236, 0.14);
    --line-strong: rgba(244, 242, 236, 0.4);
    --serif: "Cinzel", Cambria, Georgia, serif;
    --sans: -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono: "Courier New", ui-monospace, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { background: var(--void); font-family: var(--sans); color: var(--text); }
body {
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center;
    padding: 5.5rem 1.5rem 3rem;
    line-height: 1.7;
}
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--text-dim); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
:focus-visible { outline: 1px solid var(--text); outline-offset: 4px; }
img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); font-size: .9em; color: var(--text); }

/* ---------- hub chrome ---------- */
#home-link, #back-link {
    position: fixed; top: 1.6rem; z-index: 5;
    font-family: var(--mono); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--text); opacity: .5; text-decoration: none; transition: opacity .4s ease;
}
#home-link { left: 1.6rem; }
#back-link { right: 1.6rem; }
#home-link:hover, #back-link:hover { opacity: 1; }
#lang-switch { position: fixed; right: 1.6rem; bottom: 1.3rem; z-index: 5; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; }
#lang-switch a { color: var(--text); opacity: .5; text-decoration: none; transition: opacity .4s ease; }
#lang-switch a:hover { opacity: .85; }
#lang-switch a.current { opacity: 1; pointer-events: none; }
#lang-switch span { color: var(--text); opacity: .35; margin: 0 .3em; }

/* ---------- layout ---------- */
main { width: 100%; max-width: 860px; }
.crumbs { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); text-align: center; margin-bottom: 1.6rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5em; }
.crumbs li + li::before { content: "·"; margin-right: .5em; opacity: .6; }
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.kicker {
    text-align: center; font-family: var(--serif); font-weight: 400; font-size: .72rem;
    letter-spacing: .3em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 1rem;
}
h1 {
    text-align: center; font-family: var(--serif); font-weight: 500;
    font-size: clamp(1.7rem, 4.4vw, 2.6rem); letter-spacing: .04em; line-height: 1.25; margin-bottom: .8rem;
}
.lead { text-align: center; font-size: 1.02rem; line-height: 1.75; color: var(--text-mid); max-width: 700px; margin: 0 auto 1.6rem; }
.divider {
    width: min(60%, 320px); height: 1px; margin: 2.6rem auto 2.4rem;
    background: linear-gradient(to right, rgba(244,242,236,0) 0%, rgba(244,242,236,.5) 50%, rgba(244,242,236,0) 100%);
}
section { margin-top: 2.8rem; }
h2 {
    font-family: var(--serif); font-weight: 500; font-size: .85rem; letter-spacing: .2em;
    text-transform: uppercase; color: var(--text); margin-bottom: 1.2rem;
}
h3 { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; letter-spacing: .05em; line-height: 1.35; margin-bottom: .5rem; }
p { margin-bottom: 1rem; color: var(--text-mid); font-size: .97rem; }
.muted { color: var(--text-dim); }

.facts { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0 0 1.8rem; }
.facts li {
    font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--text-mid); border: 1px solid var(--line); padding: .35rem .75rem;
}

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin: 1.4rem 0 .4rem; }
.btn {
    display: inline-block; font-family: var(--mono); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
    color: var(--text); text-decoration: none; background: transparent;
    border: 1px solid rgba(244,242,236,.35); padding: .9rem 1.7rem; cursor: pointer;
    transition: border-color .5s ease, background .5s ease;
}
.btn:hover { border-color: var(--text); background: rgba(244,242,236,.06); }
.btn-primary { border-color: var(--text); background: rgba(244,242,236,.08); }
.btn-primary:hover { background: var(--text); color: var(--void); }

figure { margin: 2.4rem 0 0; }
figure img { border: 1px solid var(--line); }
figcaption { font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; color: var(--text-dim); text-align: center; margin-top: .7rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { background: var(--void); padding: 1.4rem 1.3rem 1.2rem; display: flex; flex-direction: column; }
.card .num { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: .5rem; }
.card p { font-size: .9rem; flex: 1; color: var(--text-dim); }
.card .more { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; opacity: .85; }
.card .more:hover { opacity: 1; }
.card.soon { opacity: .6; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.tag { font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; border: 1px solid var(--line); padding: .05rem .45rem; color: var(--text-dim); }
.tag.ok { border-color: var(--line-strong); color: var(--text); }

ul.ticks { list-style: none; }
ul.ticks li { position: relative; padding: .55rem 0 .55rem 1.6rem; border-bottom: 1px solid rgba(244,242,236,.08); font-size: .95rem; color: var(--text-mid); }
ul.ticks li:last-child { border-bottom: none; }
ul.ticks li::before { content: ""; position: absolute; left: .2rem; top: 1.15rem; width: 6px; height: 6px; transform: rotate(45deg); border: 1px solid var(--text-dim); }
ol.steps { padding-left: 1.4rem; }
ol.steps li { padding: .3rem 0; font-size: .95rem; color: var(--text-mid); }
ul.ticks strong, ol.steps strong, p strong { color: var(--text); font-weight: 600; }
.note { border: 1px solid var(--line); padding: 1rem 1.2rem; font-size: .92rem; color: var(--text-mid); }

/* ---------- guide ---------- */
.module-guide { border-top: 1px solid var(--line); padding-top: 1.6rem; margin-top: 1.8rem; }
.module-guide .goal { color: var(--text-mid); }
.module-guide h4 { font-family: var(--mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); margin: 1rem 0 .3rem; }
.toc { columns: 2; column-gap: 2rem; list-style: none; }
.toc li { padding: .25rem 0; font-size: .92rem; break-inside: avoid; }
table.rubric { border-collapse: collapse; width: 100%; font-size: .9rem; color: var(--text-mid); }
table.rubric th, table.rubric td { border: 1px solid var(--line); padding: .55rem .75rem; text-align: left; vertical-align: top; }
table.rubric th { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text); font-weight: 400; }

/* ---------- credits ---------- */
.credits {
    text-align: center; font-family: var(--mono); font-size: .68rem; letter-spacing: .06em;
    color: var(--text-dim); opacity: .8; line-height: 1.8; margin-top: 3rem;
}
.credits a { color: var(--text-dim); }

@media (max-width: 600px) {
    #lang-switch { position: static; margin: -2.4rem 0 2rem; }
    .toc { columns: 1; }
}

/* ---------- print (guide) ---------- */
@media print {
    @page { size: A4; margin: 16mm 15mm; }
    html, body { background: #fff; color: #111; }
    body { padding: 0; display: block; font-size: 10.5pt; line-height: 1.45; }
    #home-link, #back-link, #lang-switch, .crumbs, .actions, .no-print-link { display: none !important; }
    main { max-width: none; }
    h1, h2, h3, .kicker, p, li, strong, em, .lead, .module-guide .goal, .note, table.rubric, .credits { color: #111 !important; }
    a { color: #111; text-decoration: none; }
    h2, h3 { break-after: avoid; }
    section { margin-top: 14pt; }
    .module-guide { break-inside: avoid; border-color: #bbb; }
    ul.ticks li { border-color: #ddd; }
    ul.ticks li::before { border-color: #555; }
    table.rubric th, table.rubric td, .note { border-color: #999; }
    .divider { background: #bbb; }
    #teachers { break-before: page; }
    code, table.rubric th, table.rubric td { color: #111 !important; }
}
