/* OSEKOO Academy — UI/UX Pro Max design system */
:root {
  /* Deprecated compatibility aliases; new UI must use semantic/component roles. */
  --ds-primary: var(--color-action);
  --ds-primary-hover: var(--color-action-hover);
  --ds-primary-soft: var(--color-action-subtle);
  --ds-secondary: var(--color-warning);
  --ds-bg: var(--color-canvas);
  --ds-surface: var(--color-surface);
  --ds-surface-muted: var(--color-surface-subtle);
  --ds-text: var(--color-text);
  --ds-text-muted: var(--color-text-muted);
  --ds-border: var(--color-border);
  --ds-success: var(--color-success);
  --ds-danger: var(--color-danger);
  --ds-ring: var(--color-focus);
  --ds-radius-sm: var(--osekoo-radius-sm);
  --ds-radius-md: var(--osekoo-radius-lg);
  --ds-radius-lg: var(--osekoo-radius-xl);
  --ds-shadow-sm: var(--osekoo-shadow-sm);
  --ds-shadow-md: var(--osekoo-shadow-md);
  --ds-shadow-lg: var(--osekoo-shadow-lg);
  --ds-transition: var(--motion-interactive);
}

html { scroll-padding-top: 88px; }
body { color: var(--color-text); background: var(--color-canvas); font-family: var(--osekoo-font-sans); font-size: var(--osekoo-text-base); line-height: var(--osekoo-leading-body); }
h1, h2, h3, h4, h5, h6, .brand { color: var(--color-text); font-family: var(--osekoo-font-heading); letter-spacing: -.025em; }
p, li { text-wrap: pretty; }
a, button, input, select, textarea, summary { touch-action: manipulation; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: var(--focus-width) solid var(--ds-ring) !important; outline-offset: var(--focus-offset); }
.shell { width: min(100% - (2 * var(--space-page-gutter)), var(--content-max)); }
.section { padding-block: var(--space-section); }
.section.alt { background: var(--ds-surface-muted); }
.eyebrow { color: var(--ds-primary-hover); font-size: var(--osekoo-text-xs); font-weight: var(--osekoo-weight-bold); letter-spacing: var(--tracking-label); }
.lead { color: var(--ds-text-muted); font-size: clamp(1.06rem, 1.8vw, 1.25rem); line-height: 1.65; }

.site-header { border-bottom: 1px solid var(--color-border); background: var(--color-header-translucent); backdrop-filter: blur(14px); }
.nav { min-height: 76px; }
.links .primary-nav-item { min-height: var(--control-target-min); padding: 10px 12px; color: var(--color-text-muted); font-family: var(--osekoo-font-sans); font-size: .92rem; font-weight: var(--osekoo-weight-semibold); }
.links .primary-nav-item.active { color: var(--ds-primary-hover); }

/* Header navigation: keep the primary hierarchy calm and legible. The content
   shell remains optimized for reading, while the header gets enough room for
   its brand, destinations, language control, and account action. */
@media (min-width: 1181px) {
  .site-header .nav.shell {
    width: min(calc(100% - 32px), 90rem);
    gap: clamp(12px, 1.2vw, 20px);
  }
  .site-header .header-brand { flex: 0 0 auto; }
  .site-header .header-brand img { width: clamp(176px, 14vw, 210px); }
  .site-header .links {
    display: flex;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    justify-content: flex-end;
    gap: 4px;
    margin: 0;
  }
  .site-header .links .primary-nav-item {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 clamp(8px, .7vw, 12px);
    border: 0;
    border-radius: var(--osekoo-radius-md);
    font-size: clamp(.76rem, .78vw, .86rem);
    letter-spacing: .01em;
    line-height: 1.2;
    text-transform: none;
    white-space: nowrap;
    overflow-wrap: normal;
  }
  .site-header .links .primary-nav-item:hover,
  .site-header .links .primary-nav-item:focus-visible,
  .site-header .links .primary-nav-item.active {
    background: var(--color-action-subtle);
  }
  .site-header .links > .primary-nav-item:last-of-type { border: 0; }
}

/* Switch to the proven menu pattern before labels are forced to compress.
   This breakpoint is based on content fit, not a device-name assumption. */
