@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/static/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/static/fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The Steps theme (chosen by Marcel on 2026-11-23): navy, cobalt and sky blue, Archivo type, crisp corners.
   Shared by the site pages and the app (see scripts/build-static.mjs). */
:root {
  color-scheme: light;

  --page: #f1f3f7;
  --stage: #e5e9f1;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --ink: #0c1424;
  --ink-2: #2e3850;
  --muted: #5a6479;
  --faint: #8590a5;
  --line: #dce1ea;
  --line-2: #c8cfdc;

  /* Brand colours. Cobalt is for buttons and the logo, navy for the site's top band and the app's sidebar,
     sky (the blue of the illustrations) for highlights on navy and the logo's top step. */
  --primary: #2346e0;
  --primary-hover: #1a37b8;
  --navy: #0c1424;
  --navy-2: #1a2438;
  --navy-ink: #ffffff;
  --navy-muted: #a9b3c7;
  --navy-line: rgba(255, 255, 255, 0.1);
  --sky: #83acff;
  --sky-soft: #e4ecff;
  --sky-on-navy: rgba(131, 172, 255, 0.16);
  --sky-ink-on-navy: #c3d5ff;

  /* Each colour has a strong fill, a darker text shade and a soft background. */
  --blue: #2346e0;
  --blue-ink: #1d3fc4;
  --blue-soft: #e4ecff;
  --green: #2f9e57;
  --green-ink: #1f7a4d;
  --green-soft: #e1f3e8;
  --purple: #8b5cf6;
  --purple-ink: #5b32c9;
  --purple-soft: #efe9fe;
  --orange: #f08c00;
  --orange-ink: #a04f00;
  --orange-soft: #fdefd9;
  --red: #e5484d;
  --red-ink: #bd2532;
  --red-soft: #fde8e9;
  --teal: #12a594;
  --teal-ink: #0b6b60;
  --teal-soft: #ddf5f1;
  --yellow: #f4c62a;

  --focus: #2346e0;

  --radius-xl: 14px;
  --radius-lg: 10px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-window: 0 1px 2px rgba(12, 20, 36, 0.06), 0 30px 60px -30px rgba(12, 20, 36, 0.45);
  --maxw: 1160px;
  --gutter: 20px;

  --font: "Archivo Variable", Archivo, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Headings and labels use Archivo's wider widths. */
  --wide: 116%;
  --label-wide: 112%;
}

/* Styles for the app pages (back office, portal, sign-up, door tablet).
   The theme tokens (colours, radii, font) are added in front of this file by
   scripts/build-static.mjs, from src/styles/tokens.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  font-stretch: var(--wide);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 1.625rem;
}

h2 {
  font-size: 1.125rem;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

a.link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

a.link:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.8125rem;
}

.nowrap {
  white-space: nowrap;
}

.right {
  text-align: right;
}

/* The hidden attribute wins over any display rule below. */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.art {
  display: block;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  user-select: none;
}

/* Colour helpers, the same as on the site pages. */
.tone-blue {
  --tone: var(--blue);
  --tone-ink: var(--blue-ink);
  --tone-soft: var(--blue-soft);
}
.tone-green {
  --tone: var(--green);
  --tone-ink: var(--green-ink);
  --tone-soft: var(--green-soft);
}
.tone-purple {
  --tone: var(--purple);
  --tone-ink: var(--purple-ink);
  --tone-soft: var(--purple-soft);
}
.tone-orange {
  --tone: var(--orange);
  --tone-ink: var(--orange-ink);
  --tone-soft: var(--orange-soft);
}
.tone-red {
  --tone: var(--red);
  --tone-ink: var(--red-ink);
  --tone-soft: var(--red-soft);
}
.tone-teal {
  --tone: var(--teal);
  --tone-ink: var(--teal-ink);
  --tone-soft: var(--teal-soft);
}
.tone-yellow {
  --tone: var(--yellow);
  --tone-ink: #7a5b00;
  --tone-soft: #fdf6d8;
}
.tone-grey {
  --tone: var(--faint);
  --tone-ink: var(--muted);
  --tone-soft: var(--surface-2);
}

