/* © 2026 Cromulent, Inc. All Rights Reserved.
   admin - glitch's /admin ("School"): settings, sounds, moments and the voice lab

   wchesher, 2026-10-10: "I want an entire solidification of the suite. It needs to be better
   encapsulated int he brand" / "at this point we can rescind some features or consolidate" /
   "ELEGANT AF" / "It needs to be crazy accessible" / "this is glitch now".

   The admin's pages are suite pages now: teacher.css (and through it suite.css) is imported plainly,
   so the header, the label, the filled action, the text action, the field, the switch, the segmented
   choice, the hairline row, the inline confirm and the status line here are the SAME rules the
   teacher pages and the station use. On the morning of 2026-10-10 only the header was the suite's:
   suite.css sat in a cascade layer under the student door's sheet, and this file carried its own
   pills, switches, bordered cards and lowercase labels. Those are in git history.

   What is left is LAYOUT for things only the admin has: the door, the access rows, a track, a
   moment's row. Held to the elegance spec's still elements (docs/architecture/glitch-live-assessment.md):
   hairline seams and no boxes, no shadows, the two radius tokens, and no colour literal.

   2026-10-11, wchesher: "The admin and teacher functions are supposed to be designed interface. We
   stripped them of any character". Its sections are panels now, through suite.css's character layer;
   the door is a panel with the tiles mark. Still no colour literal. */
@import url("teacher.css");
@import url("studio.css");

/* ---- a section's head: its title, and which save model it follows, in the same place every time -- */
.secthead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: var(--space-5); row-gap: 4px; }
.secthead .tag { margin-left: 0; }
.secthead .label .meta { font: inherit; letter-spacing: inherit; }
.admin .sect > .hint { margin-top: calc(-1 * var(--space-2)); }
.unitfield { display: inline-flex; align-items: center; gap: 10px; color: var(--ink2); }
.unitfield .lbl { margin-right: 6px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: var(--control-h); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--ink); }
.admin .tset-row > select { width: auto; flex: 0 1 240px; }
.admin form { margin: 0; }
/* the next section's own hairline follows the Save row: one seam, not two */
.admin .setacts { border-bottom: 0; }

/* the door (the wordmark, one field, one filled action) lives in suite.css: the teacher's sign-in is the same door */

/* ---- settings: the default skin, as previews in each skin's own colours (2026-10-11) ----------------- */
.skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: var(--space-3); width: 100%; padding: var(--space-2) 0; }
.skin { position: relative; display: block; cursor: pointer; }
.skin input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.skin-card { display: grid; gap: 6px; padding: 6px 6px 10px; border: 1px solid var(--edge); border-radius: var(--radius-md); background: var(--well); }
.skin-face { display: flex; align-items: flex-end; justify-content: space-between; aspect-ratio: 16 / 10; padding: 8px; border-radius: var(--radius-sm); }
.skin-word { font-size: 22px; line-height: 1; }
.skin-tiles { display: grid; grid-template-columns: repeat(2, 12px); gap: 3px; }
.skin-tiles b { display: block; width: 12px; height: 12px; border-radius: var(--radius-sm); }
.skin-name { padding: 0 4px; font-size: 14px; color: var(--ink2); }
.skin-on { display: none; padding: 0 4px; font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.skin:hover .skin-card { border-color: var(--a2); }
.skin input:checked + .skin-card { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.skin input:checked + .skin-card .skin-name { color: var(--ink); font-weight: 600; }
.skin input:checked + .skin-card .skin-on { display: block; }
.skin input:focus-visible + .skin-card { outline: 2px solid var(--ring); outline-offset: 3px; }

/* ---- settings: the codes and keys ------------------------------------------------------------------- */
.access-row { column-gap: var(--space-5); }
/* A WRAPPED ROW STILL BREATHES (audit 2026-10-12, second pass): at phone width "Close this door" wraps under
   the code field, and the suite's row has no row-gap, so the danger action sat touching the field above it --
   the cramped-confirm class Maestro found by hand. One small vertical gap for the access rows only. */
.access-row { row-gap: var(--space-2); }
.access-row .tset-label { flex: 0 0 9.5rem; }
.accessform { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); flex: 1 1 280px; min-width: 0; }
.accessform input { flex: 1 1 14ch; min-width: 0; font-family: var(--mono); }
.accessform .pair { display: flex; align-items: center; gap: var(--space-4); flex: 1 1 24ch; min-width: 0; }

/* ---- sounds: the school's own tracks ----------------------------------------------------------------- */
.uploadbar { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-5); }
.trks { display: grid; border-top: 1px solid var(--line); }
.trks > .hint { padding: var(--space-4) 0; }
.trk { display: grid; gap: var(--space-2); padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.trk-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; column-gap: var(--space-5); }
.trk-name { margin: 0; font: 600 18px/1.3 var(--body); }
.trk audio { width: 100%; max-width: 560px; }
.trk-uses { display: grid; }
.useline { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-5); }
.useform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2) var(--space-5); }
.useform label:not(.check) { display: grid; gap: 2px; }
.useform select, .useform input[type="text"] { width: auto; }