@media (min-width: 861px) and (max-width: 1180px) {
  .site-header .nav { position: relative; }
  .site-header .menu { display: inline-flex; align-items: center; gap: 7px; }
  .site-header .links {
    display: none;
    position: absolute;
    z-index: var(--osekoo-z-overlay);
    top: 76px;
    right: 0;
    left: 0;
    max-height: calc(100vh - 76px);
    overflow: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: auto;
    margin: 0;
    padding: 18px max(20px, calc((100vw - 720px) / 2));
    border: 1px solid var(--color-border);
    border-top: 0;
    border-radius: 0 0 var(--osekoo-radius-lg) var(--osekoo-radius-lg);
    background: var(--color-surface);
    box-shadow: var(--osekoo-shadow-lg);
  }
  .site-header .links.open { display: flex; }
  .site-header .links .primary-nav-item,
  .site-header .links .btn {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--osekoo-radius-md);
    white-space: normal;
  }
  .site-header .links .btn { justify-content: center; }
}
.btn { min-height: var(--button-height); border-radius: var(--button-radius); background: var(--button-bg); box-shadow: var(--shadow-action-sm); font-family: var(--osekoo-font-sans); font-weight: var(--osekoo-weight-bold); transition: color var(--ds-transition), background var(--ds-transition), border-color var(--ds-transition), box-shadow var(--ds-transition); }
.btn:hover, .btn:focus-visible { background: var(--button-bg-hover); box-shadow: var(--shadow-action-md); transform: none; }
.btn:active, .btn.state-active { background: var(--button-bg-active); box-shadow: none; }
.btn:disabled, .btn[aria-disabled="true"] { color: var(--button-disabled-fg); background: var(--button-disabled-bg); box-shadow: none; cursor: not-allowed; }
.btn.destructive { color: var(--color-text-inverse); background: var(--button-danger-bg); box-shadow: none; }
.btn.destructive:hover, .btn.destructive:focus-visible { background: var(--button-danger-bg-hover); box-shadow: none; }
.btn.is-loading { gap: var(--osekoo-space-2); cursor: wait; }
.ds-spinner { width: var(--osekoo-space-4); height: var(--osekoo-space-4); border: 2px solid currentColor; border-right-color: transparent; border-radius: var(--osekoo-radius-full); animation: ds-spin var(--osekoo-duration-standard) linear infinite; }
@keyframes ds-spin { to { transform: rotate(1turn); } }
.icon { width: var(--icon-size-md); height: var(--icon-size-md); flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke-width); stroke-linecap: round; stroke-linejoin: round; }
.toast-stack { position: fixed; z-index: var(--osekoo-z-toast); top: var(--osekoo-space-4); right: var(--space-page-gutter); display: grid; gap: var(--osekoo-space-3); width: min(var(--toast-width), calc(100% - (2 * var(--space-page-gutter)))); }
.toast { display: grid; grid-template-columns: auto 1fr auto; gap: var(--osekoo-space-3); align-items: center; min-height: 52px; padding: var(--toast-padding); border: 1px solid var(--color-border); border-left: var(--osekoo-space-1) solid var(--color-action); border-radius: var(--toast-radius); color: var(--color-text); background: var(--color-surface); box-shadow: var(--toast-shadow); transition: opacity var(--motion-interactive), transform var(--motion-interactive); }
.toast.success { border-left-color: var(--color-success); }
.toast.warning { border-left-color: var(--color-warning); }
.toast.error { border-left-color: var(--color-danger); }
.toast.is-leaving { opacity: 0; transform: translateY(calc(-1 * var(--osekoo-space-2))); }
.toast-close { display: grid; place-items: center; width: var(--control-target-min); height: var(--control-target-min); padding: 0; border: 0; border-radius: var(--osekoo-radius-full); color: var(--color-text-muted); background: transparent; cursor: pointer; }
.toast-close:hover { color: var(--color-text); background: var(--color-surface-subtle); }
.btn.ghost { border-color: var(--color-border-strong); color: var(--osekoo-navy-700); background: var(--ds-surface); box-shadow: none; }
.btn.ghost:hover, .btn.ghost:focus-visible { border-color: var(--ds-primary); color: var(--ds-primary-hover); background: var(--ds-primary-soft); }
.btn.small { min-height: var(--control-target-min); }
.card { border: 1px solid var(--ds-border); border-radius: var(--ds-radius-md); background: var(--ds-surface); box-shadow: var(--ds-shadow-sm); }
.pill { border-color: var(--color-border-hover); color: var(--color-action-active); background: var(--color-action-subtle); }
.bar { overflow: hidden; border-radius: 999px; accent-color: var(--ds-primary); }
.pagehead { border-bottom: 1px solid var(--ds-border); background: var(--gradient-page); }
.pagehead h1 { max-width: 780px; }

