/* Claude tombstones. Stone slabs on the monk night sky.
   Light theme keeps the same shapes on warm paper. */

:root {
  --rip-stone: color-mix(in srgb, var(--mk-surface) 86%, #78716c);
  --rip-stone-2: color-mix(in srgb, var(--mk-surface-2) 80%, #57534e);
  --rip-ink: var(--mk-text);
  --rip-line: color-mix(in srgb, #a8a29e 28%, var(--mk-border));
  --rip-candle: #f59e0b;
  --rip-moss: var(--mk-muted);
}

[data-theme="dark"] {
  --rip-stone: #17191f;
  --rip-stone-2: #1e2129;
  --rip-line: rgba(214, 211, 209, .16);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --rip-stone: #17191f;
    --rip-stone-2: #1e2129;
    --rip-line: rgba(214, 211, 209, .16);
  }
}

body {
  background:
    radial-gradient(900px 420px at 50% -80px, color-mix(in srgb, var(--rip-candle) 16%, transparent), transparent 70%),
    var(--mk-bg);
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 8% 18%, rgba(255,255,255,.75) 50%, transparent 51%),
    radial-gradient(1px 1px at 18% 62%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 28% 28%, rgba(253,230,138,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 42% 74%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 22%, rgba(255,255,255,.65) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 76% 48%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 16%, rgba(253,230,138,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 70%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 54% 12%, rgba(255,255,255,.55) 50%, transparent 51%);
  opacity: .9;
}
[data-theme="light"] .sky { opacity: .25; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .sky { opacity: .22; }
}

.mk-header, main, .mk-footer { position: relative; z-index: 1; }

.mk-header .is-on {
  color: var(--mk-text);
  border-color: var(--rip-line);
  background: color-mix(in srgb, var(--rip-candle) 12%, transparent);
}
.rip-tabs { display: none; }

.hero {
  position: relative;
  padding: 48px 0 12px;
  max-width: 820px;
}
.hero .mk-h1 {
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: -0.03em;
  max-width: 14ch;
}
.hero .mk-lede { max-width: 46rem; }
.fresh {
  color: var(--mk-subtle);
  font-size: 13px;
  margin: 8px 0 0;
}

.orbit {
  position: absolute;
  width: min(520px, 90vw);
  height: 150px;
  border: 1px solid color-mix(in srgb, var(--rip-candle) 35%, transparent);
  border-radius: 50%;
  top: 18px;
  right: -40px;
  transform: rotate(-18deg);
  pointer-events: none;
}
.orbit i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rip-candle);
  box-shadow: 0 0 12px var(--rip-candle);
  top: 50%;
  left: -4px;
  offset-path: ellipse(50% 50% at 50% 50%);
  animation: orbit 28s linear infinite;
}
@keyframes orbit {
  to { offset-distance: 100%; }
}

.stack { display: flex; flex-direction: column; gap: 18px; padding-bottom: 64px; }

.wind {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px 28px;
  align-items: end;
  padding: 22px 24px;
}
.wind-n {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0;
}
.wind-n b {
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wind-n span, .wind-sentence, .wind-note { color: var(--mk-text-2); }
.wind-sentence { margin: 0; font-size: 16px; max-width: 42rem; }
.wind-note { margin: 8px 0 0; font-size: 13px; color: var(--mk-subtle); }
.spark { width: min(280px, 40vw); height: 56px; color: var(--rip-candle); }

.alive {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--rip-line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--rip-stone) 70%, transparent);
}
.alive b { display: block; margin-bottom: 2px; }
.alive p { margin: 0; color: var(--mk-muted); font-size: 14px; }
.candle {
  width: 10px;
  height: 16px;
  border-radius: 6px 6px 3px 3px;
  background: radial-gradient(circle at 50% 30%, #fde68a, var(--rip-candle) 45%, #b45309 80%);
  box-shadow: 0 0 14px color-mix(in srgb, var(--rip-candle) 70%, transparent);
  justify-self: center;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.filters .f {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--mk-subtle);
  min-width: 140px;
}
.filters .mk-input { height: 42px; min-width: 160px; }
.filters .mk-btn { height: 42px; }

.day { margin-top: 8px; }
.day-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 18px 0 10px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .04em;
  color: var(--mk-muted);
}
.day-h b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--mk-subtle);
  font-weight: 600;
}
.day-h::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--rip-line), transparent);
  order: -1;
  max-width: 28px;
}

