/* Trumpet Foundations – front end. Inherits the theme's fonts; uses its own accessible colours. */
.tf {
	--tf-brass: #b45309;
	--tf-brass-dark: #8a3c05;
	--tf-brass-soft: #fff7ed;
	--tf-ink: #1f2937;
	--tf-muted: #4b5563;
	--tf-line: #e5e7eb;
	--tf-card: #ffffff;
	--tf-good: #15803d;
	--tf-bad: #b91c1c;
	--tf-radius: 14px;
	color: var(--tf-ink);
	line-height: 1.6;
}
.tf *, .tf *::before, .tf *::after { box-sizing: border-box; }
.tf .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.tf a { color: var(--tf-brass-dark); }
.tf :focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; border-radius: 4px; }
.tf h2 { margin-top: 1.6em; }
.tf .tf-card h2:first-child, .tf .tf-card > h2 { margin-top: .2em; }

.tf-lead { font-size: 1.15em; }
.tf-small, .tf-meta { font-size: .9em; color: var(--tf-muted); }
.tf-kicker { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: .8em; color: var(--tf-brass-dark); margin: 0 0 .4em; }
.tf-empty { color: var(--tf-muted); font-style: italic; }

/* Buttons & forms */
.tf-btn, .tf button.tf-btn {
	display: inline-flex; align-items: center; gap: .45em; min-height: 44px; padding: .55em 1.1em;
	border: 2px solid var(--tf-brass-dark); border-radius: 999px; background: var(--tf-brass-dark); color: #fff !important;
	font: inherit; font-weight: 600; text-decoration: none !important; cursor: pointer; line-height: 1.2;
}
.tf-btn:hover { background: #6f3004; border-color: #6f3004; }
.tf-btn-ghost, .tf button.tf-btn-ghost { background: transparent; color: var(--tf-brass-dark) !important; }
.tf-btn-ghost:hover { background: var(--tf-brass-soft); }
.tf-btn-lg { font-size: 1.1em; padding: .7em 1.4em; }
.tf-btn[disabled] { opacity: .45; cursor: not-allowed; }
.tf-btn-row { display: flex; flex-wrap: wrap; gap: .6em; align-items: center; }
.tf-link-btn { background: none; border: 0; padding: 0; color: var(--tf-muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85em; }
.tf-icon { fill: currentColor; vertical-align: -4px; }
.tf label { font-weight: 600; }
.tf .tf-inline, .tf .tf-opt, .tf .tf-checklist label, .tf .tf-consent, .tf .tf-done-toggle { font-weight: 400; }
.tf input[type=text], .tf input[type=email], .tf input[type=number], .tf input[type=date], .tf input[type=search], .tf select, .tf textarea {
	display: block; width: 100%; max-width: 100%; min-height: 44px; padding: .5em .7em; margin-top: .25em;
	border: 1.5px solid #9ca3af; border-radius: 8px; font: inherit; background: #fff; color: var(--tf-ink);
}
.tf .tf-inline { display: inline-flex; align-items: center; gap: .4em; }
.tf .tf-inline input[type=number], .tf .tf-inline select { display: inline-block; width: auto; margin: 0; }
.tf input[type=checkbox], .tf input[type=radio] { width: 1.2em; height: 1.2em; accent-color: var(--tf-brass-dark); flex: none; }
.tf-form-row { display: flex; flex-wrap: wrap; gap: 0 1em; align-items: flex-end; }
.tf-form-row > p { margin: .4em 0; }
.tf-grow { flex: 1 1 220px; }
.tf-hp { position: absolute; left: -9999px; }

/* Cards, callouts */
.tf-card { background: var(--tf-card); border: 1px solid var(--tf-line); border-radius: var(--tf-radius); padding: 1.2em 1.4em; margin: 1.5em 0; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.tf-callout { background: var(--tf-brass-soft); border: 1px solid #fed7aa; border-radius: var(--tf-radius); padding: 1em 1.3em; margin: 1.2em 0; }
.tf-parent-tip { background: #eff6ff; border-left: 4px solid #2563eb; padding: .8em 1em; border-radius: 6px; }
.tf-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 1.5em; }
details.tf-more, details.tf-transcript, details.tf-music-text { margin: 1em 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--tf-brass-dark); min-height: 32px; }

/* Course page */
.tf-hero { background: linear-gradient(135deg, #fff7ed, #fef3c7); border-radius: var(--tf-radius); padding: 1.6em 1.6em 1.2em; }
.tf-progress-bar { height: 14px; background: #fde7c7; border-radius: 99px; overflow: hidden; }
.tf-progress-bar span { display: block; height: 100%; background: var(--tf-brass); border-radius: 99px; }
.tf-progress p { margin: .3em 0 1em; }
.tf-steps { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1em; }
.tf-steps li { counter-increment: s; background: var(--tf-card); border: 1px solid var(--tf-line); border-radius: var(--tf-radius); padding: 1em 1.1em 1em 3.4em; position: relative; }
.tf-steps li::before { content: counter(s); position: absolute; left: 1em; top: .9em; width: 1.8em; height: 1.8em; border-radius: 50%; background: var(--tf-brass-dark); color: #fff; display: grid; place-items: center; font-weight: 700; }
.tf-week-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1em; }
.tf-week-card a { display: flex; flex-direction: column; height: 100%; padding: 1em 1.1em; border: 1px solid var(--tf-line); border-radius: var(--tf-radius); background: var(--tf-card); color: var(--tf-ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.tf-week-card a:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.tf-week-num { font-weight: 700; color: var(--tf-brass-dark); font-size: .85em; text-transform: uppercase; letter-spacing: .06em; }
.tf-week-title { font-weight: 700; font-size: 1.05em; margin: .2em 0 .4em; line-height: 1.3; }
.tf-week-sum { font-size: .9em; color: var(--tf-muted); flex: 1; }
.tf-week-foot { display: flex; gap: .5em; margin-top: .7em; min-height: 1.6em; }
.tf-tag { font-size: .75em; font-weight: 600; background: #f3f4f6; border-radius: 99px; padding: .15em .6em; display: inline-flex; align-items: center; gap: .3em; }
.tf-tag:empty { display: none; }
.tf-tag .tf-icon { width: 14px; height: 14px; vertical-align: 0; }
.tf-week-card.is-done a { border-color: #86efac; background: #f0fdf4; }
.tf-week-card.is-done .tf-state { background: #dcfce7; color: #166534; }
.tf-week-card.is-started .tf-state { background: #fef3c7; color: #92400e; }

/* Lesson page */
.tf-crumbs { font-size: .9em; margin-bottom: .6em; }
.tf-weekstrip { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: .35em; }
.tf-weekstrip a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--tf-line); text-decoration: none; font-weight: 700; color: var(--tf-muted); background: #fff; }
.tf-weekstrip .is-done a { background: #dcfce7; border-color: #22c55e; color: #166534; }
.tf-weekstrip .is-current a { background: var(--tf-brass-dark); border-color: var(--tf-brass-dark); color: #fff; }
.tf-toc { display: flex; flex-wrap: wrap; gap: .4em; margin: 1em 0; position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.95); padding: .5em 0; border-bottom: 1px solid var(--tf-line); }
.tf-toc a { font-size: .85em; font-weight: 600; padding: .35em .8em; border-radius: 99px; background: var(--tf-brass-soft); text-decoration: none; }
.tf-section { scroll-margin-top: 70px; }
.tf-video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--tf-radius); overflow: hidden; }
.tf-video iframe, .tf-video video { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.tf-video-placeholder { display: flex; gap: 1em; align-items: center; padding: 1.5em; border: 2px dashed #fdba74; border-radius: var(--tf-radius); background: var(--tf-brass-soft); }
.tf-video-placeholder .tf-icon { width: 40px; height: 40px; fill: var(--tf-brass); flex: none; }
.tf-goals li::marker { content: '🎯 '; }
.tf-checklist { list-style: none; padding: 0; }
.tf-checklist li { border-bottom: 1px solid var(--tf-line); }
.tf-checklist label { display: flex; gap: .7em; align-items: flex-start; padding: .6em 0; cursor: pointer; }
.tf-checklist input { margin-top: .25em; }
.tf-checklist input:checked + span { color: var(--tf-muted); text-decoration: line-through; text-decoration-color: #9ca3af; }
.tf-complete { display: flex; flex-direction: column; gap: 1em; margin: 2em 0; }
.tf-done-toggle { display: inline-flex; gap: .6em; align-items: center; font-size: 1.1em; background: #f0fdf4; border: 2px solid #86efac; border-radius: var(--tf-radius); padding: .8em 1.1em; cursor: pointer; align-self: flex-start; }
.tf-celebrate { font-weight: 700; color: var(--tf-good); }
.tf-prevnext { display: flex; justify-content: space-between; gap: 1em; flex-wrap: wrap; }

/* Quiz */
.tf-q { border: 0; padding: 0; margin: 0 0 1.3em; }
.tf-q legend { font-weight: 700; margin-bottom: .4em; }
.tf-opt { display: flex; gap: .6em; align-items: center; padding: .5em .8em; margin: .3em 0; border: 1.5px solid var(--tf-line); border-radius: 10px; cursor: pointer; }
.tf-opt:hover { background: #f9fafb; }
.tf-opt.is-right { border-color: var(--tf-good); background: #f0fdf4; }
.tf-opt.is-wrong { border-color: var(--tf-bad); background: #fef2f2; }
.tf-opt.is-right span::after { content: ' ✓'; color: var(--tf-good); font-weight: 700; }
.tf-opt.is-wrong span::after { content: ' ✗'; color: var(--tf-bad); font-weight: 700; }
.tf-explain { margin: .3em 0 0; font-size: .92em; color: var(--tf-muted); }
.tf-quiz-result { font-weight: 700; }

/* Notation */
.tf-music { margin: 1.4em 0; padding: 1em 1.1em; border: 1px solid var(--tf-line); border-radius: var(--tf-radius); background: #fffdf9; }
.tf-music-title { font-weight: 700; margin-bottom: .3em; }
.tf-music-score { width: 100%; overflow: hidden; }
.tf-score { display: block; }
.tf-staff-line, .tf-bar { stroke: #374151; stroke-width: 1; }
.tf-stem { stroke: #111827; stroke-width: 1.4; fill: none; }
.tf-beam { stroke: #111827; stroke-width: 5; }
.tf-head { fill: #111827; }
.tf-hollow { fill: #fff; stroke: #111827; stroke-width: 1.8; }
.tf-clef { font-family: "Noto Music", "Bravura", "Apple Symbols", "Segoe UI Symbol", "Segoe UI Historic", serif; font-size: 58px; fill: #111827; }
.tf-timesig { font: 700 21px Georgia, "Times New Roman", serif; fill: #111827; }
.tf-acc { font: 18px "Segoe UI Symbol", "Apple Symbols", serif; fill: #111827; }
.tf-label { font: 600 12px system-ui, sans-serif; fill: #4b5563; }
.tf-fing { fill: var(--tf-brass-dark, #8a3c05); font-size: 11px; }
.tf-note.is-playing .tf-head, .tf-note.is-playing .tf-stem { fill: var(--tf-brass, #b45309); stroke: var(--tf-brass, #b45309); }
.tf-note.is-playing .tf-hollow { fill: #fed7aa; }
.tf-note.is-playing .tf-label { fill: var(--tf-brass, #b45309); }
.tf-music-controls { display: flex; flex-wrap: wrap; gap: .5em 1.1em; align-items: center; margin-top: .4em; font-size: .92em; }
.tf-music-controls .tf-tempo { width: 4.5em !important; }
.tf-music-text ul { font-size: .9em; }

/* Fingering chart */
.tf-fing-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6em; }
.tf-fing-card { display: flex; flex-direction: column; align-items: center; gap: .2em; width: 92px; padding: .5em .3em .6em; border: 1.5px solid var(--tf-line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--tf-ink); }
.tf-fing-card:hover { border-color: var(--tf-brass); background: var(--tf-brass-soft); }
.tf-fing-name { font-weight: 700; font-size: 1.1em; }
.tf-fing-num { font-size: .8em; color: var(--tf-muted); }
.tf-valves circle { stroke: #111827; stroke-width: 2; }
.tf-valves .on { fill: #111827; }
.tf-valves .off { fill: #fff; }

/* Recorder */
.tf-record-prompt { background: var(--tf-brass-soft); padding: .7em 1em; border-radius: 10px; }
.tf-rec-controls { display: flex; flex-wrap: wrap; gap: .7em; align-items: center; margin: 1em 0 .4em; }
.tf-rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #ef4444; display: inline-block; }
.tf-recorder.is-recording .tf-rec-dot { animation: tf-pulse 1s infinite; }
.tf-recorder.is-recording .tf-rec-time { color: var(--tf-bad); }
.tf-rec-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.2em; min-width: 3em; }
.tf-rec-meter { background: #f3f4f6; border-radius: 4px; }
.tf-rec-status { min-height: 1.5em; font-weight: 600; }
.tf-rec-review audio { width: 100%; margin: .5em 0; }
.tf-rec-send { margin-top: 1em; display: grid; gap: .6em; }
.tf-consent { display: flex; gap: .6em; align-items: flex-start; font-size: .9em; background: #f9fafb; padding: .7em; border-radius: 8px; }
.tf-consent input { margin-top: .2em; }
@keyframes tf-pulse { 50% { opacity: .2; } }

/* Studio */
.tf-stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8em; }
.tf-stats li { background: var(--tf-brass-soft); border-radius: var(--tf-radius); padding: .9em 1em; font-size: .9em; color: var(--tf-muted); }
.tf-stat { display: block; font-size: 2em; font-weight: 800; color: var(--tf-brass-dark); line-height: 1.1; }
.tf-table-wrap { overflow-x: auto; }
.tf-table { width: 100%; border-collapse: collapse; font-size: .93em; }
.tf-table th, .tf-table td { text-align: left; padding: .55em .6em; border-bottom: 1px solid var(--tf-line); }
.tf-table td .tf-icon { fill: var(--tf-good); }
.tf-bars { list-style: none; padding: 0; margin: 1em 0 0; display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 150px; align-items: end; }
.tf-bars li { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; font-size: .7em; color: var(--tf-muted); }
.tf-bar-fill { display: block; background: var(--tf-brass); border-radius: 4px 4px 0 0; min-height: 2px; }
.tf-bar-val { font-weight: 700; }
.tf-sub { border: 1px solid var(--tf-line); border-radius: 12px; padding: .8em 1em; margin: 0 0 1em; }
.tf-sub header { display: flex; flex-wrap: wrap; gap: .3em .8em; align-items: center; }
.tf-sub h3 { margin: 0; font-size: 1.05em; }
.tf-sub time { font-size: .85em; color: var(--tf-muted); }
.tf-sub audio { width: 100%; margin: .6em 0; }
.tf-badge { font-size: .75em; font-weight: 700; padding: .15em .6em; border-radius: 99px; background: #f3f4f6; }
.tf-sub.is-reviewed .tf-badge { background: #dcfce7; color: #166534; }
.tf-badge-new { background: #fee2e2; color: #991b1b; }
.tf-feedback { background: #f0fdf4; border-radius: 10px; padding: .6em 1em; }
.tf-feedback h4 { margin: .3em 0; }
.tf-marks { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .3em 1.2em; font-size: .9em; }
.tf-stars { color: #d97706; letter-spacing: 1px; }
.tf-dim { color: #d1d5db; }

/* Messages */
.tf-thread { border: 1px solid var(--tf-line); border-radius: 12px; padding: .6em 1em; margin: 0 0 .7em; }
.tf-thread summary { display: flex; flex-wrap: wrap; gap: .5em; align-items: center; }
.tf-thread-subj { color: var(--tf-ink); }
.tf-bubbles { list-style: none; padding: 0; }
.tf-bubble { padding: .4em .9em; border-radius: 12px; margin: .5em 0; max-width: 85%; }
.tf-bubble p { margin: .3em 0; }
.tf-bubble.is-me { background: #f3f4f6; }
.tf-bubble.is-teacher { background: var(--tf-brass-soft); margin-left: auto; border: 1px solid #fed7aa; }
.tf-bubble-meta { font-size: .8em; color: var(--tf-muted); }
.tf-reply-form { display: flex; gap: .5em; align-items: flex-end; }
.tf-reply-form textarea { flex: 1; }
.tf-form-status { font-weight: 600; }

/* Tools */
.tf-metro-display { font-size: 1.1em; }
.tf-metro-bpm { font-size: 3em; font-weight: 800; color: var(--tf-brass-dark); font-variant-numeric: tabular-nums; }
.tf-metro-word { font-style: italic; color: var(--tf-muted); margin-left: .5em; }
.tf-metro-dots { display: flex; gap: 10px; margin: .6em 0; }
.tf-metro-dots span { width: 22px; height: 22px; border-radius: 50%; background: #e5e7eb; }
.tf-metro-dots span:first-child { outline: 2px solid #fdba74; }
.tf-metro-dots span.on { background: var(--tf-brass); }
.tf-range { width: 100%; accent-color: var(--tf-brass-dark); }
.tf-tuner-read { margin: 1em 0 .5em; display: flex; align-items: baseline; gap: .8em; flex-wrap: wrap; }
.tf-tuner-note { font-size: 3em; font-weight: 800; min-width: 1.5em; }
.tf-tuner.is-in .tf-tuner-note { color: var(--tf-good); }
.tf-tuner-scale { position: relative; height: 34px; background: linear-gradient(90deg, #fee2e2, #dcfce7 42%, #dcfce7 58%, #fee2e2); border-radius: 8px; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 .6em; font-size: .7em; color: var(--tf-muted); }
.tf-tuner-scale i { font-style: normal; }
.tf-tuner-needle { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px; background: var(--tf-ink); border-radius: 2px; transition: left .12s; }
.tf-breath-stage { display: grid; place-items: center; text-align: center; padding: 1em 0; }
.tf-breath-circle { width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fdba74, var(--tf-brass)); }
.tf-breath-word { font-size: 1.3em; font-weight: 700; margin: .6em 0 0; }

/* Glossary */
.tf-gloss { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7em; }
.tf-gitem { border: 1px solid var(--tf-line); border-radius: 10px; padding: .6em .9em; }
.tf-gitem dt { font-weight: 700; color: var(--tf-brass-dark); }
.tf-gitem dd { margin: .2em 0 0; }

@media (max-width: 600px) {
	.tf-card { padding: 1em; }
	.tf-hero { padding: 1.2em; }
	.tf-reply-form { flex-direction: column; align-items: stretch; }
	.tf-bubble { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.tf *, .tf *::before { transition: none !important; animation: none !important; }
}
@media print {
	.tf-toc, .tf-recorder, .tf-music-controls, .tf-complete { display: none; }
}
