/* The daily sky brief's pages (/tonight/email and its stop page), light
   theme. Dark: sky-brief-dark.css. Colors of their own are variables on .sb. */

.sb {
  --sb-night: #0b1130;
  --sb-night-2: #18224a;
  --sb-corona: #fff7e6;
  --sb-gold: #a07a35;
  --sb-ok: #1f7a4d;
  --sb-ok-soft: #e5f3ea;
  --sb-bad: #b4442f;
  --sb-bad-soft: #fbe9e5;
  --sb-warn-soft: #fdf1e1;
  --sb-ok-line: #b9dcc7;
  --sb-mail: #3d4f8f;
  --sb-mail-soft: #e9edf9;
  --sb-mail-line: #c6cfee;
  --sb-frame: #f1efe8;
  display: grid;
  gap: 28px;
  margin-top: 8px;
}
.sb a { color: var(--accent-moon); text-underline-offset: 3px; }
.sb h1 { font-size: clamp(1.75rem, 4.4vw, 2.6rem); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
.sb h2 { font-size: 1.2rem; line-height: 1.3; }
.sb p, .sb li { line-height: 1.55; }
.sb-kicker { color: var(--sb-gold); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.sb-muted { color: var(--muted); }
.sb-small { font-size: 0.88rem; }

/* ---- Hero: the pitch and the form ------------------------------------------ */
.sb-hero { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .sb-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px; } }
.sb-intro { padding-top: 6px; }
.sb-lede { font-size: 1.1rem; margin-top: 14px; max-width: 60ch; }
.sb-points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.sb-points li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.sb-points svg {
  width: 36px; height: 36px; padding: 7px; border-radius: 10px;
  background: var(--sb-night); stroke: var(--sb-corona); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.sb-points strong { display: block; }

/* ---- Cards and the form ---------------------------------------------------- */
.sb-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; display: grid; gap: 14px; min-width: 0; }
.sb-signup { border-top: 4px solid var(--sb-night); }
.sb-narrow { max-width: 520px; width: 100%; margin: 24px auto 0; }
.sb-form { display: grid; gap: 10px; }
.sb-form label { font-weight: 600; font-size: 0.92rem; }
.sb input[type="email"], .sb input[type="text"], .sb .sb-code {
  font: inherit; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); min-width: 0; width: 100%;
}
.sb .sb-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.5rem; letter-spacing: 0.25em; text-align: center; }
.sb input:focus-visible, .sb-button:focus-visible, .sb summary:focus-visible { outline: 2px solid var(--accent-moon); outline-offset: 2px; }
.sb-button {
  font: inherit; font-weight: 600; padding: 12px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.sb a.sb-button { color: var(--text); }
.sb-button:hover { border-color: var(--muted); }
.sb-button.is-primary { background: var(--sb-night); border-color: var(--sb-night); color: var(--sb-corona); }
.sb-button.is-primary:hover { background: var(--sb-night-2); }
.sb-button.is-small { padding: 5px 10px; font-size: 0.85rem; border-radius: 8px; }
.sb-button.is-quiet { color: var(--sb-bad); }
.sb-inline { display: inline; }
/* While a form is on its way (the skybrief island): the button says so and takes no second press. */
.sb-button[disabled] { cursor: progress; opacity: 0.75; }

.sb-place { display: grid; gap: 3px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.sb-place.is-doubtful { border-color: var(--accent-sun); background: var(--sb-warn-soft); }
.sb-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sb-warn { color: var(--warn-text); font-weight: 550; }

/* The confirmation after an action: in view (the address ends in #done) and announced. */
.sb-done {
  display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start;
  padding: 14px 16px; border-radius: 14px; background: var(--sb-ok-soft); color: var(--text);
  border: 1px solid var(--sb-ok-line); scroll-margin-top: 140px; outline: none;
  animation: sb-arrive 0.45s ease-out;
}
.sb-done svg { width: 30px; height: 30px; fill: none; stroke: var(--sb-ok); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sb-done p { margin: 0; }
.sb-done .sb-done-title { font-weight: 650; font-size: 1.05rem; color: var(--sb-ok); margin-bottom: 2px; }
.sb-done.is-mail { background: var(--sb-mail-soft); border-color: var(--sb-mail-line); }
.sb-done.is-mail svg { stroke: var(--sb-mail); }
.sb-done.is-mail .sb-done-title { color: var(--sb-mail); }
@keyframes sb-arrive { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sb-done { animation: none; } }

.sb-notice, .sb-error { margin: 0; padding: 10px 14px; border-radius: 12px; font-weight: 550; }
.sb-notice { background: var(--sb-ok-soft); color: var(--sb-ok); }
.sb-error { background: var(--sb-bad-soft); color: var(--sb-bad); }

.sb-briefs { list-style: none; margin: 0; padding: 0; display: grid; }
.sb-briefs li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sb-briefs li:first-child { padding-top: 0; }
.sb-briefs li.is-marked { background: var(--sb-ok-soft); margin: 0 -10px; padding: 10px; border-radius: 10px; border-bottom-color: transparent; }
.sb-tag {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; vertical-align: 2px;
  font-size: 0.72rem; font-weight: 650; letter-spacing: 0.03em; background: var(--sb-ok); color: var(--surface);
}
.sb-brief-place { display: grid; gap: 2px; min-width: 0; }
.sb-brief-actions { display: inline-flex; gap: 6px; align-items: center; }

/* ---- Today's brief: the email in a frame ---------------------------------- */
.sb-sample { display: grid; gap: 12px; }
.sb-sample-head { display: grid; gap: 4px; }
.sb-frame {
  width: 100%; height: 1120px; border: 0; border-radius: var(--radius); background: var(--sb-frame);
  box-shadow: inset 0 0 0 1px var(--line);
}
@media (max-width: 600px) { .sb-frame { height: 1320px; } }

/* ---- Questions and sources --------------------------------------------------- */
.sb-faq { display: grid; gap: 0; max-width: 820px; }
.sb-faq h2 { margin-bottom: 8px; }
.sb-faq details { border-bottom: 1px solid var(--line); }
.sb-faq summary, .sb-sources summary {
  cursor: pointer; list-style: none; padding: 14px 28px 14px 0; font-weight: 600; position: relative;
}
.sb-faq summary::-webkit-details-marker, .sb-sources summary::-webkit-details-marker { display: none; }
.sb-faq summary::after, .sb-sources summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 400; font-size: 1.2rem;
}
.sb-faq details[open] summary::after, .sb-sources[open] summary::after { content: "−"; }
.sb-faq details p { margin: 0 0 16px; color: var(--text); max-width: 70ch; }
.sb-sources { max-width: 820px; font-size: 0.88rem; color: var(--muted); }
.sb-sources summary { font-size: 0.95rem; color: var(--text); }
.sb-sources ol { margin: 0 0 12px; padding-left: 1.3rem; display: grid; gap: 6px; }
