.portal-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.76)),
    url("/assets/site/optimized/home-page-bg-1600.webp") center top / 760px auto repeat fixed,
    var(--bg);
}

.portal-label {
  margin-left: 0.1rem;
  padding-left: 0.85rem;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  white-space: nowrap;
}

.portal-nav { align-items: center; }
.portal-main { flex: 1; padding-top: clamp(2.8rem, 7vw, 5rem); padding-bottom: clamp(4rem, 8vw, 6rem); }
.portal-footer { margin-top: 0; }

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 5vw, 3.4rem);
}

.page-heading h1,
.auth-panel h1 {
  max-width: 22ch;
  overflow-wrap: anywhere;
}

.portal-page .eyebrow {
  min-height: 30px;
  margin: 0 0 0.75rem;
  background: rgba(0, 71, 187, 0.1);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.4rem;
}

.grid > .panel { grid-column: span 6; }
.grid > .panel:nth-child(3n) { grid-column: span 12; }
.panel { padding: clamp(1.4rem, 4vw, 2.2rem); }
.panel h2 { margin-bottom: 1.2rem; }
.panel p { max-width: 62ch; }
.panel ul { padding-left: 1.2rem; }
.panel li + li { margin-top: 0.7rem; }

.auth-panel { max-width: 38rem; margin-inline: auto; }
.auth-panel h1 { margin-bottom: 2rem; }

.portal-page form,
.portal-page label { display: grid; gap: 0.5rem; }
.portal-page form { gap: 1rem; }
.portal-page label { color: var(--ink); font-weight: 600; }
.portal-page label small { color: var(--muted); font-weight: 400; }

.portal-page input {
  width: 100%;
  min-height: 50px;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(17, 17, 17, 0.22);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.portal-page input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 71, 187, 0.12);
  outline: 0;
}

