:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #0f172a;
  --muted: #5f6f86;
  --border: #d8e2ef;
  --primary: #0b7a66;
  --primary-hover: #096454;
  --accent: #1d4ed8;
  --accent-soft: #e9efff;
  --success-bg: #ecfdf5;
  --success-text: #11683a;
  --warn-bg: #fff8e6;
  --warn-text: #8a5a00;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 12% -5%, #d9f4ee 0%, transparent 30%),
    radial-gradient(circle at 92% 8%, #d8e6ff 0%, transparent 27%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(88px);
  z-index: 0;
  pointer-events: none;
}

.orb-1 {
  width: 340px;
  height: 340px;
  top: -120px;
  left: -70px;
  background: rgba(11, 122, 102, 0.14);
}

.orb-2 {
  width: 300px;
  height: 300px;
  right: -70px;
  top: 24px;
  background: rgba(29, 78, 216, 0.14);
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 18px 42px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.logo {
  font-size: 21px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  text-decoration: none;
}

.site-links {
  display: flex;
  gap: 14px;
}

.site-links a {
  text-decoration: none;
  color: #24324a;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
}

.site-links a:hover {
  background: #edf2ff;
}

.hero {
  margin-bottom: 16px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 16px;
}

.hero-left h1 {
  margin: 9px 0 10px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero-kicker {
  display: inline-flex;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #0a5d4f;
  background: #d9f6f1;
}

.hero-subtitle {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.45;
}

.hero-actions {
  margin: 16px 0 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 14px;
}

.hero-stats {
  display: grid;
  gap: 10px;
}

.stat-card {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 10px 12px;
}

.stat-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.notice {
  border-radius: 12px;
  padding: 11px 12px;
  font-weight: 700;
  margin-bottom: 12px;
  border: 1px solid transparent;
}

.notice.success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: #c8f0dc;
}

.notice.warn {
  background: var(--warn-bg);
  color: var(--warn-text);
  border-color: #ffe4a6;
}

.notice.error {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: #fecaca;
}

.max-channel-promo {
  margin: 14px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(140deg, #ffffff 0%, #f3f8ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
}

.max-channel-copy {
  max-width: 780px;
}

.max-channel-copy h2 {
  margin: 10px 0 8px;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.max-channel-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.max-channel-promo .btn {
  flex: 0 0 auto;
}

.category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #172338;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #dbe4ff;
  background: #eef2ff;
  font-size: 13px;
  font-weight: 600;
}

.category-pill small {
  font-size: 11px;
  color: #56627a;
}

.toolbar {
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 14px;
}

.toolbar-sticky {
  position: sticky;
  top: 10px;
  z-index: 10;
  backdrop-filter: blur(6px);
}

.toolbar form {
  margin: 0;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.toolbar-row:last-child {
  margin-bottom: 0;
}

.toolbar-row-main {
  flex-wrap: nowrap;
  align-items: flex-end;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.field input,
.field select {
  height: 42px;
  min-width: 165px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  color: var(--text);
  font-size: 14px;
}

.field-search {
  flex: 1 1 190px;
  min-width: 170px;
  max-width: 260px;
}

.field-search input {
  width: 100%;
}

.field-type select {
  min-width: 110px;
  width: 120px;
}

.field-category select {
  min-width: 150px;
  width: 170px;
}

.field-min-subs input {
  min-width: 130px;
  width: 140px;
}

.field-sort select {
  min-width: 190px;
  width: 210px;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.toolbar-actions .btn {
  white-space: nowrap;
}

.btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-muted {
  color: #1f2937;
  border-color: var(--border);
  background: #f8fafc;
}

.results-head {
  margin-top: 16px;
}

.results-head p {
  margin: 0;
  color: #42526b;
  font-weight: 700;
}

.results-head.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.results-head.split a {
  color: #0a5d4f;
  font-weight: 700;
  text-decoration: none;
}

.grid {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-wrap {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.avatar-wrap.large {
  width: 64px;
  height: 64px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-weight: 800;
  background: #e2e8f0;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dbf5ef;
  color: #0a5d4f;
  font-size: 11px;
  font-weight: 800;
}

.card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.card-title-link {
  color: var(--text);
  text-decoration: none;
}

.card-title-link:hover {
  text-decoration: underline;
}

.desc {
  margin: 0;
  font-size: 13px;
  color: #42526b;
  line-height: 1.4;
  min-height: 38px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #334155;
}

.meta-link {
  text-decoration: none;
  color: #0b7a66;
}

.links {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.link-btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
  border-radius: 9px;
  border: 1px solid var(--border);
  color: #0f172a;
  font-weight: 800;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
}

.link-btn.primary {
  color: #fff;
  border-color: transparent;
  background: var(--primary);
}

.empty {
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
}

.empty h3 {
  margin: 0 0 8px;
}

.empty p {
  margin: 0;
  color: var(--muted);
}

.pager {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pager-pages {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager-link {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pager-link:hover {
  background: #f8fafc;
}

.pager-link.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pager-gap {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  padding: 0 2px;
}

.collections-preview {
  margin-top: 14px;
}

.submit-box {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  background: linear-gradient(140deg, #ffffff 0%, #f3f8ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
}

.submit-box h2 {
  margin: 10px 0 8px;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.submit-form {
  display: grid;
  gap: 10px;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  margin-bottom: 14px;
  font-size: 14px;
}

.breadcrumbs a {
  color: #0b7a66;
  text-decoration: none;
}

.entry-hero {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  background: #fff;
}

.entry-head {
  display: flex;
  gap: 12px;
}

.entry-head h1 {
  margin: 8px 0 0;
  font-size: clamp(29px, 4vw, 46px);
  line-height: 1.03;
  letter-spacing: -0.03em;
}

.entry-description {
  margin: 12px 0;
  color: #334155;
  line-height: 1.48;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.entry-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.categories-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.collections-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
}

.collection-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: #0f172a;
  background: linear-gradient(155deg, #ffffff 0%, #f2f8ff 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.collection-card strong {
  font-size: 17px;
  line-height: 1.2;
}

.collection-card span {
  color: #5f6f86;
  font-size: 13px;
  line-height: 1.35;
  min-height: 34px;
}

.collection-card em {
  font-style: normal;
  margin-top: auto;
  color: #0b7a66;
  font-size: 12px;
  font-weight: 800;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: #0f172a;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.category-card span {
  color: #5f6f86;
  font-size: 13px;
}

.hero.compact {
  margin-bottom: 12px;
}

.site-footer {
  margin-top: 26px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 16px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.site-footer h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.site-footer a {
  color: #0b7a66;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .submit-box {
    grid-template-columns: 1fr;
  }
  .max-channel-promo {
    align-items: flex-start;
    flex-direction: column;
  }
  .toolbar-sticky {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .toolbar-row-main {
    flex-wrap: wrap;
  }
  .field-search {
    flex: 1 1 320px;
    max-width: none;
    min-width: 260px;
  }
  .field-type,
  .field-category,
  .field-min-subs,
  .field-sort {
    flex: 1 1 180px;
  }
  .field-type select,
  .field-category select,
  .field-min-subs input,
  .field-sort select {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .field-search {
    min-width: 100%;
  }
  .results-head.split {
    flex-direction: column;
    align-items: flex-start;
  }
  .entry-head {
    flex-direction: column;
  }
}
