/* ===================================================================
   runjogorwalk.com — design system
   Editorial-athletic. Bold display, warm paper, vivid coral accent.
   =================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink:        #0F0E0E;
  --ink-soft:   #2A2726;
  --ink-mute:   #5C5753;
  --paper:      #F7F3EC;
  --paper-2:    #EFE9DE;
  --line:       #DED5C5;
  --coral:      #E8452E;
  --coral-deep: #C2321F;
  --moss:       #1B4332;
  --moss-soft:  #2D6A4F;
  --amber:      #F4B860;
  --ink-rgb:    15, 14, 14;

  --radius-sm:  6px;
  --radius-md:  14px;
  --radius-lg:  22px;

  --shadow-sm:  0 1px 2px rgba(var(--ink-rgb), .06), 0 2px 6px rgba(var(--ink-rgb), .04);
  --shadow-md:  0 4px 14px rgba(var(--ink-rgb), .08), 0 12px 30px rgba(var(--ink-rgb), .06);
  --shadow-lg:  0 10px 40px rgba(var(--ink-rgb), .12);

  --f-display:  "Archivo Black", "Archivo", system-ui, sans-serif;
  --f-accent:   "Instrument Serif", "Times New Roman", serif;
  --f-body:     "Manrope", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

/* ---------- Layout helpers ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.row { display: flex; gap: 16px; align-items: center; }

/* ---------- Noise + paper texture ---------- */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1200px 600px at 90% -10%, rgba(232,69,46,.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(27,67,50,.05), transparent 60%);
  z-index: 0;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 243, 236, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-family: var(--f-display);
  letter-spacing: -.02em;
  font-size: clamp(20px, 2.4vw, 26px);
  text-transform: lowercase;
}
.brand .slash { color: var(--coral); padding: 0 2px; }
.brand .dot   { color: var(--coral); }

.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: var(--paper-2); }
.nav a.active { background: var(--ink); color: var(--paper); }
.nav a.cta {
  background: var(--coral); color: #fff;
  box-shadow: 0 2px 0 var(--coral-deep);
}
.nav a.cta:hover { background: var(--coral-deep); }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--paper); padding: 16px;
    border-bottom: 1px solid var(--line); gap: 4px; align-items: stretch; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; text-align: left; }
  .nav-toggle {
    display: inline-flex; width: 40px; height: 40px; align-items: center;
    justify-content: center; border-radius: 10px; background: var(--paper-2);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 56px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: end;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 {
  font-family: var(--f-display);
  font-size: clamp(44px, 9vw, 120px);
  line-height: .92; letter-spacing: -.03em;
  text-transform: lowercase;
}
.hero h1 .ital {
  font-family: var(--f-accent);
  font-style: italic;
  font-weight: 400;
  color: var(--coral);
  letter-spacing: -.01em;
}
.hero .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--ink-mute);
  margin-bottom: 22px;
}
.hero .kicker::before {
  content: ""; width: 28px; height: 2px; background: var(--coral);
}
.hero p.lede {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-top: 22px;
}

.hero-side {
  display: flex; flex-direction: column; gap: 16px;
}
.hero-stat {
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  position: relative; overflow: hidden;
}
.hero-stat .label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; opacity: .7; }
.hero-stat .num {
  font-family: var(--f-display);
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1; letter-spacing: -.03em; margin-top: 8px;
}
.hero-stat .num .ital { font-family: var(--f-accent); font-style: italic; font-weight: 400; color: var(--coral); }
.hero-stat .sub { margin-top: 6px; opacity: .7; font-size: 14px; }

/* ---------- Filter bar ---------- */
.filterbar {
  position: sticky; top: 69px; z-index: 40;
  background: rgba(247, 243, 236, .94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.filterbar-inner {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px;
  padding: 14px 0; align-items: center;
}
@media (max-width: 760px) {
  .filterbar-inner { grid-template-columns: 1fr; }
}
.search-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper-2); border-radius: 999px;
  padding: 8px 14px; min-width: 0;
}
.search-wrap input {
  background: transparent; border: none; outline: none; width: 100%;
  font-size: 14px;
}
.chip-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  overflow-x: auto; scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  padding: 8px 14px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: all .15s ease;
}
.chip:hover { background: var(--paper-2); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .count {
  display: inline-block; margin-left: 6px;
  font-size: 11px; opacity: .6; font-weight: 500;
}
.select-wrap {
  position: relative;
}
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  background: var(--paper-2); border: none; outline: none;
  padding: 10px 38px 10px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  min-width: 150px;
}
.select-wrap::after {
  content: "▾"; position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%); pointer-events: none;
  font-size: 12px; color: var(--ink-mute);
}

