/* Sextant — site styles */

:root {
  --bg: #0b0b0a;
  --bg-1: #10100f;
  --bg-2: #151513;
  --bg-3: #1c1b19;
  --line: rgba(237, 233, 224, 0.08);
  --line-2: rgba(237, 233, 224, 0.14);
  --line-3: rgba(237, 233, 224, 0.22);
  --ink: #ede9e0;
  --ink-2: #b9b4a9;
  --ink-3: #8b877e;
  --ink-4: #615e58;
  --brass: #d4a24c;
  --brass-2: #e6bd73;
  --brass-dim: rgba(212, 162, 76, 0.13);
  --pass: #8dbd8f;
  --pass-dim: rgba(141, 189, 143, 0.12);
  --fail: #e8735b;
  --fail-dim: rgba(232, 115, 91, 0.12);
  --k-agent: #cfc9bc;
  --k-llm: #8fa9d2;
  --k-tool: #c39bc9;
  --k-retrieve: #7fb8ab;
  --k-eval: #d4a24c;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 10px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--brass); color: #14110b; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: 12px; top: -48px; padding: 8px 12px; background: var(--ink); color: var(--bg); border-radius: 6px; z-index: 100; }
.skip:focus { top: 12px; }

/* ---------- Type ---------- */

h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--ink); }
h1 { font-size: clamp(2.75rem, 1.4rem + 5.4vw, 5.6rem); line-height: 0.98; letter-spacing: -0.045em; }
h2 { font-size: clamp(2rem, 1.35rem + 2.5vw, 3.3rem); line-height: 1.04; letter-spacing: -0.035em; }
h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0; }
.lead { font-size: clamp(1.075rem, 1rem + 0.35vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 36em; letter-spacing: -0.005em; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0; }
.kicker { color: var(--ink-3); font-size: 0.9375rem; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 14px; height: 1px; background: var(--brass); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border-radius: 7px;
  background: var(--ink); color: #11110f;
  font-weight: 500; font-size: 0.9375rem; letter-spacing: -0.01em;
  border: 1px solid var(--ink);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap; cursor: pointer;
}
.btn:hover { background: #fff; border-color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-3); border-color: var(--line-3); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.875rem; }
.arrow { transition: transform 0.25s var(--ease); }
a:hover .arrow, button:hover .arrow { transform: translateX(3px); }

.link { color: var(--ink); border-bottom: 1px solid var(--line-3); transition: border-color 0.2s; }
.link:hover { border-color: var(--brass); }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 10, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { height: 64px; display: flex; align-items: center; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 560; font-size: 1.1875rem; letter-spacing: -0.035em; }
.brand svg { width: 24px; height: 24px; flex: none; }
.nav-links { display: flex; gap: 28px; margin-right: auto; }
.nav-links a { color: var(--ink-3); font-size: 0.9375rem; transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links .nav-cta { display: none; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin: -8px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--ink); transition: transform 0.3s var(--ease); }
.nav-toggle span + span { margin-top: 6px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-in { gap: 0; justify-content: space-between; }
  .nav-in > .btn { display: none; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0; height: calc(100vh - 64px); height: calc(100dvh - 64px);
    flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { font-size: 1.375rem; color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--line); letter-spacing: -0.02em; }
  .nav-links .nav-cta { display: inline-flex; justify-content: center; margin-top: 20px; border-bottom: 0; font-size: 1rem; color: #11110f; padding: 0; }
}

/* ---------- Sections ---------- */

section { position: relative; }
.section { padding: clamp(80px, 9.5vw, 144px) 0; }
.section-tight { padding: clamp(64px, 8vw, 112px) 0; }
.rule { border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head h2 + .lead { margin-top: 20px; }

/* ---------- App window (shared by product UIs) ---------- */

.window {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 40px 120px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.window-bar {
  display: flex; align-items: center; gap: 14px;
  height: 44px; padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 0.8125rem; color: var(--ink-3);
  min-width: 0;
}
.window-bar svg { width: 16px; height: 16px; flex: none; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs span { color: var(--ink-4); }
.crumbs b { font-weight: 500; color: var(--ink-2); }
.crumbs .mono { color: var(--ink); }
.window-bar .spacer { flex: 1; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 24px; padding: 0 9px;
  border-radius: 5px;
  font-family: var(--mono); font-size: 0.71875rem; letter-spacing: 0.01em;
  background: var(--bg-3); color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip.pass { color: var(--pass); background: var(--pass-dim); border-color: transparent; }
.chip.fail { color: var(--fail); background: var(--fail-dim); border-color: transparent; }
.chip.live { color: var(--brass); background: var(--brass-dim); border-color: transparent; }
.chip.live i { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

/* ---------- Trace (signature) ---------- */

.trace-stage { position: relative; z-index: 2; margin-top: clamp(48px, 5.5vw, 72px); }
.trace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); height: 568px; }
.trace-left { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); }
.trace-scale {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr) 64px;
  height: 34px; align-items: center;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-4);
}
.trace-scale > span:first-child { padding-left: 16px; }
.ticks { position: relative; height: 100%; }
.ticks span { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 5px; border-left: 1px solid var(--line); }
.trace-rows { position: relative; flex: 1; overflow: hidden; }
.playhead { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--brass); opacity: 0; pointer-events: none; z-index: 3; transition: opacity 0.4s; }
.playhead::before { content: ""; position: absolute; top: -1px; left: -3px; width: 7px; height: 7px; background: var(--brass); transform: rotate(45deg); }
.playing .playhead { opacity: 0.9; }

.span-row {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr) 64px; align-items: center;
  width: 100%; height: 44px; padding: 0; margin: 0;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  text-align: left; cursor: pointer;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), background 0.15s;
}
.span-row.shown { opacity: 1; transform: none; }
.span-row:hover { background: rgba(237, 233, 224, 0.025); }
.span-row.selected { background: rgba(237, 233, 224, 0.05); }
.span-row.selected::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--brass); }
.span-name { display: flex; align-items: center; gap: 9px; min-width: 0; padding-left: 16px; }
.span-name .tree { width: 14px; flex: none; height: 44px; position: relative; }
.span-name .tree::before { content: ""; position: absolute; left: 4px; top: 0; height: 50%; width: 8px; border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); border-bottom-left-radius: 4px; }
.span-name .tree.cont::after { content: ""; position: absolute; left: 4px; top: 50%; bottom: 0; border-left: 1px solid var(--line-2); }
.kind { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.k-agent { background: var(--k-agent); }
.k-llm { background: var(--k-llm); }
.k-tool { background: var(--k-tool); }
.k-retrieve { background: var(--k-retrieve); }
.k-eval { background: var(--k-eval); border-radius: 50%; }
.span-label { font-size: 0.875rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.span-label small { font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-4); margin-left: 8px; }
.span-flag { font-family: var(--mono); font-size: 0.65625rem; color: var(--fail); background: var(--fail-dim); padding: 1px 6px; border-radius: 4px; flex: none; opacity: 0; transition: opacity 0.3s; }
.span-row.flagged .span-flag { opacity: 1; }
.span-track { position: relative; height: 100%; }
.span-bar { position: absolute; top: 50%; height: 8px; margin-top: -4px; border-radius: 2px; min-width: 2px; width: 0; }
.span-bar.k-eval { border-radius: 2px; }
.span-row.running .span-bar { box-shadow: 0 0 0 1px rgba(212, 162, 76, 0.35); }
.span-dur { font-family: var(--mono); font-size: 0.71875rem; color: var(--ink-3); text-align: right; padding-right: 16px; }
.span-row.eval-fail .span-label { color: var(--fail); }
.span-row.eval-fail .span-bar { background: var(--fail); }

.trace-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-top: 1px solid var(--line); background: var(--bg-2);
  font-size: 0.8125rem; color: var(--ink-3); min-height: 52px;
}
.trace-foot .spacer { flex: 1; }
.replay { background: none; border: 1px solid var(--line-2); border-radius: 6px; height: 28px; padding: 0 10px; color: var(--ink-2); font-size: 0.8125rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.replay:hover { border-color: var(--line-3); color: var(--ink); }
.replay svg { width: 12px; height: 12px; }

.detail { overflow-y: auto; min-width: 0; padding: 20px 20px 28px; scrollbar-width: thin; scrollbar-color: var(--bg-3) transparent; }
.detail-head { display: flex; align-items: center; gap: 10px; }
.detail-head h3 { font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.015em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-kind { font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-3); margin-top: 4px; }
.detail-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 18px 0 6px; background: var(--line); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.detail-meta div { background: var(--bg-1); padding: 9px 10px; }
.detail-meta dt { font-size: 0.6875rem; color: var(--ink-4); margin: 0; }
.detail-meta dd { margin: 2px 0 0; font-family: var(--mono); font-size: 0.75rem; color: var(--ink); white-space: nowrap; }
.detail h4 { font-size: 0.75rem; font-weight: 500; color: var(--ink-3); margin: 20px 0 8px; letter-spacing: 0; }
.detail pre {
  margin: 0; padding: 12px 13px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 7px;
  font-family: var(--mono); font-size: 0.75rem; line-height: 1.65; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
}
.detail pre .k { color: var(--k-llm); }
.detail pre .s { color: var(--ink); }
.detail pre .n { color: var(--brass-2); }
.detail pre .bad { color: var(--fail); background: var(--fail-dim); border-radius: 3px; padding: 0 2px; }
.detail-verdict { margin-top: 18px; padding: 14px 14px 14px 16px; border-radius: 7px; border: 1px solid transparent; font-size: 0.875rem; line-height: 1.55; }
.detail-verdict.fail { background: var(--fail-dim); color: #f3c5b9; border-color: rgba(232, 115, 91, 0.25); }
.detail-verdict.pass { background: var(--pass-dim); color: #cfe6d0; border-color: rgba(141, 189, 143, 0.2); }
.detail-verdict b { font-weight: 500; color: var(--ink); display: block; margin-bottom: 4px; }
.detail-after { margin-top: 14px; display: grid; gap: 8px; font-size: 0.8125rem; color: var(--ink-3); }
.detail-after div { position: relative; padding-left: 15px; }
.detail-after div::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 5px; height: 5px; border-radius: 50%; background: var(--brass); }
.detail-after .mono { font-size: 0.75rem; color: var(--ink-2); }
.detail-fade { animation: fadein 0.35s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.trace-caption { margin-top: 22px; display: flex; gap: 14px; align-items: baseline; color: var(--ink-3); font-size: 0.9375rem; max-width: 760px; }
.trace-caption b { color: var(--ink); font-weight: 500; }

@media (max-width: 980px) {
  .trace { grid-template-columns: minmax(0, 1fr); height: auto; }
  .trace-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .trace-rows { overflow: visible; }
  .detail { height: 430px; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); padding-bottom: 64px; }
}
@media (max-width: 640px) {
  .trace-scale { grid-template-columns: minmax(0, 1fr) 76px 56px; }
  .span-row { grid-template-columns: minmax(0, 1fr) 76px 56px; height: 42px; }
  .span-label small { display: none; }
  .span-dur { padding-right: 12px; }
  .ticks span:nth-child(even) { display: none; }
  .detail-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .window-bar .hide-sm { display: none; }
  .span-flag { display: none; }
}

/* Code */
.code { font-family: var(--mono); font-size: 0.8125rem; line-height: 1.75; color: var(--ink-2); padding: 20px 22px 22px; overflow-x: auto; margin: 0; white-space: pre; tab-size: 4; }
.code .c { color: var(--ink-4); }
.code .k { color: var(--k-llm); }
.code .f { color: var(--ink); }
.code .s { color: var(--k-retrieve); }
.code .d { color: var(--brass); }
.code .n { color: var(--brass-2); }
.code .p { color: var(--ink-4); user-select: none; }
.tabs { display: flex; gap: 2px; }
.tabs span { font-family: var(--mono); font-size: 0.75rem; padding: 4px 10px; border-radius: 5px; color: var(--ink-4); }
.tabs span.on { background: var(--bg-3); color: var(--ink-2); }

/* CI check */
.ci-head { padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.ci-icon { width: 22px; height: 22px; border-radius: 50%; background: var(--fail-dim); color: var(--fail); display: grid; place-items: center; flex: none; margin-top: 1px; }
.ci-icon svg { width: 12px; height: 12px; }
.ci-head strong { font-weight: 500; display: block; font-size: 0.9375rem; }
.ci-head small { color: var(--ink-3); font-size: 0.8125rem; }
.ci-head small .mono { font-size: 0.75rem; color: var(--ink-2); }
.table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.table th { text-align: left; font-weight: 400; color: var(--ink-4); font-size: 0.75rem; padding: 10px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-family: var(--mono); font-size: 0.75rem; }
.table td:first-child { color: var(--ink); font-family: var(--mono); font-size: 0.75rem; }
.delta-bad { color: var(--fail) !important; }
.delta-good { color: var(--pass) !important; }
.table tr.hl td { background: rgba(232, 115, 91, 0.05); }
.table-scroll { overflow-x: auto; }
.ci-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; color: var(--ink-3); font-size: 0.8125rem; background: var(--bg-2); flex-wrap: wrap; }

/* Chart */
.chart { padding: 18px 20px 14px; }
.chart-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.chart-top strong { font-weight: 500; font-size: 0.9375rem; }
.chart-top .big { font-family: var(--mono); font-size: 1.5rem; letter-spacing: -0.02em; color: var(--ink); }
.chart-top .big small { font-size: 0.75rem; color: var(--fail); margin-left: 8px; }
.chart svg { width: 100%; height: auto; margin-top: 14px; overflow: visible; }
.chart .grid line { stroke: var(--line); }
.chart .axis text { fill: var(--ink-4); font-family: var(--mono); font-size: 10px; }
.chart .threshold { stroke: var(--fail); stroke-dasharray: 3 4; opacity: 0.6; }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.chart .area { fill: url(#areaFill); }
.chart .marker { stroke: var(--brass); stroke-width: 1; }
.chart .marker-label { fill: var(--brass); font-family: var(--mono); font-size: 10px; }
.chart .dot { fill: var(--fail); }
.chart .dot-ring { fill: none; stroke: var(--fail); opacity: 0.4; }
.alert-line { margin: 0 20px 18px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 7px; display: flex; gap: 10px; align-items: center; font-size: 0.8125rem; color: var(--ink-2); background: var(--bg); flex-wrap: wrap; }
.alert-line .mono { font-size: 0.75rem; color: var(--ink); }

/* ---------- Quote ---------- */

.quote { max-width: 980px; margin: 0; }
.quote blockquote { margin: 0; font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); line-height: 1.22; letter-spacing: -0.03em; font-weight: 400; color: var(--ink); text-indent: -0.42em; }
.quote figcaption { margin-top: 36px; display: flex; align-items: center; gap: 14px; color: var(--ink-3); font-size: 0.9375rem; }
.quote figcaption b { color: var(--ink); font-weight: 500; display: block; }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; background: var(--bg-3); border: 1px solid var(--line-2); display: grid; place-items: center; overflow: hidden; }
.avatar svg { width: 100%; height: 100%; }

/* ---------- CTA ---------- */

.cta { text-align: left; }
.cta-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--line); }
.cta h2 { max-width: 13em; }
.cta p { margin-top: 18px; color: var(--ink-2); }
.cta .hero-actions { margin-top: 0; }
@media (max-width: 760px) { .cta-in { grid-template-columns: 1fr; align-items: start; } }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; color: var(--ink-3); font-size: 0.875rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-top p { margin-top: 14px; max-width: 22em; }
.footer .brand { color: var(--ink); }
.footer h4 { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a:hover { color: var(--ink); }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--ink-4); }
.footer-bottom a { color: var(--ink-3); }
.footer-bottom a:hover { color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--pass); box-shadow: 0 0 0 3px var(--pass-dim); }
@media (max-width: 760px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > div:first-child { grid-column: 1 / -1; }
}

