:root {
  --bg: #f4f1ea;
  --surface: #fffdf9;
  --surface-strong: #ffffff;
  --text: #1f2933;
  --muted: #5c6b75;
  --border: #d8e0e8;
  --accent: #0f766e;
  --accent-soft: #dbf4f0;
  --highlight: #ef4444;
  --highlight-soft: #fee2e2;
  --shadow: 0 18px 45px rgba(31, 41, 51, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 999px;
  --max-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  background:
    radial-gradient(circle at top, rgba(15, 118, 110, 0.1), transparent 30%),
    linear-gradient(180deg, #fcfaf6 0%, var(--bg) 100%);
  color: var(--text);
  padding-bottom: 6.5rem;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.28);
  outline-offset: 3px;
}

.site-shell {
  min-height: 100vh;
}

.noscript-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 1rem auto 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.noscript-shell h2 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
}

.noscript-shell p {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.noscript-links {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
}

.noscript-links a {
  color: var(--accent);
  text-decoration: underline;
}

.hero,
.main-content {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.category-nav {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(216, 224, 232, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 700;
}

.category-nav__link.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.popular-searches {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.popular-searches__title {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.popular-searches__links {
  display: grid;
  gap: 0.55rem;
}

.popular-searches__link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.popular-searches__link.is-active {
  background: var(--accent);
  color: #fff;
}

.internal-links {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.internal-links__title {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.internal-links__list {
  display: grid;
  gap: 0.55rem;
}

.internal-links__link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent);
  font-weight: 700;
}

.hero {
  padding: 1rem 0 0.85rem;
}

.hero__copy {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 1rem 0.95rem;
  backdrop-filter: blur(10px);
}

.eyebrow,
.filters__label,
.info-strip__label {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 8vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 14ch;
}

.hero__text {
  margin: 0.55rem 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 600;
}

.main-content {
  display: grid;
  gap: 0.85rem;
  padding-bottom: 1.5rem;
}

.controls,
.state-card,
.info-strip,
.ad-slot,
.results-header {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.controls {
  display: grid;
  gap: 1rem;
  padding: 0.9rem;
}

.search-field {
  display: grid;
  gap: 0.55rem;
}

.search-field__label {
  font-weight: 600;
}

.search-field input {
  width: 100%;
  min-height: 44px;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.filter-chip {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  padding: 0.7rem 1rem;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.filter-chip:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.results-header {
  padding: 0.85rem 1rem;
}

.results-header__summary {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.competition-section {
  display: grid;
  gap: 0.85rem;
}

.competition-grid {
  display: grid;
  gap: 1rem;
}

.competition-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid rgba(216, 224, 232, 0.85);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.competition-card:hover,
.competition-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(31, 41, 51, 0.12);
}

.competition-card__overlay-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}

.competition-card__media {
  position: relative;
  z-index: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dde7ed;
}

.competition-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.competition-card:hover .competition-card__media img,
.competition-card:focus-within .competition-card__media img {
  transform: scale(1.05);
}

.competition-card__badges {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  right: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--category {
  background: rgba(17, 24, 39, 0.82);
  color: #fff;
}

.badge--closing {
  margin-left: auto;
  background: linear-gradient(135deg, #dc2626, #f97316);
  color: #fff;
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.28);
}

.competition-card__body {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
}

.competition-card__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.competition-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.competition-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.competition-card__summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.competition-card__entry {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 800;
}

.competition-card__hint {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.competition-card__internal-link {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 44px;
  padding: 0.2rem 0;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: underline;
}

.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;
}

.state-card {
  padding: 0.95rem;
}

.state-card--hidden {
  display: none;
}

.state-card--error {
  border-color: rgba(239, 68, 68, 0.25);
}

.state-card__title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
}

.state-card__text {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.state-card__list {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: 0.45rem;
}

.ad-slot {
  display: grid;
  gap: 0.5rem;
  align-content: center;
  justify-items: center;
  min-height: 78px;
  padding: 0.85rem;
  border: 1px dashed rgba(15, 118, 110, 0.3);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 241, 234, 0.95));
}

.ad-slot__label {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-slot__copy {
  margin: 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
}

.ad-slot--compact {
  min-height: 72px;
}

.sponsored-card {
  display: grid;
  min-height: 100%;
  padding: 0.9rem;
  border: 1px dashed rgba(15, 118, 110, 0.34);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(219, 244, 240, 0.7), rgba(255, 255, 255, 0.95));
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sponsored-card:hover,
.sponsored-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(31, 41, 51, 0.12);
}

.sponsored-card__label {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sponsored-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.sponsored-card__text {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.sponsored-card__hint {
  margin-top: 1rem;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 700;
}

.sponsored-card__cta,
.ad-sticky__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
}

.sponsored-card__cta {
  margin-top: 1rem;
}

.info-strip {
  display: grid;
  gap: 1rem;
  padding: 0.9rem;
}

.info-strip__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.site-footer {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 0 0 1.25rem;
}

.site-footer__grid {
  display: grid;
  gap: 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.site-footer__title {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.ad-sticky {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 0.9rem 0.95rem;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 18px 42px rgba(31, 41, 51, 0.18);
  backdrop-filter: blur(12px);
}

.ad-sticky--hidden {
  display: none;
}

.ad-sticky__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(31, 41, 51, 0.08);
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
}

.ad-sticky__cta {
  margin-top: 0.25rem;
}

@media (min-width: 700px) {
  body {
    padding-bottom: 0;
  }

  .popular-searches__links,
  .internal-links__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .popular-searches__link,
  .internal-links__link {
    width: auto;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero__copy,
  .controls,
  .state-card,
  .results-header,
  .info-strip,
  .ad-slot {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
  }

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

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

  .site-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ad-sticky {
    display: none;
  }
}

@media (min-width: 1024px) {
  .controls {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: end;
  }

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