@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Archivo Black"; src: url("fonts/archivo-black-latin-400-normal.woff2") format("woff2"); font-display: swap; }

:root {
  --brass: #E3A928;
  --brass-pale: #F8E7B8;
  --ink: #1A2238;
  --quiet: #55607A;
  --line: #B9C0CE;
  --paper: #FFFFFF;
  --pencil: #FFF4CC;
  --sky: #E0EDFB;
  --red: #A32A1E;
  --display: "Archivo Black", "Arial Black", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.5 "Atkinson", system-ui, sans-serif; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 .75rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.375rem; }
aside h2:not(:first-child) { margin-top: 2.5rem; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0 0 .75rem; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.quiet { color: var(--quiet); font-weight: 400; }
.empty { color: var(--quiet); }
.hint { color: var(--quiet); font-size: 1rem; }
.flash { margin: 0; padding: .75rem 1.25rem; background: var(--ink); color: #fff; }
.error { padding: .5rem .75rem; border-left: 4px solid var(--red); color: var(--red); font-weight: 700; }

/* Controls */
button, .button, summary.button {
  display: inline-block; padding: .55rem 1rem; border: 2px solid var(--ink); border-radius: 4px;
  background: var(--paper); color: var(--ink); font: 700 1rem/1.3 "Atkinson", sans-serif;
  text-decoration: none; cursor: pointer;
}
button:hover, .button:hover { background: var(--brass-pale); }
.primary { background: var(--brass); }
.primary:hover { background: #F0BC45; }
.danger { border-color: var(--red); color: var(--red); }
button.linklike { padding: 0; border: 0; background: none; font-weight: 400; text-decoration: underline; color: inherit; }
button.linklike:hover { background: none; }
.danger-text.linklike { color: var(--red); margin-top: .5rem; }
input:not([type=checkbox]), textarea, select {
  width: 100%; padding: .55rem .7rem; border: 2px solid var(--quiet); border-radius: 4px;
  background: var(--paper); color: var(--ink); font: inherit;
}
label { display: block; font-weight: 700; }
.stack label { margin-top: 1rem; margin-bottom: .25rem; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.check input { width: 1.25rem; height: 1.25rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.stack .actions { margin-top: 1.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
summary { cursor: pointer; }
details:not(.add-calendar) > summary { text-decoration: underline; }

/* Layout */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding: .9rem 1.25rem; background: var(--brass); }
.wordmark { font: 1.5rem/1 var(--display); text-decoration: none; letter-spacing: -0.01em; }
.topbar nav { display: flex; align-items: center; gap: 1.25rem; font-weight: 700; }
.topbar nav button.linklike { font-weight: 700; }
.columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 3rem; max-width: 72rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.narrow { max-width: 34rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.heading-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .5rem 1rem; margin-bottom: .5rem; }
.student-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; max-width: 72rem; margin: 0 auto; padding: 2rem 1.25rem 0; }
.student-head p { margin: 0 0 .25rem; }
.student-head + .columns { padding-top: 1.5rem; }
.danger-zone { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--line); }
.login { max-width: 26rem; margin: 0 auto; padding: 18vh 1.25rem 2rem; }
.login h1 { font-size: 3rem; }
.login label { margin-bottom: .25rem; }
.login button { margin-top: 1rem; }
html:has(.login) body { background: var(--brass); }
.login input { border-color: var(--ink); }

/* Lists */
.day { font: 700 1.125rem/1.3 "Atkinson", sans-serif; letter-spacing: 0; margin: 1.5rem 0 .25rem; }
.day-today { background: var(--brass-pale); display: inline-block; padding: 0 .4rem; margin-left: -.4rem; }
.agenda li { display: flex; flex-wrap: wrap; gap: .1rem .9rem; padding: .35rem 0; border-top: 1px solid var(--line); }
.time { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.25rem; }
.holiday-line { padding: .5rem .75rem; background: var(--brass-pale); font-weight: 700; }
.students li { padding: .55rem 0; border-top: 1px solid var(--line); }
.students a { display: block; font-weight: 700; }
.students .quiet { font-size: 1rem; }
aside details > .students { margin-top: .5rem; }
.holidays { margin-top: 1rem; }
.holidays li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.holidays .past { opacity: .6; }
.lessons { margin-bottom: .75rem; }
.lesson-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.lesson-row details { font-size: 1rem; }
.lesson-row details[open] { flex-basis: 100%; padding-bottom: .5rem; }
.when { font-variant-numeric: tabular-nums; }
.cancelled .when { text-decoration: line-through; color: var(--quiet); }
.tag { display: inline-block; padding: 0 .35rem; background: var(--sky); font-size: .875rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.holiday-row { background: var(--brass-pale); padding-inline: .5rem; font-weight: 700; }
.holiday-row .quiet { font-size: 1rem; }

/* Notes: yellow is your pencil, blue is what the student also sees */
.composer { margin-bottom: 1.75rem; }
.note-card { padding: .9rem 1rem; margin-bottom: 1rem; border-left: 6px solid; border-radius: 0 4px 4px 0; }
.note-card.private { background: var(--pencil); border-color: var(--brass); }
.note-card.shared { background: var(--sky); border-color: #4A86C5; }
.note-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; font-size: 1rem; margin-bottom: .4rem; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: .5rem; }
.note-actions { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: 1rem; }
.note-actions details[open] { flex-basis: 100%; }
.player { margin: .5rem 0 .75rem; }
.player iframe { display: block; width: 100%; border: 0; border-radius: 4px; }
.player figcaption { margin-top: .25rem; font-size: .9375rem; }
.frame-youtube { aspect-ratio: 16 / 9; background: var(--ink); }
.frame-spotify-short { height: 152px; }
.frame-spotify { height: 352px; }
.frame-apple-short { height: 175px; }
.frame-apple { height: 450px; }

.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; min-width: 0; font-size: 1rem; }
.fineprint { margin-top: .75rem; font-size: 1rem; }
.fineprint p { margin: .5rem 0; }

/* The year as sheet music: a bar per week, a note for a lesson, a rest for a holiday */
.score { display: flex; flex-wrap: wrap; row-gap: .5rem; }
.bar { flex: 0 0 2.375rem; margin-right: -1px; }
.staff {
  position: relative; display: block; height: 37px;
  border-inline: 1px solid var(--ink);
  background: repeating-linear-gradient(to bottom, var(--ink) 0 1px, transparent 1px 9px);
}
.staff-holiday { background-color: var(--brass); }
.note { position: absolute; left: 11px; top: 14px; width: 12px; height: 9px; border-radius: 50%; background: var(--ink); transform: rotate(-20deg); }
.note::after { content: ""; position: absolute; right: 0; bottom: 5px; width: 2px; height: 25px; background: var(--ink); transform: rotate(20deg); transform-origin: bottom; }
.rest { position: absolute; left: 9px; top: 9px; width: 18px; height: 5px; background: var(--ink); }
.month { display: block; height: 1.25rem; font-size: .8125rem; line-height: 1.25rem; font-weight: 700; color: var(--quiet); }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .75rem; font-size: 1rem; }
.legend-item { display: inline-flex; align-items: center; gap: .4rem; }
.staff.mini { width: 2.375rem; flex: none; }

.language { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem 1.5rem; font-size: 1rem; text-align: right; }
html:has(.login) .language { text-align: center; }

/* Student page hero */
.hero { padding: 2rem 1.25rem 2.25rem; background: var(--brass); }
.hero > * { max-width: 69.5rem; margin-inline: auto; }
.hero h1 { font-size: clamp(2.25rem, 7vw, 5rem); line-height: 1; margin-bottom: .75rem; }
.hero-hello { font-weight: 700; margin-bottom: .5rem; }
.add-calendar { margin-top: 1.25rem; }
.add-calendar > summary { list-style: none; background: var(--ink); color: #fff; border-color: var(--ink); }
.add-calendar > summary::-webkit-details-marker { display: none; }
.add-calendar > summary:hover { background: #2C3858; }
.add-calendar p { margin-top: .75rem; max-width: 36rem; font-size: 1rem; }

@media (max-width: 52rem) {
  .columns { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
}
@media print {
  .topbar, .language, .composer, .note-actions, .actions, .add-calendar, .copy-row, .fineprint { display: none; }
}
