/* src/client/styles/tokens.css */
:root {
  color-scheme: light;
  --gold-50: #fdf8ef;
  --gold-100: #faefd9;
  --gold-200: #f4dcb0;
  --gold-300: #ecc27e;
  --gold-400: #e2a64c;
  --gold-500: #cf8a2e;
  --gold-600: #a65f17;
  --gold-700: #8a4e13;
  --gold-800: #6e3f13;
  --gold-900: #553112;
  --blue-50: #f0f6fc;
  --blue-100: #dceaf7;
  --blue-200: #b9d4ee;
  --blue-300: #8db7e0;
  --blue-500: #3a78b8;
  --blue-600: #245a92;
  --blue-700: #1f4a78;
  --blue-800: #1b3c61;
  --blue-900: #15304d;
  --sand-0: #ffffff;
  --sand-50: #fbf8f4;
  --sand-100: #f5f0e8;
  --sand-200: #e9e1d5;
  --sand-300: #d8cdbd;
  --sand-500: #8f8577;
  --sand-600: #6b6258;
  --sand-800: #3d3730;
  --sand-900: #2a2520;
  --green-50: #eef7f1;
  --green-200: #b7dcc3;
  --green-700: #2e6b45;
  --red-50: #fcefee;
  --red-200: #efb8b3;
  --red-700: #a3261d;
  --color-bg: var(--sand-50);
  --color-surface: var(--sand-0);
  --color-surface-muted: var(--sand-100);
  --color-surface-accent: var(--gold-50);
  --color-border: var(--sand-200);
  --color-border-strong: var(--sand-300);
  --color-text: var(--sand-900);
  --color-text-muted: var(--sand-600);
  --color-heading: var(--blue-900);
  --color-link: var(--blue-600);
  --color-link-hover: var(--blue-800);
  --color-focus: var(--blue-500);
  --color-selected: var(--blue-50);
  --color-primary: var(--gold-600);
  --color-primary-hover: var(--gold-700);
  --color-primary-text: var(--sand-0);
  --color-secondary-bg: var(--sand-0);
  --color-secondary-hover-bg: var(--blue-50);
  --color-secondary-border: var(--blue-300);
  --color-secondary-text: var(--blue-700);
  --color-danger: var(--red-700);
  --color-header-bg: var(--blue-800);
  --color-header-text: var(--sand-0);
  --color-header-muted: var(--blue-200);
  --color-header-hover: rgb(255 255 255 / 0.1);
  --color-header-accent: var(--gold-300);
  --color-footer-bg: var(--color-header-bg);
  --color-footer-text: var(--color-header-muted);
  --color-footer-link: var(--color-header-text);
  --color-footer-link-hover: var(--color-header-accent);
  --color-nav-text: var(--sand-800);
  --color-nav-hover-bg: var(--sand-100);
  --color-nav-active-bg: var(--gold-100);
  --color-nav-active-text: var(--gold-800);
  --color-nav-active-bar: var(--gold-500);
  --color-success-bg: var(--green-50);
  --color-success-border: var(--green-200);
  --color-success-text: var(--green-700);
  --color-warning-bg: var(--gold-100);
  --color-warning-border: var(--gold-300);
  --color-warning-text: var(--gold-800);
  --color-danger-bg: var(--red-50);
  --color-danger-border: var(--red-200);
  --color-danger-text: var(--red-700);
  --color-info-bg: var(--blue-50);
  --color-info-border: var(--blue-200);
  --color-info-text: var(--blue-800);
  --color-neutral-bg: var(--sand-100);
  --color-neutral-border: var(--sand-300);
  --color-neutral-text: var(--sand-600);
  --color-welcome-bg: var(--gold-100);
  --color-welcome-heading: var(--blue-900);
  --color-welcome-text: var(--sand-800);
  --color-welcome-rule: var(--gold-500);
  --color-welcome-card: rgb(251 248 244 / 0.95);
  --color-welcome-card-border: rgb(255 255 255 / 0.7);
  --color-welcome-glow: rgb(255 250 240 / 0.85);
  --color-welcome-fade: var(--sand-50);
  --shadow-welcome: 0 12px 40px rgb(21 48 77 / 0.22);
  --color-shift-am: var(--gold-400);
  --color-shift-mid: var(--blue-300);
  --color-shift-pm: var(--blue-800);
  --color-shift-empty: transparent;
  --color-icon-gold-bg: var(--gold-100);
  --color-icon-gold-fg: var(--gold-700);
  --color-icon-blue-bg: var(--blue-100);
  --color-icon-blue-fg: var(--blue-700);
  --font-sans:
    "Segoe UI",
    system-ui,
    -apple-system,
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  --font-serif:
    Georgia,
    Cambria,
    "Times New Roman",
    serif;
  --font-mono:
    ui-monospace,
    Consolas,
    "Cascadia Mono",
    monospace;
  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.125rem;
  --leading: 1.5;
  --leading-tight: 1.2;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --gap-tight: var(--space-2);
  --gap-block: var(--space-4);
  --gap-section: var(--space-4);
  --pad-panel: var(--space-5);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --border-width: 1px;
  --shadow-sm: 0 1px 2px rgb(42 37 32 / 0.06);
  --shadow: 0 2px 8px rgb(42 37 32 / 0.08);
  --header-height: 64px;
  --sidebar-width: 264px;
  --content-max: 1280px;
  --control-height: 44px;
  --icon-size: 20px;
  --focus-ring: 0 0 0 3px var(--sand-0), 0 0 0 5px var(--color-focus);
}

