/* ==========================================================
   AnAwesomeGuide.com - main stylesheet
   Vanilla CSS, no frameworks. Targets WCAG 2.2 AA.

   Color note: the brand red #FF0000 is only 4.0:1 against
   white, which fails AA for normal-size text (needs 4.5:1).
   So #FF0000 is used for decorative accents (bars, borders,
   focus rings), where 3:1 is enough, and #CC0000 (5.9:1 on
   white) is used for red text, links and button backgrounds.
   ========================================================== */

:root {
  --brand-red: #FF0000;      /* accent: borders, bars, focus ring */
  --red-accessible: #CC0000; /* text, links, buttons (5.9:1 on white) */
  --red-dark: #A30000;       /* hover/active states */
  --text: #1A1A1A;           /* 17.4:1 on white */
  --text-muted: #555555;     /* 7.5:1 on white */
  --bg: #FFFFFF;
  --bg-alt: #F6F6F6;
  --border: #DDDDDD;
  --radius: 10px;
  --max-width: 1100px;
  --font: "Avenir Next", "Avenir", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img, iframe { max-width: 100%; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }

a { color: var(--red-accessible); text-underline-offset: 0.15em; }
a:hover { color: var(--red-dark); }

/* Visible keyboard focus everywhere (WCAG 2.4.7 / 2.4.11) */
:focus-visible {
  outline: 3px solid var(--brand-red);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container.narrow { max-width: 720px; }

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--text);
  color: #FFFFFF;
  border-radius: var(--radius);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; color: #FFFFFF; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-top: 4px solid var(--brand-red);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 0.75rem;
  min-height: 4rem;
}
.logo {
  font-size: 1.375rem; font-weight: 800;
  color: var(--text); text-decoration: none;
}
.logo span { color: var(--red-accessible); }
.logo:hover { color: var(--text); }

