:root {
  --ink: #193735;
  --muted: #64746e;
  --cream: #faf9f3;
  --surface: #fff;
  --line: #dce3d9;
  --green: #285d49;
  --soft: #edf1e6;
  --gold: #f3ca4f;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-size: 15px;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button,
a.button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b59128;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(32px, 3.8vw, 52px);
  font-weight: 500;
  line-height: 1.13;
  letter-spacing: -1.8px;
  margin-bottom: 18px;
}
h1 em {
  font-family: Georgia, serif;
  font-weight: 400;
  color: var(--green);
}
h2 {
  font-size: 25px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
h3 {
  font-size: 16px;
  margin-bottom: 5px;
}
p {
  margin-bottom: 16px;
}
.small {
  font-size: 12px;
  line-height: 1.7;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 1.4px;
  line-height: 1.6;
  white-space: nowrap;
}
.brand b {
  font-size: 14px;
  letter-spacing: 2px;
}
.brand img {
  object-fit: contain;
}
.brand:hover {
  text-decoration: none;
}
.quiet-link {
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 19px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  transition:
    background 0.18s,
    transform 0.18s;
}
.button:hover {
  text-decoration: none;
}
.button:active {
  transform: translateY(1px);
}
.primary {
  background: var(--gold);
  color: #192c27;
}
.primary:hover {
  background: #e8bd3c;
}
.outline {
  border-color: var(--line);
  color: var(--green);
  background: transparent;
}
.outline:hover {
  background: var(--soft);
}
.full {
  width: 100%;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.notice {
  background: var(--soft);
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 22px;
}
.notice.error,
.form-error {
  color: #963627;
}
.form-error {
  font-size: 13px;
  line-height: 1.6;
  margin: 14px 0;
}
.form-error:empty {
  display: none;
}
.login-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 6vw;
  gap: 24px;
}
.login-layout {
  max-width: 1240px;
  margin: 34px auto 40px;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
}
.login-story {
  padding: 30px 0;
}
.login-story h1 {
  font-size: clamp(38px, 4.3vw, 58px);
}
.lead {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  margin: 24px 0 34px;
}
.story-steps {
  display: grid;
  gap: 23px;
}
.story-steps article {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.story-steps article > span {
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  background: #f4eccb;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 11px;
  font-weight: bold;
}
.story-steps p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.story-foot {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 19px;
  color: var(--green);
  margin-top: 38px;
}
.login-card {
  background: var(--surface);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 60px #17392b08;
}
.login-tabs {
  display: flex;
  padding: 4px;
  background: var(--soft);
  border-radius: 11px;
  margin-bottom: 32px;
}
.login-tabs button {
  width: 50%;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px;
  font-size: 13px;
  border-radius: 8px;
}
.login-tabs [aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 5px #163b2e0a;
}
.login-card .eyebrow {
  font-size: 9px;
  margin-bottom: 12px;
}
.login-card h2 {
  font-size: 34px;
}
.provider-buttons {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
.provider-buttons button {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 12px 16px;
  min-height: 50px;
  text-align: left;
  border-radius: 10px;
  font-size: 13px;
}
.provider-buttons button:hover {
  background: var(--cream);
}
.provider-buttons button > span:last-child {
  margin-left: auto;
}
.provider-mark {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  font-size: 21px;
  font-weight: 700;
  line-height: 21px;
}
.google {
  color: #4285f4;
}
.microsoft {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.microsoft i {
  background: #f35325;
}
.microsoft i:nth-child(2) {
  background: #81bc06;
}
.microsoft i:nth-child(3) {
  background: #05a6f0;
}
.microsoft i:nth-child(4) {
  background: #ffba08;
}
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 11px;
}
.or:before,
.or:after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.login-card > .small {
  margin: 18px 0;
}
.login-footer {
  text-align: center;
  padding: 20px 24px 36px;
  font-size: 11px;
  color: var(--muted);
}
.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  padding: 26px 22px;
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #f0f2e9;
  overflow: auto;
}
.sidebar .brand {
  gap: 7px;
}
.sidebar .brand b {
  font-size: 12px;
}
.nav-caption {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin: 44px 10px 12px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.sidebar nav a {
  padding: 12px 13px;
  font-size: 13px;
  border-radius: 9px;
}
.sidebar nav a:first-child {
  background: var(--green);
  color: white;
  display: flex;
  justify-content: space-between;
}
.sidebar nav a:hover {
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 35px 10px 0;
  font-size: 11px;
  color: var(--muted);
}
.sidebar-bottom p {
  margin-bottom: 7px;
}
.sidebar-bottom a {
  font-size: 12px;
  color: var(--green);
}
.sign-out {
  display: block;
  border: 0;
  background: none;
  color: var(--green);
  padding: 12px 0;
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.workspace {
  padding: 0 clamp(24px, 4vw, 60px);
  max-width: 1500px;
  width: 100%;
  margin-inline: auto;
  min-width: 0;
}
.workspace-header {
  min-height: 94px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 20px;
  margin-bottom: 34px;
}
.workspace-header .eyebrow {
  margin: 0;
}
.account-pill {
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 7px 12px;
  background: var(--surface);
  max-width: 45%;
  overflow-wrap: anywhere;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  margin: 12px 0 28px;
}
.page-title h1 {
  font-size: clamp(30px, 3.4vw, 44px);
}
.page-title .eyebrow {
  margin-bottom: 12px;
}
.page-title p:last-child {
  margin-bottom: 0;
}
.compact-label {
  font-size: 11px;
  min-width: 170px;
  max-width: 230px;
}
.compact-label select {
  margin-top: 6px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}
.stat {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.stat strong {
  font:
    400 36px/1.2 Georgia,
    serif;
  display: block;
  color: var(--green);
  margin-bottom: 6px;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.feature-band {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--soft);
  padding: 24px;
  border-radius: 17px;
}
.feature-symbol {
  font-size: 28px;
  flex-shrink: 0;
}
.feature-band h2 {
  font-size: 20px;
}
.feature-band p {
  font-size: 12px;
  margin: 0;
  color: var(--muted);
}
.feature-band .button {
  margin-left: auto;
  flex-shrink: 0;
}
.dashboard-section {
  padding-top: 42px;
  scroll-margin-top: 20px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.section-title .eyebrow {
  margin-bottom: 8px;
  font-size: 9px;
}
.section-title h2 {
  margin: 0;
}
.class-grid,
.enrollment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.content-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 22px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.content-card h3 {
  font-size: 19px;
  line-height: 1.35;
  margin: 8px 0;
}
.content-card p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.content-card .actions {
  margin-top: auto;
  padding-top: 14px;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pill {
  font-size: 10px;
  line-height: 1.4;
  padding: 5px 9px;
  border-radius: 20px;
  background: var(--soft);
  color: var(--green);
  display: inline-block;
}
.pill.cancelled,
.pill.paused {
  background: #f9eee3;
  color: #8d532c;
}
.date-chip {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: var(--green);
}
.empty {
  grid-column: 1/-1;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 28px;
  color: var(--muted);
  font-size: 14px;
  background: #ffffff50;
}
.empty strong {
  display: block;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 6px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
}
th {
  font-weight: 600;
  color: var(--muted);
  background: var(--soft);
  padding: 14px 18px;
  white-space: nowrap;
}
td {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  min-width: 110px;
  vertical-align: top;
}
td strong {
  display: block;
  color: var(--ink);
}
td small {
  color: var(--muted);
  display: block;
  font-size: 11px;
}
table button,
table select {
  font-size: 12px;
  min-height: 34px;
}
label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 600;
  gap: 7px;
  margin-bottom: 17px;
}
label small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 9px;
  min-height: 46px;
  padding: 10px 12px;
  min-width: 0;
  width: 100%;
  font-size: 16px;
  font-weight: 400;
}
input::placeholder,
textarea::placeholder {
  color: #7a847c;
}
textarea {
  resize: vertical;
}
select {
  padding-right: 25px;
}
.search-label {
  max-width: 370px;
}
.search-label input {
  font-size: 14px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
dialog {
  width: min(620px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--cream);
  color: var(--ink);
  padding: 28px;
  box-shadow: 0 24px 80px #152a2540;
  overflow: auto;
}
dialog::backdrop {
  background: #132e296b;
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.dialog-top h2 {
  margin: 0;
}
.dialog-close {
  width: 38px;
  height: 38px;
  font-size: 25px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}
dialog .button {
  width: 100%;
  margin-top: 5px;
}
.workspace-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 24px 0;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 0;
  font-size: 12px;
  cursor: pointer;
}
.login-card .notice {
  font-size: 12px;
}
.danger {
  color: #963627;
}
body:has(dialog[open]) {
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  dialog[open] {
    animation: dialog-in 0.2s ease-out;
  }
  @keyframes dialog-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
@media (max-width: 1100px) {
  .login-layout {
    gap: 40px;
  }
  .app-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .sidebar {
    padding-inline: 16px;
  }
  .workspace {
    padding-inline: 24px;
  }
  .feature-band {
    flex-wrap: wrap;
  }
  .feature-band .button {
    margin-left: 0;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 18px;
  }
  .class-grid,
  .enrollment-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .login-layout {
    grid-template-columns: 1fr;
    max-width: 560px;
    gap: 18px;
    padding-inline: 22px;
    margin-top: 0;
  }
  .login-story {
    padding: 22px 0 0;
  }
  .login-story h1 {
    font-size: 40px;
  }
  .login-story .lead {
    margin-bottom: 20px;
  }
  .story-steps,
  .story-foot {
    display: none;
  }
  .login-header {
    padding: 20px 22px;
  }
  .login-header .quiet-link {
    font-size: 11px;
  }
  .login-card {
    padding: 24px;
  }
  .login-footer {
    padding-top: 10px;
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 16px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: block;
  }
  .sidebar .brand {
    width: fit-content;
  }
  .sidebar .brand img {
    height: 44px;
    width: 44px;
  }
  .sidebar .nav-caption {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 5px;
    margin-top: 18px;
    padding-bottom: 3px;
  }
  .sidebar nav a {
    white-space: nowrap;
    font-size: 11px;
    padding: 8px 11px;
  }
  .sidebar nav a:first-child {
    gap: 12px;
  }
  .sidebar-bottom {
    position: absolute;
    right: 20px;
    top: 20px;
    margin: 0;
    padding: 0;
  }
  .sidebar-bottom p,
  .sidebar-bottom a {
    display: none;
  }
  .sidebar-bottom .sign-out {
    font-size: 11px;
  }
  .workspace {
    padding-inline: 20px;
  }
  .workspace-header {
    min-height: 72px;
    margin-bottom: 24px;
  }
  .workspace-header .eyebrow {
    font-size: 8px;
  }
  .account-pill {
    font-size: 10px;
  }
  .page-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }
  .page-title h1 {
    font-size: 34px;
  }
  .compact-label {
    width: 100%;
    max-width: none;
  }
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .stat {
    padding: 14px 10px;
  }
  .stat strong {
    font-size: 28px;
  }
  .stat span {
    font-size: 10px;
    line-height: 1.4;
    display: block;
  }
  .feature-band {
    padding: 20px;
    gap: 12px;
  }
  .feature-symbol {
    display: none;
  }
  .dashboard-section {
    padding-top: 30px;
  }
  .section-title {
    align-items: flex-start;
  }
  .section-title h2 {
    font-size: 23px;
  }
  .section-title .eyebrow {
    font-size: 8px;
  }
  .section-title .button {
    font-size: 11px;
    padding: 10px;
    min-height: 40px;
  }
  .section-title .actions {
    justify-content: flex-end;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .content-card {
    padding: 20px;
  }
  dialog {
    padding: 22px;
  }
  .workspace-footer {
    font-size: 10px;
    flex-wrap: wrap;
  }
  .login-layout .eyebrow {
    font-size: 9px;
  }
  .login-card h2 {
    font-size: 30px;
  }
}

/* Shared sizing guards prevent long account names from widening the app shell. */
.app-shell,
.workspace,
.page-title > div,
.workspace-header > * {
  min-width: 0;
}
.page-title h1,
.account-pill,
.content-card h3,
.content-card p {
  overflow-wrap: anywhere;
}
.page-title > div {
  flex: 1;
}
.page-title h1 {
  max-width: 100%;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar nav a svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar nav a:first-child:not([aria-current]) {
  background: transparent;
  color: var(--ink);
}
.sidebar nav a[aria-current] {
  background: var(--theme-action, var(--green));
  color: #fff;
}
.nav-mobile-label {
  display: none;
}
.portal-switch {
  font-size: 12px;
  margin: 18px 10px;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.enrollment-grid .content-card > .pill {
  align-self: flex-start;
}
@media (max-width: 760px) {
  html {
    scroll-padding-top: 100px;
    -webkit-text-size-adjust: 100%;
  }
  body {
    background: #f6f7f2;
  }
  .app-shell {
    display: block;
    width: 100%;
    min-height: 100dvh;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    height: 76px;
    padding: 12px 18px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .sidebar .brand {
    gap: 8px;
  }
  .sidebar .brand img {
    width: 42px;
    height: 42px;
  }
  .sidebar .brand span {
    font-size: 9px;
  }
  .sidebar .brand b {
    font-size: 12px;
  }
  .sidebar-bottom {
    position: static;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
  }
  .sidebar-bottom .sign-out {
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 20px;
    font-size: 11px;
    text-decoration: none;
    background: var(--surface);
  }
  .sidebar > .portal-switch {
    margin: 0 10px 0 auto;
    font-size: 10px;
    max-width: 85px;
    line-height: 1.3;
  }
  .sidebar nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    margin: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1px solid var(--line);
    overflow: visible;
    box-shadow: 0 -4px 20px #19373508;
  }
  .admin-sidebar nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .sidebar nav a,
  .sidebar nav a:first-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 52px;
    padding: 6px 2px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
  }
  .sidebar nav a svg {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
  }
  .sidebar nav a[aria-current] {
    background: var(--soft);
    color: var(--green);
  }
  .nav-desktop-label {
    display: none;
  }
  .nav-mobile-label {
    display: block;
  }
  .workspace {
    padding: 0 18px calc(94px + env(safe-area-inset-bottom, 0px));
    max-width: 100%;
    margin: 0;
  }
  .workspace-header {
    min-height: 0;
    padding: 18px 0 14px;
    margin-bottom: 18px;
    gap: 10px;
    align-items: center;
    border-bottom: 0;
  }
  .workspace-header .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
    max-width: 42%;
  }
  .account-pill {
    max-width: 56%;
    font-size: 10px;
    line-height: 1.5;
    padding: 7px 10px;
    border-radius: 12px;
    overflow-wrap: anywhere;
  }
  .page-title {
    gap: 16px;
    margin: 0 0 20px;
  }
  .page-title h1 {
    font-size: 30px;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 10px;
  }
  .page-title .eyebrow {
    font-size: 9px;
    letter-spacing: 1.3px;
    margin-bottom: 10px;
  }
  .page-title .muted {
    font-size: 13px;
    line-height: 1.6;
  }
  .compact-label {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: 11px;
    gap: 5px;
  }
  .compact-label select {
    margin: 0;
    min-height: 42px;
    background: var(--cream);
    font-size: 16px;
  }
  .stats {
    gap: 8px;
    margin-bottom: 18px;
  }
  .stat {
    padding: 14px 11px;
    border-radius: 14px;
    box-shadow: 0 2px 6px #19373503;
  }
  .stat strong {
    font:
      600 26px/1.15 Arial,
      sans-serif;
    margin-bottom: 7px;
  }
  .stat span {
    font-size: 10px;
    line-height: 1.5;
  }
  .feature-band {
    display: block;
    padding: 20px;
    border-radius: 18px;
    background: var(--green);
    color: #fff;
  }
  .feature-band h2 {
    font-size: 20px;
    letter-spacing: -0.5px;
    margin-bottom: 9px;
  }
  .feature-band p {
    color: #e0ebe5;
    font-size: 12px;
    line-height: 1.7;
  }
  .feature-band .button {
    margin: 16px 0 0;
    min-height: 44px;
    border-color: #ffffff55;
    color: #fff;
    background: #ffffff0a;
    font-size: 12px;
  }
  .dashboard-section {
    padding-top: 28px;
    scroll-margin-top: 95px;
  }
  .section-title {
    gap: 12px;
    margin-bottom: 14px;
    align-items: center;
    flex-wrap: wrap;
  }
  .section-title > div {
    min-width: 0;
  }
  .section-title h2 {
    font-size: 21px;
    line-height: 1.3;
  }
  .section-title .eyebrow {
    font-size: 8px;
    letter-spacing: 1.1px;
    margin-bottom: 5px;
  }
  .section-title .small {
    font-size: 10px;
  }
  .section-title .button {
    min-height: 42px;
    font-size: 11px;
  }
  .section-title .actions {
    gap: 8px;
    justify-content: flex-start;
  }
  .class-grid,
  .enrollment-grid {
    gap: 12px;
  }
  .content-card {
    padding: 18px;
    border-radius: 17px;
    box-shadow: 0 3px 12px #19373504;
  }
  .content-card h3 {
    font-size: 18px;
  }
  .content-card p {
    font-size: 12px;
    line-height: 1.7;
    margin-bottom: 6px;
  }
  .content-card .actions {
    padding-top: 12px;
  }
  .content-card .actions .button {
    min-height: 44px;
  }
  .card-top {
    align-items: flex-start;
    gap: 8px;
  }
  .date-chip {
    font-size: 11px;
    letter-spacing: 0;
    line-height: 1.6;
  }
  .pill {
    font-size: 10px;
  }
  .empty {
    padding: 22px 18px;
    font-size: 12px;
    line-height: 1.8;
  }
  .empty strong {
    font-size: 15px;
  }
  .table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
  }
  .table-wrap table,
  .table-wrap tbody {
    display: block;
    width: 100%;
  }
  .table-wrap thead {
    display: none;
  }
  .table-wrap tr {
    display: block;
    margin-bottom: 12px;
    padding: 6px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
  }
  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(75px, 30%) minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 12px 0;
    overflow-wrap: anywhere;
    font-size: 12px;
  }
  .table-wrap td:first-child {
    border-top: 0;
  }
  .table-wrap td:before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
  }
  .table-wrap td .button {
    justify-self: start;
  }
  .table-wrap td select {
    font-size: 16px;
    min-height: 42px;
  }
  .workspace-footer {
    border: 0;
    margin-top: 28px;
    padding: 14px 0;
    font-size: 10px;
    gap: 5px;
    flex-direction: column;
  }
  dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 32px - env(safe-area-inset-bottom, 0px));
    padding: 22px 18px;
    border-radius: 22px;
  }
  dialog h2 {
    font-size: 23px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .login-header {
    padding: 18px;
  }
  .login-layout {
    padding: 0 18px;
    margin-bottom: 20px;
  }
  .login-story {
    padding-top: 10px;
  }
  .login-story h1 {
    font-size: 34px;
    letter-spacing: -1px;
  }
  .login-story .lead {
    font-size: 14px;
    margin: 16px 0 10px;
  }
  .login-story .eyebrow {
    font-size: 9px;
    margin-bottom: 12px;
  }
  .login-card {
    padding: 22px 20px;
    border-radius: 22px;
    box-shadow: 0 8px 25px #19373506;
  }
  .login-tabs {
    margin-bottom: 22px;
  }
  .login-card h2 {
    font-size: 28px;
  }
  .login-header .brand img {
    width: 44px;
    height: 44px;
  }
  .provider-buttons button {
    min-height: 52px;
  }
  .login-footer {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }
}
@media (prefers-reduced-motion: no-preference) {
  .sidebar nav a {
    transition:
      background-color 0.18s,
      color 0.18s;
  }
}

.table-cell-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.workspace-header > .portal-switch {
  flex-shrink: 0;
  margin: 0;
  font-size: 12px;
}
.workspace-header .account-pill {
  margin-left: auto;
}
@media (max-width: 760px) {
  .workspace-header {
    flex-wrap: wrap;
  }
  .workspace-header > .portal-switch {
    flex-basis: 100%;
    font-size: 11px;
    line-height: 1.5;
    margin-top: 2px;
  }
  .workspace-header .account-pill {
    margin-left: auto;
  }
}

@media (max-width: 760px) {
  .workspace-header {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 10px;
  }
  .workspace-header .eyebrow,
  .workspace-header .account-pill {
    max-width: none;
    margin: 0;
  }
  .workspace-header > .portal-switch {
    grid-column: 1/-1;
  }
}

@media (max-width: 760px) {
  .admin-sidebar nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .admin-sidebar nav a {
    padding-left: 2px;
    padding-right: 2px;
    font-size: 10px;
  }
}

/* Keep phone layouts inside the viewport, including Safari's intrinsic date fields. */
@media screen and (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }
  .app-shell,
  .workspace,
  .login-layout,
  .login-card,
  .flow-main,
  .flow-header,
  .receipt-paper,
  .receipt-toolbar {
    min-inline-size: 0;
    max-inline-size: 100%;
  }
  .workspace-header {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .workspace-header > *,
  .page-title > *,
  .section-title > *,
  .form-grid > *,
  .billing-filters > *,
  .billing-actions > *,
  .billing-totals > *,
  .stats > * {
    min-inline-size: 0;
    max-inline-size: 100%;
  }
  label,
  fieldset,
  form {
    min-inline-size: 0;
    max-inline-size: 100%;
  }
  input,
  select,
  textarea {
    box-sizing: border-box;
    inline-size: 100%;
    min-inline-size: 0;
    max-inline-size: 100%;
  }
  input:is(
    [type="date"],
    [type="month"],
    [type="time"],
    [type="datetime-local"]
  ) {
    display: block;
    appearance: none;
    -webkit-appearance: none;
    min-inline-size: 0;
    inline-size: 100%;
    max-inline-size: 100%;
  }
  input::-webkit-date-and-time-value {
    min-width: 0;
    text-align: start;
  }
  .billing-total {
    min-width: 0;
    flex-basis: 100%;
  }
  .billing-tabs,
  .actions {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
  }
  .billing-actions .button,
  .table-cell-value,
  .content-card,
  .notice {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .workspace-header .account-pill {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .sidebar nav {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .receipt-toolbar,
  .flow-header {
    flex-wrap: wrap;
  }
}

/* A single centred chevron replaces browser-specific select arrows. */
select:not([multiple]):not([size]) {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23193735' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  padding-right: 42px;
  line-height: 1.4;
}
html[data-theme="dark"] select:not([multiple]):not([size]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8f0ec' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
@media (forced-colors: active) {
  select:not([multiple]):not([size]) {
    appearance: auto;
    -webkit-appearance: auto;
    background-image: none;
    padding-right: 12px;
  }
}
