:root {
  --bg: #0d1117;
  --panel: #131b26;
  --panel-2: #192434;
  --ink: #eaf0f4;
  --muted: #9aaaba;
  --line: #2a3a4c;
  --blue: #62c4ff;
  --teal: #67d8b2;
  --gold: #f4c76b;
  --coral: #ff927c;
  --max: 72rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.62 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--blue); text-decoration-color: color-mix(in srgb, var(--blue), transparent 45%); text-underline-offset: .18em; }
a:hover { color: #b9e6ff; }
main { max-width: var(--max); margin: 0 auto; padding: 3rem 1.25rem 5rem; }
nav { display: flex; flex-wrap: wrap; gap: .45rem .9rem; align-items: center; margin: 0 0 2.6rem; color: var(--muted); font-size: .92rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--ink); }
.kicker, .meta, .eyebrow { color: var(--teal); letter-spacing: .08em; font-weight: 750; font-size: .78rem; text-transform: uppercase; }
h1 { font-size: clamp(2.35rem, 7vw, 5.1rem); letter-spacing: -.065em; line-height: .96; max-width: 14ch; margin: .35rem 0 1.3rem; }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); letter-spacing: -.04em; line-height: 1.08; margin: 3.7rem 0 1rem; }
h3 { font-size: 1.1rem; margin: 0 0 .45rem; }
p { margin: .75rem 0; }
.lead { max-width: 64ch; font-size: clamp(1.12rem, 2vw, 1.4rem); color: #d5e2eb; }
.hero { padding: 1.3rem 0 1.5rem; border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(12, 1fr); }
.card { grid-column: span 4; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem; }
.card.wide { grid-column: span 6; }
.card strong, .step-no { display: block; color: var(--teal); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .4rem; }
.callout { margin: 1.6rem 0; padding: 1.1rem 1.2rem; border-left: 4px solid var(--gold); background: color-mix(in srgb, var(--gold), transparent 92%); }
.callout.warn { border-left-color: var(--coral); background: color-mix(in srgb, var(--coral), transparent 92%); }
.callout.ok { border-left-color: var(--teal); background: color-mix(in srgb, var(--teal), transparent 92%); }
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: 1.4rem 0; }
.flow div { border: 1px solid var(--line); border-radius: 10px; padding: 1rem; background: var(--panel); }
.flow b { display: block; color: var(--gold); font-size: .82rem; margin-bottom: .25rem; }
.lesson-list { list-style: none; padding: 0; margin: 1.2rem 0; border-top: 1px solid var(--line); }
.lesson-list li { display: grid; grid-template-columns: 3rem 1fr auto; gap: .8rem; align-items: center; padding: 1.15rem .2rem; border-bottom: 1px solid var(--line); }
.lesson-list .number { color: var(--teal); font-weight: 750; }
.lesson-list .time { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.lesson-list a { font-size: 1.13rem; font-weight: 700; }
label { display: block; margin: 1rem 0 .35rem; color: #dce9f1; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid #41546a; border-radius: 8px; background: #0b111a; color: var(--ink); padding: .72rem .78rem; font: inherit; }
textarea { min-height: 5.5rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--blue), transparent 30%); border-color: var(--blue); }
button, .button { appearance: none; border: 0; cursor: pointer; border-radius: 8px; background: var(--blue); color: #06111b; padding: .72rem 1rem; font: 750 .94rem/1 Inter, ui-sans-serif, system-ui; text-decoration: none; display: inline-block; margin: .75rem .5rem .25rem 0; }
button.secondary, .button.secondary { color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); }
button:hover, .button:hover { filter: brightness(1.08); }
.plan { margin-top: 1.8rem; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.35rem; }
.plan h2 { margin: 0 0 .85rem; font-size: 1.55rem; }
.plan .schedule { list-style: none; padding: 0; margin: 1rem 0; }
.plan .schedule li { display: grid; grid-template-columns: 5.5rem 1fr; gap: .8rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.plan .schedule time { color: var(--gold); font-weight: 750; }
.plan .task { color: #e8f1f7; }
.plan .why { color: var(--muted); font-size: .9rem; display: block; }
.exercise { padding: 1.2rem; margin: 1.7rem 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.exercise h3 { color: var(--gold); }
.sourcebox { color: var(--muted); font-size: .92rem; padding-top: 1.2rem; margin-top: 3rem; border-top: 1px solid var(--line); }
.sourcebox ul { padding-left: 1.1rem; }
.small { color: var(--muted); font-size: .9rem; }
footer { margin-top: 4rem; color: var(--muted); font-size: .87rem; }
@media (max-width: 700px) { .card,.card.wide { grid-column: span 12; } .flow { grid-template-columns: 1fr 1fr; } .lesson-list li { grid-template-columns: 2.4rem 1fr; } .lesson-list .time { grid-column: 2; } main { padding-top: 1.5rem; } }
@media print { body { background: white; color: #172028; } main { max-width: none; } .no-print, nav, .button, button { display: none !important; } .card, .plan, .exercise { background: white; border-color: #aab5bd; } a { color: #174f72; } }

/* Laulu: harjoitustyökalu */
.tool-bar { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; margin: 1.6rem 0 1rem; }
.tool-bar label { margin: 0 0 .3rem; font-size: .85rem; }
.tool-bar .field { flex: 1 1 11rem; }
.tool-bar button { margin: 0; }
.tool-bar .check { display: flex; gap: .5rem; align-items: center; font-size: .9rem; color: var(--muted); flex: 1 1 100%; }
.tool-bar .check input { width: auto; }
.tool { display: grid; gap: 1rem; grid-template-columns: 17rem 1fr; }
.tool .side { display: grid; gap: 1rem; align-content: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.label { color: var(--muted); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.note { font: 800 3rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; margin: .3rem 0 .1rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.cents { position: relative; height: .8rem; border-radius: 99px; background: #0b111a; border: 1px solid var(--line); margin: .7rem 0 .25rem; overflow: hidden; }
.cents .zone { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--teal), transparent 80%); }
.cents .mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--teal); }
.cents .dot { position: absolute; top: 0; bottom: 0; width: .55rem; margin-left: -.275rem; border-radius: 99px; background: var(--muted); left: 50%; }
.scale { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .8rem; margin: 0; }
.stats dt { color: var(--muted); font-size: .78rem; }
.stats dd { margin: 0 0 .3rem; font: 700 1rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
.meter { height: .7rem; border-radius: 99px; background: #0b111a; border: 1px solid var(--line); overflow: hidden; margin: .35rem 0 .2rem; }
.meter i { display: block; height: 100%; width: 0; background: var(--blue); }
.meter.ring i { background: #b99cff; }
.hint { min-height: 5.5rem; }
.hint h3 { color: var(--gold); }
.canvas-wrap { position: relative; background: #0a0f16; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.pitch { height: 26rem; }
.spectrum { height: 9rem; margin-top: 1rem; }
.canvas-cap { color: var(--muted); font-size: .8rem; margin: .4rem .2rem 0; }
table.results { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
table.results th, table.results td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
table.results th { color: var(--muted); font-weight: 650; font-size: .82rem; }
table.results td { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.good { color: var(--teal); } .warnc { color: var(--gold); } .bad { color: var(--coral); }
figure.diagram { margin: 1.6rem 0; padding: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
figure.diagram svg { width: 100%; height: auto; display: block; }
figure.diagram figcaption { color: var(--muted); font-size: .88rem; margin-top: .5rem; }
@media (max-width: 860px) { .tool { grid-template-columns: 1fr; } .pitch { height: 20rem; } table.results { display: block; overflow-x: auto; } }