/* ---------- Product page ---------- */

.page-hero { padding: clamp(72px, 10vw, 136px) 0 clamp(56px, 7vw, 96px); position: relative; overflow: hidden; }
.page-hero h1 { max-width: 11em; position: relative; z-index: 2; }
/* run explorer */
.query { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.78125rem; color: var(--ink-2); overflow-x: auto; white-space: nowrap; }
.query svg { width: 14px; height: 14px; flex: none; color: var(--ink-4); }
.query .op { color: var(--ink-4); }
.query .f { color: var(--k-llm); }
.query .v { color: var(--brass-2); }
.query .cursor { display: inline-block; width: 7px; height: 15px; background: var(--brass); vertical-align: -3px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.evals-dots { display: inline-flex; gap: 4px; }
.evals-dots i { width: 8px; height: 8px; border-radius: 2px; background: var(--pass); opacity: 0.85; }
.evals-dots i.x { background: var(--fail); }
.status-txt { display: inline-flex; align-items: center; gap: 7px; }
.status-txt::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pass); }
.status-txt.bad::before { background: var(--fail); }

/* eval split */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split > div + div { border-left: 1px solid var(--line); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split > div + div { border-left: 0; border-top: 1px solid var(--line); } }
.hist { padding: 18px 20px 20px; }
.hist-top { display: flex; justify-content: space-between; gap: 12px; font-size: 0.8125rem; color: var(--ink-3); }
.hist-top b { color: var(--ink); font-weight: 500; }
.hist-bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; margin-top: 22px; border-bottom: 1px solid var(--line-2); }
.hist-bars i { flex: 1; background: var(--ink-4); border-radius: 2px 2px 0 0; min-height: 2px; }
.hist-bars i.lo { background: var(--fail); opacity: 0.75; }
.hist-bars i.hi { background: var(--ink-2); }
.hist-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-4); margin-top: 8px; }
.hist-legend { margin-top: 18px; display: grid; gap: 8px; font-size: 0.8125rem; color: var(--ink-3); }
.hist-legend div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.hist-legend .mono { color: var(--ink); font-size: 0.75rem; }

