:root {
  --bg: #f4f4f0;
  --panel: #fbfbf8;
  --text: #111;
  --muted: #5f5f59;
  --line: #161616;
  --accent: #161616;
  --soft: #e7e7df;
  --ink-2: #292929;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(244, 244, 240, 0.96)),
    repeating-linear-gradient(
      90deg,
      rgba(17, 17, 17, 0.025) 0,
      rgba(17, 17, 17, 0.025) 1px,
      transparent 1px,
      transparent 24px
    ),
    var(--bg);
}

a {
  color: inherit;
}

code {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.92em;
}

.shell {
  width: min(1280px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 12px 0 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
}

.masthead,
.intro,
.panel,
.stat {
  box-shadow: 8px 8px 0 rgba(17, 17, 17, 0.04);
}

.masthead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

h2 {
  font-size: 18px;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.masthead-meta {
  max-width: 320px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}

.masthead-meta a {
  display: inline-block;
  margin-top: 6px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.intro {
  margin-top: 12px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.intro p {
  max-width: 720px;
  font-size: 14px;
}

.window-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
}

button.active,
button.is-selected {
  background: var(--accent);
  color: #f7f7f2;
}

.stats {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 14px 16px;
}

.stat-label {
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.stat-value {
  margin-top: 10px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.stat-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.dashboard {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 14px;
}

.panel-head p {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status {
  color: var(--muted);
  font-size: 14px;
}

.list-block {
  display: grid;
  gap: 10px;
}

.pager {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.pager-button {
  min-width: 32px;
  padding: 6px 8px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 12px;
  align-items: center;
}

.row-button {
  width: 100%;
  text-align: left;
  padding: 10px;
}

.row-copy {
  min-width: 0;
}

.row-line,
.stack-bar {
  height: 14px;
  background: var(--soft);
  border: 1px solid rgba(17, 17, 17, 0.14);
  margin-top: 6px;
}

.row-fill {
  height: 100%;
  background: var(--ink-2);
}

.row-title,
.commit-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.row-meta,
.commit-meta,
.stack-detail {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.row-value {
  font-size: 18px;
  text-align: right;
  letter-spacing: -0.04em;
}

.stack-card {
  border: 1px solid rgba(17, 17, 17, 0.14);
  padding: 10px;
}

.stack-card.is-selected {
  border-color: var(--line);
}

.stack-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 0;
  border: 0;
  background: transparent;
}

.stack-summary {
  margin-top: 4px;
}

.stack-bar {
  display: flex;
  overflow: hidden;
}

.stack-segment {
  border: 0;
  padding: 0;
  min-width: 8px;
  height: 100%;
}

.stack-segment:hover,
.stack-segment:focus,
.stack-segment.is-selected {
  outline: 1px solid var(--line);
  outline-offset: -1px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18px, 1fr));
  gap: 6px;
  align-items: end;
  min-height: 220px;
}

.timeline-bar {
  min-width: 0;
}

.timeline-column {
  height: 180px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  background: var(--soft);
  display: flex;
  align-items: end;
}

.timeline-fill {
  width: 100%;
  background: var(--ink-2);
}

.timeline-meta {
  margin-top: 6px;
  font-size: 10px;
  color: var(--muted);
}

.timeline-meta strong {
  display: block;
  font-size: 11px;
  color: var(--text);
}

.commit-list {
  display: grid;
  gap: 10px;
}

.commit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.16);
}

.commit:first-child {
  border-top: 0;
  padding-top: 0;
}

.commit-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tag {
  border: 1px solid var(--line);
  padding: 4px 6px;
  font-size: 11px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .shell {
    width: min(100vw - 16px, 1280px);
    padding-top: 8px;
  }

  .masthead,
  .intro,
  .panel-head,
  .commit {
    display: block;
  }

  .masthead-meta,
  .panel-head p {
    margin-top: 10px;
    text-align: left;
  }

  .panel-actions {
    display: block;
    margin-top: 10px;
  }

  .panel-actions button {
    margin-top: 8px;
  }

  .stats,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .row {
    grid-template-columns: minmax(0, 1fr) 52px;
  }

  .commit-tags {
    margin-top: 10px;
    justify-content: flex-start;
  }

  .timeline {
    grid-template-columns: repeat(auto-fit, minmax(24px, 1fr));
  }
}
