:root {
  --bg: #f7f4ef;
  --paper: #fffdfa;
  --ink: #111111;
  --muted: #6e6a63;
  --line: #ded8cf;
  --accent: #d71920;
  --accent2: #0e5bd8;
  --gold: #c7902d;
  --soft: #ebe8e1;
  --shadow: 0 18px 50px rgba(0,0,0,.09);
}

.dark {
  --bg: #101010;
  --paper: #181818;
  --ink: #f8f3ec;
  --muted: #b8b0a5;
  --line: #333;
  --soft: #222;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.top-alert {
  background: #050505;
  color: white;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: .02em;
}
.top-alert button {
  background: white;
  color: #111;
  border: 0;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247,244,239,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.dark .site-header { background: rgba(16,16,16,.92); }
.brand-row {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
h1, h2, h3 { margin: 0; }
h1, .hero-card h2, footer h2 { font-family: 'Playfair Display', Georgia, serif; }
h1 { font-size: clamp(31px, 6vw, 64px); line-height: .9; letter-spacing: -.06em; font-style: italic; }
.eyebrow { text-transform: uppercase; font-size: 11px; letter-spacing: .12em; font-weight: 800; color: var(--muted); margin: 0 0 8px; }
.header-actions { display: flex; gap: 10px; align-items: center; }
.search-box { display: flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.search-box input { width: 220px; background: transparent; border: 0; padding: 10px 14px; color: var(--ink); outline: 0; }
.search-box button, .ghost { border: 0; background: var(--ink); color: var(--paper); padding: 9px 13px; }
.ghost { border-radius: 999px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--ink); }
.main-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.main-nav a { padding: 9px 14px; background: var(--soft); border-radius: 999px; font-size: 13px; font-weight: 800; }
.main-nav a:hover { background: var(--ink); color: var(--paper); }

main { max-width: 1180px; margin: 0 auto; padding: 22px 20px 50px; }
.ticker { border: 1px solid var(--line); background: var(--paper); border-radius: 18px; padding: 12px; display: flex; gap: 14px; overflow: hidden; margin-bottom: 20px; }
.ticker strong { background: var(--accent); color: white; padding: 6px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.ticker-track { display: flex; gap: 36px; white-space: nowrap; animation: marquee 24s linear infinite; color: var(--muted); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.hero-layout { display: grid; grid-template-columns: 1.8fr .9fr; gap: 22px; margin-bottom: 28px; }
.hero-card, .mini-card, .post-card, .author-card, .side-block, .split-feature, .calendar, footer {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.hero-card { padding: 22px; transition: transform .2s ease; }
.hero-card:hover, .post-card:hover, .mini-card:hover { transform: translateY(-4px); }
.hero-visual, .post-image, .modal-image {
  min-height: 270px;
  border-radius: 20px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.car-lines { background: radial-gradient(circle at 70% 20%, rgba(215,25,32,.25), transparent 27%), linear-gradient(135deg, #111 0 18%, transparent 18% 22%, #ddd 22% 24%, transparent 24%), linear-gradient(160deg, #f3f0ea, #d9d6ce); }
.hero-card h2 { font-size: clamp(34px, 5vw, 64px); line-height: .92; letter-spacing: -.04em; margin: 12px 0; }
.hero-card p, .mini-card p, .post-card p, .author-card p, .split-feature p { color: var(--muted); line-height: 1.65; }
.tag { display: inline-flex; width: fit-content; padding: 6px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.tag.red { background: var(--accent); } .tag.blue { background: var(--accent2); } .tag.gold { background: var(--gold); }
.article-meta { color: var(--muted); font-size: 12px; margin-top: 12px; }
.read-more, .split-feature button { border: 0; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 12px 18px; font-weight: 900; }
.right-column { display: grid; gap: 16px; }
.mini-card { padding: 18px; }
.mini-card h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 25px; line-height: 1.02; margin: 12px 0; }
.newsletter-card { background: #090909; color: white; }
.newsletter-card p { color: #ddd; }
.email-row { display: flex; gap: 8px; }
.email-row input { min-width: 0; flex: 1; padding: 12px; border-radius: 999px; border: 1px solid #333; }
.email-row button { width: 42px; border-radius: 999px; border: 0; font-weight: 900; }

.content-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.section-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin: 20px 0; }
.section-head h2 { font-family: 'Playfair Display'; font-size: 38px; letter-spacing: -.03em; }
.filter-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-buttons button { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 8px 12px; font-weight: 800; }
.filter-buttons .active { background: var(--ink); color: var(--paper); }
.article-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.post-card { padding: 16px; transition: .2s; }
.post-card h3 { font-family: 'Playfair Display'; font-size: 28px; line-height: 1.05; margin: 12px 0 8px; }
.post-image { min-height: 170px; }
.track { background: linear-gradient(135deg, #e8e5de, #cfc9bd), repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,.05) 10px, rgba(0,0,0,.05) 20px); }
.data { background: radial-gradient(circle at 20% 30%, rgba(14,91,216,.22), transparent 25%), linear-gradient(135deg, #f6f1e7, #d5dfec); }
.portrait { background: radial-gradient(circle at 50% 30%, #111 0 8%, transparent 8% 30%), linear-gradient(160deg, #eee, #c7c4bc); }
.paddock { background: radial-gradient(circle at 15% 70%, rgba(199,144,45,.35), transparent 25%), linear-gradient(135deg, #111, #555); }
.split-feature { margin: 22px 0; padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(135deg, var(--paper), var(--soft)); }
.split-feature h2 { font-family: 'Playfair Display'; font-size: 34px; line-height: 1; margin: 12px 0; }
.calendar { padding: 20px; }
.calendar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.calendar-grid div { background: var(--soft); border-radius: 18px; padding: 16px; display: grid; gap: 8px; }
.calendar-grid span { color: var(--muted); font-size: 13px; }
.sidebar { position: sticky; top: 170px; display: grid; gap: 16px; }
.author-card, .side-block { padding: 20px; }
.avatar { width: 72px; height: 72px; background: var(--accent); color: white; display: grid; place-items: center; font-weight: 900; border-radius: 50%; font-family: 'Playfair Display'; font-size: 38px; margin-bottom: 14px; }
.author-card h3, .side-block h3 { font-family: 'Playfair Display'; font-size: 27px; margin-bottom: 8px; }
.side-block a, .popular button { display: block; width: 100%; text-align: left; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font-weight: 700; }
footer { max-width: 1180px; margin: 30px auto 0; padding: 28px; display: flex; justify-content: space-between; align-items: center; }
footer h2 { font-style: italic; font-size: 36px; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.72); display: none; align-items: center; justify-content: center; z-index: 99; padding: 24px; }
.modal.show { display: flex; }
.modal-content { background: var(--paper); color: var(--ink); max-width: 780px; max-height: 86vh; overflow: auto; border-radius: 28px; padding: 28px; position: relative; box-shadow: var(--shadow); }
.close { position: sticky; top: 0; float: right; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); font-size: 24px; }
.modal-content h2 { font-family: 'Playfair Display'; font-size: clamp(34px, 6vw, 62px); line-height: .95; margin: 16px 0; }
.modal-content p { line-height: 1.8; color: var(--muted); }
.modal-image { min-height: 260px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(100px); background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 999px; transition: .25s; z-index: 100; }
.toast.show { transform: translateX(-50%) translateY(0); }
.hidden { display: none !important; }

@media (max-width: 900px) {
  .hero-layout, .content-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .calendar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .header-actions { display: none; }
  .menu-toggle { display: block; }
  .main-nav { display: none; padding-bottom: 18px; }
  .main-nav.open { display: grid; }
  .article-grid { grid-template-columns: 1fr; }
  .section-head, .split-feature, footer { align-items: flex-start; flex-direction: column; }
  .calendar-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 210px; }
}
