:root {
  color-scheme: light;
  --ink: #000;
  --muted: #777;
  --page-width: 1080px;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html { background: #fff; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.42;
}

a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { color: var(--muted); }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.site-shell {
  width: min(var(--page-width), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  min-height: 88px;
  gap: 0;
}

.site-brand { justify-self: start; }

.site-nav {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  text-align: center;
}

.site-nav a:last-child { justify-self: end; }
.site-nav [aria-current="page"] { color: #000; }

.video-entry + .video-entry { margin-top: clamp(48px, 7vw, 88px); }
.video-entry[hidden] { display: none !important; }

.video-frame {
  width: 100%;
  aspect-ratio: var(--video-ratio);
  overflow: hidden;
  background: #000;
}

.video-frame.portrait {
  width: min(100%, 640px);
  margin-inline: auto;
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
}

.video-frame.is-loaded iframe { opacity: 1; }

.video-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #fff;
}

.caption {
  margin-top: 14px;
  overflow-wrap: anywhere;
}

.caption i, .caption em { font-weight: 700; }
.caption img {
  display: block;
  width: min(100%, 670px);
  max-width: 100%;
  height: auto;
  aspect-ratio: var(--image-ratio, auto);
  margin: 14px 0;
}

.caption a { text-decoration: underline; text-underline-offset: 0.18em; }

.featured-video .video-entry { margin: 0; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 200px));
  justify-content: space-between;
  gap: 28px;
  margin: clamp(58px, 8vw, 100px) 0 72px;
}

.category-card {
  width: 100%;
  max-width: 200px;
  min-width: 0;
}
.category-card img {
  display: block;
  width: 100%;
  aspect-ratio: 200 / 134;
  object-fit: cover;
}
.category-card span { display: block; margin-top: 8px; }
.category-card[aria-current="page"] span { color: var(--muted); }

.blog-page .caption { text-align: center; }

.subpage-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 36px;
}
.subpage-heading h1 { margin: 0; font-size: 14px; }
.subpage-heading a { color: var(--muted); }

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

@media (max-width: 640px) {
  body { font-size: 13px; }

  .site-shell { width: min(100% - 24px, var(--page-width)); }

  .site-header {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
    padding: 18px 0 30px;
  }

  .site-brand { justify-self: start; }

  .site-nav {
    grid-column: auto;
    width: 100%;
    font-size: 12px;
  }

  .site-nav a:first-child { justify-self: start; }
  .site-nav a:last-child { justify-self: end; }

  .video-frame.portrait { width: 100%; }

  .video-entry + .video-entry { margin-top: 52px; }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 200px));
    gap: 26px 16px;
    margin-top: 56px;
  }

  .subpage-heading { margin-bottom: 28px; }
}

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

/* KYNAN_HEADER_ALIGNMENT_20260716
   Keep the global navigation in the same position as www.kynantait.com. */
.site-header {
  width: min(100%, 1007px);
  margin: 10px auto 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(36px, 7vw, 100px);
  min-height: 22px;
  padding: 0;
  line-height: 1.35;
}

.site-nav {
  grid-column: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  text-align: center;
}

.site-nav a,
.site-nav a:first-child,
.site-nav a:last-child {
  justify-self: stretch;
  text-align: center;
}

.site-shell > main { margin-top: 56px; }

@media (max-width: 700px),
  (orientation: landscape) and (max-height: 500px) and (hover: none) and (pointer: coarse) {
  .site-shell {
    width: 100%;
    padding: 16px 16px 28px;
  }

  .site-header {
    display: block;
    width: 100%;
    margin: 0;
    min-height: 0;
    padding: 0;
    font-size: 14px;
  }

  .site-brand {
    display: block;
    margin-bottom: 12px;
  }

  .site-nav { width: 100%; }

  .site-nav a,
  .site-nav a:first-child,
  .site-nav a:last-child {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    justify-self: stretch;
    padding: 4px 1px;
    font-size: 12px;
    line-height: 1;
  }

  .site-shell > main { margin-top: 24px; }
}
