/* The "Tips & feedback from Rowan" block of the start page (index.html, #home-notes, assets/home-notes.js).
   A .dash-block like the Homework block: the glass card itself (border, gloss strip, padding) comes from home-homework.css, which has to be
   loaded before this file. Scoped to html.ah, uses the colour variables of academy-home.css (--ah-*). */

html.ah .notes-block[hidden] { display: none; }
html.ah .notes-block [hidden] { display: none; }
html.ah .nt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
html.ah .notes-block .nt-title {
  font-family: var(--ah-head); font-weight: 700; font-size: 25px; line-height: 1.15; text-transform: lowercase; color: var(--ah-ink); margin: 5px 0 0;
}
html.ah .notes-block ul { list-style: none; margin: 0; padding: 0; }
html.ah .notes-block li { margin: 0; }
html.ah .notes-block li::marker { content: ''; }

/* ---------- A note: a glass card with a coloured edge (amber for a tip, green for feedback; the chip says it in words too) ---------- */
html.ah .nt-list { display: flex; flex-direction: column; gap: 12px; }
html.ah .nt-card {
  position: relative; overflow: hidden; padding: 14px 18px 14px 24px; border-radius: 20px; color: var(--ah-ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(240, 248, 254, .64));
  border: 1.5px solid rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 1px rgba(53, 164, 221, .45), inset 0 -6px 12px -8px rgba(70, 105, 140, .3), 0 1px 3px rgba(20, 60, 110, .15);
}
html.ah .nt-card::before {   /* the coloured edge on the left */
  content: ''; position: absolute; left: 9px; top: 14px; bottom: 14px; width: 5px; border-radius: 99px;
  background: linear-gradient(180deg, #ffe08a, #e9a21a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
html.ah .nt-card.nt-feedback::before { background: linear-gradient(180deg, #b4ee8a, #4cb91c); }

html.ah .nt-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 8px; }
html.ah .nt-ic { display: inline-flex; flex: none; }
html.ah .nt-chip {   /* "Tip" / "Feedback": icon and word */
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px 0 8px; border-radius: 99px;
  font: 700 13px/1 var(--ah-font); letter-spacing: .02em; white-space: nowrap;
}
html.ah .nt-chip.tip {
  color: #4a2f00; border: 1.5px solid #d99a1c; background: linear-gradient(180deg, #fffbe8 0%, #ffeeb4 49%, #ffe08a 50%, #fff0b8 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 4px rgba(230, 160, 30, .4), 0 1px 3px rgba(150, 100, 10, .2);
}
html.ah .nt-chip.feedback {
  color: #14400a; border: 1.5px solid #3f9d17; background: var(--ah-pill-green);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 4px rgba(120, 210, 70, .5), 0 1px 3px rgba(20, 100, 40, .2);
}
html.ah .nt-new {   /* unseen */
  display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 99px;
  font: 700 11px/1 var(--ah-font); letter-spacing: .1em; text-transform: uppercase; color: #fff;
  border: 1.5px solid #0a2a48; background: linear-gradient(180deg, #2a72b0 0%, #1d5a93 49%, #0d3358 50%, #164a7d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 8px rgba(var(--ah-glow), .55);
}
html.ah .nt-group {   /* "For the group" */
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px 0 7px; border-radius: 99px;
  font: 600 12px/1 var(--ah-font); color: var(--ah-ink-soft); white-space: nowrap;
  background: rgba(255, 255, 255, .8); border: 1px solid rgba(53, 164, 221, .7); box-shadow: inset 0 1px 0 #fff;
}
html.ah .nt-date { margin-left: auto; font: 600 12.5px/1.2 var(--ah-font); font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--ah-spn); white-space: nowrap; }

/* "About your upload: beat.wav": a link to that upload in the Upload your work block */
html.ah .nt-about {
  display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; box-sizing: border-box; min-height: 44px; margin: 8px 0 0; padding: 4px 14px 4px 10px;
  border-radius: 99px; font: 600 13.5px/1.3 var(--ah-font); color: var(--ah-ink); text-decoration: none;
  background: rgba(255, 255, 255, .8); border: 1px solid rgba(53, 164, 221, .7); box-shadow: inset 0 1px 0 #fff;
  transition: background .15s, box-shadow .15s;
}
html.ah span.nt-about { min-height: 30px; }
html.ah a.nt-about:hover { color: var(--ah-ink); background: rgba(255, 255, 255, .95); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(25, 191, 242, .9), 0 0 10px rgba(var(--ah-glow), .55); }
html.ah .nt-about-l { flex: none; color: var(--ah-spn); }
html.ah .nt-about-n { min-width: 0; overflow-wrap: anywhere; }
html.ah .nt-card:focus { outline: none; }
html.ah .nt-card:focus-visible { outline: 3px solid var(--ah-focus); outline-offset: 2px; }
html.ah .nt-card.nt-hl { box-shadow: 0 0 0 3px var(--ah-blue), 0 0 18px rgba(var(--ah-glow), .7), inset 0 -6px 12px -8px rgba(70, 105, 140, .3); }

html.ah .nt-text { margin: 10px 0 0; font: 400 15px/1.5 var(--ah-font); color: var(--ah-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
html.ah .nt-text.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }

/* a time in a note about an upload (0:42): a small button that makes the player jump there */
html.ah .nt-ts {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; margin: 0 1px; border-radius: 99px; cursor: pointer; vertical-align: baseline;
  font: 700 13px/1.2 var(--ah-font); font-variant-numeric: tabular-nums; color: #06233f;
  border: 1.5px solid #1778b3; background: var(--ah-pill-a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -2px 4px rgba(20, 110, 170, .3);
  transition: box-shadow .15s;
}
html.ah .nt-ts:hover { box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(25, 191, 242, .9), 0 0 10px rgba(var(--ah-glow), .55); }
html.ah .nt-ts:focus-visible { outline: 3px solid var(--ah-focus); outline-offset: 2px; }
html.ah .nt-text:has(.nt-ts) { line-height: 1.75; }

html.ah .nt-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 10px; }

/* the link to the lesson */
html.ah .nt-lesson {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 30px; padding: 3px 12px 3px 4px; border-radius: 99px;
  font: 600 13.5px/1.25 var(--ah-font); color: var(--ah-ink); text-decoration: none;
  background: rgba(255, 255, 255, .8); border: 1px solid rgba(53, 164, 221, .7); box-shadow: inset 0 1px 0 #fff;
  transition: background .15s, box-shadow .15s;
}
html.ah a.nt-lesson:hover { color: var(--ah-ink); background: rgba(255, 255, 255, .95); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(25, 191, 242, .9), 0 0 10px rgba(var(--ah-glow), .55); }
html.ah .nt-lesson.locked { border-style: dashed; color: var(--ah-ink-soft); }
html.ah .nt-tag {
  flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 8px; border-radius: 99px;
  font: 700 12px/1 var(--ah-font); letter-spacing: .04em; color: #06233f;
  border: 1.5px solid #1778b3; background: var(--ah-pill-a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -2px 4px rgba(20, 110, 170, .3);
}
html.ah .nt-lname { min-width: 0; overflow-wrap: anywhere; }
html.ah .nt-lesson:not(:has(.nt-tag)) .nt-lname { padding-left: 8px; }
html.ah .nt-go { flex: none; display: inline-flex; color: #0b6bb3; }

/* the two buttons: "Read more" inside a note, "Show N more" under the list */
html.ah .nt-read, html.ah .nt-more {
  height: 30px; padding: 0 16px; border-radius: 99px; cursor: pointer; border: 1.5px solid #35a4dd; color: var(--ah-ink);
  font: 600 13.5px/1.2 var(--ah-font); background: var(--ah-pill); box-shadow: var(--ah-pill-sh); transition: background .15s, border-color .15s, box-shadow .15s;
}
html.ah .nt-more { height: 34px; margin-top: 14px; padding: 0 18px; font-size: 14px; }
html.ah .nt-read:hover, html.ah .nt-more:hover { border-color: #1f8fcf; background: var(--ah-pill-h); box-shadow: var(--ah-pill-sh-h); }
html.ah .nt-read:active, html.ah .nt-more:active { background: var(--ah-pill-a); border-color: #1778b3; box-shadow: inset 0 2px 4px rgba(0, 60, 110, .35); }

/* ---------- Entry: the block rises in and its cards follow one after the other (only when motion is allowed; the script adds .nt-in) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.ah .notes-block.nt-in { animation: nt-block .5s cubic-bezier(.2, .8, .3, 1.1) both; }
  html.ah .notes-block.nt-in .nt-card { animation: nt-card .5s cubic-bezier(.2, .8, .3, 1.1) both; animation-delay: calc(var(--i, 0) * 80ms + 140ms); }
}
@keyframes nt-block { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes nt-card { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  html.ah .nt-head { margin-bottom: 14px; padding: 0 4px; }
  html.ah .notes-block .nt-title { font-size: 22px; }
  html.ah .nt-card { padding: 12px 12px 12px 22px; border-radius: 18px; }
  html.ah .nt-card::before { left: 8px; top: 12px; bottom: 12px; }
  html.ah .nt-date { margin-left: 0; flex-basis: 100%; order: 9; }   /* the date drops under the chips on a narrow screen */
}

/* ---------- Admin preview: the badge line above the example notes ---------- */
html.ah .nt-adm {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 14px; padding: 8px 14px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 251, 232, .92), rgba(255, 238, 180, .7)); border: 1.5px solid #d99a1c;
  box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(150, 100, 10, .2);
}
html.ah .nt-adm-b {
  display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 99px; flex: none;
  font: 700 11px/1 var(--ah-font); letter-spacing: .1em; text-transform: uppercase; color: #fff;
  border: 1.5px solid #0a2a48; background: linear-gradient(180deg, #2a72b0 0%, #1d5a93 49%, #0d3358 50%, #164a7d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
html.ah .nt-adm-t { flex: 1 1 240px; min-width: 0; font: 600 13.5px/1.45 var(--ah-font); color: #4a2f00; }

@media (prefers-reduced-motion: reduce) {
  html.ah .nt-lesson, html.ah .nt-read, html.ah .nt-more, html.ah .nt-about, html.ah .nt-ts { transition: none; }
}
@media (forced-colors: active) {
  html.ah .nt-chip, html.ah .nt-new, html.ah .nt-group, html.ah .nt-lesson, html.ah .nt-tag, html.ah .nt-read, html.ah .nt-more, html.ah .nt-about, html.ah .nt-ts { border: 1px solid CanvasText; }
  html.ah .nt-card::before { background: CanvasText; }
}