/* diff */
.diff { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.diff > div { padding: 18px 20px 22px; }
.diff > div + div { border-left: 1px solid var(--line); }
.diff h5 { margin: 0 0 12px; font-weight: 400; font-size: 0.75rem; color: var(--ink-4); display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); }
.diff p { font-size: 0.875rem; line-height: 1.65; color: var(--ink-2); }
.diff mark { background: var(--fail-dim); color: #f3c5b9; border-radius: 3px; padding: 1px 3px; }
.diff mark.ok { background: var(--pass-dim); color: #cfe6d0; }
.case-input { padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-2); display: flex; gap: 12px; align-items: baseline; }
.case-input .mono { color: var(--ink-4); font-size: 0.75rem; flex: none; }
@media (max-width: 760px) { .diff { grid-template-columns: 1fr; } .diff > div + div { border-left: 0; border-top: 1px solid var(--line); } }

/* rule editor */
.rule-def { padding: 16px 20px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.75rem; line-height: 1.8; color: var(--ink-3); background: var(--bg-2); overflow-x: auto; white-space: pre; }
.rule-def .k { color: var(--k-llm); }
.rule-def .v { color: var(--brass-2); }

/* security list */
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.spec > div { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 20px; }
.spec > div:nth-child(odd) { padding-right: 32px; }
.spec > div:nth-child(even) { padding-left: 32px; border-left: 1px solid var(--line); }
.spec dt { color: var(--ink); font-weight: 500; font-size: 0.9375rem; }
.spec dd { margin: 0; color: var(--ink-3); font-size: 0.9375rem; }
@media (max-width: 980px) {
  .spec { grid-template-columns: 1fr; }
  .spec > div:nth-child(odd), .spec > div:nth-child(even) { padding: 20px 0; border-left: 0; }
}
@media (max-width: 560px) { .spec > div { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(40px, 7vw, 112px); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.8125rem; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 0.9375rem; color: var(--ink);
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 7px;
  padding: 11px 13px; transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 132px; resize: vertical; line-height: 1.55; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b877e' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-3); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brass); background: var(--bg-2); }
.field input:user-invalid { border-color: var(--fail); }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.form-foot small { color: var(--ink-4); font-size: 0.8125rem; }
.form-status { grid-column: 1 / -1; font-size: 0.875rem; color: var(--brass); min-height: 1.4em; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

.expect { display: grid; gap: 0; border-top: 1px solid var(--line); }
.expect > div { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; }
.expect .mono { color: var(--brass); font-size: 0.75rem; padding-top: 3px; }
.expect b { font-weight: 500; display: block; }
.expect p { color: var(--ink-3); font-size: 0.9375rem; margin-top: 4px; }
.office { margin-top: 36px; color: var(--ink-3); font-size: 0.9375rem; display: grid; gap: 4px; }
.office b { color: var(--ink); font-weight: 500; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }


/* ---------- 404 ---------- */

.nf { min-height: calc(100vh - 64px - 160px); display: grid; align-content: center; padding: 96px 0; position: relative; overflow: hidden; }
.nf .mono { color: var(--brass); }
.nf h1 { margin-top: 18px; max-width: 9em; }
.nf p { margin-top: 22px; }

/* ---------- Reveal ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* playhead overlay */
.ph-grid { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr) 64px; pointer-events: none; z-index: 3; }
.ph-track { position: relative; }
@media (max-width: 640px) { .ph-grid { grid-template-columns: minmax(0, 1fr) 76px 56px; } }

/* fictional customer wordmarks */
.lg { display: inline-flex; align-items: center; gap: 8px; color: inherit; line-height: 1; white-space: nowrap; }
.lg svg { width: auto; height: 1.25em; flex: none; }
.lg-halloway { font-weight: 600; font-size: 1.3em; letter-spacing: -0.05em; }
.lg-oarlock { font-weight: 500; font-size: 0.95em; letter-spacing: 0.32em; text-transform: uppercase; }
.lg-ninebark { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.45em; letter-spacing: -0.02em; }
.lg-fennick { font-weight: 700; font-size: 1.2em; letter-spacing: -0.03em; }
.lg-parcelry { font-family: var(--mono); font-weight: 500; font-size: 1.05em; letter-spacing: -0.02em; }
.lg-stillwater { font-weight: 300; font-size: 1.3em; letter-spacing: -0.02em; }
.lg-stillwater b { font-weight: 600; }


@media (max-width: 640px) {
  .table th, .table td { padding: 10px 12px; }
  .table td:first-child { font-size: 0.6875rem; }
  .code { font-size: 0.71875rem; padding: 16px 16px 18px; }
  .ci-head { padding: 16px; }
  .ci-foot, .chart { padding-left: 16px; padding-right: 16px; }
  .alert-line { margin: 0 16px 16px; }
  .crumbs .hide-xs { display: none; }
}

.table tr.sel td { background: rgba(237, 233, 224, 0.045); }
.table tr.sel td:first-child { box-shadow: inset 2px 0 0 var(--brass); }
.code .x { color: var(--fail); }
.code .o { color: var(--pass); }

@media (max-width: 640px) { .table .hide-m { display: none; } }

/* =====================================================================
   v2 — the instrument and the run
   ===================================================================== */

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; padding: clamp(64px, 8vw, 120px) 0 0; }
.hero-copy { position: relative; z-index: 2; max-width: 980px; }
.hero h1 { max-width: 10.5em; }
.hero .lead { margin-top: 28px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; }
.hero-note { margin-top: 28px; color: var(--ink-4); font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.01em; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero-note span { display: inline-flex; align-items: center; gap: 8px; }
.hero-note span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--ink-4); }
a:hover .arrow-down { transform: translateY(2px); }

/* ---------- The limb (engraved arc) ---------- */

.arc { display: block; position: relative; left: 50%; transform: translateX(-50%); width: max(100%, 920px); height: auto; pointer-events: none; overflow: hidden; }
.arc .rim { fill: none; stroke: var(--line-2); stroke-width: 1; }
.arc .rim.strong { stroke: var(--line-3); }
.arc .tick { stroke: var(--line-2); stroke-width: 1; }
.arc .tick.major { stroke: rgba(237, 233, 224, 0.42); }
.arc text { fill: var(--ink-4); font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
.arc .arm-line { stroke: var(--brass); stroke-width: 1; opacity: 0.75; }
.arc .vernier { fill: rgba(212, 162, 76, 0.08); stroke: var(--brass); stroke-width: 1; }
.arc .vtick { stroke: var(--brass); stroke-width: 0.8; opacity: 0.85; }
.arc .arm-dot { fill: var(--brass); }
.arc-hero { margin-top: clamp(40px, 6vw, 72px); }
.arc-page { margin-top: clamp(36px, 5vw, 64px); width: max(100%, 760px); }
.page-hero { padding-bottom: 0; }

/* ---------- The run ---------- */

.run { padding: clamp(72px, 8vw, 120px) 0 clamp(96px, 10vw, 152px); border-top: 1px solid var(--line); }
.run-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.run-story { position: relative; }
.run-intro { max-width: 34em; }
.run-path { display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.875rem; color: var(--ink-3); margin-bottom: 18px; }
.run-path span:nth-child(even) { color: var(--ink-4); }
.run-path .mono { color: var(--brass-2); font-size: 0.8125rem; }
.run-intro .lead { margin-top: 20px; }

.step { position: relative; padding-top: clamp(56px, 7vw, 88px); }
.step-time { display: block; font-family: var(--mono); font-size: 0.8125rem; color: var(--brass); letter-spacing: 0; margin-bottom: 14px; }
.step h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.12; letter-spacing: -0.03em; }
.step p { margin-top: 14px; color: var(--ink-2); max-width: 30em; }
.step p em { font-style: normal; color: var(--brass-2); }
.snippet { margin-top: 22px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-1); overflow: hidden; max-width: 34em; }
.snippet .code { padding: 16px 18px; white-space: pre; font-size: 0.75rem; }
.step-visual { margin-top: 26px; }
.step .quote { margin-top: 48px; }

