/* The nature calendar (/nature, /nature/{spectacle}; ADR 0059), light theme.
   nature-dark.css overrides it for the dark theme (linked with
   data-theme-dark). Each kind of spectacle has its own color, always beside
   its name; ratings carry a word as well as a color. */

.nt-page {
  --nt-fish: #2f6fa0;
  --nt-crab: #b8402a;
  --nt-coral: #c24d76;
  --nt-worm: #4b7f37;
  --nt-glow: #13808d;
  --nt-kind: var(--accent-moon);
  --nt-best: #12796a;
  --nt-best-soft: #dcf2ed;
  --nt-likely: #2f5f9a;
  --nt-likely-soft: #e3ecf8;
  --nt-possible: #7a5c14;
  --nt-possible-soft: #f6ecd2;
  --nt-unlikely: #7b808a;
  --nt-night: #1f2747;
  --nt-night-ink: #e9ecf8;
  --nt-moonlit: #ece6d6;
  --nt-moonlit-ink: #4a4436;
}

.nt-kind-fish { --nt-kind: var(--nt-fish); }
.nt-kind-crab { --nt-kind: var(--nt-crab); }
.nt-kind-coral { --nt-kind: var(--nt-coral); }
.nt-kind-worm { --nt-kind: var(--nt-worm); }
.nt-kind-glow { --nt-kind: var(--nt-glow); }

/* ---- Heading and the next window ---- */
.nt-hero { margin-bottom: 14px; }
.nt-eyebrow { color: var(--nt-kind); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin: 6px 0 4px; }
.nt-eyebrow a { color: inherit; text-decoration: none; }
.nt-eyebrow a:hover { text-decoration: underline; }
.nt-hero h1 { margin: 0; font-size: clamp(1.9rem, 5.5vw, 3rem); line-height: 1.06; letter-spacing: -0.02em; }
.nt-where { color: var(--muted); margin: 8px 0 0; font-size: 0.95rem; }
.nt-lede, .nt-lede-p { max-width: 46em; font-size: 1.06rem; line-height: 1.55; margin-top: 10px; }
.nt-lede .nt-p { margin: 0 0 8px; }

.nt-next {
  margin-top: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--nt-kind);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 44em;
}
.nt-next p { margin: 0; }
.nt-next-kick { color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.nt-next-dates { font-size: clamp(1.35rem, 4vw, 1.8rem); font-weight: 700; letter-spacing: -0.01em; margin-top: 4px !important; }
.nt-next-label, .nt-next-time { margin-top: 6px !important; }
.nt-next-time { font-variant-numeric: tabular-nums; }
.nt-next-note { color: var(--muted); margin-top: 6px !important; font-size: 0.93rem; }
.nt-next-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px !important; }
.nt-next-actions a { color: var(--accent-moon); }
.nt-btn {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--nt-kind);
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.nt-btn:hover { filter: brightness(1.08); }