.yard { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.stone {
  position: relative;
  padding: 14px 16px 12px;
  border-radius: 18px 18px 12px 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, white 5%, transparent), transparent 42%),
    var(--rip-stone);
  border: 1px solid var(--rip-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
[data-theme="light"] .stone {
  background: linear-gradient(180deg, #fff, var(--mk-surface) 40%);
  box-shadow: var(--mk-shadow-1);
}
.stone::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--rip-candle) 70%, transparent), transparent);
}
.stone-top, .stone-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}
.stone-top { color: var(--mk-subtle); font-size: 13px; font-variant-numeric: tabular-nums; }
.stone-top time { color: var(--mk-text-2); }
.src {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--rip-line);
  color: var(--mk-text-2);
  text-decoration: none;
  font-size: 12px;
}
.src:hover { border-color: var(--rip-candle); color: var(--mk-text); }
.who { color: var(--mk-muted); text-decoration: none; }
.who:hover { color: var(--mk-accent-ink); }
.score { margin-left: auto; }
.epitaph {
  margin: 8px 0 10px;
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stone-foot .origin {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--mk-muted);
  font-size: 13px;
  text-decoration: none;
}
.stone-foot .origin svg { width: 14px; height: 14px; }
.stone-foot .origin:hover { color: var(--mk-accent-ink); }
.empty { color: var(--mk-muted); padding: 12px 0 4px; }

.more-wrap { display: flex; justify-content: center; margin: 8px 0; }

.runs { color: var(--mk-text-2); }
.runs summary { cursor: pointer; color: var(--mk-muted); }
.runs-note { color: var(--mk-subtle); font-size: 13px; }
.runs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.run {
  display: grid;
  grid-template-columns: 120px 120px 100px 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
}
.run small { grid-column: 1 / -1; color: var(--mk-subtle); }
.run-error b { color: var(--mk-warn); }
.run-ok b { color: var(--mk-ok); }

.totals {
  display: flex;
  gap: 22px;
  margin-top: 18px;
}
.totals p { margin: 0; }
.totals b {
  display: block;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.totals span { color: var(--mk-muted); font-size: 13px; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-bottom: 72px;
}
.stat-card { padding: 18px 18px 14px; }
.stat-card:first-child,
.stat-card:nth-child(2),
.stat-card:nth-child(10),
.stat-grid .alive { grid-column: 1 / -1; }
.stat-note, .caveat { color: var(--mk-subtle); font-size: 13px; margin: 4px 0 10px; }
.caveat { margin-bottom: 0; }

.chart { width: 100%; height: 140px; display: block; }
.chart rect { fill: color-mix(in srgb, var(--rip-candle) 78%, #78716c); }
.axis {
  display: flex;
  justify-content: space-between;
  color: var(--mk-subtle);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

.hbars { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.hbars li { display: grid; grid-template-columns: minmax(88px, 140px) 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.hb-track { height: 8px; border-radius: 99px; background: var(--mk-surface-3); overflow: hidden; }
.hb-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #78716c, var(--rip-candle)); }
.hb-n { font-variant-numeric: tabular-nums; color: var(--mk-text-2); }
.hb-n small { margin-left: 6px; color: var(--mk-subtle); }

.heat { display: flex; flex-direction: column; gap: 3px; overflow-x: auto; }
.heat-hours, .heat-row { display: grid; grid-template-columns: 36px repeat(24, minmax(12px, 1fr)); gap: 3px; align-items: center; }
.heat-hours b { font-size: 10px; font-weight: 500; color: var(--mk-subtle); text-align: center; }
.heat-row span { font-size: 11px; color: var(--mk-muted); }
.heat-row i {
  display: block;
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--mk-surface-3);
}
.heat-row i[data-lv="1"] { background: color-mix(in srgb, var(--rip-candle) 22%, var(--mk-surface-3)); }
.heat-row i[data-lv="2"] { background: color-mix(in srgb, var(--rip-candle) 40%, var(--mk-surface-3)); }
.heat-row i[data-lv="3"] { background: color-mix(in srgb, var(--rip-candle) 58%, #78716c); }
.heat-row i[data-lv="4"] { background: color-mix(in srgb, var(--rip-candle) 78%, #44403c); }
.heat-row i[data-lv="5"] { background: var(--rip-candle); }

.prose { padding: 8px 22px 18px; max-width: 760px; }
.prose h2 { font-size: 18px; margin: 22px 0 8px; }
.prose p, .prose li { color: var(--mk-text-2); line-height: 1.65; }
.prose code { font-family: var(--mk-mono); font-size: .92em; }

.mk-footer .disclaimer { max-width: 70rem; }

@media (max-width: 640px) {
  .rip-tabs {
    display: flex;
    gap: 6px;
    padding: 0 16px 12px;
  }
  .rip-tabs a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: var(--mk-muted);
    border: 1px solid var(--rip-line);
    border-radius: 999px;
    padding: 8px 0;
    font-size: 14px;
  }
  .rip-tabs a[aria-current="page"] {
    color: var(--mk-text);
    border-color: color-mix(in srgb, var(--rip-candle) 55%, var(--rip-line));
    background: color-mix(in srgb, var(--rip-candle) 14%, transparent);
  }
}

@media (max-width: 800px) {
  .wind, .alive, .stat-grid { grid-template-columns: 1fr; }
  .stat-card:first-child, .stat-card:nth-child(2), .stat-card:nth-child(10) { grid-column: auto; }
  .spark { width: 100%; }
  .orbit { display: none; }
  .run { grid-template-columns: 1fr 1fr; }
  .score { margin-left: 0; }
  .hero { padding-top: 28px; }
  .hbars li { grid-template-columns: 1fr auto; }
  .hb-name { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .orbit i { animation: none; }
}
