@import url("/static/fonts/fonts.css");

/* BuilderBase "Arc" dark tokens (workspaces/frontend/src/index.css) */
:root {
  --surface-0: #0e0e0d;
  --surface-1: #151514;
  --surface-2: #1a1a19;
  --surface-3: #242422;
  --surface-4: #2e2e2b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --ink-1: #f2f1ec;
  --ink-2: #b5b3ac;
  --ink-3: #95938c;
  --ink-4: #55534e;
  --accent: #ffd84d;
  --accent-soft: rgba(255, 216, 77, 0.18);
  --on-accent: #111111;
  --on-ink: #111111;
  --ink-hover: #ffffff;
  --tile: #1a1a19;
  --panel-edge: rgba(255, 255, 255, 0.06);
  --logo-filter: brightness(0) invert(1);
  --focus-ring: rgba(255, 255, 255, 0.08);
  --error: #ff9b8a;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
/* Arc light tokens, 1:1 from :root in the platform's index.css */
[data-theme="light"] {
  --surface-0: #f8f7f6;
  --surface-1: #ffffff;
  --surface-2: #ffffff;
  --surface-3: #f5f5f4;
  --surface-4: #edece9;
  --line: rgba(0, 0, 0, 0.07);
  --line-strong: rgba(0, 0, 0, 0.12);
  --ink-1: #0a0a0a;
  --ink-2: #444444;
  --ink-3: #64635e;
  --ink-4: #a3a29d;
  --accent-soft: rgba(255, 216, 77, 0.32);
  --on-ink: #ffffff;
  --ink-hover: #2a2a2a;
  --tile: #f5f5f4;
  --panel-edge: rgba(0, 0, 0, 0.04);
  --logo-filter: brightness(0);
  --focus-ring: rgba(0, 0, 0, 0.06);
  --error: #b42318;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--surface-0); color: var(--ink-1); }
body { font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, sans-serif; letter-spacing: -0.006em; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

.shell { max-width: 1400px; margin: 0 auto; padding: 0 12px 24px; }

/* top nav, as on builderbase.com */
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 8px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 20px; display: block; }
.brand .slash { color: var(--ink-4); font-size: 20px; font-weight: 300; }
.brand .brand-name { font-size: 17px; font-weight: 500; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; font-weight: 500; background: var(--surface-2); color: var(--ink-1); border: 0; cursor: pointer; font-family: inherit; }
.pill:hover { background: var(--surface-3); }
.pill.light { background: var(--ink-1); color: var(--on-ink); }
.pill.light:hover { background: var(--ink-hover); }
.icon-btn { width: 38px; padding: 0; justify-content: center; }
.icon-btn svg { width: 17px; height: 17px; stroke: currentColor; }
[data-theme="light"] .i-sun, :root:not([data-theme="light"]) .i-moon { display: none; }
.theme-fixed { position: fixed; top: 14px; right: 16px; }
.pill.ghost { background: transparent; color: var(--ink-2); }
.pill.ghost:hover { color: var(--ink-1); background: var(--surface-2); }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* grid like the homepage: big panel left, stack right */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 12px; align-items: start; }
.panel { background: var(--surface-1); border-radius: 20px; box-shadow: 0 0 0 1px var(--panel-edge), 0 2px 2px var(--panel-edge); }
.brand img, .auth-logo { filter: var(--logo-filter); }
:root:not([data-theme="light"]) .brand img, :root:not([data-theme="light"]) .auth-logo { filter: none; }

/* hero */
.hero { padding: 40px 40px 36px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); margin: 0 0 22px; }
.hero h1 { font-size: 52px; line-height: 1.02; letter-spacing: -0.035em; font-weight: 500; margin: 0 0 18px; max-width: 640px; }
.hero p { font-size: 17px; line-height: 1.55; color: var(--ink-2); margin: 0; max-width: 560px; }

/* steps */
.steps { padding: 4px 40px 40px; }
.step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 18px; padding: 26px 0; border-top: 1px solid var(--line); }
.step .n { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-top: 1px; }
.step h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; margin: 4px 0 6px; }
.step p { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 0 0 14px; }
.step .hint { font-size: 13.5px; color: var(--ink-3); margin: 12px 0 0; }
.step .hint b { color: var(--ink-1); font-weight: 500; }
kbd { font-family: var(--mono); font-size: 12px; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); color: var(--ink-1); }