/* Landing */
.academy-hero { position: relative; overflow: hidden; min-height: auto; padding-block: clamp(68px, 9vw, 118px); background: var(--gradient-hero); }
.academy-hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 520px; aspect-ratio: 1; border: 1px solid var(--hero-orbit-border); border-radius: 50%; box-shadow: var(--hero-orbit-shadow); }
.academy-hero-grid { position: relative; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: clamp(44px, 7vw, 92px); align-items: center; }
.academy-hero-copy { max-width: 730px; }
.academy-hero h1 { max-width: 720px; margin: 18px 0 24px; font-size: clamp(2.75rem, 6vw, 5.25rem); line-height: .99; }
.academy-hero h1 em { color: var(--ds-primary); font-style: normal; }
.academy-hero .lead { max-width: 630px; }
.academy-hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 0; margin: 42px 0 0; padding: 0; list-style: none; }
.hero-proof li { display: grid; gap: 0; min-width: 128px; padding: 0 24px; border-left: 1px solid var(--ds-border); }
.hero-proof li:first-child { padding-left: 0; border-left: 0; }
.hero-proof strong { color: var(--ds-text); font-family: var(--osekoo-font-heading); font-size: var(--osekoo-text-base); }
.hero-proof span { color: var(--ds-text-muted); font-size: .84rem; }
.learning-path-preview { padding: 30px; border: 1px solid var(--color-border-inverse); border-radius: var(--ds-radius-lg); color: var(--color-text-inverse-muted); background: var(--gradient-inverse); box-shadow: var(--ds-shadow-lg); }
.preview-label { display: block; margin-bottom: 24px; color: var(--osekoo-blue-300); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.learning-path-preview ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.learning-path-preview li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; min-height: 86px; padding-bottom: 20px; }
.learning-path-preview li > span { position: relative; display: grid; place-items: center; align-self: start; width: 40px; height: 40px; border: 1px solid var(--color-border-inverse-strong); border-radius: 12px; color: var(--color-text-inverse-soft); font-size: .75rem; font-weight: 700; background: var(--path-step-bg); }
.learning-path-preview li:not(:last-child) > span::after { content: ""; position: absolute; top: 40px; width: 1px; height: 45px; background: var(--path-connector); }
.learning-path-preview strong, .learning-path-preview small { display: block; }
.learning-path-preview strong { color: var(--color-text-inverse); font-family: var(--osekoo-font-heading); font-size: .96rem; }
.learning-path-preview small { margin-top: 4px; color: var(--color-text-inverse-muted); font-size: .84rem; }
.learning-path-preview > a { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding-top: 18px; border-top: 1px solid var(--color-border-inverse); color: var(--color-text-inverse); font-weight: 700; text-decoration: none; }
.section-heading, .catalog-results-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 36px; }
.section-heading h2, .catalog-results-heading h2 { margin-bottom: 0; }
.section-heading > p, .catalog-results-heading > p { max-width: 520px; margin: 0; color: var(--ds-text-muted); }

/* Catalogue */
.course-directory-head { padding-block: clamp(56px, 7vw, 86px); }
.course-directory-intro { align-items: end; }
.catalog-filter { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(170px, 220px) auto auto; gap: 14px; align-items: end; margin-top: 34px; padding: 18px; border: 1px solid var(--ds-border); border-radius: var(--ds-radius-md); background: var(--color-surface-translucent); box-shadow: var(--ds-shadow-md); }
.catalog-filter .search-field { display: grid; gap: 6px; }
.catalog-filter label { color: var(--color-text-muted); font-size: .8rem; font-weight: 700; }
.catalog-filter input, .catalog-filter select { width: 100%; min-height: var(--input-height); padding-inline: var(--input-padding-inline); border: 1px solid var(--input-border); border-radius: var(--input-radius); color: var(--color-text); background: var(--input-bg); font: inherit; }
.catalog-filter input:hover, .catalog-filter select:hover { border-color: var(--color-border-control-hover); }
.clear-filter { display: grid; place-items: center; min-height: 46px; color: var(--ds-primary-hover); font-weight: 700; }
.catalog-results-heading { margin-bottom: 30px; }
.cards { gap: 22px; }
.course-card { position: relative; display: flex; flex-direction: column; min-height: 330px; padding: 26px; overflow: hidden; transition: border-color var(--ds-transition), box-shadow var(--ds-transition); }
.course-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gradient-accent-line); }
.course-card:hover { border-color: var(--color-border-hover); box-shadow: var(--ds-shadow-md); transform: none; }
.course-card-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.course-number { color: var(--ds-text-muted); font-family: var(--osekoo-font-heading); font-size: var(--osekoo-text-xl); font-weight: var(--osekoo-weight-semibold); }
.course-card h3 { margin-top: 28px; font-size: 1.35rem; }
.course-card p { color: var(--ds-text-muted); }
.course-card-footer { margin-top: auto; padding-top: 24px; }
.course-card-link { min-height: var(--control-target-min); }
.empty { grid-column: 1 / -1; padding: 48px 28px; border: 1px dashed var(--color-border-empty); border-radius: var(--ds-radius-md); text-align: center; background: var(--ds-surface); }

