:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-alt: #edf2ef;
  --surface-strong: #17211f;
  --ink: #111416;
  --muted: #5f6872;
  --soft: #87909a;
  --line: #d8ded9;
  --line-strong: #222a2f;
  --green: #0f6b57;
  --blue: #265f9f;
  --red: #a53f45;
  --amber: #946100;
  --violet: #67518e;
  --shadow: 0 16px 34px rgba(17, 20, 22, 0.08);
  --max: 1260px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(rgba(17, 20, 22, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 20, 22, 0.032) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(38, 95, 159, 0.45);
  outline-offset: 2px;
}

button,
input,
select {
  font: inherit;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

p {
  line-height: 1.6;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(178px, auto) minmax(320px, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 68px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 250, 0.94);
  backdrop-filter: blur(14px);
}

.brand,
.nav,
.header-actions,
.hero-actions,
.lead-links,
.story-links,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-strong);
  color: #fff;
  font-size: 19px;
  font-weight: 900;
}

.brand-copy strong,
.brand-copy small {
  display: block;
  line-height: 1.1;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  justify-content: center;
  gap: 4px;
}

.nav a,
.header-actions a,
.button,
.lead-links a,
.story-links a,
.community-links a,
.footer a {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.nav a {
  min-height: 38px;
  padding: 9px 11px;
  color: var(--muted);
  font-size: 14px;
}

.header-actions {
  justify-content: flex-end;
  gap: 8px;
}

.header-actions a,
.button,
.lead-links a,
.story-links a,
.footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 13px;
  font-size: 14px;
  font-weight: 750;
}

.nav a:hover,
.header-actions a:hover,
.button:hover,
.lead-links a:hover,
.story-links a:hover,
.community-links a:hover,
.footer a:hover {
  border-color: var(--line-strong);
  background: #fff;
  transform: translateY(-1px);
}

main,
.footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.72fr);
  gap: clamp(20px, 4vw, 42px);
  align-items: stretch;
  padding: clamp(32px, 6vw, 70px) 0 18px;
}

.hero-copy {
  display: grid;
  align-content: center;
  min-height: 430px;
}

.kicker,
.section-label,
label span {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 880px;
  margin-bottom: 18px;
  font-size: clamp(40px, 6.2vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lede {
  max-width: 690px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.58;
}

.hero-actions {
  gap: 10px;
}

.button.primary {
  border-color: var(--surface-strong);
  background: var(--surface-strong);
  color: #fff;
}

.lead-card,
.signal-panel,
.story,
.essay-card,
.project-card,
.route-grid article,
.community-links a,
.main-article,
.sidebar-block,
.static-content-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.lead-card {
  display: grid;
  align-content: start;
  min-height: 430px;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--shadow);
}

.panel-head,
.feed-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.panel-head {
  margin-bottom: 18px;
}

#live-clock,
.feed-head span {
  color: var(--muted);
  font-size: 13px;
}

.story-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.lead-card h2 {
  margin: 18px 0 14px;
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
}

.trend {
  margin: 0;
  color: var(--muted);
}

.lead-links,
.story-links {
  gap: 8px;
  margin-top: 18px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 22px;
}

.stat {
  min-height: 98px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(17, 20, 22, 0.045);
}

.stat span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  font-size: 32px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.route-map,
.pipeline,
.section-band,
.community-band,
.about-band {
  border-top: 2px solid var(--line-strong);
  padding: 34px 0 44px;
}

.route-map {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
  gap: 28px;
  align-items: start;
}

.section-intro {
  max-width: 720px;
}

.section-intro h2,
.pipeline h2,
.tool-band h2,
.feed-head h2,
.signal-panel h2,
.community-band h2,
.about-band h2 {
  margin-bottom: 10px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-intro p,
.route-grid p,
.pipeline-steps span,
.essay-card p,
.project-card p,
.community-links span,
.about-copy p {
  color: var(--muted);
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.route-grid article {
  min-height: 176px;
  padding: 16px;
}

.route-grid span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--surface-alt);
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 850;
}

.route-grid h3,
.essay-card h3,
.project-card h3 {
  margin: 12px 0 8px;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0;
}

.pipeline {
  display: grid;
  grid-template-columns: minmax(240px, 0.3fr) minmax(0, 0.7fr);
  gap: 28px;
  align-items: start;
}

.pipeline-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: pipeline;
}

.pipeline-steps li {
  counter-increment: pipeline;
  display: grid;
  grid-template-columns: 56px minmax(110px, 0.22fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--surface);
}

.pipeline-steps li::before {
  content: counter(pipeline, decimal-leading-zero);
  display: grid;
  min-height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-strong);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.pipeline-steps strong {
  font-size: 16px;
}

.tool-band {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 0.68fr);
  gap: 18px;
  align-items: end;
  border-top: 2px solid var(--line-strong);
  padding: 34px 0 16px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) minmax(160px, 220px);
  gap: 10px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

input {
  padding: 0 12px;
}

