.month-article {
  padding-top: 8px;
}

.month-article a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: .22em;
}

.month-estimator {
  margin-block: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.month-controls {
  display: grid;
  gap: 12px;
  padding: clamp(16px, 4vw, 28px);
  background: var(--light);
  border-radius: 7px 7px 0 0;
}

.month-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.month-options button {
  min-width: 66px;
  min-height: 44px;
  padding: 5px 16px;
  border: 1px solid #819f92;
  border-radius: 25px;
  background: white;
  color: var(--ink);
  transition: background-color 160ms, color 160ms, border-color 160ms;
}

.month-options button[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.month-article .month-summary {
  margin: 0;
  color: var(--ink);
}

.month-summary strong {
  display: inline-block;
  font-size: clamp(20px, 5vw, 30px);
  font-variant-numeric: tabular-nums;
}

.month-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: clamp(12px, 3vw, 16px);
  text-align: left;
}

.month-table caption {
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

.month-table th,
.month-table td {
  padding: clamp(8px, 2.5vw, 16px);
  border-top: 1px solid var(--line);
}

.month-table tbody tr {
  transition: background-color 180ms;
}

.month-table tbody .month-selected {
  background: var(--light);
  font-weight: 700;
}

.month-next {
  margin-top: 32px;
}

@media (prefers-reduced-motion: reduce) {
  .month-options button,
  .month-table tbody tr {
    transition: none;
  }
}

.month-picker[hidden] { display:none }
.month-picker-label,
.month-calendar figcaption {
  font-weight:600;
  color:var(--ink);
}
.month-article .month-picker-label { margin:0 0 .4rem }
.month-calendar {
  margin:0;
  width:100%;
  max-width:35rem;
  padding:clamp(.85rem,3vw,1.4rem);
  background:#fffcf4;
  border:1px solid #d5d1bd;
  border-top:4px solid #ae8b59;
  border-radius:4px 4px 9px 9px;
}
.month-calendar figcaption { font-family:var(--serif);font-size:clamp(1rem,3vw,1.24rem) }
.month-article .month-calendar-key,
.month-article .month-calendar-note { color:#526356;font-size:.875rem;line-height:1.6;margin:.3rem 0 0 }
.month-calendar-key span {
  width:.8rem;
  height:.8rem;
  margin-right:.4rem;
  display:inline-block;
  vertical-align:-.04em;
  border-radius:50%;
  background:#295846;
}
.month-calendar-grid {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  margin:.75rem 0;
  gap:1px;
  background:#dfdfd0;
  border:1px solid #dfdfd0;
}
.month-day {
  display:grid;
  place-items:center;
  padding:.13rem 0;
  background:#fffef8;
  color:#55635a;
  font-variant-numeric:tabular-nums;
  line-height:1;
  font-size:.94rem;
}
.month-day>span {
  display:grid;
  place-items:center;
  width:1.85rem;
  max-width:95%;
  aspect-ratio:1;
  border-radius:50%;
}
.month-day[data-working]>span { background:#295846;color:#fff;font-weight:700 }
@media(forced-colors:active) {
  .month-day[data-working]>span,.month-calendar-key span { outline:2px solid Highlight }
}

.month-article .month-summary {display:flex;align-items:end;justify-content:space-between;gap:.5rem 1rem;flex-wrap:wrap}
.month-table .month-selected-amount {color:#174932;background:#dceadd}
@media (max-width:540px) {
  .month-table th,.month-table td {padding:8px 4px}
  .month-table {font-size:.82rem}
}

.month-unit-field{display:grid;gap:.4rem;margin-bottom:.75rem}.month-unit-field>label{font-weight:600}.month-unit-field>div{display:flex;align-items:center;gap:.5rem}
.month-unit-field input{width:11rem;max-width:100%;min-height:44px;padding:.55rem .7rem;border:1px solid #819f92;border-radius:.35rem;font:inherit;background:#fff;color:var(--ink)}.month-unit-field input[aria-invalid=true]{border-color:#954b38}
.month-unit-field input:focus-visible{outline:2px solid var(--green);outline-offset:2px}