/* Learner dashboard */
.dashboard-head .shell { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: end; }
.dashboard-head .lead { margin-bottom: 0; }
.dashboard-alert { grid-column: 1 / -1; }
.dashboard-section { padding-top: 48px; }
.dashboard-grid { gap: 20px; }
.dashboard-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-summary .dashboard-continue { grid-column: span 2; color: var(--color-text-inverse-soft); background: var(--gradient-inverse-wide); box-shadow: var(--ds-shadow-lg); }
.dashboard-summary .dashboard-continue h2, .dashboard-summary .dashboard-continue .eyebrow { color: var(--color-text-inverse); }
.dashboard-summary .dashboard-continue p { color: var(--color-text-inverse-muted); }
.dashboard-summary .dashboard-continue .bar { background: var(--progress-inverse-track); }
.dashboard-card { min-height: 220px; padding: 24px; }
.dashboard-card > h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
.dashboard-card > p { color: var(--ds-text-muted); }
.dashboard-continue > p { color: var(--color-text-inverse-muted); }
.dashboard-card a:not(.btn) { display: inline-flex; align-items: center; min-height: var(--control-target-min); margin-top: auto; color: var(--ds-primary-hover); font-weight: var(--osekoo-weight-bold); }
.dashboard-summary .dashboard-continue a:not(.btn) { color: var(--color-text-inverse); }
.dashboard-section > .section-title-row { margin-top: 62px; margin-bottom: 20px; }
.learning-signals { border-color: var(--ds-border); background: var(--ds-surface-muted); }

/* Practice hub */
.practice-groups { display: grid; gap: var(--osekoo-space-6); }
.practice-group { padding: var(--card-padding); }
.practice-group-heading, .practice-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--osekoo-space-5); }
.practice-group-heading h3 { margin: var(--osekoo-space-3) 0 0; }
.practice-group-heading > a { min-height: var(--control-target-min); display: inline-flex; align-items: center; color: var(--color-action-hover); font-weight: var(--osekoo-weight-bold); }
.practice-list { display: grid; margin: var(--osekoo-space-6) 0 0; padding: 0; border-top: 1px solid var(--color-border); list-style: none; }
.practice-list li { min-height: 76px; padding-block: var(--osekoo-space-3); border-bottom: 1px solid var(--color-border); }
.practice-list li > div { display: grid; grid-template-columns: 7rem minmax(12rem, 1fr) auto; gap: var(--osekoo-space-4); align-items: center; flex: 1; }
.practice-kind { color: var(--color-text-muted); font-size: var(--osekoo-text-sm); font-weight: var(--osekoo-weight-bold); text-transform: uppercase; letter-spacing: .08em; }
.practice-status { color: var(--color-text-muted); }