/* src/client/styles/base.css */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading);
  background: var(--color-bg);
  color: var(--color-text);
}
h1,
h2,
h3,
h4 {
  color: var(--color-heading);
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
}
h1 {
  font-size: var(--text-3xl);
}
h2 {
  font-size: var(--text-xl);
}
h3 {
  font-size: var(--text-lg);
}
h4 {
  font-size: var(--text-base);
}
:where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, pre, hr) {
  margin-block: 0;
}
a {
  color: var(--color-link);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--color-link-hover);
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}
code,
pre,
kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
summary {
  cursor: pointer;
}
hr {
  border: 0;
  border-top: var(--border-width) solid var(--color-border);
  width: 100%;
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
svg.icon {
  width: var(--icon-size);
  height: var(--icon-size);
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

/* src/client/styles/layout.css */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 10;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  top: var(--space-2);
}
.app-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--header-height);
  padding: var(--space-2) var(--space-5);
  background: var(--color-header-bg);
  color: var(--color-header-text);
  border-bottom: 3px solid var(--color-header-accent);
}
.app-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: inherit;
  text-decoration: none;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.app-brand:hover {
  color: inherit;
}
.app-brand svg.icon {
  --icon-size: 30px;
  color: var(--color-header-accent);
  stroke-width: 1.75;
}
.app-switcher {
  position: relative;
}
.app-header button.app-brand {
  min-height: 0;
  color: var(--color-header-text);
  box-shadow: none;
  padding: var(--space-1) var(--space-2);
  margin-left: calc(-1 * var(--space-2));
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  font-family: inherit;
  cursor: pointer;
}
.app-header button.app-brand:hover,
.app-header button.app-brand[aria-expanded=true] {
  color: var(--color-header-text);
  background: var(--color-header-hover);
}
.app-brand svg.switcher-chevron {
  --icon-size: 20px;
  color: var(--color-header-text);
}
.switcher-menu {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  z-index: 20;
  min-width: 14rem;
  margin: 0;
  padding: var(--space-2);
  list-style: none;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.switcher-menu a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
}
.switcher-menu a:hover {
  background: var(--color-nav-hover-bg);
}
.switcher-menu-end {
  left: auto;
  right: 0;
}
.switcher-menu button {
  width: 100%;
  min-height: 0;
  justify-content: flex-start;
  padding: var(--space-2) var(--space-3);
  border: 0;
  background: transparent;
  color: var(--color-text);
  text-align: left;
}
.switcher-menu button:hover:not(:disabled) {
  background: var(--color-nav-hover-bg);
}
.switcher-menu .fine-print {
  margin: 0;
  padding: 0 var(--space-3) var(--space-1);
}
.switcher-menu a[aria-current=page] {
  font-weight: var(--weight-semibold);
  color: var(--color-nav-active-text);
}
.app-header-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.app-user {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--weight-medium);
}
.app-header .chip {
  background: transparent;
  border-color: var(--color-header-muted);
  color: var(--color-header-muted);
}
.header-status {
  text-decoration: none;
}
.header-status:hover .badge {
  filter: brightness(0.97);
}
.header-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: var(--space-1) var(--space-3);
  border: var(--border-width) solid var(--color-header-muted);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-header-text);
  font: inherit;
  cursor: pointer;
}
.header-button:hover,
.header-button:hover:not(:disabled),
.header-button[aria-expanded=true] {
  background: var(--color-header-hover);
  color: var(--color-header-text);
}
.sign-out-group {
  position: relative;
  display: flex;
}
.sign-out-group > .header-button:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.sign-out-group > .header-button-more {
  padding: var(--space-1) var(--space-2);
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.app-body {
  flex: 1;
  display: flex;
  min-height: 0;
}
.app-sidebar {
  flex: none;
  width: var(--sidebar-width);
  padding: var(--space-4) var(--space-3);
  background: var(--color-surface);
  border-right: var(--border-width) solid var(--color-border);
}
.side-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
}
.side-nav-select {
  display: none;
}
.side-nav-divider {
  margin: var(--space-3) var(--space-3);
  border-top: var(--border-width) solid var(--color-border);
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--control-height);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  border-left: 4px solid transparent;
  color: var(--color-nav-text);
  font-size: var(--text-lg);
  text-decoration: none;
}
.side-nav a:hover {
  background: var(--color-nav-hover-bg);
  color: var(--color-nav-text);
}
.nav-count {
  margin-left: auto;
  min-width: 1.6em;
  padding: 0 var(--space-2);
  border-radius: 999px;
  background: var(--color-surface-accent);
  font-size: var(--text-sm);
  text-align: center;
}
.side-nav a[aria-current=page] {
  background: var(--color-nav-active-bg);
  border-left-color: var(--color-nav-active-bar);
  color: var(--color-nav-active-text);
  font-weight: var(--weight-semibold);
}
.app-main {
  flex: 1;
  min-width: 0;
  padding: var(--space-6) var(--space-6) var(--space-8);
}
.page {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  align-content: start;
  gap: var(--gap-section);
}
.page > * {
  min-width: 0;
}
:where(:is(.stack, .panel, .subpanel, .wait-panel, .group-card, .field-list, section:not(.page), form, fieldset, .page-header > div, .step-details):not(details)) {
  display: grid;
  align-content: start;
  gap: var(--gap-block);
  & > * {
    min-width: 0;
  }
  & > :where(button, .button, a, input, select, label.inline, span, strong, em, small, img, progress, .badge, .chip) {
    justify-self: start;
  }
  & > :where(h1, h2, h3, h4, .section-head) + *,
  & > * + :where(.fine-print, .field-hint, .lede) {
    margin-top: calc(var(--gap-tight) - var(--gap-block));
  }
}
:where(details) > * + * {
  margin-top: var(--gap-block);
}
:where(details) > :where(summary) + *,
:where(details) > * + :where(.fine-print, .field-hint, .lede) {
  margin-top: var(--gap-tight);
}
:where(.page, .stack, .panel, .subpanel, .wait-panel, .group-card, .field-list, section, form, fieldset, details) > :where(p, div, span, ul, ol, dl, h2, h3, h4, section):empty:not([aria-live], [role]) {
  display: none;
}
:where(.alert, td, th, li, .tool-card, .step-body, .task-text) > :where(p, ul, ol, dl) + :where(p, ul, ol, dl) {
  margin-top: var(--gap-tight);
}
.page-narrow {
  max-width: 760px;
}
.focus-page {
  max-width: 680px;
  margin: var(--space-6) auto 0;
}
.welcome {
  overflow-x: clip;
  background: var(--color-welcome-bg) none center 60% / cover no-repeat;
  --welcome-band-fade:
    linear-gradient(
      to bottom,
      transparent 0,
      transparent 200px,
      var(--color-welcome-fade) 380px);
}
.welcome .app-main {
  display: flex;
  align-items: center;
}
.welcome-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 34rem);
  align-items: center;
  gap: var(--space-7);
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}
.welcome-hero {
  position: relative;
  isolation: isolate;
  justify-self: center;
  padding: var(--space-5);
}
.welcome-hero::before {
  content: "";
  position: absolute;
  inset: -10% -15%;
  z-index: -1;
  background:
    radial-gradient(
      closest-side,
      var(--color-welcome-glow),
      transparent);
}
.welcome-title {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  color: var(--color-welcome-heading);
}
.welcome-title span {
  display: block;
  margin-top: var(--space-2);
  font-size: 0.58em;
  font-style: italic;
  font-weight: var(--weight-normal);
}
.welcome-lede {
  max-width: 24rem;
  margin: var(--space-4) 0 0;
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--color-welcome-text);
}
.welcome-lede::before {
  content: "";
  display: block;
  width: 7.5rem;
  height: 2px;
  margin-bottom: var(--space-4);
  background: var(--color-welcome-rule);
}
.welcome-layout > .page {
  gap: var(--gap-section);
}
.welcome .focus-page {
  max-width: none;
  margin: 0;
}
.welcome .panel {
  padding: var(--space-6);
  background: var(--color-welcome-card);
  border-color: var(--color-welcome-card-border);
  box-shadow: var(--shadow-welcome);
}
.welcome .panel h2 {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
}
.welcome .panel > div > * {
  margin: 0;
}
.welcome .panel > p:empty,
.welcome .panel > .actions:not(:has(> :not([hidden]))) {
  display: none;
}
.welcome .panel > div:not(.actions) > * + * {
  margin-top: var(--gap-tight);
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-2) var(--space-5);
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  font-size: var(--text-xs);
}
.site-footer a {
  color: var(--color-footer-link);
}
.site-footer a:hover {
  color: var(--color-footer-link-hover);
}
.legal-page {
  max-width: 48rem;
}
.legal-page li + li {
  margin-top: var(--gap-tight);
}
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--gap-block) var(--space-5);
}
.page-header .lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}
.page-header-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  border-bottom: var(--border-width) solid var(--color-border-strong);
}
.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  padding: var(--space-2) var(--space-3);
  margin-bottom: -1px;
  border-bottom: 3px solid transparent;
  color: var(--color-nav-text);
  font-size: var(--text-lg);
  text-decoration: none;
}
.tabs a:hover {
  color: var(--color-link);
  border-bottom-color: var(--color-border-strong);
}
.tabs a[aria-current=page] {
  color: var(--color-nav-active-text);
  border-bottom-color: var(--color-nav-active-bar);
  font-weight: var(--weight-semibold);
}
@media (max-width: 900px) {
  .welcome {
    background-color: var(--color-welcome-fade);
    background-image: var(--welcome-band-fade);
    background-size: 100% 100%, max(100%, 680px) auto;
    background-position: 0 0, 30% 0;
    background-repeat: no-repeat;
  }
  .welcome .app-main {
    align-items: flex-start;
  }
  .welcome-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }
  .welcome-hero {
    justify-self: start;
    padding: var(--space-3) var(--space-2) var(--space-5);
  }
  .welcome-title {
    font-size: 2.75rem;
  }
  .welcome-lede {
    font-size: var(--text-base);
  }
  .welcome .panel {
    padding: var(--space-5);
  }
  .welcome .panel .actions > button {
    flex: 1 1 auto;
  }
}
@media (max-width: 900px) {
  .app-header {
    padding: var(--space-2) var(--space-4);
    gap: var(--space-2);
  }
  .app-brand {
    font-size: var(--text-lg);
  }
  .app-body {
    flex-direction: column;
  }
  .app-sidebar {
    width: auto;
    padding: var(--space-2) var(--space-4);
    border-right: 0;
    border-bottom: var(--border-width) solid var(--color-border);
  }
  .side-nav {
    display: flex;
    flex-wrap: wrap;
  }
  .side-nav a {
    min-height: 40px;
    font-size: var(--text-base);
    border-left: 0;
    border-bottom: 3px solid transparent;
    border-radius: var(--radius-sm);
  }
  .side-nav a[aria-current=page] {
    border-bottom-color: var(--color-nav-active-bar);
  }
  .side-nav-divider {
    display: none;
  }
  .app-sidebar.nav-compact .side-nav {
    display: none;
  }
  .app-sidebar.nav-compact .side-nav-select {
    display: block;
  }
  .side-nav-select select {
    width: 100%;
    font-weight: var(--weight-semibold);
  }
  .focus-page {
    margin-top: 0;
  }
  .app-main {
    padding: var(--space-5) var(--space-4) var(--space-7);
  }
  h1 {
    font-size: var(--text-2xl);
  }
}
@media (max-width: 560px) {
  .app-user-name,
  .header-button-label,
  .app-header .chip {
    display: none;
  }
  .app-brand {
    font-size: var(--text-base);
  }
}