.quote { margin: 0; max-width: 34em; }
.quote blockquote { margin: 0; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); line-height: 1.3; letter-spacing: -0.025em; font-weight: 400; color: var(--ink); text-indent: -0.4em; }
.quote figcaption { margin-top: 18px; color: var(--ink-3); font-size: 0.9375rem; }
.quote figcaption b { color: var(--ink); font-weight: 500; margin-right: 10px; }

.case-input { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--ink-2); display: flex; gap: 12px; align-items: baseline; }
.case-input .mono { color: var(--ink-4); font-size: 0.75rem; flex: none; }

.run-stage { order: -1; }
.screen[data-screen="monitor"], .screen[data-screen="ci"] { display: none; }
.story-rule { display: none; }

/* Wide screens: the story scrolls, the instrument stays */
@media (min-width: 1181px) {
  .run-grid { grid-template-columns: minmax(0, 390px) minmax(0, 1fr); gap: clamp(48px, 5vw, 80px); align-items: start; }
  .run-stage { order: 0; align-self: stretch; }
  .run-story { padding-left: 34px; padding-bottom: 18vh; }
  .run-intro { padding-bottom: 4vh; }
  .step { min-height: 64vh; padding-top: 0; margin-top: 0; }
  .step + .step { margin-top: 0; }
  .run-intro + .step { margin-top: 10vh; }
  .step:last-of-type { min-height: 0; }
  .step > * { transition: opacity 0.45s var(--ease); }
  .run-pinned .step:not(.current) > * { opacity: 0.32; }
  .run-pinned .step-visual { display: none; }
  .step .quote blockquote { font-size: 1.25rem; }

  .story-rule { display: block; position: absolute; left: 0; top: 0; bottom: 0; width: 12px;
    background:
      linear-gradient(var(--line-2), var(--line-2)) 0 0 / 1px 100% no-repeat,
      repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px 12px) 0 0 / 6px 100% no-repeat,
      repeating-linear-gradient(to bottom, var(--line-3) 0 1px, transparent 1px 60px) 0 0 / 11px 100% no-repeat; }
  .story-index { position: absolute; left: -4px; top: -1px; width: 22px; height: 1px; background: var(--brass); will-change: transform; }
  .story-index::before { content: ""; position: absolute; left: 0; top: -4px; width: 0; height: 0; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; border-left: 6px solid var(--brass); }
  .step::before { content: ""; position: absolute; left: -34px; top: 0.62em; width: 16px; height: 1px; background: var(--ink-4); }
  .step.current::before { background: var(--brass); }

  .stage-sticky { position: sticky; top: 88px; height: min(640px, calc(100vh - 120px)); }
  .screen { position: absolute; inset: 0 0 auto 0; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0.5s; }
  .screen.on { opacity: 1; visibility: visible; transform: none; }
  .screen[data-screen="monitor"], .screen[data-screen="ci"] { display: block; }
  .stage-sticky .trace { height: min(568px, calc(100vh - 180px)); }
  #trace.scroll-driven .replay { display: none; }
  #trace.scroll-driven .playhead { transition: none; }
}