/* ---- Ratings ---- */
.nt-chip {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid transparent;
}
.nt-chip.nt-best { background: var(--nt-best); color: #fff; }
.nt-chip.nt-likely { background: var(--nt-likely-soft); color: var(--nt-likely); border-color: color-mix(in srgb, var(--nt-likely) 30%, transparent); }
.nt-chip.nt-possible { background: var(--nt-possible-soft); color: var(--nt-possible); border-color: color-mix(in srgb, var(--nt-possible) 30%, transparent); }
.nt-chip.nt-unlikely { background: transparent; color: var(--nt-unlikely); border-color: var(--line); text-decoration: line-through; text-decoration-thickness: 1px; }

/* ---- Bands ---- */
.nt-band { margin-top: 28px; scroll-margin-top: 64px; }
.nt-band h2 { font-size: 1.25rem; margin: 0 0 8px; }
.nt-band h3 { font-size: 1.02rem; margin: 18px 0 6px; }
.nt-p { max-width: 46em; line-height: 1.55; margin: 0 0 10px; }
.nt-muted, .nt-note, .nt-none, .nt-legend { color: var(--muted); font-size: 0.92rem; }
.nt-note { margin: 0 0 12px; max-width: 46em; }
.nt-note a { color: var(--accent-moon); }
.nt-warn { color: var(--warn-text); background: var(--accent-sun-soft); border-radius: 10px; padding: 8px 12px; max-width: 46em; }
.nt-headline { font-weight: 650; margin: 4px 0 10px; }
.nt-year { font-size: 1.1rem; margin: 20px 0 8px; }

/* ---- A window and its nights ---- */
.nt-window {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--nt-kind);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 12px;
}
.nt-window.is-past { opacity: 0.62; }
.nt-window.nt-unlikely { border-left-color: var(--line); }
.nt-window-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; cursor: pointer; list-style: none; }
.nt-window-head::-webkit-details-marker { display: none; }
.nt-window-head::after { content: "\25BE"; color: var(--muted); margin-left: auto; transition: transform 0.15s; }
.nt-window:not([open]) > .nt-window-head::after { transform: rotate(-90deg); }
.nt-window-head:focus-visible { outline: 2px solid var(--accent-moon); outline-offset: 4px; border-radius: 6px; }
.nt-window-head h4 { margin: 0; font-size: 1rem; }
.nt-window-dates { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.nt-window-note { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }
.nt-scroll { overflow-x: auto; margin-top: 8px; }
.nt-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.nt-table th, .nt-table td { padding: 6px 10px 6px 0; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.nt-table thead th { color: var(--muted); font-size: 0.72rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
.nt-table tbody tr:last-child th, .nt-table tbody tr:last-child td { border-bottom: 0; }
.nt-table tbody th { white-space: nowrap; font-weight: 650; }
.nt-table td:nth-child(2) { white-space: nowrap; }
.nt-table tr.is-past { opacity: 0.55; }
.nt-years { display: flex; gap: 18px; margin-top: 10px; }
.nt-years a { color: var(--accent-moon); text-decoration: none; }
.nt-years a:hover { text-decoration: underline; }
.nt-years-next { margin-left: auto; }

/* ---- Coming up ---- */
.nt-coming { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.nt-card a {
  display: grid;
  gap: 3px;
  height: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--nt-kind);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
}
.nt-card a:hover { border-color: color-mix(in srgb, var(--nt-kind) 55%, var(--line)); border-top-color: var(--nt-kind); }
.nt-card a:focus-visible { outline: 2px solid var(--accent-moon); outline-offset: 2px; }
.nt-card strong { font-size: 1.02rem; }
.nt-card-when { color: var(--nt-kind); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.nt-card-dates { font-weight: 600; }
.nt-card-meta { color: var(--muted); font-size: 0.86rem; }

/* ---- Dark evenings: a strip of the next month ---- */
.nt-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(2.1rem, 1fr)); gap: 3px; max-width: 46rem; }
.nt-strip li {
  display: grid;
  justify-items: center;
  padding: 4px 0;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  border: 1px solid transparent;
}
.nt-strip-day { font-size: 0.66rem; opacity: 0.8; }
.nt-strip-date { font-size: 0.86rem; font-weight: 650; }
.nt-strip .nt-dark, .nt-key.nt-dark { background: var(--nt-night); color: var(--nt-night-ink); }
.nt-strip .nt-moon, .nt-key.nt-moon { background: var(--nt-moonlit); color: var(--nt-moonlit-ink); }
.nt-strip .nt-light, .nt-key.nt-light { background: var(--surface); color: var(--muted); border-color: var(--line); }
.nt-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 8px; }
.nt-key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-left: 8px; border: 1px solid transparent; }
.nt-key:first-child { margin-left: 0; }
.nt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- The year at a glance ---- */
.nt-grid th, .nt-grid td { text-align: center; padding: 6px 4px; }
.nt-grid tbody th { text-align: left; padding-right: 10px; white-space: normal; min-width: 11rem; font-weight: 600; }
.nt-grid tbody th a { color: var(--text); text-decoration: none; border-left: 4px solid var(--nt-kind); padding-left: 8px; display: block; }
.nt-grid tbody th a:hover { text-decoration: underline; }
.nt-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--nt-kind); }

/* ---- All spectacles, and the links under a spectacle ---- */
.nt-all, .nt-others { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.nt-all a, .nt-others a {
  display: grid;
  gap: 3px;
  height: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--nt-kind);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
}
.nt-all a:hover, .nt-others a:hover { border-color: color-mix(in srgb, var(--nt-kind) 55%, var(--line)); border-left-color: var(--nt-kind); }
.nt-all span, .nt-others span { color: var(--muted); font-size: 0.88rem; }
.nt-all .nt-all-kind { color: var(--nt-kind); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.nt-all .nt-all-next { color: var(--text); font-weight: 600; }
.nt-others span { display: block; }

@media (max-width: 640px) {
  .nt-next { padding: 14px; }
  .nt-table { font-size: 0.86rem; }
  .nt-table th, .nt-table td { padding-right: 8px; }
  /* A night per row on phones: date, time and rating on one line, the notes under them. */
  .nt-nights thead { display: none; }
  .nt-nights tbody tr { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
  .nt-nights tbody tr:last-child { border-bottom: 0; }
  .nt-nights tbody th, .nt-nights tbody td { border: 0; padding: 0; }
  .nt-nights tbody td:nth-child(4) { grid-column: 1 / -1; color: var(--muted); font-size: 0.82rem; }
  .nt-nights tbody td:nth-child(4):empty { display: none; }
  .nt-window { padding: 10px 12px; }
}

@media print {
  .nt-tabs, .nt-next-actions, .nt-years { display: none !important; }
}

/* Windows already past this year: closed until asked for. */
.nt-past { margin: 0 0 12px; }
.nt-past > summary { cursor: pointer; color: var(--muted); font-size: 0.92rem; padding: 4px 0; }
.nt-past[open] > summary { margin-bottom: 8px; }