/* ---------- Main grid (events + ads) ---------- */
.main {
  padding: clamp(28px, 5vw, 56px) 0 clamp(60px, 8vw, 120px);
  position: relative; z-index: 1;
}
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
}
@media (max-width: 1024px) {
  .main-grid { grid-template-columns: 1fr; }
}

.events-col {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  min-width: 0;
}
@media (max-width: 760px) {
  .events-col { grid-template-columns: 1fr; }
}

/* ---------- Event card ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative; overflow: hidden;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--ink);
}
.card-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.card-type {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: var(--coral);
}
.card-type.parkrun     { color: #2D6A4F; }
.card-type.road-race   { color: var(--coral); }
.card-type.cross-country { color: #8B5E3C; }
.card-type.camino      { color: #B58900; }
.card-type.triathlon   { color: #1E6091; }
.card-type.trail       { color: #6A4C93; }
.card-type.other       { color: var(--ink-mute); }

.card-date {
  font-family: var(--f-display);
  font-size: 14px; letter-spacing: -.01em;
  text-align: right; line-height: 1.1;
}
.card-date .day { font-size: 22px; display: block; }
.card-date .mo  { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); font-family: var(--f-body); font-weight: 700; margin-top: 2px;}
.card-date.weekly .day { font-size: 13px; color: var(--moss); }

.card-title {
  font-family: var(--f-display);
  font-size: 22px; line-height: 1.08; letter-spacing: -.015em;
  text-transform: lowercase;
  margin-top: -2px;
}
.card-loc {
  font-size: 13px; color: var(--ink-mute);
  display: flex; align-items: center; gap: 6px;
}
.card-loc svg { width: 14px; height: 14px; flex: 0 0 14px; }
.card-foot {
  margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; align-items: center; font-size: 12px;
}
.card-foot .county {
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  font-size: 11px;
}
.card-foot .distance {
  background: var(--paper-2); padding: 4px 10px; border-radius: 999px;
  font-weight: 600;
}

/* ---------- Ad slot ---------- */
.ad {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1;
  text-align: center; gap: 10px;
  transition: border-color .18s ease, transform .18s ease;
  position: relative; overflow: hidden;
}
.ad:hover { border-color: var(--ink); transform: translateY(-2px); }
.ad-label {
  position: absolute; top: 10px; right: 12px;
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-mute);
}
.ad img { max-width: 100%; max-height: 60%; object-fit: contain; }
.ad-title {
  font-family: var(--f-display); font-size: 18px;
  line-height: 1.1; text-transform: lowercase;
}
.ad-sub { font-size: 13px; color: var(--ink-mute); }
.ad.placeholder {
  background: repeating-linear-gradient(
    45deg, var(--paper-2), var(--paper-2) 10px,
    var(--paper) 10px, var(--paper) 20px
  );
  border-style: dashed;
}
.ad.placeholder .ad-title { color: var(--ink-mute); }

/* Sidebar ad column */
.side-col {
  display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 140px; align-self: start;
}
@media (max-width: 1024px) {
  .side-col { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 8px; }
  .side-col .ad { flex: 0 0 260px; }
}

