:root {
  --bg: #f6f5f1;
  --card: #ffffff;
  --text: #1c1b18;
  --muted: #6f6c64;
  --line: #e4e1d8;
  --accent: #2f6f5e;
  --accent-soft: #e6f0ec;
  --ok: #2e8b57;
  --bad: #c0392b;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412;
    --card: #1d1d1a;
    --text: #edebe4;
    --muted: #9a968b;
    --line: #2d2c28;
    --accent: #7cc4ae;
    --accent-soft: #1f2e29;
    --ok: #5fc48a;
    --bad: #e8786b;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 20px 48px;
}

.eyebrow {
  margin: 0 0 10px;
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--accent);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lead {
  margin: 0 0 40px;
  max-width: 52ch;
  color: var(--muted);
  font-size: 17px;
}

.path {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.node,
.fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.node.accent {
  background: var(--accent-soft);
  border-color: transparent;
}

.label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.value {
  font: 600 17px/1.4 var(--mono);
  overflow-wrap: anywhere;
}

.hint {
  font-size: 13px;
  color: var(--muted);
}

.hint b {
  font-weight: 600;
  color: var(--text);
}

.arrow {
  align-self: center;
  width: 1px;
  height: 26px;
  background: var(--line);
  position: relative;
}

.arrow::after {
  content: "";
  position: absolute;
  left: -4px;
  bottom: 0;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: rotate(45deg);
}

.branches,
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.facts {
  margin-top: 28px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.visits {
  list-style: none;
  margin: 4px 0;
  padding: 0;
  font: 13px/1.7 var(--mono);
}

.visits li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.visits li span:last-child {
  color: var(--muted);
}

.fact .value {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}

.ok .dot {
  background: var(--ok);
}

.bad .dot {
  background: var(--bad);
}

footer {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

footer p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

code {
  font-family: var(--mono);
}

button {
  font: inherit;
  font-weight: 600;
  color: var(--bg);
  background: var(--text);
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
}

button:hover {
  opacity: 0.85;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 560px) {
  main {
    padding-top: 40px;
  }

  .branches,
  .data {
    grid-template-columns: 1fr;
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
