/* Bean Town Brief - deep navy / brick / cream */
:root {
  --navy: #0b1f3a;
  --navy-soft: #163056;
  --navy-muted: #2a4264;
  --brick: #c45c3a;
  --brick-deep: #9e4228;
  --brick-soft: #f8ebe6;
  --cream: #f7f3eb;
  --cream-deep: #ebe4d6;
  --surface: #ffffff;
  --ink: #121820;
  --muted: #5c6570;
  --border: #ddd6c8;
  --border-soft: #ebe6dc;
  --ads-bg: #f0ebe0;
  --shadow: 0 10px 30px rgba(11, 31, 58, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--navy-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--brick);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Top bar */
.topbar {
  background: var(--navy);
  color: var(--cream);
  font-size: 0.8rem;
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.45rem 0;
}

.topbar a {
  color: var(--cream);
  text-decoration: none;
}

.topbar a:hover {
  color: #fff;
  text-decoration: underline;
}

.topbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  opacity: 0.9;
}

/* Header / masthead */
.site-header {
  background: var(--surface);
  border-bottom: 3px solid var(--navy);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.brand-name span {
  color: var(--brick);
}

.brand-tagline {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: var(--navy);
  color: var(--cream);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.site-nav {
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}

.nav-list a {
  display: inline-block;
  padding: 0.55rem 0.7rem;
  color: var(--navy);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  background: var(--brick-soft);
  color: var(--brick-deep);
}

/* AdSense placeholder */
.ad-slot {
  background: var(--ads-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  margin: 1rem 0;
}

.ad-slot--leaderboard {
  min-height: 100px;
}

.ad-slot--sidebar {
  min-height: 250px;
  margin: 0;
}

.ad-slot--inline {
  min-height: 120px;
  margin: 1.5rem 0;
}

/* Homepage layout */
.home-main {
  padding: 1.25rem 0 3rem;
}

.section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--navy);
}

.section-label h2 {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
}

.section-label a {
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--brick);
}

.section-label a:hover {
  text-decoration: underline;
}

/* Hero / top stories */
.top-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.story-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.story-card a {
  text-decoration: none;
  color: inherit;
}

.story-card a:hover .story-title {
  color: var(--brick);
}

.story-media {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 55%, var(--brick-deep) 100%);
  color: var(--cream);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  position: relative;
}

.story-media--edu {
  background: linear-gradient(135deg, #163056 0%, #2f5d8a 70%, #c45c3a 100%);
}

.story-media--intl {
  background: linear-gradient(145deg, #0b1f3a 0%, #1a4a5c 60%, #3d6b7a 100%);
}

.story-media--tech {
  background: linear-gradient(135deg, #13263f 0%, #2a4264 50%, #5a6f8c 100%);
}

.story-media--local {
  background: linear-gradient(135deg, #1f2e24 0%, #3d5a45 70%, #c45c3a 100%);
}

.story-media--sports {
  background: linear-gradient(135deg, #0b1f3a 0%, #2c3e55 60%, #8b4513 100%);
}

.story-media-caption {
  font-size: 0.72rem;
  opacity: 0.85;
  margin: 0;
}

.story-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brick);
}

.story-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 0;
  color: var(--navy);
  transition: color 0.15s ease;
}

.story-card--lead .story-title {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.story-deck {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.story-meta {
  margin-top: auto;
  padding-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.stack-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}

.stack-item a {
  text-decoration: none;
  color: inherit;
}

.stack-item a:hover .story-title {
  color: var(--brick);
}

.stack-item .story-title {
  font-size: 1.05rem;
}

/* Beat panels */
.beats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin: 0.5rem 0 1.5rem;
}

.beat-panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.beat-panel-head {
  padding: 0.85rem 1rem 0.7rem;
  border-bottom: 2px solid var(--navy);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.beat-panel-head h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.beat-panel-head a {
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--brick);
  white-space: nowrap;
}

.beat-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  flex: 1;
}

.beat-list li {
  border-bottom: 1px solid var(--border-soft);
}

.beat-list li:last-child {
  border-bottom: 0;
}

.beat-list a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
}

.beat-list a:hover .beat-title {
  color: var(--brick);
}

.beat-title {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  margin: 0 0 0.25rem;
  color: var(--navy);
}

.beat-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Secondary row: local + sports + ads */
.secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 280px;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

.quiet-note {
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rail-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.rail-card h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.55rem;
}

.rail-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.newsletter-form input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font: inherit;
  background: var(--cream);
}