/* ---------- Event modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 14, 14, .65);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--paper);
  border-radius: var(--radius-lg);
  max-width: 640px; width: 100%;
  max-height: 90vh; overflow: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn .3s cubic-bezier(.2, .9, .3, 1);
}
@keyframes modalIn {
  from { transform: translateY(20px) scale(.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--paper-2); display: inline-flex;
  align-items: center; justify-content: center; font-size: 18px;
  z-index: 2;
}
.modal-close:hover { background: var(--ink); color: var(--paper); }

.modal-header {
  padding: 32px 32px 20px;
  border-bottom: 1px solid var(--line);
  display: flex; gap: 18px; align-items: flex-start;
}
.modal-logo {
  width: 72px; height: 72px; flex: 0 0 72px;
  border-radius: 14px; background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-family: var(--f-display); font-size: 28px; color: var(--coral);
}
.modal-logo img { width: 100%; height: 100%; object-fit: cover; }
.modal-header-text { flex: 1; min-width: 0; }
.modal-type {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 700; color: var(--coral);
}
.modal-title {
  font-family: var(--f-display);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.05; letter-spacing: -.02em; text-transform: lowercase;
  margin-top: 6px;
}
.modal-body {
  padding: 24px 32px;
}
.modal-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.meta-item .mlabel {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 700;
}
.meta-item .mval {
  font-family: var(--f-display); font-size: 16px; text-transform: lowercase;
  margin-top: 4px; letter-spacing: -.01em;
}
.modal-desc {
  font-size: 15px; color: var(--ink-soft); line-height: 1.6;
  padding: 16px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
}
.modal-actions {
  padding: 22px 32px 32px;
  display: flex; flex-wrap: wrap; gap: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px;
  font-weight: 700; font-size: 14px;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--coral); color: #fff;
  box-shadow: 0 2px 0 var(--coral-deep);
}
.btn-primary:hover { background: var(--coral-deep); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ink-soft); }
.btn-ghost {
  background: transparent; border-color: var(--line); color: var(--ink);
}
.btn-ghost:hover { background: var(--paper-2); border-color: var(--ink); }
.btn-moss { background: var(--moss); color: #fff; }
.btn-moss:hover { background: var(--moss-soft); }

.btn svg { width: 16px; height: 16px; }

/* ---------- Forms ---------- */
.page-head {
  padding: clamp(40px, 7vw, 80px) 0 clamp(20px, 3vw, 30px);
}
.page-head .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--ink-mute);
  margin-bottom: 18px;
}
.page-head .kicker::before {
  content: ""; width: 28px; height: 2px; background: var(--coral);
}
.page-head h1 {
  font-family: var(--f-display);
  font-size: clamp(36px, 7vw, 84px);
  line-height: .95; letter-spacing: -.02em; text-transform: lowercase;
}
.page-head h1 .ital {
  font-family: var(--f-accent); font-style: italic; font-weight: 400;
  color: var(--coral);
}
.page-head p.lede {
  font-size: clamp(15px, 1.3vw, 18px); color: var(--ink-soft);
  max-width: 60ch; margin-top: 18px;
}

.page-head.page-head--center {
  text-align: center;
}
.page-head.page-head--center .kicker { justify-content: center; }
.page-head.page-head--center p.lede { margin-left: auto; margin-right: auto; }

.form-wrap {
  padding: clamp(20px, 4vw, 48px) 0 clamp(60px, 8vw, 120px);
  position: relative; z-index: 1;
}
.form-card {
  max-width: 720px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px);
}
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft);
}
.field label .req { color: var(--coral); margin-left: 2px; }
.field .hint { font-size: 12px; color: var(--ink-mute); }
.field input, .field select, .field textarea {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px;
  font-size: 15px; outline: none;
  transition: border-color .12s ease, background .12s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ink); background: #fff;
}
.field textarea { resize: vertical; min-height: 110px; font-family: inherit; }
.honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.captcha-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--paper); border: 1px dashed var(--line);
  border-radius: 10px; padding: 14px;
}
.captcha-q {
  font-family: var(--f-display); font-size: 18px; flex: 0 0 auto;
}
.captcha-row input { max-width: 100px; }

.form-actions {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 24px; padding-top: 24px; border-top: 1px dashed var(--line);
  flex-wrap: wrap;
}

