:root {
  --white: #ffffff;
  --gold: #cba106;
  --dark-blue: #00234b;
  --blue: #004ba0;
  --grey: #6e6964;
  --light-grey: #dcd7d2;
  --ground: #a06f49;
  --sand: #e6cdaf;
  --panel: #ffffff;
  --panel-soft: #f8f8f8;
  --line: #dcd7d2;
  --text: #00234b;
  --muted: #6e6964;
  --shadow: 0 12px 32px rgba(0, 35, 75, 0.08);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  background: var(--white);
  color: var(--text);
}
button, input, iframe { font: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code {
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.1rem 0.4rem;
}

.site-shell {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 48px;
}

.topbar {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 18px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  position: sticky;
  top: 10px;
  z-index: 20;
}

.brand-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.brand-spacer {
  min-height: 1px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: min(100%, 720px);
  max-width: 100%;
  height: auto;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  padding: 6px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang-btn,
.title-toggle,
.title-item {
  border: 0;
  cursor: pointer;
}

.lang-btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--dark-blue);
  font-weight: 700;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.lang-btn.is-active {
  background: var(--dark-blue);
  color: var(--white);
}

.controls-row {
  display: flex;
  justify-content: center;
}

.title-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  background: var(--dark-blue);
  color: var(--white);
  font-weight: 700;
  border: 1px solid var(--gold);
  box-shadow: 0 8px 18px rgba(0, 35, 75, 0.14);
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.title-toggle:hover,
.title-toggle:focus-visible,
.lang-btn:hover,
.lang-btn:focus-visible,
.title-item:hover,
.title-item:focus-visible {
  transform: translateY(-1px);
}

.title-toggle:hover,
.title-toggle:focus-visible {
  background: var(--blue);
}

.title-drawer,
.spotlight,
.card,
.empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.title-drawer {
  padding: 16px;
  margin-bottom: 16px;
}

.search-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--dark-blue);
}

.title-search {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 0 14px;
  margin-bottom: 14px;
  background: var(--white);
  color: var(--dark-blue);
}

.title-search:focus {
  outline: 2px solid rgba(0, 75, 160, 0.18);
  border-color: var(--blue);
}

.title-list {
  display: grid;
  gap: 10px;
}

.title-item {
  width: 100%;
  text-align: inherit;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 16px;
  color: var(--dark-blue);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.title-item:hover,
.title-item:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 6px 16px rgba(0, 35, 75, 0.08);
}

.spotlight {
  padding: 16px;
  margin-bottom: 16px;
  border-color: rgba(203, 161, 6, 0.45);
}

.spotlight .spotlight-tag {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(203, 161, 6, 0.12);
  color: var(--dark-blue);
  font-weight: 700;
  margin-bottom: 12px;
}

.cards-grid {
  display: grid;
  gap: 16px;
}

.card {
  padding: 16px;
  overflow: hidden;
}

.card-head {
  margin-bottom: 12px;
}

.card-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--dark-blue);
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #111827;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}

.video-wrap iframe,
.video-placeholder {
  width: 100%;
  height: 100%;
}

.video-placeholder {
  display: grid;
  place-items: center;
  color: var(--white);
  text-align: center;
  padding: 20px;
  line-height: 1.8;
  background: linear-gradient(135deg, var(--dark-blue), var(--grey));
}

.description {
  margin: 0;
  color: var(--grey);
  line-height: 1.9;
}

.card.focused {
  border-color: rgba(203, 161, 6, 0.95);
  box-shadow: 0 0 0 3px rgba(203, 161, 6, 0.12), var(--shadow);
}

.empty-state {
  padding: 28px 18px;
  text-align: center;
}

.hidden { display: none !important; }

@media (min-width: 768px) {
  .site-shell {
    width: min(1180px, calc(100% - 36px));
    padding-top: 24px;
  }

  .brand-logo {
    width: min(100%, 820px);
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar {
    padding: 16px 14px;
  }

  .brand-row {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .brand-spacer {
    display: none;
  }

  .lang-switch {
    justify-self: center;
  }

  .brand-logo {
    width: min(100%, 640px);
  }

  .title-toggle {
    width: 100%;
  }
}
