@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@1,6..72,500&display=swap');

:root {
  --paper: #f3f0e8;
  --ink: #18201e;
  --muted: #6d746f;
  --line: #d7d3c8;
  --card: rgba(255, 255, 252, .72);
  --mint: #2c8f70;
  --blue: #4c75a8;
  --violet: #7b62a8;
  --amber: #b27c38;
  --shadow: 0 18px 50px rgba(43, 48, 43, .07);
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-width: 320px; font-family: Manrope, system-ui, sans-serif; background: radial-gradient(circle at 85% 4%, rgba(137, 177, 157, .16), transparent 26rem), linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px); background-size: auto, 36px 36px, 36px 36px; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.page-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.topbar { height: 96px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-content: center; gap: 2px; }
.brand-mark i { width: 14px; height: 2px; display: block; background: var(--ink); transform: skewX(-25deg); }
.brand strong { display: block; font-size: 14px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font: 10px DM Mono, monospace; letter-spacing: .1em; text-transform: uppercase; }
.live-state { display: flex; align-items: center; gap: 9px; color: var(--muted); font: 11px DM Mono, monospace; text-transform: uppercase; letter-spacing: .08em; }
.live-state > span { width: 7px; height: 7px; border-radius: 50%; background: #949b96; box-shadow: 0 0 0 4px rgba(148,155,150,.13); }
.live-state.connected > span { background: var(--mint); box-shadow: 0 0 0 4px rgba(44,143,112,.13); animation: breathe 2.4s ease infinite; }

.hero { padding: 75px 0 66px; display: grid; grid-template-columns: 1fr 370px; align-items: end; gap: 80px; }
.eyebrow { margin: 0 0 20px; color: var(--mint); font: 11px DM Mono, monospace; font-weight: 500; letter-spacing: .13em; }
h1 { margin: 0; max-width: 690px; font-size: clamp(52px, 7vw, 88px); line-height: .91; font-weight: 600; letter-spacing: -.07em; }
h1 em { color: var(--mint); font-family: Newsreader, Georgia, serif; font-weight: 500; letter-spacing: -.045em; }
.lede { max-width: 560px; margin: 26px 0 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.signal-card { border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); padding: 24px; backdrop-filter: blur(10px); }
.signal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; color: var(--muted); font: 11px DM Mono, monospace; text-transform: uppercase; letter-spacing: .08em; }
.pulse-ring { width: 9px; height: 9px; border: 2px solid var(--mint); border-radius: 50%; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.metrics div { display: flex; flex-direction: column; gap: 5px; }
.metrics strong { font-size: 28px; letter-spacing: -.05em; }
.metrics span { color: var(--muted); font: 10px DM Mono, monospace; text-transform: uppercase; }
.signal-card > p { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.controls { position: sticky; top: 0; z-index: 5; display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(243, 240, 232, .92); backdrop-filter: blur(14px); }
.filter-row { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.filter { flex: none; border: 1px solid transparent; background: transparent; padding: 8px 11px; border-radius: 4px; font: 11px DM Mono, monospace; cursor: pointer; transition: .18s ease; }
.filter:hover { background: rgba(255,255,255,.6); }
.filter.active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.dot { width: 6px; height: 6px; display: inline-block; margin-right: 7px; border-radius: 50%; }
.dot.mint { background: #5cb292; }.dot.blue { background: #7298c4; }.dot.violet { background: #957cc2; }.dot.amber { background: #c99554; }
.search { flex: 0 0 245px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.55); padding: 8px 12px; }
.search span { width: 12px; height: 12px; border: 1.5px solid var(--muted); border-radius: 50%; position: relative; }
.search span:after { content: ""; position: absolute; width: 5px; height: 1.5px; background: var(--muted); transform: rotate(45deg); right: -4px; bottom: -2px; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 12px; color: var(--ink); }

.timeline-section { padding: 62px 0 90px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 36px; }
.section-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.035em; }
.section-heading span { color: var(--muted); font: 11px DM Mono, monospace; }
.timeline { position: relative; }
.timeline:before { content: ""; position: absolute; left: 161px; top: 9px; bottom: 0; width: 1px; background: var(--line); }
.day { display: grid; grid-template-columns: 130px 1fr; gap: 64px; margin-bottom: 46px; }
.day-label { position: sticky; top: 80px; align-self: start; color: var(--muted); font: 11px DM Mono, monospace; line-height: 1.6; text-transform: uppercase; letter-spacing: .06em; }
.day-label strong { display: block; color: var(--ink); font-weight: 500; }
.day-events { display: grid; gap: 13px; min-width: 0; }
.event { --accent: var(--mint); position: relative; border: 1px solid var(--line); background: var(--card); padding: 20px 22px; box-shadow: 0 4px 22px rgba(43,48,43,.025); transition: transform .18s ease, box-shadow .18s ease; }
.event:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.event:before { content: ""; position: absolute; left: -39px; top: 25px; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); box-shadow: 0 0 0 5px var(--paper); }
.event.commit_branch { --accent: var(--blue); }.event.commit_pr,.event.pull_request { --accent: var(--violet); }.event.review { --accent: var(--amber); }.event.comment_other { --accent: #9a665e; }
.event-top { display: flex; justify-content: space-between; gap: 18px; }
.event-main { min-width: 0; }
.event-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--accent); font: 10px DM Mono, monospace; text-transform: uppercase; letter-spacing: .09em; }
.event-kicker span { padding: 3px 6px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 3px; }
.event h3 { margin: 0; font-size: 15px; line-height: 1.45; letter-spacing: -.02em; font-weight: 600; overflow-wrap: anywhere; }
.event h3 a { text-decoration: none; }.event h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.event .body { max-width: 760px; margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; white-space: pre-wrap; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.event-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 16px; color: var(--muted); font: 10px DM Mono, monospace; }
.actor { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.actor img,.actor-fallback { width: 19px; height: 19px; border-radius: 50%; background: #d8d4ca; display: inline-grid; place-content: center; font-size: 8px; }
.branch { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.copy { border: 1px solid var(--line); background: rgba(255,255,255,.65); padding: 7px 9px; border-radius: 4px; font: 10px DM Mono, monospace; cursor: pointer; transition: .15s ease; white-space: nowrap; }
.copy:hover { border-color: var(--ink); background: #fff; }
.review-state { font-weight: 500; }
.review-state.approved { color: var(--mint); }.review-state.changes_requested { color: #a35349; }
.load-more { display: block; margin: 24px auto 0; border: 1px solid var(--ink); background: transparent; padding: 11px 18px; font: 11px DM Mono, monospace; cursor: pointer; }
.empty { padding: 70px 20px; border: 1px dashed var(--line); text-align: center; color: var(--muted); }
.loading-card { margin-left: 194px; padding: 24px; border: 1px solid var(--line); display: grid; gap: 12px; }
.loading-card span { height: 10px; width: 35%; background: #ddd9cf; animation: shimmer 1.2s ease infinite alternate; }.loading-card span:nth-child(2) { width: 70%; }.loading-card span:nth-child(3) { width: 50%; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0 38px; border-top: 1px solid var(--line); color: var(--muted); font: 10px DM Mono, monospace; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 10px 14px; background: var(--ink); color: var(--paper); font: 11px DM Mono, monospace; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes breathe { 50% { box-shadow: 0 0 0 7px rgba(44,143,112,.06); } }
@keyframes shimmer { to { opacity: .35; } }

@media (max-width: 850px) {
  .page-shell { width: min(100% - 30px, 720px); }
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 55px 0 46px; }
  .signal-card { width: 100%; }
  .controls { align-items: stretch; flex-direction: column; }
  .search { flex-basis: auto; width: 100%; }
  .timeline:before { left: 8px; }
  .day { grid-template-columns: 1fr; gap: 17px; padding-left: 34px; }
  .day-label { position: static; }
  .event:before { left: -31px; }
  .loading-card { margin-left: 34px; }
}
@media (max-width: 540px) {
  .topbar { height: 78px; }
  .live-state { font-size: 0; }.live-state span { margin-right: 2px; }
  h1 { font-size: 50px; }
  .event { padding: 18px; }
  .event-top { display: block; }
  .actions { justify-content: flex-start; margin-top: 16px; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *,*:before,*:after { animation: none !important; transition: none !important; } }
