@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/poppins-500.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/poppins-700.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/poppins-800.woff2") format("woff2");
}
:root {
  --bg: #f7f7f9;
  --surface: #fff;
  --ink: #14161a;
  --muted: #6a7080;
  --line: #e6e8ee;
  --red: #e11d2b;
  --red-ink: #fff;
  --err: #b42318;
  --shadow: 0 1px 2px rgba(20, 22, 26, 0.05), 0 8px 24px rgba(20, 22, 26, 0.06);
}
:root[data-theme="dark"] {
  --bg: #0f1114;
  --surface: #171a1f;
  --ink: #eef0f4;
  --muted: #9aa1ae;
  --line: #272b33;
  --red: #ff3b47;
  --red-ink: #fff;
  --err: #ff8a7a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114;
    --surface: #171a1f;
    --ink: #eef0f4;
    --muted: #9aa1ae;
    --line: #272b33;
    --red: #ff3b47;
    --red-ink: #fff;
    --err: #ff8a7a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Poppins",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1080px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-icon {
  display: block;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
}
.brand-sub {
  font-size: 0.72rem;
  color: var(--muted);
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-nav a {
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--muted);
}
.header-nav a:hover {
  color: var(--ink);
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--bg);
  color: var(--ink);
}

/* Hero */
.hero {
  text-align: center;
  padding-top: 72px;
}
h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 6vw, 3.1rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.accent {
  color: var(--red);
}
.hero-sub {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 1.02rem;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 700px;
  margin: 0 auto;
  padding: 8px 8px 8px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.search:focus-within {
  border-color: var(--red);
}
.search-icon {
  flex: none;
  color: var(--muted);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  padding: 10px 0;
}
.search input::placeholder {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s;
}
.btn:hover {
  filter: brightness(1.07);
}
.btn-primary {
  background: var(--red);
  color: var(--red-ink);
  padding: 12px 20px;
  white-space: nowrap;
}
.btn-sm {
  background: var(--red);
  color: var(--red-ink);
  padding: 8px 16px;
  font-size: 0.84rem;
}

.msg {
  min-height: 1.6em;
  margin: 14px 0 0;
  color: var(--err);
  font-size: 0.9rem;
}
.note {
  margin: 6px 0 0;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Results */
.hero.searched .msg {
  min-height: 0;
  margin: 0;
}
.results {
  padding-top: 28px;
  text-align: center;
}
.results h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
}
.results-sub {
  margin: 4px 0 28px;
  color: var(--muted);
  font-size: 0.92rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  text-align: left;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card.featured {
  grid-column: 1 / -1;
}
.thumb {
  background: #000;
  line-height: 0;
}
.thumb img {
  display: block;
  width: 100%;
  height: auto;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}
.res {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}
.res-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.res-dim {
  font-size: 0.8rem;
  color: var(--muted);
}
.card.featured .res {
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

/* How it works */
.how {
  padding-top: 72px;
  padding-bottom: 56px;
}
.how h2 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  font-weight: 700;
}
.how ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
  color: var(--muted);
}
.how li {
  margin-bottom: 4px;
}
.fine {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Footer links */
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}
.footer-links a:hover {
  color: var(--ink);
  text-decoration: none;
}
.footer-copy {
  margin: 0;
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .brand-sub {
    display: none;
  }
  .hero {
    padding-top: 48px;
  }
  .search {
    flex-wrap: wrap;
    padding: 10px;
    gap: 8px;
  }
  .search-icon {
    display: none;
  }
  .search input {
    flex: 1 1 100%;
    padding: 8px 6px;
  }
  .search .btn-primary {
    width: 100%;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}
