/* ------------------------------------------------------------------
   searcheureka-style advertorial layout
   Narrow single column, black header, oversized CTAs, legal footer.
------------------------------------------------------------------ */

:root {
  --accent: #1f5fe0;
  --accent-alt: #12924f;
  --ink: #16181c;
  --ink-soft: #4a4f57;
  --muted: #7c828c;
  --line: #e4e6ea;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --radius: 10px;
  --wrap: 760px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
}

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

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 18px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  padding: 10px 14px;
  z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #000;
}

.topbar-inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }

.brand-text {
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.loadbar {
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.loadbar span {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--accent);
  transform: translateX(-100%);
  animation: slide 1.4s ease-in-out infinite;
}

.loadbar.done span { animation: none; transform: translateX(0); width: 100%; opacity: 0; transition: opacity .4s; }

@keyframes slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

@media (prefers-reduced-motion: reduce) {
  .loadbar span { animation: none; transform: translateX(0); width: 100%; }
}

/* ---------- article ---------- */

.article { padding-bottom: 40px; }

.headline {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 28px 0 20px;
}

.lead {
  text-align: center;
  color: var(--ink-soft);
  font-size: 18px;
  margin: 22px 0 18px;
}

.prose { margin: 30px 0; }

.prose h2 {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  margin: 34px 0 12px;
}

.prose p { margin: 0 0 16px; }

.prose ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.prose li { margin-bottom: 6px; }

.prose strong { font-weight: 700; }

/* ---------- ad slot ---------- */

.adslot {
  margin: 22px 0;
  min-height: 260px;
  border: 1px dashed #d9dce1;
  border-radius: var(--radius);
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}

.adslot-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.adslot-code { width: 100%; }

/* ---------- buttons ---------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 8px;
}

.btn {
  flex: 1 1 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 54px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  transition: filter .15s ease;
}

.btn:hover { filter: brightness(1.08); }
.btn:active { filter: brightness(0.95); }
.btn:focus-visible { outline: 3px solid #111; outline-offset: 3px; }

.btn-alt { background: var(--accent-alt); }

.redirect-note {
  margin: 10px 0 26px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- offer card ---------- */

.offer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 26px 0 0;
  background: #fff;
}

.offer-media { display:block; background: var(--bg-soft); }

.offer-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.offer-body { padding: 18px; text-align: center; }

.offer-title {
  display: block;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 6px;
}

.offer-title:hover { text-decoration: underline; }

.offer-desc {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 15px;
}

.offer .btn { width: 100%; flex: none; }

/* ---------- tags ---------- */

.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 34px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.tags-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.tag {
  font-size: 13px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--ink-soft);
}

/* ---------- listing ---------- */

.listing { padding-bottom: 40px; }
.listing-intro { color: var(--ink-soft); margin-top: -6px; }

.cards { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 18px; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-media { display:block; background: var(--bg-soft); }

.card-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.card-body { padding: 16px 18px 20px; }

.card-cat {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.card-title {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
}

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

.card-desc { margin: 8px 0 0; color: var(--ink-soft); font-size: 15px; }

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

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  margin-top: 40px;
  padding: 34px 0 46px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.legal { margin-bottom: 24px; }

.legal h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 8px;
}

.legal p { margin: 0; }

.footer-brand {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 12px 0 20px;
}

.footer-nav a { color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }

.company { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.based { margin: 0; font-size: 12px; color: var(--muted); }
.heart { margin: 14px 0 0; font-size: 16px; color: var(--muted); }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  body { font-size: 16px; }
  .headline { font-size: 27px; margin-top: 22px; }
  .prose h2 { font-size: 20px; }
  .btn { flex: 1 1 100%; }
  .adslot { min-height: 200px; }
}

/* ------------------------------------------------------------------
   Admin
------------------------------------------------------------------ */

.admin { max-width: 980px; margin: 0 auto; padding: 24px 18px 60px; }

.admin-bar {
  background: #000;
  color: #fff;
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.admin-bar a { color: #cfd4dc; text-decoration: none; font-size: 14px; }
.admin-bar a:hover, .admin-bar a.on { color: #fff; }
.admin-bar .spacer { margin-left: auto; }
.admin-bar strong { font-size: 15px; }

.admin h1 { font-size: 24px; margin: 22px 0 16px; }
.admin h2 { font-size: 18px; margin: 28px 0 10px; }

.admin table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin th, .admin td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field input[type=text], .field input[type=password], .field select, .field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #ccd0d6;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.field .hint { margin-top: 4px; }
.admin > p.hint { margin: 6px 0 0; }

.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 220px; }

.btn-sm {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid #ccd0d6; }
.btn-danger { background: #c1372c; }

.block-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #fff;
}
.block-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.block-type {
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px; color: var(--ink-soft);
}
.block-head .spacer { margin-left: auto; }

.notice {
  background: #eef5ff;
  border: 1px solid #cddffb;
  color: #14396f;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}
.notice.error { background: #fdeeee; border-color: #f4c9c6; color: #7d211a; }

.login-box { max-width: 360px; margin: 70px auto; padding: 0 18px; }

[hidden] { display: none !important; }

.adslot-filled { min-height: 0; border-style: solid; border-color: transparent; background: transparent; padding: 0; }
.adslot-filled .adslot-label { margin-bottom: 6px; }

/* status pills and checkbox rows in the admin */
.badge-yes { color: #12924f; font-weight: 600; font-size: 13px; white-space: nowrap; }

.status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.status-ready   { background: #e8f4ec; border-color: #b9dfc7; color: #10633a; }
.status-running { background: #eef2fb; border-color: #ccd8f3; color: #24457f; }
.status-done    { background: #eef5ff; border-color: #cddffb; color: #14396f; }
.status-failed  { background: #fdeeee; border-color: #f4c9c6; color: #7d211a; }

.admin td.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }

.field label.check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-weight: 600;
  cursor: pointer;
}
.field label.check input { margin-top: 3px; flex: 0 0 auto; }
