.wotd-intro-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.wotd-clock {
  margin: 0 0 .25rem;
  color: var(--muted);
  font-size: .86rem;
  white-space: nowrap;
}

.wotd-tools {
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) minmax(11rem, .42fr) auto;
  gap: .8rem;
  align-items: end;
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  background: var(--surface);
}

.wotd-field {
  display: grid;
  gap: .35rem;
  min-width: 0;
}

.wotd-field span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.wotd-field input,
.wotd-field select {
  width: 100%;
  min-width: 0;
  min-height: 2.85rem;
  padding: .62rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: 0;
  background: var(--page);
  color: var(--text);
}

/* Override the browser/global blue focus ring without removing focus visibility. */
.wotd-field input:focus,
.wotd-field input:focus-visible,
.wotd-field select:focus,
.wotd-field select:focus-visible {
  border-color: var(--teal);
  outline: 2px solid var(--teal);
  outline-offset: 0;
  box-shadow: none;
}

.wotd-status-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: .88rem;
}

.wotd-month {
  margin: 0 0 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.wotd-month > summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  font-family: var(--heading);
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  font-weight: 700;
}

.wotd-month > summary::-webkit-details-marker { display: none; }

.wotd-month > summary::before {
  content: "+";
  flex: 0 0 auto;
  width: 1.25rem;
  color: var(--accent);
  font-family: var(--body);
  font-size: 1.2rem;
  font-weight: 700;
}

.wotd-month[open] > summary::before { content: "−"; }
.wotd-month > summary:hover { background: var(--teal-soft); }
.wotd-month > summary .count { margin-left: auto; font-family: var(--body); }

.wotd-list { border-top: 1px solid var(--border); }

.wotd-entry {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr) auto;
  gap: 1rem 1.25rem;
  align-items: center;
  padding: 1.15rem;
  border-bottom: 1px solid var(--border);
}

.wotd-entry:last-child { border-bottom: 0; }

.wotd-day {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 4.2rem;
  padding: .45rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  background: var(--page);
  text-align: center;
}

.wotd-day strong {
  font-family: var(--heading);
  font-size: 1.65rem;
  line-height: 1;
}

.wotd-day span {
  margin-top: .2rem;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.wotd-entry-copy { min-width: 0; }
.wotd-entry-copy h3 { margin: .15rem 0 0; font-size: 1.35rem; }
.wotd-entry-copy h3 a { color: var(--text); text-decoration: none; }
.wotd-entry-copy h3 a:hover { color: var(--accent); }

.wotd-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .7rem;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 700;
}

.wotd-open { white-space: nowrap; }

.wotd-entry.is-scheduled {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.wotd-scheduled {
  padding: .12rem .42rem;
  border: 1px solid var(--accent);
  border-radius: .25rem;
  color: var(--accent);
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.wotd-debug-note {
  margin: 0 0 1.4rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.wotd-debug-note p { margin: 0; }

@media (max-width: 900px) {
  .wotd-tools {
    grid-template-columns: minmax(0, 1fr) minmax(11rem, .7fr) auto;
  }
}

@media (max-width: 700px) {
  .wotd-tools {
    grid-template-columns: 1fr 1fr;
  }

  .wotd-field:first-child {
    grid-column: 1 / -1;
  }

  .wotd-tools .button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .wotd-intro-row { display: block; }
  .wotd-clock { margin-top: 1rem; white-space: normal; }
  .wotd-tools { grid-template-columns: 1fr; }
  .wotd-field:first-child { grid-column: auto; }
  .wotd-status-row { display: block; }

  .wotd-entry {
    grid-template-columns: 3.65rem minmax(0, 1fr);
    align-items: start;
  }

  .wotd-day { min-height: 3.65rem; }
  .wotd-day strong { font-size: 1.4rem; }
  .wotd-open { grid-column: 2; justify-self: start; }
  .wotd-month > summary { align-items: center; }
}
