/* ------------------------------------------------------------------ weekly page */

.brand:hover h1 { color: var(--cyan); }

.weekly {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px 34px;
}

.wk-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 6px 0 18px;
}

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--faint);
}

.wk-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.wk-range {
  margin: 7px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.wk-nav { display: flex; gap: 7px; flex: none; }
.wk-nav button {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #22334d;
  border-radius: 8px;
  background: rgba(76, 201, 240, 0.05);
  color: #9fb3cf;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wk-nav button:hover:not(:disabled) {
  color: var(--cyan);
  border-color: rgba(76, 201, 240, 0.45);
  background: rgba(76, 201, 240, 0.10);
}
.wk-nav button:disabled { opacity: 0.35; cursor: default; }

/* ------------------------------------------------------------------ stats */

.wk-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.wk-stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 17px 13px;
  background:
    radial-gradient(220px 120px at 0% 0%, rgba(76, 201, 240, 0.08), transparent 70%),
    var(--panel-2);
}
.wk-stat small {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--faint);
}
.wk-stat b {
  display: block;
  margin: 5px 0 3px;
  font-family: var(--mono);
  font-size: 30px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.wk-stat span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.wk-stat span.up { color: var(--green); }
.wk-stat span.down { color: #ff8a6b; }

/* ------------------------------------------------------------------ grid */

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

.wk-card { padding: 16px 18px 18px; }
.wk-top { grid-column: span 5; }
.wk-heat-card { grid-column: span 7; }
.wk-daily-card { grid-column: span 5; display: flex; flex-direction: column; }
.wk-wiki-card { grid-column: span 4; }
.wk-region-card { grid-column: span 3; }
.wk-air-card { grid-column: span 12; }

.wk-card .panel-head { margin-bottom: 12px; }
.wk-card h2 { font-size: 12px; }

.wk-note {
  margin: 9px 0 0;
  font-size: 10.5px;
  color: var(--faint);
}

/* ------------------------------------------------------------------ top list */

.wk-list { list-style: none; margin: 0; padding: 0; }
.wk-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid rgba(26, 41, 64, 0.55);
}
.wk-list li:last-child { border-bottom: 0; }
.wk-list .empty { color: var(--faint); font-size: 12px; padding: 18px 0; }
.wk-list .mag {
  flex: none;
  width: 40px;
  text-align: right;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}
.wk-list .m3 .mag { color: #6fd3f2; }
.wk-list .m4 .mag { color: var(--amber); }
.wk-list .m5 .mag { color: var(--orange); }
.wk-list .m6 .mag { color: var(--red); }
.wk-list .wk-item { min-width: 0; flex: 1; }
.wk-list .wk-item a {
  display: block;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wk-list .wk-item small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wk-list .wk-wiki-n {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cyan);
}
.wk-list .wk-wiki-n small { color: var(--faint); font-size: 9.5px; }

/* ------------------------------------------------------------------ heatmap */

.wk-heat-wrap { overflow-x: auto; }
.wk-heat {
  display: grid;
  grid-template-columns: 26px repeat(24, minmax(9px, 1fr));
  gap: 3px;
  min-width: 420px;
}
.wk-heat .wk-d {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--faint);
  display: flex;
  align-items: center;
}
.wk-heat .wk-h {
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--faint);
  text-align: center;
}
.wk-heat .wk-cell {
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  background: rgba(76, 201, 240, 0.06);
}
.wk-heat .wk-cell.l1 { background: rgba(76, 201, 240, 0.16); }
.wk-heat .wk-cell.l2 { background: rgba(76, 201, 240, 0.34); }
.wk-heat .wk-cell.l3 { background: rgba(76, 201, 240, 0.58); }
.wk-heat .wk-cell.l4 { background: rgba(255, 200, 87, 0.78); }
.wk-heat .wk-cell.l5 { background: rgba(255, 122, 69, 0.92); }

.wk-heat-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--faint);
}
.wk-heat-legend i {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: rgba(76, 201, 240, 0.06);
}
.wk-heat-legend i:nth-of-type(1) { background: rgba(76, 201, 240, 0.16); }
.wk-heat-legend i:nth-of-type(2) { background: rgba(76, 201, 240, 0.34); }
.wk-heat-legend i:nth-of-type(3) { background: rgba(76, 201, 240, 0.58); }
.wk-heat-legend i:nth-of-type(4) { background: rgba(255, 200, 87, 0.78); }
.wk-heat-legend i:nth-of-type(5) { background: rgba(255, 122, 69, 0.92); }
.wk-heat-legend span { margin: 0 4px; }

/* ------------------------------------------------------------------ daily bars */

.wk-daily {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: 1;
  height: auto;
  min-height: 132px;
  max-height: 360px;
  padding-top: 6px;
}
.wk-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  height: 100%;
  min-width: 0;
}
.wk-day .bar {
  width: 100%;
  max-width: 34px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, rgba(76, 201, 240, 0.85), rgba(76, 201, 240, 0.28));
  min-height: 2px;
  transition: height 0.3s ease;
}
.wk-day .wk-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
}
.wk-day .bar.peak { background: linear-gradient(180deg, rgba(255, 122, 69, 0.95), rgba(255, 122, 69, 0.32)); }
.wk-day.future .bar { background: rgba(80, 96, 120, 0.18); }
.wk-day .n {
  font-family: var(--mono);
  font-size: 10px;
  color: #9fb3cf;
}
.wk-day .d {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.25;
  color: var(--faint);
  white-space: nowrap;
}
.wk-day .d b { color: #c6d4e8; font-weight: 600; }

/* ------------------------------------------------------------------ regions */

.wk-regions { display: flex; flex-direction: column; gap: 7px; }
.wk-region {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 11.5px;
}
.wk-region .name { color: #b9c7dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-region .n { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.wk-region .track {
  grid-column: 1 / -1;
  height: 3px;
  border-radius: 2px;
  background: rgba(76, 201, 240, 0.07);
  overflow: hidden;
  margin-top: -3px;
}
.wk-region .fill { height: 100%; border-radius: 2px; background: rgba(76, 201, 240, 0.55); }

/* ------------------------------------------------------------------ air */

.wk-air-chart { width: 100%; height: 180px; display: block; }
.wk-air-meta {
  display: flex;
  gap: 18px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--faint);
}
.wk-air-meta b { color: #c6d4e8; font-family: var(--mono); font-weight: 500; }

.wk-foot {
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #43516a;
}
.wk-foot a { color: #6d829f; }
.wk-foot a:hover { color: var(--cyan); }

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1080px) {
  .wk-top, .wk-heat-card, .wk-daily-card, .wk-wiki-card, .wk-region-card, .wk-air-card {
    grid-column: span 6;
  }
  .wk-air-card { grid-column: span 12; }
}

@media (max-width: 900px) {
  .weekly { padding: 0 16px 26px; }
  .wk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wk-top, .wk-heat-card, .wk-daily-card, .wk-wiki-card, .wk-region-card, .wk-air-card {
    grid-column: span 12;
  }
  .wk-title { font-size: 24px; }
  .wk-head { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (max-width: 560px) {
  .wk-stat b { font-size: 25px; }
  .wk-heat { min-width: 360px; }
  .wk-air-chart { height: 120px; }
  .wk-daily { height: 112px; }
}