.cmd { position: relative; background: var(--surface-0); border-radius: 14px; padding: 16px 112px 16px 18px; }
.cmd .copy { position: absolute; top: 10px; right: 10px; height: 32px; padding: 0 14px; font-size: 13px; }
.cmd .copy.done { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.cmd code { display: block; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; color: var(--ink-1); white-space: pre-wrap; word-break: break-all; }
.cmd code::before { content: "$ "; color: var(--ink-4); }
.actions { display: flex; gap: 8px; margin-top: 10px; }
.actions .pill { height: 34px; padding: 0 14px; font-size: 13.5px; }
.actions .pill.done { background: var(--accent); color: var(--on-accent); box-shadow: none; }

/* right column */
.stack { display: flex; flex-direction: column; gap: 12px; }
.launch { display: flex; align-items: center; gap: 16px; padding: 18px 18px 18px 20px; transition: background .15s; }
.launch:hover { background: var(--surface-2); }
.launch .ico { width: 56px; height: 56px; flex: none; border-radius: 14px; background: var(--surface-3); display: grid; place-items: center; }
.launch .ico svg { width: 26px; height: 26px; stroke: var(--ink-1); }
.launch .meta { flex: 1; min-width: 0; }
.launch .title { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.launch .sub { font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-3); margin-top: 6px; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.status.up { color: var(--ink-1); }
.status.up .dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.arrow { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--surface-0); display: grid; place-items: center; }
.launch:hover .arrow { background: var(--ink-1); }
.launch:hover .arrow svg { stroke: var(--on-ink); }
.arrow svg { width: 14px; height: 14px; stroke: var(--ink-1); }

.partners { padding: 22px 22px 24px; }
.label { font-size: 13.5px; color: var(--ink-3); margin: 0 0 18px; }
.logos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.logo { height: 64px; border-radius: 12px; background: var(--tile); display: grid; place-items: center; }
.logo img { max-height: 22px; max-width: 70%; filter: var(--logo-filter); opacity: .92; }
.logo img.tall { max-height: 30px; }

.info { padding: 20px 22px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.info strong { color: var(--ink-1); font-weight: 500; }

/* login: mirrors builderbase.com/auth (FlowLayout + FlowCard) */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; background: var(--surface-0); }
.auth-col { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 24px; }
.auth-head { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.auth-logo { height: 24px; }
.auth-head h1 { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; margin: 0 0 6px; }
.auth-head p { font-size: 14px; color: var(--ink-2); margin: 0; }
.auth-card { background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: 16px; padding: 24px; box-shadow: 0 1px 2px var(--panel-edge); }
.auth-team { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin-bottom: 18px; }
.auth-label { display: block; font-size: 14px; font-weight: 500; color: var(--ink-1); margin-bottom: 6px; }
.auth-input { width: 100%; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-1); font-family: inherit; font-size: 14px; outline: none; }
.auth-input::placeholder { color: var(--ink-3); }
.auth-input:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px var(--focus-ring); }
.auth-help { font-size: 12.5px; color: var(--ink-2); margin: 8px 0 16px; }
.auth-btn { width: 100%; height: 32px; border: 0; border-radius: 8px; background: var(--ink-1); color: var(--on-ink); font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.auth-btn:hover { background: var(--ink-hover); }
.error { display: none; margin-top: 12px; font-size: 13px; color: var(--error); }
.error.show { display: block; }
.auth-divider { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--ink-3); margin-bottom: 16px; }
.auth-divider span { flex: 1; height: 1px; background: var(--line); }
.auth-logos { display: flex; align-items: center; justify-content: center; gap: 28px; }
.auth-logos img { height: 14px; filter: var(--logo-filter); opacity: .7; }
.auth-logos img.tall { height: 19px; }