/* src/client/styles/components.css */
.panel {
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--pad-panel);
}
.panel-accent {
  background: var(--color-surface-accent);
  border-color: var(--color-warning-border);
}
.subpanel {
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}
.muted {
  color: var(--color-text-muted);
}
.fine-print {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
ul.fine-print {
  padding-left: var(--space-5);
}
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-5);
}
.facts dt {
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}
.facts dd {
  margin: 0;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: var(--space-2) var(--space-4);
  border: var(--border-width) solid var(--color-secondary-border);
  border-radius: var(--radius-sm);
  background: var(--color-secondary-bg);
  color: var(--color-secondary-text);
  font: inherit;
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
button:hover:not(:disabled),
.button:hover {
  background: var(--color-secondary-hover-bg);
  color: var(--color-secondary-text);
}
button.primary,
.button.primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-primary-text);
}
button.primary:hover:not(:disabled),
.button.primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-primary-text);
}
button.danger {
  border-color: var(--color-danger-border);
  color: var(--color-danger);
}
button.danger:hover:not(:disabled) {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}
button.small,
.button.small {
  min-height: 34px;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.link-button {
  min-height: 0;
  padding: var(--space-1);
  border: none;
  background: none;
  color: var(--color-link);
  font-weight: var(--weight-normal);
  text-decoration: underline;
}
.link-button:hover:not(:disabled) {
  background: none;
  color: var(--color-link-hover);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3) var(--space-4);
}
.controls > h3 {
  flex: 1 1 100%;
  margin: 0;
}
label {
  display: grid;
  gap: var(--space-1);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  color: var(--color-heading);
}
label.wide {
  flex: 1 1 100%;
}
label.inline,
.checklist label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--weight-normal);
  font-size: var(--text-base);
  color: var(--color-text);
}
label.inline.consent {
  align-items: flex-start;
  font-size: var(--text-sm);
}
label.inline.consent input {
  flex: none;
  margin-top: 0.2em;
}
.field-hint {
  font-weight: var(--weight-normal);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
input,
select,
textarea {
  font: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
}
input:not([type=checkbox]):not([type=radio]),
select {
  min-height: var(--control-height);
  padding: var(--space-2) var(--space-3);
  min-width: 12rem;
  max-width: 100%;
}
label.wide input:not([type=checkbox]):not([type=radio]),
label.wide select,
label.wide textarea {
  width: 100%;
  max-width: 40rem;
}
textarea {
  padding: var(--space-2) var(--space-3);
}
input[type=checkbox],
input[type=radio] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-primary);
}
input:disabled,
select:disabled,
textarea:disabled {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  cursor: not-allowed;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--color-focus);
}
.checklist {
  max-height: 240px;
  overflow-y: auto;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  display: grid;
  gap: var(--space-1);
}
.table-wrap {
  overflow-x: auto;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}
