/* Design A: a neutral application shell. Loaded only on system pages. */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-400.ttf') format('truetype'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-500.ttf') format('truetype'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-600.ttf') format('truetype'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-700.ttf') format('truetype'); }

:root {
    --theme-bg: #f3f4f5;
    --theme-surface: #fff;
    --theme-text: #25282b;
    --theme-muted: #62676e;
    --theme-accent: #173f35;
    --theme-border: #e0e2e5;
    --theme-shadow: 0 2px 8px rgb(25 28 32 / 4%);
    --system-hover: #eceef0;
    --system-subtle: #f8f9fa;
    --system-accent-hover: #245648;
    --system-input-border: #b8bdc3;
    --system-radius: 8px;
    --system-control-radius: 6px;
}

body {
    font-family: Inter, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    background: var(--theme-bg);
    color: var(--theme-text);
    -webkit-font-smoothing: antialiased;
}

body :where(button, input, select, textarea) { font-family: inherit; font-size: inherit; }
body :where(button, input, select, textarea, a) { accent-color: var(--theme-accent); }
body .site-main :where(h1, h2, h3) { color: var(--theme-text); font-weight: 600; line-height: 1.3; }
body .site-main h1, body .entry-title { font-size: 24px; letter-spacing: -.5px; }
body .site-main h2 { font-size: 18px; }
body .site-main h3 { font-size: 15px; }
body .entry-content { color: var(--theme-text); line-height: 1.5; }
body .page-kind { margin: 0 0 8px; font-size: 12px; font-weight: 500; color: var(--theme-muted); text-transform: none; letter-spacing: 0; }
body .site-main { padding: 28px 0 40px; }
body .site-header__inner { min-height: 64px; }
body .site-header .custom-logo { max-height: 36px; }
body .site-footer .site-shell { min-height: 48px; padding-block: 8px; }
body .site-footer .custom-logo { max-height: 28px; }
body .site-nav__list { gap: 8px; }
body .site-nav__link, body .site-nav__submenu-toggle { font-size: 13px; font-weight: 500; border-radius: var(--system-control-radius); }
body .site-nav__link:hover, body .site-nav__submenu-toggle:hover,
body .site-nav__link:focus-visible, body .site-nav__submenu-toggle:focus-visible { background: var(--system-hover); color: var(--theme-accent); }
body .site-nav__submenu { border-radius: var(--system-radius); box-shadow: 0 8px 24px rgb(25 28 32 / 12%); }
body .site-nav__toggle { background: var(--theme-surface); border-radius: var(--system-control-radius); }
body .content-card { padding: 24px; border-radius: var(--system-radius); box-shadow: none; }
body .content-card.training-card, body .content-card.playlist-page { padding: 0; border: 0; background: transparent; }
body .training-content { gap: 20px; }

/* Adapt module-owned tokens without changing standalone plugin styles. */
body .dr-playlist {
    --dr-surface: var(--system-subtle); --dr-card: var(--theme-surface);
    --dr-ink: var(--theme-text); --dr-muted: var(--theme-muted);
    --dr-accent: var(--theme-accent); --dr-accent-strong: var(--system-accent-hover);
    --dr-border: var(--theme-border);
}
body .dr-playlist-editor {
    --dr-editor-ink: var(--theme-text); --dr-editor-muted: var(--theme-muted);
    --dr-editor-green: var(--theme-accent); --dr-editor-green-dark: var(--system-accent-hover);
    --dr-editor-soft: var(--system-subtle); --dr-editor-border: var(--theme-border);
    --dr-editor-focus: var(--theme-accent);
}
body .dr-video-category-page {
    --dr-video-category-primary: var(--theme-accent); --dr-video-category-primary-dark: var(--system-accent-hover);
    --dr-video-category-surface: var(--system-subtle); --dr-video-category-text: var(--theme-text);
    --dr-video-category-muted: var(--theme-muted); --dr-video-category-border: var(--theme-border);
    padding-inline: 0; gap: 20px;
}
body .dr-video-frontend-admin {
    --dr-video-admin-primary: var(--theme-accent); --dr-video-admin-primary-dark: var(--system-accent-hover);
    --dr-video-admin-surface: var(--system-subtle); --dr-video-admin-card: var(--theme-surface);
    --dr-video-admin-text: var(--theme-text); --dr-video-admin-muted: var(--theme-muted);
    --dr-video-admin-border: var(--theme-border);
}
body .dr-user-admin {
    --dr-user-surface: var(--theme-surface); --dr-user-ink: var(--theme-text);
    --dr-user-border: var(--theme-border); --dr-user-blue: var(--theme-accent);
    padding: 0;
}

