:root {
  color-scheme: light;
  --page: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f1f4f8;
  --ink: #172033;
  --muted: #5c6575;
  --muted-strong: #475569;
  --line: #dce3ec;
  --line-soft: #edf2f7;
  --accent: #0a1628;
  --accent-press: #111e34;
  --accent-soft: #e9edf3;
  --accent-tint: #f3f5f8;
  --gold: #d4a574;
  --gold-soft: #f5f1e8;
  --danger: #b42318;
  --success: #157347;
  --shadow: 0 18px 50px rgba(15, 55, 104, 0.1);
  --font-family: "CW Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--font-family);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--ink);
}

body {
  min-height: 100dvh;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

[hidden] {
  display: none !important;
}

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

.app-shell {
  min-height: 100dvh;
  background: var(--page);
}

.app-bootstrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: var(--surface);
}

.app-bootstrap .spinner {
  width: 24px;
  height: 24px;
}

.notification-nudge {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  width: min(390px, calc(100vw - 40px));
  padding: 18px 46px 18px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 96%, var(--accent-soft));
  box-shadow: 0 20px 55px rgba(15, 55, 104, 0.2);
  animation: notification-nudge-in 180ms ease-out;
}

.app-update-notice {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(520px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 20px 55px rgba(15, 55, 104, 0.22);
}

.app-update-notice div {
  min-width: 0;
  flex: 1;
}

.app-update-notice p {
  margin: 4px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.4;
}

.app-update-notice .primary-action {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 560px) {
  .app-update-notice {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .app-update-notice .primary-action {
    width: 100%;
  }
}

.notification-nudge-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--accent-soft);
  font-size: 20px;
}

.notification-nudge-copy {
  display: grid;
  gap: 6px;
}

.notification-nudge-copy strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.notification-nudge-copy p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.45;
}

.notification-nudge-action {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notification-nudge-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
}

.notification-nudge-close:hover,
.notification-nudge-close:focus-visible {
  background: var(--surface-soft);
  color: var(--ink);
}

.notification-context-help {
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.5;
}

@keyframes notification-nudge-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .notification-nudge { animation: none; }
}

.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 420px);
  gap: 48px;
  align-items: center;
  padding: clamp(24px, 5vw, 64px);
  justify-content: center;
  background:
    linear-gradient(120deg, rgba(15, 55, 104, 0.045), transparent 34%),
    var(--surface);
}

.auth-brand {
  position: fixed;
  top: 24px;
  left: clamp(20px, 5vw, 56px);
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 17px;
}

.portal-logo {
  display: block;
  max-width: 156px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
}

.portal-logo-auth {
  margin-right: 2px;
}

.portal-logo-sidebar {
  width: 34px;
  flex: 0 0 34px;
}

.portal-attribution {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.01em;
}

.portal-attribution-auth {
  position: fixed;
  right: clamp(20px, 5vw, 56px);
  bottom: 24px;
}

.portal-attribution-sidebar {
  margin-top: auto;
  padding: 8px 4px 0;
}

.portal-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.78rem;
}

.portal-legal-links a,
.settings-legal a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.portal-legal-links-auth {
  justify-content: center;
  margin-top: 16px;
}

.settings-legal {
  display: grid;
}

.settings-legal .settings-row {
  text-decoration: none;
}

.auth-brand strong,
.sidebar-header strong {
  color: var(--accent);
}

.auth-brand span,
.sidebar-header small,
.content-header span {
  color: var(--muted);
  font-size: 13px;
}