/* lab layout: steps left, live terminal right */
.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 12px; align-items: start; }
.left { display: flex; flex-direction: column; gap: 12px; }
.hero.compact { padding: 32px 36px 26px; }
.hero.compact h1 { font-size: 40px; }
.hero.compact p { font-size: 15.5px; }
.left .steps { padding: 0 36px 30px; }
.term { position: sticky; top: 12px; height: calc(100vh - 88px); min-height: 520px; display: flex; flex-direction: column; overflow: hidden; }
.term-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.term-head .status { margin: 0; }
.term-title { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.term-title svg { width: 18px; height: 18px; stroke: var(--ink-1); }
.term iframe { flex: 1; width: 100%; border: 0; background: #0e0e0d; padding: 6px 4px 0 8px; }
.term-foot { padding: 12px 18px; font-size: 13px; line-height: 1.5; color: var(--ink-3); border-top: 1px solid var(--line); }
.chat-card { margin-top: 14px; background: var(--surface-0); box-shadow: none; }
.chat-card .ico { width: 44px; height: 44px; border-radius: 12px; }
.chat-card .ico svg { width: 22px; height: 22px; }
.chat-card.off { opacity: .55; }
.logos.four { grid-template-columns: repeat(4, 1fr); }
.logos.four .logo { height: 56px; }
.logos.four .logo img { max-height: 18px; }
.logos.four .logo img.tall { max-height: 26px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink-1); color: var(--on-ink); padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: all .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast kbd { background: rgba(127,127,127,.25); color: inherit; }

@media (max-width: 1020px) {
  .lab-grid { grid-template-columns: 1fr; }
  .term { position: static; height: 520px; }
  .grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .hero, .steps { padding-left: 24px; padding-right: 24px; }
}

/* light mode: stronger edges and text where white sits on #f8f7f6 */
[data-theme="light"] .pill { background: var(--surface-1); box-shadow: 0 0 0 1px var(--line-strong); }
[data-theme="light"] .pill:hover { background: var(--surface-3); }
[data-theme="light"] .pill.ghost { color: var(--ink-1); }
[data-theme="light"] .pill.light { background: var(--ink-1); box-shadow: none; }
[data-theme="light"] .arrow { box-shadow: 0 0 0 1px var(--line-strong); }
[data-theme="light"] .launch .sub,
[data-theme="light"] .status,
[data-theme="light"] .label,
[data-theme="light"] .step .hint,
[data-theme="light"] .auth-divider { color: var(--ink-2); }
[data-theme="light"] .status .dot { border-color: var(--ink-2); }
[data-theme="light"] .status.up .dot { border-color: #e0b400; }
[data-theme="light"] .live { box-shadow: 0 0 0 1px #e0b400; }
[data-theme="light"] .auth-logos img { opacity: .85; }
[data-theme="light"] .cmd { box-shadow: inset 0 0 0 1px var(--line); }
[data-theme="light"] .brand .slash { color: var(--ink-3); }

/* ── v3: header with tabs + partner bar, overview page, terminal page ── */
.top { margin-bottom: 12px; }
.nav { gap: 24px; }
.tabs { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-1); box-shadow: 0 0 0 1px var(--panel-edge); }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.tab:hover { color: var(--ink-1); background: var(--surface-3); }
.tab.active { background: var(--ink-1); color: var(--on-ink); }
.tab .ext { width: 11px; height: 11px; stroke: currentColor; opacity: .7; }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.tab-dot.up { background: var(--accent); border-color: var(--accent); }
.partner-bar { display: flex; align-items: center; justify-content: center; gap: 30px; height: 40px; border-radius: 14px; background: var(--surface-1); box-shadow: 0 0 0 1px var(--panel-edge); font-size: 12.5px; color: var(--ink-3); }
.partner-bar img { height: 13px; filter: var(--logo-filter); opacity: .85; }
.partner-bar img.tall { height: 18px; }

/* overview */
.overview { display: flex; flex-direction: column; gap: 12px; }
.overview .hero { padding: 44px 44px 40px; }
.overview .hero h1 { font-size: 56px; }
.launch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.big-launch { display: flex; flex-direction: column; padding: 26px 26px 22px; min-height: 250px; transition: background .15s; }
.big-launch:hover { background: var(--surface-2); }
.big-launch .num { font-size: 13.5px; color: var(--ink-3); }
.big-launch .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-3); display: grid; place-items: center; margin: 18px 0 16px; }
.big-launch .ico svg { width: 24px; height: 24px; stroke: var(--ink-1); }
.big-launch .title { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.big-launch .sub { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin-top: 6px; max-width: 440px; }
.big-launch .row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 22px; }
.big-launch .row .status { margin: 0; }
.big-launch:hover .arrow { background: var(--ink-1); }
.big-launch:hover .arrow svg { stroke: var(--on-ink); }
.big-launch.off { opacity: .6; }
.info-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 12px; align-items: start; }
.day { padding: 24px 26px 14px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.timeline li:first-child { border-top: 0; }
.timeline .t { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.timeline b { color: var(--ink-1); font-weight: 500; }
.side-col { display: flex; flex-direction: column; gap: 12px; }
.side-col .label { margin-bottom: 8px; }

/* terminal page: steps rail + big terminal, fills the viewport */
.lab { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 12px; height: calc(100vh - 140px); min-height: 560px; }
.rail { padding: 22px 20px; overflow-y: auto; }
.rail .label { margin-bottom: 6px; }
.rstep { padding: 18px 0; border-top: 1px solid var(--line); }
.rstep:first-of-type { border-top: 0; padding-top: 8px; }
.rhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rhead .n { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--ink-2); flex: none; }
.rhead h3 { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; margin: 0; }
.rail .cmd { padding: 11px 13px; border-radius: 10px; }
.rail .cmd code { font-size: 12.5px; line-height: 1.55; }
.rail .hint { font-size: 13px; color: var(--ink-3); margin: 10px 0 0; }
.chat-go { width: 100%; justify-content: space-between; margin-top: 12px; height: 42px; }
.chat-go .status { margin: 0; color: inherit; opacity: .8; }
.chat-go .status .dot { border-color: currentColor; }
.chat-go.off { opacity: .5; }
.lab .term { position: static; height: auto; min-height: 0; }
[data-theme="light"] .tab:hover { background: var(--surface-3); }
[data-theme="light"] .rail .hint, [data-theme="light"] .big-launch .num, [data-theme="light"] .timeline .t, [data-theme="light"] .partner-bar { color: var(--ink-2); }

@media (max-width: 1100px) {
  .tabs { display: none; }
  .launch-grid, .info-grid, .lab { grid-template-columns: 1fr; }
  .lab { height: auto; }
  .lab .term { height: 520px; }
}

/* ══ Ingram Micro theme (matches deck-ingram-dark / deck-ingram). Overrides everything above. ══ */
:root {
  --surface-0: #0a1020;
  --surface-1: #141d33;
  --surface-2: #18233b;
  --surface-3: #22304d;
  --surface-4: #2b3a5a;
  --line: rgba(241, 245, 251, 0.12);
  --line-strong: rgba(241, 245, 251, 0.22);
  --ink-1: #f1f5fb;
  --ink-2: #d6deea;
  --ink-3: #b4c0d3;
  --ink-4: #6f7d96;
  --accent: #4d9bff;
  --accent-soft: rgba(77, 155, 255, 0.22);
  --on-accent: #ffffff;
  --on-ink: #0a1020;
  --ink-hover: #ffffff;
  --tile: #18233b;
  --panel-edge: rgba(241, 245, 251, 0.10);
  --brand: #1570ef;
  --brand-hover: #0f5ad8;
  --logo-filter: brightness(0) invert(1);
  --focus-ring: rgba(77, 155, 255, 0.35);
  --error: #ff9b8a;
}
[data-theme="light"] {
  --surface-0: #f3f5f8;
  --surface-1: #ffffff;
  --surface-2: #ffffff;
  --surface-3: #eef1f5;
  --surface-4: #e3e8ef;
  --line: rgba(18, 25, 38, 0.08);
  --line-strong: rgba(18, 25, 38, 0.16);
  --ink-1: #121926;
  --ink-2: #364152;
  --ink-3: #4b5565;
  --ink-4: #9aa4b2;
  --accent: #1570ef;
  --accent-soft: rgba(21, 112, 239, 0.14);
  --on-ink: #ffffff;
  --ink-hover: #1b2536;
  --tile: #f3f5f8;
  --panel-edge: rgba(18, 25, 38, 0.06);
  --logo-filter: none;
  --focus-ring: rgba(21, 112, 239, 0.2);
  --error: #b42318;
}
body { font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif; letter-spacing: 0; }
:root:not([data-theme="light"]) .panel { box-shadow: inset 0 0 0 1px var(--panel-edge); }
.hero h1, .big-launch .title, .auth-head h1 { font-weight: 600; letter-spacing: -0.03em; }
.step h3, .rhead h3, .launch .title, .term-title, .brand .brand-name { font-weight: 600; }
.eyebrow, .label { color: var(--accent); font-weight: 600; }
.step .n, .rhead .n { background: var(--accent-soft); color: var(--accent); }

/* primary actions in Ingram blue */
.pill.light, [data-theme="light"] .pill.light { background: var(--brand); color: #fff; box-shadow: none; }
.pill.light:hover, [data-theme="light"] .pill.light:hover { background: var(--brand-hover); }
.tab.active { background: var(--brand); color: #fff; }
.auth-btn { background: var(--brand); color: #fff; height: 38px; font-weight: 600; }
.auth-btn:hover { background: var(--brand-hover); }
.auth-input { height: 38px; }
.launch:hover .arrow, .big-launch:hover .arrow { background: var(--brand); }
.launch:hover .arrow svg, .big-launch:hover .arrow svg { stroke: #fff; }
.cmd .copy.done, .actions .pill.done { background: var(--brand); color: #fff; }
.status.up .dot, .tab-dot.up { background: var(--accent); border-color: var(--accent); }
[data-theme="light"] .status.up .dot { border-color: var(--brand); }
[data-theme="light"] .live { box-shadow: 0 0 0 1px var(--brand); }
.live { background: var(--accent); }
.toast { background: var(--brand); color: #fff; }

/* logos: Ingram leads; BuilderBase wordmark is white-only, so darken it in light mode */
.brand img.ingram { height: 22px; }
[data-theme="light"] img.bb-white { filter: brightness(0); }
.hosted { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
.hosted img { height: 13px; filter: var(--logo-filter); }
[data-theme="light"] .hosted img { filter: brightness(0); }

/* terminal frame */
.term iframe { background: #0a1020; }
:root:not([data-theme="light"]) .auth-logo, :root:not([data-theme="light"]) .brand img.ingram { filter: brightness(0) invert(1); }
.cmd.prompt code::before { content: "Agent › "; color: var(--accent); font-weight: 600; }
.hero .eyebrow { color: var(--accent); font-weight: 600; }
.cmd.prompt code { word-break: normal; font-family: "Inter", sans-serif; font-size: 14.5px; }
