/* Verbatim <style> block from design/index.html. Do not edit by hand; re-extract instead. */
main:focus { outline: none; }

/* ---------- Hero ---------- */
.hero { padding: var(--sp-16) 0 var(--sp-12); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  gap: var(--sp-12); align-items: start;
}
.hero__copy { padding-top: var(--sp-6); }
.hero h1 {
  margin-top: var(--sp-4); font-size: var(--fs-48); line-height: var(--lh-tight);
  letter-spacing: -0.03em; font-weight: var(--fw-bold); max-width: 16ch;
}
.hero__sub { margin-top: var(--sp-4); max-width: 54ch; color: var(--muted); font-size: var(--fs-16); line-height: 1.6; }
.hero__sub .mono { color: var(--text); }
/* The week's fact: the showcase topic whose #1 ranks lowest on a GitHub-wide chart. */
.hero__fact { margin-top: var(--sp-4); max-width: 54ch; padding-left: var(--sp-3); border-left: 3px solid var(--rise); font-size: var(--fs-16); line-height: 1.55; color: var(--text); }
.hero__fact a { color: var(--text); font-family: var(--font-mono); text-decoration: underline; text-underline-offset: 3px; }
.hero__fact:empty { display: none; }
/* Two repos, one week: the score in numbers (it replaces the paragraph on the formula). */
.hero__score { margin-top: var(--sp-6); max-width: 54ch; padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.score-table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
.score-table caption { text-align: left; padding-bottom: var(--sp-2); font-size: var(--fs-13); color: var(--muted); }
/* The formula and the link get their own line: near the edge of a phone line, the
   swap from the fallback font to Geist would otherwise rewrap them (CLS). */
.score-table caption code { display: block; font-family: var(--font-mono); color: var(--text); }
.score-table th, .score-table td { padding: var(--sp-2) var(--sp-2) var(--sp-2) 0; text-align: left; font-weight: var(--fw-regular); border-top: 1px solid var(--border); }
.score-table th:last-child, .score-table td:last-child { padding-right: 0; text-align: right; }
.score-table thead th { border-top: 0; padding-top: 0; font-size: var(--fs-12); color: var(--muted); }
.score-table .mono { font-family: var(--font-mono); font-size: var(--fs-13); white-space: nowrap; }
.score-table__gain { color: var(--rise-text); white-space: nowrap; }
.score-table .is-hit td:last-child { color: var(--rise-text); font-weight: var(--fw-semibold); }
.hero__score-note { margin-top: var(--sp-2); font-size: var(--fs-13); color: var(--muted); }
.hero__score-note a { display: block; width: fit-content; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-6); margin-top: var(--sp-8); }
/* Sign-in beside the one main button: a text link; the header and the closing band keep their buttons. */
.hero__link { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; font-weight: var(--fw-medium); color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.hero__note { margin-top: var(--sp-3); font-size: var(--fs-13); color: var(--muted); }
.hero__facts {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-6); margin-top: var(--sp-8); padding-top: var(--sp-6);
  border-top: 1px solid var(--border); font-size: var(--fs-13); color: var(--muted);
}
.hero__facts li { display: inline-flex; align-items: center; gap: 6px; }
.hero__facts .num { color: var(--text); }

/* ---------- Live preview (app window) ---------- */
.preview {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-card);
  overflow: hidden; min-width: 0;
}
.preview__bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border);
}
.preview__title { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; font-size: var(--fs-14); font-weight: var(--fw-semibold); }
.preview__title .badge { font-weight: var(--fw-medium); }
.preview__chips { --od-rail-pad: var(--sp-4); contain: inline-size; padding-block: var(--sp-3); border-bottom: 1px solid var(--border); }
.preview__chips .chip { gap: 4px; }
.preview__chips .chip .icon { color: var(--rise-text); }
.preview__chips .chip[aria-pressed="false"] .icon { display: none; }
.preview__list { padding: var(--sp-3); background: var(--bg); min-height: 384px; }
.preview__list .empty-state, .preview__list .error-state { padding-block: var(--sp-12); }
.preview__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); font-size: var(--fs-13); color: var(--muted);
}
.preview__foot a { color: var(--text); font-weight: var(--fw-medium); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Sections ---------- */
.block { padding: var(--sp-16) 0; border-top: 1px solid var(--border); }
.block__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-3) var(--sp-6); margin-bottom: var(--sp-8); }
.block__title { font-size: var(--fs-32); letter-spacing: -0.02em; line-height: var(--lh-heading); }
.block__sub { margin-top: var(--sp-2); color: var(--muted); max-width: 62ch; font-size: var(--fs-16); }


