* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #1a1210;
  color: #e8d5c4;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.header-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  color: #c4956a;
  opacity: 0.6;
}

.header-sources {
  margin-left: 8px;
  letter-spacing: 1px;
  opacity: 0.8;
}

.header-source-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.header-source-name {
  margin-right: 12px;
  text-transform: capitalize;
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.month-nav button {
  background: none;
  border: 1px solid #3d2a1a;
  color: #c4956a;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.month-nav button:hover {
  border-color: #c4956a;
}

.month-title {
  font-family: -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #c4956a;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.5;
}

/* Day headers */
.day-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.day-header {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #c4956a;
  padding: 8px 0;
  opacity: 0.6;
}

/* Calendar grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 24px;
}

.cell {
  min-height: 90px;
  border-radius: 4px;
  padding: 6px 8px;
  transition: all 0.15s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.cell.empty {
  background: transparent;
  cursor: default;
  min-height: 0;
}

.cell.no-data {
  background: #1e1612;
  opacity: 0.3;
  min-height: 40px;
}

.cell.quiet,
.cell.active,
.cell.busy,
.cell.very-busy {
  background: #6a4428;
}

.cell.raw-only {
  background: #3a2818;
  border: 1px dashed #5a4030;
}

.cell-raw-label {
  font-size: 8px;
  color: #8a6a50;
  margin-top: 3px;
  font-style: italic;
}

.cell.selected {
  outline: 2px solid #e8a060;
  outline-offset: -2px;
}

.cell:not(.empty):not(.no-data):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.cell-number {
  font-size: 13px;
  font-weight: 700;
  color: #d4845a;
  margin-bottom: 3px;
}

.cell.no-data .cell-number {
  color: #3a2818;
}

.cell-bullets {
  font-size: 9px;
  line-height: 1.4;
}

.cell-bullet {
  display: flex;
  align-items: flex-start;
  gap: 3px;
  margin-bottom: 1px;
}

.cell-bdot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.cell-bdot.anthropics { background: #d4845a; }
.cell-bdot.openai { background: #6ab0d0; }
.cell-bdot.trend { background: #d4c45a; }
.cell-bdot.parallel { background: #7ad47a; }
.cell-bdot.diverge { background: #d47a7a; }
.cell-bdot.signal { background: #b47ad4; }

.cell-btext {
  color: #d8c8b8;
}

.cell-quiet {
  font-size: 8px;
  color: #6a5a48;
  font-style: italic;
  margin-top: 1px;
}

/* Detail panel */
.detail-panel {
  background: #211811;
  border: 1px solid #3d2a1a;
  border-radius: 8px;
  min-height: 60px;
}

.detail-panel.has-content {
  padding: 24px;
}

.detail-empty {
  padding: 24px;
  text-align: center;
  color: #5a4a38;
  font-style: italic;
  font-size: 14px;
}

.detail-date {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #d4845a;
  margin-bottom: 20px;
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section-head {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #9a7a60;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #2d2118;
}

.d-bullet {
  padding: 10px 0;
  border-bottom: 1px solid #261e16;
  cursor: pointer;
}

.d-bullet:last-child {
  border-bottom: none;
}

.d-bullet-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.d-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 3px;
  letter-spacing: 0.5px;
}

.d-tag.NEW { background: #1e3a1e; color: #7ad47a; }
.d-tag.FIX { background: #3a1e1e; color: #d47a7a; }
.d-tag.CHANGE { background: #3a2e1e; color: #d4b47a; }
.d-tag.INFO { background: #2a2a2a; color: #8a8a8a; }
.d-tag.TREND { background: #3a3a1a; color: #d4c45a; }
.d-tag.PARALLEL { background: #1e3a1e; color: #7ad47a; }
.d-tag.DIVERGE { background: #3a1e1e; color: #d47a7a; }
.d-tag.SIGNAL { background: #2a1a3a; color: #b47ad4; }

.d-text {
  font-size: 14px;
  line-height: 1.5;
  color: #d8c8b8;
}

.d-text a {
  color: #c4956a;
  text-decoration: none;
}

.d-text a:hover {
  text-decoration: underline;
}

.d-text code {
  background: #2a1e14;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 12px;
  color: #e8c8a8;
}

.d-evidence {
  margin-top: 4px;
  font-size: 12px;
  color: #8a7a6a;
}

.d-evidence a {
  color: #c4956a;
  text-decoration: none;
  cursor: pointer;
}

.d-evidence a:hover {
  text-decoration: underline;
  color: #e8b080;
}

.d-expand {
  margin-top: 10px;
  padding: 12px 14px;
  background: #1a1210;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.7;
  color: #a89888;
  display: none;
}

.d-expand.open {
  display: block;
}

.d-source {
  margin-top: 8px;
  font-size: 12px;
}

.d-source a {
  color: #c4956a;
  text-decoration: none;
}

.d-source a:hover {
  text-decoration: underline;
}

.detail-meta {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #2d2118;
  font-size: 11px;
  color: #4a3a2a;
  text-align: right;
}

/* Mobile: vertical day list */
@media (max-width: 768px) {
  .container {
    padding: 16px 12px;
  }

  .header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .month-title {
    font-size: 16px;
  }

  .day-headers {
    display: none;
  }

  .calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .cell {
    min-height: auto;
    padding: 12px 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }

  .cell.empty {
    display: none;
  }

  .cell.no-data {
    display: none;
  }

  .cell-number {
    font-size: 14px;
    margin-bottom: 0;
    min-width: 28px;
  }

  .cell-bullets {
    flex: 1;
    font-size: 12px;
  }

  .cell-btext {
    -webkit-line-clamp: 1;
  }

  .cell-raw-label {
    font-size: 10px;
  }

  .cell-quiet {
    font-size: 10px;
  }

  .detail-panel {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .detail-date {
    font-size: 18px;
  }

  .d-text {
    font-size: 13px;
  }

  .d-bullet-row {
    flex-wrap: wrap;
  }

  .d-expand {
    font-size: 12px;
  }

  .d-evidence {
    font-size: 11px;
  }
}