.alert {
  padding: 14px 16px; border-radius: 10px; margin-bottom: 16px;
  font-size: 14px; font-weight: 600;
}
.alert.success { background: #E6F4EC; color: #1B4332; border: 1px solid #BEDFC8; }
.alert.error   { background: #FCEAE6; color: var(--coral-deep); border: 1px solid #F3BEB4; }
.alert.info    { background: #FFF6E5; color: #8A5A00; border: 1px solid #F5D89A; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 44px;
  background: var(--paper);
  position: relative; z-index: 1;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; margin-bottom: 10px; color: var(--ink-mute);
}
.footer a { display: block; padding: 4px 0; font-size: 14px; }
.footer a:hover { color: var(--coral); }
.footer .brand { font-size: 32px; }
.footer-bottom {
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-mute);
  flex-wrap: wrap; gap: 10px;
}

/* ---------- Admin ---------- */
.admin-shell {
  display: grid; grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
@media (max-width: 900px) { .admin-shell { grid-template-columns: 1fr; } }
.admin-side {
  background: var(--ink); color: var(--paper);
  padding: 24px;
  position: sticky; top: 0; height: 100vh;
}
@media (max-width: 900px) { .admin-side { position: static; height: auto; } }
.admin-side .brand { color: var(--paper); font-size: 22px; margin-bottom: 32px; display: block; }
.admin-nav button {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  width: 100%; text-align: left; font-weight: 600; font-size: 14px;
  color: rgba(247, 243, 236, .75);
}
.admin-nav button:hover { background: rgba(255, 255, 255, .06); color: var(--paper); }
.admin-nav button.active { background: var(--coral); color: #fff; }
.admin-main { padding: clamp(24px, 4vw, 40px); overflow: auto; }
.admin-main h2 {
  font-family: var(--f-display); font-size: 36px;
  text-transform: lowercase; letter-spacing: -.02em; margin-bottom: 24px;
}
.admin-table {
  width: 100%; border-collapse: collapse;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-md); overflow: hidden;
}
.admin-table th, .admin-table td {
  padding: 12px 16px; text-align: left; font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.admin-table th {
  background: var(--paper-2);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table td .action-btns { display: flex; gap: 6px; }
.admin-table .iconbtn {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--paper-2); display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.admin-table .iconbtn:hover { background: var(--ink); color: var(--paper); }
.admin-table .iconbtn.danger:hover { background: var(--coral); color: #fff; }

.admin-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.stat-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 20px;
}
.stat-card .slabel {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 700;
}
.stat-card .sval {
  font-family: var(--f-display); font-size: 36px;
  letter-spacing: -.02em; margin-top: 6px; line-height: 1;
}

.login-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}
.login-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 40px;
  max-width: 380px; width: 100%;
  box-shadow: var(--shadow-md);
}
.login-card .brand { font-size: 26px; margin-bottom: 24px; display: block; }
.login-card h1 {
  font-family: var(--f-display); font-size: 28px;
  text-transform: lowercase; letter-spacing: -.01em; margin-bottom: 8px;
}
.login-card p { font-size: 14px; color: var(--ink-mute); margin-bottom: 24px; }

/* Modal for admin edit */
.edit-modal {
  max-width: 720px;
}
.edit-modal .modal-body { padding: 32px; }

/* ---------- Empty state ---------- */
.empty {
  grid-column: 1 / -1;
  padding: 60px 20px; text-align: center;
  background: var(--paper-2); border-radius: var(--radius-lg);
  border: 1px dashed var(--line);
}
.empty h3 {
  font-family: var(--f-display); font-size: 24px;
  text-transform: lowercase; letter-spacing: -.01em; margin-bottom: 8px;
}
.empty p { color: var(--ink-mute); font-size: 14px; }

/* ---------- Utilities ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: var(--paper-2);
}
.badge.pending { background: #FFF6E5; color: #8A5A00; }
.badge.live    { background: #E6F4EC; color: var(--moss); }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(var(--ink-rgb), .2);
  border-top-color: var(--ink);
  animation: spin .8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ---------- Error pages ---------- */
.error-page {
  min-height: calc(100vh - 200px);
  display: grid; place-items: center;
  padding: clamp(40px, 8vw, 120px) 0;
  position: relative;
  overflow: hidden;
}
.error-page .container { position: relative; z-index: 1; text-align: center; }

.error-code {
  font-family: var(--f-display);
  font-size: clamp(12px, 1.1vw, 14px);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 22px;
  display: inline-flex; align-items: center; gap: 12px;
}
.error-code::before, .error-code::after {
  content: ""; width: 36px; height: 2px; background: var(--coral); opacity: .6;
}

.error-mark {
  width: clamp(120px, 18vw, 220px);
  height: auto;
  margin: 0 auto 28px;
  display: block;
  opacity: .95;
  transform: rotate(-6deg);
}

.error-page h1 {
  font-family: var(--f-display);
  font-size: clamp(48px, 9vw, 120px);
  line-height: .92; letter-spacing: -.03em;
  text-transform: lowercase;
  margin-bottom: 20px;
}
.error-page h1 .ital {
  font-family: var(--f-accent); font-style: italic; font-weight: 400; color: var(--coral);
}

.error-page .lede {
  font-size: clamp(16px, 1.5vw, 20px);
  color: var(--ink-soft);
  max-width: 54ch; margin: 0 auto 14px;
}
.error-page .fine {
  font-size: 15px;
  color: var(--ink-mute);
  max-width: 54ch; margin: 0 auto 36px;
}

.error-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 48px;
}
.error-actions .btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-family: var(--f-body); font-weight: 700; font-size: 15px;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.error-actions .btn-primary {
  background: var(--coral); color: #fff; box-shadow: 0 2px 0 var(--coral-deep);
}
.error-actions .btn-primary:hover { background: var(--coral-deep); transform: translateY(-1px); }
.error-actions .btn-ghost {
  background: var(--paper-2); color: var(--ink); border: 1px solid var(--line);
}
.error-actions .btn-ghost:hover { background: var(--line); }
.error-actions .btn-dark {
  background: var(--ink); color: var(--paper);
}
.error-actions .btn-dark:hover { background: var(--ink-soft); }

.error-signoff {
  font-family: var(--f-accent); font-style: italic;
  color: var(--ink-mute);
  font-size: clamp(16px, 1.4vw, 18px);
  border-top: 1px solid var(--line);
  padding-top: 28px; margin-top: 8px;
  max-width: 40ch; margin-left: auto; margin-right: auto;
}

/* Decorative slashes in the background — big faded coral motion marks */
.error-deco {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .06;
  display: flex; align-items: center; justify-content: center;
}
.error-deco svg { width: min(110%, 1200px); height: auto; }

/* ---------- Region switcher bar ---------- */
.region-bar {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 500;
}
.region-bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; gap: 16px; flex-wrap: wrap;
}
.region-here { letter-spacing: .08em; color: #D7D1C8; }
.region-here strong { color: var(--coral); font-weight: 700; }
.region-switch {
  color: var(--paper); text-decoration: none;
  border-bottom: 1px dotted rgba(215, 209, 200, .4);
  padding-bottom: 1px;
  transition: border-color .15s ease;
}
.region-switch:hover { border-bottom-color: var(--coral); color: #fff; }
@media (max-width: 620px) {
  .region-bar-inner { font-size: 12px; }
  .region-here { flex-basis: 100%; text-align: center; }
  .region-switch { flex-basis: 100%; text-align: center; }
}

/* ---------- Subtle admin access ---------- */
.admin-dot {
  color: inherit;
  text-decoration: none;
  opacity: 0.6;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.admin-dot:hover {
  color: var(--coral);
  opacity: 1;
}

/* ---------- Guides page ---------- */
.guide {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px 40px;
  margin-bottom: 28px;
  box-shadow: 0 1px 3px rgba(15,14,14,.04);
}
.guide-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--coral);
  padding: 5px 12px;
  background: rgba(232,69,46,0.08);
  border-radius: 20px;
  margin-bottom: 16px;
}
.guide-title {
  font-family: var(--f-display);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  margin: 0 0 12px;
}
.guide-title .ital {
  font-family: var(--f-accent);
  font-style: italic;
  font-weight: 400;
  color: var(--coral);
}
.guide-sub {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 0 28px;
  line-height: 1.55;
}
.guide-h3 {
  font-family: var(--f-display);
  font-size: 20px;
  text-transform: lowercase;
  letter-spacing: -0.01em;
  margin: 28px 0 10px;
}
.guide-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.guide-steps li {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.guide-steps li:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.guide-steps .step-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: 50%;
  font-family: var(--f-display);
  font-size: 15px;
}
.guide-steps h3 {
  font-family: var(--f-body);
  font-size: 17px;
  font-weight: 700;
  margin: 6px 0 4px;
  letter-spacing: -0.005em;
}
.guide-steps p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}
.guide-steps a { color: var(--coral); text-decoration: none; border-bottom: 1px dotted; }
.guide-steps a:hover { border-bottom-style: solid; }