/* Living design-system reference */
.design-system-page { background: var(--color-canvas); }
.ds-hero { padding-block: var(--osekoo-space-16); border-bottom: 1px solid var(--color-border); background: var(--color-surface-subtle); }
.ds-hero h1 { max-width: 18ch; margin-block: var(--osekoo-space-3) var(--osekoo-space-4); font-size: clamp(var(--osekoo-text-4xl), 6vw, 4.5rem); line-height: var(--osekoo-leading-tight); }
.ds-hero .lead { max-width: 65ch; }
.ds-jump, .ds-row { display: flex; flex-wrap: wrap; gap: var(--osekoo-space-3); align-items: center; }
.ds-jump { margin-top: var(--osekoo-space-8); }
.ds-jump a, .ds-text-link { display: inline-flex; align-items: center; min-height: var(--control-target-min); color: var(--color-action-hover); font-weight: var(--osekoo-weight-bold); }
.ds-jump a { padding-inline: var(--osekoo-space-4); border: 1px solid var(--color-border-strong); border-radius: var(--osekoo-radius-full); background: var(--color-surface); text-decoration: none; }
.ds-showcase { padding-block: var(--osekoo-space-8) var(--osekoo-space-20); }
.ds-section { scroll-margin-top: var(--osekoo-space-24); padding-block: var(--osekoo-space-12); border-bottom: 1px solid var(--color-border); }
.ds-section-heading { max-width: var(--content-reading); margin-bottom: var(--osekoo-space-8); }
.ds-section-heading h2 { margin-block: var(--osekoo-space-2) var(--osekoo-space-3); font-size: clamp(var(--osekoo-text-2xl), 4vw, var(--osekoo-text-4xl)); }
.ds-section-heading p { color: var(--color-text-muted); }
.ds-preview { padding: var(--osekoo-space-6); border: 1px solid var(--color-border); border-radius: var(--osekoo-radius-lg); background: var(--color-surface); box-shadow: var(--osekoo-shadow-sm); }
.ds-preview > .ds-row + .ds-row { margin-top: var(--osekoo-space-5); }
.ds-form-grid, .ds-card-grid, .ds-feedback-grid, .ds-data-grid { display: grid; gap: var(--osekoo-space-5); }
.ds-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: var(--osekoo-space-2); align-content: start; }
.field label { font-weight: var(--osekoo-weight-bold); }
.field input, .field select { width: 100%; min-height: var(--input-height); padding-inline: var(--input-padding-inline); border: 1px solid var(--input-border); border-radius: var(--input-radius); color: var(--color-text); background: var(--input-bg); font: inherit; }
.field input:hover, .field select:hover { border-color: var(--color-text-muted); }
.field input:focus-visible, .field select:focus-visible { border-color: var(--input-border-focus); }
.field small { color: var(--color-text-muted); }
.field-error input { border-color: var(--input-border-error); }
.field-error small { color: var(--color-danger); }
.field input:disabled { color: var(--color-text-muted); background: var(--input-disabled-bg); cursor: not-allowed; }
.ds-search-preview { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(18rem, .8fr); gap: var(--osekoo-space-6); margin-top: var(--osekoo-space-5); }
.ds-input-action { position: relative; display: grid; grid-template-columns: 1fr auto; gap: var(--osekoo-space-2); }
.ds-input-action > .icon { position: absolute; z-index: 1; top: calc((var(--input-height) - var(--icon-size-md)) / 2); left: var(--osekoo-space-3); color: var(--color-text-muted); pointer-events: none; }
.ds-input-action input { padding-left: var(--osekoo-space-10); }
.ds-filter-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.ds-filter-group legend { display: flex; gap: var(--osekoo-space-2); align-items: center; margin-bottom: var(--osekoo-space-2); font-weight: var(--osekoo-weight-bold); }
.ds-filter-row { display: flex; flex-wrap: wrap; gap: var(--osekoo-space-2); }
.ds-filter { min-height: var(--control-target-min); padding-inline: var(--osekoo-space-4); border: var(--border-width) solid var(--color-border-strong); border-radius: var(--osekoo-radius-full); color: var(--color-text-muted); background: var(--color-surface); font: inherit; font-weight: var(--osekoo-weight-semibold); cursor: pointer; }
.ds-filter:hover { border-color: var(--color-action); color: var(--color-action-hover); }
.ds-filter[aria-pressed="true"] { border-color: var(--color-action); color: var(--color-action-active); background: var(--color-action-subtle); }
.ds-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: var(--card-padding); }
.ds-card h3 { overflow-wrap: anywhere; }
.ds-card p { color: var(--color-text-muted); }
.ds-card progress { width: 100%; margin-top: auto; }
.ds-card > a:last-child { display: inline-flex; align-items: center; min-height: var(--control-target-min); margin-top: var(--osekoo-space-4); color: var(--color-action-hover); font-weight: var(--osekoo-weight-bold); }
.ds-empty { border-style: dashed; box-shadow: none; }
.ds-feedback-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-alert { display: grid; grid-template-columns: auto 1fr; gap: var(--osekoo-space-3); align-items: start; padding: var(--alert-padding); border: 1px solid var(--color-border); border-left-width: var(--osekoo-space-1); border-radius: var(--alert-radius); background: var(--color-surface); }
.ds-alert > span { display: grid; gap: var(--osekoo-space-1); }
.ds-alert.info { border-left-color: var(--color-action); background: var(--color-action-subtle); }
.ds-alert.success { border-left-color: var(--color-success); background: var(--color-success-subtle); }
.ds-alert.warning { border-left-color: var(--color-warning); background: var(--color-warning-subtle); }
.ds-alert.danger { border-left-color: var(--color-danger); background: var(--color-danger-subtle); }
.ds-dialog-trigger { margin-top: var(--osekoo-space-6); }
.ds-static-toast { position: relative; width: min(100%, var(--toast-width)); margin-top: var(--osekoo-space-6); }
.ds-dialog { width: min(calc(100% - (2 * var(--space-page-gutter))), var(--dialog-width)); padding: 0; border: 1px solid var(--color-border); border-radius: var(--dialog-radius); color: var(--color-text); background: var(--color-surface); box-shadow: var(--dialog-shadow); }
.ds-dialog::backdrop { background: var(--dialog-scrim); }
.ds-dialog-content { padding: var(--osekoo-space-8); }
.ds-dialog-content h2 { margin-block: var(--osekoo-space-2) var(--osekoo-space-3); }
.ds-dialog-content .ds-row { justify-content: flex-end; margin-top: var(--osekoo-space-6); }
.ds-data-grid { grid-template-columns: minmax(16rem, .8fr) minmax(28rem, 1.2fr); align-items: start; }
.ds-progress-panel { padding: var(--card-padding); }
.ds-progress-item { display: grid; gap: var(--osekoo-space-2); margin-top: var(--osekoo-space-5); }
.ds-progress-item > span { display: flex; justify-content: space-between; gap: var(--osekoo-space-4); }
.ds-progress-item progress { width: 100%; }
.ds-chart { margin: var(--osekoo-space-8) 0 0; padding-top: var(--osekoo-space-5); border-top: 1px solid var(--color-border); }
.ds-chart figcaption { font-family: var(--osekoo-font-heading); font-weight: var(--osekoo-weight-bold); }
.ds-chart svg { display: block; width: 100%; height: auto; margin-top: var(--osekoo-space-3); overflow: visible; }
.ds-chart-grid { fill: none; stroke: var(--chart-grid); stroke-width: 1; }
.ds-chart-line { fill: none; stroke: var(--chart-line); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.ds-chart-points { fill: var(--chart-point-fill); stroke: var(--chart-line); stroke-width: 3; }
.ds-chart p { color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.ds-table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--osekoo-radius-lg); background: var(--color-surface); }
.ds-table-wrap table { width: 100%; border-collapse: collapse; }
.ds-table-wrap caption { padding: var(--osekoo-space-4); text-align: left; font-family: var(--osekoo-font-heading); font-weight: var(--osekoo-weight-bold); }
.ds-table-wrap th, .ds-table-wrap td { padding: var(--table-cell-padding-block) var(--table-cell-padding-inline); border-top: 1px solid var(--color-border); text-align: left; }
.ds-table-wrap thead { background: var(--color-surface-subtle); }
.ds-table-wrap .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.ds-status { display: inline-flex; padding: var(--osekoo-space-1) var(--osekoo-space-2); border-radius: var(--osekoo-radius-full); font-size: var(--osekoo-text-sm); font-weight: var(--osekoo-weight-bold); white-space: nowrap; }
.ds-status.success { color: var(--color-success); background: var(--color-success-subtle); }
.ds-status.warning { color: var(--osekoo-slate-900); background: var(--color-warning-subtle); }
.ds-status.neutral { color: var(--color-text-muted); background: var(--osekoo-slate-100); }

