/* AES HUB Video Guides, shared styles.
   Uses Sora and the landing page's own colours so the section matches the site's
   landing page. Contrast is held to 4.5:1 or better (guide 4.3a): body text
   #1A1A1A and small text #5F6157 on #FAFAF6 or white; white on #446F27 for the
   selected chip (5.6:1); links #066B5A (6.3:1). State is never colour alone:
   the selected chip carries a tick, the playing chapter carries the words
   "Now playing". */
:root {
  --bg: #FAFAF6;
  --ink: #1A1A1A;
  --muted: #5F6157;
  --hairline: rgba(20, 30, 20, 0.10);
  --teal: #0E8E75;
  --teal-dark: #066B5A;
  --green-deep: #446F27;
  --primary-green: #9BC31E;
  --card: #FFFFFF;
  --card-shadow: 0 1px 2px rgba(20,30,20,0.04), 0 8px 24px rgba(20,30,20,0.05);
  --card-shadow-hover: 0 2px 4px rgba(20,30,20,0.06), 0 22px 48px rgba(20,30,20,0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* the hidden attribute must win over the display rules below (the Play button and poster are hidden this way) */
[hidden] { display: none !important; }
body {
  font-family: 'Sora', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; min-height: 100vh;
  padding: clamp(24px, 5vh, 56px) clamp(16px, 6vw, 96px) 48px;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 260px;
  background: linear-gradient(180deg, rgba(155,195,30,0.10), rgba(14,142,117,0.0));
  pointer-events: none; z-index: 0;
}
.wrap { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; }
a { color: var(--teal-dark); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* header */
.head { display: flex; align-items: center; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--hairline); }
.head a.home { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.logo { width: 44px; height: auto; flex: none; }
.site-name { font-size: clamp(22px, 3.4vw, 30px); font-weight: 600; letter-spacing: -0.02em; }
.crumbs { margin-top: 18px; font-size: 13px; color: var(--muted); }
.crumbs a { font-weight: 500; }

/* gallery */
.intro { margin: 26px 0 22px; max-width: 640px; }
.intro h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 600; letter-spacing: -0.02em; }
.intro p { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chip {
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--card); color: var(--ink); border: 1px solid rgba(20,30,20,0.22);
}
.chip:hover { border-color: var(--teal); }
.chip .tick { display: none; width: 15px; height: 15px; }
.chip[aria-pressed="true"] { background: var(--green-deep); border-color: var(--green-deep); color: #FFFFFF; font-weight: 600; }
.chip[aria-pressed="true"] .tick { display: inline-block; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--hairline); border-radius: 16px; overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform .28s cubic-bezier(0.2,0.9,0.3,1), box-shadow .28s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #E5E5E5; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.length {
  position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 6px;
  background: rgba(0,0,0,0.78); color: #FFFFFF; font-size: 12px; font-weight: 600;
}
.play-badge {
  position: absolute; left: 10px; bottom: 10px; width: 40px; height: 40px;
  border-radius: 50%; background: rgba(255,255,255,0.92); display: grid; place-items: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.play-badge svg { width: 18px; height: 18px; margin-left: 2px; color: var(--green-deep); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.card-blurb { font-size: 13.5px; line-height: 1.55; color: var(--muted); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.tag {
  font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 4px;
  background: rgba(155,195,30,0.10); border: 1px solid rgba(155,195,30,0.40); color: var(--green-deep);
}
.empty { padding: 28px; border: 1px dashed rgba(20,30,20,0.25); border-radius: 16px; color: var(--muted); font-size: 15px; }

/* player page */
.layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 28px; margin-top: 24px; align-items: start; }
.video-title { font-size: clamp(24px, 3.6vw, 34px); font-weight: 600; letter-spacing: -0.02em; }
.meta { margin-top: 6px; font-size: 14px; color: var(--muted); }
.player { position: relative; margin-top: 18px; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--card-shadow); }
.player img, .player video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.start {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: none;
  background: var(--green-deep); color: #FFFFFF; box-shadow: 0 6px 20px rgba(0,0,0,0.28);
}
.start:hover { background: #38591F; }
.start svg { width: 18px; height: 18px; }
.start[disabled] { cursor: progress; }
.status { margin-top: 10px; min-height: 1.4em; font-size: 14px; color: var(--muted); }
.note { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.panel { background: var(--card); border: 1px solid var(--hairline); border-radius: 16px; padding: 20px; box-shadow: var(--card-shadow); }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.chapters { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.chapter {
  width: 100%; text-align: left; font: inherit; cursor: pointer;
  display: grid; grid-template-columns: 52px 1fr; gap: 4px 10px; align-items: baseline;
  padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink);
}
.chapter:hover { background: rgba(155,195,30,0.10); }
.chapter .time { font-size: 13px; font-weight: 600; color: var(--teal-dark); font-variant-numeric: tabular-nums; }
.chapter .name { font-size: 14.5px; font-weight: 500; }
.chapter .now { grid-column: 2; display: none; font-size: 12px; font-weight: 600; color: var(--green-deep); }
.chapter[aria-current="true"] { border-color: var(--green-deep); background: rgba(155,195,30,0.10); }
.chapter[aria-current="true"] .now { display: block; }
.summary p { font-size: 15px; line-height: 1.65; }
.summary p + p { margin-top: 10px; }
.links { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; line-height: 1.5; }
.foot { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--hairline); font-size: 12.5px; color: var(--muted); }
noscript p { margin-top: 16px; padding: 14px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--card); }

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .start { padding: 12px 20px; font-size: 15px; }
}
.summary { margin-top: 22px; }
.note.gap { margin-top: 10px; }
.notice { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 22px; max-width: 720px;
  padding: 12px 16px; border: 1px solid rgba(20,30,20,0.18); border-radius: 12px; background: var(--card);
  font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.notice svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--teal-dark); }
.layout .notice { margin: 14px 0 0; }
