.reports-page {
  --report-wash: #f8f2f6;
  --report-secondary: #6e5d6b;
}

.reports-page .page-head {
  margin-bottom: 26px;
}

.reports-page .page-head p {
  color: var(--report-secondary);
}

.reports-page .panel {
  overflow: visible;
}

.reports-result[hidden] {
  display: none;
}

.reports-page .panel h2 {
  margin: 0 0 18px;
}

.reports-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.reports-filters fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0 0 18px;
}

.reports-filters legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--ink);
  font-weight: 600;
}

.reports-periods,
.reports-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reports-periods {
  margin-bottom: 15px;
}

.reports-periods button {
  min-height: 44px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--white);
  color: var(--purple);
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.reports-periods button:hover {
  border-color: var(--pink);
  background: var(--report-wash);
}

.reports-periods button[aria-pressed="true"] {
  border-color: var(--purple);
  background: var(--soft);
  color: var(--dark);
  font-weight: 700;
}

.reports-filters label {
  margin: 0;
}

.reports-date-grid input {
  padding-inline: 7px;
  min-height: 44px;
}

.reports-date-grid input[aria-invalid="true"] {
  border-color: #8b4a59;
}

.reports-filters .reports-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-block: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
}

.reports-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: none;
  margin: 0;
}

.reports-more {
  border-top: 1px solid var(--line);
}

.reports-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 10px;
  list-style: none;
  color: var(--purple);
  font-weight: 600;
  cursor: pointer;
}

.reports-more summary::-webkit-details-marker {
  display: none;
}

.reports-more summary::after {
  width: 7px;
  height: 7px;
  margin: 0 3px 3px 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  content: '';
}

.reports-more[open] summary::after {
  margin-block: 4px 0;
  transform: rotate(225deg);
}

.reports-more summary:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.reports-more [data-report-statuses] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 16px;
}

.reports-actions {
  margin-top: 14px;
}

.reports-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.reports-actions .btn:disabled {
  border-color: var(--line);
  background: var(--paper);
  color: var(--report-secondary);
  cursor: default;
}

.reports-result {
  scroll-margin-top: 16px;
}

.reports-metadata {
  display: grid;
  gap: 7px;
  margin: 0 0 18px;
  color: var(--report-secondary);
  line-height: 1.45;
}

.reports-metadata > div {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  gap: 2px 12px;
}

.reports-metadata dt {
  font-weight: 600;
}

.reports-metadata dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.reports-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.reports-metric {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--report-wash);
  overflow-wrap: anywhere;
}

.reports-metric:first-child {
  border-color: var(--pink);
  background: var(--soft);
}

.reports-metric dt {
  color: var(--report-secondary);
  font-size: 13px;
  line-height: 1.3;
}

.reports-metric dd {
  margin: 0;
  color: var(--ink);
  font-size: clamp(15px, 1.7vw, 21px);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.3;
}

.reports-breakdown {
  margin-top: 24px;
}

