/* Your sky briefing (/briefing, ADR 0127). Colors come from the
   site's variables, so dark follows with a few overrides in
   briefing-dark.css; night vision is the site-wide theme (ADR 0086). */

.tp {
  --tp-great: #1d8a52;
  --tp-good: #4f8f2f;
  --tp-fair: #b07a12;
  --tp-poor: #b55a2c;
  --tp-clouded: #6b7280;
  --tp-unknown: #8a90a0;
  --tp-clear: #2c5fb8;
  display: grid;
  gap: 18px;
}
.tp-intro h1 { margin: 0 0 6px; }
.tp-lede { margin: 0; color: var(--muted); max-width: 62ch; }
.tp-manage { margin: 8px 0 0; font-size: 0.92rem; }
.tp-dim { color: var(--muted); }
.tp-empty, .tp-loading { margin: 0; padding: 18px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); background: var(--surface); }
.tp-loading { border-style: solid; }
.tp-loaded { display: grid; gap: 14px; }
.tp-cards { display: grid; gap: 14px; }

.tp-best {
  display: flex; align-items: center; gap: 10px; margin: 0;
  padding: 10px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--tp-great) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--tp-great) 35%, var(--line));
}
.tp-best svg { flex: none; width: 20px; height: 20px; fill: var(--accent-sun); stroke: var(--accent-sun); stroke-linejoin: round; }

.tp-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.tp-card {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 14px 16px 12px; background: var(--surface); border: 1px solid var(--line);
  border-top: 4px solid var(--tp-phase, var(--line)); border-radius: 14px; box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--sticky-top, 0px) + 12px);
}
.tp-card:target { outline: 2px solid var(--accent-moon); outline-offset: 2px; }

