/* ------------------------------------------------------------------
   Marketing + account pages (landing, sign-in, account, users).
   Tokens (--bg, --fg, --surface…) come from style.css, so light/dark
   follow the same GEIST_THEME switch as the app.
------------------------------------------------------------------- */
.site [hidden] { display: none !important; }
.site { min-height: 100vh; display: flex; flex-direction: column; user-select: text; }

.site-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .site-wrap { height: 56px; display: flex; align-items: center; gap: 20px; }
.site-brand { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; color: var(--fg); letter-spacing: -0.015em; }
.site-brand svg { width: 26px; height: 26px; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.site-nav a {
  font-size: 13px; color: var(--muted); padding: 6px 10px; border-radius: 8px;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.site-nav a:hover, .site-nav a.is-current { color: var(--fg); background: var(--hover); }
.site-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 9px;
  font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--fg);
  transition: background 0.15s var(--ease), opacity 0.15s var(--ease), transform 0.1s var(--ease), border-color 0.15s var(--ease);
}
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent-bg); color: var(--accent-fg); border-color: var(--accent-bg); }
.btn-primary:hover { background: var(--accent-bg); opacity: 0.86; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn-lg { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 11px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-icon { width: 34px; padding: 0; }
.btn-ghost { border-color: transparent; background: transparent; }

/* ---------- User menu ---------- */
/* Own z-index: the app's header isn't positioned, so the menu must outrank the workspace by itself. */
.user-menu { position: relative; z-index: 50; }
.user-chip {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 4px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  font-size: 13px; color: var(--fg); cursor: pointer;
}
.user-chip:hover { background: var(--hover); }
.avatar {
  width: 26px; height: 26px; border-radius: 999px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
  background: var(--sub); color: var(--fg-2); border: 1px solid var(--border);
}
.user-pop {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px;
}
.user-pop[hidden] { display: none; }
.user-pop-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.user-pop-head strong { display: block; font-size: 13px; font-weight: 500; color: var(--fg); }
.user-pop-head span { font-size: 12px; color: var(--muted); }
.user-pop a, .user-pop button {
  display: flex; width: 100%; align-items: center; gap: 8px; text-align: left;
  font-size: 13px; color: var(--fg-2); padding: 7px 10px; border-radius: 8px; cursor: pointer;
}
.user-pop a:hover, .user-pop button:hover { background: var(--hover); color: var(--fg); }
.user-pop svg { width: 15px; height: 15px; color: var(--muted); }

/* ---------- Status pills (users table) ---------- */
.pill { font-size: 10.5px; font-weight: 500; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--sub); white-space: nowrap; }
.pill-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.pill-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.pill-info { color: var(--info); border-color: color-mix(in srgb, var(--info) 35%, transparent); background: color-mix(in srgb, var(--info) 10%, transparent); }
.pill-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: color-mix(in srgb, var(--danger) 10%, transparent); }

/* ---------- Auth card (sign-in) ---------- */
.auth-shell { flex: 1; display: grid; place-items: center; padding: 48px 16px; }
.auth-card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-lg); padding: 28px;
}
.auth-card .auth-logo { width: 36px; height: 36px; color: var(--fg); }
.auth-card h1 { margin-top: 18px; font-size: 20px; font-weight: 600; letter-spacing: -0.03em; color: var(--fg); }
.auth-card .sub { margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.auth-card form { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.auth-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); line-height: 1.55; }
.auth-foot code { font-family: 'Geist Mono', ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--fg-2); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 500; color: var(--fg-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select {
  height: 36px; width: 100%; padding: 0 11px; border-radius: 9px; font-size: 13.5px;
  background: var(--surface); color: var(--fg); border: 1px solid var(--border); outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input:focus, .select:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 8%, transparent); }
.input:disabled { color: var(--muted); background: var(--sub); }
.select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.select-sm { height: 28px; font-size: 12.5px; border-radius: 7px; padding-left: 8px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 60px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 11.5px; color: var(--muted); padding: 3px 7px; border-radius: 6px; cursor: pointer; }
.pw-toggle:hover { background: var(--hover); color: var(--fg); }

.alert {
  font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--sub); color: var(--fg-2);
}
.alert[hidden] { display: none; }
.alert-danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.alert-warn { color: var(--fg); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.alert-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 30%, var(--border)); }