/* ---------- Summary and customers ---------- */

.summary { padding: 0 0 clamp(88px, 10vw, 140px); }
.summary-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-1); }
.summary-bar > div { padding: 22px 24px 24px; display: grid; gap: 10px; }
.summary-bar > div + div { border-left: 1px solid var(--line); }
.summary-bar .mono { color: var(--ink-3); font-size: 0.75rem; }
.summary-bar b { font-weight: 450; font-size: clamp(2rem, 1.5rem + 1.8vw, 3rem); letter-spacing: -0.045em; line-height: 1; }
.customers { margin-top: 44px; display: flex; align-items: center; gap: 20px 40px; flex-wrap: wrap; }
.customers p { color: var(--ink-4); font-size: 0.875rem; }
.customers ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 40px; color: var(--ink-3); font-size: 15px; }
.customers li { transition: color 0.3s; }
.customers li:hover { color: var(--ink); }
@media (max-width: 760px) {
  .summary-bar { grid-template-columns: 1fr; }
  .summary-bar > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .customers { display: block; }
  .customers ul { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px; font-size: 13px; }
}

/* ---------- Close ---------- */

.close { position: relative; overflow: hidden; padding: 0 0 clamp(96px, 11vw, 160px); border-top: 1px solid var(--line); }
.arc-close { margin-top: -8px; transform: translateX(-50%) scaleY(-1); }
.arc-close text { display: none; }
.close-in { margin-top: clamp(32px, 4vw, 56px); }
.close h2 { max-width: 13em; }
.close .lead { margin-top: 20px; }