/* ---------- App frame: sidebar and main panel ---------- */

.shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 18px 12px 14px;
  border-right: 1px solid var(--navy);
  background: var(--navy);
  color: var(--navy-muted);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 16px;
  color: var(--ink);
  text-decoration: none;
}

/* The navy areas: the sidebar, the phone menu bar and the top of the plain pages. */
.side .brand,
.mobile-bar .brand,
.plain-head .brand {
  color: var(--navy-ink);
}

.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  flex: none;
}

/* The name StudioEnroll as the wordmark: STUDIO in white, ENROLL in sky. */
.wordmark {
  font-size: 1.0625rem;
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.wordmark-b {
  color: var(--sky);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.brand-name {
  font-weight: 700;
  font-stretch: 106%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  color: var(--navy-muted);
  font-size: 0.75rem;
}

.nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: #c4cbd9;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover {
  background: var(--navy-2);
  color: var(--navy-ink);
}

.nav a[aria-current="page"] {
  background: var(--sky-on-navy);
  color: var(--navy-ink);
  font-weight: 650;
}

.nav a[aria-current="page"] .icon {
  color: var(--sky);
}

.nav .icon {
  color: #7f8aa1;
}

.nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
}

/* On navy the counts are sky with navy figures. */
.side .badge {
  background: var(--sky);
  color: var(--navy);
}

.badge.quiet {
  background: var(--surface-2);
  color: var(--muted);
}

.side-title {
  margin: 18px 0 4px;
  padding: 0 12px;
  color: #7f8aa1;
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: var(--label-wide);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-note {
  padding: 4px 12px;
  color: #7f8aa1;
  font-size: 0.8125rem;
}

.shape {
  width: 13px;
  height: 13px;
  border: 2.5px solid var(--tone, var(--faint));
  border-radius: 50%;
  flex: none;
}

.nav-time {
  color: #7f8aa1;
  font-size: 0.8125rem;
  font-weight: 400;
  white-space: nowrap;
}

.side-foot {
  margin-top: auto;
  padding: 14px 8px 0;
  border-top: 1px solid var(--navy-line);
}

.side-foot .btn {
  border-color: rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--navy-ink);
}

.side-foot .btn:hover {
  border-color: rgba(255, 255, 255, 0.45);
}

