:root {
  --bg: #f3ede0;
  --surface: rgba(255, 250, 242, 0.88);
  --surface-strong: #fffaf2;
  --ink: #14261d;
  --muted: #5b665f;
  --brand: #0f5d46;
  --brand-deep: #093b2d;
  --accent: #d4572a;
  --accent-soft: #f2c39d;
  --line: rgba(20, 38, 29, 0.1);
  --shadow: 0 24px 60px rgba(20, 38, 29, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(212, 87, 42, 0.18), transparent 28%),
    radial-gradient(circle at right 20%, rgba(15, 93, 70, 0.24), transparent 22%),
    linear-gradient(180deg, #f8f3e8 0%, #efe5d5 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(15, 93, 70, 0.95), rgba(9, 59, 45, 0.92)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  color: #fff9ef;
  box-shadow: var(--shadow);
}

.hero-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(212, 87, 42, 0.28);
  filter: blur(4px);
}

.eyebrow,
.viewer-kicker,
.card-source {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
}

.hero h1,
.viewer-card h2,
.toolbar h2,
.feed-card h3,
.empty-state h3 {
  font-family: Georgia, "Times New Roman", serif;
}

.hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 0.95;
}

.hero-copy {
  max-width: 56ch;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(255, 249, 239, 0.86);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  color: rgba(255, 249, 239, 0.78);
  font-size: 0.92rem;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 249, 239, 0.18);
  border-radius: 999px;
  background: rgba(255, 249, 239, 0.08);
  backdrop-filter: blur(10px);
}

.language-pill {
  min-width: 54px;
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 249, 239, 0.76);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.language-pill:hover,
.language-pill:focus-visible {
  color: #fffaf2;
  transform: translateY(-1px);
  outline: none;
}

.language-pill.active {
  background: #fffaf2;
  color: var(--brand-deep);
}

.meta-separator {
  opacity: 0.7;
}

.layout {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.site-footer {
  margin-top: 20px;
}

.footer-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(20, 38, 29, 0.9);
  color: #fff9ef;
  box-shadow: var(--shadow);
}

.footer-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  color: rgba(255, 249, 239, 0.72);
}

.footer-card h2 {
  margin: 10px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.footer-notes {
  display: grid;
  gap: 10px;
}

.footer-notes p {
  margin: 0;
  color: rgba(255, 249, 239, 0.82);
  line-height: 1.6;
}

.feed-panel,
.viewer-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.feed-panel {
  padding: 20px;
}

.toolbar {
  display: grid;
  gap: 16px;
}

.toolbar h2,
.viewer-card h2 {
  margin: 0;
  font-size: 2rem;
}

.toolbar-copy p,
.viewer-card p,
.card-meta,
.empty-state p {
  color: var(--muted);
  line-height: 1.6;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab {
  padding: 10px 14px;
  border: 1px solid rgba(15, 93, 70, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--brand-deep);
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.tab:hover,
.tab:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(212, 87, 42, 0.45);
  outline: none;
}

.tab.active {
  background: var(--brand);
  color: #fffaf2;
  border-color: var(--brand);
}

.error-banner,
.empty-state {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(212, 87, 42, 0.25);
  background: rgba(212, 87, 42, 0.08);
}

.feed-grid {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.feed-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(20, 38, 29, 0.08);
  background: rgba(255, 255, 255, 0.68);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.feed-card.selected,
.feed-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 93, 70, 0.24);
  box-shadow: 0 20px 35px rgba(20, 38, 29, 0.08);
}

.card-thumb-wrap {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 93, 70, 0.14), rgba(212, 87, 42, 0.18));
}

.card-thumb {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
}

.card-thumb.placeholder {
  min-height: 160px;
}

.type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 38, 29, 0.8);
  color: #fffaf2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
}

.card-body {
  display: grid;
  gap: 10px;
}

.card-body h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.card-meta {
  margin: 0;
  font-size: 0.92rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-action,
.card-link,
.viewer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 93, 70, 0.18);
  text-decoration: none;
}

.card-action,
.viewer-link {
  background: var(--accent);
  color: #fff7ef;
  border-color: var(--accent);
  cursor: pointer;
}

.card-link {
  background: transparent;
}

.viewer-panel {
  position: relative;
}

.viewer-card {
  position: sticky;
  top: 18px;
  padding: 20px;
}

.viewer-card.empty {
  background: rgba(255, 248, 238, 0.84);
}

.viewer-meta {
  margin: 10px 0 0;
}

.video-frame-wrap {
  position: relative;
  margin-top: 18px;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: 20px;
  background: #0d1713;
}

.video-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.viewer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.viewer-tags span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(15, 93, 70, 0.1);
  color: var(--brand-deep);
  font-size: 0.85rem;
}

.loading-card .card-body {
  padding-top: 10px;
}

.skeleton {
  background: linear-gradient(90deg, rgba(20, 38, 29, 0.06), rgba(20, 38, 29, 0.12), rgba(20, 38, 29, 0.06));
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.skeleton-line {
  height: 14px;
  border-radius: 999px;
}

.skeleton-line.short {
  width: 38%;
}

.skeleton-line.medium {
  width: 72%;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

@media (min-width: 860px) {
  .layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
    align-items: start;
  }

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

@media (max-width: 859px) {
  .hero-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding: 24px;
  }

  .toolbar h2,
  .viewer-card h2 {
    font-size: 1.6rem;
  }
}