/* avenuEmpire — mobile first. White + the 2010 greens. */

/* Plus Jakarta Sans, self-hosted (SIL OFL, see assets/fonts/OFL.txt). Latin subset. */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2'); }

:root {
  --bg: #ffffff;
  --tint: #f3f8f2;
  --ink: #242424;
  --muted: #5d5d5d;
  --line: #e3e9e2;
  --green: #007b1e;        /* deep green: text, buttons (5.6:1 on white) */
  --green-dark: #005c16;
  --green-bright: #3cb130; /* bright green: accents only, never text on white */
  --green-fill: #007b1e;   /* backgrounds under white text (buttons, badges, callout) */
  --green-fill-hover: #005c16;
  --surface: #ffffff;      /* cards, buttons, drawer */
  --ink-on-white: #242424; /* text on things that stay white in both themes */
  --header-bg: rgba(255, 255, 255, .9);
  --line-hover: #cfd9cd;
  --warn: #a15c00;
  --tile-edge: rgba(0, 0, 0, .08);
  --logo-e: #007b1e;
  color-scheme: light dark;
  --radius: 16px;
  --pad: 16px;
  --header-h: 60px;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (min-width: 600px)  { :root { --pad: 24px; } }
@media (min-width: 768px)  { :root { --pad: 40px; } }
@media (min-width: 1024px) { :root { --header-h: 72px; } }
@media (min-width: 1200px) { :root { --pad: 80px; } }

*, *::before, *::after { box-sizing: border-box; }
/* The hidden attribute always wins, even over display rules like .btn's inline-flex. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.55; }
body.menu-open { overflow: hidden; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 26px; line-height: 1.15; }
h3 { font-size: 17px; line-height: 1.3; }
@media (min-width: 768px) { h2 { font-size: 34px; } }
p { margin: 0; }
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.wrap { max-width: 1440px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.eyebrow.on-dark { color: rgba(255, 255, 255, .85); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 10px 22px; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 700; border: 1px solid transparent; }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.btn-primary { background: var(--green-fill); color: #fff; }
.btn-primary:hover { background: var(--green-fill-hover); color: #fff; }
.btn-white { background: #fff; color: var(--ink-on-white); }
.btn-white:hover { background: #eef3ed; color: var(--ink-on-white); }
.btn-ghost { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .1); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--header-bg); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.logo-mark { flex-shrink: 0; width: 43px; height: 28px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.brand-tag { font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-inline { display: none; }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; flex-shrink: 0; }
@media (min-width: 900px) {
  .nav-inline { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; }
  .nav-inline a:not(.btn) { color: var(--muted); }
  .nav-inline a:not(.btn):hover, .nav-inline a:not(.btn)[aria-current="page"] { color: var(--ink); }
  .site-header .menu-btn { display: none; }
}

/* Drawer (mobile menu) */
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(20, 24, 20, .45); opacity: 0; transition: opacity .2s ease; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(86vw, 340px); display: flex; flex-direction: column; gap: 16px; padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: -12px 0 40px rgba(0, 0, 0, .12); transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; }
body.menu-open .drawer { transform: translateX(0); }
body.menu-open .drawer-backdrop { opacity: 1; }
.drawer[hidden], .drawer-backdrop[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.drawer-label { margin: 14px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.drawer-nav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 12px; color: var(--ink); font-size: 16px; font-weight: 600; }
.drawer-nav a:hover { background: var(--tint); color: var(--ink); }
.drawer-nav a[aria-current="page"] { background: var(--tint); color: var(--green); }
.drawer-site .ext { margin-left: auto; color: var(--muted); }
.drawer-cta { margin-top: auto; }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-backdrop { transition: none; } }