.side-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.side-user-name {
  min-width: 0;
  color: var(--navy-ink);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-user-role {
  color: #7f8aa1;
  font-size: 0.75rem;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mobile-bar {
  display: none;
}

.top {
  padding: 26px 32px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.top.plain {
  padding-bottom: 22px;
}

.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.title-row h1 {
  margin-right: auto;
}

.title-ring {
  width: 22px;
  height: 22px;
  border: 3px solid var(--tone, var(--blue));
  border-radius: 50%;
  flex: none;
}

.title-row .title-ring + h1 {
  margin-left: -2px;
}

.title-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-right: auto;
  min-width: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-top: 8px;
  color: var(--muted);
}

.crumbs .slash {
  color: var(--line-2);
}

.crumbs a {
  color: inherit;
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.tabs {
  display: flex;
  gap: 28px;
  margin-top: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 13px;
  border-bottom: 2.5px solid transparent;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-current="page"] {
  border-bottom-color: var(--primary);
  color: var(--ink);
  font-weight: 600;
}

.tab-count {
  color: var(--faint);
  font-size: 0.8125rem;
  font-style: italic;
  font-weight: 400;
}

.body {
  flex: 1;
  padding: 24px 32px 48px;
}

.body > * + * {
  margin-top: 20px;
}

.narrow {
  max-width: 760px;
}

/* ---------- Building blocks ---------- */

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.card-pad {
  padding: 22px 24px;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 18px 24px 0;
}

.card-head + .card-body {
  padding-top: 14px;
}

.card-body {
  padding: 22px 24px;
}

.card-body > * + * {
  margin-top: 14px;
}

.card-foot {
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.stack > * + * {
  margin-top: 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.row.between {
  justify-content: space-between;
}

.grow {
  flex: 1;
  min-width: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-stretch: 104%;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.12s ease,
    border-color 0.12s ease;
}

.btn:hover {
  border-color: var(--faint);
}

.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
}

.btn-danger {
  color: var(--red-ink);
}

.btn-danger:hover {
  border-color: var(--red);
}

.btn-sm {
  min-height: 32px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.btn-lg {
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-size: 1.0625rem;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-text {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-text:hover {
  text-decoration: underline;
}

.btn-text.danger {
  color: var(--red-ink);
}

form.inline {
  display: inline-flex;
  vertical-align: middle;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--tone-soft, var(--surface-2));
  color: var(--tone-ink, var(--muted));
  font-size: 0.71875rem;
  font-weight: 700;
  font-stretch: var(--label-wide);
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill.dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--tone, var(--faint));
}

/* A level such as "Yellow belt". The colours come from the level itself. */
.level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.marks {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
}

.mark {
  width: 5px;
  height: 14px;
  border-radius: 2px;
  background: var(--line-2);
}

.mark.on {
  background: var(--primary);
}

.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.seg a {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.seg a[aria-current="page"] {
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(12, 20, 36, 0.1);
  color: var(--ink);
  font-weight: 600;
}

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green-ink);
  font-weight: 500;
}

.flash.warning {
  background: var(--orange-soft);
  color: var(--orange-ink);
}

.notice {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--tone-soft, var(--surface-2));
  color: var(--tone-ink, var(--ink-2));
}

.notice strong {
  font-weight: 600;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 36px;
  text-align: center;
}

.empty .art {
  width: 190px;
}

.empty h2 {
  margin-top: 4px;
}

.empty p {
  max-width: 46ch;
  margin-top: 6px;
  color: var(--muted);
}

.empty .actions {
  justify-content: center;
  margin-top: 18px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}

table.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.71875rem;
  font-weight: 700;
  font-stretch: var(--label-wide);
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table th:first-child,
.table td:first-child {
  padding-left: 24px;
}

.table th:last-child,
.table td:last-child {
  padding-right: 24px;
}

.table .name {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.table a.name:hover {
  text-decoration: underline;
}

.table .sub {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

/* Lists of rows inside a card */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--line);
}

.list > li:last-child {
  border-bottom: 0;
}

/* The text of a row keeps a readable width; what does not fit beside it wraps below. */
.list > li > .grow {
  flex: 1 1 170px;
}

.list .name {
  font-weight: 600;
  text-decoration: none;
}

.list a.name:hover {
  text-decoration: underline;
}

.list .sub {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}

.dl {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
  gap: 8px 18px;
  margin: 0;
}

.dl dt {
  color: var(--muted);
}

.dl dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Number tiles */
.stat {
  padding: 18px 20px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.71875rem;
  font-weight: 700;
  font-stretch: var(--label-wide);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 6px;
  font-size: 2.125rem;
  font-weight: 800;
  font-stretch: var(--wide);
  letter-spacing: -0.01em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.stat-hint {
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.8125rem;
}

a.stat {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.stat:hover {
  border-color: var(--line-2);
}

/* Forms */
.form > * + * {
  margin-top: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.span-2 {
  grid-column: span 2;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > label,
.field > .label {
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 600;
}

.field .hint {
  color: var(--muted);
  font-size: 0.8125rem;
}

.field .error {
  color: var(--red-ink);
  font-size: 0.8125rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="search"],
input[type="color"],
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

input[type="color"] {
  padding: 4px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: 3px solid var(--blue-soft);
  outline-offset: 0;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--red);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--primary);
  flex: none;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px 16px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 600;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.toolbar input[type="search"],
.toolbar select {
  width: auto;
  min-width: 170px;
}

.toolbar .spacer {
  flex: 1;
}

.card-body.toolbar > * + *,
.card-body.row > * + * {
  margin-top: 0;
}

.table th.right,
.table td.right {
  text-align: right;
}

/* ---------- Progress bars (ranks view) ---------- */

.rank-group + .rank-group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.rank-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 24px 6px;
}

.rank-note {
  color: var(--muted);
  font-size: 0.875rem;
}

.rank-row {
  display: grid;
  grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin: 0 12px;
  padding: 4px 12px;
  border-radius: var(--radius);
  color: var(--ink-2);
  text-decoration: none;
}

a.rank-row:hover {
  background: var(--page);
}

.rank-row.ready {
  background: var(--blue-soft);
  color: var(--ink);
  font-weight: 600;
}

.rank-track {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bar-box {
  flex: 1;
  max-width: 320px;
  height: 18px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.bar {
  display: block;
  height: 100%;
  min-width: 6px;
  border-radius: 999px;
  background: var(--bar, var(--blue));
}

.bar-text {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
  white-space: nowrap;
}

.rank-row.ready .bar-text {
  color: var(--blue-ink);
  font-weight: 600;
}

.req-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.req-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.req-dot {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--faint);
  flex: none;
}

.req-dot.met {
  background: var(--green-soft);
  color: var(--green-ink);
}

.req-dot .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.6;
}

/* ---------- Attendance ---------- */

.roster {
  list-style: none;
  margin: 0;
  padding: 0;
}

.roster li {
  border-bottom: 1px solid var(--line);
}

.roster li:last-child {
  border-bottom: 0;
}

.roster form {
  margin: 0;
}

.roster-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 10px 24px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.roster-row:hover {
  background: var(--page);
}

.tick {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--line-2);
  border-radius: 50%;
  color: transparent;
  flex: none;
}

.tick .icon {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}

.present .tick {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.roster-name {
  font-weight: 550;
}

.roster-sub {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

/* ---------- Week schedule ---------- */

.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.day-head {
  margin-bottom: 8px;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.day.today .day-head {
  color: var(--blue-ink);
}

.slot {
  display: block;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--tone, var(--faint));
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.slot:hover {
  border-color: var(--line-2);
  border-left-color: var(--tone, var(--faint));
}

.slot-time {
  color: var(--muted);
  font-size: 0.8125rem;
}

.slot-name {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}

.day-empty {
  color: var(--faint);
  font-size: 0.8125rem;
}

/* ---------- Calendar list (events) ---------- */

.date-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--surface-2);
  line-height: 1.1;
  flex: none;
}

.date-chip .m {
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.date-chip .d {
  font-size: 1.25rem;
  font-weight: 600;
}

/* ---------- Pages outside the app frame: login, sign-up, public pages ---------- */

.plain-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* The top of the plain pages is a navy band, as on the site. Its content keeps the page width. */
.plain-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 0 auto 20px;
  padding: 16px max(20px, calc((100% - 1080px) / 2 + 20px));
  background: var(--navy);
  color: var(--navy-ink);
}

.plain-head .btn {
  border-color: rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--navy-ink);
}

.plain-head .btn:hover {
  border-color: rgba(255, 255, 255, 0.6);
}

.plain-head .btn-primary {
  border-color: var(--primary);
  background: var(--primary);
}

.plain-head .brand-sub {
  color: var(--navy-muted);
}

.plain-head a.link,
.plain-head .muted {
  color: var(--navy-muted);
}

.plain-head .brand {
  padding: 0;
}

.plain-main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px 56px;
}

.plain-main > * + * {
  margin-top: 20px;
}

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  max-width: 940px;
  margin: clamp(8px, 4vw, 48px) auto 0;
}

.auth.single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 460px;
}

.auth.wide {
  max-width: 1040px;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
}

.auth-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.auth-side .art {
  width: min(100%, 300px);
  margin: -10px 0 4px -14px;
}

.auth-side h1 {
  font-size: clamp(1.625rem, 3.4vw, 2.25rem);
  letter-spacing: -0.03em;
}

.auth-side p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.0625rem;
}

