/* admin/static/apple-ui.css — the Apple-style admin look in the Tarsyn Studio
   identity (Mohammed 2026-10-20: "full Apple-style look … while keeping the
   brand and all features"; then "apply our branding colours … also background
   colour" and "more important is the motion and effects and details").

   Scope: a page opts in with <body class="… apple-ui"> (base.html block
   body_class); every rule here is under .apple-ui, so pages not migrated yet
   are untouched. apple-ui.js adds the motion layer; without it every page
   still renders complete and works (progressive enhancement).

   Identity (Tarsyn-Studio-Final-Be-Gentle/START-HERE.md): Ivory #F2EDDF is
   the page, Ink #1A1815 is text and the primary control, Original red
   #FF4733 is the mark colour — the flag in the logo, the live dot, the
   active-nav bar, icons and large accents. Red is never small text: it is
   2.90:1 on Ivory, so small red text uses --ax-red-text #a82a18 instead.

   Contrast (WCAG AA, checked in .claude/design_review_2026_10/brand_contrast.py):
   ink 15.2:1 on Ivory / 16.5:1 on cards; secondary #5d5b57 ≥ 5.1:1 on every
   surface it sits on, and 4.6:1 on the top bar with a black video under it;
   status text ≥ 4.6:1 on its tinted fill over Ivory or a card; focus ring
   #b8301c 5.2:1 on Ivory. */

/* body.apple-ui, not .apple-ui: base's body.dashboard-theme rules (bone
   background, font) would otherwise win on specificity. */
body.apple-ui, .apple-ui {
  --ax-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Arabic", "Helvetica Neue",
             "Segoe UI", Roboto, "Noto Naskh Arabic", "Geeza Pro", Arial, sans-serif;
  --ax-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Arabic", "Helvetica Neue",
             "Segoe UI", Roboto, "Noto Naskh Arabic", "Geeza Pro", Arial, sans-serif;
  --ax-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* Brand */
  --ax-ink: #1a1815;
  --ax-ivory: #f2eddf;
  --ax-red: #ff4733;              /* marks only — never small text */

  /* Surfaces (ink tints over ivory) */
  --ax-page: var(--ax-ivory);
  --ax-surface: #f9f7f1;          /* cards: a lifted ivory */
  --ax-surface-raised: #fdfcf8;   /* dialogs, menus */
  --ax-fill: #eceae4;             /* ink 6% over a card */
  --ax-fill-strong: #e3e1db;      /* ink 10% over a card */
  --ax-separator: rgba(26, 24, 21, 0.12);
  --ax-separator-strong: rgba(26, 24, 21, 0.2);
  --ax-label: var(--ax-ink);
  --ax-label-2: #5d5b57;
  --ax-label-3: #827e77;          /* icons and decoration only — ≥ 3.3:1 on ivory, cards and fills */
  --ax-boundary: rgba(26, 24, 21, 0.56);   /* control edges: 3.5:1 on fills, 4.0:1 on raised */

  /* Semantic */
  --ax-red-text: #a82a18;
  --ax-red-fill: rgba(255, 71, 51, 0.12);
  --ax-red-ring: #b8301c;
  --ax-green: #1a6531;
  --ax-green-fill: rgba(26, 101, 49, 0.10);
  --ax-orange: #9a4600;
  --ax-orange-fill: rgba(154, 70, 0, 0.10);
  --ax-gray-fill: rgba(26, 24, 21, 0.07);

  /* Type */
  --ax-fs-hero: 40px;   --ax-lh-hero: 44px;
  --ax-fs-large: 34px;  --ax-lh-large: 41px;
  --ax-fs-title: 22px;  --ax-lh-title: 28px;
  --ax-fs-head: 17px;   --ax-lh-head: 22px;
  --ax-fs-body: 15px;   --ax-lh-body: 20px;
  --ax-fs-foot: 13px;   --ax-lh-foot: 18px;
  --ax-fs-cap: 12px;    --ax-lh-cap: 16px;

  /* Shape + depth (warm, ink-tinted shadows rather than grey) */
  --ax-r-card: 20px;
  --ax-r-tile: 14px;
  --ax-r-ctrl: 12px;
  --ax-r-pill: 980px;
  --ax-shadow: 0 0 0 0.5px rgba(26, 24, 21, 0.06), 0 1px 2px rgba(26, 24, 21, 0.05), 0 8px 24px -6px rgba(26, 24, 21, 0.08);
  --ax-shadow-lift: 0 0 0 0.5px rgba(26, 24, 21, 0.07), 0 2px 4px rgba(26, 24, 21, 0.05), 0 22px 44px -12px rgba(26, 24, 21, 0.20);
  --ax-shadow-dialog: 0 0 0 0.5px rgba(26, 24, 21, 0.08), 0 30px 80px -20px rgba(26, 24, 21, 0.45);

  /* Motion — Apple's curves: ease for state, expo-out for entrances,
     a soft spring (slight overshoot) for press release. */
  --ax-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ax-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ax-ease-apple: cubic-bezier(0.28, 0.11, 0.32, 1);
  --ax-spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  --ax-fast: 160ms;
  --ax-mid: 320ms;
  --ax-slow: 700ms;

  background: var(--ax-page);
  color: var(--ax-label);
  font-family: var(--ax-font);
  font-size: var(--ax-fs-body);
  line-height: var(--ax-lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
}
.apple-ui ::selection { background: rgba(255, 71, 51, 0.22); color: var(--ax-ink); }

.apple-ui a { color: var(--ax-ink); text-decoration: underline; text-decoration-color: rgba(255, 71, 51, 0.55); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: text-decoration-color var(--ax-fast) var(--ax-ease); }
.apple-ui a:hover { text-decoration-color: var(--ax-red); }
.apple-ui code, .apple-ui .ax-mono { font-family: var(--ax-mono); font-size: 0.92em; }
.apple-ui :focus { outline: none; }
.apple-ui :focus-visible { outline: 2.5px solid var(--ax-red-ring); outline-offset: 3px; border-radius: 8px; }
.apple-ui .ax-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Cross-document view transitions (Chrome 126+, Safari 18.2+; others just
   navigate). The bar stays put while the page content glides. */
@view-transition { navigation: auto; }
.apple-ui .dashboard-topbar { view-transition-name: ax-topbar; }
::view-transition-group(ax-topbar) { animation: none; }
::view-transition-old(root) { animation: 220ms var(--ax-ease, ease) both ax-vt-out; }
::view-transition-new(root) { animation: 520ms cubic-bezier(0.16, 1, 0.3, 1) both ax-vt-in; }
::view-transition-group(*) { animation-duration: 560ms; animation-timing-function: cubic-bezier(0.28, 0.11, 0.32, 1); }
@keyframes ax-vt-out { to { opacity: 0; transform: scale(0.985); } }
@keyframes ax-vt-in { from { opacity: 0; transform: translateY(14px); } }

/* ── Shell + top bar (base.html chrome, restyled in this scope only) ─────── */
.apple-ui .dashboard-shell { width: auto; max-width: none; padding: 0; margin: 0; background: transparent; }
.apple-ui .dashboard-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-direction: row; align-items: center; gap: 24px; flex-wrap: nowrap;   /* dashboard.css stacks it ≤ 1024 px */
  margin: 0; padding: 10px max(24px, calc((100vw - 1200px) / 2));
  min-height: 60px; box-sizing: border-box;
  border: 0; border-radius: 0;
  /* ≥ 0.9 alpha: nav text stays 4.6:1 when a black player scrolls under it */
  background: rgba(242, 237, 223, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 0.5px 0 transparent;
  transition: box-shadow var(--ax-mid) var(--ax-ease), background-color var(--ax-mid) var(--ax-ease);
}
/* the hairline appears only once content scrolls under the bar */
.apple-ui .dashboard-topbar.is-scrolled { box-shadow: 0 0.5px 0 var(--ax-separator-strong), 0 10px 30px -18px rgba(26, 24, 21, 0.35); }

.apple-ui .dashboard-brand { display: flex; align-items: center; gap: 12px; color: var(--ax-label); text-decoration: none; flex: none; }
.apple-ui .ax-logo { display: block; height: 30px; width: auto; margin: 0 -4px; }   /* the SVG carries 12% clear space */
.apple-ui .ax-logo-mark { display: none; height: 30px; width: 30px; margin: 0 -3px; }
.apple-ui .ax-brand-sep { width: 1px; height: 18px; background: var(--ax-separator-strong); }
/* "Admin" swaps for the page title once the large title scrolls away */
.apple-ui .ax-brand-sub { position: relative; display: grid; font: 600 var(--ax-fs-foot)/var(--ax-lh-foot) var(--ax-font); color: var(--ax-label-2); white-space: nowrap; }
.apple-ui .ax-brand-sub > span { grid-area: 1 / 1; transition: opacity var(--ax-mid) var(--ax-ease-apple), transform var(--ax-mid) var(--ax-ease-apple); }
.apple-ui .ax-brand-sub-b { opacity: 0; transform: translateY(8px); color: var(--ax-label); max-width: 15ch; overflow: hidden; text-overflow: ellipsis; }
.apple-ui .dashboard-topbar.has-compact-title .ax-brand-sub-a { opacity: 0; transform: translateY(-8px); }
.apple-ui .dashboard-topbar.has-compact-title .ax-brand-sub-b { opacity: 1; transform: none; }

/* Legacy brand markup (pages that don't override the brand block) */
.apple-ui .dashboard-brand-mark { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.apple-ui .dashboard-brand-copy { display: flex; flex-direction: column; line-height: 1.1; }

/* Nav: one capsule glides under the pointer; the current page carries the
   red flag bar. Padding gives the focus ring room inside the scroller. */
.apple-ui .dashboard-nav {
  position: relative; display: flex; align-items: center; gap: 2px;
  flex: 1 1 0; min-width: 0; width: auto; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
  padding: 6px; margin: -6px;
}
.apple-ui .dashboard-nav::-webkit-scrollbar { display: none; }
/* a nav that overflows fades at the edge it can still scroll to (apple-ui.js) */
.apple-ui .dashboard-nav.can-scroll-end { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.apple-ui .dashboard-nav.can-scroll-start.can-scroll-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 48px), transparent); }
.apple-ui .dashboard-nav.can-scroll-start:not(.can-scroll-end) { -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px); mask-image: linear-gradient(90deg, transparent, #000 48px); }
.apple-ui .ax-nav-glide {
  position: absolute; top: 6px; left: 0; height: calc(100% - 12px); width: 0;
  border-radius: var(--ax-r-pill); background: rgba(26, 24, 21, 0.07);
  opacity: 0; pointer-events: none; z-index: 0;
  transition: transform var(--ax-mid) var(--ax-ease-out), width var(--ax-mid) var(--ax-ease-out), opacity var(--ax-fast) var(--ax-ease);
}
.apple-ui .ax-nav-glide.is-on { opacity: 1; }
.apple-ui .ax-nav-glide.is-instant { transition: opacity var(--ax-fast) var(--ax-ease); }
.apple-ui .dashboard-link {
  position: relative; z-index: 1; flex: none; padding: 7px 12px; border: 0; border-radius: var(--ax-r-pill);
  font: 500 14px/20px var(--ax-font); color: var(--ax-label-2); background: transparent; text-decoration: none;
  transform: none;   /* dashboard.css lifts links 1px on hover/active */
  transition: color var(--ax-fast) var(--ax-ease), background-color var(--ax-fast) var(--ax-ease);
}
.apple-ui .dashboard-link:hover, .apple-ui .dashboard-link.is-active { transform: none; text-decoration: none; }
.apple-ui .dashboard-link:hover { color: var(--ax-label); }
/* no JS → no glide, so hover shows its own capsule */
html:not(.ax-js) .apple-ui .dashboard-link:hover { background: rgba(26, 24, 21, 0.07); }
.apple-ui .dashboard-link.is-active { color: var(--ax-label); font-weight: 600; background: transparent; }
.apple-ui .dashboard-link.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 1px; width: 14px; height: 3px; margin-left: -7px;
  border-radius: 2px; background: var(--ax-red);
}
.apple-ui .dashboard-link:focus-visible { outline-offset: -2px; border-radius: var(--ax-r-pill); }
.apple-ui .dashboard-link--back { margin-left: auto; border: 0; color: var(--ax-label-2); }
.apple-ui .dashboard-status-pill {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border: 0; border-radius: var(--ax-r-pill);
  background: rgba(26, 24, 21, 0.06); color: var(--ax-label);
  font: 600 var(--ax-fs-cap)/var(--ax-lh-cap) var(--ax-font); letter-spacing: 0; text-transform: none;
}
.apple-ui .dashboard-status-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--ax-red); box-shadow: none; }

