:root {
  --accent: #3f7ec2;
  --ink: #0c1a2f;
  --bg: #f7f8fa;
  --card: #ffffff;
  --line: #e5e9f0;
  --text: #16233a;
  --muted: #61718a;
  --wrap: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
a { color: inherit; text-decoration: none; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 54px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff); border: 1px solid color-mix(in srgb, var(--accent) 20%, #fff); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 14.5px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: none; }
.site-nav::-webkit-scrollbar { display: none; }
.nav-link { padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); transition: color .15s, background .15s; white-space: nowrap; }
.nav-link:hover { color: var(--text); background: #eef2f8; }
.nav-link.active { color: #fff; background: var(--ink); }
.nav-burger {
  display: none; place-items: center; width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); cursor: pointer;
}
@media (max-width: 760px) {
  .nav-burger { display: grid; }
  .site-header .header-wrap { position: relative; }
  .site-nav {
    display: none; position: absolute; top: calc(100% + 6px); right: 16px; z-index: 60;
    flex-direction: column; gap: 2px; min-width: 190px; padding: 6px;
    background: #fff; border: 1px solid var(--line); border-radius: 13px;
    box-shadow: 0 16px 40px rgba(12, 26, 47, .16);
  }
  .site-nav.open { display: flex; }
  .site-nav .nav-link { border-radius: 8px; padding: 10px 12px; }
}

/* ── Slim hero ──────────────────────────────────────────── */
.hero {
  background: linear-gradient(155deg, var(--hero-c, var(--ink)) 0%, color-mix(in srgb, var(--hero-c, var(--ink)) 82%, #35548a) 100%);
  color: #eaf1fb;
}
.hero.has-img {
  background:
    linear-gradient(180deg, rgba(12, 26, 47, .6), rgba(12, 26, 47, .82)),
    var(--hero-img) center / cover no-repeat;
}
.hero-inner { padding: 30px 22px 46px; }
.hero-kicker {
  display: flex; align-items: center; gap: 9px; margin-bottom: 10px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 70%, #fff);
}
.hk-dot { width: 3.5px; height: 3.5px; border-radius: 50%; background: currentColor; opacity: .7; }
.hk-date { color: #8fa3bd; letter-spacing: .09em; }
.hero h1 {
  margin: 0 0 8px; font-size: clamp(34px, 5.8vw, 56px); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.08; color: #fff;
}
.hero h1 em {
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400;
  letter-spacing: 0; color: color-mix(in srgb, var(--accent) 62%, #fff);
}
.hero p { margin: 0; font-size: 13.5px; color: #aebfd6; max-width: 60ch; font-weight: 500; line-height: 1.55; }

/* ── Today statement panel ──────────────────────────────── */
.today-panel {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--tp-c, var(--ink)) 0%, color-mix(in srgb, var(--tp-c, var(--ink)) 80%, #2c4a7c) 100%);
  color: #eef3fb;
}
.tp-bg {
  position: absolute; inset: -30%;
  background:
    radial-gradient(45% 55% at 20% 30%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    radial-gradient(40% 50% at 82% 72%, rgba(255, 255, 255, .07), transparent 70%);
  animation: tpDrift 16s ease-in-out infinite alternate;
}
@keyframes tpDrift {
  from { transform: translate3d(-2%, -1.5%, 0) rotate(-2deg) scale(1); }
  to { transform: translate3d(2%, 2%, 0) rotate(2deg) scale(1.06); }
}
.tp-inner { position: relative; padding: 40px 22px 34px; }
.today-panel { margin-bottom: 8px; }
.tp-kicker {
  display: flex; align-items: center; gap: 9px; margin-bottom: 18px;
  font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 70%, #fff);
}
.tp-date { color: #93a7c2; letter-spacing: .08em; }
.tp-date:empty { display: none; }
.tp-date:not(:empty)::before { content: '· '; }
.tp-names { display: flex; flex-direction: column; gap: 2px; margin-bottom: 24px; }
.tp-name {
  display: flex; align-items: baseline; gap: 16px;
  animation: rowIn .55s cubic-bezier(.2, .7, .3, 1) both; animation-delay: var(--d, 0ms);
}
.tp-name strong {
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400;
  font-size: clamp(30px, 4.6vw, 52px); line-height: 1.12; letter-spacing: -.01em; color: #fff;
}
.tp-rank {
  flex: none; display: grid; place-items: center; min-width: 28px; height: 22px; padding: 0 7px;
  border-radius: 999px; font-size: 10.5px; font-weight: 800;
  color: color-mix(in srgb, var(--accent) 75%, #fff);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transform: translateY(-6px);
}
.tp-skel { font-size: 13px; color: #8fa3bd; font-weight: 600; }
.tp-meta {
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 16px;
}
.tp-bit { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.tp-bit em {
  font-style: normal; font-weight: 800; font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: #8fa3bd;
}
.tp-bit b { font-weight: 700; color: #dbe6f4; }
.tp-bit b + b::before { content: '· '; color: #5f7898; font-weight: 400; }
@media (prefers-reduced-motion: reduce) {
  .tp-bg, .tp-name { animation: none; }
}

/* ── Search bar ─────────────────────────────────────────── */
.search-bar { margin: 20px 0 24px; column-span: all; }

/* ambient background wash */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 82% 0%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 70%),
    radial-gradient(55% 45% at 8% 95%, color-mix(in srgb, var(--accent) 4%, transparent), transparent 70%);
  animation: ambientDrift 26s ease-in-out infinite alternate;
}
@keyframes ambientDrift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to { transform: translate3d(1.5%, 1.5%, 0) scale(1.05); }
}

/* page enter */
.page-main.enter { animation: pageIn .55s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ripple */
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 2;
  background: color-mix(in srgb, var(--grp-accent, var(--accent)) 16%, transparent);
  transform: scale(0); opacity: 1;
  animation: ripple .55s ease-out forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* keyboard focus */
.g-row.kb-focus { background: color-mix(in srgb, var(--grp-accent, var(--accent)) 8%, transparent); box-shadow: inset 2.5px 0 0 var(--grp-accent, var(--accent)); }

/* hero heading entrance + sheen */
.hero-kicker, .hero h1, .hero p {
  animation: heroRise .7s cubic-bezier(.2, .7, .3, 1) both;
}
.hero h1 { animation-delay: .1s; }
.hero p { animation-delay: .2s; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.hero h1 {
  background: linear-gradient(100deg, #fff 40%, color-mix(in srgb, var(--accent) 75%, #fff) 50%, #fff 60%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: heroRise .7s cubic-bezier(.2, .7, .3, 1) .1s both,
    heroSheen 4.5s ease-in-out .8s infinite;
}
@keyframes heroSheen {
  0% { background-position: 110% 0; }
  55%, 100% { background-position: -110% 0; }
}
.search-in {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 14px; color: var(--muted);
  box-shadow: 0 1px 3px rgba(12, 26, 47, .05);
  transition: border-color .2s, box-shadow .2s;
}
.search-in:focus-within {
  border-color: var(--accent); color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent), 0 1px 3px rgba(12, 26, 47, .05);
}
.search-in input {
  flex: 1; border: none; background: none; outline: none;
  font: inherit; font-size: 14.5px; color: var(--text);
}
.search-in input::placeholder { color: #9aa8bb; }
.groups-wrap.searching .group { display: none; }
.search-results {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 2px 14px; box-shadow: 0 1px 3px rgba(12, 26, 47, .04);
}
.sg-count {
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); padding: 10px 2px 4px;
}
.sg-none { padding: 12px 2px 14px; font-size: 13.5px; color: var(--muted); font-weight: 600; }

/* ── Groups (the core list pattern) ─────────────────────── */
.group { position: relative; }
.group.rv { opacity: 0; transform: translateY(16px); }
.group.rv.in {
  opacity: 1; transform: none;
  transition: opacity .5s ease, transform .55s cubic-bezier(.2, .7, .3, 1);
}
.g-ghost {
  position: absolute; top: -22px; right: 14px; z-index: 0; pointer-events: none; user-select: none;
  font-size: 92px; font-weight: 800; line-height: 1; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(12, 26, 47, .07);
}
.g-ghost + .wrap { position: relative; z-index: 1; }
.page-main { padding: 12px 0 40px; }
.groups-wrap { padding-top: 44px; }
.groups-wrap:has(> .hero:first-child), .groups-wrap:has(> .today-panel:first-child) { padding-top: 0; }
.page-main > .groups-wrap:first-child { padding-top: 0; }
.group { margin-bottom: 26px; break-inside: avoid; }
.g-label {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: var(--grp-accent, var(--accent));
}
.g-label::after {
  content: ''; height: 2px; width: 34px; border-radius: 2px;
  background: linear-gradient(90deg, var(--grp-accent, var(--accent)), transparent);
  transform: scaleX(0); transform-origin: left;
  animation: labelRule .7s cubic-bezier(.2, .7, .3, 1) .25s forwards;
}
@keyframes labelRule { to { transform: none; } }
.g-row { position: relative; }
.g-blurb { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.g-ic {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  color: var(--grp-accent, var(--accent)); background: color-mix(in srgb, var(--grp-accent, var(--accent)) 10%, #fff);
}
/* grouped panel: inset rows in a soft card */
.g-panel {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  border-top: 2.5px solid var(--grp-accent, var(--accent));
  padding: 2px 14px; box-shadow: 0 1px 3px rgba(12, 26, 47, .04);
  transition: transform .22s cubic-bezier(.2, .7, .3, 1), box-shadow .22s ease;
}
.g-panel:hover {
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-2px);
  box-shadow: 0 10px 26px rgba(12, 26, 47, .09);
}

/* scroll progress + back to top */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 90; height: 2.5px; width: 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff));
  transition: width .12s linear;
}
.back-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px);
  color: var(--accent); cursor: pointer; display: grid; place-items: center;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .25s, transform .25s, box-shadow .2s;
  box-shadow: 0 6px 20px rgba(12, 26, 47, .12);
}
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { box-shadow: 0 10px 28px rgba(12, 26, 47, .18); }
.g-panel::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--grp-accent, var(--accent)) 9%, transparent), transparent 70%);
  opacity: 0; transition: opacity .3s ease;
}
.g-panel:hover::before { opacity: 1; }
.g-panel .g-row { position: relative; z-index: 1; }
.g-panel .g-row { border-bottom: 1px solid var(--line); }
.g-panel .g-row:last-child { border-bottom: none; }
.g-rows { border-top: 1px solid var(--line); }
.g-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px 10px 2px; border-bottom: 1px solid var(--line);
  font-size: 14.5px; transition: background .15s, padding .18s ease;
  animation: rowIn .4s ease both; animation-delay: var(--d, 0ms);
}
@keyframes rowIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
a.g-row:hover { background: color-mix(in srgb, var(--grp-accent, var(--accent)) 5%, transparent); padding-left: 8px; box-shadow: inset 2.5px 0 0 var(--grp-accent, var(--accent)); }
.g-row:active { transform: scale(.995); }
.g-ic { transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), color .15s; }
a.g-row:hover .g-ic { transform: scale(1.1) rotate(-6deg); background: var(--grp-accent, var(--accent)); color: #fff; opacity: 1; }
.g-title { font-weight: 700; letter-spacing: -.005em; min-width: 0; }
a.g-row:hover .g-title { color: var(--grp-accent, var(--accent)); }
.g-note { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; text-align: right; }
.g-chev { flex: none; color: #b3bfd0; transition: color .15s, transform .18s ease; display: grid; place-items: center; }
.g-note + .g-chev, .g-title + .g-chev { margin-left: 0; }
.g-row:not(:has(.g-note)) .g-chev { margin-left: auto; }
a.g-row:hover .g-chev { color: var(--grp-accent, var(--accent)); transform: translateX(2px); }
.g-skel { color: var(--muted); }
.g-row.g-date { padding: 6px 2px 4px; border-bottom: none; animation: none; }
.g-date-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}

/* live feed switcher tabs */
.live-tabs { display: inline-flex; gap: 3px; margin-left: auto; background: #eceff5; border-radius: 999px; padding: 2.5px; }
.lt-tab {
  border: none; background: none; padding: 4px 11px; border-radius: 999px;
  font: inherit; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); cursor: pointer; transition: background .15s, color .15s;
}
.lt-tab:hover { color: var(--text); }
.lt-tab.active { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(12, 26, 47, .12); }

/* hero illustration watermark */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.hero-illus {
  position: absolute; right: 8%; top: 50%; transform: translateY(-50%);
  width: 130px; height: 130px; background: center / contain no-repeat;
  opacity: .16; pointer-events: none;
}
.hero-inner { position: relative; }

/* live group rows */
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #3ecf8e;
  box-shadow: 0 0 0 0 rgba(62, 207, 142, .5); animation: livePulse 2.2s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 207, 142, .5); }
  70% { box-shadow: 0 0 0 7px rgba(62, 207, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); }
}
.g-rank {
  flex: none; display: grid; place-items: center; min-width: 26px; height: 20px; padding: 0 6px;
  border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .03em;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, #fff);
}

/* desktop: two columns of groups; live and embed span both */
.page-main.cols-1 .groups-wrap { columns: 1 !important; max-width: 780px; margin: 0 auto; }
@media (min-width: 861px) {
  .groups-wrap { columns: 2; column-gap: 56px; }
  .groups-wrap > .hero,
  .groups-wrap > .today-panel,
  .groups-wrap > .group.live-group,
  .groups-wrap > .group:has(.embed-frame) { column-span: all; }
}

/* ── Prose / divider / embed ────────────────────────────── */
.prose { max-width: 68ch; font-size: 14.5px; line-height: 1.7; }
.prose p { margin: 0 0 .9em; }
.divider { border: none; border-top: 1px solid var(--line); margin: 6px 0 26px; }
.embed-frame { width: 100%; border: 0; border-radius: 12px; display: block; background: #fff; box-shadow: 0 4px 16px rgba(10, 30, 60, .08); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 16px; }
.footer-brand { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.footer-brand .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
.footer-brand .brand-mark svg { width: 16px; height: 16px; }
.footer-admin { font-size: 12px; font-weight: 700; color: var(--muted); padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); transition: color .15s, border-color .15s; }
.footer-admin:hover { color: var(--text); border-color: var(--accent); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .groups-wrap { columns: 1; }
  .brand-text small { display: none; }
  .g-note { max-width: 45%; }
}
@media (max-width: 560px) {
  .g-row { padding: 9px 4px 9px 2px; font-size: 14px; }
  .hero-inner { padding: 28px 22px 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .g-row, .group.rv, .group.rv.in { animation: none; transition: none; opacity: 1; transform: none; }
  .hero-kicker, .hero h1, .hero p { animation: none; opacity: 1; transform: none; }
  .live-dot { animation: none; }
  .g-label::after { animation: none; transform: none; }
}