/* Topics grid */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-3); }

/* Collections (home rows: 2x2 grid >= 1024, stacked list below) */
#collections .collection-rows { min-width: 0; }
#collections > .container > .empty-state, #collections > .container > .error-state,
#home-collections > .empty-state, #home-collections > .error-state { border: 1px solid var(--border); border-radius: var(--r-card); }
@media (min-width: 1024px) {
  #collections .collection-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
}

/* Digest */
.digest { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: var(--sp-12); align-items: center; }
.digest__points { list-style: none; margin: var(--sp-6) 0 0; padding: 0; display: grid; gap: var(--sp-2); color: var(--muted); font-size: var(--fs-14); }
.digest__points li { display: flex; align-items: flex-start; gap: var(--sp-2); }
.digest__points .icon { margin-top: 3px; color: var(--text); }
.digest-form { margin-top: var(--sp-8); max-width: 480px; }
.digest-form .newsletter__row .input { height: 44px; font-size: var(--fs-16); }
.digest-form .btn { height: 44px; }
.digest-form__ok { display: flex; align-items: center; gap: 6px; font-size: var(--fs-13); color: var(--rise-text); }
.digest-form__ok:empty { display: none; }

.mail { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-card); overflow: hidden; }
.mail__head { padding: var(--sp-4); border-bottom: 1px solid var(--border); display: grid; gap: 2px; font-size: var(--fs-13); color: var(--muted); }
.mail__subject { font-size: var(--fs-16); font-weight: var(--fw-semibold); color: var(--text); }
.mail__body { padding: var(--sp-4); display: grid; gap: var(--sp-4); }
.mail__topic { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--muted); margin-bottom: var(--sp-1); }
.mail__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--sp-3); padding: var(--sp-2) 0; border-top: 1px solid var(--border); }
.mail__row:first-of-type { border-top: 0; }
.mail__name { font-family: var(--font-mono); font-size: var(--fs-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail__name .o { color: var(--muted); }
.mail__desc { grid-column: 1 / -1; font-size: var(--fs-12); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail__gain { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-13); color: var(--rise-text); font-weight: var(--fw-semibold); }
.mail__foot { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); font-size: var(--fs-12); color: var(--muted); display: flex; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.mail__foot a { color: var(--text); }

/* CTA band */
.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-6);
  padding: var(--sp-12) var(--sp-8); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
}
.cta-band h2 { font-size: var(--fs-32); letter-spacing: -0.02em; max-width: 22ch; }
.cta-band p { margin-top: var(--sp-2); color: var(--muted); max-width: 52ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.site-footer { margin-top: var(--sp-12); }

/* ---------- Responsive ---------- */
@media (max-width: 1023.98px) {
  .hero { padding-top: var(--sp-12); }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-8); }
  .hero__copy { padding-top: 0; }
  .digest { grid-template-columns: minmax(0, 1fr); gap: var(--sp-8); }
}
@media (max-width: 767.98px) {
  .hero { padding: var(--sp-8) 0 var(--sp-8); }
  .hero h1 { font-size: var(--fs-32); }
  .hero__ctas .btn { flex: 1 1 100%; }
  .hero__link { flex: 1 1 100%; justify-content: center; }
  .hero__facts { margin-top: var(--sp-6); padding-top: var(--sp-4); }
  .preview { margin-inline: calc(-1 * var(--sp-2)); }
  .preview__bar { flex-wrap: wrap; }
  .preview__bar .segmented { width: 100%; }
  .preview__bar .segmented__item { flex: 1 1 0; }
  .preview__list { padding: var(--sp-2); min-height: 320px; }
  .preview__chips .chip { height: 36px; }
  .preview__chips .chip::after { content: ""; position: absolute; inset: -4px 0; }
  .segmented__item { height: 44px; }
  .block { padding: var(--sp-12) 0; }
  .block__title, .cta-band h2 { font-size: var(--fs-24); }
  .digest-form .newsletter__row { flex-direction: column; }
  .cta-band { padding: var(--sp-8) var(--sp-4); }
  .cta-band__actions, .cta-band__actions .btn { width: 100%; }
}
@media (hover: hover) {
  .preview__foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
}