.guide-callout {
  background: var(--paper-2);
  border-left: 3px solid var(--coral);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 15px;
  color: var(--ink-soft);
  margin: 24px 0;
  line-height: 1.55;
}
.guide-callout a { color: var(--coral); font-weight: 600; text-decoration: none; border-bottom: 1px dotted; }
.guide-callout a:hover { border-bottom-style: solid; }

.guide-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.cta-hint {
  font-size: 13px;
  color: var(--ink-mute);
}

.ad-pricing {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  background: var(--paper-2);
  border-radius: 14px;
  padding: 24px 28px;
  margin: 20px 0 28px;
  align-items: center;
}
.ad-pricing-main {
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 24px;
}
.ad-price-tag {
  font-family: var(--f-display);
  font-size: 48px;
  line-height: 1;
  color: var(--coral);
  letter-spacing: -0.03em;
}
.ad-price-unit {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-mute);
  margin-top: 6px;
}
.ad-pricing-detail p {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}
.ad-pricing-detail ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.ad-pricing-detail li { margin-bottom: 3px; }

@media (max-width: 620px) {
  .ad-pricing { grid-template-columns: 1fr; }
  .ad-pricing-main { border-right: none; border-bottom: 1px solid var(--line); padding-right: 0; padding-bottom: 18px; }
  .guide { padding: 28px 22px; }
}

.guide-mini { text-align: center; }
.guide-mini .guide-title { margin-bottom: 8px; }
.social-row {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
  margin-top: 20px;
}
.social-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s ease;
}
.social-link:hover { background: var(--coral); color: #fff; }
.social-link-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.social-link-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }