:root {
  color-scheme: dark;
  --bg: #0d1117;
  --ink: #f0f6fc;
  --muted: #8b949e;
  --line: #30363d;
  --panel: #161b22;
  --missing: #30363d;
  --openai: #3fb950;
  --anthropic: #f59e0b;
  --google_gemini: #58a6ff;
  --microsoft_copilot: #a371f7;
  --day-size: 14px;
  --day-gap: 4px;
  --day-radius: 3px;
  --weekday-width: 14px;
  --grid-body-gap: 8px;
  --month-font-size: 11px;
  --tracker-width: 620px;
  --sheet-width: min(clamp(420px, 42vw, 760px), calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.shell {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4dvh, 32px) 16px;
  overflow: hidden;
}

.site-footer {
  width: 100%;
  flex: 0 0 auto;
  padding: 0 16px clamp(10px, 2dvh, 18px);
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.site-footer a {
  color: rgba(139, 148, 158, 0.72);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--muted);
}

.tracker {
  width: min(var(--tracker-width), 100%);
  min-width: 0;
  max-height: 100%;
}

.tracker-header {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

h1 {
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 4px;
  font-weight: 680;
  letter-spacing: 0;
}

p {
  margin: 0;
  color: var(--muted);
}

.signal-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(22, 27, 34, 0.72);
}

.signal-option {
  min-width: 76px;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}

.signal-option.selected {
  color: var(--ink);
  background: var(--line);
}

.legend {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 13px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--missing);
}

.swatch.openai { background: var(--openai); }
.swatch.anthropic { background: var(--anthropic); }
.swatch.google_gemini { background: var(--google_gemini); }
.swatch.microsoft_copilot { background: var(--microsoft_copilot); }
.swatch.missing { background: var(--missing); opacity: 0.45; }

.grid {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  padding: 3px 0 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 148, 158, 0.45) transparent;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.grid::-webkit-scrollbar {
  height: 6px;
}

.grid::-webkit-scrollbar-track {
  background: transparent;
}

.grid::-webkit-scrollbar-thumb {
  background: rgba(139, 148, 158, 0.45);
  border-radius: 999px;
}

.calendar {
  width: max-content;
  margin: 0;
}

.month-labels {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--day-size);
  gap: var(--day-gap);
  min-height: 18px;
  margin-left: calc(var(--weekday-width) + var(--grid-body-gap));
  color: var(--muted);
  font-size: var(--month-font-size);
}

.month-label {
  white-space: nowrap;
}

.grid-body {
  display: flex;
  gap: var(--grid-body-gap);
}

.weekday-labels {
  display: grid;
  grid-template-rows: repeat(7, var(--day-size));
  gap: var(--day-gap);
  color: var(--muted);
  font-size: 10px;
  line-height: var(--day-size);
  width: var(--weekday-width);
}

.heatmap {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--day-size);
  grid-template-rows: repeat(7, var(--day-size));
  gap: var(--day-gap);
  width: max-content;
}

.day {
  position: relative;
  width: var(--day-size);
  height: var(--day-size);
  padding: 0;
  border-radius: var(--day-radius);
  border: 1px solid rgba(240, 246, 252, 0.06);
  appearance: none;
  -webkit-appearance: none;
  background: var(--missing);
  opacity: 0.42;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(88, 166, 255, 0.22);
}

.day.empty {
  cursor: default;
  pointer-events: none;
  visibility: hidden;
}

.day[data-state="complete"] {
  opacity: 1;
}

.day.openai { background: var(--openai); }
.day.anthropic { background: var(--anthropic); }
.day.google_gemini { background: var(--google_gemini); }
.day.microsoft_copilot { background: var(--microsoft_copilot); }
.day.no_signal { background: var(--missing); }

.day.openai,
.day.anthropic,
.day.google_gemini,
.day.microsoft_copilot,
.day.tied_signal {
  border-color: var(--bg);
  background-clip: padding-box;
}

.day:focus-visible {
  outline: 2px solid #0969da;
  outline-offset: 2px;
}

.day.selected {
  outline: 2px solid rgba(240, 246, 252, 0.82);
  outline-offset: 2px;
}

.popover {
  position: fixed;
  z-index: 20;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  font-size: 13px;
}

.popover.sheet {
  inset: 0 0 0 auto;
  width: var(--sheet-width);
  max-width: calc(100vw - 40px);
  height: 100dvh;
  overflow: hidden;
  padding: 0;
  border-width: 0 0 0 1px;
  border-radius: 0;
  animation: sheet-in 180ms ease-out;
}

.popover.sheet .detail-scroll {
  height: 100%;
  overflow: auto;
  padding: 34px 32px 42px;
}

@keyframes sheet-in {
  from {
    opacity: 0.86;
    transform: translateX(28px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (min-width: 901px) {
  :root {
    --tracker-width: 760px;
    --day-size: 17px;
    --day-gap: 5px;
    --day-radius: 4px;
    --weekday-width: 15px;
    --grid-body-gap: 9px;
    --month-font-size: 12px;
  }

  h1 {
    font-size: 25px;
  }

  .legend {
    font-size: 14px;
  }

  .signal-option {
    min-width: 82px;
    font-size: 13px;
  }
}

@media (min-width: 1440px) {
  :root {
    --tracker-width: 820px;
    --day-size: 20px;
    --day-gap: 6px;
    --day-radius: 5px;
    --weekday-width: 16px;
    --grid-body-gap: 10px;
    --month-font-size: 13px;
  }

  h1 {
    font-size: 28px;
  }
}

.close-detail {
  display: none;
}

.popover.sheet .close-detail {
  display: flex;
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--bg);
  font: inherit;
  cursor: pointer;
}

.popover h2 {
  font-size: 15px;
  margin: 0 0 8px;
}

.popover.sheet h2 {
  max-width: calc(100% - 48px);
  font-size: 21px;
  line-height: 1.25;
  margin-bottom: 12px;
}

.detail-title {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.detail-title h2,
.popover.sheet .detail-title h2 {
  margin-bottom: 0;
}

.hn-front-link {
  width: fit-content;
  color: #58a6ff;
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
}

.hn-front-link:hover {
  text-decoration: underline;
}

.popover .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted);
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
}

.judgement {
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 0;
}

.judgement.secondary {
  color: var(--muted);
}

.detail-section {
  margin-top: 22px;
}

.detail-section + .detail-section,
.unmentioned + .detail-section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.detail-header .meta {
  justify-content: flex-end;
  margin-bottom: 0;
}

.judgement a,
.provider-body a,
.source-row a {
  color: #58a6ff;
  text-decoration: none;
}

.judgement a:hover,
.provider-body a:hover,
.source-row a:hover {
  text-decoration: underline;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.evidence-summary {
  cursor: pointer;
  list-style: none;
  margin-bottom: 0;
}

.evidence-summary::-webkit-details-marker {
  display: none;
}

.evidence-summary span:first-child::after {
  content: " +";
  font-weight: 400;
}

.evidence-section[open] .evidence-summary {
  margin-bottom: 10px;
}

.evidence-section[open] .evidence-summary span:first-child::after {
  content: " -";
}

.section-heading span + span {
  font-weight: 400;
}

.summary-block {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.provider-list,
.source-list {
  display: grid;
  gap: 8px;
}

.provider-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--provider-color);
  border-radius: 8px;
  padding: 10px 11px;
  background: #0f141b;
}

.provider-rank {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 11px;
}

.provider-body {
  min-width: 0;
}

.provider-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.provider-topline strong {
  color: var(--ink);
}

.provider-topline span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

.provider-body p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.balance {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 7px;
  color: var(--muted);
  font-size: 11px;
}

.balance span,
.source-chip {
  border: 1px solid rgba(139, 148, 158, 0.26);
  border-radius: 999px;
  padding: 2px 7px;
}

.source-row {
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

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

.source-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.source-excerpt {
  margin-top: 7px;
  color: var(--ink);
  line-height: 1.42;
}

.source-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.source-chip.positive {
  border-color: rgba(63, 185, 80, 0.36);
  background: rgba(63, 185, 80, 0.08);
}

.source-chip.negative {
  border-color: rgba(248, 81, 73, 0.36);
  background: rgba(248, 81, 73, 0.08);
}

.annotation-details {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.annotation-details summary {
  cursor: pointer;
  width: max-content;
}

.annotation-details[open] summary {
  margin-bottom: 8px;
}

.annotation-list {
  display: grid;
  gap: 8px;
}

.annotation {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.annotation strong {
  color: var(--ink);
}

.annotation p {
  flex-basis: 100%;
  line-height: 1.35;
}

.unmentioned {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.unmentioned span:first-child {
  font-weight: 650;
}

@media (max-width: 900px) {
  :root {
    --tracker-width: 760px;
    --day-size: 20px;
    --day-radius: 5px;
    --weekday-width: 14px;
    --grid-body-gap: 6px;
    --month-font-size: 10px;
  }

  .tracker {
    width: min(760px, 100%);
  }

  .calendar {
    margin: 0;
  }

  .month-labels {
    margin-left: calc(var(--weekday-width) + var(--grid-body-gap));
  }
}

@media (pointer: coarse) {
  :root {
    --day-size: 24px;
    --day-gap: 5px;
    --day-radius: 6px;
    --weekday-width: 16px;
    --grid-body-gap: 7px;
    --month-font-size: 11px;
  }
}

@media (max-width: 720px) {
  :root {
    --day-size: 24px;
    --day-gap: 5px;
    --day-radius: 7px;
    --weekday-width: 14px;
    --grid-body-gap: 6px;
    --month-font-size: 10px;
  }

  .tracker {
    width: 100%;
  }

  .shell {
    place-items: center stretch;
    padding-top: clamp(14px, 3dvh, 22px);
    padding-bottom: clamp(14px, 3dvh, 22px);
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-top {
    align-items: flex-start;
  }

  .signal-option {
    min-width: 60px;
    padding-left: 6px;
    padding-right: 6px;
    font-size: 11px;
  }

  .grid {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .calendar {
    margin: 0;
  }

  .month-labels {
    margin-left: calc(var(--weekday-width) + var(--grid-body-gap));
  }
}

@media (max-width: 900px) {
  .popover.modal {
    inset: 0;
    width: auto;
    max-height: none;
    height: 100dvh;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--bg);
    box-shadow: none;
    font-size: 15px;
  }

  .popover.modal .detail-scroll {
    height: 100%;
    overflow: auto;
    padding: 64px 18px 28px;
  }

  .popover.modal h2 {
    font-size: 22px;
    margin-bottom: 12px;
  }

  .popover.modal .detail-title h2 {
    margin-bottom: 0;
  }

  .popover.modal .close-detail {
    display: flex;
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    background: var(--panel);
    font: inherit;
    cursor: pointer;
  }

  .detail-header,
  .provider-topline,
  .unmentioned {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .detail-header .meta {
    justify-content: flex-start;
  }

  .provider-topline span {
    text-align: left;
  }

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

  .balance {
    grid-column: 1 / -1;
  }
}
