/* The site around the configurator: the graph and each design's page.
   Same voice as the app — black, white, Gestalt, pills, quiet grey labels. */

@font-face {
  font-family: 'Gestalt';
  src: url('../Gestalt_241024-70.otf') format('opentype');
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: #000; color: #fff; }
body {
  font-family: 'Gestalt', -apple-system, 'Helvetica Neue', 'Inter', 'Arial', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 13px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

.bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
}
.logo { font-size: 15px; font-weight: 600; }
.spacer { flex: 1; }
.pill {
  font: inherit; font-size: 12px; padding: 4px 12px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.35); background: transparent; color: #fff; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.pill:hover { border-color: rgba(255,255,255,0.7); }
.pill.active { background: #fff; color: #000; border-color: #fff; }
.dim { color: rgba(255,255,255,0.5); }
.faint { color: rgba(255,255,255,0.3); }
.num { font-variant-numeric: tabular-nums; }

/* ─── Graph ─────────────────────────────────────────────── */

body[data-site="graph"] { height: 100vh; overflow: hidden; }
body[data-site="graph"] #site { position: fixed; inset: 0; }
#graph { position: absolute; inset: 0; width: 100%; height: 100%; }
#graph-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
#graph-legend { position: absolute; left: 20px; bottom: 14px; z-index: 2; font-size: 12px; }
#graph-legend span { margin-right: 14px; }
#graph-detail { position: absolute; right: 20px; bottom: 14px; z-index: 2; max-width: 340px; text-align: right; font-size: 12px; }
.node-label { font-size: 11px; fill: rgba(255,255,255,0.75); pointer-events: none; }
.node-label.design { font-size: 13px; fill: #fff; }
.node-label.hash { font-size: 10px; fill: rgba(255,255,255,0.4); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

/* ─── Design site ───────────────────────────────────────── */

/* The configurator owns the wheel (it zooms), so it stops short of the fold
   and leaves a band of page underneath: the band scrolls, the pill jumps. */
.hero { position: relative; height: calc(100vh - 52px); }
.hero iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.hero-foot { height: 52px; display: flex; align-items: center; justify-content: center;
  border-top: 1px solid rgba(255,255,255,0.08); }
.sheet { max-width: 980px; margin: 0 auto; padding: 72px 20px 120px; }
.sheet h1 { font-size: 34px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em; }
.sheet h2 { font-size: 11px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.4); margin: 48px 0 12px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.fact .v { font-size: 22px; font-variant-numeric: tabular-nums; }
.rows .row { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0;
  border-top: 1px solid rgba(255,255,255,0.08); }
.rows .row:last-child { border-bottom: 1px solid rgba(255,255,255,0.08); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── Split view ────────────────────────────────────────── */

.hero-foot { gap: 8px; }
.split { display: none; position: absolute; inset: 0; grid-template-columns: 1fr 1fr; background: #000; z-index: 1; }
.hero.split-on .split { display: grid; }
.hero.split-on iframe { visibility: hidden; }
.split-pane { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.split-left { border-right: 1px solid rgba(255,255,255,0.08); }
.split-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 12px; }
.split-head .pill:disabled { opacity: 0.3; cursor: default; }
#sp-drawing { flex: 0 0 44%; width: 100%; }
#sp-drawing.stale { opacity: 0.35; }
.split-left { position: relative; }
.sp-tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.sp-tabs .tab { font: inherit; font-size: 12px; background: none; border: 0; color: rgba(255,255,255,0.45);
  padding: 2px 8px; border-radius: 12px; cursor: pointer; }
.sp-tabs .tab:hover { color: #fff; }
.sp-tabs .tab.active { color: #000; background: #fff; }

/* A sketch: geometry white, construction dashed; dimensions in three states,
   as Fusion draws them — driving, driven (in parentheses), set here. */
.sp-geo { fill: none; stroke: #fff; stroke-width: 1.1; }
.sp-geo.construction { stroke: rgba(255,255,255,0.35); stroke-dasharray: 5 4; stroke-width: 0.8; }
.sp-dimg { cursor: pointer; }
.sp-dimg line, .sp-dimg .sp-centre { stroke: rgba(255,255,255,0.55); stroke-width: 0.7; fill: none; }
.sp-dimg .sp-centre { fill: rgba(255,255,255,0.55); }
.sp-dtext { fill: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.sp-dimg.driven .sp-dtext { fill: rgba(255,255,255,0.5); }
.sp-dimg.driven line { stroke: rgba(255,255,255,0.3); }
.sp-dimg.user .sp-dtext { fill: #000; paint-order: stroke; stroke: #fff; stroke-width: 9px; stroke-linejoin: round; }
.sp-dimg:hover .sp-dtext, .sp-dimg.here .sp-dtext { text-decoration: underline; }
#sp-drawing.tracing .sp-dimg { opacity: 0.3; }
#sp-drawing.tracing .sp-dimg.here, #sp-drawing.tracing .sp-dimg.up, #sp-drawing.tracing .sp-dimg.down { opacity: 1; }
.sp-subtitle { fill: rgba(255,255,255,0.3); font-size: 10px; }
.sp-features { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 6px; min-height: 22px; font-size: 11px; }
.sp-feature { font: inherit; font-size: 11px; background: none; color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 12px; padding: 1px 9px; }
.sp-feature.user { border-color: #fff; color: #fff; }
.sp-feature.here, .sp-feature.up, .sp-feature.down { border-color: rgba(255,255,255,0.7); }
.sp-editor { position: absolute; z-index: 5; width: 180px; background: #fff; color: #000; border-radius: 6px;
  padding: 6px 8px; box-shadow: 0 6px 24px rgba(0,0,0,0.6); font-size: 11px; }
.sp-editor[hidden] { display: none; }
.sp-ename { display: block; color: rgba(0,0,0,0.5); margin-bottom: 2px; }
.sp-editor input { width: 100%; border: 0; border-bottom: 1px solid #000; font: inherit; font-size: 13px; outline: none; padding: 1px 0; }
.sp-eerr { display: block; color: #c0391b; margin-top: 3px; }
.sp-eerr:empty { display: none; }
#sp-ego { flex: 1; width: 100%; min-height: 0; }
.sp-body { fill: none; stroke: rgba(255,255,255,0.75); stroke-width: 0.6; }
#sp-drawing.tracing .sp-body { stroke: rgba(255,255,255,0.18); }
#sp-drawing.tracing .sp-body.lit { stroke: #fff; stroke-width: 0.9; }
.sp-dim { stroke: rgba(255,255,255,0.3); stroke-width: 0.6; }
.sp-dimtext { fill: rgba(255,255,255,0.5); font-size: 10px; font-variant-numeric: tabular-nums; }

.sp-relations { flex: 1; overflow: auto; padding: 4px 16px 24px; font-size: 12px; }
.sp-group { margin-top: 14px; }
.sp-relations { position: relative; }
.sp-group.current .sp-gname { color: #fff; }
.sp-gname { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 4px; }
.sp-row { display: grid; grid-template-columns: 8.5em minmax(8em, 1fr) 4.5em 3.5em 4.5em 1.2em; align-items: center; gap: 8px;
  padding: 2px 0; border-top: 1px solid rgba(255,255,255,0.06); }
.sp-thead { position: sticky; top: 0; background: #000; z-index: 1; color: rgba(255,255,255,0.35); font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase; border-top: 0; padding: 6px 0 4px; }
.sp-row input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,0.12);
  color: #fff; font: inherit; padding: 1px 0; }
.sp-row input::placeholder { color: rgba(255,255,255,0.32); }
.sp-row input:focus { outline: none; border-bottom-color: #fff; }
.sp-row.pinned input, .sp-row.expression input { border-bottom-color: rgba(255,255,255,0.6); }
.sp-val { text-align: right; }
.sp-row.composed .sp-val, .sp-row.proportional .sp-val { color: rgba(255,255,255,0.6); }
.sp-row.error { background: rgba(255,120,90,0.08); }
.sp-row.error input { border-bottom-color: #ff8a70; color: #ffb4a2; }
.sp-row.changed .sp-delta { color: #fff; }
.sp-delta { color: rgba(255,255,255,0.4); text-align: right; font-size: 11px; }
.sp-how { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.sp-unpin { background: none; border: 0; color: rgba(255,255,255,0.6); cursor: pointer; font: inherit; padding: 0; }
.sp-unpin:hover { color: #fff; }
.sp-row.here { background: rgba(255,255,255,0.08); }
.sp-row.up .sp-key::before { content: '↑ '; color: rgba(255,255,255,0.5); }
.sp-row.down .sp-key::before { content: '↓ '; color: rgba(255,255,255,0.5); }
.sp-row.up, .sp-row.down { background: rgba(255,255,255,0.03); }

.sp-edge { stroke: rgba(255,255,255,0.25); stroke-width: 1; }
.sp-edge.lineage { stroke: #fff; }
.sp-edge.near { stroke-dasharray: 3 4; stroke: rgba(255,255,255,0.35); }
.sp-edge.dropped { stroke-dasharray: 2 3; stroke: rgba(255,255,255,0.15); }
.sp-edge.binds { stroke: rgba(255,255,255,0.12); }
.sp-elabel { fill: rgba(255,255,255,0.45); font-size: 10px; text-anchor: middle; font-variant-numeric: tabular-nums; }
.sp-node circle { fill: #fff; }
.sp-node.draft circle { fill: #000; stroke: #fff; stroke-width: 1.5; }
.sp-node.standard circle { fill: #000; stroke: rgba(255,255,255,0.6); }
.sp-node.design circle { fill: rgba(255,255,255,0.7); }
.sp-node rect { fill: #f2ece1; }
.sp-node.new rect { fill: #000; stroke: #f2ece1; stroke-width: 1.5; }
.sp-node.dropped rect { fill: none; stroke: rgba(255,255,255,0.3); stroke-dasharray: 2 2; }
.sp-node.dropped text { opacity: 0.4; }
.sp-label { fill: #fff; font-size: 11px; }
.sp-node.self .sp-label, .sp-node.draft .sp-label { font-size: 13px; }
.sp-sub { fill: rgba(255,255,255,0.4); font-size: 10px; font-variant-numeric: tabular-nums; }
.sp-summary { padding: 10px 16px 16px; font-size: 12px; line-height: 1.6; }
.sp-summary .warn { color: #ffb4a2; }
