/**
 * ACE Orientation
 *
 * The homepage's and the Demo page's system (same tokens, buttons and cards),
 * scoped to .ao so nothing here reaches another page. The video sits in a
 * drawing-sheet frame with a title block under it, as the Demo page's does;
 * the courses are listed beside it (above it on a phone).
 */

/* ============================================================ tokens */

.ao {
  --ao-bg: var(--color-bg, #262624);
  --ao-deep: #1a1918;
  --ao-card: var(--color-bg-alt, #30302e);
  --ao-sheet: #1b1d1d;
  --ao-line: rgba(255, 255, 255, .08);
  --ao-line2: rgba(255, 255, 255, .14);
  --ao-text: var(--color-text, #e8e6dc);
  --ao-head: var(--color-heading, #f5f4ef);
  --ao-muted: var(--color-text-muted, #a39e93);
  --ao-teal: var(--color-primary, #008a81);
  --ao-rgb: var(--ace-primary-rgb, 0, 138, 129);
  --ao-teal-text: #61b6b1;
  --ao-teal-fill: #007870;
  --ao-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --ao-head-font: var(--font-heading, Poppins, system-ui, sans-serif);
  --ao-body-font: var(--font-body, Inter, system-ui, sans-serif);
  --ao-ink: 226, 236, 240;

  color: var(--ao-text);
  font-family: var(--ao-body-font);
  overflow-x: hidden;
  overflow-x: clip;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .ao {
    --ao-teal-text: color-mix(in srgb, var(--ao-teal) 62%, #fff);
    --ao-teal-fill: color-mix(in srgb, var(--ao-teal) 87%, #000);
  }
}

/* A light theme from ACE Light Mode: the page's own surfaces follow it; the video's sheet stays dark. */
html[data-ace-theme=light] .ao {
  --ao-deep: var(--color-bg, #eeedeb);
  --ao-line: rgba(22, 22, 20, .11);
  --ao-line2: rgba(22, 22, 20, .2);
  --ao-teal-text: var(--color-primary, #00665f);
}
html[data-ace-theme=light] .ao-btn.is-ghost { background: rgba(22, 22, 20, .03); }
html[data-ace-theme=light] .ao-btn.is-ghost:hover { background: rgba(22, 22, 20, .06); }
html[data-ace-theme=light] .ao-tab:hover { background: rgba(22, 22, 20, .05); }
html[data-ace-theme=light] .ao-sheet { box-shadow: 0 24px 60px rgba(22, 22, 20, .18); }

/* ============================================================ the theme around it */

.ace-ori-on .site-footer { display: none; }

/* ============================================================ base */

.ao *, .ao *::before, .ao *::after { box-sizing: border-box; }
.ao h1, .ao h2, .ao h3 { margin: 0; }
:where(.ao) p, :where(.ao) dl, :where(.ao) dd, :where(.ao) ul { margin: 0; }
:where(.ao) a { color: inherit; }
.ao [hidden] { display: none !important; }
.ao-i { display: inline-block; flex: none; vertical-align: middle; }
.ao-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ao-wrap { max-width: var(--max-width, 1180px); margin: 0 auto; padding: 0 24px; }
.ao a:focus-visible, .ao button:focus-visible { outline: 2px solid var(--ao-teal-text); outline-offset: 3px; }

/* ============================================================ buttons */

.ao-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.ao-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  font: 600 .9rem/1.2 var(--ao-body-font); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.ao-btn:hover { transform: translateY(-1px); }
.ao-btn.is-primary { background: var(--ao-teal-fill); color: #fff; box-shadow: 0 10px 28px rgba(var(--ao-rgb), .3), inset 0 1px 0 rgba(255, 255, 255, .18); }
.ao-btn.is-ghost { background: rgba(255, 255, 255, .04); border-color: var(--ao-line2); color: var(--ao-head); }
.ao-btn.is-ghost:hover { border-color: rgba(var(--ao-rgb), .6); background: rgba(var(--ao-rgb), .08); }

/* ============================================================ A. heading */

.ao-hero { position: relative; padding: 30px 0 8px; isolation: isolate; }
.ao-hero::before {
  content: ""; position: absolute; inset: -84px 0 -700px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(760px 420px at 30% 70%, rgba(var(--ao-rgb), .16), transparent 70%),
    radial-gradient(420px 260px at 96% 12%, rgba(var(--ao-rgb), .07), transparent 70%);
}
.ao-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px 48px; align-items: end; }
.ao-kicker { font: 700 .74rem/1.2 var(--ao-body-font); letter-spacing: .16em; text-transform: uppercase; color: var(--ao-teal-text); }
.ao-hero h1 { margin-top: 12px; font: 800 clamp(2rem, 3.3vw, 2.65rem)/1.07 var(--ao-head-font); letter-spacing: -.03em; color: var(--ao-head); text-wrap: balance; }
.ao-lede { font-size: 1rem; line-height: 1.6; color: var(--ao-muted); max-width: 52ch; text-wrap: pretty; }
.ao-live {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 12px; padding: 8px 14px 8px 11px;
  border-radius: 999px; border: 1px solid rgba(var(--ao-rgb), .45); background: rgba(var(--ao-rgb), .1);
  font-size: .88rem; font-weight: 600; line-height: 1.35; color: var(--ao-head);
}
.ao-live .ao-i { color: var(--ao-teal-text); }

/* ============================================================ B. the courses */

.ao-courses { padding: 22px 0 56px; }
.ao-theatre { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.ao-courses.is-single .ao-theatre { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.ao-panels { min-width: 0; }

.ao-sheet {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border-radius: 14px; border: 1px solid var(--ao-line2); overflow: hidden; background: var(--ao-sheet);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .3);
}
.ao-frame {
  position: relative; background: #0d1312;
  background-image:
    linear-gradient(rgba(var(--ao-ink), .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--ao-ink), .035) 1px, transparent 1px);
  background-size: 32px 32px;
}
.ao-frame::before { content: ""; display: block; padding-top: 56.25%; }
.ao-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: #0d1312; object-fit: contain; }
.ao-nojs { position: absolute; inset: auto 16px 16px; color: #fff; }

.ao-empty {
  position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 10px;
  padding: 24px; text-align: center; color: rgba(var(--ao-ink), .78); font-size: .95rem; line-height: 1.55;
}
.ao-empty-ico { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(var(--ao-rgb), .55); color: #7fd0ca; background: rgba(var(--ao-rgb), .12); }
.ao-empty-h { font: 700 clamp(1.05rem, 2vw, 1.35rem)/1.3 var(--ao-head-font); color: #f3f6f6; max-width: 34ch; text-wrap: balance; }
.ao-empty .ao-ctas { justify-content: center; margin-top: 6px; }
.ao-admin { font-size: .82rem; }
.ao-admin a { color: #7fd0ca; }

/* The title block: which course, who it is for, when it was posted. */
.ao-block {
  display: grid; grid-template-columns: minmax(0, 1fr) repeat(2, max-content);
  border-top: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(var(--ao-ink), .035), transparent);
}
.ao-cell { min-width: 0; padding: 9px 22px 10px 14px; border-left: 1px solid rgba(255, 255, 255, .08); }
.ao-cell:first-child { border-left: 0; }
.ao-cell dt { font: 600 .6rem/1.2 var(--ao-mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(var(--ao-ink), .62); }
.ao-cell dd { margin-top: 4px; font: 600 .8rem/1.3 var(--ao-mono); color: rgba(var(--ao-ink), .94); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Under the sheet: what it covers, and the next step. */
.ao-after { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.ao-after.is-solo { grid-template-columns: minmax(0, 1fr); }
.ao-about, .ao-next { padding: 18px 20px 20px; border-radius: 14px; border: 1px solid var(--ao-line); background: var(--ao-card); }
.ao .ao-h3 { margin-bottom: 12px; font: 700 .7rem/1.2 var(--ao-body-font); letter-spacing: .12em; text-transform: uppercase; color: var(--ao-muted); }
.ao-list { list-style: none; padding: 0; display: grid; gap: 9px; }
.ao-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; font-size: .93rem; line-height: 1.5; color: var(--ao-text); }
.ao-list .ao-i { margin-top: 3px; color: var(--ao-teal-text); }

/* The courses, beside the video. */
.ao-rail { position: sticky; top: 96px; display: flex; flex-direction: column; min-width: 0; padding: 14px 8px 8px; border-radius: 14px; border: 1px solid var(--ao-line); background: var(--ao-card); }
.ao .ao-rail-h { margin: 0 10px 8px; font: 700 .7rem/1.2 var(--ao-body-font); letter-spacing: .12em; text-transform: uppercase; color: var(--ao-muted); }
.ao-tabs { display: grid; gap: 2px; }
.ao-tab {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px;
  padding: 10px 12px; border-radius: 10px; font-size: .92rem; font-weight: 500; line-height: 1.3; color: var(--ao-text); text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.ao-tab:hover { background: rgba(255, 255, 255, .05); color: var(--ao-head); }
.ao-tab > .ao-i { color: var(--ao-muted); }
.ao-tab-s { flex: none; display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--ao-line2); font: 600 .66rem/1.4 var(--ao-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ao-muted); }
.ao-tab[aria-selected="true"] { background: rgba(var(--ao-rgb), .16); color: var(--ao-head); font-weight: 600; }
.ao-tab[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--ao-teal-text); }
.ao-tab[aria-selected="true"] > .ao-i { color: var(--ao-teal-text); }

/* ============================================================ C. footer */

.ao-foot { padding: 34px 0 22px; background: var(--ao-deep); border-top: 1px solid var(--ao-line); font-size: .86rem; }
.ao-foot-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 36px; }
.ao-foot-name { font: 700 1rem var(--ao-head-font); color: var(--ao-head); text-decoration: none; }
.ao-foot-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.ao-foot-links a { color: var(--ao-text); text-decoration: none; }
.ao-foot-links a:hover { color: var(--ao-teal-text); }
.ao-foot-base { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--ao-line); font-size: .76rem; color: var(--ao-muted); }

/* ============================================================ smaller screens */

@media (max-width: 960px) {
  .ao-intro { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ao-theatre { grid-template-columns: minmax(0, 1fr); }
  .ao-rail { order: -1; position: static; padding: 0; border: 0; background: none; }
  .ao .ao-rail-h { margin: 0 0 8px; }
  .ao-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .ao-tabs::-webkit-scrollbar { display: none; }
  .ao-tab { flex: none; min-height: 42px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--ao-line2); background: var(--ao-card); }
  .ao-tab[aria-selected="true"] { border-color: rgba(var(--ao-rgb), .7); }
  .ao-tab[aria-selected="true"]::before { display: none; }
}
@media (max-width: 720px) {
  .ao-wrap { padding: 0 16px; }
  .ao-after { grid-template-columns: minmax(0, 1fr); }
  .ao-sheet { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .ao-block { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ao-cell:first-child { grid-column: 1 / -1; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .ao-cell:nth-child(2) { border-left: 0; }
  .ao-empty { font-size: .88rem; gap: 8px; }
  .ao-empty-ico { width: 44px; height: 44px; }
  .ao-btn { padding: 11px 16px; }
  .ao-courses { padding-bottom: 96px; }                 /* clear of the phone's tab bar */
}

@media (prefers-reduced-motion: reduce) {
  .ao-btn, .ao-tab { transition: none; }
  .ao-btn:hover { transform: none; }
}
@media (forced-colors: active) {
  .ao-tab[aria-selected="true"] { outline: 2px solid Highlight; }
  .ao-btn { border-color: ButtonText; }
}