.auth-card {
  padding: 28px;
  border-radius: var(--radius-xl);
}

.auth-card h2 {
  margin-bottom: 18px;
  font-size: 1.25rem;
}

.auth-alt {
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  border-radius: var(--radius-xl);
}

.public-hero .art {
  width: 180px;
  margin: -16px 0;
}

.public-hero h1 {
  font-size: clamp(1.625rem, 3.6vw, 2.25rem);
  letter-spacing: -0.03em;
}

.public-hero p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 1.0625rem;
}

.waiver-text {
  max-height: 260px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--page);
  color: var(--ink-2);
  font-size: 0.875rem;
  white-space: pre-wrap;
  overflow-y: auto;
}

.choice-list {
  display: grid;
  gap: 10px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.choice input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
  flex: none;
}

/* ---------- Door tablet ---------- */

.kiosk {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 40px;
}

.kiosk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 880px;
  margin-bottom: 22px;
}

.kiosk-main {
  width: 100%;
  max-width: 880px;
}

.kiosk h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
}

.kiosk-search {
  margin: 18px 0;
  min-height: 60px !important;
  padding: 12px 20px !important;
  border-radius: var(--radius-lg) !important;
  font-size: 1.25rem !important;
}

.kiosk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.kiosk-grid form {
  margin: 0;
}

