/* --- personal year -----------------------------------------------------------------
   A ring of nine years and a month of days. The year you are in and today are
   the only gold; a picked year or day is lifted in ink instead, so "now" and
   "the one being looked at" never read as the same mark.
   ------------------------------------------------------------------------- */

.pyear__readout {
  margin: 0;
  max-width: 46ch;
  min-height: 3.2em;
  text-align: center;
  color: var(--paper);
}

.pyear__year { cursor: pointer; outline: none; }
.pyear__sector {
  fill: var(--ink-deep);
  stroke: var(--line);
  stroke-width: 1.5;
  transition: fill 140ms linear, stroke 140ms linear;
}
.pyear__year:hover .pyear__sector,
.pyear__year.is-picked .pyear__sector { fill: var(--ink-mid); }
.pyear__year:focus-visible .pyear__sector { stroke: var(--paper-dim); stroke-width: 3; }
.pyear__year.is-now .pyear__sector { fill: var(--ink-mid); stroke: var(--sol); stroke-width: 3; }

.pyear__num {
  fill: var(--paper);
  font-family: var(--font-display);
  font-size: 72px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.pyear__year.is-now .pyear__num { fill: var(--sol-lift); }
.pyear__years {
  fill: var(--paper-dim);
  font-family: var(--font-body);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.pyear__big {
  fill: var(--paper);
  font-family: var(--font-display);
  font-size: 170px;
  font-variant-numeric: tabular-nums;
}
.pyear__name {
  fill: var(--paper);
  font-family: var(--font-display);
  font-size: 48px;
}
.pyear__dates {
  fill: var(--paper-dim);
  font-family: var(--font-body);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}
.pyear__month {
  fill: var(--sol-lift);
  font-family: var(--font-body);
  font-size: 26px;
}

/* the calendar: the table frame is the Moon calendar's, the cells are buttons */
.pyear__cal { overflow-x: auto; }
.pyear__table td { padding: 0; border: 1px solid var(--line); vertical-align: top; }
.pyear__table td.is-empty { border: 0; }
.pyear__daybtn {
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  min-height: 5.4rem;
  margin: 0;
  padding: 0.35rem;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--paper);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms linear;
}
.pyear__daybtn:hover { background: var(--ink-deep); }
.pyear__daybtn[aria-pressed="true"] {
  background: var(--ink-mid);
  outline: 2px solid var(--paper-mute);
  outline-offset: -2px;
}
.pyear__daybtn.is-today { outline: 2px solid var(--sol); outline-offset: -2px; }
.pyear__daybtn:focus-visible { outline: 2px solid var(--paper); outline-offset: -6px; }
.pyear__date {
  font-size: var(--step--1);
  color: var(--paper-dim);
  font-variant-numeric: tabular-nums;
}
.pyear__daybtn.is-today .pyear__date { color: var(--sol-lift); }
.pyear__pd {
  align-self: center;
  justify-self: center;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pyear__day { margin-top: 2rem; }
.pyear__dayread {
  margin: 0;
  min-height: 3.2em;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--paper);
}

@media (max-width: 34rem) {
  .pyear__daybtn { min-height: 3.8rem; padding: 0.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pyear__sector, .pyear__daybtn { transition: none; }
}
