/* Public site (overview and downloads): the same surface, text, accent, radius, and type tokens as the app. */
* {
  box-sizing: border-box;
}
html {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-size: var(--text-md);
  line-height: 1.5;
}
button {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
::selection {
  background: var(--accent-soft);
}
h1,
h2,
h3,
p {
  margin: 0;
  text-wrap: pretty;
}
code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 1px 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-fg);
}
.skip-link:focus {
  top: 12px;
}

/* Header and footer span the window; their contents share the page column. */
.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 32px;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
/* The Circle logo followed by the product name, as in the app
   (web/app/src/components/logo.tsx). The logo file matches the theme. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark-muted {
  color: var(--fg-muted);
}
.logo {
  height: 26px;
  width: auto;
  flex: none;
}
.logo-dark,
[data-theme="dark"] .logo-light {
  display: none;
}
[data-theme="dark"] .logo-dark {
  display: block;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  padding: 6px 10px;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}
.nav a:hover {
  color: var(--fg);
  background: var(--bg-subtle);
}
.nav a[aria-current="page"] {
  color: var(--fg);
}
.icon-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}
.icon-button:hover {
  background: var(--bg-subtle);
  color: var(--fg);
}
.icon-button svg {
  width: 16px;
  height: 16px;
}
.moon-icon {
  display: none;
}
[data-theme="dark"] .sun-icon {
  display: none;
}
[data-theme="dark"] .moon-icon {
  display: block;
}

main {
  flex: 1;
  padding-block: 56px 72px;
}
/* The overview page's sections span the window, so it pads them itself. */
main:not(.container) {
  padding-block: 0;
}

/* Overview page */
.hero {
  padding-block: 80px 72px;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}
.hero-kicker {
  margin-bottom: 18px;
  color: var(--fg-muted);
  font-size: var(--text-sm);
  font-weight: 600;
}
.beta-label { margin-left: 8px; color: var(--status-warning-fg); }
.eyebrow-beta {
  border-color: transparent;
  background: var(--status-warning-soft);
  color: var(--status-warning-fg);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.beta-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 620px;
  margin-top: 14px;
  color: var(--fg-muted);
  font-size: var(--text-base);
}
.eyebrow {
  display: inline-block;
  width: fit-content;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 68px);
  font-weight: 680;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.hero .lede {
  max-width: 460px;
  margin-top: 20px;
  font-size: var(--text-lg);
}

/* The hero's example status board. Status is never colour alone: every
   badge carries its word. */
