/* ─── Garet font (self-hosted) ─── */
@font-face {
  font-family: "Garet";
  src: url("../fonts/Garet-Book.woff2") format("woff2"),
       url("../fonts/Garet-Book.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Garet";
  src: url("../fonts/Garet-Heavy.woff2") format("woff2"),
       url("../fonts/Garet-Heavy.woff") format("woff");
  font-weight: 550 800;
  font-style: normal;
  font-display: swap;
}

/* ─── Uptime Warriors — shared styles ─── */
:root {
  --bg: #fff;
  --bg-subtle: #f0f6f7;
  --bg-dark: #012024;
  --border: #d0dfe1;
  --text: #111;
  --text-muted: #4d6568;
  --red: #891c1c;
  --blue: #00687a;
  --gradient: linear-gradient(135deg, #00687a 0%, #99bfed 100%);
  --gradient-bg: linear-gradient(160deg, #012024 0%, #003d47 50%, #001218 100%);
  --font: "Garet", system-ui, sans-serif;
  --serif: "Garet", 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: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.3rem;
}
.headline {
  font-family: var(--serif);
  font-weight: 550;
  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/contain 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;
  overflow: visible;
}
.site-header__main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 0;
}
.site-header__logo  { flex: 1; display: flex; align-items: center; justify-content: flex-start; line-height: 0; overflow: hidden; }
.site-header__logo img { height: 70px; width: auto; display: block; }
.site-header__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  justify-content: flex-end;
}

.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: 400;
  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 {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow-x: auto;
  overflow-y: visible;
}
.sections-nav::-webkit-scrollbar { display: none; }
.sections-nav .nav { display: flex; align-items: center; }
.sections-nav .nav a {
  display: block;
  padding: 0.45rem 0.85rem;
  font-size: 0.68rem;
  font-weight: 550;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  border-radius: 3px;
}
.sections-nav .nav a:hover,
.sections-nav .nav-current a { color: var(--text); background: var(--bg-subtle); }
.nav-main-links {
  flex: 0 0 auto;
}

.header-search__form {
  display: flex;
  align-items: center;
}
.header-search__form input {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-family: var(--font);
  font-size: 0.85rem;
  width: 220px;
}

.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: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
}
.breaking__link { font-weight: 400; 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: 550;
  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: 400; 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: contain; }
.lead-block__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--gradient);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 400;
  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; }
.feed-thumb { width: 200px; height: auto; display: block; border-radius: 2px; object-fit: contain; }
.feed-thumb--empty { width: 200px; min-height: 120px; background: var(--bg-subtle); border-radius: 2px; }

.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: 550;
  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: 400;
  color: var(--border);
  line-height: 1;
  min-width: 1.5rem;
}
.ranked-list a { font-size: 0.85rem; font-weight: 400; 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: 400;
  display: flex;
  align-items: center;
  justify-content: center;
}
.opinion-card .author__name { font-size: 0.8rem; font-weight: 400; }
.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: 1.25rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand img { height: 140px; width: auto; margin-top: -0.5rem; margin-bottom: 0.75rem; opacity: 1; display: block; }
.footer-brand p { font-size: 0.85rem; line-height: 1.6; max-width: 280px; }
.footer-col h4 {
  font-size: 0.68rem;
  font-weight: 550;
  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);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.footer-legal a {
  color: rgba(255,255,255,0.6);
}
.footer-legal a:hover {
  color: #fff;
}

/* ─── Responsive (shared) ─── */
.menu-btn { display: none; }

@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: 768px) {
  .topbar__tagline { display: none; }
  .site-header__logo img { height: 56px; }
  .menu-btn { display: flex; }
  .sections-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 150;
    overflow: visible;
  }
  .sections-nav.is-open { display: block; }
  .sections-nav.is-open .nav { flex-direction: column; padding: 0.25rem 0; }
  .sections-nav.is-open .nav a {
    padding: 0.85rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }
  .sections-nav.is-open .nav li:last-child a { border-bottom: none; }
  .header-search__form input { width: 130px; font-size: 0.8rem; padding: 0.4rem 0.5rem; }
  .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 { display: grid; grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .site-header__main { gap: 0.75rem; }
  .header-search__form { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ─── 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: 400;
  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-weight: 550;
  font-size: 1.35rem;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 550;
  margin: 2rem 0 0.75rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.4rem 1.5rem;
  padding: 0;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body ul ul { list-style: circle; }
.article-body ol ol { list-style: lower-alpha; }
.article-body li {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.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);
}

/* ─── About page (page-about.hbs) ─── */
.about-page {
  width: min(780px, 100% - 2rem);
  margin: 0 auto;
  padding: 2.75rem 0 4.5rem;
}

.about-page__eyebrow {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}

.about-page__title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.about-page__lead {
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.68;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.about-page__section {
  margin-bottom: 2rem;
}

.about-page__section h2 {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.about-page__section p {
  font-size: 0.96rem;
  color: var(--text-muted);
  line-height: 1.72;
  margin-bottom: 0.8rem;
}

.about-page__section a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-page__section a:hover {
  color: var(--red);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 400;
  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: 400;
  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 ul {
  list-style: disc;
}

.policy-content ol {
  list-style: decimal;
}

.policy-content ul ul {
  list-style: circle;
}

.policy-content ol ol {
  list-style: lower-alpha;
}

.policy-content li > p {
  margin-bottom: 0.6rem;
}

.policy-content a {
  color: var(--red);
  font-weight: 400;
}

.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);
}

/* Blog page pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding-top: 2.5rem;
  flex-wrap: wrap;
}

.bp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 400;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.bp-btn:hover:not(:disabled) {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.bp-btn--disabled {
  opacity: 0.38;
  cursor: default;
}

.bp-pages {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.bp-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 400;
  font-family: var(--font);
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.bp-num:hover {
  background: var(--bg-subtle);
  color: var(--text);
  border-color: var(--border);
}

.bp-num--active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  cursor: default;
  pointer-events: none;
}

.bp-ellipsis {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0 0.15rem;
  line-height: 2rem;
}

/* 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);
}
