:root {
  --bg: #0b0d12;
  --bg-grad-a: #12151d;
  --bg-grad-b: #0b0d12;
  --card: #161a23;
  --border: #262b38;
  --text: #e6e8ee;
  --text-dim: #9aa1b2;
  --accent: #7c9eff;
  --accent-2: #7cffc4;
  --accent-3: #ff9d7c;
  --mono-bg: #0d0f16;
  --success: #4ade80;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% -10%, rgba(124,158,255,0.15), transparent 40%),
    radial-gradient(circle at 100% 10%, rgba(124,255,196,0.10), transparent 45%),
    linear-gradient(180deg, var(--bg-grad-a), var(--bg-grad-b));
}

.site-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
}

.layout {
  display: flex;
  flex: 1;
  width: 100%;
  min-height: 0;
}

.panel {
  padding: 40px;
  overflow-y: auto;
}

.panel-left {
  flex: 0 0 520px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.panel-right {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (max-width: 860px) {
  .layout { flex-direction: column; height: auto; min-height: 100vh; }
  .panel-left { flex: none; border-right: none; border-bottom: 1px solid var(--border); }
  .panel-right { flex: 1; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tagline {
  color: var(--text-dim);
  font-size: 13.5px;
  white-space: nowrap;
}
.tagline::before {
  content: "—";
  margin-right: 9px;
  opacity: 0.45;
}

.lanes {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.lanes span {
  width: 5px;
  height: 26px;
  border-radius: 3px;
}
.lanes span:nth-child(1) { background: var(--accent); }
.lanes span:nth-child(2) { background: var(--accent-2); height: 18px; align-self: flex-end; }
.lanes span:nth-child(3) { background: var(--accent-3); height: 22px; align-self: flex-end; }

h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-dim);
  margin: 4px 0 24px;
  font-size: 14.5px;
  line-height: 1.5;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.step-label .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(124,158,255,0.15);
  color: var(--accent);
  font-size: 11px;
}

.os-select {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.os-select label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.os-select input[type="radio"] {
  accent-color: var(--accent);
  cursor: pointer;
}

.command-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 16px;
}

pre#git-log-command {
  flex: 1;
  margin: 0;
  padding: 14px 16px;
  background: var(--mono-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: "SF Mono", Consolas, "Cascadia Code", monospace;
  font-size: 10.5px;
  color: var(--accent-2);
  overflow-x: auto;
  white-space: pre;
}

button {
  font-family: inherit;
  font-weight: 600;
  font-size: 13.5px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
}

#copy-btn {
  padding: 8px 12px;
  font-size: 11.5px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  white-space: nowrap;
  width: 100%;
}
#copy-btn:hover { background: rgba(255,255,255,0.08); border-color: #384056; }
#copy-btn.copied { color: var(--success); border-color: var(--success); }

textarea {
  width: 100%;
  flex: 1;
  padding: 14px 16px;
  background: var(--mono-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: "SF Mono", Consolas, "Cascadia Code", monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  min-height: 140px;
}
textarea::placeholder { color: #565d70; }
textarea.example { color: var(--text-dim); }
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,158,255,0.15);
}

.layout-stats {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-dim);
}

.layout-stats .stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.layout-stats .stat-value {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.viz-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.viz-toolbar input[type="range"] {
  accent-color: var(--accent);
  width: 160px;
  cursor: pointer;
}

.commit-search {
  background: var(--mono-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 12.5px;
  padding: 4px 8px;
  width: 140px;
}

.commit-search:focus {
  outline: none;
  border-color: var(--accent);
}

/* Marks the commit the search box currently matches. Overrides the node's own
   outline (a plain SVG presentation attribute, so any class-based rule beats it). */
.commit-node.search-match .node-outline {
  stroke: var(--accent-2);
  stroke-width: 3;
}

.lanes-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  /* Empty diagram space drags to scroll; .commit-node overrides this with grab. */
  cursor: all-scroll;
}

/* While panning the cursor reads as grabbing, including where it passes over a node:
   the gesture is captured by the container, so the node's own grab cursor would
   otherwise flicker in mid-drag over something that cannot be picked up. */
.lanes-view.panning,
.lanes-view.panning * {
  cursor: grabbing;
  user-select: none;
}

.lanes-view svg {
  flex-shrink: 0;
  display: block;
}

.commit-node {
  cursor: grab;
  touch-action: none;
}
.commit-node:active {
  cursor: grabbing;
}

.viz-empty {
  cursor: default;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}