table {
  width: 100%;
  border-collapse: collapse;
}
caption {
  caption-side: top;
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}
th,
td {
  text-align: left;
  padding: var(--space-3);
  border-bottom: var(--border-width) solid var(--color-border);
  vertical-align: middle;
  white-space: nowrap;
}
thead th {
  background: var(--color-surface-muted);
  color: var(--color-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
tbody th {
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}
tbody tr:last-child > * {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--color-surface-accent);
}
tbody tr.selected {
  background: var(--color-selected);
}
td.wrap,
th.wrap {
  white-space: normal;
}
table.compact th,
table.compact td {
  padding: var(--space-2);
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
th.group {
  text-align: center;
  border-left: var(--border-width) solid var(--color-border);
}
td.group-start,
th.group-start {
  border-left: var(--border-width) solid var(--color-border);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-3);
  border: var(--border-width) solid var(--color-neutral-border);
  border-radius: var(--radius-pill);
  background: var(--color-neutral-bg);
  color: var(--color-neutral-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}
.badge svg.icon {
  --icon-size: 16px;
}
.badge-success {
  background: var(--color-success-bg);
  border-color: var(--color-success-border);
  color: var(--color-success-text);
}
.badge-warning {
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border);
  color: var(--color-warning-text);
}
.text-warning {
  color: var(--color-warning-text);
}
.badge-danger {
  background: var(--color-danger-bg);
  border-color: var(--color-danger-border);
  color: var(--color-danger-text);
}
.badge-info {
  background: var(--color-info-bg);
  border-color: var(--color-info-border);
  color: var(--color-info-text);
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-3);
  border: var(--border-width) solid var(--color-neutral-border);
  border-radius: var(--radius-pill);
  background: var(--color-neutral-bg);
  color: var(--color-neutral-text);
  font-size: var(--text-sm);
}
.chip.ready {
  background: var(--color-success-bg);
  border-color: var(--color-success-border);
  color: var(--color-success-text);
}
.chip.attention {
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border);
  color: var(--color-warning-text);
}
.alert {
  display: block;
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-left-width: 5px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}
.alert strong:first-child {
  display: block;
  margin-bottom: var(--space-1);
}
.alert-info {
  background: var(--color-info-bg);
  border-color: var(--color-info-border);
  border-left-color: var(--color-info-text);
}
.alert-warn {
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border);
  border-left-color: var(--color-warning-text);
}
.alert-error {
  background: var(--color-danger-bg);
  border-color: var(--color-danger-border);
  border-left-color: var(--color-danger-text);
}
.alert-success {
  background: var(--color-success-bg);
  border-color: var(--color-success-border);
  border-left-color: var(--color-success-text);
}
.icon-circle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-icon-gold-bg);
  color: var(--color-icon-gold-fg);
}
.icon-circle.blue {
  background: var(--color-icon-blue-bg);
  color: var(--color-icon-blue-fg);
}
.icon-circle svg.icon {
  --icon-size: 24px;
}
.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.task {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--border-width) solid var(--color-border);
}
.task:last-child {
  border-bottom: 0;
}
.task-text {
  flex: 1 1 16rem;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}
