/*
 * Gradespace Tutor: the student and staff portals (Pro). A page of their own:
 * the theme's stylesheets aren't loaded, only its colours and fonts (theme.json
 * presets, through Core's --gsc-* tokens when the theme maps them for the
 * portal) and anything a theme adds on the gstu_portal_enqueue hook.
 *
 * Colours are only ever used in pairs the Tutor theme's palettes are checked
 * for (ink, muted on surface and page; on-accent on accent), so text keeps
 * 4.5:1 in every design and palette, the dark ones too.
 */
.gstu-app {
	--a-bg: var(--gstu-app-bg, var(--wp--preset--color--paper, var(--wp--preset--color--base, #f4f6fa)));
	--a-surface: var(--gstu-app-surface, var(--gsc-surface, var(--wp--preset--color--surface, #ffffff)));
	--a-ink: var(--gsc-ink, var(--wp--preset--color--ink, var(--wp--preset--color--contrast, #111827)));
	--a-muted: var(--gsc-muted, var(--wp--preset--color--muted, #4b5563));
	--a-line: var(--gsc-line, var(--wp--preset--color--line, #dfe3ea));
	--a-tint: var(--gsc-tint, var(--wp--preset--color--tint, #eef2fb));
	--a-brand: var(--gsc-brand, var(--wp--preset--color--accent, #1d4ed8));
	--a-on-brand: var(--gsc-on-brand, var(--wp--preset--color--on-accent, #ffffff));
	--a-link: var(--gstu-app-link, var(--a-ink));
	--a-font: var(--gsc-font, var(--wp--preset--font-family--body, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif));
	--a-display: var(--gsc-font-display, var(--wp--preset--font-family--display, var(--a-font)));
	--a-r: var(--gstu-app-r, 14px);
	--a-r-sm: var(--gstu-app-r-sm, 10px);
	--a-btn-r: var(--gstu-app-btn-r, 10px);
	--a-field: color-mix(in srgb, var(--a-ink) 55%, var(--a-surface));
	--a-bar: 60px;
	--a-side: 248px;
}
html { -webkit-text-size-adjust: 100%; }
body.gstu-app { margin: 0; min-height: 100vh; background: var(--a-bg); color: var(--a-ink); font-family: var(--a-font); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.gstu-app *, .gstu-app *::before, .gstu-app *::after { box-sizing: border-box; }
.gstu-app img { max-width: 100%; height: auto; }
.gstu-app a { color: var(--a-link); text-underline-offset: .18em; }
.gstu-app :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--a-ink); outline-offset: 2px; }
.gstu-app h1, .gstu-app h2, .gstu-app h3 { font-family: var(--a-display); line-height: 1.2; margin: 0; color: var(--a-ink); text-wrap: balance; }
.gstu-app p { margin: 0; }
.gstu-app .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gstu-icon { flex: none; display: block; }

.gstu-app__skip { position: absolute; left: 12px; top: -100px; z-index: 100; padding: 10px 16px; border-radius: var(--a-r-sm); background: var(--a-brand); color: var(--a-on-brand) !important; font-weight: 700; text-decoration: none; }
.gstu-app__skip:focus { top: 12px; }

/* The shell: a bar across the top, the menu at the side, the content. */
.gstu-app__shell { min-height: 100vh; display: grid; grid-template-columns: var(--a-side) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "bar bar" "nav main"; }
.is-bare .gstu-app__shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "main"; }
.has-shell .gstu-app__shell { background: linear-gradient(90deg, var(--a-surface) 0 var(--a-side), var(--a-line) var(--a-side) calc(var(--a-side) + 1px), transparent calc(var(--a-side) + 1px)); } /* The menu's column runs the page's full length. */
.gstu-app__bar { grid-area: bar; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; min-height: var(--a-bar); padding: 8px clamp(16px, 2.5vw, 28px); background: var(--a-surface); border-bottom: 1px solid var(--a-line); }
.gstu-app__brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; min-width: 0; color: var(--a-ink); text-decoration: none; }
.gstu-app__logo { display: block; width: auto; max-width: 160px; max-height: 36px; object-fit: contain; }
.gstu-app__site-name { font-family: var(--a-display); font-weight: 800; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gstu-app__brand-sub { padding-left: 12px; border-left: 1px solid var(--a-line); color: var(--a-muted); font-size: .875rem; font-weight: 600; white-space: nowrap; }
.gstu-app__who { display: flex; align-items: center; gap: 8px 14px; min-width: 0; font-size: .9rem; }
.gstu-app__code { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 999px; background: var(--a-tint); color: var(--a-ink); font-weight: 700; font-size: .8125rem; letter-spacing: .03em; white-space: nowrap; }
.gstu-app__name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gstu-app__admin, .gstu-app__out { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--a-line); border-radius: var(--a-btn-r); color: var(--a-ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.gstu-app__admin:hover, .gstu-app__out:hover { border-color: var(--a-ink); }

.gstu-app__nav { grid-area: nav; position: sticky; top: var(--a-bar); align-self: start; display: flex; flex-direction: column; gap: 16px; height: calc(100vh - var(--a-bar)); overflow-y: auto; padding: 18px 12px; background: var(--a-surface); border-right: 1px solid var(--a-line); }
.gstu-app__tabs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gstu-app__tab { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 12px; border-radius: var(--a-r-sm); color: var(--a-ink) !important; text-decoration: none; font-weight: 600; }
.gstu-app__tab:hover { background: var(--a-tint); }
.gstu-app__tab.is-current { background: var(--a-brand); color: var(--a-on-brand) !important; }
.gstu-app__tab-label { flex: 1; min-width: 0; }
.gstu-app__tab-short { display: none; }
.gstu-app__badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--a-brand); color: var(--a-on-brand); font-size: .75rem; font-weight: 800; line-height: 1; }
.gstu-app__tab.is-current .gstu-app__badge { background: var(--a-on-brand); color: var(--a-brand); }
.gstu-app__site { margin-top: auto; padding: 0 12px; font-size: .875rem; }
.gstu-app__site a { display: inline-flex; align-items: center; min-height: 44px; color: var(--a-muted); }

.gstu-app__main { grid-area: main; min-width: 0; padding: 28px clamp(16px, 3vw, 44px) 56px; outline: none; }
.gstu-app__view { max-width: 1120px; margin: 0 auto; display: grid; gap: 20px; }
.is-bare .gstu-app__view { max-width: 560px; padding-top: clamp(8px, 6vh, 64px); }
.is-loading .gstu-app__main { opacity: .6; transition: opacity .15s .1s; }
@media (prefers-reduced-motion: reduce) { .is-loading .gstu-app__main { transition: none; } }
.gstu-app__head { display: grid; gap: 8px; }
.gstu-app__crumb a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--a-muted); font-weight: 600; text-decoration: none; }
.gstu-app__crumb a:hover span { text-decoration: underline; }
.gstu-app__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 800; outline: none; overflow-wrap: anywhere; }
.gstu-app__lead { color: var(--a-muted); font-size: 1rem; max-width: 60em; }
.gstu-app__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* Pieces. */
.gstu-app .gstu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--a-line); border-radius: var(--a-btn-r); background: var(--a-surface); color: var(--a-ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.gstu-app .gstu-btn:hover { border-color: var(--a-ink); }
.gstu-app .gstu-btn--primary { background: var(--a-brand); border-color: var(--a-brand); color: var(--a-on-brand); }
.gstu-app .gstu-btn--primary:hover { border-color: var(--a-ink); box-shadow: 0 0 0 2px var(--a-ink) inset; }
.gstu-app .gstu-btn--danger { background: var(--a-surface); color: var(--a-ink); border: 2px solid var(--a-ink); }
.gstu-panel { min-width: 0; padding: clamp(16px, 2vw, 22px); background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-r); }
.gstu-panel--narrow { max-width: 640px; }
.is-bare .gstu-panel--narrow { margin: 0 auto; width: 100%; }
.gstu-panel--form { max-width: 820px; }
.gstu-panel__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.gstu-panel__title { font-size: 1.0625rem; font-weight: 800; }
.gstu-panel__more { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; font-weight: 600; font-size: .9rem; }
.gstu-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr)); align-items: start; }
.gstu-grid--wide > .gstu-panel--full, .gstu-grid > .gstu-panel--full { grid-column: 1 / -1; }
.gstu-stack { display: grid; gap: 20px; }

.gstu-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.25rem), 1fr)); }
.gstu-stats__link { display: grid; gap: 2px; height: 100%; padding: 16px 18px; background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-r); color: var(--a-ink) !important; text-decoration: none; }
a.gstu-stats__link:hover { border-color: var(--a-ink); }
.gstu-stats__value { font-family: var(--a-display); font-size: 1.75rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gstu-stats__label { color: var(--a-muted); font-size: .875rem; font-weight: 600; }

.gstu-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 1px 10px; border: 1px solid var(--a-line); border-radius: 999px; background: var(--a-tint); color: var(--a-ink); font-size: .8125rem; font-weight: 700; line-height: 1.4; white-space: nowrap; vertical-align: middle; }
.gstu-chip--marked, .gstu-chip--information { background: var(--a-surface); border-color: var(--a-ink); }
.gstu-chip--attention, .gstu-chip--assignment, .gstu-chip--overdue { background: var(--a-brand); border-color: var(--a-brand); color: var(--a-on-brand); }
.gstu-chip--late { background: var(--a-ink); border-color: var(--a-ink); color: var(--a-surface); }

.gstu-filter { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gstu-filter__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--a-line); border-radius: 999px; background: var(--a-surface); color: var(--a-ink) !important; font-weight: 600; text-decoration: none; }
.gstu-filter__link.is-current { background: var(--a-brand); border-color: var(--a-brand); color: var(--a-on-brand) !important; }

/* Lists: messages, work, people. */
.gstu-inbox, .gstu-work-list, .gstu-people, .gstu-day-list, .gstu-class-cards { list-style: none; margin: 0; padding: 0; }
.gstu-inbox, .gstu-work-list, .gstu-people { display: grid; gap: 8px; }
.gstu-inbox__link { position: relative; display: grid; gap: 4px; padding: 12px 14px 12px 16px; border: 1px solid var(--a-line); border-radius: var(--a-r-sm); background: var(--a-surface); color: var(--a-ink) !important; text-decoration: none; }
.gstu-inbox__link:hover { border-color: var(--a-ink); }
.gstu-inbox__item.is-unread .gstu-inbox__link { border-left: 5px solid var(--a-brand); padding-left: 12px; }
.gstu-inbox__item.is-unread .gstu-inbox__title { font-weight: 800; }
.gstu-inbox__top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .8125rem; color: var(--a-muted); }
.gstu-inbox__new { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; background: var(--a-brand); color: var(--a-on-brand); font-weight: 800; font-size: .75rem; }
.gstu-inbox__title { font-weight: 700; font-size: 1rem; overflow-wrap: anywhere; }
.gstu-inbox__text { color: var(--a-muted); font-size: .9rem; }
.gstu-inbox__from { color: var(--a-muted); font-size: .8125rem; }
.gstu-inbox__from strong { color: var(--a-ink); }
.gstu-inbox__date { margin-left: auto; }
.gstu-inbox--full .gstu-inbox__link { padding-top: 14px; padding-bottom: 14px; }

.gstu-work-list__link, .gstu-people__link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; min-height: 56px; padding: 10px 14px; border: 1px solid var(--a-line); border-radius: var(--a-r-sm); background: var(--a-surface); color: var(--a-ink) !important; text-decoration: none; }
a.gstu-work-list__link:hover, a.gstu-people__link:hover { border-color: var(--a-ink); }
.gstu-work-list__title, .gstu-people__name { grid-column: 1; font-weight: 700; overflow-wrap: anywhere; }
.gstu-work-list__meta, .gstu-people__meta { grid-column: 1; color: var(--a-muted); font-size: .875rem; }
.gstu-work-list__meta:empty, .gstu-people__meta:empty { display: none; }
.gstu-work-list__side, .gstu-people__chips { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.gstu-class-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.gstu-class-card__link { display: grid; gap: 6px; height: 100%; padding: 18px; border: 1px solid var(--a-line); border-radius: var(--a-r); background: var(--a-surface); color: var(--a-ink) !important; text-decoration: none; }
.gstu-class-card__link:hover { border-color: var(--a-ink); }
.gstu-class-card__code { font-family: var(--a-display); font-size: 1.5rem; font-weight: 800; letter-spacing: .03em; }
.gstu-class-card__name { font-weight: 700; }
.gstu-class-card__meta { color: var(--a-muted); font-size: .875rem; }
.gstu-class-card__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.gstu-day-list { display: grid; gap: 8px; }
.gstu-day-list__item { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; padding: 10px 14px; border: 1px solid var(--a-line); border-radius: var(--a-r-sm); }
.gstu-day-list__item.is-requested { border-style: dashed; }
.gstu-day-list__time { grid-row: 1 / span 2; font-weight: 800; font-variant-numeric: tabular-nums; }
.gstu-day-list__what { font-weight: 700; }
.gstu-day-list__meta { grid-column: 2; color: var(--a-muted); font-size: .875rem; }
.gstu-day-list__item .gstu-chip { grid-column: 3; grid-row: 1 / span 2; }

/* A message or an assignment. */
.gstu-app .gstu-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--a-muted); font-size: .875rem; margin-bottom: 14px; }
.gstu-prose { max-width: 70ch; display: grid; gap: .9em; overflow-wrap: anywhere; }
.gstu-prose > * { margin: 0; }
.gstu-prose ul, .gstu-prose ol { padding-left: 1.4em; }
.gstu-app .gstu-due { margin-top: 14px; }
.gstu-attachments { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.gstu-attach { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 6px 14px; border: 1px solid var(--a-line); border-radius: var(--a-btn-r); background: var(--a-surface); color: var(--a-ink) !important; font-weight: 700; text-decoration: none; }
.gstu-attach:hover { border-color: var(--a-ink); }
.gstu-attach__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gstu-attach__size { color: var(--a-muted); font-weight: 500; font-size: .8125rem; white-space: nowrap; }
.gstu-message .gstu-actions, .gstu-assignment .gstu-actions { margin-top: 16px; }
.gstu-answer { padding: 14px 16px; border-radius: var(--a-r-sm); background: var(--a-bg); border: 1px solid var(--a-line); white-space: normal; overflow-wrap: anywhere; }
.gstu-app .gstu-mark { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.gstu-mark__label, .gstu-feedback__label { color: var(--a-muted); font-weight: 700; font-size: .875rem; }
.gstu-mark__value { font-family: var(--a-display); font-size: 1.5rem; }
.gstu-feedback { display: grid; gap: .6em; }
.gstu-feedback p { margin: 0; }
.gstu-panel--feedback { border: 2px solid var(--a-ink); }

.gstu-app .gstu-facts { display: grid; gap: 8px; margin: 0; }
.gstu-app .gstu-facts__row { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: 12px; }
.gstu-app .gstu-facts dt { color: var(--a-muted); font-weight: 600; }
.gstu-app .gstu-facts dd { margin: 0; overflow-wrap: anywhere; }
.gstu-app .gstu-facts--inline { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 16px; }
.gstu-app .gstu-facts--inline .gstu-facts__row { display: grid; grid-template-columns: none; gap: 0; }
.gstu-app .gstu-facts--inline dt { font-size: .8125rem; }
.gstu-app .gstu-facts--inline dd { font-weight: 700; }

.gstu-app .gstu-note { margin: 0; padding: 12px 16px; border: 1px solid var(--a-line); border-left: 5px solid var(--a-brand); border-radius: var(--a-r-sm); background: var(--a-surface); color: var(--a-ink); }
.gstu-app .gstu-note.is-error { border-left-color: var(--a-ink); border-width: 2px 2px 2px 6px; border-color: var(--a-ink); }
.gstu-app .gstu-empty { color: var(--a-muted); }
.gstu-app .gstu-hint { color: var(--a-muted); font-size: .875rem; margin-top: 10px; }
.gstu-app .gstu-hint .gstu-chip { margin-left: 6px; }

/* Forms. */
.gstu-app .gstu-form { display: grid; gap: 18px; max-width: none; }
.gstu-app .gstu-form__row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.gstu-app .gstu-field { display: grid; gap: 6px; margin: 0; }
.gstu-app .gstu-field__label, .gstu-app .gstu-fieldset__legend { font-weight: 700; font-size: .9375rem; color: var(--a-ink); }
.gstu-app .gstu-field__optional { color: var(--a-muted); font-weight: 500; }
.gstu-app .gstu-field__help { color: var(--a-muted); font-size: .875rem; margin-top: -10px; }
.gstu-app .gstu-input, .gstu-app .gstu-select, .gstu-app .gstu-textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--a-field); border-radius: var(--a-r-sm); background: var(--a-surface); color: var(--a-ink); font: inherit; }
.gstu-app .gstu-textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.gstu-app .gstu-input::placeholder, .gstu-app .gstu-textarea::placeholder { color: var(--a-muted); opacity: 1; }
.gstu-app .gstu-input:focus, .gstu-app .gstu-textarea:focus { border-color: var(--a-ink); outline: 2px solid var(--a-ink); outline-offset: 0; }
.gstu-app .gstu-input--file { padding: 8px; }
.gstu-app .gstu-input[type="date"], .gstu-app .gstu-input[type="time"] { color-scheme: light dark; }
.gstu-app .gstu-input[readonly] { background: var(--a-bg); }
.gstu-app .gstu-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 10px; }
.gstu-app .gstu-fieldset__legend { padding: 0; margin-bottom: 8px; }
.gstu-app .gstu-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.gstu-app .gstu-choices--cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.gstu-app .gstu-choice { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--a-field); border-radius: var(--a-r-sm); background: var(--a-surface); color: var(--a-ink); cursor: pointer; font-weight: 600; }
.gstu-app .gstu-choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--a-brand); }
.gstu-app .gstu-choice:has(input:checked) { border: 2px solid var(--a-ink); padding: 7px 13px; }
.gstu-app .gstu-choice--card { align-items: flex-start; }
.gstu-app .gstu-choice__label { flex: 1; font-weight: 700; }
.gstu-app .gstu-choice__meta { flex-basis: 100%; padding-left: 30px; color: var(--a-muted); font-size: .8125rem; font-weight: 500; }
.gstu-app .gstu-check label { display: inline-flex; align-items: flex-start; gap: 10px; min-height: 44px; padding-top: 10px; cursor: pointer; }
.gstu-app .gstu-check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--a-brand); }
.gstu-app .gstu-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gstu-app-form--inline { display: block !important; }
.gstu-app-form--inline .gstu-hint { margin: 0 0 10px; }
.gstu-search { display: flex; gap: 8px; margin-bottom: 14px; }
.gstu-search .gstu-input { max-width: 22rem; }

