/* Workspace foundations, page layout and shared surfaces.
 * Colors: workspace_theme.css. Actions and forms: workspace_controls.css. */
.workspace {
  --radius: .625rem;
  --card-radius: .875rem;
  --card-shadow: 0 1px 3px rgb(0 0 0 / 4%);
  --content-width: 75rem;
  --panel-shadow: -1.5rem 0 4rem rgb(0 0 0 / 12%), -.25rem 0 1rem rgb(0 0 0 / 6%);
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

.workspace *, .workspace *::before, .workspace *::after { box-sizing: border-box; }
.workspace [hidden] { display: none !important; }
.workspace .workspace-shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.workspace .workspace-column { flex: 1 1 auto; min-width: 0; }
.workspace main { width: min(var(--content-width), 100%); margin: auto; padding: 2rem 2.125rem 4rem; }
.workspace h1, .workspace h2, .workspace h3 { color: var(--ink); font-weight: 700; line-height: 1.4; letter-spacing: -.025em; }
.workspace h1 { margin: 0 0 1rem; font-size: 1.75rem; }
.workspace h2, .workspace h3 { font-size: 1.125rem; }
.workspace h2 { margin-block: 2rem 1rem; }
.workspace p { margin-block: 0 1rem; }
.workspace a { color: var(--action); text-decoration: underline; text-underline-offset: .2em; }
.workspace a:hover { color: var(--action-hover); text-decoration-thickness: 2px; }
/* A 2px focus ring. The 2px gap keeps it clear of buttons, whose school colors
 * can be too close to --focus to show a touching ring. Fields, which are white,
 * draw it on their border instead (workspace_controls.css). */
.workspace :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.workspace :focus { scroll-margin-block: 1rem; }
/* A success notice is pinned to the bottom of the window, so it shows however
 * far the page is scrolled, as after a side panel save. It stays until
 * dismissed or the next page replaces it, so only one shows at a time. Screen
 * readers hear it through #announcements. The page keeps room above it so
 * keyboard focus is not hidden behind it (WCAG 2.4.11). */
.workspace .flash-notice { position: fixed; right: 1rem; bottom: 1rem; z-index: 6; display: flex; align-items: center; gap: .5rem; max-width: min(28rem, calc(100% - 2rem)); padding: .375rem .375rem .375rem 1rem; border: 1px solid var(--success-line); border-left-width: 4px; border-radius: var(--radius); background: var(--success-surface); box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / 12%); animation: flash-notice-in .2s ease-out; }
.workspace .flash-notice p { margin: 0; }
.workspace .flash-notice button { flex: none; width: max(2.75em, 44px); padding: .625rem; border: 0; color: var(--ink); background: transparent; }
.workspace .flash-notice button:hover { color: var(--ink); background: color-mix(in srgb, currentColor 10%, transparent); }
.workspace .flash-notice .icon { width: 1.25rem; height: 1.25rem; }
:root:has(.workspace .flash-notice:not([hidden])) { scroll-padding-bottom: 5.5rem; }
@keyframes flash-notice-in { from { opacity: 0; translate: 0 .5rem; } }
@media (prefers-reduced-motion: reduce) { .workspace .flash-notice { animation: none; } }
.workspace .skip-link { position: absolute; top: .5rem; left: .5rem; max-width: calc(100% - 1rem); padding: .75rem; color: var(--ink); background: var(--surface); transform: translateY(calc(-100% - 1rem)); z-index: 20; }
.workspace .skip-link:focus { transform: none; }
.workspace .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* A page's title and description with its main actions to the right. The
 * actions follow the heading in the source and wrap below it when space runs out. */
.workspace .page-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0 2rem; }
.workspace .page-header-text { flex: 1 1 20rem; min-width: 0; }
.workspace .page-header .actions { margin-block: 0 1rem; }
/* Input groups share the card surface on pages and in side panels. Forms
 * already inside a card keep that surface without adding another card. */
.workspace .card, .workspace .form-body:not(:where(.card *)) { padding: 1.5rem; margin-block: 1rem; border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--surface); box-shadow: var(--card-shadow); }
.workspace .card > :first-child, .workspace .form-body:not(:where(.card *)) > :first-child { margin-top: 0; }
.workspace .card > :last-child, .workspace .card > form:last-child > .actions:last-child, .workspace .form-body:not(:where(.card *)) > :last-child { margin-bottom: 0; }
.workspace code { overflow-wrap: anywhere; white-space: normal; }
.workspace dt { margin-top: .75rem; font-weight: 700; }
.workspace dd { margin-left: 0; }

/* Record history stays readable in edit panels and at enlarged text sizes. */
.workspace .history-entries { margin: 0; padding: 0; list-style: none; }
.workspace .history-entries > li { padding-block: 1rem; border-top: 1px solid var(--line); }
.workspace .history-entries p, .workspace .history-entries dl { margin: 0; }
.workspace .history-entries time, .workspace .history-value { display: block; }

@media (max-width: 35rem) {
  .workspace main { padding: 1.5rem 1rem 3rem; }
  .workspace .card, .workspace .form-body:not(:where(.card *)) { padding: 1rem; }
}

@media print {
  .workspace { color: #000; background: #fff; }
  .workspace .skip-link, .workspace .flash-notice { display: none; }
  .workspace main { width: 100%; padding: 0; }
}