/* ---------- Mobile details ---------- */
@media (max-width: 1180px) {
  .run-story { max-width: 720px; }
}
@media (max-width: 640px) {
  .snippet .code { font-size: 0.6875rem; padding: 14px; }
  .step-time { margin-bottom: 10px; }
  .case-input { padding: 12px 16px; }
}

/* ---------- Product: the console ---------- */

.console-section { padding: clamp(56px, 7vw, 96px) 0 0; }
.console { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 520px; }
.console-rail { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--bg-2); }
.rail-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 16px; font-size: 0.875rem; color: var(--ink-2); font-weight: 500; }
.rail-brand svg { width: 16px; height: 16px; }
.console-rail [role="tab"] { display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0; border-radius: 6px; padding: 9px 10px; color: var(--ink-3); font-size: 0.875rem; cursor: pointer; transition: background 0.15s, color 0.15s; }
.console-rail [role="tab"]:hover { color: var(--ink); background: rgba(237, 233, 224, 0.03); }
.console-rail [role="tab"][aria-selected="true"] { color: var(--ink); background: var(--bg-3); }
.rail-foot { margin-top: auto; padding: 12px 10px 4px; color: var(--ink-4); font-size: 0.6875rem; }
.console-main { min-width: 0; }
.view { min-width: 0; animation: fadein 0.35s var(--ease); }
.view-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg-2); color: var(--ink-3); font-size: 0.8125rem; }
.view-foot .spacer { flex: 1; }
.view-foot .mono { font-size: 0.75rem; color: var(--ink-4); }
.code.term { border-bottom: 1px solid var(--line); }
.console-captions { position: relative; margin-top: 22px; min-height: 3.2em; max-width: 44em; }
.console-captions p { display: none; color: var(--ink-3); font-size: 0.9375rem; }
.console-captions p.on { display: block; animation: fadein 0.35s var(--ease); }
.console-captions b { color: var(--ink); font-weight: 500; }
@media (max-width: 860px) {
  .console { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .console-rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; scrollbar-width: none; }
  .console-rail::-webkit-scrollbar { display: none; }
  .rail-brand, .rail-foot { display: none; }
  .console-rail [role="tab"] { white-space: nowrap; flex: none; }
}

