/* Portal v5 (owner 2026-11-30): The Camp, the profile on Today, Progress by Daily Task. The current colours and design
   system exactly (spec: "Keep the current colours and design system exactly as they are"): the v4 tokens when the
   new look is on, the v2 tokens under it. Everything is scoped to .v5-*. 48 px tap targets; works at 360 px. */
.v5-stack { display: grid; gap: 14px; }
.v5-panel { margin: 0 0 16px; padding: 18px; border: 1px solid var(--v4-line, var(--hairline)); border-radius: var(--v4-r-lg, 18px); background: var(--v4-surface, var(--surface)); box-shadow: var(--v4-shadow, none); }
.v5-h2 { margin: 0; font-size: 22px; font-weight: 600; color: var(--v4-ink, var(--ink)); }
.v5-h2-ar { margin: 2px 0 0; font-size: 18px; color: var(--accent-ink, var(--green-ink)); }
.v5-h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; font-size: 18px; font-weight: 600; color: var(--v4-ink, var(--ink)); }
.v5-h3-twin { font-size: 14px; font-weight: 500; color: var(--accent-ink, var(--green-ink)); }
.v5-pair { display: grid; gap: 2px; }
.v5-pair p { margin: 0; }
.v5-pair .v5-ar { font-family: var(--v4-font, var(--font-ar, inherit)); }
.v5-muted, .v5-muted p { color: var(--v4-muted, var(--muted)); }
.v5-strong p:first-child { font-weight: 600; color: var(--v4-ink, var(--ink)); }
.v5-ok p:first-child { font-weight: 600; color: var(--v4-ok, var(--green-ink)); }
.v5-note { padding: 10px 12px; border-radius: var(--v4-r, 12px); background: var(--v4-warn-wash, var(--amber-wash)); }
.v5-small { font-size: 13px; }
.v5-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.v5-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--v4-line-strong, var(--line)); background: var(--v4-surface, var(--surface)); color: var(--v4-ink, var(--ink)); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.v5-btn:focus-visible, .v5-chip:focus-visible, .v5-input:focus-visible, .v5-card-link:focus-visible, .v5-link:focus-visible, .v5-hist-link:focus-visible { outline: 3px solid var(--v4-ink, var(--focus)); outline-offset: 2px; }
.v5-btn-primary { background: var(--accent-ink, var(--green)); border-color: var(--accent-ink, var(--green)); color: var(--v4-surface, var(--surface)); }
.v5-btn-big { width: 100%; max-width: 360px; margin-top: 10px; font-size: 17px; }
.v5-btn-small { min-height: 48px; padding: 0 14px; font-size: 14px; }
.v5-btn-wa { justify-self: start; background: var(--v4-ok, var(--green)); border-color: var(--v4-ok, var(--green)); color: var(--v4-surface, var(--surface)); }
.v5-btn:disabled { opacity: .6; cursor: default; }
.v5-link { display: inline-flex; align-items: center; min-height: 48px; color: var(--accent-ink, var(--green-ink)); font-weight: 600; }

/* the login screen's note for a phone the daily link does not know yet (shown by the profileV5 flag) */
.v5-daily-note { display: none; }
html[data-v5-profile="1"] .v5-daily-note { display: block; }

/* The Camp */
.v5-grid2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.v5-card { display: grid; gap: 6px; padding: 18px; border: 1px solid var(--v4-line, var(--hairline)); border-radius: var(--v4-r-lg, 18px); background: var(--v4-surface, var(--surface)); color: inherit; text-decoration: none; }
.v5-card-link:hover { border-color: var(--accent, var(--green)); }
.v5-card-title { margin: 0; font-size: 20px; font-weight: 600; color: var(--v4-ink, var(--ink)); }
.v5-card-title-ar { margin: 0; font-size: 16px; color: var(--accent-ink, var(--green-ink)); }
.v5-locked { max-width: 640px; }
.v5-lock { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-wash, var(--green-wash)); color: var(--accent-ink, var(--green-ink)); }
.v5-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.v5-list li { padding: 10px 12px; border-inline-start: 3px solid var(--accent, var(--green)); background: var(--v4-paper, var(--paper)); border-radius: 0 var(--v4-r-sm, 8px) var(--v4-r-sm, 8px) 0; }
.v5-code { display: grid; gap: 8px; max-width: 360px; padding-top: 6px; }
.v5-label { font-weight: 600; }
.v5-input { min-height: 48px; padding: 0 14px; border: 1px solid var(--v4-line-strong, var(--line)); border-radius: 12px; background: var(--v4-surface, var(--surface)); color: var(--v4-ink, var(--ink)); font: inherit; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; }
.v5-msg { min-height: 1.4em; margin: 0; }

