/* Continuum Local security and architecture page. Namespaced .ctl- */

.ctl {
  --ctl-brand: var(--brand-continuum);
  --ctl-mono:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  background: var(--bg);
  color: var(--fg);
}

.ctl code {
  font-family: var(--ctl-mono);
  font-size: 0.9em;
  padding: 1px 5px;
  border: 1px solid var(--border-muted);
  border-radius: 4px;
  background: var(--chip-bg);
  overflow-wrap: anywhere;
}

.ctl a {
  color: var(--accent);
}
.ctl a:hover {
  text-decoration: underline;
}

.ctl-sec-inner,
.ctl-hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Hero */

.ctl-hero {
  padding: 92px 0 0;
  background:
    radial-gradient(
      900px 420px at 50% -140px,
      color-mix(in oklab, var(--ctl-brand) 16%, transparent),
      transparent 72%
    ),
    var(--bg);
}
.ctl-hero-inner {
  max-width: 860px;
  text-align: center;
  padding-bottom: 44px;
}
.ctl-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 16px 6px 6px;
  border: 1px solid color-mix(in oklab, var(--ctl-brand) 34%, var(--border));
  border-radius: 999px;
  background: color-mix(in oklab, var(--ctl-brand) 9%, transparent);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg);
}
.ctl-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--ctl-brand) 20%, transparent);
  color: var(--ctl-brand);
}
.ctl-mark svg {
  width: 18px;
  height: 18px;
}
.ctl-hero h1 {
  margin: 22px 0 0;
  font-size: clamp(32px, 5.2vw, 52px);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.08;
  text-wrap: balance;
}
.ctl-lede {
  margin: 22px auto 0;
  max-width: 680px;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--fg-muted);
}
.ctl-plan {
  display: inline-block;
  margin: 22px 0 0;
  padding: 5px 12px;
  border: 1px solid var(--border-muted);
  border-radius: 999px;
  background: var(--chip-bg);
  font-family: var(--ctl-mono);
  font-size: 11.5px;
  color: var(--fg-subtle);
}

.ctl-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}
.ctl a.ctl-btn,
.ctl-btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--fg);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
}
.ctl a.ctl-btn:hover {
  border-color: var(--fg-subtle);
  text-decoration: none;
}
.ctl a.ctl-btn--go {
  border-color: transparent;
  background: var(--accent-deep);
  color: #fff;
}
.ctl a.ctl-btn--go:hover {
  background: var(--accent-emph);
  border-color: transparent;
}

/* On this page */

.ctl-toc {
  border-top: 1px solid var(--border-muted);
  border-bottom: 1px solid var(--border-muted);
  background: var(--bg-subtle);
}
.ctl-toc ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 28px;
  list-style: none;
}
.ctl-toc a {
  font-size: 13.5px;
  color: var(--fg-muted);
}
.ctl-toc a:hover {
  color: var(--fg);
}

/* Sections */

.ctl-sec {
  padding: 80px 0;
  border-top: 1px solid var(--border-muted);
  scroll-margin-top: calc(var(--marketing-nav-h, 72px) + 8px);
}
.ctl-toc + .ctl-sec {
  border-top: 0;
}
.ctl-sec--alt {
  background: var(--bg-subtle);
}
.ctl-faq {
  scroll-margin-top: calc(var(--marketing-nav-h, 72px) + 8px);
}

.ctl-kicker {
  margin: 0 0 14px;
  font-family: var(--ctl-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ctl-brand);
}
.ctl-sec-inner > h2 {
  margin: 0;
  max-width: 28ch;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.16;
}
.ctl-sub {
  margin: 16px 0 0;
  max-width: 70ch;
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-muted);
}
.ctl-p {
  margin: 18px 0 0;
  max-width: 76ch;
  font-size: 15px;
  line-height: 1.72;
  color: var(--fg-muted);
}
.ctl-p--small {
  font-size: 14px;
}
.ctl-h3 {
  margin: 44px 0 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ctl-steps,
.ctl-list {
  max-width: 76ch;
  margin: 16px 0 0;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.72;
  color: var(--fg-muted);
}
.ctl-steps li,
.ctl-list li {
  margin-top: 8px;
}
.ctl-steps li::marker {
  color: var(--ctl-brand);
  font-weight: 600;
}

/* Architecture figure */

.ctl-arch {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 150px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin: 40px 0 0;
}
.ctl-zone {
  min-width: 0;
  padding: 20px;
  border: 1px dashed color-mix(in oklab, var(--ctl-brand) 40%, var(--border));
  border-radius: 12px;
  background: var(--bg);
}
.ctl-zone--bp {
  border-style: solid;
  border-color: var(--border);
}
.ctl-zone-t {
  margin: 0 0 14px;
  font-family: var(--ctl-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.ctl-node {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-subtle);
  font-size: 14px;
}
.ctl-node span {
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.5;
}
.ctl-node code {
  align-self: flex-start;
}
.ctl-node--agent {
  border-color: color-mix(in oklab, var(--ctl-brand) 45%, var(--border));
  background: color-mix(in oklab, var(--ctl-brand) 8%, var(--bg-subtle));
}
.ctl-targets {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.ctl-targets li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: 22px;
  padding: 10px 14px;
  border: 1px solid var(--border-muted);
  border-radius: 8px;
  font-size: 13.5px;
  position: relative;
}
.ctl-targets li::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--ctl-brand);
  border-bottom: 2px solid var(--ctl-brand);
  transform: translateY(-70%);
}
.ctl-targets span {
  color: var(--fg-muted);
  font-size: 12.5px;
}
.ctl-zone-note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-muted);
}
.ctl-wire {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.ctl-wire-line {
  position: relative;
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ctl-brand);
}
.ctl-wire-line::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -5px;
  border-left: 10px solid var(--ctl-brand);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.ctl-wire-label {
  font-family: var(--ctl-mono);
  font-size: 11.5px;
  color: var(--fg-muted);
}
.ctl-arch figcaption {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  max-width: 76ch;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--fg-subtle);
}