/* ---------- Settings pages (account, users) ---------- */
.page { flex: 1; padding: 36px 0 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.035em; color: var(--fg); }
.page-head p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.back-link:hover { color: var(--fg); }
.back-link svg { width: 14px; height: 14px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 20px; overflow: hidden; }
.panel-body { padding: 22px; display: grid; grid-template-columns: 240px 1fr; gap: 28px; }
.panel-body h2 { font-size: 14.5px; font-weight: 500; color: var(--fg); }
.panel-body .desc { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.panel-fields { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.panel-foot { padding: 12px 22px; border-top: 1px solid var(--border); background: var(--sub); display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.panel-foot .status { margin-right: auto; font-size: 12.5px; color: var(--muted); }
.panel.danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }

.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--fg); }

/* ---------- Users table ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.search .input { padding-left: 32px; }
.filter-seg { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: 9px; background: var(--sub); }
.filter-seg button { font-size: 12.5px; padding: 5px 10px; border-radius: 7px; color: var(--muted); cursor: pointer; }
.filter-seg button.is-on { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; }
.utable { width: 100%; border-collapse: collapse; font-size: 13px; }
.utable th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 16px; background: var(--sub); border-bottom: 1px solid var(--border); white-space: nowrap; }
.utable td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--fg-2); vertical-align: middle; }
.utable tr:last-child td { border-bottom: 0; }
.utable tr.is-inactive td:not(:last-child) { opacity: 0.55; }
.utable .who { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.utable .who b { display: block; font-weight: 500; color: var(--fg); }
.utable .who span { font-size: 12px; color: var(--muted); }
.utable .actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.utable .muted { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.empty-row td { text-align: center; color: var(--muted); padding: 36px 16px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { margin-top: 4px; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; color: var(--fg); font-variant-numeric: tabular-nums; }

/* ---------- Dialog ---------- */
dialog.dlg {
  width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); color: var(--fg); box-shadow: var(--shadow-lg);
}
dialog.dlg::backdrop { background: var(--scrim); backdrop-filter: blur(4px); }
dialog.dlg[open] { animation: rise-in 0.25s var(--ease); }
.dlg-head { padding: 20px 22px 0; }
.dlg-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.dlg-head p { margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.dlg-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.dlg-foot { padding: 12px 22px; border-top: 1px solid var(--border); background: var(--sub); display: flex; justify-content: flex-end; gap: 8px; }
.secret {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px;
  background: var(--code-bg); border: 1px solid var(--border);
  font-family: 'Geist Mono', ui-monospace, Menlo, monospace; font-size: 14px; color: var(--fg); word-break: break-all;
}
.secret span { flex: 1; user-select: all; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--accent-bg); color: var(--accent-fg); font-size: 13px; padding: 9px 14px; border-radius: 10px;
  box-shadow: var(--shadow-lg);
}
.toast[hidden] { display: none; }
.toast.is-error { background: var(--danger); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .panel-body { grid-template-columns: 1fr; gap: 16px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
}
@media (max-width: 560px) {
  .site-actions .hide-sm { display: none; }
  .utable .hide-sm { display: none; }
}

/* ---------- Theme picker (admin, workspace header) ---------- */
.theme-picker { position: relative; z-index: 50; }
.tp-pop {
  position: absolute; right: 0; top: calc(100% + 6px); width: 300px; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 12px; user-select: none;
}
.tp-pop[hidden] { display: none; }
.tp-head strong { display: block; font-size: 13px; font-weight: 600; color: var(--fg); }
.tp-head span { font-size: 12px; color: var(--muted); }
.tp-label { margin: 12px 0 6px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.tp-palettes { display: flex; flex-direction: column; gap: 2px; }
.tp-pal, .tp-can {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 8px;
  font-size: 12.5px; color: var(--fg-2); border: 1px solid transparent; cursor: pointer; text-align: left;
}
.tp-pal:hover, .tp-can:hover { background: var(--hover); }
.tp-pal.is-on, .tp-can.is-on { border-color: var(--border-strong); background: var(--sub); color: var(--fg); font-weight: 500; }
.tp-sw { display: inline-flex; border-radius: 6px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.08); flex-shrink: 0; }
.tp-sw i { display: block; width: 14px; height: 18px; }
.tp-canvases { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.tp-can { padding: 5px 8px; }
.tp-can-demo { width: 22px; height: 16px; border-radius: 4px; border: 1px solid var(--border); background-color: var(--bg); flex-shrink: 0; }
.tp-can-dots { background-image: radial-gradient(var(--border-strong) 0.8px, transparent 0.8px); background-size: 5px 5px; }
.tp-can-lines { background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 5px 5px; }
.tp-can-tint { background-image: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--accent-bg) 30%, transparent), transparent 70%); }
.tp-foot { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.tp-status { margin-right: auto; font-size: 11.5px; color: var(--muted); }
.tp-btn { height: 28px; padding: 0 10px; border-radius: 7px; font-size: 12px; font-weight: 500; border: 1px solid var(--border); background: var(--surface); color: var(--fg); cursor: pointer; }
.tp-btn:hover { background: var(--hover); }
.tp-btn-primary { background: var(--accent-bg); color: var(--accent-fg); border-color: var(--accent-bg); }
.tp-btn-primary:hover { background: var(--accent-bg); opacity: 0.88; }

/* ---------- Sign-in (signed-out front page) ---------- */
.signin { flex: 1; display: grid; place-items: center; padding: 48px 16px; position: relative; }
.signin-col { width: 100%; max-width: 360px; }
.signin-brand { text-align: center; margin-bottom: 22px; }
.signin-brand svg { width: 40px; height: 40px; margin: 0 auto 14px; display: block; }
.signin-brand h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.035em; color: var(--fg); }
.signin-brand p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.signin-card {
  display: flex; flex-direction: column; gap: 14px; padding: 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg);
}
.signin-foot { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--muted); }
.signin-foot a { margin-left: 6px; color: var(--fg-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.signin-foot a:hover { color: var(--fg); }
.signin-theme { position: absolute; top: 14px; right: 14px; }
.signin-home { position: absolute; top: 22px; left: 18px; margin: 0; }
.sso-buttons { display: flex; flex-direction: column; gap: 8px; }
.sso-divider { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.sso-divider::before, .sso-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Home report (signed-in front page) ---------- */
.report { max-width: 880px; }
.report-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.report-date { font-size: 13px; color: var(--muted); }
.report-head h1 { margin-top: 2px; font-size: 28px; font-weight: 600; letter-spacing: -0.035em; color: var(--fg); }
.report-lede-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.report-lede { font-size: 17px; line-height: 1.55; color: var(--fg-2); max-width: 62ch; }
.report-lede b { font-weight: 600; color: var(--fg); }
.t-ok { color: var(--ok); font-weight: 500; }
.t-danger { color: var(--danger); font-weight: 500; }
.report-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.report-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.report-stat .k { font-size: 12px; color: var(--muted); }
.report-stat .v { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; color: var(--fg); font-variant-numeric: tabular-nums; }
.report-section { margin-top: 30px; }
.report-section h2 { font-size: 14px; font-weight: 600; color: var(--fg); margin-bottom: 10px; display: flex; align-items: baseline; gap: 8px; }
.report-h-sub { font-size: 12px; font-weight: 400; color: var(--muted); }
.report-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.report-list { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.report-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.report-item:last-child, .report-row:last-child { border-bottom: 0; }
.report-item > .tree-dot { margin-top: 6px; }
.report-item.is-danger { background: color-mix(in srgb, var(--danger) 5%, var(--surface)); }
.report-item-body { flex: 1; min-width: 0; }
.report-item-title { font-size: 13.5px; font-weight: 500; color: var(--fg); }
.report-item-sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.report-item-sub code { font-family: 'Geist Mono', ui-monospace, Menlo, monospace; font-size: 11.5px; padding: 1px 5px; border-radius: 5px; background: var(--sub); border: 1px solid var(--border); color: var(--fg-2); margin-right: 4px; }
.report-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.report-time { flex-shrink: 0; min-width: 132px; white-space: nowrap; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.report-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-muted { flex-shrink: 0; font-size: 12px; font-weight: 400; color: var(--muted); }
.report-link { color: var(--fg); }
.report-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.report-empty { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px dashed var(--border); border-radius: 12px; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .report-split { grid-template-columns: 1fr; }
  .report-stats { grid-template-columns: 1fr 1fr; }
  .report-time { min-width: 0; }
}

/* Theme picker: app name field */
.tp-name-input { height: 30px; font-size: 12.5px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; margin-top: 64px; font-size: 12.5px; color: var(--muted); }
.site-footer .site-wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a:hover { color: var(--fg); }

/* ---------- Public landing (case study) ---------- */
.lp code { font-family: 'Geist Mono', ui-monospace, Menlo, monospace; font-size: 0.86em; padding: 0 5px; border-radius: 5px; background: var(--sub); border: 1px solid var(--border); color: var(--fg-2); }

.lp-intro { padding: 72px 0 56px; }
.lp-intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.lp-kicker { font-size: 12.5px; font-weight: 500; color: var(--brand); }
.lp-intro h1 { margin-top: 12px; font-size: clamp(32px, 4.4vw, 46px); line-height: 1.06; font-weight: 600; letter-spacing: -0.045em; color: var(--fg); }
.lp-lede { margin-top: 18px; font-size: 16px; line-height: 1.65; color: var(--muted); max-width: 52ch; }
.lp-ctas { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }

.lp-replay { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.lp-replay-bar { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.lp-replay-title { font-weight: 500; color: var(--fg); }
.lp-replay-clock { margin-left: auto; font-family: 'Geist Mono', ui-monospace, Menlo, monospace; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lp-replay-btn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); cursor: pointer; }
.lp-replay-btn:hover { background: var(--hover); color: var(--fg); }
.lp-replay-btn svg { width: 15px; height: 15px; }

.lp-replay-dag {
  position: relative; height: 150px; margin: 0; border-bottom: 1px solid var(--border);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 18px 18px;
}
.lp-replay-edges { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp-replay-edges path { fill: none; stroke: color-mix(in srgb, var(--brand) 40%, var(--edge)); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.lp-replay { border-top: 2px solid var(--brand); }
.lp-node {
  position: absolute; width: 20%; transform: translateY(-50%); margin-top: 12px;
  padding: 6px 8px 6px 20px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  font-size: 11.5px; font-weight: 500; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: var(--shadow); transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.lp-node b { font-weight: inherit; }
.lp-node .sm { display: none; }
.lp-node::before { content: ""; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 99px; background: var(--border-strong); opacity: 0.6; }
.lp-node[data-state="run"] { border-color: color-mix(in srgb, var(--warn) 60%, var(--border)); }
.lp-node[data-state="run"]::before { background: var(--warn); opacity: 1; animation: tree-pulse 1.2s ease-in-out infinite; }
.lp-node[data-state="ok"] { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.lp-node[data-state="ok"]::before { background: var(--ok); opacity: 1; }
.lp-node[data-state="bad"] { border-color: color-mix(in srgb, var(--danger) 55%, var(--border)); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.lp-node[data-state="bad"]::before { background: var(--danger); opacity: 1; }
.lp-node[data-state="wait"]::before { background: var(--info); opacity: 1; }

.lp-log { height: 262px; overflow-y: auto; padding: 10px 6px 12px; font-size: 12.5px; scroll-behavior: smooth; }
.lp-log li { display: grid; grid-template-columns: 62px 16px 1fr; gap: 6px; align-items: baseline; padding: 4px 8px; border-radius: 6px; animation: lp-in 0.35s var(--ease); }
.lp-log .t { font-family: 'Geist Mono', ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lp-log .i { text-align: center; font-weight: 600; color: var(--muted); }
.lp-log .m { color: var(--fg-2); line-height: 1.5; }
.lp-log .m b { color: var(--ok); font-weight: 600; }
.lp-log .lg-ok .i { color: var(--ok); }
.lp-log .lg-bad { background: color-mix(in srgb, var(--danger) 7%, transparent); }
.lp-log .lg-bad .i, .lp-log .lg-bad .m { color: var(--danger); }
.lp-log .lg-retry .i { color: var(--warn); }
.lp-log .lg-wait .i { color: var(--info); }
@keyframes lp-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.lp-section { padding: 72px 0; border-top: 1px solid var(--border); }
.lp-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; margin-bottom: 32px; max-width: 760px; }
.lp-num { font-family: 'Geist Mono', ui-monospace, Menlo, monospace; font-size: 13px; color: var(--brand); padding-top: 8px; }
.lp-head h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 600; letter-spacing: -0.035em; color: var(--fg); }
.lp-head p { margin-top: 8px; font-size: 15px; line-height: 1.65; color: var(--muted); }

.lp-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-left: 72px; }
.lp-code { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.lp-code.is-after { border-color: color-mix(in srgb, var(--ok) 35%, var(--border)); }
.lp-code-label { padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 500; color: var(--muted); background: var(--sub); }
.lp-code.is-after .lp-code-label { color: var(--ok); }
.lp-code pre { margin: 0; padding: 14px; overflow-x: auto; font-family: 'Geist Mono', ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.75; color: var(--fg-2); }
.lp-code pre .c { color: var(--muted); font-style: italic; }
.lp-code pre b { color: var(--fg); font-weight: 600; }
.lp-points { margin: 22px 0 0 72px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.lp-points b { display: block; font-weight: 500; color: var(--fg); }

.lp-concepts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-left: 72px; }
.lp-concept { padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.lp-concept svg { width: 100%; height: 56px; margin-bottom: 14px; }
/* Each concept card takes one color; shapes are tinted with it and the highlight path is drawn in it. */
.lp-concept { --c: var(--brand); }
.lp-concept:nth-child(2) { --c: var(--info); }
.lp-concept:nth-child(3) { --c: var(--warn); }
.lp-concept:nth-child(4) { --c: var(--ok); }
.lp-concept { border-top: 2px solid color-mix(in srgb, var(--c) 70%, var(--border)); }
.lp-concept svg * { fill: color-mix(in srgb, var(--c) 9%, transparent); stroke: color-mix(in srgb, var(--c) 45%, var(--border-strong)); stroke-width: 1.5; stroke-linecap: round; }
.lp-concept svg path { fill: none; }
.lp-concept svg .hl { stroke: var(--c); stroke-width: 2; }
.lp-concept svg .bad { stroke: var(--danger); fill: color-mix(in srgb, var(--danger) 14%, transparent); }
.lp-concept h3 { font-size: 14.5px; font-weight: 600; color: var(--fg); letter-spacing: -0.01em; }
.lp-concept p { margin-top: 6px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }

.lp-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin-left: 72px; }
.lp-note { padding: 18px 0; border-top: 1px solid var(--border); }
.lp-note h3 { font-size: 15px; font-weight: 600; color: var(--fg); letter-spacing: -0.015em; }
.lp-note p { margin-top: 6px; font-size: 14px; line-height: 1.65; color: var(--muted); }

.lp-facts { margin-left: 72px; border-top: 1px solid var(--border); }
.lp-facts div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.lp-facts dt { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.lp-facts dt::before { content: ""; width: 7px; height: 7px; border-radius: 2px; flex: none; background: var(--c, var(--brand)); }
.lp-facts div:nth-child(5n+2) { --c: var(--info); }
.lp-facts div:nth-child(5n+3) { --c: var(--warn); }
.lp-facts div:nth-child(5n+4) { --c: var(--ok); }
.lp-facts div:nth-child(5n+5) { --c: var(--danger); }
.lp-facts dd { color: var(--fg); }

@media (max-width: 960px) {
  .lp-intro-grid { grid-template-columns: 1fr; gap: 36px; }
  .lp-compare { grid-template-columns: 1fr; }
  .lp-concepts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .lp-intro { padding-top: 44px; }
  .lp-head { grid-template-columns: 1fr; }
  .lp-num { padding-top: 0; }
  .lp-compare, .lp-points, .lp-concepts, .lp-notes, .lp-facts { margin-left: 0; }
  .lp-compare, .lp-points, .lp-notes, .lp-concepts { grid-template-columns: 1fr; }
  .lp-facts div { grid-template-columns: 1fr; gap: 2px; }
  .lp-node { width: 22%; font-size: 10.5px; padding: 6px 6px 6px 15px; }
  .lp-node::before { left: 6px; }
  .lp-node .lg { display: none; }
  .lp-node .sm { display: inline; }
}

/* Landing: request a demo */
.lp-request-card { max-width: 760px; margin-left: 72px; padding: 22px; border: 1px solid var(--border); border-top: 2px solid var(--brand); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); }
.lp-request-card .alert { margin-bottom: 14px; }
.lp-request-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.lp-request-wide { grid-column: 1 / -1; }
.lp-request-card textarea.input { height: auto; min-height: 76px; padding-top: 8px; padding-bottom: 8px; resize: vertical; line-height: 1.5; }
.lp-request-card .opt { color: var(--muted); font-weight: 400; }
.lp-request-foot { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.lp-request-foot a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.lp-request-done h3 { font-size: 16px; font-weight: 600; color: var(--fg); }
.lp-request-done p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.lp-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 700px) {
  .lp-request-card { margin-left: 0; padding: 18px; }
  .lp-request-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Users page: access requests */
.req-section { margin-bottom: 28px; }
.req-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.req-head h2 { font-size: 15px; font-weight: 600; color: var(--fg); display: flex; align-items: center; gap: 8px; }
.req-msg { max-width: 280px; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); cursor: pointer; }
.check-row input { width: 15px; height: 15px; accent-color: var(--brand); }