.apple-ui main.shell { width: auto; max-width: 1200px; margin: 0 auto; padding: 40px 24px 80px; box-sizing: border-box; }   /* width: upload.css .shell is 100% - 22px */

/* ── Page header ──────────────────────────────────────────────────────── */
.apple-ui .ax-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.apple-ui .ax-eyebrow {
  display: flex; align-items: center; gap: 8px; margin: 0 0 6px;
  font: 600 var(--ax-fs-foot)/var(--ax-lh-foot) var(--ax-font); color: var(--ax-red-text); letter-spacing: 0.01em;
}
/* the brand flag, small, before every eyebrow */
.apple-ui .ax-eyebrow::before { content: ""; width: 10px; height: 9px; background: var(--ax-red); clip-path: polygon(0 0, 100% 0, 64% 100%, 0 100%); flex: none; }
.apple-ui .ax-eyebrow span { color: var(--ax-label-2); font-weight: 500; }
.apple-ui .ax-back {
  display: inline-flex; align-items: center; gap: 2px; margin: 0 0 8px -6px; padding: 4px 10px 4px 4px;
  border-radius: var(--ax-r-pill); color: var(--ax-label-2); text-decoration: none;
  font: 500 var(--ax-fs-body)/var(--ax-lh-body) var(--ax-font);
  transition: background-color var(--ax-fast) var(--ax-ease), color var(--ax-fast) var(--ax-ease);
}
.apple-ui .ax-back:hover { background: rgba(26, 24, 21, 0.06); color: var(--ax-label); }
.apple-ui .ax-back svg { width: 18px; height: 18px; transition: transform var(--ax-mid) var(--ax-ease-out); }
.apple-ui .ax-back:hover svg { transform: translateX(-3px); }
.apple-ui .ax-large-title {
  margin: 0; font: 700 var(--ax-fs-hero)/var(--ax-lh-hero) var(--ax-font-display);
  letter-spacing: -0.028em; color: var(--ax-label);
}
.apple-ui .ax-large-title span { color: inherit; }   /* tarsyn-theme.css / upload.css colour every h1 span */
.apple-ui .ax-large-title .ax-scope { color: var(--ax-label-2); font-weight: 600; }
.apple-ui .ax-large-title .ax-subtitle { display: block; margin: 6px 0 0; font: 600 var(--ax-fs-title)/var(--ax-lh-title) var(--ax-font-display); letter-spacing: -0.012em; color: var(--ax-label); }
.apple-ui .ax-lede { margin: 10px 0 0; max-width: 640px; color: var(--ax-label-2); font-size: 16px; line-height: 23px; }
.apple-ui .ax-lede a { color: var(--ax-label); }
.apple-ui .ax-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; color: var(--ax-label-2); font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); }
.apple-ui .ax-meta strong { color: var(--ax-label); font-weight: 600; }
.apple-ui .ax-meta code { color: var(--ax-label); overflow-wrap: anywhere; }

/* ── Capsules: gate state, badges ─────────────────────────────────────── */
.apple-ui .ax-capsule {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 8px 14px; border-radius: var(--ax-r-pill);
  font: 600 var(--ax-fs-foot)/var(--ax-lh-foot) var(--ax-font);
  background: var(--ax-surface); color: var(--ax-label); box-shadow: var(--ax-shadow);
}
.apple-ui .ax-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ax-label-3); flex: none; }
.apple-ui .ax-dot.is-on { background: var(--ax-red); }
/* live pulse — a soft ring breathing out of the dot */
.apple-ui .ax-dot.is-on::after, .apple-ui .dashboard-status-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ax-red);
  animation: ax-pulse 2.4s var(--ax-ease-out) infinite;
}
@keyframes ax-pulse { 0% { transform: scale(1); opacity: 0.55; } 70%, 100% { transform: scale(3.2); opacity: 0; } }

.apple-ui .ax-badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 3px 9px; border-radius: var(--ax-r-pill);
  font: 600 var(--ax-fs-cap)/var(--ax-lh-cap) var(--ax-font);
  background: var(--ax-gray-fill); color: var(--ax-label-2);
}
/* status badges carry a dot in their colour */
.apple-ui .ax-badge.is-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.apple-ui .ax-badge.is-attention { background: var(--ax-orange-fill); color: var(--ax-orange); }
.apple-ui .ax-badge.is-done { background: var(--ax-green-fill); color: var(--ax-green); }
.apple-ui .ax-badge.is-error { background: var(--ax-red-fill); color: var(--ax-red-text); }
.apple-ui .ax-badge.is-progress { background: transparent; box-shadow: inset 0 0 0 1px rgba(26, 24, 21, 0.5); color: var(--ax-label); }
.apple-ui .ax-badge.is-outline { background: transparent; box-shadow: inset 0 0 0 1px var(--ax-separator-strong); color: var(--ax-label-2); }
.apple-ui .ax-badge.is-count { background: var(--ax-ink); color: var(--ax-ivory); min-width: 22px; justify-content: center; padding: 3px 7px; font-variant-numeric: tabular-nums; }

