:root {
  --lake: #0b1f3a;
  --lake-deep: #061525;
  --teal: #7a5a12;
  --teal-soft: #c9a227;
  --pine: #7c2d12;
  --sand: #f3eee4;
  --sand-dark: #e4d8c4;
  --cream: #f7f4ee;
  --ink: #16141c;
  --muted: #57534e;
  --line: #e4ddd2;
  --sponsored: #b45309;
  --ad-bg: #f3eee6;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(6, 21, 37, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: var(--lake); text-decoration: none; }
a:hover { color: #9a3412; }

.wrap { width: min(1220px, calc(100% - 32px)); margin: 0 auto; }

/* Top bar */
.topbar {
  background: var(--lake-deep);
  color: #fde68a;
  font-size: 13px;
  padding: 8px 0;
}
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.topbar a { color: #fef3c7; }

/* Header */
header.site {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; flex: 0 0 auto; }
.brand-logo { height: 72px; width: auto; display: block; }
.mark {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(160deg, #1e3a5f, #0b1f3a 55%, #7a5a12);
  display: grid; place-items: center; color: #fff; font-weight: 800;
}
.brand h1 { font-size: 22px; letter-spacing: -0.03em; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }

nav.main { display: flex; gap: 6px; flex-wrap: wrap; }
nav.main a {
  padding: 8px 12px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 14px;
}
nav.main a.active, nav.main a:hover { background: var(--sand); color: var(--lake); }

.weather-chip {
  background: var(--sand); border-radius: 999px; padding: 8px 12px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}

/* Hero */
.hero {
  background:
    linear-gradient(180deg, rgba(6,21,37,.62), rgba(11,31,58,.42)),
    url("../img/stories/cmhr-skyline.jpg") center 40%/cover no-repeat;
  color: #fff;
  padding: 64px 0 52px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 48px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48'%3E%3Cpath fill='%23f7f4ee' d='M0 24c120 16 240-16 360 0s240 16 360 0 240-16 360 0 240 16 360 0v24H0z'/%3E%3C/svg%3E") bottom/100% no-repeat;
}
.hero h2 { font-family: "Source Serif 4", Georgia, serif; font-size: clamp(32px, 4.4vw, 52px); max-width: 18ch; line-height: 1.12; }
.hero p { max-width: 56ch; margin: 12px 0 20px; color: #fde68a; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--lake-deep); font-weight: 700;
  padding: 10px 16px; border-radius: 999px; border: 0; cursor: pointer;
}
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn.teal { background: var(--teal); color: #fff; }
.btn.outline { background: #fff; border: 1px solid var(--line); color: var(--ink); }

/* Layout */
.grid-home { display: grid; grid-template-columns: 1.7fr .9fr; gap: 28px; padding: 12px 0 48px; }
@media (max-width: 900px) {
  .grid-home { grid-template-columns: 1fr; }
  .brand-logo { height: 56px; }
}

.section-head {
  display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 16px;
}
.section-head h3 {
  font-family: "Source Serif 4", Georgia, serif; font-size: 26px;
}
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; color: var(--teal); }

/* Cards */
.feature {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.feature .photo {
  height: 300px;
  background: #0b1f3a url("../img/stories/cmhr-skyline.jpg") center/cover no-repeat;
  display: grid; place-items: end start; padding: 16px; color: #fff;
}
.feature .body { padding: 18px 20px 22px; }
.feature h4 { font-family: "Source Serif 4", Georgia, serif; font-size: 26px; margin: 6px 0 8px; }
.meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.source { font-weight: 700; color: var(--lake); }

.story-list { display: grid; gap: 14px; }
.story {
  background: #fff; border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px;
  border: 1px solid var(--line);
}
.story h5 { font-size: 16px; }
.story.sponsored { border-color: #fcd34d; background: #fffbeb; }
.badge {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 7px; border-radius: 999px;
}
.badge.spon { background: #fde68a; color: #92400e; }
.badge.ad { background: #e7e5e4; color: #44403c; }
.badge.agg { background: #fef3c7; color: #7a5a12; }

/* Ad slots */
.ad-slot {
  background: repeating-linear-gradient(45deg, #f3eee6, #f3eee6 10px, #efe8dc 10px, #efe8dc 20px);
  border: 1px dashed #c4b5a0; border-radius: 12px; padding: 18px; text-align: center;
  color: #78716c; min-height: 90px; display: grid; place-items: center; margin: 16px 0;
}
.ad-slot strong { display: block; color: #44403c; }

/* Sidebar widgets */
.widget { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.widget h4 { margin-bottom: 12px; font-size: 15px; }
.event-row, .class-row {
  padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px;
}
.event-row:first-of-type, .class-row:first-of-type { border-top: 0; }
.when { font-size: 12px; color: var(--muted); }

/* Pages */
.page-hero { padding: 28px 0 8px; }
.page-hero h2 { font-family: "Source Serif 4", Georgia, serif; font-size: 36px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 24px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.chip.on { background: var(--lake); color: #fff; border-color: var(--lake); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column;
}
.card .thumb { height: 140px; background: #0b1f3a center/cover no-repeat; }
.card .pad { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.price { font-weight: 800; color: var(--pine); }

form.post {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  display: grid; gap: 12px; max-width: 640px;
}
label { font-size: 13px; font-weight: 700; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  font: inherit; background: #fff;
}
textarea { min-height: 110px; }

.notice {
  background: #fffbeb; border: 1px solid #fde68a; color: #7a5a12;
  padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px;
}

footer {
  background: var(--lake-deep); color: #fde68a; padding: 36px 0 24px; margin-top: 40px;
}
footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { footer .wrap { grid-template-columns: 1fr; } }
footer h4 { color: #fff; margin-bottom: 8px; }
footer a { color: #fcd34d; display: block; margin: 4px 0; }
.legal { margin-top: 24px; font-size: 12px; color: #fde68a; opacity: .8; }

.wave-strip { height: 10px; background: linear-gradient(90deg, #0b1f3a, #c9a227, #9a3412); }

/* Directory */
.dir-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 8px 0 4px;
}
.dir-toolbar input[type="search"] {
  max-width: 420px; flex: 1;
}
.dir-list { display: grid; gap: 12px; margin-bottom: 40px; }
.dir-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; display: grid; gap: 6px;
}
.dir-card.featured {
  border-color: #fcd34d;
  background: #fffbeb;
  box-shadow: var(--shadow);
}
.dir-card h5 { font-size: 17px; }
.dir-card .dir-meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.dir-card .dir-actions { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
@media (min-width: 800px) {
  .dir-list { grid-template-columns: 1fr 1fr; }
}