/* Reader accessibility and focus hierarchy */
.reader-page .site-header, .reader-page footer { display: none; }
.reader { background: var(--ds-bg); }
.reader-sidebar { background: var(--color-surface-inverse); }
.reader-sidebar .reader-back { width: var(--control-target-min); height: var(--control-target-min); }
.reader-unit summary { min-height: 48px; cursor: pointer; }
.reader-unit .reader-lesson { min-height: 46px; }
.reader-main { max-width: 900px; padding-inline: clamp(24px, 5vw, 72px); }
.lesson-heading { padding-bottom: 32px; border-bottom: 1px solid var(--ds-border); }
.lesson-heading h1 { max-width: 780px; font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: 1.08; }
.lesson-pager-top { min-height: 54px; border-bottom: 1px solid var(--ds-border); }
.lesson-pager-top a { display: inline-flex; align-items: center; min-height: var(--control-target-min); padding-inline: var(--osekoo-space-2); font-weight: var(--osekoo-weight-bold); }
.lesson-content { max-width: var(--content-reading); color: var(--osekoo-slate-800); font-size: 1.08rem; line-height: var(--osekoo-leading-reading); }
.lesson-content h2 { margin-top: 2.3em; padding-top: .3em; font-size: clamp(1.55rem, 3vw, 2rem); }
.lesson-content h3 { margin-top: 1.9em; }
.lesson-content pre, .lesson-content .highlight { border-radius: var(--ds-radius-md); }
.lesson-action-badge { min-height: var(--control-target-min); padding-inline: var(--osekoo-space-4); border-radius: var(--osekoo-radius-md); }
.lesson-notes { border: 1px solid var(--ds-border); border-radius: var(--ds-radius-md); background: var(--ds-surface-muted); }