/* ── Sections + groups ────────────────────────────────────────────────── */
.apple-ui .ax-section { margin-top: 8px; }
.apple-ui .ax-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 18px; padding-bottom: 12px; border-bottom: 0.5px solid var(--ax-separator-strong); }
.apple-ui .ax-section-title { margin: 0; font: 700 var(--ax-fs-title)/var(--ax-lh-title) var(--ax-font-display); letter-spacing: -0.014em; }
.apple-ui .ax-section-aux { color: var(--ax-label-2); font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); font-variant-numeric: tabular-nums; }
.apple-ui .ax-group { margin: 0 0 48px; }
.apple-ui .ax-group-head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.apple-ui .ax-group-title { margin: 0; font: 600 var(--ax-fs-head)/var(--ax-lh-head) var(--ax-font); color: var(--ax-label); letter-spacing: -0.005em; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.apple-ui .ax-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.apple-ui .ax-grid + .ax-grid { margin-top: 22px; }
.apple-ui .ax-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  padding: 16px; border-radius: var(--ax-r-card);
  background: var(--ax-surface); box-shadow: var(--ax-shadow);
  transition: transform var(--ax-mid) var(--ax-ease-out), box-shadow var(--ax-mid) var(--ax-ease-out);
}
@media (hover: hover) {
  .apple-ui .ax-grid .ax-card:hover { transform: translateY(-4px); box-shadow: var(--ax-shadow-lift); }
}
.apple-ui .ax-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.apple-ui .ax-epnum { font: 700 var(--ax-fs-foot)/var(--ax-lh-foot) var(--ax-font); color: var(--ax-label); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.apple-ui .ax-card-title { margin: 0; font: 600 var(--ax-fs-head)/var(--ax-lh-head) var(--ax-font); color: var(--ax-label); overflow-wrap: anywhere; letter-spacing: -0.005em; }
.apple-ui .ax-card-sub { display: flex; flex-direction: column; gap: 3px; color: var(--ax-label-2); font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); }
.apple-ui .ax-line { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.apple-ui .ax-line svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--ax-label-3); }
.apple-ui .ax-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* long names wrap to two lines so the end stays readable on touch, too */
.apple-ui .ax-clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; min-width: 0; }
.apple-ui .ax-wrap { overflow-wrap: anywhere; min-width: 0; }
.apple-ui .ax-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; min-width: 0; }
.apple-ui .ax-error-text { margin: 0; color: var(--ax-red-text); font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); }

/* Video tiles inside a card */
.apple-ui .ax-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.apple-ui .ax-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.apple-ui .ax-thumb-wrap {
  position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: var(--ax-r-tile); overflow: hidden;
  background: #22201c; isolation: isolate;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.06);
}
/* shimmer until the first frame decodes (apple-ui.js sets .is-loaded) */
.ax-js .apple-ui .ax-thumb-wrap::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(242, 237, 223, 0.10) 40%, rgba(242, 237, 223, 0.16) 50%, rgba(242, 237, 223, 0.10) 60%, transparent 80%) #2a2723;
  background-size: 250% 100%;
  animation: ax-shimmer 1.6s linear infinite;
  transition: opacity var(--ax-mid) var(--ax-ease);
}
.ax-js .apple-ui .ax-thumb-wrap.is-loaded::before, .ax-js .apple-ui .ax-thumb-wrap.is-failed::before { opacity: 0; animation: none; }
@keyframes ax-shimmer { from { background-position: 125% 0; } to { background-position: -125% 0; } }
.apple-ui .ax-thumb {
  position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform 900ms var(--ax-ease-out), opacity 600ms var(--ax-ease), filter 600ms var(--ax-ease);
}
.ax-js .apple-ui .ax-thumb-wrap:not(.is-loaded):not(.is-failed) .ax-thumb { opacity: 0; transform: scale(1.06); filter: blur(8px); }
@media (hover: hover) {
  .apple-ui .ax-card:hover .ax-thumb { transform: scale(1.035); }
}
/* playing on hover: a small progress hairline along the bottom */
.apple-ui .ax-thumb-progress {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 3px;
  background: var(--ax-red); transform-origin: 0 50%; transform: scaleX(var(--ax-p, 0));
  opacity: 0; transition: opacity var(--ax-fast) var(--ax-ease);
}
.apple-ui .ax-thumb-wrap.is-playing .ax-thumb-progress { opacity: 1; }
.apple-ui .ax-thumb-empty {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px;
  height: 100%; box-sizing: border-box; background: var(--ax-fill); color: var(--ax-label-2); font-size: var(--ax-fs-foot);
}
.apple-ui .ax-thumb-failed {
  position: absolute; inset: 0; z-index: 2; display: none; align-items: center; justify-content: center; padding: 12px;
  color: rgba(242, 237, 223, 0.86); font-size: var(--ax-fs-foot); text-align: center;
}
.apple-ui .ax-thumb-wrap.is-failed .ax-thumb-failed { display: flex; }
.apple-ui .ax-lang-tag {
  position: absolute; top: 8px; left: 8px; z-index: 3; padding: 2px 8px; border-radius: var(--ax-r-pill);
  background: rgba(26, 24, 21, 0.62); color: var(--ax-ivory); font: 700 11px/16px var(--ax-font); letter-spacing: 0.04em;
  -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
}
.apple-ui .ax-play-hint {
  position: absolute; right: 8px; bottom: 10px; z-index: 3; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26, 24, 21, 0.55); color: var(--ax-ivory);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transform: scale(0.8); transition: opacity var(--ax-mid) var(--ax-ease-out), transform var(--ax-mid) var(--ax-spring);
}
.apple-ui .ax-play-hint svg { width: 12px; height: 12px; margin-left: 2px; }
@media (hover: hover) {
  .apple-ui .ax-thumb-wrap.is-loaded:not(.is-playing):hover .ax-play-hint { opacity: 1; transform: none; }
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
/* upload.css styles every <button> globally (gradient, glow, weight 800,
   a 1px hover lift): reset what it sets so these controls look the same as
   links. */
.apple-ui .ax-btn, .apple-ui .ax-action { box-shadow: none; letter-spacing: 0; font-weight: 400; text-transform: none; }
.apple-ui .ax-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 9px 18px; border: 0; border-radius: var(--ax-r-pill); box-sizing: border-box;
  font: 600 var(--ax-fs-body)/var(--ax-lh-body) var(--ax-font); cursor: pointer; text-decoration: none;
  background: var(--ax-fill); color: var(--ax-label);
  transition: background-color var(--ax-fast) var(--ax-ease), transform 420ms var(--ax-spring), box-shadow var(--ax-mid) var(--ax-ease);
  -webkit-tap-highlight-color: transparent;
}
.apple-ui .ax-btn:hover { background: var(--ax-fill-strong); text-decoration: none; color: var(--ax-label); }
.apple-ui .ax-btn:active { transform: scale(0.96); transition-duration: 90ms; transition-timing-function: var(--ax-ease); }
.apple-ui .ax-btn svg { width: 16px; height: 16px; flex: none; transition: transform var(--ax-mid) var(--ax-ease-out); }
.apple-ui .ax-btn.is-primary { background: var(--ax-ink); color: var(--ax-ivory); }
.apple-ui .ax-btn.is-primary:hover { background: #2e2b26; color: var(--ax-ivory); box-shadow: 0 8px 20px -10px rgba(26, 24, 21, 0.6); }
.apple-ui .ax-btn.is-primary.has-trailing-icon:hover > svg:last-child { transform: translateX(3px); }
.apple-ui .ax-btn.is-plain { background: transparent; color: var(--ax-label); padding-left: 10px; padding-right: 10px; }
.apple-ui .ax-btn.is-plain svg { color: var(--ax-red-text); }
.apple-ui .ax-btn.is-plain:hover { background: rgba(26, 24, 21, 0.06); }
.apple-ui .ax-btn.is-block { width: 100%; }
.apple-ui .ax-card-actions { margin-top: auto; display: flex; gap: 8px; }

/* ── Banners (alerts) and empty state ─────────────────────────────────── */
.apple-ui .ax-banner {
  display: flex; align-items: flex-start; gap: 14px; margin: 0 0 22px; padding: 16px 18px;
  border-radius: 16px; background: var(--ax-surface); box-shadow: var(--ax-shadow);
}
.apple-ui .ax-banner-icon { flex: none; width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.apple-ui .ax-banner-icon svg { width: 17px; height: 17px; }
.apple-ui .ax-banner.is-warn .ax-banner-icon { background: var(--ax-orange-fill); color: var(--ax-orange); }
.apple-ui .ax-banner.is-error .ax-banner-icon { background: var(--ax-red-fill); color: var(--ax-red-text); }
.apple-ui .ax-banner.is-done .ax-banner-icon { background: var(--ax-green-fill); color: var(--ax-green); }
.apple-ui .ax-banner-body { flex: 1; min-width: 0; }
.apple-ui .ax-banner-title { margin: 0; font: 600 var(--ax-fs-body)/var(--ax-lh-body) var(--ax-font); color: var(--ax-label); }
.apple-ui .ax-banner-detail { margin: 3px 0 0; font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); color: var(--ax-label-2); }
.apple-ui .ax-banner-detail a { color: var(--ax-label); }
.apple-ui .ax-banner-actions { flex: none; display: flex; flex-wrap: wrap; gap: 8px; align-self: center; }

.apple-ui .ax-empty { padding: 56px 24px; text-align: center; border-radius: var(--ax-r-card); background: var(--ax-surface); box-shadow: var(--ax-shadow); }
.apple-ui .ax-empty svg { width: 40px; height: 40px; color: var(--ax-label-3); }
.apple-ui .ax-empty :is(h2, h3, h4, .ax-empty-title) { margin: 14px 0 6px; font: 600 var(--ax-fs-head)/var(--ax-lh-head) var(--ax-font); }
.apple-ui .ax-empty p { margin: 0 auto; max-width: 520px; color: var(--ax-label-2); }

/* Flash messages (admin.css .admin-flash, restyled in this scope) */
.apple-ui .admin-flash {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 18px; padding: 12px 14px 12px 16px; border: 0; border-radius: 14px;
  font: 500 var(--ax-fs-body)/var(--ax-lh-body) var(--ax-font);
  background: var(--ax-surface); color: var(--ax-label); box-shadow: var(--ax-shadow);
}
.apple-ui .admin-flash-success { background: var(--ax-green-fill); color: var(--ax-green); box-shadow: none; }
.apple-ui .admin-flash-error { background: var(--ax-red-fill); color: var(--ax-red-text); box-shadow: none; }
.apple-ui .ax-flash-text { flex: 1; min-width: 0; }
.apple-ui .ax-flash-close {
  flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: inherit; box-shadow: none; opacity: 0.8;
  transition: background-color var(--ax-fast) var(--ax-ease), opacity var(--ax-fast) var(--ax-ease);
}
.apple-ui .ax-flash-close:hover { background: rgba(26, 24, 21, 0.07); opacity: 1; transform: none; }
.apple-ui .ax-flash-close svg { width: 14px; height: 14px; }
.apple-ui .admin-flash.is-leaving { animation: ax-flash-out 280ms var(--ax-ease) both; }
@keyframes ax-flash-out { to { opacity: 0; transform: translateY(-6px) scale(0.98); } }

/* ── Single episode: players ──────────────────────────────────────────── */
.apple-ui .ax-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.apple-ui .ax-player-head { display: flex; align-items: flex-start; gap: 12px; }
.apple-ui .ax-lang-badge {
  flex: none; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font: 700 var(--ax-fs-cap)/1 var(--ax-font); letter-spacing: 0.04em; color: var(--ax-ivory); background: var(--ax-ink);
}
.apple-ui .ax-lang-badge[data-lang="ar"] { box-shadow: inset 0 -3px 0 var(--ax-red); }
.apple-ui .ax-player-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; font: 600 var(--ax-fs-head)/var(--ax-lh-head) var(--ax-font); }
.apple-ui .ax-video-frame { position: relative; border-radius: 16px; }
/* ambient glow: a blurred copy of the poster frame under the player (apple-ui.js) */
.apple-ui .ax-ambient {
  position: absolute; inset: 6% 4% -2%; z-index: 0; border-radius: 24px;
  background-size: cover; background-position: center; filter: blur(36px) saturate(140%); opacity: 0;
  transition: opacity 900ms var(--ax-ease); pointer-events: none;
}
.apple-ui .ax-ambient.is-on { opacity: 0.45; }
.apple-ui .ax-video {
  position: relative; z-index: 1;
  display: block; width: 100%; max-height: 72vh; aspect-ratio: 9 / 16; object-fit: contain;
  border-radius: 16px; background: #000;
  box-shadow: 0 0 0 0.5px rgba(26, 24, 21, 0.2), 0 24px 50px -24px rgba(26, 24, 21, 0.55);
}
.apple-ui .ax-video-empty {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 200px; padding: 24px;
  border-radius: 16px; background: var(--ax-fill); color: var(--ax-label-2); font-size: var(--ax-fs-foot);
}
.apple-ui .ax-inline-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-left: -10px; }
.apple-ui .ax-error-box { padding: 12px 14px; border-radius: 12px; background: var(--ax-red-fill); color: var(--ax-red-text); font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); overflow-wrap: anywhere; }
.apple-ui .ax-error-box code { color: inherit; }

