:root {
  --background: #faf7f0;
  --foreground: #3a2f28;
  --card: #f4efe5;
  --primary: #6b2323;
  --primary-foreground: #faf7f0;
  --secondary: #f0e9dc;
  --muted: #f0e9dc;
  --muted-foreground: #6b635a;
  --accent: #c4833a;
  --accent-soft: #e6c58a;
  --ink: #2a2420;
  --ink-foreground: #f7f3eb;
  --ink-muted: #c9bfb0;
  --border: #ddd2c0;
  --destructive: #b42318;
  --ring: #8b3a3a;
  --shadow-soft: 0 8px 24px -16px rgba(60, 40, 20, 0.35);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Karla", system-ui, sans-serif;
  --radius: 0.375rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

img,
svg,
video {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  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: 1rem;
  z-index: 100;
  transform: translateY(-200%);
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(250, 247, 240, 0.95);
  backdrop-filter: blur(8px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
}

.brand__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}

.brand__subtitle {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.site-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(58, 47, 40, 0.85);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--primary);
}

.site-nav__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.9375rem;
  font-weight: 600;
}

.site-nav__button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-nav {
  position: relative;
  display: block;
}

.mobile-nav summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.9375rem;
  font-weight: 600;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav__panel {
  position: absolute;
  right: 0;
  margin-top: 0.5rem;
  width: 14rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.mobile-nav__panel a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
}

.mobile-nav__panel a:hover {
  background: var(--secondary);
}

@media (min-width: 640px) {
  .site-nav {
    display: flex;
  }

  .mobile-nav {
    display: none;
  }
}

/* Hero */
.page-hero {
  border-bottom: 1px solid var(--border);
  background: rgba(240, 233, 220, 0.5);
  padding: 3.5rem 0;
}

.page-hero__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
}

.page-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.1;
}

.page-hero__ornament {
  display: block;
  margin-top: 1.25rem;
  width: 7.5rem;
  height: 0.75rem;
  color: var(--accent);
}

.page-hero__description {
  margin: 1.25rem 0 0;
  max-width: 42rem;
  color: var(--muted-foreground);
  font-size: 1.0625rem;
}

/* Video guides layout */
.video-guides-section {
  padding: 3rem 0 4rem;
}

.video-guides-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .video-guides-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 2rem;
  }

  .video-guides-index {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
  }
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.video-guides-index__panel {
  padding: 1.25rem;
}

.video-guides-index__label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
}

.video-guides-index__heading {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
}

.video-guides-search {
  position: relative;
  display: block;
  margin: 1.25rem 0 1.25rem;
}

.video-guides-search svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
}

.video-guides-search input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
}

.video-guides-search input::placeholder {
  color: var(--muted-foreground);
}

.video-guides-empty {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(240, 233, 220, 0.4);
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.video-guides-category + .video-guides-category {
  margin-top: 1.5rem;
}

.video-guides-category__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.video-guides-category__rule {
  display: inline-block;
  width: 1rem;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
}

.video-guides-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.video-guides-item {
  display: flex;
  width: 100%;
  min-height: 2.75rem;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(58, 47, 40, 0.85);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.video-guides-item:hover {
  border-color: var(--border);
  background: rgba(240, 233, 220, 0.5);
}

.video-guides-item--active {
  border-color: rgba(107, 35, 35, 0.4);
  background: rgba(107, 35, 35, 0.1);
  color: var(--primary);
}

.video-guides-item__dot {
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.4rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.45;
  flex-shrink: 0;
}

.video-guides-item--active .video-guides-item__dot {
  opacity: 1;
}

.video-guides-item__title {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
}

.video-guides-player-shell {
  overflow: hidden;
}

.video-guides-player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1a1512;
}

.video-guides-player-frame video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.video-guides-meta {
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

.video-guides-meta__category {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

.video-guides-meta__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
  line-height: 1.2;
}

.video-guides-meta__description {
  margin: 0.75rem 0 0;
  max-width: 48rem;
  color: var(--muted-foreground);
}

.video-guides-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(180, 35, 24, 0.3);
  border-radius: var(--radius);
  background: rgba(180, 35, 24, 0.08);
  color: var(--destructive);
  font-size: 0.875rem;
}

/* Documentation details below the player */
.video-guides-details {
  margin-top: 1.5rem;
  padding: 1.5rem 1.25rem;
}

@media (min-width: 640px) {
  .video-guides-details {
    padding: 1.75rem 1.5rem;
  }
}

.video-guides-details__section {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.video-guides-details__section--last {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.video-guides-details__heading {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--primary);
  line-height: 1.25;
}

.video-guides-details__text {
  margin: 0;
  color: var(--foreground);
  line-height: 1.7;
}

.video-guides-details__list,
.video-guides-details__steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--foreground);
  line-height: 1.7;
}

.video-guides-details__list li + li,
.video-guides-details__steps li + li {
  margin-top: 0.45rem;
}

.video-guides-related {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.video-guides-related__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--primary);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.video-guides-related__link:hover {
  border-color: var(--primary);
  background: rgba(107, 35, 35, 0.06);
}

.video-guides-related__empty {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--ink-foreground);
  padding: 3.5rem 0;
}

.site-footer__grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr;
  }
}

.site-footer__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.875rem;
}

.site-footer__tagline {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.site-footer__ornament {
  display: block;
  margin-top: 1.25rem;
  width: 7.5rem;
  height: 0.75rem;
  color: var(--accent-soft);
}

.site-footer__copy {
  margin: 1.25rem 0 0;
  max-width: 28rem;
  color: var(--ink-muted);
}

.site-footer__nav-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.site-footer__nav {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.site-footer__nav li + li {
  margin-top: 0.5rem;
}

.site-footer__nav a {
  color: rgba(247, 243, 235, 0.9);
}

.site-footer__nav a:hover {
  color: var(--accent-soft);
}

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(247, 243, 235, 0.15);
  color: var(--ink-muted);
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}