/* Joined playlist rows, with one prominent create action. */
body .playlist-page__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
body .playlist-page__heading .entry-title { margin: 0; }
body .playlist-start { margin: 0; }
body .playlist-start__primary { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--theme-accent); border-radius: var(--system-control-radius); background: var(--theme-accent); color: #fff; font-size: 13px; font-weight: 500; text-decoration: none; }
body .playlist-start__primary::before { content: '+'; font-size: 18px; line-height: 1; }
body .playlist-start__primary:hover { background: var(--system-accent-hover); }
body .playlist-overview { margin: 0; }
body .playlist-overview__list { gap: 0; border: 1px solid var(--theme-border); border-radius: var(--system-radius); background: var(--theme-surface); }
body .playlist-overview__item { padding: 16px 20px; border: 0; border-bottom: 1px solid var(--theme-border); border-radius: 0; background: transparent; }
body .playlist-overview__item:last-child { border-bottom: 0; }
body .playlist-overview__details { min-width: 0; }
body .playlist-overview__details h2 { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
body .playlist-overview__details p { margin-top: 4px; font-size: 12px; color: var(--theme-muted); }
body .playlist-overview__actions a, body .playlist-overview__delete { min-height: 36px; padding: 7px 12px; border: 1px solid var(--theme-border); border-radius: var(--system-control-radius); background: var(--theme-surface); color: var(--theme-text); font-size: 12px; font-weight: 500; }
body .playlist-overview__actions .playlist-overview__play { color: var(--theme-accent); }
body .playlist-overview__delete { border-color: transparent; color: var(--theme-muted); }
body .playlist-overview__actions a:hover { background: var(--system-subtle); }
body .playlist-overview__delete:hover { color: #9f362d; background: #fff1ef; }

/* Compact, shared control geometry; component meaning and disabled states stay intact. */
body .dr-playlist__button, body .dr-playlist__pill, body .dr-playlist-toggle,
body .dr-playlist-editor__play, body .dr-playlist-editor button[type='submit'], body .dr-playlist-editor [data-playlist-save-order],
body .dr-video-category-page__switcher a, body .dr-video-category-page__back,
body .dr-video-category-page__previous, body .dr-video-category-page__next,
body .dr-video-category-page__training-playlist [data-dr-training-start],
body .dr-video-frontend-admin__create, body .dr-video-frontend-admin__back, body .dr-video-frontend-admin__edit,
body .dr-video-frontend-admin__actions button, body .dr-video-frontend-admin__category,
body .dr-playlist--playback .dr-playlist__topbar-action > :is(a, button) {
    min-height: 36px; padding: 8px 12px; border-radius: var(--system-control-radius);
    font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1.4; box-shadow: none;
}
body .dr-playlist__button:hover { background-color: var(--system-accent-hover) !important; }
body .dr-playlist__button--secondary { background-color: var(--system-subtle) !important; color: var(--theme-text) !important; border-color: var(--theme-border); }
body .dr-playlist__button--secondary:hover { background-color: var(--system-hover) !important; }
body .dr-playlist__pill { background: var(--system-subtle); border: 1px solid var(--theme-border); }
body .dr-playlist__pill--danger { color: var(--dr-danger); background: #fff1ef; }
body .dr-playlist-toggle {
    --dr-toggle-background: var(--theme-surface);
    --dr-toggle-active-background: var(--system-subtle);
    --dr-toggle-color: var(--theme-text);
    --dr-toggle-border: var(--theme-border);
    --dr-toggle-active-border: var(--theme-accent);
    --dr-toggle-shadow: none;
    background-color: var(--dr-toggle-background) !important;
    color: var(--dr-toggle-color) !important;
    border-color: var(--dr-toggle-border) !important;
    box-shadow: none !important;
}
body .dr-playlist-toggle.is-active { background-color: var(--dr-toggle-active-background) !important; border-color: var(--dr-toggle-active-border) !important; }
body .dr-playlist-toggle:hover { --dr-toggle-background: var(--system-hover); --dr-toggle-active-background: var(--system-hover); }

/* Training and playback: gray structure, green selection and primary action. */
body .dr-video-category-page__training-playlist,
body .dr-video-category-page__exercise-section,
body .dr-playlist__transition,
body .dr-playlist--playback [data-playlist-notice], body .dr-playlist--playback [data-playback-empty] {
    background: var(--system-subtle); border-color: var(--theme-border); border-radius: var(--system-radius);
}
body .dr-video-category-page__player, body .dr-video-category-page__card,
body .dr-playlist__player-shell, body .dr-playlist__list-shell, body .dr-playlist__empty-card,
body .dr-playlist--playback .dr-playlist__list-shell {
    background: var(--theme-surface); border-color: var(--theme-border); border-radius: var(--system-radius); box-shadow: none;
}
body .dr-video-category-page__player, body .dr-video-category-page__exercise-section { padding: 20px; }
body .dr-video-category-page__card { padding: 12px; gap: 12px; }
body .dr-video-category-page__card:hover { background: var(--system-subtle); box-shadow: none; }
body .dr-video-category-page__card.is-active { background: var(--system-subtle); border-color: var(--theme-accent); box-shadow: inset 3px 0 var(--theme-accent); }
body .dr-video-category-page__card-number { background: var(--system-hover); color: var(--theme-muted); font-weight: 500; border-radius: 5px; }
body .dr-video-category-page__card.is-active .dr-video-category-page__card-number { background: var(--theme-accent); color: #fff; }
body .dr-video-category-page__switcher a.is-active,
body .dr-video-frontend-admin__category.is-active { background: var(--theme-surface); border-color: var(--theme-accent); color: var(--theme-accent); box-shadow: inset 0 -2px var(--theme-accent); }
body .dr-video-category-page__next,
body .dr-video-category-page__training-playlist [data-dr-training-start],
body .dr-playlist--playback .dr-playlist__topbar-action > button { background: var(--theme-accent); border-color: var(--theme-accent); }
body .dr-video-category-page__next:hover, body .dr-video-category-page__training-playlist [data-dr-training-start]:hover { background: var(--system-accent-hover); }
body .dr-video-category-page__playlist-control [data-dr-training-playlist-trigger] { border-color: var(--system-input-border); border-radius: var(--system-control-radius); font-size: 13px; font-weight: 500; }
body .dr-video-category-page__playlist-control [data-dr-training-playlist-trigger][aria-expanded='true'] { background: var(--system-subtle); }
body .dr-video-category-page__playlist-menu { border-radius: var(--system-radius); box-shadow: 0 8px 24px rgb(25 28 32 / 12%); }
body .dr-video-category-page__playlist-menu [data-dr-training-playlist-option] { font-size: 13px; font-weight: 500; border-color: var(--theme-border); }
body .dr-video-category-page__playlist-menu [data-dr-training-playlist-create] { background: var(--system-subtle); color: var(--theme-accent); font-weight: 500; }
body .dr-video-category-page__playlist-menu [data-dr-training-playlist-create]:hover { background: var(--system-hover); }
body .dr-video-category-page__frame-wrap { background: var(--system-hover); border-radius: var(--system-radius); }
body .dr-playlist__player-frame { background: var(--system-hover); border-radius: 8px 8px 0 0; }
body .dr-video-category-page__card .dr-playlist-toggle { min-height: 36px; border-radius: var(--system-control-radius); font-size: 12px; font-weight: 500; }
body .dr-video-category-page__card .dr-playlist-toggle:hover,
body .dr-video-category-page__card .dr-playlist-toggle:focus-visible,
body .dr-video-category-page__card .dr-playlist-toggle.is-active { border-color: var(--theme-accent) !important; background: var(--system-subtle) !important; }
body .dr-playlist--playback [data-playlist-list] button { background: var(--system-subtle); border-radius: var(--system-control-radius); font-size: 13px; }
body .dr-playlist--playback [data-playlist-list] button[aria-current='true'] { background: var(--theme-accent); color: #fff; }
body .dr-playlist__item { padding: 12px; border-radius: var(--system-radius); }
body .dr-playlist__item.is-current { background: var(--system-subtle); border-color: var(--theme-accent); }
body .dr-playlist__badge { background: var(--system-hover); color: var(--theme-text); min-height: 28px; font-size: 12px; font-weight: 500; }
body .dr-playlist__current-label, body .dr-playlist__item-meta, body .dr-playlist__empty-copy,
body .dr-playlist__notice, body .dr-playlist-toggle__status, body .dr-playlist__guard,
body .dr-playlist__transition-copy, body .dr-video-category-page__training-playlist p { font-size: 13px; }
body .dr-playlist__item-title, body .dr-video-category-page__card-body h3 { font-size: 14px; font-weight: 500; }
body .dr-playlist__title-input { font-size: 24px; font-weight: 600; min-height: 44px; }
body .site-main .dr-playlist__title { font-size: 24px; letter-spacing: -.5px; }
body .dr-playlist__eyebrow, body .dr-playlist-editor__eyebrow,
body .dr-video-category-page__player-label, body .dr-video-category-page__exercise-label,
body .dr-video-frontend-admin__eyebrow, body .dr-video-frontend-admin__panel-kicker { color: var(--theme-muted); font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; }

/* Playlist editor. */
body .dr-playlist-editor__panel, body .dr-playlist-editor__create-form { border-radius: var(--system-radius); padding: 20px; }
body .dr-playlist-editor__category { font-size: 13px; font-weight: 500; }
body .dr-playlist-editor__heading h2 { margin: 0; }
body .dr-playlist-editor__notice:empty { display: none; }
body .dr-playlist-editor__library li { border-color: var(--theme-border); }
body .dr-playlist-editor__sequence li { min-height: 54px; border-color: var(--theme-border); border-radius: var(--system-control-radius); box-shadow: none; }
body .dr-playlist-editor__sequence li:hover { border-color: var(--system-input-border); box-shadow: var(--theme-shadow); }
body .dr-playlist-editor__sequence li.is-dragging { border-color: var(--theme-accent); background: var(--system-subtle); }
body .dr-playlist-editor__library button, body .dr-playlist-editor__sequence button { border-color: var(--system-input-border); border-radius: var(--system-control-radius); font-weight: 500; }
body .dr-playlist-editor__sequence [data-playlist-drag-handle] { color: var(--theme-muted); border-color: transparent; }
body .dr-playlist-editor__sequence button:hover, body .dr-playlist-editor__library button:hover { background: var(--system-hover); }
body .dr-playlist-editor [data-playlist-save-order]:disabled { background: #b8bdc3; color: #41464b; }
body .dr-playlist-editor__play:hover, body .dr-playlist-editor button[type='submit']:hover, body .dr-playlist-editor [data-playlist-save-order]:hover { transform: none; }

/* Frontend administration. */
body .dr-video-frontend-admin__hero { background: transparent; border: 0; padding: 0 0 8px; border-radius: 0; }
body .site-main .dr-video-frontend-admin__heading { font-size: 24px; letter-spacing: -.5px; }
body .dr-video-frontend-admin__intro { font-size: 14px; }
body .dr-video-frontend-admin__panel, body .dr-user-admin__header,
body .dr-user-admin__filters, body .dr-user-admin__table, body .dr-user-admin__panel { border-radius: var(--system-radius); box-shadow: none; }
body .dr-video-frontend-admin__panel { padding: 20px; }
body .dr-video-frontend-admin__item, body .dr-video-frontend-admin__empty { background: var(--system-subtle); border-color: var(--theme-border); border-radius: var(--system-control-radius); padding: 12px; }
body .dr-video-frontend-admin__item-copy strong { font-size: 14px; font-weight: 500; }
body .dr-video-frontend-admin__item-copy span { font-size: 12px; }
body .dr-video-frontend-admin__count, body .dr-video-frontend-admin__position { background: var(--system-hover); color: var(--theme-muted); font-size: 12px; font-weight: 500; }
body .dr-video-frontend-admin__edit, body .dr-video-frontend-admin__back { background: var(--theme-surface); color: var(--theme-text); border-color: var(--theme-border); }
body .dr-video-frontend-admin__edit:hover, body .dr-video-frontend-admin__back:hover { background: var(--system-hover); color: var(--theme-text); }
body .dr-video-frontend-admin :is(a, button):hover { transform: none; box-shadow: none; }
body .dr-video-frontend-admin__field, body .dr-video-frontend-admin__field span,
body .dr-user-admin__filters label, body .dr-user-admin__form label { font-size: 13px; font-weight: 500; }
body .dr-video-frontend-admin__drag-handle { color: var(--theme-muted); border-radius: var(--system-control-radius); }
body .dr-user-admin__header, body .dr-user-admin__panel { padding: 20px; }
body .dr-user-admin__header h1 { margin-top: 0; }
body .dr-user-admin th, body .dr-user-admin td { padding: 12px 16px; font-size: 13px; }
body .dr-user-admin th { background: var(--system-subtle); font-weight: 500; color: var(--theme-muted); }
body .dr-user-admin button { font-size: 13px; font-weight: 500; border-radius: var(--system-control-radius); }

/* Forms, including Ultimate Member's more specific plugin declarations. */
body .member-main { padding-top: 40px; }
body .member-card { padding: 28px; border-radius: var(--system-radius); box-shadow: none; }
body .member-content .um { font-family: Inter, sans-serif; font-size: 14px; }
body .member-content .um .um-field-label { font-weight: 500; font-size: 13px; }
body .member-content .um .um-field-label label { font-size: 13px !important; font-weight: 500; }
body .member-content .um-account-meta-img img { width: 64px; height: 64px; }
body .member-content .um-account-name a { font-size: 16px; font-weight: 600; color: var(--theme-text); }
body .member-content .um-account-profile-link a { color: var(--theme-accent); }
body .member-content .um-form :is(input[type='text'], input[type='password'], input[type='email'], input[type='number'], input[type='tel'], textarea, .um-form-field) {
    font-family: Inter, sans-serif !important; font-size: 14px !important; min-height: 40px;
    border-color: var(--system-input-border) !important; border-radius: var(--system-control-radius) !important;
}
body .member-content .um-button, body .member-content .um input[type='submit'].um-button {
    min-height: 40px; padding: 9px 14px !important; font-family: Inter, sans-serif !important;
    font-size: 13px !important; font-weight: 500 !important; border-radius: var(--system-control-radius) !important;
}
body .member-content .um-button:hover, body .member-content .um input[type='submit'].um-button:hover,
body .member-content .um-button:focus, body .member-content .um input[type='submit'].um-button:focus { background: var(--system-accent-hover) !important; border-color: var(--system-accent-hover) !important; transform: none; box-shadow: none !important; }
body .member-content .um-button.um-alt:hover, body .member-content .um a.um-button.um-alt:hover,
body .member-content .um-button.um-alt:focus, body .member-content .um a.um-button.um-alt:focus { background: var(--system-hover) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
body .dr-playlist-editor__panel-header input, body .dr-playlist-editor__create-form input[type='text'],
body .dr-video-frontend-admin__field input, body .dr-video-frontend-admin__field select,
body .dr-user-admin input, body .dr-user-admin select {
    font: inherit; min-height: 40px; padding: 8px 12px; color: var(--theme-text);
    background: var(--theme-surface); border: 1px solid var(--system-input-border); border-radius: var(--system-control-radius);
}

/* Keyboard focus remains explicit, independent of hover and selection. */
body .site-main :is(a, button, input, select, textarea):focus-visible,
body .site-header :is(a, button):focus-visible {
    outline: 2px solid var(--theme-accent); outline-offset: 3px;
}
body .member-content .um-form :is(input, textarea):focus,
body .dr-video-frontend-admin__field :is(input, select):focus { border-color: var(--theme-accent) !important; box-shadow: 0 0 0 3px rgb(23 63 53 / 12%); }

@media (min-width: 701px) and (max-width: 1000px) {
    body .site-header__inner { flex-wrap: wrap; padding-block: 12px; gap: 8px; }
    body .site-nav { width: 100%; }
    body .site-nav__list { justify-content: flex-start; flex-wrap: wrap; gap: 4px; }
    body .site-nav__link { white-space: nowrap; }
}
@media (max-width: 700px) {
    body .site-main { padding: 20px 0 28px; }
    body .content-card, body .member-card { padding: 20px; }
    body .content-card.training-card, body .content-card.playlist-page { padding: 0; }
    body .site-nav__link { background: var(--system-subtle); }
    body .playlist-page__heading { align-items: flex-start; flex-direction: column; }
    body .playlist-overview__item { padding: 16px; }
    body .playlist-overview__actions a { flex: 1 1 auto; }
    body .dr-video-category-page__player, body .dr-video-category-page__exercise-section,
    body .dr-playlist-editor__panel, body .dr-video-frontend-admin__panel { padding: 16px; }
}
@media (pointer: coarse) {
    body .site-main :is(button, input:not([type='checkbox']):not([type='radio']):not([type='hidden']), select),
    body .site-main :is(.playlist-start__primary, .playlist-overview__actions a, .dr-playlist__button, .dr-playlist__pill, .dr-playlist-editor__play, .dr-video-category-page__switcher a, .dr-video-frontend-admin__category, .dr-video-frontend-admin__edit, .dr-video-frontend-admin__create, .dr-video-frontend-admin__back) { min-height: 44px; }
    body .site-main :is(input:not([type='checkbox']):not([type='radio']), select, textarea),
    body .member-content .um-form .um-form-field { font-size: 16px !important; }
}