.newsletter-form button {
  background: var(--navy);
  color: var(--cream);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.newsletter-form button:hover {
  background: var(--navy-soft);
}

.newsletter-form .form-note {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
}

/* Article page */
.article-wrap {
  padding: 1.5rem 0 3rem;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) 280px;
  gap: 1.5rem;
  justify-content: space-between;
}

.article-header {
  margin-bottom: 1.25rem;
}

.article-header .kicker {
  margin-bottom: 0.4rem;
}

.article-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  margin-bottom: 0.65rem;
}

.byline {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.article-hero {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 55%, var(--brick) 100%);
}

.photo-credit {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.quick-read {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brick);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 0 0 1.5rem;
  box-shadow: var(--shadow);
}

.quick-read h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.55rem;
}

.quick-read ul {
  margin: 0;
  padding-left: 1.15rem;
}

.quick-read li {
  margin-bottom: 0.4rem;
}

.quick-read li:last-child {
  margin-bottom: 0;
}

.article-body {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.article-body p {
  margin: 0 0 1.15rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-body h2 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.65rem;
}

.article-body .empty-line {
  height: 0.85rem;
}

.related {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.related h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.55rem;
}

.related ul {
  margin: 0;
  padding-left: 1.15rem;
}

.related li {
  margin-bottom: 0.35rem;
}

.affiliate-disclosure {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.82rem;
  color: var(--muted);
}

.affiliate-disclosure p {
  margin: 0;
  font-size: inherit;
  line-height: 1.5;
}

.sources {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.sources h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.4rem;
}

.sources ul {
  margin: 0;
  padding-left: 1.15rem;
}

/* Static pages */
.page-wrap {
  padding: 1.75rem 0 3rem;
}

.page-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
  max-width: 760px;
}

.page-card h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 0.35rem;
}

.page-card .lede {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.page-card h2 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}

.page-card p,
.page-card li {
  font-size: 0.98rem;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--cream);
  padding: 2rem 0 1.5rem;
  margin-top: 1rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}

.footer-brand .brand-name {
  color: var(--cream);
  font-size: 1.25rem;
}

.footer-brand .brand-name span {
  color: #e8a090;
}

.footer-brand p {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  opacity: 0.85;
  max-width: 32ch;
}

.footer-col h3 {
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.65rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.9;
}

.footer-col a:hover {
  opacity: 1;
  text-decoration: underline;
  color: #fff;
}

.footer-col li + li {
  margin-top: 0.35rem;
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(247, 243, 235, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
  font-size: 0.78rem;
  opacity: 0.8;
}

.footer-bottom p {
  margin: 0;
}

/* Placeholder badge */
.placeholder-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--brick-soft);
  color: var(--brick-deep);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* Responsive */
@media (max-width: 960px) {
  .top-grid,
  .beats-grid,
  .secondary-grid,
  .article-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .secondary-grid .rail {
    order: -1;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    display: none;
    border-top: 1px solid var(--border-soft);
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    padding: 0.5rem 0 0.75rem;
  }

  .nav-list a {
    padding: 0.7rem 0.25rem;
  }

  .brand-tagline {
    display: none;
  }
}

/* Final BTB lockup */
.brand-lockup { height: 66px; width: auto; }
.footer-lockup { height: 48px; width: auto; }
@media (max-width: 720px) { .brand-lockup { height: 50px; } }
.footer-brand p a { color: var(--cream); }

/* Real story images */
.story-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
img.article-hero { width: 100%; height: auto; object-fit: cover; display: block; }
.beat-list .beat-meta + .beat-meta { margin-top: 0.35rem; }