/* ---------- Product: datasheet ---------- */

.datasheet { padding: clamp(96px, 11vw, 160px) 0 0; }
.ds-head { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px; align-items: end; padding-bottom: 28px; border-bottom: 1px solid var(--line-3); }
.ds-head h2 { font-size: clamp(2rem, 1.35rem + 2.5vw, 3.3rem); }
.ds-head p { color: var(--ink-3); max-width: 30em; }
.ds-group { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px; padding: 28px 0 32px; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.ds-group h3 { font-size: 1.25rem; }
.ds-group dl { margin: 0; display: grid; }
.ds-group dl > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; padding: 11px 0; border-top: 1px solid var(--line); }
.ds-group dl > div:first-child { border-top: 0; padding-top: 2px; }
.ds-group dt { color: var(--ink-3); font-size: 0.9375rem; }
.ds-group dd { margin: 0; color: var(--ink); font-size: 0.9375rem; }
.ds-group dd.v { font-family: var(--mono); font-size: 0.8125rem; color: var(--brass-2); padding-top: 2px; }
.ds-group dd .mono { color: var(--brass-2); }
@media (max-width: 860px) {
  .ds-head, .ds-group { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 520px) {
  .ds-group dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ---------- Product: SDKs ---------- */

.sdk { padding: clamp(96px, 11vw, 160px) 0 0; }
.sdk-in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.sdk-copy .lead { margin-top: 20px; }
.tabs [role="tab"] { font-family: var(--mono); font-size: 0.75rem; padding: 4px 10px; border-radius: 5px; color: var(--ink-4); background: none; border: 0; cursor: pointer; }
.tabs [role="tab"]:hover { color: var(--ink-2); }
.tabs [role="tab"][aria-selected="true"] { background: var(--bg-3); color: var(--ink-2); }
.sdk-win .code { min-height: 214px; }
@media (max-width: 900px) { .sdk-in { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Product: deployment ---------- */

.deploy { padding: clamp(96px, 11vw, 160px) 0 clamp(96px, 11vw, 160px); scroll-margin-top: 64px; }
.compare { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 620px; }
.compare th, .compare td { text-align: left; padding: 15px 20px 15px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-weight: 500; color: var(--ink); font-size: 1rem; padding-top: 22px; }
.compare tbody th { font-weight: 400; color: var(--ink-3); width: 22%; }
.compare td { color: var(--ink-2); width: 39%; }
.compare td[colspan] { color: var(--ink-2); }
.deploy-cta { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 28px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-1); }
.deploy-cta p { color: var(--ink-2); }

/* ---------- Company: the document ---------- */

.doc-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); }
.doc-margin { color: var(--ink-4); font-size: 0.75rem; padding-top: 0.55em; }
.doc-hero .doc-row { align-items: start; }
.doc-hero h1 { max-width: 11em; }
.doc-hero .lead { margin-top: 26px; }
.doc-meta { margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-1); max-width: 900px; }
.doc-meta > div { padding: 14px 20px; border-right: 1px solid var(--line); flex: 1 1 auto; }
.doc-meta > div:last-child { border-right: 0; }
.doc-meta dt { font-size: 0.75rem; color: var(--ink-4); }
.doc-meta dd { margin: 4px 0 0; font-family: var(--mono); font-size: 0.875rem; color: var(--ink); white-space: nowrap; }
.doc { padding: clamp(40px, 5vw, 72px) 0 clamp(96px, 11vw, 160px); }
.doc .doc-row { padding: clamp(56px, 7vw, 96px) 0; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.doc .doc-row:first-child { border-top: 0; padding-top: 0; }
.doc h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); }
.doc-body { max-width: 820px; }
.prose p { margin-top: 20px; font-size: 1.125rem; line-height: 1.7; color: var(--ink-2); max-width: 36em; }
.prose h2 + p { margin-top: 28px; color: var(--ink); }
.doc-intro { margin-top: 16px; color: var(--ink-3); max-width: 36em; }
.doc-note { margin-top: 18px; color: var(--ink-4); font-size: 0.875rem; }