.nav-list {
  display: flex; flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-list a {
  display: inline-block;
  padding: 0.5rem 0.25rem;  /* touch target >= 24px (WCAG 2.5.8) */
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav-list a:hover { border-bottom-color: var(--brand-red); color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--red-accessible);
  border-radius: var(--radius);
  font: inherit; font-weight: 700;
  text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--red-accessible); color: #FFFFFF; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #FFFFFF; }
.btn-outline { background: transparent; color: var(--red-accessible); }
.btn-outline:hover { background: var(--red-accessible); color: #FFFFFF; }
.btn-block { display: block; width: 100%; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(4rem, 10vw, 7rem) 0;
  background: linear-gradient(180deg, #FFF5F5 0%, var(--bg) 100%);
  text-align: center;
}
.hero h1::after {
  content: "";
  display: block;
  width: 80px; height: 6px;
  margin: 1.25rem auto 0;
  background: var(--brand-red);
  border-radius: 3px;
}
.lead {
  max-width: 40rem;
  margin: 0 auto 2rem;
  font-size: 1.25rem;
  color: var(--text-muted);
}
.hero-actions {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 1rem;
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { text-align: center; }
.section-intro {
  text-align: center;
  color: var(--text-muted);
  margin: 0 auto 2.5rem;
  max-width: 40rem;
}

/* ---------- Video grid ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2rem;
}
.video-card h3 { margin-top: 1rem; }
.video-card p { margin: 0; color: var(--text-muted); }
.video-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000000;
  border-bottom: 4px solid var(--brand-red);
}
.video-wrapper iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
  align-items: stretch;
}
.price-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 2rem 1.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.price-card.featured { border: 3px solid var(--brand-red); }
.badge {
  position: absolute; top: -0.9rem; left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.2rem 0.85rem;
  background: var(--red-accessible); color: #FFFFFF;
  border-radius: 999px;
  font-size: 0.875rem; font-weight: 700;
  white-space: nowrap;
}
.price { margin: 0 0 1rem; }
.price .amount { font-size: 2rem; font-weight: 800; }
.price .unit { color: var(--text-muted); }
.features {
  flex-grow: 1;
  list-style: none;
  margin: 0 0 1.5rem; padding: 0;
}
.features li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.5rem;
}
.features li::before {
  content: "";
  position: absolute; left: 0; top: 0.95em;
  width: 0.6rem; height: 0.6rem;
  background: var(--brand-red);
  border-radius: 50%;
}

/* ---------- Newsletter form ---------- */
.newsletter-form {
  padding: 2rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border-left: 6px solid var(--brand-red);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
}
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 2px solid #767676;  /* 4.5:1 on white, meets 1.4.11 */
  border-radius: var(--radius);
}
.field textarea { min-height: 10rem; resize: vertical; }
.contact-form .field { margin-bottom: 1.25rem; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { border-color: var(--red-accessible); }
.optional, .hint { color: var(--text-muted); font-weight: 400; }
.hint { margin: 0.35rem 0 0; font-size: 0.9375rem; }
.required { color: var(--red-accessible); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 3rem 0 1.5rem;
  background: var(--text);
  color: #FFFFFF;
  border-top: 4px solid var(--brand-red);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-heading { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list a { display: inline-block; padding: 0.3rem 0; }
.site-footer a { color: #FFFFFF; }
.site-footer a:hover { color: #FFB3B3; }
.page-updated {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem; color: #D0D0D0;  /* 11:1 on #1A1A1A */
}
.copyright {
  margin: 0; padding-top: 1.5rem;
  border-top: 1px solid #444444;
  font-size: 0.9375rem; color: #D0D0D0;  /* 11:1 on #1A1A1A */
}


/* ==========================================================
   Pages and posts (added for the converted WordPress content)
   ========================================================== */
.nav-list a[aria-current="page"] { border-bottom-color: var(--brand-red); }
.center { text-align: center; }
.lead a, .prose a { font-weight: 600; }

.page-header { padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem; }
.page-header .lead { margin: 0; max-width: 46rem; text-align: left; }
.post { padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: 3rem; }
.post-header { margin-bottom: 2rem; }
.post-header h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); }
.post-header h1::after {
  content: ""; display: block;
  width: 64px; height: 5px; margin-top: 1rem;
  background: var(--brand-red); border-radius: 3px;
}
.post-meta { margin: 0; color: var(--text-muted); font-size: 0.9375rem; }
.post-hero { display: block; width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 2rem; }
.post-back { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* Long-form text */
.prose { overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.25rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose h2 { font-size: 1.625rem; margin-top: 2.5rem; }
.prose h3 { margin-top: 2rem; }
.prose li + li { margin-top: 0.35rem; }
.prose li > ul, .prose li > ol { margin-top: 0.35rem; }
.prose img { height: auto; border-radius: var(--radius); }
.prose figure { margin: 2rem 0; }
.prose figcaption { margin-top: 0.5rem; color: var(--text-muted); font-size: 0.9375rem; text-align: center; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.prose blockquote { margin: 1.5rem 0; padding: 0.5rem 1.25rem; border-left: 4px solid var(--brand-red); background: var(--bg-alt); }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.embed-link { padding: 1rem 1.25rem; background: var(--bg-alt); border-radius: var(--radius); }
.embed-link p { margin: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

.download-callout {
  display: grid; grid-template-columns: minmax(0, 200px) 1fr; gap: 1.25rem; align-items: center;
  margin: 2rem 0; padding: 1.25rem;
  background: var(--bg-alt); border-left: 6px solid var(--brand-red); border-radius: var(--radius);
}
.download-callout img { width: 100%; height: auto; border-radius: 6px; }
.download-callout p { margin: 0 0 0.75rem; }
.callout-title { font-weight: 700; }
@media (max-width: 480px) { .download-callout { grid-template-columns: 1fr; } }

/* Post lists */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.75rem;
  list-style: none; margin: 0 0 2rem; padding: 0;
}
.post-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.post-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 4px solid var(--brand-red); }
.post-card h2, .post-card h3 { font-size: 1.125rem; margin: 1rem 1.25rem 0.25rem; }
.post-card h2 a, .post-card h3 a { color: var(--text); text-decoration: none; }
/* Whole card is clickable; the link text stays the accessible name */
.post-card h2 a::after, .post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card:hover { border-color: var(--brand-red); }
.post-card:hover h2 a, .post-card:hover h3 a { color: var(--red-accessible); text-decoration: underline; }
.post-card:focus-within { outline: 3px solid var(--brand-red); outline-offset: 3px; }
.post-card a:focus-visible { outline: none; }
.post-card .post-meta { margin: 0 1.25rem; }
.post-card > p:last-child { margin: 0.5rem 1.25rem 1.25rem; color: var(--text-muted); font-size: 0.9375rem; }

.topic-nav ul {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  list-style: none; margin: 0 0 2rem; padding: 0;
}
.topic-nav a {
  display: inline-block; min-height: 44px; padding: 0.6rem 1rem;
  border: 2px solid var(--border); border-radius: 999px;
  color: var(--text); font-weight: 600; text-decoration: none;
}
.topic-nav a:hover { border-color: var(--red-accessible); color: var(--red-accessible); }
.topic-nav .count { color: var(--text-muted); font-size: 0.875rem; }
.blog-group { padding-top: 1rem; scroll-margin-top: 6rem; }
.blog-group h2 { scroll-margin-top: 6rem; }

/* Downloads */
.download {
  display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 1.75rem;
  padding: 2rem 0; border-top: 1px solid var(--border);
  scroll-margin-top: 6rem;
}
.download img { width: 100%; height: auto; border-radius: var(--radius); }
.download h2 { font-size: 1.5rem; }
.price-free { margin: 0 0 1rem; font-weight: 800; color: var(--red-accessible); }
.download-links { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 640px) { .download { grid-template-columns: 1fr; } }

/* Small screens: the wrapped menu is tall, so don't pin it */
@media (max-width: 640px) {
  .site-header { position: static; }
  :target, .blog-group h2, .download { scroll-margin-top: 1rem; }
}

/* Contact blocks in policies */
.prose address { font-style: normal; }

/* Downloads signup */
.signup-box { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); scroll-margin-top: 6rem; }
.signup-box .newsletter-form { margin-top: 1.5rem; }
.donate { margin: 2.5rem 0 3rem; color: var(--text-muted); }

/* Keep anchored headings clear of the sticky header (WCAG 2.4.11) */
:target { scroll-margin-top: 6rem; }
@media (max-width: 640px) { :target, .blog-group h2, .download { scroll-margin-top: 1rem; } }

/* ---------- Windows High Contrast / forced colors ---------- */
@media (forced-colors: active) {
  .btn { border: 2px solid ButtonText; }
  .features li::before { background: CanvasText; }
  .post-card, .topic-nav a { border: 1px solid CanvasText; }
}

/* ---------- Video previews (load the player on click) ---------- */
.video-facade { position: absolute; inset: 0; display: block; color: #FFFFFF; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-facade::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 76px; height: 54px; margin: -27px 0 0 -38px;
  border-radius: 14px; background: #CC0000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.video-facade::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: 1;
  margin: -12px 0 0 -8px;
  border-style: solid; border-width: 12px 0 12px 21px;
  border-color: transparent transparent transparent #FFFFFF;
}
.video-facade:hover::after { background: var(--red-dark); }
.video-facade:focus-visible { outline: 4px solid var(--brand-red); outline-offset: -4px; }

/* ---------- Keyboard shortcut chips ---------- */
kbd {
  display: inline-block;
  min-width: 1.75em;
  padding: 0.1em 0.45em;
  border: 1px solid #8A8A8A;
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit; font-size: 0.9375em; font-weight: 700;
  text-align: center; white-space: nowrap;
}
.keys { white-space: normal; }
.keys span[aria-hidden] { margin: 0 0.2em; color: var(--text-muted); }
.shortcut-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem;
  margin: 0 0 1.5rem; padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border-left: 6px solid var(--brand-red);
  border-radius: var(--radius);
  font-size: 1.125rem;
}
.shortcut-label { font-weight: 700; }

/* ---------- After each post ---------- */
.post-cta {
  margin: 3rem 0 0; padding: 1.5rem;
  border: 2px solid var(--border); border-top: 6px solid var(--brand-red);
  border-radius: var(--radius);
}
.post-cta h2 { margin-top: 0; font-size: 1.375rem; }
.post-cta p:last-child { margin-bottom: 0; }
.related { margin-top: 3rem; }
.related h2 { font-size: 1.375rem; }
.related .post-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }

/* ---------- Search ---------- */
.search-form { margin: 0 0 1.5rem; max-width: 40rem; }
.search-form label { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.search-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.search-row input {
  flex: 1 1 14rem; min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 2px solid #767676; border-radius: var(--radius);
  font: inherit;
}
.search-row input:focus-visible { outline: 3px solid var(--brand-red); outline-offset: 2px; }
.search-status { min-height: 1.5em; color: var(--text-muted); }
.search-results { list-style: none; padding: 0; margin: 0; }
.search-results li { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.search-results h2 { font-size: 1.125rem; margin: 0 0 0.25rem; }
.search-results p { margin: 0.25rem 0 0; color: var(--text-muted); }
.search-results .keys { color: var(--text); }

/* ---------- Pagination ---------- */
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; list-style: none; padding: 0; margin: 2.5rem 0 0; }
.pagination a {
  display: inline-block; min-width: 44px; min-height: 44px;
  padding: 0.6rem 0.9rem; text-align: center;
  border: 2px solid var(--border); border-radius: var(--radius);
  color: var(--red-accessible); font-weight: 700; text-decoration: none;
}
.pagination a:hover { border-color: var(--red-accessible); }
.pagination a[aria-current="page"] { background: var(--red-accessible); border-color: var(--red-accessible); color: #FFFFFF; }
.page-num { color: var(--text-muted); font-weight: 400; }

/* ---------- Keyboard shortcut reference ---------- */
.key-group { margin-top: 2.5rem; }
.key-table { width: 100%; border-collapse: collapse; }
.key-table th, .key-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.key-table th { background: var(--bg-alt); }
.key-table td:first-child { width: 16rem; }
@media (max-width: 640px) {
  .key-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .key-table tr { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
  .key-table td { display: block; width: auto !important; padding: 0.25rem 0; border: 0; }
}
@media (forced-colors: active) {
  .video-facade::after { background: ButtonText; }
  kbd { border-color: CanvasText; }
}
/* Small screens: the menu wraps to three rows, so don't keep it pinned on top */
@media (max-width: 640px) { .site-header { position: static; } }

/* ---------- Training booking ---------- */
.booking-box {
  margin: 1.5rem 0 2rem; padding: 1.5rem;
  border: 2px solid var(--border); border-top: 6px solid var(--brand-red);
  border-radius: var(--radius);
}
.booking-box p { margin: 0 0 0.75rem; }
.booking-box p:last-child { margin-bottom: 0; }
.booking-price { font-size: 1.375rem; }
.booking-price strong { font-size: 2rem; color: var(--text); }
.booking-note { color: var(--text-muted); font-size: 0.9375rem; }

/* ==========================================================
   Added Nov 25, 2026: live search, mailing-list pop-up, tip
   button, product column, course map
   ========================================================== */

/* ---------- Live search (opens under the menu) ---------- */
.site-search {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}
.site-search[hidden], .site-search-list[hidden] { display: none; }
.site-search-inner { position: relative; padding-top: 0.75rem; padding-bottom: 0.75rem; max-width: 760px; }
.site-search-form { display: flex; gap: 0.5rem; align-items: center; }
.site-search-form input {
  flex: 1 1 auto; min-height: 44px; padding: 0.5rem 1rem;
  font: inherit; color: var(--text); background: var(--bg);
  border: 2px solid #767676; border-radius: 999px;
}
.site-search-form input:focus-visible { outline: 3px solid var(--brand-red); outline-offset: 2px; border-color: var(--red-accessible); }
.site-search-close {
  flex: none; min-width: 44px; min-height: 44px;
  font: inherit; font-size: 1.5rem; line-height: 1; color: var(--text);
  background: transparent; border: 2px solid var(--border); border-radius: 999px; cursor: pointer;
}
.site-search-close:hover { border-color: var(--red-accessible); color: var(--red-accessible); }
.site-search-list { list-style: none; margin: 0.5rem 0 0; padding: 0; max-height: min(60vh, 28rem); overflow-y: auto; }
.site-search-list li { margin: 0; }
.site-search-list a {
  display: block; padding: 0.6rem 1rem; border-radius: var(--radius);
  color: var(--text); text-decoration: none;
}
.site-search-list li.is-active a, .site-search-list a:hover { background: var(--bg-alt); color: var(--text); }
.site-search-list li.is-active a { outline: 2px solid var(--brand-red); outline-offset: -2px; }
.ss-title { display: block; font-weight: 600; line-height: 1.3; }
.ss-meta { display: block; margin-top: 0.15rem; font-size: 0.875rem; color: var(--text-muted); }
.ss-all .ss-title { color: var(--red-accessible); }
@media (max-width: 640px) {
  .site-search { position: static; box-shadow: none; }
}

/* ---------- Mailing-list pop-up ---------- */
.signup-dialog {
  position: fixed; inset: 0; margin: auto;
  width: calc(100% - 2rem); max-width: 30rem; max-height: calc(100vh - 2rem); overflow-y: auto;
  padding: 1.75rem; color: var(--text); background: var(--bg);
  border: 0; border-top: 6px solid var(--brand-red); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.signup-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.signup-dialog h2 { margin: 0 2rem 0.5rem 0; font-size: 1.5rem; }
.signup-dialog p { margin: 0 0 1rem; }
.signup-dialog .field { margin-bottom: 1rem; }
.signup-dialog .hint { margin: 0.75rem 0 0; }
.signup-dialog-x {
  position: absolute; top: 0.75rem; right: 0.75rem;
  min-width: 44px; min-height: 44px; font: inherit; font-size: 1.75rem; line-height: 1;
  color: var(--text); background: transparent; border: 0; border-radius: 999px; cursor: pointer;
}
.signup-dialog-x:hover { color: var(--red-accessible); }
.signup-dialog-no {
  display: block; margin: 1rem auto 0; min-height: 44px; padding: 0.5rem 1rem;
  font: inherit; color: var(--text-muted); background: transparent; border: 0;
  text-decoration: underline; cursor: pointer;
}
.signup-dialog-no:hover { color: var(--text); }

/* ---------- Tip button ("Buy me a coffee") ---------- */
.tip-fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 20;
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0.55rem 1.1rem 0.55rem 0.9rem;
  color: #FFFFFF; background: var(--red-accessible);
  border: 2px solid #FFFFFF; border-radius: 999px;
  font-weight: 700; font-size: 0.9375rem; text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: background-color 0.15s, transform 0.15s;
}
.tip-fab:hover { color: #FFFFFF; background: var(--red-dark); transform: translateY(-2px); }
.tip-cup { display: inline-flex; }
.tip-short { display: none; }
@media (max-width: 480px) {
  .tip-long { display: none; }
  .tip-short { display: inline; }
}
.tip-btn { display: inline-flex; align-items: center; gap: 0.5rem; }
.tip-btn svg { flex: none; }

/* ---------- Product column and Amazon picks ---------- */
.ad-column { display: none; }
@media (min-width: 1100px) {
  main.has-rail {
    display: grid;
    grid-template-columns: minmax(0, 720px) 300px;
    justify-content: center; column-gap: 2.5rem; align-items: start;
  }
  main.has-rail > * { grid-column: 1 / -1; }
  main.has-rail > article.post { grid-column: 1; grid-row: 1; margin: 0; }
  main.has-rail > .ad-column {
    display: block; grid-column: 2; grid-row: 1;
    position: sticky; top: 6rem; align-self: start;
    margin-top: clamp(2.5rem, 6vw, 4rem);
  }
}
.rail-box {
  margin: 0 0 1.25rem; padding: 1.1rem 1.25rem;
  background: var(--bg-alt); border: 1px solid var(--border); border-top: 4px solid var(--brand-red);
  border-radius: var(--radius);
}
.rail-title { margin: 0 0 0.25rem; font-size: 1.0625rem; }
.rail-note { margin: 0 0 0.75rem; font-size: 0.8125rem; color: var(--text-muted); }
.rail-box p { margin: 0 0 0.5rem; }
.rail-box p:last-child { margin-bottom: 0; }
.gear-list { list-style: none; margin: 0; padding: 0; }
.gear-list li + li { margin-top: 0.25rem; }
.gear-list a {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.55rem 0.6rem; border-radius: var(--radius);
  color: var(--text); text-decoration: none;
}
.gear-list a:hover { background: var(--bg); color: var(--text); }
.gear-icon { flex: none; width: 1.75rem; font-size: 1.4rem; line-height: 1.3; text-align: center; }
.gear-name { display: block; font-weight: 700; line-height: 1.3; color: var(--red-accessible); }
.gear-list a:hover .gear-name { text-decoration: underline; }
.gear-desc { display: block; font-size: 0.875rem; line-height: 1.4; color: var(--text-muted); }

.amazon-picks {
  margin: 3rem 0 0; padding: 1.5rem;
  border: 2px solid var(--border); border-top: 6px solid var(--brand-red); border-radius: var(--radius);
}
.amazon-picks h2 { margin: 0 0 0.35rem; font-size: 1.375rem; }
.picks-note { margin: 0 0 1rem; font-size: 0.875rem; color: var(--text-muted); }
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 0.5rem 1rem; }
.gear-grid li + li { margin-top: 0; }
.gear-grid a { border: 1px solid var(--border); }

/* ---------- Course map (/finalcut/ and /learnfinalcut/) ---------- */
.course-header { max-width: 46rem; margin: 0 auto 2rem; }
.course-header .eyebrow { margin: 0 0 0.5rem; color: var(--red-accessible); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.875rem; }
.course-header h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.course-header .button-row { justify-content: flex-start; margin-top: 1.25rem; }
.course-intro { max-width: 46rem; margin: 0 auto; }
.course-body { max-width: 46rem; margin: 0 auto; }
.course-chapters { margin-top: 2.5rem; }
.course-chapters h2 { text-align: left; margin-top: 0; }
.course-jump { margin: 0 0 1.5rem; }
.course-jump ul { margin-bottom: 0; }
.course-map {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  list-style: none; margin: 0; padding: 0;
}
.course-chapter {
  margin: 0; padding: 1.25rem 1.25rem 1rem;
  background: var(--bg); border: 1px solid var(--border); border-top: 5px solid var(--brand-red);
  border-radius: var(--radius); scroll-margin-top: 6rem;
}
.course-chapter h3 { display: flex; gap: 0.75rem; align-items: center; margin: 0 0 0.75rem; font-size: 1.125rem; }
.chapter-num {
  flex: none; width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
  color: #FFFFFF; background: var(--red-accessible); border-radius: 50%; font-size: 1rem; font-weight: 800;
}
.chapter-count { margin-left: auto; color: var(--text-muted); font-size: 0.8125rem; font-weight: 400; white-space: nowrap; }
.lesson-list { list-style: none; margin: 0; padding: 0; counter-reset: lesson; }
.lesson-list li { margin: 0; }
.lesson-list li + li { margin-top: 0; }
.lesson-list a {
  display: block; padding: 0.4rem 0.5rem; border-radius: 6px;
  color: var(--text); font-weight: 500; text-decoration: none;
}
.lesson-list a:hover { background: var(--bg-alt); color: var(--red-accessible); text-decoration: underline; }
.course-map .lesson-list li { border-top: 1px solid var(--border); }
.course-map .lesson-list li:first-child { border-top: 0; }
.course-more { margin-top: 1.25rem; }

@media print {
  .tip-fab, .ad-column, .amazon-picks, .site-search, .signup-dialog { display: none !important; }
}
@media (forced-colors: active) {
  .tip-fab, .rail-box, .amazon-picks, .course-chapter, .signup-dialog { border: 2px solid CanvasText; }
}
.course-header, .course-body { max-width: 46rem; margin-left: 0; margin-right: 0; }
.course-header .lead { margin: 0 0 1rem; max-width: none; text-align: left; font-size: 1.125rem; }
.course-header h1::after { content: ""; display: block; width: 64px; height: 5px; margin-top: 1rem; background: var(--brand-red); border-radius: 3px; }
/* Hide the Advertisement box when AdSense has nothing to show */
.rail-ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }

/* In-article ad on phones and tablets */
.mobile-ad { margin: 2rem 0; text-align: center; }
.mobile-ad .rail-note { margin: 0 0 0.35rem; text-align: center; }
.mobile-ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