/* ── Single episode: decision ─────────────────────────────────────────── */
.apple-ui .ax-decision { margin-top: 36px; padding: 28px; border-radius: 24px; background: var(--ax-surface); box-shadow: var(--ax-shadow); }
.apple-ui .ax-decision .ax-lede { margin-bottom: 22px; }
.apple-ui .ax-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.apple-ui .ax-actions form { margin: 0; }
.apple-ui .ax-action {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; height: 100%; padding: 16px 18px;
  border: 0; border-radius: 16px; cursor: pointer; text-align: left; box-sizing: border-box;
  font-family: var(--ax-font); background: var(--ax-fill); color: var(--ax-label);
  transition: background-color var(--ax-fast) var(--ax-ease), transform 460ms var(--ax-spring), box-shadow var(--ax-mid) var(--ax-ease);
  -webkit-tap-highlight-color: transparent;
}
.apple-ui .ax-action:hover { background: var(--ax-fill-strong); transform: none; }   /* upload.css lifts buttons 1px */
.apple-ui .ax-action:active { transform: scale(0.975); transition-duration: 90ms; transition-timing-function: var(--ax-ease); }
.apple-ui .ax-action-icon {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--ax-surface); color: var(--ax-ink); box-shadow: 0 0 0 0.5px var(--ax-separator);
  transition: transform var(--ax-mid) var(--ax-spring);
}
.apple-ui .ax-action:hover .ax-action-icon { transform: scale(1.08); }
.apple-ui .ax-action-icon svg { width: 18px; height: 18px; }
.apple-ui .ax-action-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.apple-ui .ax-action-label strong { font: 600 var(--ax-fs-body)/var(--ax-lh-body) var(--ax-font); }
.apple-ui .ax-action-label span { font-weight: 400; font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); color: var(--ax-label-2); }
/* Approve is the one primary: an Ink block with the red flag as its icon */
.apple-ui .ax-action.is-approve { background: var(--ax-ink); color: var(--ax-ivory); }
.apple-ui .ax-action.is-approve:hover { background: #2e2b26; box-shadow: 0 14px 30px -14px rgba(26, 24, 21, 0.7); }
.apple-ui .ax-action.is-approve .ax-action-icon { background: var(--ax-red); color: var(--ax-ink); box-shadow: none; }
.apple-ui .ax-action.is-approve .ax-action-label span { color: rgba(242, 237, 223, 0.78); }
.apple-ui .ax-action.is-destructive strong { color: var(--ax-red-text); }
.apple-ui .ax-action.is-destructive .ax-action-icon { color: var(--ax-red-text); }
/* pending (apple-ui.js): spinner in the icon, the other tiles dim */
.apple-ui .ax-actions.is-busy { pointer-events: none; }
.apple-ui .ax-actions.is-busy .ax-action:not(.is-pending) { opacity: 0.45; transition: opacity var(--ax-mid) var(--ax-ease); }
.apple-ui .ax-action.is-pending-shown .ax-action-icon svg { display: none; }
.apple-ui .ax-action.is-pending-shown .ax-action-icon::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: ax-spin 700ms linear infinite;
}
@keyframes ax-spin { to { transform: rotate(360deg); } }

/* ── Alert dialog (apple-ui.js upgrades the native confirm() to this) ─── */
.apple-ui .ax-alert {
  width: min(340px, calc(100vw - 48px)); padding: 0; border: 0; border-radius: 20px; overflow: hidden;
  background: rgba(253, 252, 248, 0.92); color: var(--ax-label); box-shadow: var(--ax-shadow-dialog);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
}
.apple-ui .ax-alert::backdrop { background: rgba(26, 24, 21, 0.32); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.apple-ui .ax-alert[open] { animation: ax-alert-in 420ms var(--ax-spring) both; }
.apple-ui .ax-alert[open]::backdrop { animation: ax-fade-in 260ms var(--ax-ease) both; }
.apple-ui .ax-alert.is-closing { animation: ax-alert-out 180ms var(--ax-ease) both; }
.apple-ui .ax-alert.is-closing::backdrop { animation: ax-fade-out 180ms var(--ax-ease) both; }
@keyframes ax-alert-in { from { opacity: 0; transform: scale(1.12); } }
@keyframes ax-alert-out { to { opacity: 0; transform: scale(0.96); } }
@keyframes ax-fade-in { from { opacity: 0; } }
@keyframes ax-fade-out { to { opacity: 0; } }
.apple-ui .ax-alert-body { padding: 22px 22px 18px; text-align: center; }
.apple-ui .ax-alert-icon {
  width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--ax-red-fill); color: var(--ax-red-text);
}
.apple-ui .ax-alert-icon svg { width: 22px; height: 22px; }
.apple-ui .ax-alert-title { margin: 0; font: 600 var(--ax-fs-head)/var(--ax-lh-head) var(--ax-font); }
.apple-ui .ax-alert-text { margin: 8px 0 0; font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); color: var(--ax-label-2); white-space: pre-line; }
.apple-ui .ax-alert-buttons { display: grid; grid-template-columns: 1fr 1fr; border-top: 0.5px solid var(--ax-separator-strong); }
.apple-ui .ax-alert-buttons button {
  min-height: 48px; padding: 12px; border: 0; border-radius: 0; margin: 0; cursor: pointer;
  background: transparent; box-shadow: none; text-transform: none; letter-spacing: 0;
  font: 400 var(--ax-fs-head)/var(--ax-lh-head) var(--ax-font); color: var(--ax-label);
  transition: background-color var(--ax-fast) var(--ax-ease);
}
.apple-ui .ax-alert-buttons button + button { border-left: 0.5px solid var(--ax-separator-strong); }
.apple-ui .ax-alert-buttons button:hover { background: rgba(26, 24, 21, 0.05); transform: none; }
.apple-ui .ax-alert-buttons button:active { background: rgba(26, 24, 21, 0.1); }
.apple-ui .ax-alert-buttons .is-cancel { font-weight: 600; }
.apple-ui .ax-alert-buttons .is-destructive { color: var(--ax-red-text); }
.apple-ui .ax-alert-buttons button:focus-visible { outline-offset: -4px; border-radius: 10px; }

/* ══ Shared components for the rest of the admin (2026-10-20 rollout) ═════
   Every page uses these instead of page-made look-alikes. Page-only rules go
   in admin/static/ax/<page>.css, scoped under .apple-ui. */