@media (max-width: 1024px) {
  .academy-hero-grid { grid-template-columns: 1fr; }
  .learning-path-preview { max-width: 720px; }
  .catalog-filter { grid-template-columns: 1fr 200px auto; }
  .catalog-filter .clear-filter { grid-column: 1 / -1; justify-self: start; }
  .dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-data-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .shell { width: min(100% - 28px, 1180px); }
  .section { padding-block: 58px; }
  .academy-hero { padding-block: 56px 68px; }
  .academy-hero h1 { font-size: clamp(2.55rem, 13vw, 3.8rem); }
  .academy-hero .actions { display: grid; }
  .academy-hero .actions .btn { width: 100%; }
  .hero-proof { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .hero-proof li, .hero-proof li:first-child { min-width: 0; padding: 0 0 0 14px; border-left: 2px solid var(--color-border-hover); }
  .learning-path-preview { padding: 24px 20px; }
  .section-heading, .catalog-results-heading, .course-directory-intro { display: block; }
  .section-heading > p, .catalog-results-heading > p, .course-directory-intro > p { margin-top: 14px; }
  .catalog-filter { grid-template-columns: 1fr; }
  .catalog-filter .clear-filter { grid-column: auto; }
  .dashboard-head .shell { grid-template-columns: 1fr; }
  .dashboard-head .btn { justify-self: start; }
  .dashboard-summary { grid-template-columns: 1fr; }
  .dashboard-summary .dashboard-continue { grid-column: auto; }
  .practice-group-heading, .practice-list li { align-items: stretch; flex-direction: column; }
  .practice-list li > div { grid-template-columns: 1fr; gap: var(--osekoo-space-1); }
  .practice-list .btn { width: 100%; }
  .ds-form-grid, .ds-card-grid, .ds-feedback-grid { grid-template-columns: 1fr; }
  .ds-search-preview { grid-template-columns: 1fr; }
  .ds-input-action { grid-template-columns: 1fr; }
  .ds-input-action > .icon { top: calc((var(--input-height) - var(--icon-size-md)) / 2); }
  .ds-input-action .btn { width: 100%; }
  .ds-preview { padding: var(--osekoo-space-4); }
  .ds-dialog-content { padding: var(--osekoo-space-5); }
  .ds-dialog-content .ds-row { align-items: stretch; flex-direction: column-reverse; }
  .ds-dialog-content .btn { width: 100%; }
  .reader-main { padding-inline: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (forced-colors: active) {
  *, *::before, *::after { box-shadow: none !important; }
  a, button, input, select, textarea, [tabindex] { forced-color-adjust: auto; }
  a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid Highlight !important; outline-offset: 3px; }
  .btn, .pill, .status-badge, .card, .panel, .sidebox, .learning-path-preview, .reader-sidebar { border: 1px solid CanvasText; }
  .btn, .course-menu-icon, .person-icon { color: ButtonText; background: ButtonFace; }
  progress { border: 1px solid CanvasText; }
}

@media (prefers-color-scheme: dark) {
  /* Reader follows a light document surface for long-form readability; controls remain contrast-safe. */
  .reader-page { color-scheme: light; }
}
