/* ─── Uptime Warriors — shared styles ─── */
:root {
  --bg: #fff;
  --bg-subtle: #f4f4f6;
  --bg-dark: #0f1219;
  --border: #dddde3;
  --text: #111;
  --text-muted: #5c5c6a;
  --red: #7a1c2e;
  --blue: #1a2d4a;
  --gradient: linear-gradient(135deg, #7a1c2e 0%, #4a2468 50%, #1a2d4a 100%);
  --gradient-bg: linear-gradient(160deg, #2a0e16 0%, #1f1230 45%, #0d1829 100%);
  --font: "Inter", system-ui, sans-serif;
  --serif: "Libre Baskerville", Georgia, serif;
  --content: min(1240px, 100% - 2rem);
  --sidebar: 320px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.wrap { width: var(--content); margin: 0 auto; }

/* ─── Shared story atoms ─── */
.kicker {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.3rem;
}
.headline {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: opacity 0.15s;
}
a:hover .headline { opacity: 0.7; }
.summary { font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; margin-top: 0.4rem; }
.byline  { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.6rem; }
.thumb   { background: var(--bg-subtle) center/cover no-repeat; border-radius: 2px; }

/* ─── Top bar ─── */
.topbar {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.7rem;
  padding: 0.4rem 0;
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.topbar__date { opacity: 0.7; }

/* ─── Site header ─── */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 200;
}
.site-header__main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
}
.site-header__left  { display: none; }
.site-header__logo  { flex: 0 0 auto; }
.site-header__logo img { height: 52px; width: auto; }
.site-header__right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 40%;
  min-width: 420px;
}

.menu-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  color: var(--text);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font);
}
.btn-primary {
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--font);
}

/* Sections nav */
.sections-nav {
  border-top: 1px solid var(--border);
  overflow-x: auto;
}
.sections-nav::-webkit-scrollbar { display: none; }
.sections-nav__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
}
.sections-nav .nav { display: flex; min-width: max-content; }
.sections-nav .nav a {
  display: block;
  padding: 0.7rem 1rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  white-space: nowrap;
}
.sections-nav .nav a:hover,
.sections-nav .nav-current a { color: var(--text); background: var(--bg-subtle); }
.sections-nav .nav li:first-child a {
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}
.nav-main-links {
  flex: 0 0 auto;
}
.nav-main-links a:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.header-search__form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  align-items: center;
  width: 100%;
}
.header-search__form input {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.65rem 0.8rem;
  font-family: var(--font);
  font-size: 0.95rem;
}

.search-no-results {
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 1rem 0 0;
}

/* Breaking bar */
.breaking {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
}
.breaking__inner { display: flex; align-items: center; gap: 1rem; font-size: 0.8rem; }
.breaking__tag {
  flex-shrink: 0;
  background: var(--gradient);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
}
.breaking__link { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breaking__link:hover { color: var(--red); }
.breaking__time { flex-shrink: 0; color: var(--text-muted); font-size: 0.72rem; }

/* ─── Section title ─── */
.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-bottom: 0.65rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--text);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.section-title a { font-size: 0.72rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-muted); }
.section-title a:hover { color: var(--red); }

/* ─── Home page layout ─── */
.lead-block { padding: 2rem 0; border-bottom: 1px solid var(--border); }
.lead-block__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: start;
}
.lead-block__media {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 2px;
  overflow: hidden;
}
.lead-block__media img { width: 100%; height: 100%; object-fit: cover; }
.lead-block__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--gradient);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
}
.lead-block .headline { font-size: clamp(1.6rem, 3vw, 2.35rem); margin-top: 0.5rem; }
.lead-block .summary { font-size: 1rem; margin-top: 0.75rem; }

.headlines-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.headline-card .thumb { aspect-ratio: 16/10; margin-bottom: 0.85rem; }
.headline-card .headline { font-size: 1.05rem; }

.page-grid {
  display: grid;
  grid-template-columns: 1fr var(--sidebar);
  gap: 2.5rem;
  padding: 2rem 0 3rem;
  align-items: start;
}

.latest { margin-bottom: 2.5rem; }
.feed-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.feed-item:first-child { padding-top: 0; }
.feed-item .thumb { aspect-ratio: 4/3; }
.feed-item .headline { font-size: 1.2rem; }

.topic-feed { margin-bottom: 2.5rem; }
.topic-feed__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.topic-card .thumb { aspect-ratio: 16/10; margin-bottom: 0.75rem; }
.topic-card .headline { font-size: 1rem; }

.sidebar { position: sticky; top: 120px; }
.sidebar-module {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-module:last-child { border-bottom: none; }
.sidebar-module h3 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.ranked-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.ranked-list li:last-child { border-bottom: none; }
.ranked-list__num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  min-width: 1.5rem;
}
.ranked-list a { font-size: 0.85rem; font-weight: 600; line-height: 1.35; }
.ranked-list a:hover { color: var(--red); }
.ranked-list span { display: block; font-size: 0.68rem; color: var(--text-muted); margin-top: 0.2rem; font-weight: 400; }