/* Legacy globals: upload.css / tarsyn-theme.css style bare form, button,
   input, textarea, summary, pre and h1–h3 on every page. Neutralise them
   here so controls JS creates at runtime still match. */
.apple-ui form { display: block; gap: normal; }
.apple-ui h1, .apple-ui h2, .apple-ui h3, .apple-ui h4 { font-family: var(--ax-font-display); letter-spacing: -0.01em; }
.apple-ui h1 { font-size: var(--ax-fs-large); line-height: var(--ax-lh-large); font-weight: 700; }
.apple-ui summary { font-weight: inherit; }
.apple-ui pre { margin: 0; color: inherit; font-family: var(--ax-mono); font-size: 12.5px; line-height: 19px; }
.apple-ui button { font: inherit; letter-spacing: 0; text-transform: none; box-shadow: none; }
.apple-ui button:hover:not(:disabled) { transform: none; }
.apple-ui .ax-btn:active:not(:disabled), .apple-ui .ax-action:active:not(:disabled) { transform: scale(0.97); transition-duration: 90ms; transition-timing-function: var(--ax-ease); }
.apple-ui input[type="checkbox"], .apple-ui input[type="radio"] { accent-color: var(--ax-ink); }

/* Toolbar: page-level actions and filters under the header */
.apple-ui .ax-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 24px; }
.apple-ui .ax-toolbar .ax-spacer { flex: 1 1 auto; }

/* Panels: the generic grouped card */
.apple-ui .ax-panel { position: relative; min-width: 0; padding: 20px 22px; border-radius: var(--ax-r-card); background: var(--ax-surface); box-shadow: var(--ax-shadow); }
.apple-ui .ax-panel + .ax-panel, .apple-ui .ax-stack > * + * { margin-top: 22px; }
.apple-ui .ax-panel-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 14px; }
.apple-ui .ax-panel-title { margin: 0; font: 600 var(--ax-fs-head)/var(--ax-lh-head) var(--ax-font); letter-spacing: -0.005em; color: var(--ax-label); }
.apple-ui .ax-panel-sub { margin: 2px 0 0; color: var(--ax-label-2); font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); }
.apple-ui .ax-panel.is-flush { padding: 0; overflow: hidden; }
.apple-ui .ax-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 22px; align-items: start; }
.apple-ui .ax-cols > .ax-panel + .ax-panel { margin-top: 0; }

/* Stat tiles */
.apple-ui .ax-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin: 0 0 28px; }
.apple-ui .ax-stat {
  position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0;
  padding: 16px 18px; border-radius: 16px; background: var(--ax-surface); box-shadow: var(--ax-shadow);
  color: var(--ax-label); text-decoration: none;
  transition: transform var(--ax-mid) var(--ax-ease-out), box-shadow var(--ax-mid) var(--ax-ease-out);
}
.apple-ui .ax-stat-value { font: 700 30px/34px var(--ax-font-display); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.apple-ui .ax-stat-label { font: 500 var(--ax-fs-foot)/var(--ax-lh-foot) var(--ax-font); color: var(--ax-label-2); }
.apple-ui .ax-stat-foot { font-size: var(--ax-fs-cap); line-height: var(--ax-lh-cap); color: var(--ax-label-2); }
.apple-ui .ax-stat.is-attention .ax-stat-value { color: var(--ax-orange); }
.apple-ui .ax-stat.is-done .ax-stat-value { color: var(--ax-green); }
.apple-ui .ax-stat.is-error .ax-stat-value { color: var(--ax-red-text); }
.apple-ui .ax-stat.is-error::after { content: ""; position: absolute; top: 14px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--ax-red); }
@media (hover: hover) {
  .apple-ui a.ax-stat:hover { transform: translateY(-3px); box-shadow: var(--ax-shadow-lift); text-decoration: none; color: var(--ax-label); }
}

/* Grouped inset list (Settings-style rows) */
.apple-ui .ax-list-header { margin: 0 0 8px 16px; font: 600 var(--ax-fs-foot)/var(--ax-lh-foot) var(--ax-font); color: var(--ax-label-2); }
.apple-ui .ax-list { margin: 0; padding: 0; list-style: none; border-radius: 16px; background: var(--ax-surface); box-shadow: var(--ax-shadow); overflow: hidden; }
.apple-ui .ax-list-footer { margin: 8px 16px 0; font-size: var(--ax-fs-cap); line-height: var(--ax-lh-cap); color: var(--ax-label-2); }
.apple-ui .ax-list + .ax-list-header, .apple-ui .ax-list-footer + .ax-list-header { margin-top: 28px; }
.apple-ui .ax-row {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 50px; box-sizing: border-box;
  padding: 10px 16px; color: var(--ax-label); text-decoration: none;
  transition: background-color var(--ax-fast) var(--ax-ease);
}
.apple-ui .ax-row + .ax-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 0.5px; background: var(--ax-separator-strong); }
.apple-ui .ax-row-icon { flex: none; width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--ax-ink); color: var(--ax-ivory); }
.apple-ui .ax-row-icon svg { width: 17px; height: 17px; }
.apple-ui .ax-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.apple-ui .ax-row-title { font: 500 var(--ax-fs-body)/var(--ax-lh-body) var(--ax-font); color: var(--ax-label); overflow-wrap: anywhere; }
.apple-ui .ax-row-sub { font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); color: var(--ax-label-2); overflow-wrap: anywhere; }
.apple-ui .ax-row-value { flex: none; max-width: 50%; text-align: right; color: var(--ax-label-2); font-size: var(--ax-fs-body); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.apple-ui a.ax-row:hover { background: rgba(26, 24, 21, 0.04); text-decoration: none; color: var(--ax-label); }
.apple-ui a.ax-row::after { content: ""; flex: none; width: 7px; height: 7px; margin-left: 2px; border-right: 1.75px solid var(--ax-label-3); border-bottom: 1.75px solid var(--ax-label-3); transform: rotate(-45deg); transition: transform var(--ax-mid) var(--ax-ease-out); }
.apple-ui a.ax-row:hover::after { transform: translateX(2px) rotate(-45deg); }

/* Key–value pairs */
.apple-ui .ax-kv { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 8px 20px; margin: 0; font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); }
.apple-ui .ax-kv dt { color: var(--ax-label-2); }
.apple-ui .ax-kv dd { margin: 0; color: var(--ax-label); min-width: 0; overflow-wrap: anywhere; }