select {
  padding: 0 34px 0 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(250px, 328px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-bottom: 48px;
}

.signal-panel {
  position: sticky;
  top: 84px;
  padding: 16px;
}

#result-count {
  min-width: 42px;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--surface-strong);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.signal-bars {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.signal-bar {
  display: grid;
  gap: 6px;
}

.signal-bar div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-alt);
}

.signal-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.signal-bar span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.signal-list {
  display: grid;
  gap: 8px;
}

.signal {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.signal strong {
  color: var(--ink);
}

.feed {
  min-width: 0;
}

.feed-head {
  margin-bottom: 12px;
}

.stories {
  display: grid;
  gap: 12px;
}

.story {
  display: grid;
  gap: 12px;
  min-height: 206px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(17, 20, 22, 0.045);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.pill.domain,
.pill.domain.research {
  background: rgba(15, 107, 87, 0.1);
  color: var(--green);
}

.pill.domain.coding {
  background: rgba(38, 95, 159, 0.1);
  color: var(--blue);
}

.pill.domain.safety {
  background: rgba(148, 97, 0, 0.12);
  color: var(--amber);
}

.pill.domain.business {
  background: rgba(165, 63, 69, 0.1);
  color: var(--red);
}

.pill.domain.multimodal {
  background: rgba(103, 81, 142, 0.11);
  color: var(--violet);
}

.pill.vendor {
  background: rgba(38, 95, 159, 0.1);
  color: var(--blue);
}

.pill.date {
  color: var(--amber);
}

.story h3 {
  margin: 0;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.22;
  letter-spacing: 0;
}

.story h3 a:hover,
.essay-card h3 a:hover,
.project-card h3 a:hover {
  color: var(--green);
}

.essay-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.essay-card,
.project-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 230px;
  padding: 16px;
}

.tag-row {
  gap: 6px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.status-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.community-band,
.about-band {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 0.66fr);
  gap: 24px;
}

.about-identity {
  display: grid;
  align-content: start;
  gap: 14px;
}

.about-identity img,
.profile-hero img {
  display: block;
  width: min(100%, 220px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  background: var(--surface-alt);
  box-shadow: 0 12px 26px rgba(17, 20, 22, 0.08);
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 34px);
  align-items: center;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}

.profile-hero img {
  width: min(100%, 260px);
}

.community-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.community-links a {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 146px;
  padding: 16px;
}

.community-links strong {
  font-size: 19px;
}

.community-links span {
  line-height: 1.55;
}

.about-copy p {
  margin-bottom: 14px;
  font-size: 18px;
}

.footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 18px 0 34px;
  color: var(--muted);
  font-size: 14px;
}

.footer span:first-child {
  color: var(--ink);
  font-weight: 850;
}

.empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  color: var(--muted);
}

.editorial-page main {
  padding: clamp(20px, 4vw, 44px) 0;
}

.article-container {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 24px;
  align-items: start;
}

.back-link {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  align-self: start;
  min-height: 44px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.main-article {
  padding: clamp(20px, 5vw, 42px);
  box-shadow: var(--shadow);
}

.article-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.article-header h1 {
  margin-top: 14px;
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.article-body {
  max-width: 74ch;
  font-size: 17px;
  line-height: 1.68;
}

.article-body h2,
.article-body h3 {
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.25;
}

.article-body h2 {
  font-size: 26px;
}

.article-body h3 {
  font-size: 21px;
}

.article-body ul,
.article-body ol {
  margin-top: 0;
  margin-bottom: 1.5em;
  padding-left: 20px;
}

.article-body li {
  margin-bottom: 0.5em;
}

.article-sources {
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding-top: 24px;
}

.article-sources a {
  color: var(--blue);
  text-decoration: underline;
}

.article-sidebar {
  display: grid;
  gap: 20px;
}

.sidebar-block,
.static-content-block {
  grid-column: 1 / -1;
  padding: 20px;
  box-shadow: var(--shadow);
}

@media (max-width: 1080px) {
  .topbar,
  .hero,
  .route-map,
  .pipeline,
  .tool-band,
  .content-grid,
  .community-band,
  .about-band,
  .article-container {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .lead-card {
    min-height: auto;
  }

  .nav,
  .header-actions {
    justify-content: flex-start;
  }

  .signal-panel {
    position: static;
  }

  .essay-grid,
  .project-grid,
  .community-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  main,
  .footer {
    width: min(100% - 24px, var(--max));
  }

  .topbar {
    position: static;
    padding-inline: 12px;
  }

  .nav {
    overflow-x: visible;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .nav a {
    white-space: nowrap;
  }

  h1 {
    font-size: 40px;
    line-height: 1.02;
  }

  .stats,
  .route-grid,
  .controls,
  .essay-grid,
  .project-grid,
  .community-links {
    grid-template-columns: 1fr;
  }

  .about-identity img,
  .profile-hero img {
    width: min(100%, 190px);
  }

  .pipeline-steps li {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .pipeline-steps span {
    grid-column: 2;
  }

  .feed-head,
  .panel-head,
  .footer {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