.kiosk-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-height: 84px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.kiosk-tile:hover {
  border-color: var(--faint);
}

.kiosk-tile .sub {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.kiosk-tile.done {
  border-color: var(--green);
  background: var(--green-soft);
}

.kiosk-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 24px 40px;
  border-radius: var(--radius-xl);
  text-align: center;
}

.kiosk-done .art {
  width: 240px;
}

.kiosk-done p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1.125rem;
}

/* ---------- Getting started (Today, new studio) ---------- */
.start {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
}

.start .art {
  width: 200px;
  margin: -12px 0;
}

.steps {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 0;
}

.steps .sub {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}

.step-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border: 2px solid var(--line-2);
  border-radius: 50%;
  color: transparent;
  flex: none;
}

.step-dot .icon {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.steps .done .step-dot {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

/* ---------- Ladder editor (levels of a track) ---------- */
.ladder {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ladder > li {
  border-bottom: 1px solid var(--line);
}

.ladder > li:last-child {
  border-bottom: 0;
}

.ladder summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 13px 24px;
  cursor: pointer;
  list-style: none;
}

.ladder summary::-webkit-details-marker {
  display: none;
}

.ladder summary:hover {
  background: var(--page);
}

.ladder-no {
  width: 22px;
  color: var(--faint);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: right;
}

.ladder-rules {
  min-width: 180px;
}

.ladder-edit {
  padding: 6px 24px 22px 58px;
}

.ladder-edit > * + * {
  margin-top: 14px;
}

/* A fold-out for something used rarely. */
details.more > summary {
  color: var(--blue-ink);
  font-weight: 500;
  cursor: pointer;
}

details.more[open] > summary {
  margin-bottom: 12px;
}

/* A link or code shown so that it can be copied. */
.copy-text {
  display: inline-block;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

/* ---------- Family portal ---------- */
.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.portal-nav a {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

.portal-nav a:hover {
  color: var(--ink);
}

.portal-nav a[aria-current="page"] {
  background: var(--blue-soft);
  color: var(--ink);
  font-weight: 600;
}

.plain-head {
  flex-wrap: wrap;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 1100px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .week {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .day {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .day:last-child {
    border-bottom: 0;
  }

  .day-head {
    margin: 10px 0 0;
  }

  .day-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
  }

  .slot {
    margin: 0;
  }

  .day-empty {
    padding: 10px 0;
  }
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 0 16px;
    border-bottom: 1px solid var(--navy);
    background: var(--navy);
  }

  .mobile-bar .brand {
    padding: 0;
  }

  .mobile-bar .brand-mark {
    width: 32px;
    height: 32px;
  }

  .menu-button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--navy-ink);
    cursor: pointer;
  }

  .side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(300px, 86vw);
    transform: translateX(-102%);
    transition: transform 0.18s ease;
  }

  .side-toggle:checked ~ .side {
    transform: none;
    box-shadow: 0 0 0 100vmax rgba(12, 20, 36, 0.45);
  }

  .side-close {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: none;
  }

  .side-toggle:checked ~ .side-close {
    display: block;
  }

  .top {
    padding: 20px 16px 0;
  }

  .top.plain {
    padding-bottom: 18px;
  }

  .body {
    padding: 16px 16px 40px;
  }

  h1 {
    font-size: 1.375rem;
  }

  .grid-2,
  .grid-3,
  .form-grid,
  .form-grid.three {
    grid-template-columns: minmax(0, 1fr);
  }

  .span-2 {
    grid-column: auto;
  }

  .card-pad,
  .card-body {
    padding: 18px 16px;
  }

  .card-head {
    padding: 16px 16px 0;
  }

  .card-foot {
    padding: 12px 16px;
  }

  .list > li,
  .roster-row {
    padding-inline: 16px;
  }

  .table th:first-child,
  .table td:first-child {
    padding-left: 16px;
  }

  .table th:last-child,
  .table td:last-child {
    padding-right: 16px;
  }

  .hide-narrow {
    display: none !important;
  }

  .rank-head {
    padding-inline: 16px;
  }

  .rank-row {
    grid-template-columns: minmax(90px, 130px) minmax(0, 1fr);
    margin: 0 6px;
    padding-inline: 10px;
  }

  .rank-row > :nth-child(3) {
    display: none;
  }

  .auth,
  .auth.wide {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-side .art {
    width: 190px;
  }

  .auth-card {
    padding: 22px 18px;
  }

  .public-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px 18px;
  }

  .ladder summary {
    padding-inline: 16px;
  }

  .ladder-edit {
    padding: 6px 16px 20px;
  }

  .start {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 16px;
  }

  .start .art {
    display: none;
  }

  .public-hero .art {
    width: 140px;
    margin: -10px 0 -6px;
    grid-row: 1;
  }
}

@media (min-width: 861px) {
  .side-toggle,
  .side-close {
    display: none;
  }
}

@media (max-width: 520px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat {
    padding: 14px;
  }

  .stat-value {
    font-size: 1.5rem;
  }
}

@media print {
  .side,
  .mobile-bar,
  .actions,
  .tabs {
    display: none !important;
  }

  .shell {
    display: block;
  }
}

/* ---------- Import, logo, beta ---------- */

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.import-steps {
  padding-left: 20px;
  color: var(--ink-2);
}

.import-steps li + li {
  margin-top: 6px;
}

.studio-logo {
  display: block;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--surface);
}

.logo-preview {
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: contain;
  background: var(--surface);
}

.beta {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 0.625rem;
  font-weight: 700;
  font-stretch: var(--label-wide);
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
  vertical-align: middle;
}

.side .beta,
.plain-head .beta {
  background: var(--sky-on-navy);
  color: var(--sky-ink-on-navy);
}

.plain-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  padding: 24px 16px 32px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.plain-foot a {
  color: inherit;
}

.side-help {
  display: block;
  margin-top: 10px;
  color: #7f8aa1;
  font-size: 0.8125rem;
}

.confirm-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.confirm-bar p {
  flex: 1 1 320px;
  margin: 0;
}

input[type="file"] {
  max-width: 100%;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
}

input[type="file"]::file-selector-button {
  min-height: 36px;
  margin-right: 10px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

a.side-user-name {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.side-user-name:hover,
a.side-user-name[aria-current="page"] {
  text-decoration: underline;
}

/* The support email address, drawn as a picture: 201 x 18 pixels at 17px, sized to the text around it. */
.contact-inline {
  display: inline-block;
  width: 11.82em;
  max-width: 100%;
  height: auto;
  vertical-align: -0.21em;
}