.task-text .fine-print {
  font-weight: var(--weight-normal);
}
.empty-state {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border: var(--border-width) dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap-section);
}
.card-grid-wide {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.tool-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.tool-card h3 {
  margin: 0;
}
.tool-card p {
  flex: 1;
  margin: 0;
  color: var(--color-text-muted);
}
.tool-card .button {
  align-self: stretch;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--gap-section);
}
.stat {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.stat-label {
  display: block;
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}
.stat-value {
  display: block;
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-heading);
  font-variant-numeric: tabular-nums;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
}
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-section);
  align-items: start;
}
.two-col > section {
  min-width: 0;
}
@media (max-width: 1000px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}
.group-card {
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.member-list {
  list-style: none;
  padding: 0;
}
.member-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: var(--border-width) solid var(--color-border);
}
.member-list li:last-child {
  border-bottom: 0;
}
.member-name {
  flex: 1 1 10rem;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--weight-semibold);
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.step {
  position: relative;
  display: flex;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
}
.step:last-child {
  padding-bottom: 0;
}
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: 4px;
  width: 2px;
  background: var(--color-border-strong);
}
.step-marker {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-weight: var(--weight-bold);
}
.step[data-state=current] .step-marker {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-primary-text);
}
.step[data-state=done] .step-marker {
  border-color: var(--color-success-border);
  background: var(--color-success-bg);
  color: var(--color-success-text);
}
.step-body {
  flex: 1;
  min-width: 0;
  padding-top: var(--space-1);
}
.step-title {
  margin: 0 0 var(--space-1);
  font-size: var(--text-lg);
}
.step[data-state=todo] .step-title {
  color: var(--color-text-muted);
}
.step-status {
  color: var(--color-text-muted);
  margin: 0;
}
.step-details {
  margin-top: var(--space-3);
}
.step-details ol {
  padding-left: var(--space-5);
}
.step-details li {
  margin-bottom: var(--space-1);
}
.working {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}
.working::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  border: 3px solid var(--color-border-strong);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.loading {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.loading::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border: 2px solid var(--color-border-strong);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
tr.row-loading td {
  color: var(--color-text-muted);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .working::before,
  .loading::before {
    animation: none;
  }
}
@media (max-width: 600px) {
  .panel {
    padding: var(--space-4);
  }
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  input:not([type=checkbox]):not([type=radio]),
  select {
    min-width: 0;
    width: 100%;
  }
  .facts {
    grid-template-columns: 1fr;
    gap: 0 var(--space-3);
  }
  .facts dd {
    margin-bottom: var(--space-2);
  }
  .task {
    padding: var(--space-4);
  }
}
.narrow-only {
  display: none;
}
.item-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-left: var(--space-2);
  vertical-align: middle;
}
label.tick-target {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media screen and (max-width: 600px) {
  .wide-only {
    display: none;
  }
  .narrow-only {
    display: grid;
  }
  table.stack-narrow,
  table.stack-narrow > caption,
  table.stack-narrow > tbody,
  table.stack-narrow > tbody > tr,
  table.stack-narrow > tbody > tr > * {
    display: block;
  }
  table.stack-narrow > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  table.stack-narrow > tbody > tr {
    padding: var(--space-3) var(--space-4);
    border-bottom: var(--border-width) solid var(--color-border);
  }
  table.stack-narrow > tbody > tr:last-child {
    border-bottom: 0;
  }
  table.stack-narrow > tbody > tr:hover {
    background: transparent;
  }
  table.stack-narrow > tbody > tr > :nth-child(n) {
    width: auto;
    min-width: 0;
    padding: var(--space-1) 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  table.stack-narrow > tbody > tr > th,
  table.stack-narrow > tbody > tr > .cell-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--color-heading);
  }
  table.stack-narrow > tbody > tr > td[data-label]:not(.cell-title, .cell-bare)::before {
    content: attr(data-label) ": ";
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text-muted);
  }
  table.stack-narrow > tbody > tr > .cell-inline {
    display: inline-block;
    margin-right: var(--space-4);
  }
  table.stack-narrow > tbody > tr > .cell-empty {
    display: none;
  }
  table.stack-narrow button,
  table.stack-narrow input:not([type=checkbox]):not([type=radio]) {
    min-height: 44px;
  }
  table.stack-narrow li > button,
  table.stack-narrow .text-warning > button {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-top: var(--space-2);
  }
  table.stack-narrow .actions > * {
    flex: 1 1 100%;
    justify-content: center;
  }
  .item-actions {
    display: flex;
    margin: var(--space-2) 0 0;
  }
  .item-actions > button {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }
  label.tick-target {
    min-width: 44px;
    min-height: 44px;
  }
  label.tick-target input {
    width: 26px;
    height: 26px;
  }
  table.stack-narrow.needs > tbody > tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--space-3);
  }
  table.stack-narrow.needs > tbody > tr > :nth-child(n) {
    grid-column: 2;
  }
  table.stack-narrow.needs > tbody > tr > .person-cell,
  table.stack-narrow.needs > tbody > tr > [colspan] {
    order: -1;
    grid-column: 1 / -1;
  }
  table.stack-narrow.needs > tbody > tr > .tick-cell {
    grid-column: 1;
    grid-row: span 3;
    align-self: start;
  }
  .record-bar.has-ticks {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: var(--space-3) var(--space-4);
    margin: 0 calc(-1 * var(--space-4));
    background: var(--color-surface);
    border-top: var(--border-width) solid var(--color-border-strong);
    box-shadow: var(--shadow);
  }
  .record-bar button {
    min-height: 44px;
  }
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.timeline li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: var(--border-width) solid var(--color-border);
}
.timeline li:last-child {
  border-bottom: 0;
}
.timeline time {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
tbody tr.past > * {
  color: var(--color-text-muted);
}
.row-menu {
  display: flex;
  justify-content: flex-end;
}
.row-menu-toggle {
  padding: var(--space-1) var(--space-2);
}
.row-menu-toggle svg.icon {
  stroke-width: 3;
}
.row-menu-panel {
  position: fixed;
  top: var(--row-menu-top, 0);
  right: var(--row-menu-right, 0);
  z-index: 20;
  display: grid;
  gap: var(--space-3);
  width: min(20rem, calc(100vw - 2 * var(--space-4)));
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--color-text);
  text-align: left;
  white-space: normal;
}
.row-menu-panel p {
  margin: 0;
}
.row-menu-panel label {
  margin: 0;
}
.row-menu-panel button {
  justify-self: start;
}
table.shift-changes th,
table.shift-changes td {
  white-space: normal;
}
table.shift-changes td:first-child {
  width: 40%;
  min-width: 12rem;
}
table.shift-changes td:nth-child(2) {
  min-width: 10rem;
}
table.shift-changes td:nth-child(3) {
  white-space: nowrap;
}
table.shift-changes.who-first td:first-child {
  width: auto;
  min-width: 10rem;
}
table.shift-changes.who-first td:nth-child(2) {
  width: 40%;
  min-width: 12rem;
}
table.shift-changes td:last-child input[type=date] {
  width: auto;
}
table.recommendations th,
table.recommendations td {
  white-space: normal;
}
table.recommendations tbody th {
  width: 14rem;
  min-width: 10rem;
}
table.recommendations td:nth-child(3),
table.recommendations td:last-child {
  white-space: nowrap;
}
table.recommendations td:nth-child(4) {
  overflow-wrap: anywhere;
}
.class-roster td select {
  width: auto;
  min-width: 9rem;
}
@media print {
  .app-header,
  .app-sidebar,
  .skip-link,
  .tabs,
  .page-header,
  .no-print,
  #wm-saved,
  #connect-banner {
    display: none !important;
  }
  body,
  .app-main,
  .panel {
    background: var(--color-surface);
    box-shadow: none;
    border: 0;
    padding: 0;
  }
  .class-roster select,
  .class-roster input {
    border: 0;
    appearance: none;
  }
}
@media (hover: none) and (pointer: coarse) {
  .print-action {
    display: none !important;
  }
  .not-touch {
    display: none;
  }
}
.print-only {
  display: none;
}
.print-box {
  display: none;
  width: 1.1em;
  height: 1.1em;
  border: var(--border-width) solid var(--color-text);
}
@media print {
  .print-only {
    display: block;
  }
  .print-box {
    display: inline-block;
  }
  td a,
  th a {
    color: inherit;
    text-decoration: none;
  }
  th.print-only,
  td.print-only {
    display: table-cell;
  }
  @page {
    margin: 1cm 1cm 1cm 2cm;
  }
  th,
  td {
    border-bottom-color: var(--color-text-muted);
  }
  thead th {
    border-bottom-color: var(--color-text);
  }
  .print-title.print-only {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
  }
  .print-title h1 {
    margin: 0;
    font-size: 1.25rem;
  }
  .print-title span {
    font-size: 1.1rem;
    font-weight: 700;
  }
  #needs-list table {
    font-size: 0.75rem;
    line-height: var(--leading-tight);
  }
  #needs-list .table-wrap {
    overflow: visible;
  }
  #needs-list th,
  #needs-list td {
    padding: 1px var(--space-2);
    vertical-align: middle;
    white-space: normal;
  }
  #needs-list .badge {
    padding: 0;
    border: 0;
    background: none;
    font-size: inherit;
    color: var(--color-text);
  }
  #needs-list .print-box {
    width: 0.9em;
    height: 0.9em;
    vertical-align: middle;
  }
  #needs-list .fine-print {
    display: inline;
    margin-left: var(--space-1);
    font-size: inherit;
  }
  #needs-list thead {
    display: table-header-group;
  }
  #needs-list tr {
    break-inside: avoid;
  }
}
.import-cards {
  display: grid;
  gap: var(--gap-section);
}
.import-rows {
  display: grid;
  gap: var(--space-2);
}
.import-row {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.import-row.skip {
  color: var(--color-text-muted);
}
.import-row select {
  max-width: 100%;
}
.rank-list {
  display: grid;
  gap: var(--space-2);
  padding-left: var(--space-6);
}
.rank-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: grab;
}
.rank-list li.dragging {
  background: var(--color-selected);
  border-color: var(--color-focus);
}
.rank-list li.unranked {
  color: var(--color-text-muted);
}
.mail-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
.shared-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: var(--space-3);
}
.shared-position {
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.shared-position.is-over {
  border-color: var(--color-focus);
  background: var(--color-selected);
}
.shared-position-head {
  margin-bottom: var(--space-2);
}
.shared-new {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5rem;
  border-style: dashed;
  border-color: var(--color-border-strong);
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  text-align: center;
}
.shared-members {
  margin: 0;
  padding: 0;
  list-style: none;
}
.shared-member {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-top: var(--border-width) solid var(--color-border);
}
.shared-member:first-child {
  border-top: 0;
}
.shared-member.is-dragging {
  opacity: 0.5;
}
.shared-name {
  flex: 1 1 8rem;
}
.shared-handle {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1);
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  cursor: grab;
  touch-action: none;
}
.shared-ghost {
  position: fixed;
  z-index: 100;
  padding: var(--space-1) var(--space-3);
  border: var(--border-width) solid var(--color-focus);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}