/* The reused student area pieces inside a portal card. */
.gstu-app .gstu-area { display: block; }
.gstu-app .gstu-area-lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.gstu-app .gstu-area-lesson { display: grid; grid-template-columns: 3.75rem minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid var(--a-line); border-radius: var(--a-r-sm); }
.gstu-app .gstu-area-lesson.is-waiting, .gstu-app .gstu-area-lesson.is-requested { border-style: dashed; }
.gstu-app .gstu-area-lesson__date time { display: grid; justify-items: center; padding: 6px 2px; border-radius: var(--a-r-sm); background: var(--a-tint); color: var(--a-ink); line-height: 1.1; }
.gstu-app .gstu-area-lesson__num { font-size: 1.4em; font-weight: 800; }
.gstu-app .gstu-area-lesson__day, .gstu-app .gstu-area-lesson__month { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.gstu-app .gstu-area-lesson__body { display: grid; gap: 2px; min-width: 0; }
.gstu-app .gstu-area-lesson__time { font-weight: 800; }
.gstu-app .gstu-area-lesson__status { display: inline-flex; margin-left: 6px; padding: 0 8px; border: 1px solid currentColor; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.gstu-app .gstu-area-lesson__meta { color: var(--a-muted); font-size: .875rem; }
.gstu-app .gstu-area-lesson__join { margin-top: 8px; }
.gstu-app .gstu-area-classes { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.gstu-app .gstu-area-class { display: grid; gap: 8px; }
.gstu-app .gstu-area-class__label { display: block; color: var(--a-muted); font-size: .8125rem; font-weight: 600; }
.gstu-app .gstu-area-class__code .gstu-code { font-family: var(--a-display); font-size: 1.6rem; font-weight: 800; letter-spacing: .03em; }
.gstu-app .gstu-area-class__name, .gstu-app .gstu-area-class__mates-title { font-weight: 700; }
.gstu-app .gstu-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gstu-app .gstu-tags__item { padding: 2px 10px; border: 1px solid var(--a-line); border-radius: 999px; font-size: .875rem; }
.gstu-app .gstu-change { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--a-line); }
.gstu-app .gstu-change__summary { display: flex; align-items: center; min-height: 44px; font-weight: 700; cursor: pointer; }
.gstu-app .gstu-change[open] .gstu-form { margin-top: 12px; }
.gstu-app .gstu-area-profile { margin-bottom: 14px; }
.gstu-app .gstu-area-signin, .gstu-app .gstu-activate { display: grid; gap: 16px; }
.gstu-app .gstu-area-signin__lead { font-size: 1.0625rem; }

/* Groups and their subjects, subject requests (0.4.0). */
.gstu-stack--narrow { max-width: 46rem; }
.gstu-filter--subjects { margin-top: 10px; }
.gstu-subject-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gstu-chip--mine { background: var(--a-brand); border-color: var(--a-brand); color: var(--a-on-brand); }
.gstu-chip--needs { background: var(--a-surface); border-style: dashed; border-color: var(--a-ink); }
.gstu-chip--mine.gstu-chip--needs { border-style: dashed; border-color: var(--a-on-brand); }
.gstu-chip__note { margin-left: 4px; font-weight: 600; }
.gstu-chip--request-approved { background: var(--a-surface); border-color: var(--a-ink); }
.gstu-chip--request-declined { background: var(--a-ink); border-color: var(--a-ink); color: var(--a-surface); }
.gstu-subject-list, .gstu-app .gstu-area-subjects, .gstu-app .gstu-requests { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gstu-subject-list__item { display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; min-height: 52px; padding: 10px 14px; border: 1px solid var(--a-line); border-radius: var(--a-r-sm); background: var(--a-surface); }
.gstu-subject-list__item.is-mine { border: 2px solid var(--a-ink); padding: 9px 13px; }
.gstu-subject-list__name { font-weight: 700; }
.gstu-subject-list__meta { color: var(--a-muted); font-size: .875rem; }
.gstu-subject-list__meta strong { color: var(--a-ink); }
.gstu-app .gstu-area-class__subjects-title { font-weight: 700; }
.gstu-app .gstu-area-subjects__item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 10px 14px; border: 1px solid var(--a-line); border-radius: var(--a-r-sm); background: var(--a-surface); }
.gstu-app .gstu-area-subjects__name { font-weight: 700; }
.gstu-app .gstu-area-subjects__tutors { color: var(--a-muted); }
.gstu-app .gstu-area__subheading { margin: 22px 0 10px; font-family: var(--a-display); font-size: 1.0625rem; line-height: 1.3; }
.gstu-app .gstu-requests__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--a-line); border-radius: var(--a-r-sm); background: var(--a-surface); }
.gstu-app .gstu-requests__subject { font-weight: 700; }
.gstu-app .gstu-requests__item .gstu-chip { grid-column: 2; grid-row: 1 / span 2; }
.gstu-app .gstu-requests__meta { grid-column: 1; color: var(--a-muted); font-size: .875rem; overflow-wrap: anywhere; }
.gstu-app .gstu-request-form { margin-top: 4px; }
.gstu-request-actions { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--a-line); }
@media (max-width: 820px) {
	.gstu-subject-list__item { grid-template-columns: minmax(0, 1fr); }
	.gstu-app .gstu-requests__item { grid-template-columns: minmax(0, 1fr); }
	.gstu-app .gstu-requests__item .gstu-chip { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* Phones: the menu becomes a tab bar at the bottom. */
@media (max-width: 820px) {
	.gstu-app { --a-bar: 56px; }
	.gstu-app__shell, .is-bare .gstu-app__shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "main"; }
	.has-shell .gstu-app__shell { background: none; }
	.gstu-stats__link { padding: 12px 14px; }
	.gstu-stats__value { font-size: 1.5rem; }
	.gstu-app__bar { padding: 6px 16px; }
	.gstu-app__brand-sub, .gstu-app__name, .gstu-app__admin { display: none; }
	.gstu-app__out { padding: 0 10px; }
	.gstu-app__out span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.gstu-app__nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; top: auto; height: auto; overflow: visible; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--a-line); box-shadow: 0 -6px 18px -12px rgb(0 0 0 / .35); }
	.gstu-app__tabs { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; }
	.gstu-app__tab { flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 6px 2px; font-size: .75rem; font-weight: 700; text-align: center; }
	.gstu-app__tab-long { display: none; }
	.gstu-app__tab-short { display: inline; }
	.gstu-app__tab-label { flex: none; }
	.gstu-app__badge { position: absolute; top: 2px; left: calc(50% + 4px); min-width: 20px; height: 20px; padding: 0 5px; font-size: .6875rem; }
	.gstu-app__site { display: none; }
	.gstu-app__main { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
	.is-bare .gstu-app__main { padding-bottom: 40px; }
	.gstu-day-list__item { grid-template-columns: minmax(0, 1fr); }
	.gstu-day-list__item > * { grid-column: 1 !important; grid-row: auto !important; }
	.gstu-day-list__item .gstu-chip { justify-self: start; }
	.gstu-app .gstu-facts__row { grid-template-columns: 1fr; gap: 0; }
	.gstu-work-list__link, .gstu-people__link { grid-template-columns: minmax(0, 1fr); }
	.gstu-work-list__side, .gstu-people__chips { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: 4px; }
}
@media (max-width: 380px) {
	.gstu-app__tab { font-size: .6875rem; }
}

/* "Preview as a student" (0.4.0): the banner on every page of a preview. */
.gstu-preview { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 20px; padding: 12px 16px; border: 2px dashed var(--a-ink); border-radius: var(--a-r-sm); background: var(--a-surface); color: var(--a-ink); }
.gstu-preview__text { margin: 0; }
.gstu-preview__time { color: var(--a-muted); }