/* ---- moments: every moment of a class a hairline row that opens --------------------------------------- */
.momentform { display: grid; gap: var(--space-6); }
.moments { display: grid; border-top: 1px solid var(--line); }
.moment { border-bottom: 1px solid var(--line); }
.moment > summary { display: grid; grid-template-columns: 7rem 12rem minmax(0, 1fr) auto auto; column-gap: var(--space-4);
  align-items: center; min-height: 52px; cursor: pointer; list-style: none; }
.moment > summary::-webkit-details-marker { display: none; }
.moment-where { margin: 0; }
.moment-name { font-weight: 600; }
.moment-why { font-size: 15px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* what it sounds like, on the row: the school's pick at full ink, what shows through it quiet */
.moment-chip { font: 500 13px/1.3 var(--mono); color: var(--ink2); max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moment-chip.set { color: var(--ink); font-weight: 700; }
.openword { margin-left: 0; }
.moment[open] > summary .when-closed, .moment:not([open]) > summary .when-open { display: none; }
.moment > summary:hover .openword { color: var(--ink); }
.moment-body { display: grid; gap: var(--space-4); justify-items: start; padding: var(--space-2) 0 var(--space-5) calc(7rem + var(--space-4)); }
.moment-body > * { max-width: 100%; }
.moment-sound, .moment-body .stackfield { width: 100%; }
.moment-sound { display: grid; gap: var(--space-2); }
.platepick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2) var(--space-5); width: 100%; }
.platewords { display: grid; gap: 2px; flex: 1 1 240px; max-width: 360px; }
.platethumb { width: 120px; aspect-ratio: 5 / 3; object-fit: cover; border-radius: var(--radius-sm); }
/* the moments between the reveal and the board, in four groups a person can scan (ux audit 2026-10-12, item 49) */
.momentgroup { display: grid; gap: var(--space-2); margin-top: var(--space-5); }
.momentgroup > .label { margin: 0; }
.momentgroup > .hint { margin: 0; }
/* SAVES AS YOU GO (ux audit 2026-10-12, item 14): the floating Save bar is gone -- it covered the card headers
   as the page scrolled. What took its place is quiet: "Saved" in the mono label face beside the name of the
   row that changed, and what went wrong, in the refusal colour, when it did not. */
.autosaved { margin-left: 10px; font: 500 12px/1.3 var(--mono); letter-spacing: .06em; color: var(--ink2); font-weight: 500; white-space: normal; }
.autosaved.busy { opacity: .7; }
.autosaved.bad { color: var(--wrong); }
/* on a moment's row it takes a line of its own under the name, so a refusal reads in full */
.moment > summary > .autosaved { grid-column: 2 / -1; margin: -6px 0 8px; }