.reports-breakdown h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.reports-breakdown table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.reports-breakdown :is(th, td) {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: end;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.reports-breakdown th:first-child {
  width: 34%;
  text-align: start;
}

.reports-breakdown th:first-child:nth-last-child(2),
.reports-breakdown th:first-child:nth-last-child(3) {
  width: 54%;
}

.reports-breakdown thead th {
  background: var(--report-wash);
  color: var(--report-secondary);
  font-size: 13px;
  font-weight: 600;
}

.reports-breakdown tbody th {
  font-weight: 500;
}

.reports-breakdown td {
  font-variant-numeric: tabular-nums;
}

.reports-feedback,
.reports-warnings,
.reports-notes {
  margin: 12px 0 0;
  color: var(--report-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.reports-warnings,
.reports-notes {
  padding-left: 18px;
}

@media (max-width: 700px) {
  .reports-filter-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .reports-more .reports-filter-grid {
    gap: 12px;
  }

  .reports-more [data-report-statuses] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
  }
}

@media (max-width: 520px) {
  .reports-page .page-head {
    margin-bottom: 20px;
  }

  .reports-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-actions .btn {
    width: 100%;
  }

  .reports-metadata > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .reports-breakdown :is(th, td) {
    padding-inline: 4px;
    font-size: 12px;
  }

  .reports-breakdown th:first-child:nth-last-child(4) {
    width: 28%;
  }
}

@media (max-width: 350px) {
  .reports-date-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.privacy-reports {
  margin-top: 24px;
  min-width: 0;
}

.privacy-reports[hidden] { display: none; }
.reports-page .privacy-reports h2 { margin-bottom: 6px; }
.privacy-reports-heading p,
.privacy-reports-note {
  margin: 6px 0 12px;
  color: var(--report-secondary);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.privacy-reports-controls {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.privacy-reports-controls label { flex: 1; max-width: 330px; min-width: 0; margin: 0; }
.privacy-reports-controls select { width: 100%; min-height: 44px; }
.privacy-reports-controls .btn { min-height: 44px; margin: 0; }
.privacy-reports [data-privacy-report-status] { margin-bottom: 18px; }
.privacy-reports [role="alert"] { color: #8b3549; }
.privacy-reports-month { border-top: 1px solid var(--line); padding-top: 18px; }
.privacy-reports-month-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.privacy-reports h3 { font-size: 18px; line-height: 1.4; margin: 0; }
.privacy-reports-month-heading h3::first-letter { text-transform: uppercase; }
.privacy-reports h4 { font-size: 14px; margin: 20px 0 10px; }
.privacy-reports-state { border-radius: 4px; padding: 5px 8px; background: #f0f2f0; color: #455347; font-size: 12px; }
.privacy-reports-state.is-partial { background: #f8efdb; color: #70501c; }
.privacy-reports-coverage { margin: 12px 0; padding: 12px; border-left: 3px solid #b99151; background: #fbf6ec; color: #654b27; font-size: 13px; line-height: 1.55; }
.privacy-reports-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 12px; }
.privacy-reports-metrics > div { padding: 12px; background: var(--report-wash); border-radius: 4px; min-width: 0; }
.privacy-reports-metrics dt { font-size: 12px; color: var(--report-secondary); line-height: 1.5; overflow-wrap: anywhere; }
.privacy-reports-metrics dd { font-size: 23px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 5px 0 0; color: var(--ink); }
.privacy-reports-details { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.privacy-reports-details summary { font-size: 14px; font-weight: 600; cursor: pointer; min-height: 32px; }
.privacy-reports-details > p { font-size: 13px; line-height: 1.55; }
.privacy-reports-table { max-width: 100%; }
.privacy-reports-table table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 13px; }
.privacy-reports-table caption { text-align: start; font-weight: 600; margin: 12px 0 8px; }
.privacy-reports-table :is(th, td) { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: end; overflow-wrap: anywhere; }
.privacy-reports-table th:first-child { width: 58%; text-align: start; }
.privacy-reports-table thead th { background: var(--report-wash); font-size: 12px; }
.privacy-reports-table tbody th { font-weight: 500; }
.privacy-reports-table td { font-variant-numeric: tabular-nums; }
.privacy-reports-table.has-maintenance th:first-child { width: 40%; }
.privacy-report-short-label { display: none; text-decoration: none; }
.privacy-reports-external { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.privacy-reports-external h3 { font-size: 15px; }
.privacy-reports-external dl { margin: 10px 0; }
.privacy-reports-external dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; }
.privacy-reports-external dd { margin: 0; color: #70501c; font-weight: 600; text-align: end; }
.privacy-reports-policy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin: 14px 0; }
.privacy-reports-policy > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.privacy-reports-policy dd { margin: 0; font-weight: 600; }

@media (max-width: 600px) {
  .privacy-reports-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .privacy-reports-controls { align-items: stretch; flex-direction: column; }
  .privacy-reports-controls label { max-width: none; }
  .privacy-reports-metrics > div { padding: 10px; }
  .privacy-reports-table :is(th, td) { padding-inline: 4px; }
  .privacy-reports-table thead th:not(:first-child) { white-space: nowrap; }
  .privacy-reports-table th:first-child { width: 52%; }
  .privacy-reports-table.has-maintenance th:first-child { width: 40%; }
  .privacy-report-full-label { display: none; }
  .privacy-report-short-label { display: inline; }
  .privacy-reports-policy { grid-template-columns: minmax(0, 1fr); }
}