/* Tables: hairline rows, sticky blurred header, tabular figures */
.apple-ui .ax-table-wrap { position: relative; max-width: 100%; overflow: auto; border-radius: 16px; background: var(--ax-surface); box-shadow: var(--ax-shadow); -webkit-overflow-scrolling: touch; }
.apple-ui .ax-table-wrap.is-tall { max-height: min(72vh, 900px); overscroll-behavior: contain; }
.apple-ui .ax-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); color: var(--ax-label); }
.apple-ui .ax-table th {
  position: sticky; top: 0; z-index: 1; padding: 11px 14px; text-align: left; white-space: nowrap;
  font: 600 var(--ax-fs-cap)/var(--ax-lh-cap) var(--ax-font); color: var(--ax-label-2);
  background: rgba(249, 247, 241, 0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 0.5px solid var(--ax-separator-strong);
}
.apple-ui .ax-table td { padding: 11px 14px; vertical-align: top; border-bottom: 0.5px solid var(--ax-separator); }
.apple-ui .ax-table tbody tr:last-child td { border-bottom: 0; }
.apple-ui .ax-table tbody tr { transition: background-color var(--ax-fast) var(--ax-ease); }
.apple-ui .ax-table tbody tr:hover { background: rgba(26, 24, 21, 0.035); }
.apple-ui .ax-table .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.apple-ui .ax-table .is-nowrap { white-space: nowrap; }
.apple-ui .ax-table .is-mono { font-family: var(--ax-mono); font-size: 12px; }
.apple-ui .ax-table .is-muted { color: var(--ax-label-2); }
.apple-ui .ax-table .is-strong { font-weight: 600; }
.apple-ui .ax-table a { text-decoration-color: rgba(26, 24, 21, 0.25); }
.apple-ui .ax-table a:hover { text-decoration-color: var(--ax-red); }

/* Fields: element defaults, so runtime-built inputs match too */
.apple-ui .ax-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.apple-ui .ax-field + .ax-field { margin-top: 16px; }
.apple-ui .ax-label { font: 600 var(--ax-fs-foot)/var(--ax-lh-foot) var(--ax-font); color: var(--ax-label); }
.apple-ui .ax-help { font-size: var(--ax-fs-cap); line-height: var(--ax-lh-cap); color: var(--ax-label-2); }
.apple-ui :is(input[type="text"], input[type="password"], input[type="search"], input[type="url"], input[type="email"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input:not([type]), select, textarea, .ax-input, .ax-select, .ax-textarea) {
  -webkit-appearance: none; appearance: none; box-sizing: border-box; max-width: 100%;
  min-height: 40px; margin: 0; padding: 9px 12px; border: 0; border-radius: 10px;
  background-color: var(--ax-surface-raised); color: var(--ax-label);
  box-shadow: inset 0 0 0 1px var(--ax-boundary);
  font: 400 var(--ax-fs-body)/var(--ax-lh-body) var(--ax-font);
  transition: box-shadow var(--ax-fast) var(--ax-ease), background-color var(--ax-fast) var(--ax-ease);
}
.apple-ui :is(input, select, textarea):hover:not(:disabled):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]) { box-shadow: inset 0 0 0 1px rgba(26, 24, 21, 0.7); }
.apple-ui :is(input, select, textarea):focus { outline: none; }
.apple-ui :is(input, select, textarea):focus-visible:not([type="checkbox"]):not([type="radio"]),
.apple-ui :is(input[type="text"], input[type="password"], input:not([type]), select, textarea):focus {
  outline: none; box-shadow: inset 0 0 0 2px var(--ax-red-ring), 0 0 0 4px rgba(255, 71, 51, 0.14); background-color: #fff;
}
.apple-ui :is(input, select, textarea)::placeholder { color: #706c65; opacity: 1; }
.apple-ui :is(input, select, textarea):disabled { opacity: 0.5; cursor: not-allowed; }
.apple-ui textarea, .apple-ui .ax-textarea { min-height: 112px; resize: vertical; line-height: 21px; }
.apple-ui textarea.is-mono, .apple-ui .ax-input.is-mono { font-family: var(--ax-mono); font-size: 13px; }
.apple-ui :is(select, select.ax-select, .ax-select) {
  padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a1815' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 9.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
}
.apple-ui input[type="file"] { font-size: var(--ax-fs-foot); color: var(--ax-label-2); }
.apple-ui input[type="file"]::file-selector-button { margin-right: 10px; padding: 7px 14px; border: 0; border-radius: var(--ax-r-pill); background: var(--ax-fill-strong); color: var(--ax-label); font: 600 var(--ax-fs-foot)/var(--ax-lh-foot) var(--ax-font); cursor: pointer; }

/* Switch: a real checkbox, so forms post exactly as before */
.apple-ui input[type="checkbox"].ax-switch {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; margin: 0; cursor: pointer;
  width: 46px; height: 28px; border-radius: 28px; vertical-align: middle;
  background: rgba(26, 24, 21, 0.12); box-shadow: inset 0 0 0 1px rgba(26, 24, 21, 0.5);
  transition: background-color 260ms var(--ax-ease), box-shadow 260ms var(--ax-ease);
}
.apple-ui input[type="checkbox"].ax-switch::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(26, 24, 21, 0.25), 0 3px 8px rgba(26, 24, 21, 0.15);
  transition: transform 360ms var(--ax-spring), width 200ms var(--ax-ease);
}
.apple-ui input[type="checkbox"].ax-switch:active:not(:disabled)::before { width: 27px; }
.apple-ui input[type="checkbox"].ax-switch:checked { background: var(--ax-ink); box-shadow: inset 0 0 0 1px var(--ax-ink); }
.apple-ui input[type="checkbox"].ax-switch:checked::before { transform: translateX(18px); }
.apple-ui input[type="checkbox"].ax-switch:checked:active:not(:disabled)::before { transform: translateX(13px); }
.apple-ui input[type="checkbox"].ax-switch:focus-visible { outline: 2.5px solid var(--ax-red-ring); outline-offset: 3px; }
.apple-ui input[type="checkbox"].ax-switch:disabled { opacity: 0.45; cursor: not-allowed; }

/* Segmented control: links (filters) or radios */
.apple-ui .ax-segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 11px; background: rgba(26, 24, 21, 0.07); max-width: 100%; }
.apple-ui .ax-segmented > a, .apple-ui .ax-segmented > button, .apple-ui .ax-segmented > label {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 0; border-radius: 8px; cursor: pointer;
  font: 500 var(--ax-fs-foot)/var(--ax-lh-foot) var(--ax-font); color: var(--ax-label-2); background: transparent; text-decoration: none; white-space: nowrap;
  transition: background-color var(--ax-mid) var(--ax-ease-out), color var(--ax-fast) var(--ax-ease), box-shadow var(--ax-mid) var(--ax-ease-out);
}
.apple-ui .ax-segmented > :hover { color: var(--ax-label); text-decoration: none; }
.apple-ui .ax-segmented > .is-active, .apple-ui .ax-segmented > [aria-current="page"], .apple-ui .ax-segmented > [aria-selected="true"], .apple-ui .ax-segmented > label:has(input:checked) {
  background: var(--ax-surface-raised); color: var(--ax-label); font-weight: 600;
  box-shadow: 0 0 0 0.5px rgba(26, 24, 21, 0.08), 0 1px 3px rgba(26, 24, 21, 0.14);
}
.apple-ui .ax-segmented > label > input { position: absolute; opacity: 0; pointer-events: none; }
.apple-ui .ax-segmented .ax-count { font-variant-numeric: tabular-nums; color: var(--ax-label-2); font-weight: 500; }