.log { list-style: none; margin: 32px 0 0; padding: 0; position: relative; }
.log::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 1px; background: var(--line-2); }
.log li { position: relative; display: grid; grid-template-columns: 64px 92px minmax(0, 1fr); gap: 16px; padding: 14px 0 14px 28px; align-items: baseline; }
.log li::before { content: ""; position: absolute; left: 0; top: 1.25em; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--ink-4); }
.log li:first-child::before { background: var(--brass); border-color: var(--brass); }
.log .log-v { color: var(--brass-2); font-size: 0.875rem; }
.log time { color: var(--ink-4); font-size: 0.75rem; }
.log p { color: var(--ink-2); }
@media (max-width: 600px) {
  .log li { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; }
  .log li p { grid-column: 1 / -1; }
}

.people { width: 100%; border-collapse: collapse; margin-top: 28px; font-size: 0.9375rem; }
.people th { text-align: left; font-weight: 400; font-size: 0.75rem; color: var(--ink-4); padding: 0 16px 10px 0; border-bottom: 1px solid var(--line-2); }
.people td { padding: 13px 16px 13px 0; border-bottom: 1px solid var(--line); color: var(--ink-3); vertical-align: top; }
.people td:first-child { color: var(--ink); white-space: nowrap; }
.people td:nth-child(2) { white-space: nowrap; }
.people .mono { color: var(--ink-2); font-size: 0.8125rem; }

.rules { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 0; }
.rules li { padding: 18px 0; border-top: 1px solid var(--line); color: var(--ink-3); max-width: 40em; }
.rules b { color: var(--ink); font-weight: 500; margin-right: 6px; }

.roles { margin-top: 28px; border-top: 1px solid var(--line); }
.role { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr) 24px; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); transition: padding 0.3s var(--ease); }
.role b { font-weight: 500; font-size: 1.0625rem; letter-spacing: -0.015em; }
.role span { color: var(--ink-3); font-size: 0.9375rem; }
.role .arrow { color: var(--ink-4); justify-self: end; }
.role:hover { padding-left: 10px; }
.role:hover .arrow { color: var(--brass); }

@media (max-width: 860px) {
  .doc-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .doc-margin { padding-top: 0; }
  .doc-meta > div { flex: 1 1 40%; border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .role { grid-template-columns: minmax(0, 1fr) 24px; gap: 4px 16px; }
  .role b, .role span { grid-column: 1; }
  .role span { font-size: 0.875rem; }
  .role .arrow { grid-column: 2; grid-row: 1 / span 3; }
  .people td:nth-child(2) { white-space: normal; }
}
.console-main { display: flex; flex-direction: column; }
.view { flex: 1; display: flex; flex-direction: column; }
.view[hidden] { display: none; }
.view-foot { margin-top: auto; }
.ds-group dd .mono { font-size: 0.8125rem; }
.page-hero .lead { margin-top: 26px; position: relative; z-index: 2; }
.run-intro { grid-column: 1; }
@media (min-width: 1181px) {
  .run-grid { grid-template-rows: auto 1fr; row-gap: 0; }
  .run-intro { padding-left: 34px; }
  .run-story { grid-column: 1; grid-row: 2; }
  .run-stage { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 1180px) {
  .run-intro { order: -2; }
}
@media (max-width: 640px) {
  .arc-hero { width: 1500px; }
  .arc-page { width: 1300px; }
  .sdk-win .code { font-size: 0.6875rem; min-height: 0; }
  .compare { min-width: 0; }
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .compare th, .compare td { border: 0; padding: 0; }
  .compare tbody th { color: var(--ink); font-weight: 500; margin-bottom: 6px; }
  .compare td { font-size: 0.875rem; margin-top: 4px; }
  .compare td::before { display: inline-block; width: 92px; color: var(--ink-4); font-size: 0.8125rem; }
  .compare td:nth-of-type(1)::before { content: "Cloud"; }
  .compare td:nth-of-type(2)::before { content: "Your VPC"; }
  .compare td[colspan]::before { content: "Both"; }
  .compare td { display: flex; gap: 0; }
  .compare td::before { flex: none; }
  .people thead { display: none; }
  .people, .people tbody, .people tr, .people td { display: block; }
  .people tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .people td { border: 0; padding: 0; }
  .people td:first-child { display: inline; }
  .people td:nth-child(2) { display: inline; color: var(--ink-3); }
  .people td:nth-child(2)::before { content: " · "; color: var(--ink-4); }
  .people td.hide-m { display: block; margin-top: 4px; font-size: 0.875rem; color: var(--ink-4); }
}
@media (min-width: 1181px) { .run-story { padding-top: 10vh; } }
@media (min-width: 1181px) { .stage-sticky .detail-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .compare tbody th, .compare td { width: auto; } }