.board {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.board-title {
  font-size: var(--text-sm);
  font-weight: 600;
}
.board-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.board-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.board-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}
.board-name {
  font-weight: 600;
}
.board-kind {
  margin-left: 8px;
  color: var(--fg-subtle);
  font-size: var(--text-xs);
  font-weight: 400;
}
.board-detail {
  grid-column: 1;
  color: var(--fg-muted);
  font-size: var(--text-xs);
}
.board-row .badge {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.board-note {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  background: var(--status-critical-soft);
  color: var(--fg);
  font-size: var(--text-xs);
}
.board figcaption {
  padding: 8px 16px;
  color: var(--fg-subtle);
  font-size: var(--text-2xs);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-ok {
  background: var(--status-ok-soft);
  color: var(--status-ok-fg);
}
.badge-warning {
  background: var(--status-warning-soft);
  color: var(--status-warning-fg);
}
.badge-critical {
  background: var(--status-critical-soft);
  color: var(--status-critical-fg);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 550;
  transition: background var(--motion-fast) var(--ease-standard);
}
.button:hover {
  background: var(--bg-subtle);
}
.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.button-primary:hover {
  background: var(--accent);
  filter: brightness(1.08);
}
.band {
  padding-block: 64px;
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.section {
  padding-block: 64px;
}
.band-title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 650;
  letter-spacing: -0.02em;
}
.band-lede {
  max-width: 640px;
  margin-top: 10px;
  color: var(--fg-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.band .steps,
.section .steps {
  margin-top: 28px;
}
.band-note {
  margin-top: 24px;
  color: var(--fg-muted);
  font-size: var(--text-base);
}
.band-note strong {
  color: var(--fg);
  font-weight: 600;
}
.band .steps > li::before {
  background: var(--bg);
}

/* How it works: the diagram scrolls sideways on narrow screens instead of
   shrinking its labels below a readable size. */
.diagram {
  margin-top: 28px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}
.diagram svg {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
  padding: 16px;
  font-family: var(--font-sans);
}
.d-zone {
  fill: var(--bg-subtle);
  stroke: var(--border);
  stroke-dasharray: 4 4;
}
.d-zone-label {
  fill: var(--fg-subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.d-box {
  fill: var(--surface);
  stroke: var(--border-strong);
}
.d-server {
  stroke: var(--accent);
  stroke-width: 1.5;
}
.d-accent-box {
  stroke: var(--accent);
}
.d-title {
  fill: var(--fg);
  font-size: 14px;
  font-weight: 600;
}
.d-node {
  fill: var(--fg);
  font-size: 13px;
  font-weight: 500;
}
.d-small {
  fill: var(--fg);
  font-size: 12px;
}
.d-sub {
  fill: var(--fg-muted);
  font-size: 12px;
}
.d-edge {
  fill: var(--accent);
  font-size: 11px;
  font-weight: 600;
}
.d-line {
  fill: none;
  stroke: var(--fg-subtle);
  stroke-width: 1.4;
}
.d-line.d-accent {
  stroke: var(--accent);
}
.d-arrow {
  fill: context-stroke;
}

.points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--fg-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.points strong {
  display: block;
  margin-bottom: 4px;
  color: var(--fg);
  font-size: var(--text-base);
  font-weight: 600;
}

/* A product showcase here gives the security inventory below its own rhythm. */
.capabilities-header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
  gap: 24px;
  align-items: end;
}
.capabilities-header .band-title {
  font-size: clamp(28px, 3.5vw, 36px);
}
.capabilities-header p {
  max-width: 580px;
  color: var(--fg-muted);
  font-size: var(--text-lg);
  line-height: 1.5;
}
.capability-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  margin-top: 36px;
  padding: 36px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}
.capability-kind {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 600;
}
.capability-lead h3 {
  margin-top: 12px;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.capability-lead p {
  max-width: 480px;
  margin-top: 16px;
  color: var(--fg-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.coverage {
  border-top: 1px solid var(--border-strong);
}
.coverage-row {
  display: grid;
  grid-template-columns: minmax(105px, 0.6fr) minmax(0, 1fr);
  gap: 16px;
  padding-block: 14px;
  border-bottom: 1px solid var(--border);
}
.coverage-row span {
  color: var(--fg-muted);
  font-size: var(--text-base);
}
.coverage-row strong {
  font-size: var(--text-base);
  font-weight: 600;
}
.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 48px;
  margin-top: 42px;
}
.capability-tile {
  padding-top: 20px;
  border-top: 1px solid var(--border-strong);
}
.capability-tile h3 {
  margin-top: 10px;
  font-size: var(--text-xl);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.capability-tile p {
  margin-top: 12px;
  color: var(--fg-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}

.detail-list {
  margin-top: 32px;
  border-top: 1px solid var(--border-strong);
}
.detail-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
  gap: 24px;
  padding-block: 23px;
  border-bottom: 1px solid var(--border);
}
.detail-row h3 {
  font-size: var(--text-md);
  font-weight: 650;
}
.detail-row p {
  max-width: 690px;
  color: var(--fg-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
/* Download page */
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.jump a {
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--fg-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}
.jump a:hover {
  color: var(--fg);
  background: var(--bg-subtle);
}
.part-title {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: clamp(22px, 3vw, 26px);
  font-weight: 650;
  letter-spacing: -0.02em;
  scroll-margin-top: 16px;
}
.part-lede {
  max-width: 680px;
  margin: 8px 0 28px;
  color: var(--fg-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.part-note {
  max-width: 680px;
  margin: -8px 0 16px;
  color: var(--fg-muted);
  font-size: var(--text-md);
}
.part-note strong {
  color: var(--fg);
  font-weight: 600;
}
.requirements {
  max-width: 680px;
  margin: 0 0 28px;
  padding-left: 20px;
  color: var(--fg-muted);
  font-size: var(--text-md);
  line-height: 1.7;
}
.cards.cards-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card-links .command {
  min-width: 0;
}
.more {
  margin-top: 16px;
  font-size: var(--text-sm);
}
.more summary {
  width: fit-content;
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
}
.more p {
  max-width: 680px;
  margin-top: 10px;
  color: var(--fg-muted);
}
.install > .section-title {
  margin-top: 12px;
}
.footer-links {
  display: flex;
  gap: 16px;
}
.footer a:hover {
  color: var(--fg);
}
.footer-inner > span:first-child a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.intro {
  max-width: 640px;
}
.intro h1 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.lede {
  margin-top: 12px;
  color: var(--fg-muted);
  font-size: var(--text-md);
  line-height: 1.6;
}
.release-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--fg-muted);
  font-size: var(--text-sm);
}
.release-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg-subtle);
}
.release-meta.ready .release-dot {
  background: var(--status-ok);
}

.downloads,
.install {
  margin-top: 48px;
}
.section-title {
  margin-bottom: 16px;
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-icon {
  display: grid;
  place-items: center;
  color: var(--fg-muted);
}
.card-icon svg {
  width: 20px;
  height: 20px;
}
.card h3 {
  font-size: var(--text-md);
  font-weight: 600;
}
.card-description {
  margin: 6px 0 16px;
  color: var(--fg-muted);
  font-size: var(--text-md);
}
.card-links {
  display: grid;
  gap: 8px;
}
.download-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background var(--motion-fast) var(--ease-standard);
}
.download-link:hover {
  background: var(--bg-subtle);
}
.download-link svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--fg-muted);
}
.download-link .size {
  margin-left: auto;
  color: var(--fg-subtle);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--fg-subtle);
  font-size: var(--text-sm);
}
.integrity {
  margin-top: 14px;
  color: var(--fg-muted);
  font-size: var(--text-sm);
}
.integrity a,
.steps a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps > li {
  position: relative;
  padding: 0 0 28px 40px;
  counter-increment: step;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--fg-muted);
  font-size: var(--text-xs);
  font-weight: 600;
}
.steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 28px;
  bottom: 4px;
  width: 1px;
  background: var(--border);
}
.steps h3 {
  font-size: var(--text-base);
  font-weight: 600;
}
.steps p {
  margin-top: 4px;
  max-width: 680px;
  color: var(--fg-muted);
  font-size: var(--text-md);
}
.steps strong {
  color: var(--fg);
  font-weight: 600;
}
code.placeholder,
.command .placeholder {
  color: var(--accent);
}

.install-panel {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
}
.tabs button {
  padding: 10px 8px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--fg-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.tabs button:hover {
  color: var(--fg);
}
.tabs button[aria-selected="true"] {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
.install-body {
  padding: 16px;
}
.variants {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.variants button {
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--fg-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
}
.variants button:hover {
  color: var(--fg);
}
.variants button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--fg);
}
.command {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.command-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px 6px 14px;
  border-bottom: 1px solid var(--border);
}
.shell-label {
  color: var(--fg-subtle);
  font-size: var(--text-xs);
}
.command pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}
.command pre code {
  padding: 0;
  background: none;
  border: 0;
  font-size: inherit;
}
p code {
  white-space: normal;
  overflow-wrap: anywhere;
}
.copy-button {
  flex: none;
  padding: 3px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  font-size: var(--text-xs);
  cursor: pointer;
}
.copy-button:hover {
  color: var(--fg);
}
.install-note {
  margin-top: 10px;
  color: var(--fg-muted);
  font-size: var(--text-base);
}

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  color: var(--fg-subtle);
  font-size: var(--text-xs);
}

@media (max-width: 860px) {
  .cards,
  .cards.cards-two,
  .points {
    grid-template-columns: 1fr;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
@media (max-width: 700px) {
  .capabilities-header,
  .capability-lead,
  .capability-grid {
    grid-template-columns: 1fr;
  }
  .capabilities-header {
    gap: 8px;
  }
  .capability-lead {
    gap: 24px;
    padding: 24px;
  }
  .capability-grid {
    gap: 32px;
  }
}
@media (max-width: 520px) {
  .container {
    padding-inline: 16px;
  }
  .footer-inner,
  .footer-links {
    flex-wrap: wrap;
  }
  .topbar-inner {
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
    padding-block: 12px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .hero {
    padding-block: 48px 44px;
  }
  .detail-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-block: 18px;
  }
  .band,
  .section {
    padding-block: 44px;
  }
  .nav a {
    padding: 6px 8px;
  }
  .header-actions {
    gap: 8px;
  }
  .wordmark {
    font-size: var(--text-md);
  }
  main {
    padding-block: 40px 56px;
  }
  .steps > li {
    padding-left: 0;
  }
  .steps > li::before {
    position: static;
    margin-bottom: 8px;
  }
  .steps > li::after {
    display: none;
  }
  .install-body {
    padding: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Long values (a key fingerprint) wrap on narrow screens instead of
   widening the page. */
.integrity code {
  white-space: normal;
  overflow-wrap: anywhere;
}