/* Chips: per-signal ok / missing / warn */
.apple-ui .ax-chip {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 3px 9px; border-radius: var(--ax-r-pill);
  font: 600 var(--ax-fs-cap)/var(--ax-lh-cap) var(--ax-font); background: var(--ax-gray-fill); color: var(--ax-label-2);
}
.apple-ui .ax-chip svg { width: 12px; height: 12px; flex: none; }
.apple-ui .ax-chip.is-ok { background: var(--ax-green-fill); color: var(--ax-green); }
.apple-ui .ax-chip.is-missing, .apple-ui .ax-chip.is-error { background: var(--ax-red-fill); color: var(--ax-red-text); }
.apple-ui .ax-chip.is-warn { background: var(--ax-orange-fill); color: var(--ax-orange); }
.apple-ui .ax-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Code and logs: an Ink panel, the brand's dark block */
.apple-ui .ax-code {
  margin: 0; padding: 14px 16px; border-radius: 14px; overflow: auto; max-width: 100%; box-sizing: border-box;
  background: var(--ax-ink); color: #ece6d6; tab-size: 8;
  font: 400 12.5px/19px var(--ax-mono); white-space: pre;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.06);
}
.apple-ui .ax-code.is-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.apple-ui .ax-code.is-tall { max-height: min(70vh, 760px); }
.apple-ui .ax-code::selection, .apple-ui .ax-code ::selection { background: rgba(255, 71, 51, 0.45); color: #fff; }
.apple-ui .ax-code .is-dim { color: #a39e93; }
.apple-ui .ax-code .is-err { color: #ff8f7d; }
.apple-ui .ax-code .is-warn { color: #f0b65e; }
.apple-ui .ax-code .is-ok { color: #8fd19e; }
.apple-ui .ax-code .is-info { color: #9fb7ff; }

/* Disclosure: <details>, opening with a height animation where supported */
.apple-ui details.ax-disclosure { border-radius: 16px; background: var(--ax-surface); box-shadow: var(--ax-shadow); interpolate-size: allow-keywords; }
.apple-ui details.ax-disclosure + details.ax-disclosure { margin-top: 12px; }
.apple-ui details.ax-disclosure > summary {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; border-radius: 16px;
  font: 600 var(--ax-fs-body)/var(--ax-lh-body) var(--ax-font); color: var(--ax-label);
  transition: background-color var(--ax-fast) var(--ax-ease);
}
.apple-ui details.ax-disclosure > summary::-webkit-details-marker { display: none; }
.apple-ui details.ax-disclosure > summary::after {
  content: ""; margin-left: auto; flex: none; width: 7px; height: 7px;
  border-right: 1.75px solid var(--ax-label-2); border-bottom: 1.75px solid var(--ax-label-2);
  transform: rotate(-45deg); transition: transform var(--ax-mid) var(--ax-ease-out);
}
.apple-ui details.ax-disclosure[open] > summary::after { transform: rotate(45deg); }
.apple-ui details.ax-disclosure > summary:hover { background: rgba(26, 24, 21, 0.035); }
.apple-ui details.ax-disclosure > .ax-disclosure-body { padding: 2px 16px 16px; }
.apple-ui details.ax-disclosure::details-content { block-size: 0; overflow: clip; transition: block-size 420ms var(--ax-ease-out), content-visibility 420ms allow-discrete; }
.apple-ui details.ax-disclosure[open]::details-content { block-size: auto; }

/* Progress */
.apple-ui .ax-progress { position: relative; height: 6px; border-radius: 3px; background: rgba(26, 24, 21, 0.1); overflow: hidden; }
.apple-ui .ax-progress > span { display: block; height: 100%; border-radius: 3px; background: var(--ax-ink); transform-origin: 0 50%; transition: width 700ms var(--ax-ease-out); }
.apple-ui .ax-progress.is-ok > span { background: var(--ax-green); }
.apple-ui .ax-progress.is-warn > span { background: var(--ax-orange); }
.apple-ui .ax-progress.is-error > span, .apple-ui .ax-progress.is-over > span { background: var(--ax-red); }

/* Timeline */
.apple-ui .ax-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.apple-ui .ax-timeline > li { position: relative; padding: 0 0 18px 28px; min-width: 0; }
.apple-ui .ax-timeline > li::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: -2px; width: 1.5px; background: var(--ax-separator-strong); }
.apple-ui .ax-timeline > li:last-child { padding-bottom: 0; }
.apple-ui .ax-timeline > li:last-child::before { display: none; }
.apple-ui .ax-timeline > li::after { content: ""; position: absolute; left: 1px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--ax-surface); box-shadow: 0 0 0 2px var(--ax-label-3); }
.apple-ui .ax-timeline > li.is-done::after { box-shadow: 0 0 0 2px var(--ax-green); background: var(--ax-green); }
.apple-ui .ax-timeline > li.is-error::after { box-shadow: 0 0 0 2px var(--ax-red); background: var(--ax-red); }
.apple-ui .ax-timeline > li.is-attention::after { box-shadow: 0 0 0 2px var(--ax-orange); }
.apple-ui .ax-timeline > li.is-live::after { box-shadow: 0 0 0 2px var(--ax-red); background: var(--ax-red); animation: ax-pulse-ring 2.4s var(--ax-ease-out) infinite; }
@keyframes ax-pulse-ring { 0% { box-shadow: 0 0 0 2px var(--ax-red), 0 0 0 2px rgba(255, 71, 51, 0.45); } 70%, 100% { box-shadow: 0 0 0 2px var(--ax-red), 0 0 0 10px rgba(255, 71, 51, 0); } }
.apple-ui .ax-tl-time { display: block; font: 500 var(--ax-fs-cap)/var(--ax-lh-cap) var(--ax-mono); color: var(--ax-label-2); }
.apple-ui .ax-tl-title { display: block; margin-top: 2px; font: 600 var(--ax-fs-body)/var(--ax-lh-body) var(--ax-font); color: var(--ax-label); overflow-wrap: anywhere; }
.apple-ui .ax-tl-detail { display: block; margin-top: 2px; font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); color: var(--ax-label-2); overflow-wrap: anywhere; }

/* Media grid: stills, strips, shots */
.apple-ui .ax-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.apple-ui .ax-media { position: relative; margin: 0; min-width: 0; border-radius: 12px; overflow: hidden; background: #22201c; box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.06); }
.apple-ui .ax-media > img, .apple-ui .ax-media > video { display: block; width: 100%; height: auto; transition: transform 900ms var(--ax-ease-out); }
@media (hover: hover) { .apple-ui .ax-media:hover > img { transform: scale(1.03); } }
.apple-ui .ax-media figcaption, .apple-ui .ax-media-caption { padding: 8px 10px; font-size: var(--ax-fs-cap); line-height: var(--ax-lh-cap); color: rgba(242, 237, 223, 0.86); background: #22201c; }

/* Buttons: small, destructive, tinted, disabled */
.apple-ui .ax-btn.is-small { min-height: 30px; padding: 5px 12px; font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); }
.apple-ui .ax-btn.is-small svg { width: 14px; height: 14px; }
.apple-ui .ax-btn.is-destructive { color: var(--ax-red-text); }
.apple-ui .ax-btn.is-tinted { background: var(--ax-red-fill); color: var(--ax-red-text); }
.apple-ui .ax-btn.is-tinted:hover { background: rgba(255, 71, 51, 0.2); }
.apple-ui .ax-btn:disabled, .apple-ui .ax-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.apple-ui .ax-btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Service card (_ax_macros.service_card: Overview + Status) */
.apple-ui .ax-service { gap: 10px; }
.apple-ui .ax-service-head { display: flex; align-items: center; gap: 8px; }
.apple-ui .ax-service-name { margin: 0; flex: 1 1 auto; min-width: 0; font: 600 var(--ax-fs-head)/var(--ax-lh-head) var(--ax-font); color: var(--ax-label); }
.apple-ui .ax-service-when { margin: 0; font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); color: var(--ax-label-2); }
.apple-ui .ax-service-state { font-weight: 600; }
.apple-ui .ax-service-state.is-ok { color: var(--ax-green); }
.apple-ui .ax-service-state.is-warn { color: var(--ax-orange); }
.apple-ui .ax-service-state.is-error { color: var(--ax-red-text); }
.apple-ui .ax-service-summary { margin: 0; font: 400 12px/17px var(--ax-mono); color: var(--ax-label-2); overflow-wrap: anywhere; }
.apple-ui .ax-service.is-error .ax-service-summary { color: var(--ax-red-text); }
.apple-ui .ax-service-actions { margin-top: auto; }
.apple-ui .ax-service-actions form { margin: 0; }
.apple-ui .ax-service.is-error { box-shadow: var(--ax-shadow), inset 3px 0 0 var(--ax-red); }

/* Auto-refresh capsule (apple-ui.js [data-ax-refresh]) */
.apple-ui .ax-refresh { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.apple-ui .ax-refresh.is-paused { color: var(--ax-label-2); }

/* Inline helpers */
.apple-ui .ax-muted { color: var(--ax-label-2); }
.apple-ui .ax-num { font-variant-numeric: tabular-nums; }
.apple-ui .ax-nowrap { white-space: nowrap; }
.apple-ui .ax-iso { unicode-bidi: isolate; }
.apple-ui .ax-dot-inline { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ax-label-3); vertical-align: middle; }
.apple-ui .ax-dot-inline.is-ok { background: var(--ax-green); }
.apple-ui .ax-dot-inline.is-warn { background: var(--ax-orange); }
.apple-ui .ax-dot-inline.is-error { background: var(--ax-red); }

/* ── Entrances (apple-ui.js sets <html class="ax-js"> before first paint,
   then .is-in as each block scrolls in; without JS nothing is hidden). The
   player cards are not in the list: they are the target of the queue →
   episode morph and must be visible when the new page is captured. */
.ax-js .apple-ui :is(.ax-header, .ax-banner, .ax-section-head, .ax-group-head, .ax-grid > .ax-card, .ax-empty, .ax-decision, .ax-panel, .ax-stats > .ax-stat, .ax-table-wrap, .ax-list, details.ax-disclosure, .ax-reveal) {
  transition: opacity var(--ax-slow) var(--ax-ease-apple), transform 900ms var(--ax-ease-out), filter var(--ax-slow) var(--ax-ease-apple), box-shadow var(--ax-mid) var(--ax-ease-out);
  transition-delay: calc(var(--ax-i, 0) * 55ms);
}
.ax-js .apple-ui :is(.ax-header, .ax-banner, .ax-section-head, .ax-group-head, .ax-grid > .ax-card, .ax-empty, .ax-decision, .ax-panel, .ax-stats > .ax-stat, .ax-table-wrap, .ax-list, details.ax-disclosure, .ax-reveal):not(.is-in) {
  opacity: 0; transform: translateY(18px);
}
/* blur only small blocks: on a 60 000 px table or list it is not free */
.ax-js .apple-ui :is(.ax-header, .ax-banner, .ax-section-head, .ax-group-head, .ax-grid > .ax-card, .ax-empty, .ax-decision, .ax-stats > .ax-stat, details.ax-disclosure):not(.is-in) { filter: blur(4px); }
/* a reload (auto-refresh, F5) or back/forward shows the page at once */
.ax-js.ax-no-entrance .apple-ui :is(.ax-header, .ax-banner, .ax-section-head, .ax-group-head, .ax-grid > .ax-card, .ax-empty, .ax-decision, .ax-panel, .ax-stats > .ax-stat, .ax-table-wrap, .ax-list, details.ax-disclosure, .ax-reveal):not(.is-in) {
  opacity: 1; transform: none; filter: none; transition: none;
}
/* once in, cards hand transform back to the hover lift with no delay */
.ax-js .apple-ui .ax-grid > .ax-card.is-settled { transition: transform var(--ax-mid) var(--ax-ease-out), box-shadow var(--ax-mid) var(--ax-ease-out); transition-delay: 0s; }
/* arriving through a view transition: the transition is the entrance */
.ax-js.ax-vt-arrival .apple-ui :is(.ax-header, .ax-banner, .ax-section-head, .ax-group-head, .ax-grid > .ax-card, .ax-empty, .ax-decision, .ax-panel, .ax-stats > .ax-stat, .ax-table-wrap, .ax-list, details.ax-disclosure, .ax-reveal) {
  opacity: 1; transform: none; filter: none; transition: none;
}
.apple-ui .admin-flash { animation: ax-flash-in 560ms var(--ax-spring) both; }
@keyframes ax-flash-in { from { opacity: 0; transform: translateY(-10px) scale(0.98); } }

/* Morph pairs: the queue sets ax-hero-ar / ax-hero-en / ax-epnum on the card
   being opened (apple-ui.js); the episode page carries them statically. */
.apple-ui .ax-players [data-lang="ar"] .ax-video { view-transition-name: ax-hero-ar; }
.apple-ui .ax-players [data-lang="en"] .ax-video { view-transition-name: ax-hero-en; }
.apple-ui .ax-large-title .ax-epnum-title { display: inline-block; view-transition-name: ax-epnum; }
::view-transition-group(ax-hero-ar), ::view-transition-group(ax-hero-en), ::view-transition-group(ax-epnum) {
  animation-duration: 620ms; animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
}
::view-transition-old(ax-hero-ar), ::view-transition-old(ax-hero-en), ::view-transition-new(ax-hero-ar), ::view-transition-new(ax-hero-en) {
  height: 100%; object-fit: cover; overflow: clip;
}

/* Scroll-linked: the header recedes as the page scrolls (browsers with
   scroll-driven animations; others keep it still). */
@supports (animation-timeline: scroll()) {
  .ax-short-page .apple-ui .ax-header > div:first-child { animation: none; }
  html:not(.ax-short-page) .apple-ui .ax-header > div:first-child {
    animation: ax-header-recede linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 240px;
  }
  @keyframes ax-header-recede { to { opacity: 0.18; transform: translateY(-14px) scale(0.985); filter: blur(1.5px); } }
}

/* ── Integration fixes (2026-10-20, from the per-page reviews) ───────── */
/* touch targets ≥ 30 px */
.apple-ui .ax-back { min-height: 30px; box-sizing: border-box; }
.apple-ui .ax-flash-close { width: 32px; height: 32px; }
.apple-ui input[type="checkbox"].ax-switch::after { content: ""; position: absolute; inset: -8px -6px; }   /* 44 px hit area */
/* flashes never widen the page */
.apple-ui .admin-flash { min-width: 0; }
.apple-ui .ax-flash-text { min-width: 0; overflow-wrap: anywhere; }
/* focus rings inside clipping containers */
.apple-ui .ax-list a.ax-row:focus-visible { outline-offset: -3px; border-radius: 14px; }
.apple-ui .ax-media > a:focus-visible { outline-offset: -4px; }   /* no :has(): the ring sits inside the clip */
@supports selector(:has(*)) {
  .apple-ui .ax-media:has(> a:focus-visible) { outline: 2.5px solid var(--ax-red-ring); outline-offset: 3px; }
  .apple-ui .ax-media > a:focus-visible { outline: none; }
}
.apple-ui .ax-segmented > label:has(input:focus-visible) { outline: 2.5px solid var(--ax-red-ring); outline-offset: 2px; }
/* tables keep the page still across reloads */
.apple-ui .ax-table-wrap { overflow-anchor: none; }
/* cards full of controls don't lift */
.apple-ui .ax-grid .ax-card.is-static:hover { transform: none; box-shadow: var(--ax-shadow); }
/* compact empty state inside a section; one-line empty title */
.apple-ui .ax-empty.is-compact { padding: 28px 20px; }
.apple-ui .ax-empty.is-compact svg { width: 30px; height: 30px; }
/* neutral banner tone */
.apple-ui .ax-banner.is-info .ax-banner-icon { background: var(--ax-gray-fill); color: var(--ax-ink); }
.apple-ui .ax-group-aux { margin-left: auto; color: var(--ax-label-2); font-size: var(--ax-fs-foot); line-height: var(--ax-lh-foot); }
/* gated decision tiles */
.apple-ui .ax-action:disabled { opacity: 1; cursor: not-allowed; transform: none; }
.apple-ui .ax-action:disabled :is(.ax-action-icon, .ax-action-label > strong) { opacity: 0.45; }
.apple-ui .ax-action:disabled .ax-action-icon { transform: none; }
/* pending (apple-ui.js): a ring takes the icon's slot (decision tiles at once, buttons after 150 ms); a text-only
   button keeps its width and shows the ring in the middle. Under reduced
   motion the ring is simply still. */
.apple-ui .ax-btn.is-pending { pointer-events: none; }
.apple-ui .ax-btn > svg[data-ax-spin-hidden] { display: none; }
.apple-ui .ax-spin {
  display: inline-block; flex: none; width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: ax-spin 700ms linear infinite;
}
.apple-ui .ax-btn.is-small .ax-spin { width: 14px; height: 14px; }
.apple-ui .ax-btn.is-pending-shown:not(:has(> .ax-spin)) { color: transparent; }
.apple-ui .ax-btn.is-pending-shown:not(:has(> .ax-spin))::after {
  content: ""; position: absolute; left: calc(50% - 8px); top: calc(50% - 8px); width: 16px; height: 16px; box-sizing: border-box;
  border-radius: 50%; border: 2px solid var(--ax-label); border-right-color: transparent; animation: ax-spin 700ms linear infinite;
}
.apple-ui .ax-btn.is-primary.is-pending-shown:not(:has(> .ax-spin))::after { border-color: var(--ax-ivory); border-right-color: transparent; }
.apple-ui .ax-actions.is-busy .ax-btn:not(.is-pending) { opacity: 0.45; }
/* auto-refresh paused state wherever the label sits */
.apple-ui [data-ax-refresh-label].is-paused, .apple-ui .ax-refresh.is-paused { color: var(--ax-label-2); }
.apple-ui [data-ax-refresh].is-paused .ax-dot.is-on::after { animation: none; opacity: 0; }
/* alert sheet tones (apple-ui.js: data-ax-confirm-tone or a primary submit) */
.apple-ui .ax-alert.is-default .ax-alert-icon { background: var(--ax-gray-fill); color: var(--ax-ink); }
.apple-ui .ax-alert.is-default .ax-alert-buttons .is-destructive { color: var(--ax-ink); font-weight: 600; }
.apple-ui .ax-alert.is-default .ax-alert-buttons .is-cancel { font-weight: 400; }
.apple-ui .ax-alert.is-warning .ax-alert-icon { background: var(--ax-orange-fill); color: var(--ax-orange); }
.apple-ui .ax-alert.is-warning .ax-alert-buttons .is-destructive { color: var(--ax-orange); font-weight: 600; }
.apple-ui .ax-alert-text:empty { display: none; }
.apple-ui .ax-empty .ax-empty-title { max-width: none; margin: 14px auto 6px; color: var(--ax-label); }
.apple-ui .dashboard-topbar.is-instant, .apple-ui .dashboard-topbar.is-instant * { transition: none !important; }
/* sticky table headers never hide the focused row */
.apple-ui .ax-table-wrap { scroll-padding-top: 44px; }
/* date/time inputs: the picker stop inside the field still shows the ring */
.apple-ui input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"]):focus-within { box-shadow: inset 0 0 0 2px var(--ax-red-ring), 0 0 0 4px rgba(255, 71, 51, 0.14); }
/* a service in error keeps its red edge while lifted */
.apple-ui .ax-grid .ax-service.is-error:hover { box-shadow: var(--ax-shadow-lift), inset 3px 0 0 var(--ax-red); }
/* main is a skip target, not a control */
.apple-ui main:focus { outline: none; }
/* skip link */
.apple-ui .ax-skip { position: absolute; left: 16px; top: -48px; z-index: 30; padding: 8px 14px; border-radius: var(--ax-r-pill); background: var(--ax-ink); color: var(--ax-ivory); text-decoration: none; font: 600 var(--ax-fs-foot)/var(--ax-lh-foot) var(--ax-font); transition: top var(--ax-fast) var(--ax-ease); }
.apple-ui .ax-skip:focus { top: 12px; color: var(--ax-ivory); }

/* ── Small screens ────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  /* two rows: brand, then the nav as its own scrollable strip (it was 718 px
     wide on one line and pushed the page to 546 px on a 375 px phone). The
     strip fades at the edge it can still scroll to. */
  .apple-ui .dashboard-topbar { flex-wrap: wrap; gap: 8px 12px; padding: 8px 16px 6px; min-height: 0; }
  .apple-ui .dashboard-nav { order: 3; flex: 0 0 calc(100% + 12px); max-width: calc(100% + 12px); margin: -6px; }
  .apple-ui .dashboard-status-pill { margin-left: auto; }
  .apple-ui .ax-logo { height: 26px; }
  .apple-ui .dashboard-brand { min-height: 30px; }
  .apple-ui main.shell { padding: 24px 16px 56px; }
  .apple-ui .ax-header { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 26px; }
  .apple-ui .ax-large-title { font-size: 32px; line-height: 38px; }
  .apple-ui .ax-large-title .ax-subtitle { font-size: 19px; line-height: 25px; }
  .apple-ui .ax-grid { grid-template-columns: 1fr; gap: 16px; }
  .apple-ui .ax-actions { grid-template-columns: 1fr; }
  .apple-ui .ax-decision { padding: 22px 16px; border-radius: 20px; }
  .apple-ui .ax-banner { flex-wrap: wrap; }
  .apple-ui .ax-banner-body { flex: 1 1 calc(100% - 44px); }
  .apple-ui .ax-banner-actions { flex: 1 1 100%; padding-left: 44px; align-self: auto; }
}
@media (max-width: 420px) {
  .apple-ui .ax-brand-sep, .apple-ui .ax-brand-sub { display: none; }
}

/* Reduced motion: no movement, blur, pulse or shimmer — state changes and
   entrances become short dissolves. */
@media (prefers-reduced-motion: reduce) {
  .apple-ui *, .apple-ui *::before, .apple-ui *::after { animation: none !important; transition-property: opacity, background-color, color, box-shadow !important; transition-duration: 160ms !important; transition-delay: 0s !important; }
  .ax-js .apple-ui :is(.ax-header, .ax-banner, .ax-section-head, .ax-group-head, .ax-grid > .ax-card, .ax-empty, .ax-decision, .ax-panel, .ax-stats > .ax-stat, .ax-table-wrap, .ax-list, details.ax-disclosure, .ax-reveal) { transform: none; filter: none; }
  .apple-ui .ax-header > div:first-child { animation: none; }
  .ax-js .apple-ui .ax-thumb-wrap:not(.is-loaded) .ax-thumb { transform: none; filter: none; }
  .apple-ui .ax-grid .ax-card:hover, .apple-ui .ax-card:hover .ax-thumb, .apple-ui a.ax-stat:hover, .apple-ui .ax-media:hover > img, .apple-ui .ax-media > a:hover > img { transform: none; }

  .apple-ui input[type="checkbox"].ax-switch::before { transition: none; }
  .apple-ui .ax-btn.is-pending-shown, .apple-ui .ax-btn.is-pending-shown * { transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