@media (max-width: 720px) {
  .moment > summary { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 2px; padding: 6px 0; }
  .moment-why { grid-column: 2 / -1; white-space: normal; }
  .moment-chip { grid-column: 2 / -1; max-width: 100%; }
  .openword { grid-column: 3; grid-row: 1; }
  .moment-body { padding-left: 0; }
  .access-row .tset-label { flex-basis: 100%; }
}
/* Teachers: Change code opens under its row, the new code in plain sight while it is set */
.teacher-row > .tset-label { margin-right: auto; }
.teacher-row details.teachercode > summary { list-style: none; cursor: pointer; min-height: var(--control-h); display: inline-flex; align-items: center; }
.teacher-row details.teachercode > summary::-webkit-details-marker { display: none; }
.teacher-row details.teachercode[open] { flex-basis: 100%; order: 3; }
.teacher-row details.teachercode[open] > form { margin-top: var(--space-2); }
.teacher-row .reveal { display: inline-flex; align-items: center; gap: var(--space-2); }
.teacher-row .reveal output.code { font-family: var(--mono); user-select: all; }
.teacher-row .reveal output.code:empty { display: none; }
.teacher-row span.hint.reveal { margin: 0; }
.accessform input.code { font-family: var(--mono); letter-spacing: .02em; }
/* THE WHOLE CODE IN VIEW (audit 2026-10-12, second pass): an advisor's code grew to four words and a number
   (about 40 characters), but its field kept the 14ch basis every access field shares, so at 1440 it showed
   "barren-accordion" and hid the rest -- and the admin reads this field out loud, once, before it is never
   shown again. The code's pair takes a line of its own and the field is sized for the whole code; on a
   phone it still fills the line it has. Layout only: what is drawn and how it is checked is untouched. */
.accessform .pair:has(> input.code) { flex: 1 1 100%; flex-wrap: wrap; row-gap: var(--space-2); }
.accessform .pair > .lbl { flex: none; }
.accessform input.code { flex: 1 1 44ch; }
@media (max-width: 480px) { .accessform input.code { font-size: 13px; letter-spacing: 0; } }
/* the code just set, shown once (ux audit 2026-10-12, item 47): large enough to read out across a desk */

/* CHEAT CODES (2026-10-12): one row per secret face, its codes behind one disclosure */
.cheat-row { column-gap: var(--space-4); }
.cheat-row .cheat-face { width: 56px; height: 56px; flex: 0 0 56px; display: inline-grid; place-items: center; }
.cheat-row .cheat-face img, .cheat-row .cheat-face svg { width: 56px; height: 56px; border-radius: var(--radius-md); object-fit: cover; }
.cheat-row > .tset-label { margin-right: auto; display: flex; flex-direction: column; gap: 2px; }
.cheat-row .cheat-count { margin: 0; }
.cheat-row .cheat-state { display: inline-flex; flex-wrap: wrap; gap: var(--space-2); }
.cheat-row.off .cheat-face { opacity: .4; }
.cheatgone li > span { font: 500 15px/1 var(--mono); color: var(--ink2); }
.cheat-row details.cheatcodes > summary { list-style: none; cursor: pointer; min-height: var(--control-h); display: inline-flex; align-items: center; }
.cheat-row details.cheatcodes > summary::-webkit-details-marker { display: none; }
.cheat-row details.cheatcodes[open] { flex-basis: 100%; order: 3; padding: var(--space-2) 0 var(--space-4); }
.cheatlist { list-style: none; margin: var(--space-2) 0 var(--space-4); padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.cheatlist li { display: inline-flex; align-items: center; gap: var(--space-2); }
code.cheat { font: 500 16px/1 var(--mono); letter-spacing: .04em; color: var(--ink); user-select: all; }
.cheatacts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
.cheat-row form.inline { display: inline-flex; margin: 0; }
.cheatcodes > summary + .lbl, .cheatcodes > summary + .cheatacts { margin-top: var(--space-3); }