.sidebar-newsletter {
  background: var(--gradient-bg);
  color: #fff;
  padding: 1.25rem;
  border-radius: 4px;
  border: none;
}
.sidebar-newsletter h3 { color: #fff; margin-bottom: 0.5rem; }
.sidebar-newsletter p { font-size: 0.8rem; color: rgba(255,255,255,0.7); margin-bottom: 1rem; line-height: 1.5; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-cloud a {
  font-size: 0.72rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
}
.tag-cloud a:hover { border-color: var(--text); color: var(--text); }

.topic-band {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}
.topic-band--alt { background: var(--bg-subtle); }
.topic-band__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.topic-band .thumb { aspect-ratio: 3/2; margin-bottom: 0.65rem; }
.topic-band .headline { font-size: 0.95rem; }

.opinion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.opinion-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
}
.opinion-card .author {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}
.opinion-card .author__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.opinion-card .author__name { font-size: 0.8rem; font-weight: 600; }
.opinion-card .author__role { font-size: 0.68rem; color: var(--text-muted); }
.opinion-card .headline { font-size: 1.05rem; }

/* ─── Site footer ─── */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.75);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand img { height: 72px; margin-bottom: 1rem; opacity: 0.95; }
.footer-brand p { font-size: 0.85rem; line-height: 1.6; max-width: 280px; }
.footer-col h4 {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}
.footer-col .nav a,
.footer-col > a { display: block; font-size: 0.85rem; padding: 0.3rem 0; color: rgba(255,255,255,0.6); }
.footer-col .nav a:hover,
.footer-col > a:hover { color: #fff; }
.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
}

/* ─── Responsive (shared) ─── */
.menu-btn { display: none; }

@media (max-width: 768px) {
  .site-header__main { display: grid; grid-template-columns: auto 1fr auto; }
  .site-header__left { display: flex; }
  .site-header__logo img { height: 40px; }
  .site-header__right { width: auto; min-width: 0; }
  .menu-btn { display: flex; }
  .sections-nav { display: none; }
  .sections-nav.is-open { display: block; }
  .sections-nav__inner { display: block; }
  .sections-nav.is-open .nav { flex-direction: column; }
  .sections-nav.is-open .nav a { border-right: none; border-bottom: 1px solid var(--border); padding: 0.85rem 0; }
  .header-search__form { grid-template-columns: 1fr; }
  .lead-block__grid { grid-template-columns: 1fr; }
  .headlines-row { grid-template-columns: 1fr; }
  .feed-item { grid-template-columns: 1fr; }
  .feed-item .thumb { aspect-ratio: 16/10; }
  .topic-feed__grid { grid-template-columns: 1fr; }
  .topic-band__grid { grid-template-columns: 1fr; }
  .opinion-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1100px) {
  .page-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .sidebar-module { border-bottom: none; padding-bottom: 0; }
  .topic-band__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ─── Post (post.hbs) layout ─── */
.article-wrap {
  width: min(720px, 100% - 2rem);
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
}

.article-kicker {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.6rem;
  display: block;
}

.article-title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.article-deck {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.article-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.article-meta span { display: flex; align-items: center; gap: 0.3rem; }

.article-hero {
  margin-bottom: 2rem;
  border-radius: 2px;
  overflow: hidden;
}

.article-hero img { width: 100%; display: block; }

.article-hero figcaption {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.article-body p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1.4rem;
}

.article-body h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}

.article-body blockquote {
  border-left: 3px solid var(--red);
  padding: 0.75rem 0 0.75rem 1.25rem;
  margin: 2rem 0;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-muted);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--red);
  margin-top: 3rem;
}

.article-back:hover { opacity: 0.75; }

/* ─── Policy pages (page-legal-notice.hbs) ─── */
.policy-wrap {
  width: min(860px, 100% - 2rem);
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.policy-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.65rem;
}

.policy-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.policy-lead {
  color: var(--text-muted);
  line-height: 1.75;
  font-size: 1.02rem;
  margin-bottom: 2rem;
}

.policy-content h2,
.policy-content h3,
.policy-content h4 {
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.policy-content h2:not(:first-child),
.policy-content h3:not(:first-child),
.policy-content h4:not(:first-child) {
  margin-top: 2rem;
}

.policy-content p,
.policy-content li {
  margin-bottom: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.policy-content ul,
.policy-content ol {
  margin: 0 0 1.25rem 1.25rem;
}

.policy-content a {
  color: var(--red);
  font-weight: 600;
}

.policy-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* About page request: hide last paragraph */
.page-slug-about .article-body p:last-of-type {
  display: none;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
}

.pagination a,
.pagination span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pagination a:hover {
  color: var(--text);
}

/* Required Koenig editor width utility classes */
.kg-width-wide {
  width: min(1200px, 100% - 2rem);
}

.kg-width-full {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
