/* Week chart. Solid colour only: no rgba, no opacity, no gradients, no shadows.
   Window identity is an UNDERLINE beneath the letter, never a ring.
   Every cell is a fixed three-row grid, so the eyebrow, the letter and the
   bottom label sit on the same baseline in every cell across the whole table. */

:root{
  /* The seven authored window colours, restored from archive/ported-source/
     cycles.html where they appear identically in three places. Every earlier
     deviation was an agent raising contrast on its own judgement: E had been
     greyed from black, F greyed from white, D muddied from yellow to a gold.
     They are the tool's own colours and they are not to be "fixed". */
  --p-a:#2563EB; --p-b:#4CAF50; --p-c:#00CED1; --p-d:#FFD700;
  --p-e:#000000; --p-f:#FFFFFF; --p-g:#B22222;
  --cell:#E4D3AF;
  --cell-today:#F7EED9;
  --cell-edge:#C39A47;
}

.chart-wrap{ min-width: 820px; }

table.chart{
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 4px;
}

/* ---- headers ---- */
.chart thead th{
  font-family: var(--f-menu);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0 0 10px;
  text-align: center;
}
.chart thead .hdr-today{
  color: var(--cheiro-light-gold);
  font-size: 15px;
  letter-spacing: .22em;
  border-bottom: 2px solid var(--cheiro-light-gold);
  padding-bottom: 6px;
}
.hdr-time, .hdr-ord{ width: 92px; }

/* ---- the time / ordinal columns ---- */
.td-time, .td-ord{
  font-family: var(--f-menu);
  font-size: 13px;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--turquoise);
  text-align: center;
  white-space: nowrap;
  border: 0;
}
/* the row you are in is marked on both edges, so the live cell is findable */
.chart tr.live-row .td-time,
.chart tr.live-row .td-ord{
  color: var(--cheiro-light-gold);
  font-weight: 600;
}

/* ---- the cell ---- */
/* NEVER put display:grid on a <td> - it drops the cell out of table layout
   and the whole table collapses to one column. Alignment comes from fixed
   heights on the three children instead. */
.dcell{
  background: var(--cell);
  border: 1px solid var(--cell-edge);
  border-radius: var(--r-control, 4px);
  padding: 8px 6px;
  color: var(--ink);
  text-align: center;
  vertical-align: top;
}
.dcell.today-bg{ background: var(--cell-today); }
/* The window you are in. Gold scores 2.29 against this parchment and vanished;
   red is 5.40 and turquoise-deep 4.71, so the ring is red. */
.dcell.is-now{ border: 3px solid var(--suit-red); background: var(--cell-today); }

.dcell-top{
  font-family: var(--f-body);
  font-style: italic;
  font-size: 12px;
  line-height: 1.25;
  color: #171717;
  height: 2.8em;
  display: flex; align-items: flex-end; justify-content: center;
}
.dcell-ltr{
  font-family: var(--f-head);
  font-style: italic;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  margin: 7px 0 0;
  padding-bottom: 5px;
  display: inline-block;
  border-bottom: 3px solid var(--cell-edge);
}
.period-a .dcell-ltr{ border-bottom-color: var(--p-a); }
.period-b .dcell-ltr{ border-bottom-color: var(--p-b); }
.period-c .dcell-ltr{ border-bottom-color: var(--p-c); }
.period-d .dcell-ltr{ border-bottom-color: var(--p-d); }
.period-e .dcell-ltr{ border-bottom-color: var(--p-e); }
.period-f .dcell-ltr{ border-bottom-color: var(--p-f); }
.period-g .dcell-ltr{ border-bottom-color: var(--p-g); }

.dcell-bot{
  font-family: var(--f-menu);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #171717;
  line-height: 1.2;
  height: 2.6em;
  margin-top: 7px;
  display: flex; align-items: flex-start; justify-content: center;
}

/* the progress strip is gone: it was a stray red line outside the cell and it
   duplicated the countdown that already sits above the grid */
.prow, .prow-active, .pbar{ display: none; }

/* ---- narrow screens: one card per day ---- */
.mobile-chart{ display: none; }
.mobile-day-card{
  border: 1px solid var(--turquoise-deep);
  border-radius: var(--r-card, 6px);
  padding: var(--s2, 16px);
}
.mobile-day-card.is-today{ border-color: var(--cheiro-light-gold); }
.mobile-day-title{
  font-family: var(--f-menu);
  font-weight: 600; font-size: 13px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 var(--s2, 16px);
}
.mobile-day-card.is-today .mobile-day-title{ color: var(--cheiro-light-gold); }
.mobile-period{
  background: var(--cell);
  border: 1px solid var(--cell-edge);
  border-radius: var(--r-control, 4px);
  padding: 8px 10px;
  margin-bottom: 6px;
  color: var(--ink);
}
.mobile-period.is-now{ border: 3px solid var(--suit-red); background: var(--cell-today); }
.mobile-period-line{
  display: grid;
  grid-template-columns: 2.2em 8.5em 1fr;
  align-items: baseline;
  gap: 10px;
}
.mobile-letter{
  font-family: var(--f-head); font-style: italic; font-weight: 600;
  font-size: 19px; color: var(--ink);
  border-bottom: 3px solid var(--cell-edge); padding-bottom: 2px;
  justify-self: start;
}
.period-a .mobile-letter{ border-bottom-color: var(--p-a); }
.period-b .mobile-letter{ border-bottom-color: var(--p-b); }
.period-c .mobile-letter{ border-bottom-color: var(--p-c); }
.period-d .mobile-letter{ border-bottom-color: var(--p-d); }
.period-e .mobile-letter{ border-bottom-color: var(--p-e); }
.period-f .mobile-letter{ border-bottom-color: var(--p-f); }
.period-g .mobile-letter{ border-bottom-color: var(--p-g); }
.mobile-period-time{
  font-family: var(--f-menu); font-size: 13px; letter-spacing: .04em;
  color: #171717; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mobile-period-words{
  font-family: var(--f-body); font-style: italic; font-size: 14px; color: #171717;
}
.mobile-period-num{ display: none; }

@media (max-width: 900px){
  .chart-wrap{ display: none; }
  .mobile-chart{ display: grid; gap: 14px; width: 100%; }
  #week{ overflow-x: visible; }
}