/* Enforcement cards */

.ctl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.ctl-grid li {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
/* A last card alone on its row spans it, at two columns or three. */
.ctl-grid li:last-child:nth-child(3n + 1) {
  grid-column: 1 / -1;
}
.ctl-grid h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}
.ctl-grid p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--fg-muted);
}
.ctl-note {
  margin: 22px 0 0;
  max-width: 80ch;
  padding: 14px 18px;
  border-left: 3px solid var(--ctl-brand);
  border-radius: 0 8px 8px 0;
  background: color-mix(in oklab, var(--ctl-brand) 7%, var(--bg));
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--fg);
}

/* Tables */

.ctl-table {
  width: 100%;
  margin: 32px 0 0;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
}
.ctl-table th,
.ctl-table td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--border-muted);
  text-align: left;
  vertical-align: top;
}
.ctl-table thead th {
  padding-top: 0;
  font-family: var(--ctl-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  border-bottom-color: var(--border);
}
.ctl-table tbody th {
  font-weight: 600;
  color: var(--fg);
}
.ctl-table td {
  color: var(--fg-muted);
}
.ctl-table--net td:first-child {
  white-space: nowrap;
}
.ctl-table--data tbody th {
  width: 30%;
}

.ctl-ports {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px 24px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.ctl-ports li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-muted);
  font-size: 14px;
}

.ctl-pre {
  margin: 12px 0 0;
  max-width: 100%;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
}
.ctl-pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* Guide tiles */

.ctl-docs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.ctl-docs a {
  display: block;
  height: 100%;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.15s;
}
.ctl-docs a:hover {
  border-color: var(--ctl-brand);
  text-decoration: none;
}
.ctl-docs h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.ctl-docs p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-muted);
}

/* FAQ */

.ctl-faq {
  padding: 80px 0;
  border-top: 1px solid var(--border-muted);
}
.ctl-faq-list {
  margin: 36px 0 0;
  border-top: 1px solid var(--border-muted);
}
.ctl-faq details {
  border-bottom: 1px solid var(--border-muted);
}
.ctl-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 2px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--fg);
  cursor: pointer;
  list-style: none;
}
.ctl-faq summary::-webkit-details-marker {
  display: none;
}
.ctl-faq summary:hover {
  color: var(--ctl-brand);
}
.ctl-faq summary:focus-visible {
  outline: 2px solid var(--ctl-brand);
  outline-offset: 3px;
  border-radius: 4px;
}
.ctl-faq-chev {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--fg-subtle);
  transition: transform 0.2s ease;
}
.ctl-faq details[open] .ctl-faq-chev {
  transform: rotate(180deg);
}
.ctl-faq details p {
  margin: 0;
  padding: 0 60px 24px 2px;
  max-width: 76ch;
  font-size: 15px;
  line-height: 1.72;
  color: var(--fg-muted);
}

/* Closing call to action */

.ctl-end {
  padding: 88px 0 96px;
  border-top: 1px solid var(--border-muted);
  text-align: center;
  background: radial-gradient(
    760px 300px at 50% 120%,
    color-mix(in oklab, var(--ctl-brand) 13%, transparent),
    transparent 70%
  );
}
.ctl-end h2 {
  margin: 0 auto;
  max-width: 34ch;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

/* Narrow viewports */

@media (max-width: 900px) {
  .ctl-arch {
    grid-template-columns: minmax(0, 1fr);
  }
  .ctl-wire {
    flex-direction: row;
    justify-content: center;
  }
  .ctl-wire-line {
    width: 2px;
    height: 36px;
  }
  .ctl-wire-line::after {
    right: -5px;
    top: auto;
    bottom: -2px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid var(--ctl-brand);
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .ctl-sec-inner,
  .ctl-hero-inner {
    padding: 0 16px;
  }
  .ctl-toc ul {
    padding: 12px 16px;
    justify-content: flex-start;
  }
  .ctl-hero {
    padding-top: 64px;
  }
  .ctl-hero-inner {
    padding-bottom: 32px;
  }
  .ctl-sec,
  .ctl-faq {
    padding: 56px 0;
  }
  .ctl-end {
    padding: 64px 0 72px;
  }

  .ctl-table,
  .ctl-table tbody,
  .ctl-table tr,
  .ctl-table th,
  .ctl-table td {
    display: block;
    width: auto;
  }
  .ctl-table thead {
    display: none;
  }
  .ctl-table tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-muted);
  }
  .ctl-table th,
  .ctl-table td {
    padding: 4px 0;
    border: 0;
  }
  .ctl-table--data tbody th {
    width: auto;
  }
  .ctl-table--net td:first-child {
    white-space: normal;
  }
  .ctl-table [data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--ctl-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-subtle);
  }

  .ctl-faq summary {
    font-size: 15px;
    padding: 17px 2px;
  }
  .ctl-faq details p {
    padding-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ctl-faq-chev,
  .ctl-docs a {
    transition: none;
  }
}
