*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --page-bg: #f7f7f7;
  --paper: #ffffff;
  --ink: rgba(0, 0, 0, .87);
  --muted: rgba(0, 0, 0, .58);
  --line: rgba(34, 36, 38, .15);
  --line-soft: rgba(34, 36, 38, .1);
  --link: #2563eb;
  --mozilla: #6b21a8;
  --firefox: #e85d04;
  --toolbar: #111827;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page-bg);
  color: var(--ink);
  font-family: Lato, "Helvetica Neue", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.report-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--toolbar);
  color: #f9fafb;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.toolbar-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.toolbar-inner h1 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.toolbar-inner p {
  margin: 4px 0 0;
  color: #9ca3af;
  font-size: 12px;
}

.back-link {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
}

.report-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.report-controls label {
  display: grid;
  gap: 4px;
  color: #d1d5db;
  font-size: 11px;
  font-weight: 700;
}

.report-controls input,
.report-controls select {
  width: 190px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  padding: 7px 9px;
  font: inherit;
}

.report-controls select {
  width: 150px;
  appearance: auto;
}

.report-controls option {
  color: #111827;
}

.btn,
.copy-category-btn {
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  padding: 7px 11px;
}

.btn:hover,
.copy-category-btn:hover {
  background: rgba(255, 255, 255, .16);
}

.btn.primary {
  background: #2563eb;
  border-color: #2563eb;
}

.report-page {
  width: 933px;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  padding: 48px 0 72px;
}

.report-cover {
  text-align: center;
  margin-bottom: 32px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 150px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.report-cover h2 {
  margin: 24px 0 8px;
  font-size: 2rem;
  line-height: 1.25;
}

.report-cover p {
  margin: 6px 0 0;
  color: var(--muted);
}

.status {
  min-height: 21px;
}

.status.error {
  color: #b91c1c;
  font-weight: 700;
}

.report-index {
  margin: 0 0 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 2px 4px rgba(34, 36, 38, .08);
}

.index-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 18px;
  border-top: 1px solid var(--line-soft);
}

.index-row:first-child {
  border-top: 0;
}

.index-row a {
  font-weight: 700;
}

.index-row span {
  color: var(--muted);
  font-size: 12px;
}

.category-section {
  margin: 52px 0 0;
}

.category-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.category-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.category-count {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.copy-category-btn {
  color: #111827;
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  white-space: nowrap;
}

.copy-category-btn.copied {
  color: #047857;
  border-color: rgba(4, 120, 87, .28);
  background: #ecfdf5;
}

.report-article {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 2px 4px rgba(34, 36, 38, .08), 0 2px 10px rgba(34, 36, 38, .08);
}

.report-article-group {
  margin: 0 0 20px;
  border: 1px solid #d4d4d5;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(34, 36, 38, .08), 0 2px 10px rgba(34, 36, 38, .08);
}

.report-article-group-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #f8fafc;
}

.report-article-group-header h4 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.report-article-group-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.report-article-group-list {
  padding: 12px 14px 0;
}

.report-article-group .report-article {
  box-shadow: none;
}

.report-article h4 {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #d4d4d5;
  border-radius: 6px 6px 0 0;
  font-size: 18px;
  line-height: 1.35;
}

.article-meta {
  margin: 0;
  padding: 10px 16px;
  border: 1px solid #d4d4d5;
  border-top-width: 0;
  background: #f3f4f5;
  color: rgba(0, 0, 0, .62);
}

.article-summary {
  padding: 12px 16px 14px;
  border: 1px solid #d4d4d5;
  border-top-width: 0;
  border-radius: 0 0 6px 6px;
}

.snippet {
  margin: 0 0 8px;
  padding: 8px 11px;
  border-left: 3px solid var(--mozilla);
  background: #f8fafc;
  color: #374151;
}

.category-section[data-category="Firefox in the News"] .snippet {
  border-left-color: var(--firefox);
}

.snippet:last-child {
  margin-bottom: 0;
}

.snippet b {
  font-weight: 700;
  color: #111827;
}

.empty-message {
  margin: 28px 0 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--muted);
  text-align: center;
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .toolbar-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .report-controls {
    justify-content: stretch;
  }

  .report-controls label,
  .report-controls input,
  .btn {
    width: 100%;
  }

  .category-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-category-btn {
    width: 100%;
  }
}

@media print {
  [data-no-print],
  .report-toolbar {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .report-page {
    width: auto;
    max-width: none;
    padding: 0;
  }

  .report-cover {
    margin-top: 0;
  }

  .report-article,
  .report-article-group,
  .report-index {
    box-shadow: none;
    break-inside: avoid;
  }

  .category-section {
    break-inside: auto;
  }

  a {
    color: #111827;
  }
}