.auth-copy {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-copy h1,
.detail-empty h2,
.product-heading h2,
.settings-panel h2,
.notification-panel h2,
.offline-panel h2 {
  margin: 0;
  line-height: 1.04;
  font-weight: 760;
}

.auth-copy h1 {
  max-width: 13ch;
  font-size: 50px;
}

.auth-copy p:not(.eyebrow),
.detail-empty p,
.notification-panel p,
.offline-panel p,
.product-heading p {
  margin: 18px 0 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.auth-panel {
  display: grid;
  gap: 15px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.reset-action-status {
  justify-items: start;
}

.reset-action-status h2,
.reset-action-status p {
  margin: 0;
}

.reset-action-status p {
  color: var(--muted);
  line-height: 1.5;
}

.reset-action-buttons {
  display: grid;
  width: 100%;
  gap: 10px;
}

.auth-access-toggle {
  justify-self: start;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 750;
  text-align: left;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.segmented-control button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.segmented-control button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(16, 24, 40, 0.08);
}

.auth-panel-copy {
  display: grid;
  gap: 5px;
}

.auth-panel-copy h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.auth-panel-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.claim-notice {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid rgba(15, 55, 104, 0.16);
  border-radius: 10px;
  background: var(--accent-soft);
}

.claim-notice strong {
  color: var(--accent);
  font-size: 13px;
}

.claim-notice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.field,
.claim-strip label,
.search-field {
  display: grid;
  gap: 7px;
}

.field span,
.claim-strip span,
.field small {
  color: var(--muted);
  font-size: 13px;
}

.field span,
.claim-strip span {
  font-weight: 700;
}

.field input,
.claim-strip input,
.search-field input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

.field input:focus,
.claim-strip input:focus,
.search-field input:focus {
  border-color: rgba(15, 55, 104, 0.45);
  box-shadow: 0 0 0 3px rgba(15, 55, 104, 0.08);
}

.primary-action,
.secondary-action,
.danger-action,
.claim-strip button,
.text-button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 750;
}

.primary-action,
.claim-strip button {
  border: 0;
  background: var(--accent);
  color: white;
}

.primary-action:active,
.claim-strip button:active {
  background: var(--accent-press);
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.danger-action,
.text-button {
  border: 0;
  background: transparent;
}

.danger-action {
  color: var(--danger);
}

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

.inline-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.inline-status[data-tone="error"] {
  color: var(--danger);
}

.inline-status[data-tone="success"] {
  color: var(--success);
}

.workspace-shell {
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(308px, 368px) minmax(0, 1fr);
  background: var(--surface);
}

.sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 16px;
  overflow: hidden;
}

.sidebar-navigation {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar-footer {
  flex: 0 0 auto;
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.sidebar-logout {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--danger);
  padding: 0 10px;
  font-weight: 760;
  text-align: left;
}

.sidebar-logout:hover {
  background: rgba(180, 35, 24, 0.07);
}

.sidebar-header,
.content-header,
.product-heading,
.product-actions,
.permission-row,
.settings-row {
  display: flex;
  align-items: center;
}

.sidebar-header,
.content-header {
  justify-content: space-between;
  gap: 14px;
}

.sidebar-header div,
.content-header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.content-header > div {
  flex: 1;
}

.brand-lockup {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.brand-lockup > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-lockup small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: white;
  font-size: 15px;
  font-weight: 800;
}

.content-header strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-toggle {
  flex: 0 0 auto;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.claim-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.redeem-panel {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.redeem-panel summary {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 11px;
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  list-style: none;
}

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

.redeem-panel summary::after {
  content: "+";
  margin-left: auto;
  color: var(--accent);
  font-size: 18px;
  font-weight: 500;
}

.redeem-panel[open] summary {
  border-bottom: 1px solid var(--line-soft);
}

.redeem-panel[open] summary::after {
  content: "−";
}

.redeem-panel .claim-strip {
  padding: 10px;
}

.claim-strip input {
  height: 44px;
  border-color: var(--line);
  background: var(--surface);
}

.claim-strip button {
  min-height: 44px;
  padding-inline: 16px;
}

.claim-strip span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sidebar-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 22px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.sidebar-section-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-transform: none;
}

.search-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}

.search-field .icon {
  width: 17px;
  height: 17px;
}

.search-field input {
  height: auto;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.search-field input:focus {
  box-shadow: none;
}

.access-summary {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(184, 135, 34, 0.22);
  border-radius: 10px;
  background: rgba(184, 135, 34, 0.08);
}

.access-summary[hidden] {
  display: none;
}

.access-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.access-summary span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.space-select select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  font-weight: 650;
}

.module-nav {
  display: grid;
  gap: 3px;
}

.module-nav button {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.module-nav button.is-active {
  background: var(--accent-tint);
  box-shadow: inset 3px 0 0 var(--accent);
}

.module-nav button > span {
  color: var(--accent);
  font-size: 15px;
  text-align: center;
}

.module-nav strong {
  font-size: 14px;
}

.sidebar-module-products {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.sidebar-product-list {
  display: grid;
  gap: 3px;
}

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

.learning-course-detail {
  display: grid;
}

.learning-player-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.learning-player {
  position: relative;
  min-height: 140px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-soft);
  color: var(--muted);
}

.learning-player-status {
  z-index: 1;
  display: flex;
  min-height: 140px;
  width: 100%;
  padding: 24px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  text-align: center;
}

.learning-player mux-player + .learning-player-status {
  position: absolute;
  inset: 0;
  min-height: 0;
  background: color-mix(in srgb, var(--surface-soft) 88%, transparent);
}

.learning-chat-error {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.learning-chat-error[hidden],
.learning-player-status[hidden] {
  display: none;
}

.learning-chat-error p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.learning-chat-error .secondary-action {
  justify-self: start;
}

.learning-player mux-player {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.learning-course-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(380px,min(36%,560px)); gap:16px; align-items:start; }.learning-course-layout .learning-player { align-self:start; margin:0; min-height:0; }.learning-video-context { display:flex; align-items:center; min-height:20px; margin:-2px 0 0; color:var(--muted); font-size:13px; line-height:1.4; }.learning-coach-panel { align-self:start; display:flex; min-width:0; height:min(620px,calc(100dvh - 126px)); min-height:360px; flex-direction:column; gap:8px; }.learning-coach-panel .chat-status { margin:0; }.learning-webchat-host { display:flex; min-height:0; flex:1 1 auto; overflow:hidden; border:1px solid var(--line); border-radius:14px; background:var(--surface); }.learning-webchat-host > * { height:100%; min-height:0; flex:1 1 auto; }.workspace-shell.sidebar-collapsed .learning-course-layout { grid-template-columns:minmax(0,1fr) minmax(420px,min(38%,620px)); }

.learning-lesson-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
}

.learning-lesson-step {
  min-height: 42px;
  padding: 8px 12px;
  font-size: 14px;
}

.learning-lesson-step-next {
  margin-left: auto;
}

.learning-lesson-list {
  display: grid;
  gap: 8px;
}

.learning-section-heading {
  margin: 12px 0 0;
}

.sidebar-course-back { width:max-content; padding:0; }
.sidebar-course-title { margin:0; color:var(--ink); font-size:13px; font-weight:800; line-height:1.35; }
.sidebar-course-row { width:100%; min-height:58px; padding:9px 10px; text-align:left; }.sidebar-course-row .product-row-copy small { display:none; }.sidebar-course-row em { display:none; }.sidebar-course-row.is-selected { border-color:#a9c0dd; background:#f3f7ff; }
.sidebar-learning-section-heading { margin-top:8px; }
.sidebar-learning-lesson { font-size:13px; padding:10px 11px; }

.learning-lesson-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 14px;
  text-align: left;
  font: inherit;
}

.learning-lesson-row:hover,
.learning-lesson-row.is-selected {
  border-color: rgba(15, 55, 104, 0.35);
  background: var(--accent-tint);
}

.product-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: minmax(42px, auto) auto;
  column-gap: 12px;
  row-gap: 10px;
  align-items: start;
  min-height: 132px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding: 16px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
}

.product-row:hover,
.product-row.is-selected {
  border-color: rgba(15, 55, 104, 0.35);
  background: var(--accent-tint);
  box-shadow: 0 8px 20px rgba(15, 55, 104, 0.08);
}

.redeem-product-card {
  cursor: default;
  align-content: start;
}

.redeem-product-card:hover {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
}

.redeem-product-avatar {
  border: 1px dashed rgba(15, 55, 104, 0.35);
  background: var(--accent-tint);
  font-size: 24px;
  font-weight: 500;
}

.redeem-product-controls {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.redeem-product-controls input {
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 11px;
  font: inherit;
}

.redeem-product-controls input:focus {
  outline: 2px solid rgba(15, 55, 104, 0.2);
  outline-offset: 1px;
  border-color: rgba(15, 55, 104, 0.5);
}

.redeem-product-controls .primary-action {
  min-height: 44px;
  padding-inline: 14px;
}

.redeem-product-message {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
}

.product-row-avatar,
.product-avatar {
  display: inline-grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--accent);
  font-weight: 760;
}

.product-row-avatar img,
.product-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.product-row-avatar {
  width: 42px;
  height: 42px;
  font-size: 15px;
}

.product-row-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.product-row-copy strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 15px;
  line-height: 1.3;
}

.product-row-copy small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.product-row em {
  grid-column: 1 / -1;
  justify-self: start;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--gold-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  font-style: normal;
}

.product-row[data-access="locked"] em,
.product-row[data-access="claim_required"] em {
  color: var(--ink);
}

.product-row[data-access="inactive"] em {
  color: var(--muted);
}

.sidebar-product-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  grid-template-rows: auto;
  gap: 9px;
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  padding: 7px 8px;
}

.sidebar-product-row:hover,
.sidebar-product-row.is-selected {
  border-color: transparent;
  background: rgba(15, 55, 104, 0.06);
  box-shadow: none;
}

.sidebar-product-row .product-row-avatar {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.sidebar-product-row .product-row-copy strong {
  -webkit-line-clamp: 1;
  font-size: 14px;
}

.sidebar-product-row .product-row-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.sidebar-product-row em {
  grid-column: auto;
  align-self: center;
  justify-self: end;
  padding: 0;
  background: transparent;
  font-size: 11px;
}

.empty-access,
.list-empty {
  padding: 18px 0;
  color: var(--muted);
}

.empty-access h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.12;
}

.empty-access p:not(.eyebrow) {
  margin: 8px 0 0;
  line-height: 1.45;
}

.content-surface {
  min-width: 0;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px clamp(30px, 5vw, 64px);
  overflow-y: auto;
}

.content-header {
  min-height: 50px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.content-header.has-course-title {
  min-height: 66px;
  align-items: center;
}

.content-header.has-course-title strong {
  font-size: 19px;
}

.content-header.has-course-title [data-active-summary] {
  display: block;
  max-width: min(760px, 58vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-only {
  display: none;
}

.inline-alert {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff5f3;
  color: var(--danger);
  font-size: 14px;
}

.inline-alert[data-tone="success"] {
  background: #eef8f2;
  color: var(--success);
}

.inline-alert[data-tone="muted"] {
  background: var(--surface-soft);
  color: var(--muted);
}

.inline-alert button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 750;
  padding: 0 8px;
}

.detail-empty,
.product-detail,
.settings-panel,
.notification-panel,
.offline-panel {
  width: 100%;
  max-width: 860px;
  margin: 0;
  padding: 30px 0;
}

.detail-empty {
  max-width: 1080px;
  align-self: stretch;
  margin: 0 auto;
}

.detail-empty.has-learning-course {
  padding-top: 16px;
}

.module-overview-header {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.module-overview-header .eyebrow {
  margin-bottom: 0;
}

.module-overview-header h2 {
  font-size: 34px;
}

.detail-empty h2,
.settings-panel h2,
.notification-panel h2,
.offline-panel h2 {
  font-size: 34px;
}

.product-heading {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.product-heading > div {
  flex: 1;
  min-width: 0;
}

.product-avatar {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  font-size: 18px;
}

.product-heading h2 {
  font-size: 30px;
}

.access-help {
  margin-top: 10px !important;
  max-width: 58ch !important;
  font-size: 14px !important;
}

.access-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.access-badge[data-access="owned"] {
  background: #eef8f2;
  color: var(--success);
}

.access-badge[data-access="locked"],
.access-badge[data-access="claim_required"] {
  background: var(--gold-soft);
  color: var(--ink);
}

.access-badge[data-access="inactive"] {
  background: var(--surface-soft);
  color: var(--muted);
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.product-meta div {
  display: grid;
  gap: 5px;
  min-height: 58px;
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fbfcfe;
}

.product-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.product-meta strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-actions {
  gap: 10px;
  padding: 18px 0 0;
}

.runtime-status-panel {
  max-width: 760px;
  margin: 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid #e4b96b;
  border-radius: 12px;
  background: #fff8e8;
  color: var(--ink);
}

.runtime-status-panel[hidden] {
  display: none;
}

.runtime-status-panel div {
  display: grid;
  gap: 5px;
}

.runtime-status-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.runtime-status-panel .secondary-action {
  flex: 0 0 auto;
}

.product-access-panel {
  max-width: 660px;
  margin: 30px auto 0;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.product-access-panel h3 {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
}

.product-access-panel > p:not(.eyebrow, .inline-status) {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.product-access-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 22px;
}

.product-access-form .primary-action {
  min-height: 46px;
}

.product-access-panel .inline-status {
  margin-top: 10px;
}

.product-purchase-block {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
}

.product-detail[data-chat-open="true"] {
  max-width: none;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 0 0;
}

.product-detail[data-chat-open="true"] .product-heading,
.product-detail[data-chat-open="true"] .product-meta,
.product-detail[data-chat-open="true"] .product-actions,
.product-detail[data-chat-open="true"] .runtime-status-panel,
.product-detail[data-chat-open="true"] .product-access-panel {
  display: none;
}

.product-detail[data-chat-open="true"] .webchat-host {
  flex: 1;
  min-height: 0;
  height: auto;
}

.content-header .text-button {
  min-height: 44px;
  font-size: 14px;
}

.chat-status {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  color: var(--muted);
  font-size: 14px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.webchat-host {
  height: calc(100dvh - 210px);
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.settings-list {
  display: grid;
  max-width: 620px;
  border-top: 1px solid var(--line);
}

.settings-row,
.permission-row {
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
}

.settings-row span,
.permission-row span {
  color: var(--muted);
}

.settings-row strong,
.permission-row strong {
  overflow-wrap: anywhere;
  text-align: right;
}

.settings-language-row select {
  max-width: min(320px, 58vw);
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 34px 0 10px;
  font: inherit;
  font-weight: 650;
}

.notification-panel,
.offline-panel {
  max-width: 620px;
}

.notification-install-guide {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
}

.notification-install-guide p {
  margin: 8px 0;
}

.notification-install-guide ol {
  margin: 10px 0;
  padding-left: 22px;
  color: var(--muted);
}

.notification-install-guide li + li {
  margin-top: 7px;
}

.notification-install-guide small {
  color: var(--muted);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 16px;
    align-content: start;
    align-items: start;
    padding: 58px 18px 14px;
  }

  .auth-brand {
    top: 18px;
    left: 18px;
  }

  .auth-copy h1 {
    max-width: 13ch;
    font-size: 30px;
  }

  .auth-copy p:not(.eyebrow) {
    margin-top: 10px;
    font-size: 15px;
  }

  .auth-panel {
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    box-shadow: none;
  }

  .auth-panel-copy h2 {
    font-size: 19px;
  }

  .auth-panel-copy p,
  .field small {
    font-size: 13px;
  }

  .field,
  .claim-strip label,
  .search-field {
    gap: 5px;
  }

  .field input {
    height: 44px;
  }

  .workspace-shell {
    display: block;
    height: 100dvh;
    min-height: 100dvh;
  }

  .workspace-shell[data-mobile-view="navigation"] .content-surface,
  .workspace-shell[data-mobile-view="list"] .sidebar,
  .workspace-shell[data-mobile-view="detail"] .sidebar {
    display: none;
  }

  .sidebar {
    min-height: 100dvh;
    max-height: 100dvh;
    border-right: 0;
    border-bottom: 0;
    gap: 9px;
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  }

  .product-access-form {
    grid-template-columns: 1fr;
  }

  .product-access-panel h3 {
    font-size: 26px;
  }

  .product-purchase-block {
    align-items: stretch;
    flex-direction: column;
  }

  .content-surface {
    height: 100dvh;
    min-height: 100dvh;
    padding: calc(12px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .mobile-only {
    display: inline-grid;
  }

  .content-header {
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface);
  }

  .detail-empty,
  .product-detail,
  .settings-panel,
  .notification-panel,
  .offline-panel {
    max-width: none;
    padding: 18px 0;
  }

  .module-overview-header h2 {
    font-size: 26px;
  }

  .product-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .detail-empty h2,
    .settings-panel h2,
    .notification-panel h2,
    .offline-panel h2 {
    font-size: 22px;
  }

  .primary-action,
  .secondary-action,
  .danger-action,
  .claim-strip button,
  .text-button {
    font-size: 15px;
  }

  .webchat-host {
    height: calc(100dvh - 164px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-height: 360px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    margin-right: -14px;
    margin-left: -14px;
  }

  .product-detail[data-chat-open="true"] {
    padding-top: 10px;
  }

  .product-detail[data-chat-open="true"] .webchat-host {
    height: calc(100dvh - 74px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-height: 0;
  }
}

@media (max-width: 420px) {
  .sidebar-header strong {
    font-size: 16px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .product-row {
    min-height: 118px;
  }

  .product-row-avatar {
    width: 42px;
    height: 42px;
  }

  .product-row em {
    font-size: 12px;
  }

  .redeem-product-controls {
    grid-template-columns: 1fr;
  }

  .content-header .text-button {
    font-size: 13px;
    padding-inline: 8px;
  }
}

@media (min-width: 701px) {
  .workspace-shell.sidebar-collapsed {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .workspace-shell.sidebar-collapsed .sidebar {
    align-items: stretch;
    padding: 12px;
    overflow-x: hidden;
  }

  .workspace-shell.sidebar-collapsed .sidebar-header {
    justify-content: center;
  }

  .workspace-shell.sidebar-collapsed .brand-lockup > span:last-child,
  .workspace-shell.sidebar-collapsed .sidebar-header .icon-button,
  .workspace-shell.sidebar-collapsed .sidebar-navigation > .sidebar-section-heading,
  .workspace-shell.sidebar-collapsed .sidebar-navigation > .access-summary,
  .workspace-shell.sidebar-collapsed .sidebar-navigation > .space-select,
  .workspace-shell.sidebar-collapsed .sidebar-navigation > .sidebar-module-products,
  .workspace-shell.sidebar-collapsed .portal-attribution-sidebar,
  .workspace-shell.sidebar-collapsed .sidebar-logout span {
    display: none;
  }

  .workspace-shell.sidebar-collapsed .sidebar-navigation {
    overflow: hidden;
  }

  .workspace-shell.sidebar-collapsed .sidebar-footer {
    justify-items: center;
  }

  .workspace-shell.sidebar-collapsed .sidebar-logout {
    width: 46px;
    justify-content: center;
    padding: 0;
  }

  .workspace-shell.sidebar-collapsed .module-nav button {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 46px;
    padding-inline: 0;
  }

  .workspace-shell.sidebar-collapsed .module-nav strong {
    display: none;
  }
}

@media (max-width: 1050px) {
  .learning-course-layout, .workspace-shell.sidebar-collapsed .learning-course-layout { grid-template-columns:1fr; }.learning-coach-panel { height:600px; }.learning-webchat-host { min-height:420px; }
}

@media (max-width: 700px) {
  .notification-nudge {
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    max-height: min(240px, calc(100dvh - 120px));
    overflow: auto;
  }

  .sidebar-toggle { display:none; }
  .content-header.has-course-title [data-active-summary] { max-width:60vw; }
  .learning-course-layout .learning-player { min-height:220px; }.learning-coach-panel { height:540px; min-height:0; }.learning-webchat-host { min-height:440px; }.learning-webchat-host > * { min-height:440px; }
}

html[data-theme-shape="rounded"] :is(
  .auth-panel,
  .segmented-control,
  .field input,
  .product-access-panel,
  .space-select select,
  .search-field,
  .module-nav button,
  .product-row,
  .sidebar-course-row,
  .settings-row,
  .primary-action,
  .secondary-action,
  .danger-action
) {
  border-radius: 16px;
}

html[data-theme-shape="rounded"] .brand-mark {
  border-radius: 12px;
}

html[data-theme-shape="square"] :is(
  .auth-panel,
  .segmented-control,
  .segmented-control button,
  .field input,
  .product-access-panel,
  .space-select select,
  .search-field,
  .module-nav button,
  .product-row,
  .sidebar-course-row,
  .settings-row,
  .primary-action,
  .secondary-action,
  .danger-action,
  .brand-mark
) {
  border-radius: 0;
}

html[data-theme-density="compact"] .auth-panel {
  gap: 10px;
  padding: 18px;
}

html[data-theme-density="compact"] .sidebar {
  gap: 7px;
  padding: 12px;
}

html[data-theme-density="compact"] :is(.module-nav button, .sidebar-product-row, .sidebar-course-row) {
  min-height: 44px;
  padding-block: 7px;
}

.member-module-workspace {
  min-width: 0;
  padding: clamp(18px, 3vw, 40px);
}

.member-module-workspace > * {
  max-width: 1200px;
  margin-inline: auto;
}

/* Brand OS D-037: semantic, scalable roles for the application shell. */
:root { --type-body: .9375rem; --type-control: .875rem; --type-helper: .875rem; --type-meta: .8125rem; }
html { font-size:100%; }
body { font-size:var(--type-body); line-height:1.5; }
.auth-shell { position:relative; align-content:center; padding-top:2rem; padding-bottom:3rem; background:var(--page); }
.auth-topbar { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1.5rem; }
.auth-brand { position:static; align-items:center; gap:.75rem; max-width:100%; min-width:0; flex:1 1 15rem; font-size:1rem; line-height:1.35; }
.auth-brand strong { font-weight:600; overflow-wrap:anywhere; }
.auth-language { position:static; min-width:0; max-width:100%; }
.auth-language select { min-height:2.75rem; max-width:100%; padding:.5rem .75rem; border:1px solid var(--line); border-radius:.5rem; color:var(--ink); background:var(--surface); font:inherit; font-size:var(--type-control); }
.auth-copy h1 { max-width:18ch; white-space:pre-line; overflow-wrap:anywhere; font-size:3rem; font-weight:600; line-height:1.12; text-wrap:balance; }
.auth-copy p:not(.eyebrow) { font-size:1rem; max-width:42ch; line-height:1.65; }
.eyebrow { font-size:var(--type-meta); font-weight:500; letter-spacing:.06em; }
.auth-panel { min-width:0; gap:1rem; padding:2rem; box-shadow:0 8px 32px color-mix(in srgb,var(--accent) 6%,transparent); }
.auth-panel :is(.field,input,button) { min-width:0; overflow-wrap:anywhere; }
.segmented-control { grid-template-columns:repeat(auto-fit,minmax(min(100%,7em),1fr)); }
.segmented-control button { font-size:var(--type-control); font-weight:500; }
.auth-recovery { justify-self:start; padding:.25rem 0; min-height:2.75rem; border:0; background:transparent; color:var(--accent-text,var(--accent)); font:inherit; font-size:var(--type-control); font-weight:500; text-align:left; text-decoration:underline; text-underline-offset:.2em; }
.auth-recovery.is-active { color:var(--ink); }
.auth-panel-copy h2 { font-size:1.375rem; font-weight:600; line-height:1.3; }
.auth-panel-copy p,.field small,.inline-status,.app-update-notice p { font-size:var(--type-helper); font-weight:400; line-height:1.5; }
.auth-access-toggle,.primary-action,.secondary-action,.text-button,.module-nav button { font-weight:500; font-size:var(--type-control); }
.field > span { font-size:var(--type-control); font-weight:500; }
.field input { font-size:1rem; }
.brand-lockup { min-width:0; gap:.75rem; }
.brand-lockup > span:last-child { min-width:0; }
.sidebar-header strong { display:block; font-size:.9375rem; font-weight:600; line-height:1.35; overflow-wrap:anywhere; }
.sidebar-header > div { gap:.75rem; min-width:0; }
.sidebar-header small { display:block; overflow:hidden; text-overflow:ellipsis; font-size:var(--type-meta); }
.sidebar-section-heading { font-size:var(--type-meta); font-weight:500; letter-spacing:.04em; gap:.5rem; }
.sidebar-section-heading small { font-size:var(--type-meta); font-weight:400; }
.sidebar-product-row .product-row-copy strong { font-size:var(--type-control); font-weight:500; }
.sidebar-product-row .product-row-copy small { font-size:var(--type-helper); font-weight:400; }
.sidebar-product-row em { font-size:var(--type-meta); font-weight:500; white-space:nowrap; }
.product-heading h2,.settings-panel h2,.notification-panel h2,.offline-panel h2,.detail-empty h2 { font-weight:600; }
.product-card h3,.product-row-copy strong { font-weight:600; }
:is(button,a,input,select,textarea):focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
/* Update messages take layout space instead of covering login or active controls. */
.app-update-notice { position:sticky; top:0; right:auto; width:100%; border-radius:0; margin:0; box-shadow:0 2px 10px color-mix(in srgb,var(--accent) 6%,transparent); }
@media(max-width:900px) {
  .auth-shell { grid-template-columns:minmax(0,1fr); padding:1.5rem 1.5rem 2rem; gap:2rem; }
  .auth-copy h1 { max-width:20ch; font-size:2rem; }
}
@media(max-width:480px) {
  .auth-shell { padding:1.25rem min(1.25rem,5vw) 2rem; gap:1.5rem; }
  .auth-brand { font-size:.9375rem; }
  .auth-topbar { margin-bottom:.5rem; }
  .auth-panel { padding:min(1.25rem,5vw); }
  .auth-copy p:not(.eyebrow) { font-size:1rem; }
  .auth-copy h1 { font-size:1.875rem; }
  .portal-attribution-auth { position:static; }
}
@media(prefers-reduced-motion:reduce) { .notification-nudge { animation:none; } }

.inline-status:empty { display:none; }

/* Member mobile navigation and the single app-owned coach identity header. */
.mobile-tab-bar { display:none; }
.active-coach-avatar { position:relative; flex:0 0 38px; width:38px; height:38px; display:grid; place-items:center; overflow:hidden; border-radius:50%; background:var(--accent-soft,var(--surface-soft)); color:var(--accent-text,var(--ink)); font-weight:500; }
.active-coach-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.content-header > .active-coach-avatar { min-width:38px; }
.content-header .active-heading { min-width:0; flex:1; }
.content-header .active-heading strong { overflow-wrap:anywhere; white-space:normal; text-overflow:clip; }
.related-course-links { display:flex; align-items:center; gap:8px; flex:0 0 auto; min-height:44px; border-bottom:1px solid var(--line); }
.related-course-links .text-button { min-height:44px; padding:6px 2px; text-align:left; overflow-wrap:anywhere; }
.related-course-links select { min-width:0; max-width:70%; min-height:44px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); font:inherit; }
.learning-view-switch { display:none; }
@media(max-width:700px) {
  .workspace-shell { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto; height:var(--member-viewport-height,100dvh); min-height:0; }
  .workspace-shell > :is(.sidebar,.content-surface) { grid-row:1; grid-column:1; height:auto; min-height:0; max-height:none; }
  .workspace-shell .content-surface { padding:calc(8px + env(safe-area-inset-top)) 14px 0; }
  .workspace-shell .sidebar { padding-bottom:12px; overflow-y:auto; }
  .mobile-tab-bar { grid-row:2; display:flex; align-items:stretch; justify-content:space-around; gap:2px; padding:4px 6px calc(4px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:var(--surface); }
  .mobile-tab-bar button { flex:1; min-width:0; min-height:52px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; padding:4px 2px; border:0; border-radius:8px; color:var(--muted); background:transparent; font:inherit; font-size:.6875rem; line-height:1.3; overflow-wrap:anywhere; }
  .mobile-tab-bar button[aria-current="page"] { color:var(--accent-text,var(--accent)); background:var(--accent-soft,var(--surface-soft)); }
  .mobile-tab-bar .icon { width:22px; height:22px; }
  .workspace-shell[data-mobile-view="list"] .content-header [data-action="back-to-overview"] { display:none; }
  .workspace-shell[data-keyboard-open="true"] { position:fixed; top:var(--member-viewport-top,0); inset-inline:0; z-index:5; }
  .workspace-shell[data-keyboard-open="true"] .mobile-tab-bar { display:none; }
  .workspace-shell[data-chat-open="true"] .content-header { flex:0 0 auto; min-height:56px; padding:0 0 8px; gap:8px; }
  .workspace-shell[data-chat-open="true"] .active-heading strong { font-size:1rem; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .workspace-shell[data-chat-open="true"] .product-detail { padding:0; }
  .workspace-shell[data-chat-open="true"] .webchat-host { height:auto; min-height:0; border:0; border-radius:0; }
  .workspace-shell[data-chat-open="true"] .content-surface { overflow:clip; }
  .workspace-shell:not([data-chat-open="true"]) .content-surface { padding-bottom:14px; }
  .learning-view-switch { display:flex; gap:4px; flex:0 0 auto; padding:6px 0; border-bottom:1px solid var(--line); }
  .learning-view-switch button { flex:1; min-height:44px; padding:8px; background:transparent; border:0; border-radius:8px; font:inherit; color:var(--muted); }
  .learning-view-switch button[aria-pressed="true"] { background:var(--accent-soft,var(--surface-soft)); color:var(--accent-text,var(--accent)); }
  .workspace-shell[data-course-open="true"][data-learning-view="course"] .learning-coach-panel { display:none; }
  .workspace-shell[data-course-open="true"][data-learning-view="chat"] :is(.learning-player-column,.learning-lesson-navigation) { display:none; }
  .workspace-shell[data-course-open="true"][data-learning-view="chat"] :is(.detail-empty,.learning-overview,.learning-course-detail,.learning-course-layout,.learning-coach-panel) { display:flex; flex-direction:column; flex:1; min-height:0; height:auto; padding-block:0; }
  .workspace-shell[data-course-open="true"][data-learning-view="chat"] .learning-webchat-host,.workspace-shell[data-course-open="true"][data-learning-view="chat"] .learning-webchat-host > * { flex:1; min-height:0; height:auto; }
  .workspace-shell[data-course-open="true"][data-learning-view="chat"] .learning-webchat-host { border:0; border-radius:0; margin-inline:-14px; }
  .workspace-shell[data-course-open="true"][data-learning-view="chat"] .content-header [data-active-summary] { display:none; }
}

/* Sidebar rows navigate to details; offers stay on detail and catalog cards. */
.sidebar-course-row { grid-template-columns:34px minmax(0,1fr) auto; grid-template-rows:auto; min-height:56px; gap:9px; align-items:center; padding:7px 8px; border:0; border-radius:8px; box-shadow:none; background:transparent; }
.sidebar-course-row .product-row-avatar { width:34px; height:34px; }
.sidebar-course-row[data-access="locked"] em,
.sidebar-product-row:is([data-access="locked"],[data-access="claim_required"]) em {
  display:inline-flex; align-items:center; gap:5px; grid-column:auto;
  padding:0; background:transparent; white-space:nowrap;
}
.sidebar-course-row[data-access="locked"] em::before,
.sidebar-product-row:is([data-access="locked"],[data-access="claim_required"]) em::before {
  content:""; flex:none; width:12px; height:14px; background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 18'%3E%3Crect x='2' y='8' width='12' height='8' rx='2' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M4.5 8V5a3.5 3.5 0 0 1 7 0v3' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Offer links are sibling controls so detail navigation and external actions
   remain separate keyboard/touch targets (never nested buttons or anchors). */
.offer-row { display:flex; flex-direction:column; gap:8px; min-width:0; }
.offer-row > .product-row { flex:1; }
.offer-link { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; overflow-wrap:anywhere; text-align:center; min-height:44px; }
.offer-row > .offer-link { align-self:flex-start; max-width:100%; }
.learning-access-panel { display:flex; flex-direction:column; gap:12px; }
.learning-access-panel > .offer-link { align-self:flex-start; }
.learning-course-layout[hidden], .learning-access-panel[hidden] { display:none; }
.learning-lesson-content { padding: 16px 0; line-height: 1.65; overflow-wrap: anywhere; }
.learning-lesson-content[hidden] { display: none; }
.learning-lesson-content p { margin: 0 0 10px; white-space: pre-wrap; }
.learning-lesson-content a { color: var(--color-primary, #245b87); text-decoration: underline; text-underline-offset: 3px; }
.learning-material { border-top: 1px solid var(--border, #dbe3ec); padding: 16px 0; }
.learning-material h3 { margin: 0 0 8px; font-size: 1rem; }
.learning-material-status { color: var(--text-secondary, #58687b); font-size: 0.9rem; }
.learning-material .secondary-action { display: block; margin-top: 8px; min-height: 44px; }