.portal-page button,
.portal-page .button {
  width: max-content;
  min-height: 50px;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.portal-page button:hover,
.portal-page .button:hover { border-color: #00378f; background: #00378f; color: #fff; }

.portal-page .secondary {
  border-color: rgba(17, 17, 17, 0.24);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.portal-page .secondary:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

.notice {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--blue);
  border-radius: 0 12px 12px 0;
  background: #eef4ff;
}

.notice.error { border-color: #a50f17; background: #fff0f1; color: #72171d; }
.notice.success { border-color: #227447; background: #edf8f1; color: #185c37; }

.split-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.member-list { padding: 0 !important; list-style: none; }
.member-list li { padding-block: 1rem; border-bottom: 1px solid var(--line); }
.member-list form { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.8rem; }

/* Authenticated application shell. The public pages above keep the site's
   existing marketing layout; signed-in pages use the same design tokens in a
   denser, task-oriented frame. */
.app-shell-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: #eef3f8;
  font-family: "Source Sans 3", Arial, sans-serif;
}

.app-shell-page h1,
.app-shell-page h2,
.app-shell-page h3,
.app-shell-page button,
.app-shell-page .button { font-family: "Source Sans 3", Arial, sans-serif; letter-spacing: 0; text-transform: none; }

.app-topbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.7rem clamp(1rem, 3vw, 2.5rem);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 2;
}

.app-brand,
.app-account {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: inherit;
  text-decoration: none;
}

.app-account-menu { position: relative; }
.app-account {
  min-height: 48px;
  padding: 0.2rem;
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
}
.app-account::-webkit-details-marker { display: none; }
.app-account::marker { content: ""; }
.app-account:hover { background: rgba(255, 255, 255, 0.08); }
.app-account:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.app-account > svg { width: 18px; height: 18px; color: rgba(255, 255, 255, 0.66); transition: transform 160ms ease; }
.app-account-menu[open] .app-account > svg { transform: rotate(180deg); }
.account-popover {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  z-index: 5;
  width: min(15rem, calc(100vw - 2rem));
  overflow: hidden;
  padding: 0.45rem;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 16px 38px rgba(16, 36, 59, 0.22);
}
.account-popover a,
.portal-page .account-popover button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}
.account-popover a:hover,
.account-popover a:focus-visible,
.portal-page .account-popover button:hover,
.portal-page .account-popover button:focus-visible { background: #edf4ff; color: var(--blue); outline: 0; }
.account-popover form { display: block; }

.app-brand img { width: 46px; height: 46px; object-fit: contain; }
.app-brand span,
.app-account > span:nth-child(2) { display: grid; line-height: 1.1; }
.app-brand strong { font-size: 1.1rem; }
.app-brand small,
.app-account small { margin-top: 0.25rem; color: rgba(255, 255, 255, 0.64); }
.app-account { text-align: right; }
.app-account > span:nth-child(2) { display: none; }
.account-initials {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
}

.app-shell {
  min-height: calc(100vh - 66px);
  min-height: calc(100dvh - 66px);
  display: flex;
  flex-direction: column;
}

.app-content {
  min-width: 0;
  padding: 1.5rem 1rem 3rem;
}

.app-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0.8rem 1rem;
  background: #10243b;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-heading {
  display: none;
  gap: 0.2rem;
  padding: 0 0.9rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.sidebar-heading strong { font-size: 1rem; }
.sidebar-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
.sidebar-nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-weight: 600;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-nav a[aria-current="page"] {
  background: var(--blue);
  color: #fff;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.65rem;
  padding: 0.65rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-footer > a { color: rgba(255, 255, 255, 0.7); font-size: 0.92rem; }
.sidebar-footer form { display: block; margin-left: auto; }
.portal-page .sidebar-footer button {
  width: auto;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
}
.portal-page .sidebar-footer button:hover { border-color: #fff; background: #fff; color: var(--ink); }

.app-page-heading {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: clamp(1.6rem, 3vw, 2.5rem);
}
.app-page-heading > div { width: 100%; }

.app-page-heading h1 {
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-size: 1.85rem;
  line-height: 1.15;
  text-wrap: balance;
}

.app-page-heading p:not(.eyebrow) { margin: 0.8rem 0 0; color: var(--muted); font-size: 1.08rem; }
.app-page-heading .button { width: 100%; flex: 0 0 auto; justify-content: center; margin-top: 1rem; text-align: center; }

.app-shell-page button,
.app-shell-page .button { border-radius: 8px; }

.directory-panel {
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  background: #fff;
}

.directory-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem clamp(1rem, 2vw, 1.75rem);
  border-bottom: 1px solid var(--line);
}

.directory-result { margin: 0; color: var(--muted); }
.directory-toolbar > .directory-result:only-child { grid-column: 1 / -1; }
.filter-disclosure { grid-column: 2; }
.filter-disclosure[open] { grid-column: 1 / -1; }
.filter-disclosure summary {
  width: max-content;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-left: auto;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(17, 17, 17, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.filter-disclosure summary::-webkit-details-marker { display: none; }
.filter-disclosure summary::marker { content: ""; }
.filter-disclosure summary:hover { border-color: rgba(17, 17, 17, 0.38); background: #f7f9fc; }
.filter-disclosure summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.filter-disclosure[open] summary { margin-bottom: 1rem; background: #f0f5fc; border-color: rgba(0, 71, 187, 0.28); color: var(--blue); }
.filter-icon { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; }
.portal-page .directory-filters {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 0.75rem;
}

.portal-page .directory-filters label { gap: 0.35rem; font-size: 0.86rem; }
.portal-page select {
  width: 100%;
  min-height: 50px;
  padding: 0.8rem 2.2rem 0.8rem 0.9rem;
  border: 1px solid rgba(17, 17, 17, 0.22);
  border-radius: 12px;
  background-color: var(--paper);
  color: var(--ink);
  font: inherit;
}
.portal-page select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 71, 187, 0.12); outline: 0; }
.filter-reset { min-height: 50px; display: inline-flex; align-items: center; padding-inline: 0.3rem; font-weight: 700; }
.portal-page .directory-filters button { width: 100%; }
.filter-reset { justify-content: center; }

.directory-table-wrap { overflow: hidden; }
.directory-table { width: 100%; min-width: 0; display: block; border-collapse: collapse; color: var(--ink); }
.directory-table thead { display: none; }
.directory-table tbody { width: 100%; display: grid; }
.directory-table tr { width: 100%; display: grid; padding: 0.55rem 1rem; }
.directory-table th,
.directory-table td { text-align: left; vertical-align: middle; }
.directory-table td {
  display: grid;
  grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 0;
}
.directory-table td::before {
  content: attr(data-label);
  color: #4d5b6b;
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.directory-table th {
  background: #f4f7fa;
  color: #4d5b6b;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.directory-table tbody tr + tr { border-top: 1px solid var(--line); }
.directory-table tbody tr:hover { background: #f8fbff; }
.directory-table td:first-child { min-width: 0; }
.directory-table td:first-child::before { grid-row: 1 / span 2; align-self: start; }
.directory-table td:first-child strong,
.directory-table td:first-child span { display: block; grid-column: 2; }
.directory-table td:first-child strong,
.directory-table td:first-child span { min-width: 0; overflow-wrap: anywhere; }
.directory-table td:first-child span { margin-top: 0.15rem; color: var(--muted); font-size: 0.9rem; }

.type-label,
.status-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.type-label { background: #e9f1ff; color: #164f9f; }
.type-admin { background: #e8e6ff; color: #4035a5; }
.type-coach { background: #fff0dc; color: #8a4b00; }
.type-team_responsible { background: #e4f3f1; color: #14635b; }
.status-active { background: #e5f6eb; color: #17663a; }
.status-approved { background: #e5f6eb; color: #17663a; }
.status-pending { background: #fff3d8; color: #7b5500; }
.status-rejected,
.status-revoked { background: #f0f1f3; color: #5c626a; }
.status-disabled { background: #f0f1f3; color: #5c626a; }
.status-published { background: #e5f6eb; color: #17663a; }
.status-draft { background: #fff3d8; color: #7b5500; }
.status-archived { background: #f0f1f3; color: #5c626a; }
.article-status-heading { display: inline-block; padding-inline-start: 0.7rem; }
.article-directory-table .status-label { justify-self: start; }
.empty-row { padding-block: 3rem !important; color: var(--muted); text-align: center !important; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.directory-notice { margin: 1rem 1rem 0; }
.directory-actions { align-items: start !important; }
.directory-actions > * { grid-column: 2; }
.icon-actions { gap: 0.25rem; }
.icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--blue);
  text-decoration: none;
}
.icon-button svg { width: 1.25rem; height: 1.25rem; }
.icon-button:hover { border-color: rgba(0, 71, 187, 0.2); background: #edf4ff; }
.danger-icon { color: #9b1c25; }
.danger-icon:hover { border-color: rgba(155, 28, 37, 0.2); background: #fff0f1; }

.form-panel,
.data-panel { max-width: 58rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.form-panel { max-width: 42rem; }
.bulk-panel { padding: clamp(1rem, 2vw, 1.5rem); border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.bulk-panel form { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.bulk-steps { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin: 0 0 1.25rem; padding: 0; list-style: none; counter-reset: bulk-step; }
.bulk-steps li { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-weight: 700; }
.bulk-steps li::before { counter-increment: bulk-step; content: counter(bulk-step); display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border: 1px solid var(--line); border-radius: 50%; }
.bulk-steps li:not(:last-child)::after { content: '→'; margin-left: .35rem; color: var(--muted); }
.bulk-steps li.current { color: var(--blue); }
.bulk-steps li.current::before { content: '✓'; border-color: var(--blue); background: var(--blue); color: #fff; }
.bulk-steps li.done::before { content: '✓'; border-color: #247349; background: #247349; color: #fff; }
.bulk-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; }
.bulk-table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; contain: paint; }
.bulk-table { width: 100%; min-width: 730px; border-collapse: collapse; }
.bulk-table th, .bulk-table td { padding: .65rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.bulk-table th { color: var(--muted); font-size: .85rem; }
.bulk-table td:nth-child(3) { position: relative; }
.portal-page .bulk-table input { min-height: 42px; padding: .45rem .6rem; border-radius: 6px; font-size: .94rem; }
.portal-page .bulk-table input[readonly] { border-color: transparent; background: transparent; padding-inline: 0; }
.bulk-treatment { width: 15rem; overflow-wrap: anywhere; }
.bulk-success { color: #185c37; font-weight: 700; }
.bulk-error { color: #8c1721; font-weight: 700; }
.bulk-row-actions { white-space: nowrap; }
.portal-page .bulk-row-actions button { display: inline-grid; place-items: center; width: 42px; min-height: 42px; padding: .4rem; font-size: 1.4rem; }
.bulk-row-actions svg { width: 1.25rem; height: 1.25rem; }
.bulk-suggestions { position: absolute; z-index: 2; top: calc(100% - .5rem); left: .5rem; right: .5rem; max-height: 12rem; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 8px 20px #17283d22; }
.bulk-suggestions[hidden], .bulk-row-actions button[hidden] { display: none; }
.portal-page .bulk-suggestions button { display: block; width: 100%; min-height: 40px; padding: .45rem .6rem; border: 0; border-radius: 0; background: #fff; color: var(--ink); text-align: left; font-weight: 400; }
.portal-page .bulk-suggestions button:hover, .portal-page .bulk-suggestions button:focus-visible { background: #edf4ff; color: var(--ink); }
.team-create-form { max-width: 58rem; display: grid; gap: 1.25rem; }
.team-create-form label { margin: 0; }
.coach-multiselect { display: grid; gap: .4rem; }
.coach-multiselect select { width: 100%; min-height: 10rem; }
.coach-options { max-height: 15rem; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.coach-options[hidden] { display: none; }
.coach-option { display: block; width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: .65rem .8rem; background: #fff; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.coach-option:hover, .coach-option:focus-visible { background: #edf4ff; }
.coach-option[aria-selected="true"] { background: #dceaff; font-weight: 700; }
.coach-selected { margin: 0; color: var(--muted); }
.team-created-dialog { position: fixed; inset: 0; margin: auto; width: min(28rem, calc(100vw - 2rem)); border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; box-shadow: 0 20px 60px #17283d44; }
.team-created-dialog::backdrop { background: #10182088; }
.readers-dialog { width: min(26rem, calc(100vw - 2rem)); max-height: min(80dvh, 40rem); border: 1px solid var(--line); border-radius: 12px; padding: 0; color: var(--ink); background: #fff; box-shadow: 0 20px 60px #17283d44; }
.readers-dialog::backdrop { background: #10182088; }
.readers-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.25rem 1rem; }
.portal-page .readers-dialog h2 { margin: 0; font-size: 1.35rem; line-height: 1.2; text-wrap: balance; }
.readers-dialog-header p { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.readers-count { flex: 0 0 auto; padding: .35rem .6rem; border-radius: 6px; background: #edf4ff; color: var(--blue); font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.readers-search { padding: 0 1.25rem 1rem; }
.portal-page .readers-search label { display: block; margin-bottom: .4rem; font-size: .85rem; }
.portal-page .readers-search input { min-height: 42px; padding: .55rem .75rem; font-size: .95rem; }
.readers-search-count { margin: .45rem 0 0; color: var(--muted); font-size: .85rem; }
.readers-search-count:empty { display: none; }
.readers-dialog-content { max-height: min(50dvh, 22rem); overflow-y: auto; overscroll-behavior: contain; padding: 0 1.25rem; }
.readers-list { margin: 0; padding: 0; list-style: none; }
.readers-list li { display: flex; align-items: center; gap: .75rem; min-height: 3.5rem; padding: .65rem 0; border-top: 1px solid var(--line); }
.readers-list li[hidden], .readers-empty[hidden] { display: none; }
.reader-avatar { flex: 0 0 auto; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: #e9edf4; color: var(--ink); font-size: .8rem; font-weight: 700; }
.reader-name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; line-height: 1.35; }
.readers-empty { margin: 0; padding: .5rem 0 1.25rem; color: var(--muted); }
.portal-page .readers-dialog-footer { display: flex; justify-content: flex-end; margin-top: .25rem; padding: .85rem 1.25rem; border-top: 1px solid var(--line); }
.portal-page .readers-dialog-footer button { min-height: 40px; padding: .55rem 1rem; }
.configuration-form { display: grid; gap: 1.25rem; }
.configuration-row { display: grid; gap: .75rem; align-items: start; }
.configuration-row label { margin: 0; }
.configuration-row label small { display: block; font-weight: 400; color: var(--muted); }
.configuration-row input { width: 100%; max-width: 12rem; }
@media (min-width: 721px) { .configuration-row { grid-template-columns: minmax(0, 1fr) 12rem; } }
.form-actions,
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.row-actions.icon-actions { flex-wrap: nowrap; gap: 0.25rem; }
.danger-panel { border-color: rgba(155, 28, 37, 0.35); }
.portal-page .danger-button { border-color: #9b1c25; background: #9b1c25; }
.portal-page .danger-button:hover { border-color: #76141b; background: #76141b; }
.empty-state { max-width: 38rem; padding: 1.25rem 0; }
.empty-state h2 { margin: 0 0 0.35rem; font-size: 1.25rem; }
.empty-state p { margin: 0 0 1rem; color: var(--muted); }
.request-list,
.article-list,
.team-list { display: grid; }
.request-row,
.article-row,
.team-row { display: flex; flex-direction: column; align-items: flex-start; gap: 0.8rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.request-row:first-child,
.article-row:first-child,
.team-row:first-child { padding-top: 0; }
.request-row:last-child,
.article-row:last-child,
.team-row:last-child { padding-bottom: 0; border-bottom: 0; }
.request-row > div:first-child,
.article-row > div:first-child { display: grid; }
.request-row span,
.article-row span { color: var(--muted); }
.row-actions form { display: inline; }
.row-actions a { font-weight: 700; }
.password-reset-section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.password-reset-section h2 { margin: 0; font-size: 1.15rem; }
.password-reset-section p { max-width: 58ch; margin: 0.35rem 0 1rem; color: var(--muted); }
.password-reset-section form { display: block; }

@media (min-width: 721px) {
  .app-topbar { min-height: 74px; }
  .app-account > span:nth-child(2) { display: grid; }
  .app-shell {
    min-height: calc(100vh - 74px);
    min-height: calc(100dvh - 74px);
  }
  .app-content { padding: clamp(2rem, 4vw, 4rem); }
  .sidebar-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-page-heading { align-items: flex-end; flex-direction: row; gap: 2rem; }
  .app-page-heading h1 { font-size: 2.15rem; }
  .app-page-heading .button { width: max-content; }
  .portal-page .directory-filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .portal-page .directory-filters button { width: max-content; }
  .filter-reset { justify-content: flex-start; }
}

@media (min-width: 981px) {
  .app-shell { display: grid; grid-template-columns: 18rem minmax(0, 1fr); }
  .app-sidebar {
    padding: 2rem 1rem 1.4rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 0;
  }
  .sidebar-heading { display: grid; }
  .sidebar-nav { display: grid; grid-template-columns: 1fr; gap: 0.35rem; padding-block: 1.1rem; }
  .sidebar-nav a { min-height: 48px; border: 1px solid transparent; border-radius: 8px; }
  .sidebar-footer { display: grid; gap: 0.8rem; margin-top: auto; padding: 1.2rem 0.8rem 0; }
  .sidebar-footer form { margin-left: 0; }
  .portal-page .sidebar-footer button { width: 100%; min-height: 44px; padding: 0.85rem 1.25rem; }
  .portal-page .directory-filters { grid-template-columns: minmax(15rem, 1fr) minmax(10rem, 0.45fr) minmax(10rem, 0.45fr) auto auto; }
  .search-field { grid-column: auto; }
  .directory-table-wrap { overflow-x: auto; }
  .directory-table { min-width: 680px; display: table; }
  .directory-table thead { display: table-header-group; }
  .directory-table tbody { display: table-row-group; }
  .directory-table tr { display: table-row; padding: 0; }
  .directory-table th,
  .directory-table td { display: table-cell; padding: 1rem clamp(1rem, 2vw, 1.75rem); }
  .directory-table td::before { display: none; }
  .directory-table td:first-child { min-width: 14rem; }
  .directory-actions { width: 11rem; min-width: 11rem; padding-inline: 1rem !important; }
  .request-row,
  .article-row,
  .team-row { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (max-width: 980px) {
  .portal-page .topbar-inner { flex-wrap: nowrap; }
  .portal-page .nav { width: auto; flex-direction: row; }
  .portal-page .nav a { width: auto; text-align: center; }
}

@media (max-width: 720px) {
  .portal-label { display: none; }
  .portal-page .brand-name { font-size: 1.1rem; }
  .portal-page .brand img { width: 42px; height: 42px; }
  .portal-page .nav { flex-direction: column; align-items: flex-end; gap: 0; }
  .portal-page .nav a { min-height: 40px; padding-block: 0.4rem; font-size: 0.9rem; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .sidebar-nav a { padding-inline: 0.7rem; font-size: 0.9rem; }
  .grid > .panel { grid-column: 1 / -1; }
}

.article-editor-panel { max-width: 58rem; }
.team-readonly-panel { max-width: 58rem; }
.team-readonly-panel img { display: block; width: 100%; height: auto; aspect-ratio: 851 / 315; object-fit: cover; border-radius: 8px; margin-bottom: 1.25rem; }
.article-attachments-field { margin: 0 0 1.5rem; }
.article-attachments-field input[type="file"] { display: block; width: 100%; margin-top: .5rem; }
.article-attachment-list { list-style: none; padding: 0; margin: .75rem 0; }
.article-attachment-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.article-attachment-list a { flex: 1 1 12rem; }
.article-files { margin-top: 1rem; }
.article-files { padding: .65rem 1rem; }
.article-files h2 { font-size: 1rem; margin: 0; }
.article-files .article-attachment-list { margin: .2rem 0 0; }
.article-files .article-attachment-list li { padding: .25rem 0; }
.communication-addresses { margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.communication-addresses p { margin: .2rem 0; }
.communication-addresses a { color: var(--blue); text-decoration: underline; }
.article-content > h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.article-source-label[hidden] { display: none; }
.article-editor { margin-bottom: 1.25rem; }
.article-editor-toolbar.ql-toolbar,
.article-editor .ql-container { border-color: var(--line); }
.article-editor-toolbar.ql-toolbar {
  padding: 0.4rem 0.55rem;
  border-radius: 8px 8px 0 0;
  background: #f5f2ec;
}
.portal-page .article-editor-toolbar.ql-toolbar button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #40464d;
}
.portal-page .article-editor-toolbar.ql-toolbar button:hover,
.portal-page .article-editor-toolbar.ql-toolbar button:focus-visible,
.portal-page .article-editor-toolbar.ql-toolbar button.ql-active {
  background: #e2e8f0;
  color: var(--blue);
}
.article-editor-toolbar.ql-toolbar button svg { width: 20px; height: 20px; }
.article-editor-toolbar.ql-toolbar .ql-formats { margin-right: 0.45rem; }
.article-editor-toolbar.ql-toolbar .ql-picker { height: 28px; font-size: 0.9rem; }
.article-editor-toolbar.ql-toolbar .ql-picker-label { height: 28px; padding-block: 2px; }
.article-editor-toolbar.ql-toolbar .ql-color-picker,
.article-editor-toolbar.ql-toolbar .ql-icon-picker { width: 30px; }
.article-editor .ql-container {
  height: auto;
  min-height: 19rem;
  border-radius: 0 0 8px 8px;
  background: #fff;
  color: #171717;
  font: 1rem/1.65 "Source Sans 3", sans-serif;
}
.article-editor .ql-editor { min-height: 19rem; }
.article-form-actions { margin-top: 1.25rem; }
.article-editor-toolbar .ql-undo,
.article-editor-toolbar .ql-redo { font-size: 1rem; line-height: 1; }
.article-heading { align-items: flex-start; }
.article-status-action { margin-top: 1rem; }
.article-status-action button { width: max-content; }
.article-content { max-width: 58rem; font-size: 1.05rem; line-height: 1.72; overflow-wrap: anywhere; }
.article-content h2,
.article-content h3 { margin-top: 1.5em; }
.article-content a { text-decoration: underline; text-underline-offset: 0.15em; }
.article-lifecycle { display: flex; align-items: center; gap: 1rem; max-width: 58rem; margin-top: 1rem; }
.article-lifecycle h2 { margin: 0 auto 0 0; font-size: 1.15rem; }
.article-lifecycle form { margin: 0; }

.role-picker { margin: 0 0 1.25rem; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; }
.role-picker legend { padding-inline: 0.35rem; font-weight: 700; }
.checkbox-label { display: flex !important; flex-direction: row !important; align-items: center; gap: 0.55rem; margin: 0.45rem 0 !important; }
.checkbox-label input { width: 1.15rem !important; height: 1.15rem; margin: 0; }
.team-settings-page { width: 100%; max-width: 76rem; container-type: inline-size; }
.team-settings-heading { margin-bottom: 1.5rem; }
.team-settings-surface { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.settings-hidden-form { display: none !important; }
.team-settings-banner,
.team-settings-fields { min-width: 0; padding: clamp(1rem, 2.5vw, 1.75rem); }
.settings-section-heading { margin-bottom: 1rem; }
.settings-section-heading h2 { margin: 0; font-size: 1.15rem; line-height: 1.25; }
.settings-section-heading p { margin: 0.25rem 0 0; color: var(--muted); }
.team-banner { position: relative; overflow: hidden; border-radius: 10px; background: #171717; aspect-ratio: 851 / 315; }
.team-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portal-page .banner-edit-button {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(16, 20, 25, 0.86);
  color: #fff;
}
.portal-page .banner-edit-button:hover { border-color: #fff; background: #fff; color: var(--ink); }
.banner-edit-button svg,
.team-code-regenerate svg { width: 1.25rem; height: 1.25rem; }
.team-settings-fields { display: flex; flex-direction: column; gap: 1rem; border-top: 1px solid var(--line); }
.team-code-setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.65rem; }
.team-code-setting label { margin: 0; }
.team-code-form { margin: 0; }
.portal-page .team-code-regenerate { width: 50px; min-width: 50px; min-height: 50px; padding: 0; display: grid; place-items: center; }
.field-help { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.9rem; }
.banner-selection-status { margin: 0.55rem 0 0; color: #185c37; font-size: 0.9rem; font-weight: 600; overflow-wrap: anywhere; }
.team-settings-fields > .field-help { margin-top: -0.45rem; }
.team-settings-actions { display: flex; justify-content: flex-end; padding: 1rem; border-top: 1px solid var(--line); background: #f7f9fc; }
.portal-page .team-settings-actions button { width: 100%; }
.team-banner-dialog { width: min(34rem, calc(100vw - 2rem)); padding: 0; border: 0; border-radius: 12px; color: var(--ink); }
.team-banner-dialog::backdrop { background: rgba(7, 18, 30, 0.62); }
.team-banner-dialog[open] { display: grid; gap: 1.25rem; padding: 1.25rem; }
.team-banner-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.team-banner-dialog-heading h2 { margin: 0; font-size: 1.3rem; }
.team-banner-dialog-heading p { margin: 0.3rem 0 0; color: var(--muted); }
.portal-page .dialog-close-button { width: 44px; min-width: 44px; min-height: 44px; padding: 0; border-color: transparent; background: transparent; color: var(--ink); font-size: 1.6rem; line-height: 1; }
.portal-page .dialog-close-button:hover { border-color: var(--line); background: #f0f4f8; color: var(--ink); }
.banner-file-status { min-height: 1.5rem; margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.team-banner-dialog-actions { justify-content: flex-end; }
.portal-page button:disabled { cursor: not-allowed; opacity: 0.5; }
.portal-page button:disabled:hover { border-color: var(--blue); background: var(--blue); color: #fff; }
.team-list-identity { display: flex; align-items: center; gap: 0.85rem; }
.team-list-identity > span { display: grid; gap: 0.15rem; }
.team-banner-thumb { flex: 0 0 auto; width: 7.25rem; height: 2.7rem; border-radius: 5px; object-fit: cover; background: #171717; }

@media (min-width: 721px) {
  .portal-page .team-settings-actions button { width: max-content; min-width: 9rem; }
}

@container (min-width: 50rem) {
  .team-settings-surface { display: grid; grid-template-columns: minmax(28rem, 1.3fr) minmax(20rem, 0.85fr); }
  .team-settings-fields { border-top: 0; border-left: 1px solid var(--line); }
  .team-settings-actions { grid-column: 1 / -1; }
}

.portal-header-actions { display: flex; align-items: center; gap: clamp(0.4rem, 1.5vw, 1rem); margin-left: auto; }
.portal-header-actions a { color: #fff; text-decoration: none; font-weight: 700; padding: 0.55rem; border-radius: 8px; }
.portal-header-actions a:hover, .portal-header-actions a:focus-visible { background: rgba(255,255,255,.12); outline: 2px solid transparent; }
.portal-header-actions .help-link { display: grid; place-items: center; box-sizing: border-box; flex: 0 0 42px; width: 42px; height: 42px; padding: 0; border: 2px solid currentColor; border-radius: 50%; }
.portal-header-actions .help-link svg { display: block; width: 18px; height: 18px; }
@media (max-width: 720px) { .portal-header-actions a:first-child { max-width: 7.5rem; line-height: 1.15; font-size: .78rem; } .app-topbar { gap: .45rem; padding-inline: .65rem; } .app-account { gap: .2rem; } }

/* Compact portal navigation and quiet application surfaces. */
.app-shell-page { background: #f2f5f8; }
.mobile-section-menu { display: block; position: relative; }
.mobile-section-menu summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem .9rem;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.mobile-section-menu summary::-webkit-details-marker { display: none; }
.mobile-section-menu summary::after { content: '⌄'; font-size: 1.2rem; line-height: 1; }
.mobile-section-menu[open] summary::after { transform: rotate(180deg); }
.mobile-section-menu nav { display: grid; gap: .2rem; padding: .35rem 0 0; }
.mobile-section-menu a { display: flex; align-items: center; min-height: 44px; padding: .55rem .9rem; border-radius: 8px; color: #fff; text-decoration: none; font-weight: 600; }
.mobile-section-menu a:hover, .mobile-section-menu a:focus-visible { background: rgba(255,255,255,.13); }
.mobile-section-menu a[aria-current="page"] { background: var(--blue); }
.mobile-section-menu .mobile-return-link { display: none; border-top: 1px solid rgba(255,255,255,.25); border-radius: 0; }
.mobile-section-menu summary:focus-visible, .mobile-section-menu a:focus-visible, .sidebar-nav a:focus-visible,
.portal-page a:focus-visible, .portal-page button:focus-visible, .portal-page input:focus-visible,
.portal-page select:focus-visible, .portal-page textarea:focus-visible { outline: 3px solid #dcae42; outline-offset: 2px; }
.notice { border: 1px solid #b8ccea; border-radius: 8px; }
.notice.error { border-color: #d9a4a9; }
.notice.success { border-color: #a9cfb8; }
.field-error { display: block; margin: .15rem 0 .5rem; color: #8c1721; font-size: .92rem; font-weight: 700; }
.field-error[hidden] { display: none; }
.portal-page [aria-invalid="true"] { border-color: #a50f17 !important; box-shadow: 0 0 0 2px rgba(165,15,23,.15); }
.coach-empty { margin: 0; padding: .8rem; color: var(--muted); }
.coach-option[aria-selected="true"]::before { content: '✓ '; }
.coach-selected { min-height: 1.5rem; }
.copy-code-status { min-height: 1.5rem; margin: .5rem 0; color: #185c37; font-weight: 600; }
.team-created-dialog { display: none; }
.team-created-dialog[open] { display: grid; gap: .8rem; }
.team-created-dialog p { margin: 0; }
.team-created-dialog strong { user-select: all; font-size: 1.3rem; letter-spacing: .08em; }
.directory-table tbody tr { cursor: auto; }
.icon-actions { flex-wrap: wrap !important; }
.icon-button { width: auto; min-height: 44px; display: inline-flex; gap: .35rem; padding: .45rem .55rem; font-size: .85rem; font-weight: 700; }
@media (max-width: 980px) {
  .app-sidebar { padding: .65rem 1rem; }
  .sidebar-nav { display: none; }
  .app-content { padding-top: 1rem; }
}
@media (min-width: 981px) { .mobile-section-menu { display: none; } }
@media (max-width: 480px) {
  .app-shell-page .app-brand strong { font-size: .93rem; }
  .app-shell-page .app-brand small { font-size: .72rem; }
  .app-shell-page .app-brand img { width: 36px; height: 36px; }
  .app-shell-page .portal-header-actions a:first-child { display: none; }
  .app-shell-page .portal-header-actions .help-link { flex-basis: 40px; width: 40px; height: 40px; }
  .app-shell-page .account-initials { width: 40px; height: 40px; }
  .mobile-section-menu .mobile-return-link { display: flex; }
}
