/* Slancha design-system v0.1.2; vendored tokens retain upstream license. */
@font-face { font-family: "Figtree Variable"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("/static/fonts/figtree-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono Variable"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("/static/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); }
:root {
  --canvas: var(--slancha-canvas); --surface: var(--slancha-surface); --ink: var(--slancha-ink); --muted: var(--slancha-muted); --line: var(--slancha-line); --soft: var(--slancha-soft);
  --blue: var(--slancha-blue); --blue-text: var(--slancha-blue-text); --aqua: var(--slancha-aqua); --ok-wash: var(--slancha-verified-wash); --err: var(--slancha-error); --err-wash: var(--slancha-error-wash);
  --warn: var(--slancha-warning); --warn-wash: var(--slancha-warning-wash); --result: var(--slancha-result);
  --font: var(--slancha-font-ui);
  --mono: var(--slancha-font-mono);
  --r-sm: var(--slancha-radius-sm); --r-md: var(--slancha-radius-md); --r-lg: var(--slancha-radius-lg); --shadow: var(--slancha-shadow-surface);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 15px/1.55 var(--font); }
code, pre, .mono { font-family: var(--mono); font-size: 13px; }
a { color: var(--blue-text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; border-radius: var(--r-sm); padding: 10px 16px; background: var(--blue); color: #fff; font-weight: 600; cursor: pointer; }
button.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
button.small { padding: 7px 12px; font-size: 13px; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgb(15 99 201 / 35%); }
input, select, textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; }
textarea { resize: vertical; min-height: 120px; font-family: var(--mono); font-size: 13px; }
label { display: block; font-weight: 600; font-size: 13px; margin: 0 0 6px; }
h1, h2, h3, p { margin-top: 0; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 2; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; }
.brand em { font-style: normal; font-weight: 500; color: var(--muted); }
.key { display: flex; gap: 8px; width: min(420px, 55vw); }

main { max-width: 1120px; margin: 0 auto; padding: 40px 32px 24px; }
.hero h1 { font-size: clamp(26px, 4vw, 40px); line-height: 1.12; letter-spacing: -.02em; max-width: 820px; margin-bottom: 12px; }
.lede { color: var(--muted); font-size: 17px; max-width: 720px; }

.pipelines { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 28px 0 32px; }
.pipe { text-align: left; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; font-weight: 400; display: flex; flex-direction: column; gap: 6px; min-height: 150px; }
.pipe:hover { border-color: var(--blue); }
.pipe[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.pipe .pipe-title { font-size: 16px; font-weight: 700; margin: 0; }
.pipe .pipe-body { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.45; }
.pipe .serve { margin-top: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dot.live { color: #1f8f70; } .dot.live::before { background: var(--aqua); }
.dot.down::before { background: var(--err); }

.workspace { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); background: var(--soft); }
.tabs button { background: transparent; color: var(--muted); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 0 var(--surface); }
.panel { padding: 24px; }
.notice { margin: 16px 24px 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--warn-wash); color: var(--warn); font-size: 14px; }
.notice.error { background: var(--err-wash); color: var(--err); }
.notice.ok { background: var(--ok-wash); color: #1f8f70; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }
.row > button, .row > .status { flex: 0 0 auto; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.hint { color: var(--muted); font-size: 13px; }
.classes { display: grid; gap: 10px; }
.class { display: grid; grid-template-columns: 200px 1fr auto; gap: 10px; align-items: center; padding: 10px; border: 1px dashed var(--line); border-radius: var(--r-sm); }
.class .count { font-size: 13px; color: var(--muted); }
.thumbs { display: flex; gap: 4px; flex-wrap: wrap; }
.thumbs img { width: 34px; height: 34px; object-fit: cover; border-radius: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--soft); }
.status.ready { background: var(--ok-wash); color: #1f8f70; }
.status.failed { background: var(--err-wash); color: var(--err); }
.status.training, .status.queued { background: var(--warn-wash); color: var(--warn); }

.result { background: var(--result); color: #e8ecf2; border-radius: var(--r-md); padding: 18px; min-height: 160px; }
.result h3 { font-size: 13px; color: #9aa5b5; text-transform: uppercase; letter-spacing: .05em; }
.bar { display: grid; grid-template-columns: 140px 1fr 56px; gap: 10px; align-items: center; font-size: 14px; margin: 6px 0; }
.bar .track { height: 8px; background: #2a313d; border-radius: 99px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--aqua); border-radius: 99px; }
.bar.lead .fill { background: #4f9cff; }
.bar .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .num { text-align: right; font-family: var(--mono); font-size: 12px; }
.preview img { max-width: 100%; max-height: 220px; border-radius: var(--r-sm); }
pre { background: var(--result); color: #e8ecf2; padding: 16px; border-radius: var(--r-md); overflow-x: auto; white-space: pre; }
.empty { color: var(--muted); padding: 28px 0; text-align: center; }

footer { max-width: 1120px; margin: 0 auto; padding: 8px 32px 40px; color: var(--muted); font-size: 13px; }

.card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; }
.card > h3 { margin-bottom: 12px; }
.card > * + * { margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--soft); color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px; font-size: 13px; font-weight: 500; text-decoration: none; }
.chip b { margin-left: 4px; }
.chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ex { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.ex-body { min-height: 60px; }
.ex img { width: 100%; height: 110px; object-fit: cover; border-radius: 4px; background: var(--soft); }
.ex img:not([src]) { visibility: hidden; }
.ex audio { width: 100%; }
.ex .row > * { min-width: 0; }
.clip { display: block; max-height: 90px; overflow: hidden; white-space: pre-wrap; word-break: break-all; font-size: 11px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stats div { background: var(--soft); border-radius: var(--r-sm); padding: 10px 12px; }
.stats b { display: block; font-size: 20px; }
.stats span { font-size: 12px; color: var(--muted); }
button.quiet { background: transparent; color: var(--muted); padding: 4px 8px; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .pipelines { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .class { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .top { flex-direction: column; align-items: stretch; padding: 12px 16px; position: static; }
  .key { width: 100%; }
  main { padding: 24px 16px; }
  footer { padding: 8px 16px 32px; }
  .pipelines { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
  .tabs { overflow-x: auto; }
  .bar { grid-template-columns: 90px 1fr 48px; }
}

/* First-party journey and resilient narrow layouts. */
html { scroll-padding-top: 100px; }
.top { flex-wrap: wrap; position: static; padding: 18px max(24px, calc((100vw - 1200px) / 2)); }
.brand { color: var(--ink); text-decoration: none; font-size: 24px; letter-spacing: -.06em; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--ink); text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
#nav-toggle { display: none; }
.skip { position: absolute; top: -100px; left: 16px; padding: 12px; background: var(--surface); z-index: 10; }
.skip:focus { top: 12px; }
main { max-width: 1200px; }
.hero { padding: 16px 0 20px; }
.hero h1 { max-width: 850px; font-size: clamp(32px, 5vw, 56px); letter-spacing: -.04em; }
.product-lane { color: var(--muted); margin-bottom: 18px; }
h2 { font-size: 22px; line-height: 1.25; letter-spacing: -.025em; }
h3 { font-size: 17px; }
.access { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 24px 0; margin: 0 0 32px; }
.access h2 { margin-bottom: 8px; }
.access .key { width: min(100%, 640px); display: block; }
.key-controls { display: flex; gap: 8px; align-items: center; }
.key-controls input { min-width: 0; flex: 1; }
#connection { margin: 12px 0; }
.pipelines { margin-top: 16px; }
.pipe { min-width: 0; min-height: 185px; }
.pipe .serve { overflow-wrap: anywhere; }
button, button.small, button.quiet, input, select { min-height: 44px; }
button { background: var(--ink); }
.pipe { background: var(--surface); }
.chip.on { background: var(--blue-text); border-color: var(--blue-text); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--blue-text); outline-offset: 3px; box-shadow: none; }
.dot.live, .notice.ok, .status.ready { color: #17694f; }
.dot.down { color: var(--err); }
.panel, .grid2 > *, .card, .row > * { min-width: 0; }
.table-scroll { max-width: 100%; overflow-x: auto; }
table { min-width: 560px; }
th { text-transform: none; letter-spacing: 0; }
pre { max-width: 100%; }
p, td, code { overflow-wrap: anywhere; }
.result { overflow-wrap: anywhere; }
.result h3 { text-transform: none; letter-spacing: 0; }
.result .hint { color: #bac4d3; }
.delivery { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 28px; }
.delivery p { max-width: 66ch; }
footer { max-width: 1200px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer nav { display: flex; gap: 20px; }
footer a { min-height: 44px; display: inline-flex; align-items: center; }
.empty { text-align: left; }
#notice[hidden], [hidden] { display: none !important; }
@media (max-width: 1080px) { .top { gap: 12px; } .site-nav { gap: 4px 14px; } }
@media (max-width: 760px) {
  .top { flex-direction: row; align-items: center; padding: 12px 16px; }
  .site-navigation { margin-left: auto; }
  #nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 16px; right: 16px; top: 68px; background: var(--surface); padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); z-index: 5; }
  .site-nav.open { display: flex; flex-direction: column; align-items: stretch; }
  .site-nav a { font-size: 15px; }
}
@media (max-width: 560px) {
  .hero { padding-top: 0; }
  .key-controls { flex-wrap: wrap; }
  .key-controls input { flex-basis: 100%; }
  .pipelines { gap: 8px; }
  .pipe { min-height: 0; padding: 14px; }
  .pipe .serve { display: none; }
  .row > * { min-width: 0; }
  .row > div { flex-basis: 100%; }
  .tabs button { padding: 10px 12px; }
  .tabs { gap: 0; }
  .notice { margin-left: 16px; margin-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

.store-choice { display: flex; align-items: center; gap: 10px; }
.store-choice input { width: 20px; height: 20px; min-height: 20px; }

@media (max-width: 560px) { .row > p { flex-basis: 100% !important; } }

.journey { display:flex; flex-wrap:wrap; gap:1rem 2.5rem; padding-left:1.3rem; margin:1.5rem 0 0; font-weight:600; }
.pilot-link { font-weight:700; }

.setup-entry { border-block:1px solid var(--slancha-line, #dce2ec); padding:1.5rem 0; margin-bottom:2rem; }
dialog { width:min(760px, calc(100% - 2rem)); max-height:calc(100dvh - 2rem); box-sizing:border-box; border:1px solid var(--slancha-line, #dce2ec); border-radius:12px; padding:1.5rem; color:var(--slancha-ink, #16191f); background:var(--slancha-canvas, #f7f8fa); overflow:auto; }
dialog::backdrop { background:rgba(20,28,40,.45); }
.dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.dialog-head h2 { margin-top:0; }
dialog .row > button { flex:1 1 160px; }
dialog .row > a { flex-basis:100%; }
#setup-recipe { width:100%; box-sizing:border-box; margin-bottom:1rem; }
@media(max-width:480px) { dialog { padding:1rem; } .dialog-head { flex-wrap:wrap; } }

.action-link { display:inline-block; padding:.7rem 1rem; border:1px solid #cbd4e3; border-radius:8px; font-weight:600; text-decoration:none; color:inherit; }
.hero .row > * { flex:0 1 auto; }
.human-steps { max-width:75ch; padding-left:1.4rem; } .human-steps li { margin:1rem 0; }