.shared-member select {
  flex: 1 1 8rem;
  min-width: 0;
}
.print-roster .write-in {
  min-width: 9rem;
}
@media print {
  @page class-roster {
    size: landscape;
    margin: 1cm 1.5cm;
  }
  .print-roster-sheet {
    page: class-roster;
  }
  .print-only .print-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
  }
  .screen-only {
    display: none !important;
  }
  html,
  body,
  .app-body,
  .app-main,
  .page {
    height: auto !important;
    overflow: visible !important;
    max-width: none;
  }
  .print-roster {
    width: 100%;
    font-size: 0.8rem;
  }
  .print-roster th,
  .print-roster td {
    padding: var(--space-2);
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: bottom;
  }
  .print-roster .write-in {
    border-bottom: var(--border-width) solid var(--color-text);
  }
}

/* src/client/styles/pages.css */
.pair-code {
  font: var(--weight-semibold) var(--text-3xl) / var(--leading-tight) var(--font-mono);
  letter-spacing: 0.15em;
  color: var(--color-heading);
}
.sign-in-card {
  max-width: 560px;
}
.scope-picker summary {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-link);
}
.scope-grid {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
}
.pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pipeline li {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.change-notes {
  display: grid;
  gap: 2px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  min-width: 7rem;
  white-space: normal;
}
.preview-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#template-problems {
  flex: 1 1 100%;
  margin: 0;
}
fieldset.subpanel legend {
  padding: 0 var(--space-2);
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}
fieldset.choice-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: 0;
  border: 0;
}
fieldset.choice-row legend {
  width: 100%;
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}
.plan-review {
  border-color: var(--color-warning-border);
  background: var(--color-surface-accent);
}
#progress-area,
.progress-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
progress {
  width: 240px;
  height: 14px;
  accent-color: var(--color-primary);
}
.selection-panel {
  border-left: 5px solid var(--color-nav-active-bar);
  background: var(--color-surface-accent);
}
.used-by {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
  max-width: 34em;
}
.uses-line {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
#summary-body tr {
  cursor: pointer;
}
#summary-body tr.selected {
  background: var(--color-selected);
}
#position-filter {
  width: min(100%, 320px);
}
#trainer-table td {
  vertical-align: top;
  white-space: normal;
}
table.resizable {
  table-layout: fixed;
}
table.resizable th {
  position: relative;
  white-space: normal;
}
table.resizable td {
  overflow-wrap: anywhere;
}
.col-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  bottom: 0;
  width: 8px;
  cursor: col-resize;
  z-index: 1;
  touch-action: none;
}
.col-resizer:hover,
.col-resizer:focus-visible,
.col-resizer.active {
  background: var(--color-focus);
  opacity: 0.35;
  outline: none;
  box-shadow: none;
}
.pcy-expired,
.pcy-not-complete {
  color: var(--color-danger-text);
  font-weight: var(--weight-semibold);
}
.pcy-expiring {
  background: var(--color-warning-bg);
}
.pcy-none {
  color: var(--color-text-muted);
}
.diagnostic {
  font-size: var(--text-xs);
  max-height: 240px;
  overflow: auto;
  background: var(--color-surface-muted);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
}
#probe-report {
  width: 100%;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  white-space: pre;
}
.explorer-params {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: flex-end;
}
.explorer-params .uses-line {
  flex: 1 1 100%;
}
#explorer-body,
#explorer-result {
  width: 100%;
  max-width: none;
  font: 12px/1.4 var(--font-mono);
}
label.wide textarea {
  width: 100%;
  max-width: none;
}
.register-form {
  gap: var(--gap-section);
}
.register-form label.wide input {
  width: 100%;
}
.shift-times {
  margin: 0;
  padding-left: var(--space-5);
  display: grid;
  gap: var(--space-1);
}
.criteria-reasons {
  margin: 0;
  padding-left: var(--space-5);
  display: grid;
  gap: var(--space-1);
}
#criteria-details {
  display: grid;
  gap: var(--gap-block);
}
@media (max-width: 480px) {
  .register-form input[type=checkbox],
  .register-form input[type=radio] {
    width: 1.25rem;
    height: 1.25rem;
  }
  fieldset.choice-list label.inline,
  .register-form > section > label.inline {
    padding: var(--space-2) 0;
  }
}
fieldset.choice-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}
fieldset.choice-list legend {
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.shift-choices {
  display: grid;
  gap: var(--space-2);
}
.shift-choice {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}
.shift-choice-name {
  font-weight: var(--weight-semibold);
}
.shift-choice select {
  width: 100%;
}
.wait-panel {
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}
#serve .progress-line {
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}
@media (max-width: 600px) {
  #worker-page .table-wrap {
    overflow: visible;
  }
  #worker-page table.compact thead {
    display: none;
  }
  #worker-page table.compact caption {
    display: block;
  }
  #worker-page table.compact,
  #worker-page table.compact tbody,
  #worker-page table.compact tr,
  #worker-page table.compact th,
  #worker-page table.compact td {
    display: block;
    width: auto;
  }
  #worker-page table.compact tr {
    padding: var(--space-3);
    border-top: var(--border-width) solid var(--color-border);
  }
  #worker-page table.compact tbody tr:first-child {
    border-top: 0;
  }
  #worker-page table.compact th,
  #worker-page table.compact td {
    padding: var(--space-1) 0;
    border: 0;
  }
  #worker-page table.compact td:empty {
    display: none;
  }
}
.serve-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
.serve-who-label {
  margin: 0;
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}
.serve-who-buttons {
  display: inline-flex;
}
.serve-who-buttons button {
  min-width: 7rem;
  justify-content: center;
}
.serve-who-buttons button:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.serve-who-buttons button:last-child {
  margin-left: calc(-1 * var(--border-width));
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.serve-who-buttons button[aria-pressed=true],
.serve-who-buttons button[aria-pressed=true]:hover:not(:disabled) {
  position: relative;
  border-color: var(--color-focus);
  background: var(--color-selected);
  box-shadow: inset 0 0 0 1px var(--color-focus);
  font-weight: var(--weight-semibold);
}
@media (max-width: 600px) {
  .serve-who-buttons {
    display: flex;
    width: 100%;
  }
  .serve-who-buttons button {
    flex: 1;
    min-width: 0;
  }
}
.serve-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.serve-legend li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.serve-cal {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-1);
  max-width: 30rem;
}
.serve-cal-head {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  text-align: center;
}
.serve-day,
button.serve-day {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--space-1);
  min-width: 0;
  min-height: 4.25rem;
  padding: var(--space-1);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: var(--weight-normal);
  line-height: var(--leading-tight);
}
.serve-day.is-past {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
}
button.serve-day {
  border-color: var(--color-border-strong);
}
button.serve-day[aria-pressed=true],
button.serve-day[aria-pressed=true]:hover:not(:disabled) {
  border-color: var(--color-focus);
  background: var(--color-selected);
  box-shadow: inset 0 0 0 1px var(--color-focus);
}
.serve-day-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  min-height: var(--icon-size);
}
.serve-day-num {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}
.serve-day-month {
  font-size: var(--text-xs);
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
}
.serve-bands {
  display: grid;
  gap: 3px;
}
.serve-band,
.serve-swatch {
  display: block;
  height: 10px;
  border: var(--border-width) solid var(--color-border);
  border-radius: 2px;
  background: var(--color-shift-empty);
}
.serve-swatch {
  width: 1.75rem;
  height: 12px;
  flex: none;
}
.serve-band.am.open,
.serve-swatch.am {
  border-color: var(--color-shift-am);
  background: var(--color-shift-am);
}
.serve-band.mid.open,
.serve-swatch.mid {
  border-color: var(--color-shift-mid);
  background: var(--color-shift-mid);
}
.serve-band.pm.open,
.serve-swatch.pm {
  border-color: var(--color-shift-pm);
  background: var(--color-shift-pm);
}
.serve-band.mine,
.serve-swatch.mine {
  --hatch: var(--color-text-muted);
  border-color: var(--hatch);
  background:
    repeating-linear-gradient(
      45deg,
      var(--hatch) 0 2px,
      var(--color-shift-empty) 2px 5px),
    repeating-linear-gradient(
      -45deg,
      var(--hatch) 0 2px,
      var(--color-shift-empty) 2px 5px),
    var(--color-surface);
}
.serve-band.am.mine,
.serve-swatch.am.mine {
  --hatch: var(--color-shift-am);
}
.serve-band.mid.mine,
.serve-swatch.mid.mine {
  --hatch: var(--color-shift-mid);
}
.serve-band.pm.mine,
.serve-swatch.pm.mine {
  --hatch: var(--color-shift-pm);
}
.serve-yours {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.serve-yours li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.serve-options {
  display: grid;
  gap: var(--space-2);
}
.serve-options button {
  justify-content: flex-start;
  text-align: left;
  gap: var(--space-3);
}
.next-shift-title {
  margin: var(--space-1) 0 0;
  font-size: var(--text-lg);
  color: var(--color-heading);
}
.next-shift-side {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}
.next-shift-figures {
  gap: var(--space-3);
}
.next-shift-figure {
  flex: 1;
}
.next-shift-figure-head,
.next-shift-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.next-shift-figure-head {
  justify-content: space-between;
}
.next-shift-group-head {
  padding-bottom: var(--space-1);
  border-bottom: var(--border-width) solid var(--color-border);
}
.next-shift-group-head h4 {
  margin: 0 auto 0 0;
  font-size: var(--text-base);
}
.next-shift-group .member-list li {
  padding: var(--space-1) 0;
}
@media (max-width: 600px) {
  .next-shift-figures {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2);
  }
  .next-shift-figures .stat {
    padding: var(--space-3);
  }
  .next-shift-figures .stat-value {
    font-size: var(--text-xl);
  }
}

/* welcome-backdrops:welcome-backdrops */
:root[data-welcome=garden-wall] .welcome {
  background-image: url("./assets/welcome-garden-wall-wide.webp");
}
@media (max-width: 900px) {
  :root[data-welcome=garden-wall] .welcome {
    background-image: var(--welcome-band-fade), url("./assets/welcome-garden-wall-narrow.webp");
  }
}
:root[data-welcome=meadow-sunrise] .welcome {
  background-image: url("./assets/welcome-meadow-sunrise-wide.webp");
}
@media (max-width: 900px) {
  :root[data-welcome=meadow-sunrise] .welcome {
    background-image: var(--welcome-band-fade), url("./assets/welcome-meadow-sunrise-narrow.webp");
  }
}
:root[data-welcome=mountain-sunset] .welcome {
  background-image: url("./assets/welcome-mountain-sunset-wide.webp");
}
@media (max-width: 900px) {
  :root[data-welcome=mountain-sunset] .welcome {
    background-image: var(--welcome-band-fade), url("./assets/welcome-mountain-sunset-narrow.webp");
  }
}

/* src/client/styles/app.css */