.tp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tp-name { margin: 0; font-size: 1.08rem; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.tp-name a { color: var(--text); text-decoration: none; }
.tp-name a:hover { text-decoration: underline; }
.tp-verdict { flex: none; font-size: 0.78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; color: #fff; background: var(--tp-unknown); }
.tp-verdict.is-great { background: var(--tp-great); }
.tp-verdict.is-good { background: var(--tp-good); }
.tp-verdict.is-fair { background: var(--tp-fair); }
.tp-verdict.is-poor { background: var(--tp-poor); }
.tp-verdict.is-clouded { background: var(--tp-clouded); }
.tp-home { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 6px; color: var(--accent-sun); background: var(--accent-sun-soft); }
.tp-head { margin: 0; font-weight: 600; line-height: 1.35; }

/* Clouds hour by hour: a bar per hour, taller and grayer with more cloud; the dark hours stand out. */
.tp-strip { display: flex; align-items: flex-end; gap: 2px; height: 30px; padding: 3px; border-radius: 8px; background: color-mix(in srgb, var(--accent-moon) 8%, var(--surface)); }
.tp-h { flex: 1 1 0; min-width: 3px; border-radius: 2px; background: var(--tp-clear); opacity: 0.45; height: 12%; }
.tp-h.is-dark { opacity: 1; }
.tp-h.c1 { height: 18%; } .tp-h.c2 { height: 26%; } .tp-h.c3 { height: 34%; } .tp-h.c4 { height: 42%; }
.tp-h.c5 { height: 52%; } .tp-h.c6 { height: 62%; } .tp-h.c7 { height: 72%; } .tp-h.c8 { height: 82%; }
.tp-h.c9 { height: 92%; } .tp-h.c10 { height: 100%; }
.tp-h:is(.c3, .c4, .c5, .c6, .c7) { background: #8a9bc2; }
.tp-h:is(.c8, .c9, .c10) { background: #9aa0aa; }
.tp-h.is-wet { background: #7d5fc9; background-image: repeating-linear-gradient(135deg, transparent 0 2px, rgb(255 255 255 / 0.5) 2px 3px); }
.tp-strip-axis { display: flex; justify-content: space-between; margin: -4px 0 0; font-size: 0.72rem; color: var(--muted); }

.tp-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; font-size: 0.88rem; }
.tp-facts > div { min-width: 0; }
.tp-facts dt { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.tp-facts dd { margin: 1px 0 0; }
.tp-moon dd { display: flex; align-items: center; gap: 6px; }
.tp-moon svg { flex: none; width: 18px; height: 18px; }

.tp-aurora { margin: 0; padding: 6px 10px; border-radius: 8px; font-size: 0.88rem; color: var(--aurora-text); background: var(--aurora-dot-soft); }
.tp-notes { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.82rem; }
.tp-notes li { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); background: color-mix(in srgb, var(--accent-moon) 6%, var(--surface)); }
.tp-notes li.is-shower { border-color: color-mix(in srgb, var(--accent-twilight) 45%, var(--line)); }
.tp-notes li.is-station { border-color: color-mix(in srgb, var(--nav-tint-satellites) 45%, var(--line)); }

/* Phones: one column, the verdict, headline, clouds and key facts; trim the extras. */
@media (max-width: 560px) {
  .tp-grid { grid-template-columns: 1fr; }
  .tp-card { padding: 12px 12px 10px; }
  .tp-notes li:nth-child(n + 3) { display: none; }
  .tp-facts { font-size: 0.85rem; }
}
.tp-error { margin: 0; padding: 12px 16px; border-radius: 12px; color: var(--warn-text); background: var(--accent-sun-soft); }
.tp-facts > .tp-wide { grid-column: 1 / -1; }

/* ---- Now, today and tonight (each card) ---- */
.tp-card.now-day { --tp-phase: #4f9be0; }
.tp-card:is(.now-dawn, .now-dusk) { --tp-phase: #e0895a; }
.tp-card:is(.now-night, .now-polar-night) { --tp-phase: #34407a; }
.tp-card.now-polar-day { --tp-phase: #e8b21c; }
.tp-phase { flex: none; font-size: 0.78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; color: #fff; background: var(--tp-phase, var(--muted)); }
.tp-now { margin: -2px 0 0; font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.tp-now strong { font-variant-numeric: tabular-nums; }
.tp-cloudnow { color: var(--muted); }
.tp-cloudnow.is-wet { color: #6a4fb8; font-weight: 600; }
.tp-day, .tp-night { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.tp-night { padding-left: 10px; margin-left: -2px; border-left: 3px solid var(--tp-unknown); }
.tp-night.is-great { border-left-color: var(--tp-great); }
.tp-night.is-good { border-left-color: var(--tp-good); }
.tp-night.is-fair { border-left-color: var(--tp-fair); }
.tp-night.is-poor { border-left-color: var(--tp-poor); }
.tp-night.is-clouded { border-left-color: var(--tp-clouded); }
.tp-sub { margin: 0; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tp-sub .tp-dim { text-transform: none; letter-spacing: 0; font-weight: 500; }
.tp-sub .tp-verdict { text-transform: none; letter-spacing: 0; }
/* After dusk and until dawn, tonight comes before today. */
.tp-card.night-first .tp-night { order: 1; }
.tp-card.night-first .tp-day { order: 2; }
.tp-card.night-first .tp-more { order: 3; }
.tp-golden dd { color: #b5651d; }
.tp-notes li.is-event { border-color: color-mix(in srgb, var(--accent-sun) 50%, var(--line)); }
.tp-more { display: flex; gap: 16px; margin: auto 0 0; }
.tp-more a { font-size: 0.88rem; font-weight: 600; color: var(--accent-moon); }
@media (max-width: 560px) {
  .tp-day .tp-notes li:nth-child(n + 2) { display: none; }
}
.tp-change { display: block; font-size: 0.78rem; }
/* Phones: the key facts only; the full day and night are a tap away. */
@media (max-width: 560px) {
  .tp-daylight, .tp-moontimes, .tp-strip-axis span:nth-child(2) { display: none; }
  .tp-night .tp-notes li:nth-child(n + 2) { display: none; }
}
