:root {
  --red: #da251d;
  --red-dark: #a91b15;
  --gold: #ffcd00;
  --ink: #1c1c1e;
  --ink-soft: #55555a;
  --bg: #faf9f6;
  --card-bg: #ffffff;
  --border: #e8e5df;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--red); }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* Flag is drawn, not an emoji — see the note in index.html. */
.logo-flag {
  width: 27px;
  height: 18px;
  border-radius: 2px;
  flex: none;
  display: block;
}
.logo span { color: var(--red); }
.header-nav a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}
.header-nav a:hover { color: var(--red); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  padding: 60px 20px 44px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
}
.hero p {
  margin: 0 auto 28px;
  max-width: 560px;
  color: rgba(255,255,255,0.9);
  font-size: 1.05rem;
}
.search-bar {
  max-width: 480px;
  margin: 0 auto;
}
.search-bar input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  box-shadow: var(--shadow);
}
.search-bar input:focus {
  outline: 3px solid var(--gold);
}

/* Category nav */
.category-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* Results */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 8px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.link-btn {
  background: none;
  border: none;
  color: var(--red);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

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

.category-section {
  margin: 28px 0 40px;
}

/* Homepage spotlight for Prime listings */
.category-section.spotlight {
  background: linear-gradient(180deg, #fffaf0 0%, transparent 100%);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}
.category-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  margin: 0 0 14px;
}
.category-title .count {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  position: relative;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.card.featured {
  border: 1.5px solid var(--gold);
  background: linear-gradient(180deg, #fffdf3 0%, #ffffff 60%);
}
.badge-featured {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--gold);
  color: #4a3900;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 4px 0 6px;
  font-size: 1.05rem;
}
.card .desc {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0 0 12px;
}
.card .meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 3px 0;
  display: flex;
  gap: 6px;
}
.english-level {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef7ee;
  color: #2a7a2a;
  margin-bottom: 10px;
}
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.card-actions a {
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--ink);
}
.card-actions a.primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}

/* Advertise / pricing */
.advertise {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 56px 20px;
  text-align: center;
}
.advertise h2 { margin: 0 0 8px; font-size: 1.6rem; }
.advertise > .wrap > p {
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto 32px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  max-width: 820px;
  margin: 0 auto 32px;
  text-align: left;
}
.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  position: relative;
  background: var(--bg);
}
.price-card.featured { border-color: var(--gold); background: #fffdf3; }
.price-card.premium { border-color: var(--red); background: #fff5f4; }
.price-card .badge {
  position: absolute;
  top: -11px;
  right: 16px;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
}
.price-card.featured .badge { background: var(--gold); color: #4a3900; }
.price-card.premium .badge { background: var(--red); color: #fff; }
.price-card h3 { margin: 6px 0 4px; }
.price-card .price { font-weight: 700; color: var(--ink-soft); margin: 0 0 14px; font-size: 0.95rem; }
.price-card ul { margin: 0; padding-left: 18px; font-size: 0.88rem; color: var(--ink-soft); }
.price-card li { margin-bottom: 6px; }

.cta-btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.cta-btn:hover { background: var(--red-dark); }

.site-footer {
  padding: 28px 20px 40px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.fine-print { opacity: 0.7; font-size: 0.78rem; }

/* Get Listed form */
.form-section {
  padding: 8px 0 56px;
  text-align: center;
}
.form-section h2 { margin: 0 0 8px; font-size: 1.6rem; }
.form-intro {
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto 24px;
}
.form-fallback {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 18px auto 0;
}

/* The header is sticky, so jump links would land with the heading hidden
   underneath it. Offset anchor targets by roughly the header's height. */
section[id], nav[id] { scroll-margin-top: 76px; }
html { scroll-behavior: smooth; }

.form-direct {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 8px 16px;
  border-radius: 999px;
  margin-left: 6px;
}
.form-direct:hover { background: var(--red); color: #fff; }

/* Get Listed form — plain HTML, served from this site. */
.listing-form {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px;
}
.field { margin-bottom: 18px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .listing-form { padding: 20px 16px; }
}
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.field .req { color: var(--red); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--ink);
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(218, 37, 29, 0.12);
}
.field small {
  display: block;
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
/* Only flag invalid fields after a submit attempt, so the form doesn't
   scold someone who is still filling it in. */
.listing-form.show-errors :invalid { border-color: var(--red); }

/* Honeypot — hidden from people, still reachable by bots. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-submit {
  border: none;
  cursor: pointer;
  font-size: 1rem;
  width: 100%;
  margin-top: 4px;
}
.form-submit:disabled { opacity: 0.6; cursor: default; }

.form-status {
  margin: 14px 0 0;
  font-size: 0.9rem;
  min-height: 1.2em;
}
.form-status.is-ok { color: #2a7a2a; font-weight: 600; }
.form-status.is-error { color: var(--red); }