/* Today: my profile */
.v5-profile-head { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 16px; }
.v5-avatar { flex: 0 0 56px; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-wash, var(--green-wash)); color: var(--accent-ink, var(--green-ink)); font-size: 20px; font-weight: 700; }
.v5-who { display: grid; gap: 6px; min-width: 0; }
.v5-name { margin: 0; font-size: clamp(24px, 6vw, 32px); line-height: 1.1; font-weight: 600; color: var(--v4-ink, var(--ink)); overflow-wrap: anywhere; }
.v5-badge { display: inline-flex; flex-wrap: wrap; gap: 0 2px; align-items: baseline; justify-self: start; margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--accent-wash, var(--green-wash)); color: var(--accent-ink, var(--green-ink)); font-weight: 600; }
.v5-badge-id { font-weight: 700; }
.v5-facts { margin: 0; color: var(--v4-muted, var(--muted)); font-size: 14px; }
.v5-sounds { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin: 0; padding: 0; list-style: none; }
.v5-sound { display: grid; gap: 2px; padding: 12px; border: 1px solid var(--v4-line, var(--hairline)); border-radius: var(--v4-r, 12px); }
.v5-sound p { margin: 0; }
.v5-sound-name { font-weight: 600; font-size: 14px; }
.v5-sound-score strong { font-size: 22px; color: var(--v4-ink, var(--ink)); }
.v5-sound-weak { border-color: var(--accent, var(--green)); background: var(--accent-wash, var(--green-wash)); }
.v5-weak-tag { font-size: 13px; font-weight: 600; color: var(--accent-ink, var(--green-ink)); }
.v5-spark { color: var(--accent-ink, var(--green-ink)); }
.v5-words { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.v5-word { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--v4-line, var(--hairline)); border-radius: var(--v4-r, 12px); }
.v5-word-top { margin: 0; overflow-wrap: anywhere; }
.v5-word .v5-btn { justify-self: start; }
.v5-strike { text-decoration: line-through; color: var(--v4-muted, var(--muted)); }
.v5-goals { display: grid; gap: 8px; margin: 10px 0; padding: 0; list-style: none; }
.v5-goal { position: relative; display: flex; gap: 10px; align-items: flex-start; }
.v5-check { flex: 0 0 24px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--v4-line-strong, var(--line)); }
.v5-goal-done .v5-check { border-color: var(--v4-ok, var(--green)); background: var(--v4-ok, var(--green)); color: var(--v4-surface, var(--surface)); }
.v5-week { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.v5-ring { position: relative; width: 72px; height: 72px; display: grid; place-items: center; }
.v5-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.v5-ring-track { stroke: var(--v4-line, var(--hairline)); }
.v5-ring-arc { stroke: var(--accent, var(--green)); }
.v5-ring strong { position: relative; font-size: 16px; }
.v5-days { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.v5-day { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--v4-line, var(--hairline)); font-size: 12px; font-weight: 600; color: var(--v4-muted, var(--muted)); }
.v5-day-done { border-color: var(--accent-ink, var(--green)); background: var(--accent-ink, var(--green)); color: var(--v4-surface, var(--surface)); }
.v5-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.v5-chip { min-height: 48px; padding: 0 14px; border: 1px solid var(--v4-line-strong, var(--line)); border-radius: 999px; background: var(--v4-surface, var(--surface)); color: var(--v4-ink, var(--ink)); font: inherit; cursor: pointer; text-align: start; }
.v5-camp-title { margin: 24px 0 12px; font-size: 20px; font-weight: 600; }

/* Progress */
.v5-history { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.v5-hist-link { display: grid; grid-template-columns: 6.5em 1fr auto auto; gap: 10px; align-items: center; min-height: 48px; padding: 6px 12px; border: 1px solid var(--v4-line, var(--hairline)); border-radius: var(--v4-r, 12px); color: inherit; text-decoration: none; }
.v5-hist-focus { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v5-hist-score { font-weight: 700; }
.v5-hist-len { color: var(--v4-muted, var(--muted)); font-size: 13px; }
@media (max-width: 420px) { .v5-hist-link { grid-template-columns: 1fr auto; } .v5-hist-focus, .v5-hist-len { grid-column: 1 / -1; } }
.v5-chart { width: 100%; max-width: 520px; height: auto; }
.v5-grid { stroke: var(--v4-line, var(--hairline)); stroke-width: 1; }
.v5-axis { font-size: 10px; fill: var(--v4-muted, var(--muted)); }
.v5-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.v5-pt { stroke: none; }
.v5-line-0 { --c: var(--s-today-ink, var(--ink)); }
.v5-line-1 { --c: var(--s-calls-ink, var(--ink)); }
.v5-line-2 { --c: var(--s-progress-ink, var(--ink)); }
.v5-line-3 { --c: var(--s-daily-ink, var(--ink)); }
.v5-line-4 { --c: var(--s-admin-ink, var(--ink)); }
.v5-line-5 { --c: var(--s-words-ink, var(--ink)); }
.v5-line-6 { --c: var(--s-menna-ink, var(--ink)); }
.v5-line[class*="v5-line-"] { stroke: var(--c); }
.v5-pt[class*="v5-line-"] { fill: var(--c); }
.v5-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.v5-key-item { display: inline-flex; gap: 6px; align-items: center; color: var(--c); }
.v5-swatch { width: 14px; height: 4px; border-radius: 2px; background: currentColor; }
.v5-key-item span:last-child { color: var(--v4-ink, var(--ink)); }
.v5-mistakes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.v5-mistakes li { padding: 6px 12px; border-radius: 999px; background: var(--v4-paper, var(--paper)); border: 1px solid var(--v4-line, var(--hairline)); }

/* Admin > Camp */
.v5-admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.v5-admin-table th, .v5-admin-table td { padding: 8px; border-bottom: 1px solid var(--v4-line, var(--hairline)); text-align: start; vertical-align: top; }
.v5-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.v5-status-active { background: var(--v4-ok-wash, var(--green-wash)); color: var(--v4-ok, var(--green-ink)); }
.v5-status-revoked, .v5-status-expired { background: var(--v4-bad-wash, var(--red-wash)); color: var(--v4-bad, var(--red)); }
.v5-code-shown { font-family: ui-monospace, Consolas, monospace; font-size: 18px; letter-spacing: .08em; font-weight: 700; }

/* admin: 48 px targets */
.v5-admin-btn { min-height: 48px; }
.v5-pick { min-height: 48px; }

/* v6: My words to review */
.v5-review-card { display: grid; gap: .5rem; }
.v5-review-word { font-size: 1.75rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.v5-review-word:focus { outline: none; }
.v5-review-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.v5-review-row .v5-btn { min-height: 44px; }

/* v6 (2026-12-01): Admin > Students - the fixed columns (Calls, Avg, Last active and 19rem of buttons) were wider than
   the list at 1280 px, so the name column got 0 px and names broke one letter per line. The buttons now sit on their
   own line under each student, and the name keeps at least 9rem. */
@media (min-width: 768px) {
  #classList > li, #classListHead { grid-template-columns: minmax(9rem, 1fr) 3.5rem 3.5rem 7.5rem !important; }
  #classList > li > :last-child { grid-column: 1 / -1; justify-content: flex-start; }
  #classListHead > :last-child { display: none; }
}