/* Hero rotator */
.hero { padding-top: 8px; padding-bottom: 20px; }
.rotator { position: relative; border-radius: 22px; overflow: hidden; color: #fff; }
.slides { display: grid; }
.slide { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 16px; padding: 22px 20px 68px; background: var(--slide); background-image: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .16), transparent 60%); opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
.slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity .6s ease; }
.slide[hidden] { display: flex !important; } /* inactive slides stay in the grid (visibility handles them) for the crossfade */
.slide-copy { display: flex; flex-direction: column; gap: 12px; }
.slide h1, .slide-title { font-size: 28px; line-height: 1.12; font-weight: 800; letter-spacing: -0.025em; max-width: 18ch; }
.slide-text { font-size: 15px; color: rgba(255, 255, 255, .9); max-width: 44ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.slide-visual { display: flex; align-items: center; justify-content: center; }
.chips { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 280px; }
.chip { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 14px; background: rgba(255, 255, 255, .96); color: var(--ink-on-white); font-size: 15px; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.chip:nth-child(2) { margin-left: 18px; }
.chip:nth-child(3) { margin-left: 36px; }
.phone { width: 92px; aspect-ratio: 9 / 18; border-radius: 22px; border: 5px solid rgba(255, 255, 255, .95); overflow: hidden; background: #111; box-shadow: 0 16px 36px rgba(0, 0, 0, .25); transform: rotate(-4deg); }
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone-mock { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; background: linear-gradient(160deg, var(--slide), #111 140%); }
.phone-letter { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--slide); font-size: 22px; font-weight: 800; }
.chip-tile { flex-shrink: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; overflow: hidden; color: #fff; font-size: 12px; font-weight: 800; }
.chip-tile img, .phone-logo img { display: block; width: 100%; height: 100%; }
.phone-logo { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: #fff; color: var(--slide); font-size: 20px; font-weight: 800; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.phone-logo.has-logo::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
@media (min-width: 768px) { .phone-logo { width: 64px; height: 64px; border-radius: 16px; } .phone-name { font-size: 12px !important; } }
.phone-name { font-size: 9px; font-weight: 700; color: #fff; }
.rotator-controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px 18px 20px; }
.dots { display: flex; align-items: center; gap: 2px; min-width: 0; }
.tab, .pause { font: inherit; cursor: pointer; border: 0; background: transparent; color: #fff; }
/* Mobile: each tab is a dot with a 32px tap target. */
.tab { position: relative; width: 32px; height: 32px; padding: 0; border-radius: 999px; }
.tab::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 999px; background: rgba(255, 255, 255, .5); transition: width .2s ease, margin .2s ease, background .2s ease; }
.tab.is-active::before { width: 22px; margin-left: -11px; background: #fff; }
.tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pause { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .5); }
.pause .i-play { display: none; }
.rotator.is-paused .pause .i-pause { display: none; }
.rotator.is-paused .pause .i-play { display: inline; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 3px; background: rgba(255, 255, 255, .2); }
.progress span { display: block; height: 100%; width: 0; background: #fff; }
.rotator.is-running .progress span { animation: rotator-progress var(--dur, 6s) linear forwards; }
@keyframes rotator-progress { to { width: 100%; } }
@media (min-width: 768px) {
  .slide { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; min-height: 380px; padding: 44px 44px 88px; }
  .slide-copy { flex: 1 1 60%; }
  .slide-visual { flex: 0 0 34%; }
  .slide h1, .slide-title { font-size: 40px; }
  .slide-text { font-size: 17px; }
  .phone { width: 170px; }
  .rotator-controls { padding: 0 32px 24px 36px; }
  /* Wider screens: named tabs instead of dots. */
  .tab { width: auto; height: 36px; padding: 0 14px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .85); white-space: nowrap; }
  .tab::before { display: none; }
  .tab:hover { color: #fff; background: rgba(255, 255, 255, .12); }
  .tab.is-active { color: var(--ink-on-white); background: #fff; }
  .tab-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
@media (min-width: 1024px) { .slide h1, .slide-title { font-size: 50px; } .hero { padding-top: 12px; } }
@media (prefers-reduced-motion: reduce) { .slide, .slide.is-active { transition: none; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.stats > div { display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; padding: 14px 8px; text-align: center; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats dd { margin: 0; font-size: 24px; font-weight: 800; color: var(--green); letter-spacing: -0.02em; }
.stats dt { font-size: 12px; font-weight: 600; color: var(--muted); }
@media (min-width: 768px) { .stats dd { font-size: 32px; } .stats > div { padding: 20px 12px; } }

/* Sections */
.section { padding-top: 40px; padding-bottom: 40px; }
@media (min-width: 768px) { .section { padding-top: 64px; padding-bottom: 64px; } }
.band { background: var(--tint); }
.section-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.section-head.center { align-items: center; text-align: center; }
.section-head.row { flex-direction: row; justify-content: space-between; align-items: flex-end; }
.lead { color: var(--muted); max-width: 52ch; }
@media (min-width: 768px) { .section-head { margin-bottom: 28px; } }

/* Feature cards */
.features { display: grid; gap: 12px; }
.feature { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.feature-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.feature p { color: var(--muted); font-size: 15px; }
.icon-tile { flex-shrink: 0; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--tint); color: var(--green); }
@media (min-width: 900px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } .feature { padding: 24px; gap: 16px; } }

/* Site list: rows on mobile, cards on desktop */
.sites { display: grid; gap: 10px; }
.site-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.site-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .07); }
.site-tile, .news-tile { flex-shrink: 0; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; overflow: hidden; color: #fff; font-size: 20px; font-weight: 800; }
.site-tile img, .news-tile img { display: block; width: 100%; height: 100%; }
.has-logo { position: relative; }
.has-logo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--tile-edge); pointer-events: none; }
.news-tile { width: 44px; height: 44px; border-radius: 11px; font-size: 18px; }
.site-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.site-name { font-size: 17px; font-weight: 700; }
.site-text { font-size: 14px; color: var(--muted); }
.site-go { align-self: center; color: var(--green); font-weight: 700; }
@media (min-width: 900px) {
  .sites { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .site-card { grid-template-columns: 56px minmax(0, 1fr); align-items: start; gap: 16px; padding: 22px; }
  .site-tile { width: 56px; height: 56px; border-radius: 14px; }
  .site-go { display: none; }
}

/* News */
.empty { padding: 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }

/* Callout */
.callout { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 40px; padding: 28px 22px; border-radius: 22px; color: #fff; background: var(--green-fill); background-image: radial-gradient(120% 120% at 100% 0%, rgba(60, 177, 48, .55), transparent 60%); }
.callout-text { display: flex; flex-direction: column; gap: 8px; }
.callout-text p { font-size: 21px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.section .callout { margin-bottom: 0; }
@media (min-width: 768px) {
  .callout { flex-direction: row; align-items: center; justify-content: space-between; padding: 40px 44px; margin-bottom: 64px; }
  .callout-text p { font-size: 26px; }
  .callout .btn { flex-shrink: 0; }
}

/* About page */
.page-hero { display: flex; flex-direction: column; gap: 12px; padding-top: 28px; padding-bottom: 32px; }
.page-hero h1 { font-size: 32px; line-height: 1.12; font-weight: 800; letter-spacing: -0.025em; max-width: 20ch; }
@media (min-width: 768px) { .page-hero { padding-top: 56px; padding-bottom: 56px; } .page-hero h1 { font-size: 48px; } }
.split { display: grid; gap: 16px; }
.split-side { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; } }
.prose { display: flex; flex-direction: column; gap: 14px; font-size: 17px; line-height: 1.7; }
.pull { font-size: 21px; font-weight: 700; color: var(--green); line-height: 1.35; }

/* Footer */
.site-footer { background: var(--tint); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; padding-top: 32px; padding-bottom: 24px; }
.footer-brand { grid-column: 1 / -1; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-col a { color: var(--ink); overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--green); }
.footer-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding-top: 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; padding-top: 48px; } .footer-brand { grid-column: auto; } }

/* News list */
.more { font-size: 15px; font-weight: 700; white-space: nowrap; }
.news { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.news-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease; }
.news-item:hover { color: var(--ink); border-color: var(--line-hover); box-shadow: 0 8px 24px rgba(0, 0, 0, .06); }
.news-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.news-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.news-site { font-weight: 700; color: var(--ink); }
.news-title { font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.news-excerpt { font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-page { padding-top: 0; }
@media (min-width: 900px) {
  .news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .news-item { height: 100%; padding: 22px; }
  .news-title { font-size: 20px; }
}
.page-hero .lead { margin-top: 2px; }

/* Show more */
.btn-outline { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.more-wrap { display: flex; justify-content: center; margin-top: 20px; }
.news > li[hidden] { display: none; }

/* RSS link */
.rss-link { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 4px; font-size: 14px; font-weight: 700; }

/* Site card: status + latest headline */
.site-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: currentColor; }
.status.is-up { color: var(--green); }
.status.is-up::before { box-shadow: 0 0 0 3px rgba(60, 177, 48, .2); }
.status.is-down { color: var(--warn); }
.site-latest { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.site-latest-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-right: 4px; }

/* News: New badge + site filters */
.badge-new { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--green-fill); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.5; }
.filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--pad)) 18px; padding: 2px var(--pad) 6px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters a { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; }
.filters a:hover { border-color: var(--green); color: var(--ink); }
.filters a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filters .count { font-weight: 600; opacity: .6; }

/* 404 */
.notfound { padding-bottom: 48px; }
.notfound .actions { margin-top: 12px; }

/* Logo (æ ligature): "a" in the text colour, "e" in brand green; both follow the theme */
.lm-a { fill: var(--ink); }
.lm-e { fill: var(--logo-e); }

/* Dark mode. Follows the device setting unless the visitor picked a theme
   in the footer (html[data-theme=light|dark], set by assets/js/theme.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1310;
    --tint: #141b16;
    --surface: #18201a;
    --ink: #e7ece8;
    --muted: #a3ada5;
    --line: #28322b;
    --line-hover: #3a473d;
    --green: #4ccb3f;         /* green as text on dark: ~8:1 */
    --green-dark: #6bd960;
    --green-fill: #0b7a22;    /* white text on it stays >= 4.5:1 */
    --green-fill-hover: #086a1d; /* darker on hover: 6.9:1 with white */
    --header-bg: rgba(14, 19, 16, .88);
    --warn: #f2a94b;
    --tile-edge: rgba(255, 255, 255, .1);
    --logo-e: #3cb130;
  }
  :root:not([data-theme="light"]) .site-card:hover, :root:not([data-theme="light"]) .news-item:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
  :root:not([data-theme="light"]) .drawer { box-shadow: -12px 0 40px rgba(0, 0, 0, .6); }
  :root:not([data-theme="light"]) .drawer-backdrop { background: rgba(0, 0, 0, .6); }
  :root:not([data-theme="light"]) .stats { background: var(--surface); }
  :root:not([data-theme="light"]) .feature, :root:not([data-theme="light"]) .news-item, :root:not([data-theme="light"]) .empty { background: var(--surface); }
}
:root[data-theme="dark"] {
    --bg: #0e1310;
    --tint: #141b16;
    --surface: #18201a;
    --ink: #e7ece8;
    --muted: #a3ada5;
    --line: #28322b;
    --line-hover: #3a473d;
    --green: #4ccb3f;         /* green as text on dark: ~8:1 */
    --green-dark: #6bd960;
    --green-fill: #0b7a22;    /* white text on it stays >= 4.5:1 */
    --green-fill-hover: #086a1d; /* darker on hover: 6.9:1 with white */
    --header-bg: rgba(14, 19, 16, .88);
    --warn: #f2a94b;
    --tile-edge: rgba(255, 255, 255, .1);
    --logo-e: #3cb130;
}
:root[data-theme="dark"] .site-card:hover, :root[data-theme="dark"] .news-item:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
:root[data-theme="dark"] .drawer { box-shadow: -12px 0 40px rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .drawer-backdrop { background: rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .stats { background: var(--surface); }
:root[data-theme="dark"] .feature, :root[data-theme="dark"] .news-item, :root[data-theme="dark"] .empty { background: var(--surface); }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* About: timeline (vertical rail on phones, two columns on desktop) */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 32px; display: flex; flex-direction: column; gap: 4px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 999px; background: var(--bg); border: 3px solid var(--green-bright); box-sizing: border-box; }
.timeline li:last-child::before { background: var(--green-bright); }
.tl-year { font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--green); }
.timeline h3 { font-size: 18px; }
.timeline p { color: var(--muted); font-size: 15px; max-width: 52ch; }
@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; row-gap: 28px; }
  .timeline::before { display: none; }
  .timeline li { padding: 0 0 0 20px; border-left: 2px solid var(--line); }
  .timeline li::before { left: -9px; }
}

/* Hero: centred on phones */
@media (max-width: 767px) {
  .slide { align-items: center; text-align: center; }
  .slide-copy { align-items: center; }
  .slide h1, .slide-title, .slide-text { margin-left: auto; margin-right: auto; }
  .slide .actions { justify-content: center; }
  .chips { margin: 0 auto; align-items: center; }
  .chip:nth-child(2), .chip:nth-child(3) { margin-left: 0; }
  .rotator-controls { justify-content: center; padding-left: 16px; }
  .rotator-controls .pause { position: absolute; right: 16px; bottom: 18px; }
}

/* Footer RSS link */
.footer-rss { display: inline-flex; align-items: center; gap: 6px; }

/* Theme picker (footer) */
.theme-picker { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.theme-picker button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.theme-picker button:hover { color: var(--ink); }
.theme-picker button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.footer-bottom { align-items: center; }

/* Contact form */
.contact-wrap { padding-top: 0; }
.contact-form { display: flex; flex-direction: column; gap: 18px; max-width: 640px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
@media (min-width: 768px) { .contact-form { padding: 32px; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; }
.field textarea { resize: vertical; min-height: 160px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--green-bright); outline-offset: 1px; border-color: var(--green); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #c0392b; }
.field-error { margin: 0; font-size: 14px; font-weight: 600; color: #c0392b; }
:root[data-theme="dark"] .field-error { color: #ff8a7a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field-error { color: #ff8a7a; } }
.field-note { margin: 0; font-size: 13px; color: var(--muted); }
.captcha { min-height: 78px; }
.contact-form .btn { align-self: flex-start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 14px 16px; border-radius: 12px; font-weight: 600; }
.notice-error { background: rgba(192, 57, 43, .1); color: #c0392b; border: 1px solid rgba(192, 57, 43, .35); }
:root[data-theme="dark"] .notice-error { color: #ff8a7a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .notice-error { color: #ff8a7a; } }
.notice-ok { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 640px; padding: 28px; background: var(--tint); border: 1px solid var(--line); font-weight: 400; }
.notice-ok h2 { font-size: 22px; }
.notice-ok p { color: var(--muted); }

/* Phones: centre the callout and the footer's bottom row (theme picker, copyright) */
@media (max-width: 767px) {
  .callout { align-items: center; text-align: center; }
  .callout-text { align-items: center; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
  .footer-grid { text-align: center; }
  .footer-brand .brand { justify-content: center; }
  .footer-brand .brand-text { align-items: flex-start; text-align: left; } /* keep name + tagline as one block */
  .footer-col { align-items: center; }
  .footer-rss { justify-content: center; }
}

/* Native select, restyled (no-JS fallback) */
.field select { appearance: none; -webkit-appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%237a857c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }

/* Custom dropdown */
.dd { position: relative; }
.dd-native { position: absolute; inset: auto; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.dd-btn:hover { border-color: var(--line-hover); }
.dd-btn:focus-visible, .dd.is-open .dd-btn { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(60, 177, 48, .25); }
.dd-btn.is-placeholder .dd-value { color: var(--muted); }
.dd-btn[aria-invalid="true"] { border-color: #c0392b; }
.dd-chevron { flex-shrink: 0; color: var(--muted); transition: transform .2s ease; }
.dd.is-open .dd-chevron { transform: rotate(180deg); color: var(--green); }
.dd-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; max-height: 300px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .06); outline: none; animation: dd-in .14s ease-out; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dd-list [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 10px; font-size: 15px; font-weight: 500; cursor: pointer; }
.dd-list [role="option"].is-active { background: var(--tint); }
.dd-list [role="option"][aria-selected="true"] { color: var(--green); font-weight: 700; }
.dd-check { visibility: hidden; flex-shrink: 0; }
.dd-list [role="option"][aria-selected="true"] .dd-check { visibility: visible; }
@media (prefers-reduced-motion: reduce) { .dd-list { animation: none; } .dd-chevron { transition: none; } }
:root[data-theme="dark"] .dd-list { box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dd-list { box-shadow: 0 18px 40px rgba(0, 0, 0, .55); } }

/* News article page */
.article { padding-top: 20px; padding-bottom: 48px; }
@media (min-width: 768px) { .article { padding-top: 40px; padding-bottom: 72px; } }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; font-size: 14px; font-weight: 600; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green); }
.article-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.article-source { display: flex; align-items: center; gap: 12px; }
.article-source .news-tile { width: 48px; height: 48px; }
.article-site { font-weight: 700; }
.article-source time { font-size: 14px; color: var(--muted); }
.article-head h1 { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
@media (min-width: 768px) { .article-head h1 { font-size: 42px; } }
.article-body { padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.article-note { font-size: 15px; color: var(--muted); font-style: italic; }
.article-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (max-width: 767px) { .article-actions .btn { flex: 1 1 100%; } }

.section-head.row { flex-wrap: wrap; row-gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Full article bodies (content_html) */
.article-body > :first-child { margin-top: 0; }
.article-body h2, .article-body h3, .article-body h4 { margin: 12px 0 0; line-height: 1.25; letter-spacing: -0.01em; }
.article-body h2 { font-size: 24px; }
.article-body h3 { font-size: 20px; }
.article-body h4 { font-size: 17px; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body ul, .article-body ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; }
.article-body blockquote { margin: 0; padding: 10px 16px; border-left: 4px solid var(--green-bright); background: var(--tint); border-radius: 0 10px 10px 0; color: var(--muted); }
.article-body img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.article-body pre { margin: 0; padding: 14px 16px; overflow-x: auto; background: var(--tint); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; line-height: 1.5; }
.article-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.article-body :not(pre) > code { padding: 1px 6px; background: var(--tint); border-radius: 6px; }
.article-body hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.article-body p, .article-body li { overflow-wrap: anywhere; }

/* Lazy rendering: the browser skips layout/paint of these until they near the
   viewport. contain-intrinsic-size reserves an estimated height (auto = the
   last rendered size) so the scrollbar doesn't jump. Not applied to the first
   screen (hero, page hero, article header). */
.section, .band, .site-footer, .callout { content-visibility: auto; contain-intrinsic-size: auto 600px; }
.site-footer { contain-intrinsic-size: auto 420px; }
.callout { contain-intrinsic-size: auto 260px; }

/* Scroll reveal: site.js adds .reveal only to below-the-fold blocks, so nothing above the fold ever starts hidden. */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* Theme picker inside the mobile drawer, just above Contact us. */
.drawer-theme { margin-top: auto; display: flex; flex-direction: column; }
.drawer-theme .drawer-label { margin-top: 0; }
.drawer-theme + .drawer-cta { margin-top: 0; }
.drawer-theme .theme-picker { display: flex; }
.drawer-theme .theme-picker button { flex: 1; justify-content: center; min-height: 40px; }
