/* diffcritic customer pages: design tokens and the components built from them.
   Plain CSS, no build step. Every colour, size and radius below comes from
   the custom properties in :root. */

:root {
  color-scheme: light;

  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.5rem;
  --leading-tight: 1.15;
  --leading-body: 1.5;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --color-bg: #f3efe6;
  --color-surface: #fffdf8;
  --color-surface-2: #ebe6da;
  --color-line: #d8d1c2;
  --color-ink: #1d1b16;
  --color-ink-2: #5d5a52;
  --color-accent: #0b5d5a;
  --color-accent-2: #0f7f7a;
  --color-on-accent: #ffffff;
  --color-ok: #2c6e3d;
  --color-ok-bg: #dff1e2;
  --color-warn: #8a5300;
  --color-warn-bg: #fbe9c6;
  --color-danger: #a1261b;
  --color-danger-bg: #fbe0dc;
  --color-info: #1f4e79;
  --color-info-bg: #dfe9f1;

  --shadow-card: 0 1px 2px rgba(29, 27, 22, 0.06), 0 10px 28px -18px rgba(29, 27, 22, 0.3);
  --max-width: 72rem;
  --measure: 42rem;
  --control-height: 2.75rem;
  --control-height-compact: 2.25rem;
  --policy-field-width: 12rem;
  --wide-width: 90rem;

  /* Strong ease-out for entrances and feedback; the drawer curve for the
     side panel. Exits use the same curves, shorter. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --shadow-raised: 0 1px 2px rgba(29, 27, 22, 0.08), 0 18px 40px -16px rgba(29, 27, 22, 0.45);
}

/* Base */

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

html {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
}

h1 {
  font-size: var(--text-2xl);
}

h2 {
  font-size: var(--text-xl);
}

h3 {
  font-size: var(--text-lg);
}

p {
  margin: 0 0 var(--space-3);
}

a {
  color: var(--color-accent);
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

code,
pre,
.mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

pre {
  margin: 0;
  padding: var(--space-4);
  background: var(--color-ink);
  color: var(--color-surface);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.muted {
  color: var(--color-ink-2);
  font-size: var(--text-sm);
}

/* Header and page frame */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  padding: var(--space-4) var(--space-6);
  background: var(--color-ink);
  color: var(--color-surface);
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-left: auto;
}

.site-nav form {
  margin: 0;
}

.site-nav .button {
  min-height: var(--control-height);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
}

.site-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-header :focus-visible {
  outline-color: var(--color-surface);
}

.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6) var(--space-12);
}

/* The footer row starts where the page column's content starts. */
.site-footer {
  border-top: 1px solid var(--color-line);
  padding: var(--space-2) max(var(--space-6), (100% - var(--max-width)) / 2 + var(--space-6));
  font-size: var(--text-sm);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-6);
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  color: var(--color-ink-2);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer-nav a:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-6);
}

.page-head h1 {
  margin: 0;
}

.page-head .muted {
  margin: 0;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.subnav a {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  text-decoration: none;
  font-size: var(--text-sm);
}

.subnav a[aria-current="page"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
}

/* Cards and grids */

.grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  margin-bottom: var(--space-6);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  min-width: 0;
}

.grid > .card {
  margin-bottom: 0;
}

.card > h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
}

.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.card-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--color-line);
}

.card-list li:first-child {
  border-top: 0;
}

.card-list a {
  font-weight: 600;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-1) var(--space-4);
  margin: 0;
}

.facts dt {
  color: var(--color-ink-2);
  font-size: var(--text-sm);
}

.facts dd {
  margin: 0;
}

/* Status badges */

.badge {
  display: inline-block;
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--color-surface-2);
  color: var(--color-ink-2);
  white-space: nowrap;
}

.badge-queued,
.badge-trialing {
  background: var(--color-info-bg);
  color: var(--color-info);
}

.badge-in_progress,
.badge-running,
.badge-past_due {
  background: var(--color-warn-bg);
  color: var(--color-warn);
}

.badge-completed,
.badge-posted,
.badge-active {
  background: var(--color-ok-bg);
  color: var(--color-ok);
}

.badge-refused,
.badge-failed,
.badge-suspended,
.badge-canceled {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.badge-charged {
  background: var(--color-info-bg);
  color: var(--color-info);
}

.badge-free {
  background: var(--color-ok-bg);
  color: var(--color-ok);
}

/* Usage meters */

.meter {
  margin-top: var(--space-4);
}

.meter-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.usage-value {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 600;
}

.meter-bar {
  height: var(--space-2);
  margin-top: var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: var(--fill, 0%);
  background: var(--color-accent-2);
  border-radius: var(--radius-pill);
}

.meter-fill.is-over {
  background: var(--color-danger);
}

.usage-price {
  font-family: var(--font-mono);
}

.meter-note {
  margin: var(--space-1) 0 0;
  color: var(--color-ink-2);
  font-size: var(--text-sm);
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--color-line);
  white-space: nowrap;
}

.table th {
  border-top: 0;
  color: var(--color-ink-2);
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table td.reason,
.table td.wrap {
  white-space: normal;
}

/* Comparison pages: the row header names the provider, plan and basis, so it
   wraps in normal case; the table scrolls inside .table-wrap on a phone. */
.compare-costs th[scope="row"] {
  min-width: 16rem;
  max-width: 24rem;
  white-space: normal;
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.compare-costs caption {
  text-align: left;
}

.compare-costs th[scope="row"] .muted {
  display: block;
}

.compare-sources,
.compare-tools {
  overflow-wrap: anywhere;
}

/* Reserve a readable wrapping width only when there is text to wrap, so an
   empty reason column does not push the other columns off the card. */
.table td.reason:not(:empty),
.table td.wrap:not(:empty) {
  min-width: 14rem;
}

.table .empty {
  color: var(--color-ink-2);
  text-align: center;
  padding: var(--space-6);
}

/* Costs page: the month pager, and PR rows that group their commit rows. */

.month-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-4);
}

/* The month heading leads and the Previous/Next links follow it, so the
   heading stays put when the current month has no Next link. */
.month-nav h2 {
  order: -1;
  margin: 0;
}

.month-nav a {
  white-space: nowrap;
}

.table tr.pr-row td {
  background: var(--color-surface-2);
  font-weight: 600;
}

.table tr.commit-row td:first-child {
  padding-left: var(--space-6);
}

.table td.findings {
  white-space: normal;
  min-width: 14rem;
}

/* Buttons and forms */

.button {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms var(--ease-out);
}

.button:active:not([disabled]) {
  transform: scale(0.97);
}

.button:hover {
  background: var(--color-accent-2);
  border-color: var(--color-accent-2);
}

.button-secondary {
  background: transparent;
  color: var(--color-accent);
}

.button-secondary:hover {
  background: var(--color-surface-2);
}

.button-ghost {
  background: transparent;
  border-color: var(--color-ink-2);
  color: inherit;
}

.button[disabled] {
  background: var(--color-surface-2);
  border-color: var(--color-line);
  color: var(--color-ink-2);
  cursor: not-allowed;
}

.select[disabled] {
  background: var(--color-surface-2);
  color: var(--color-ink-2);
  cursor: not-allowed;
}

.button-small {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
}

.select {
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
  font: inherit;
  font-size: var(--text-sm);
}

.select:focus-visible,
.input:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 2px;
}

.review-type,
.security-scan {
  /* Positioned so its visually-hidden label is clipped by the scrolling
     table wrap instead of widening the page. */
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}

.scan-note {
  max-width: 8rem;
  font-size: var(--text-xs);
  line-height: 1.25;
  white-space: normal;
}

/* Repository settings: defaults and per-repository overrides stay separate. */
.review-default {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  padding: var(--space-4) 0;
  margin-bottom: var(--space-4);
  border-block: 1px solid var(--color-line);
}

/* The scan default sits under the review-type default as one settings block. */
.review-default + .review-default {
  margin-top: calc(-1 * var(--space-4));
  border-top: 0;
}

.review-default-copy {
  flex: 1 1 20rem;
}

.review-default-copy label {
  font-weight: 600;
}

.review-default-copy p {
  margin: var(--space-1) 0 0;
  max-width: var(--measure);
}

.review-default-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.settings-saved {
  margin: 0 0 var(--space-3);
  color: var(--color-ok);
  font-size: var(--text-sm);
  white-space: normal;
}

.personal-check-defaults,
.findings-policy,
.check-policy-field {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.check-policy-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--policy-field-width)), 1fr));
  gap: var(--space-4);
}

.check-policy-field {
  align-content: start;
  gap: var(--space-1);
}

.check-policy-field label {
  font-weight: 600;
}

.check-policy-field p,
.personal-check-defaults p {
  margin: 0;
  overflow-wrap: anywhere;
}

.findings-policy {
  gap: var(--space-4);
}

.personal-check-defaults .select,
.findings-policy .select {
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  font-size: var(--text-md);
}

.personal-check-defaults .button,
.findings-policy .button {
  justify-self: start;
  min-height: var(--control-height);
  touch-action: manipulation;
  user-select: none;
}

.personal-check-defaults .button:active,
.findings-policy .button:active {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.plans {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.plan {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.plan h3 {
  margin: 0;
}

.plan-price {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  margin: 0;
}

.plan-unit {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}

.plan ul {
  margin: 0;
  padding-left: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}

.plan .button {
  margin-top: auto;
  align-self: flex-start;
}

/* Public pages: the landing hero, the setup steps and the review types */

.hero {
  display: block;
  margin-bottom: var(--space-8);
}

.hero h1,
.lede {
  max-width: var(--measure);
}

.hero h1 {
  margin-bottom: var(--space-3);
}

.lede {
  margin: 0;
  font-size: var(--text-lg);
  color: var(--color-ink-2);
}

/* The landing page's first action, above the fold on phones: ad clicks land
   here, and the install list in "Get started" sits below the fold. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin: var(--space-4) 0 0;
}

.hero-audience {
  max-width: var(--measure);
  margin-top: var(--space-3);
}

.hero-price {
  margin: var(--space-3) 0 0;
}

.hero-actions a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
}

.marketing-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: var(--space-6);
}

.marketing-columns > div {
  min-width: 0;
}

.marketing-list {
  margin: var(--space-4) 0;
  padding-left: var(--space-6);
}

.marketing-list li + li {
  margin-top: var(--space-2);
}

.finding-excerpt {
  max-width: 54rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow-wrap: anywhere;
}

.finding-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: 1px solid var(--color-line);
}

.finding-header strong {
  color: var(--color-accent);
}

.finding-body {
  padding: var(--space-4);
}

.finding-body h3 {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-body);
}

.finding-severity {
  display: inline-block;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.finding-body blockquote {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

.finding-body p:last-child {
  margin-bottom: 0;
}

.example-links {
  margin: var(--space-4) 0 0;
}

.pricing-subhead {
  margin-top: var(--space-6);
}

.marketing-price-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.marketing-price-table th,
.marketing-price-table td {
  padding: var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--color-line);
  vertical-align: top;
}

.marketing-price-table tbody th {
  font-weight: 400;
}

.marketing-price-table td,
.marketing-price-table thead th:last-child {
  text-align: right;
  white-space: nowrap;
}

.homepage-faq details {
  border-top: 1px solid var(--color-line);
}

.homepage-faq summary {
  padding: var(--space-3) 0;
  min-height: var(--control-height);
  font-weight: 600;
  cursor: pointer;
}

.homepage-faq details p {
  max-width: var(--measure);
}

.homepage-faq > p {
  margin-top: var(--space-4);
}

.closing-cta {
  text-align: center;
}

.closing-cta > h2 {
  justify-content: center;
}

.closing-cta .button,
#pricing .button {
  min-height: var(--control-height);
}

.steps {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-6);
}

.steps li {
  padding-left: var(--space-1);
  margin-bottom: var(--space-2);
}

.review-types {
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.review-types dt {
  color: var(--color-ink);
  font-size: var(--text-md);
  font-weight: 600;
}

/* Notices */

.banner-suspended,
.notice {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
  border: 1px solid transparent;
}

.banner-suspended {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: var(--color-danger);
  font-weight: 600;
}

.notice {
  background: var(--color-info-bg);
  color: var(--color-info);
}

.billing-gated {
  margin: var(--space-3) 0 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-warn-bg);
  color: var(--color-warn);
  font-size: var(--text-sm);
}

/* Sign-in pages (allauth templates) */

.page-auth {
  max-width: 30rem;
  padding-top: var(--space-12);
}

.auth-card {
  padding: var(--space-8);
}

.auth-card h1 {
  margin-top: 0;
}

.auth-card form {
  margin-top: var(--space-6);
}

.auth-messages {
  list-style: none;
  margin: 0 0 var(--space-6);
  padding: 0;
}

.auth-messages .notice {
  margin-bottom: var(--space-2);
}

/* OAuth consent (oauth2_provider/authorize.html) */

.consent-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-4);
  margin: var(--space-6) 0;
}

.consent-facts dt {
  color: var(--color-ink-2);
}

.consent-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.consent-scopes {
  padding-left: var(--space-6);
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.button-github {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--control-height);
}

.button-github svg {
  flex: none;
}

.auth-note {
  margin: var(--space-4) 0 0;
  font-size: var(--text-sm);
}

/* Repository security scans: launch, preview, history and private reports */

.card-list .card-list-secondary {
  margin-left: auto;
  font-weight: 400;
  font-size: var(--text-sm);
}

.scan-shortcut {
  font-size: var(--text-sm);
}

.scan-select {
  display: grid;
  /* minmax(0, ...) lets a long repository name shrink the select, not widen the page. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.scan-select label,
.scan-preview h3 {
  font-weight: 600;
}

.scan-select-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.scan-select .select {
  flex: 1 1 18rem;
  min-width: 0;
  max-width: 100%;
  min-height: var(--control-height);
  font-size: var(--text-md);
}

.scan-select .button,
.scan-buy,
.scan-download .button {
  min-height: var(--control-height);
}

.scan-select p,
.scan-launch p {
  margin: 0;
}

.scan-preview h3 {
  font-family: var(--font-body);
  font-size: var(--text-md);
  margin: var(--space-4) 0 var(--space-2);
}

.scan-facts dd,
.scan-repo,
.scan-path {
  overflow-wrap: anywhere;
  min-width: 0;
}

.scan-launch {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line);
}

.scan-error,
.scan-result {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  margin: var(--space-4) 0;
}

.scan-error,
.scan-result-partial {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: var(--color-danger);
}

.scan-result-clean {
  background: var(--color-ok-bg);
  color: var(--color-ok);
}

.scan-result-findings {
  background: var(--color-warn-bg);
  color: var(--color-warn);
}

.scan-result-expired {
  background: var(--color-surface-2);
  color: var(--color-ink-2);
}

.scan-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.scan-report > h2 .scan-repo {
  font-size: var(--text-md);
  font-weight: 400;
}

.scan-history .scan-repo {
  min-width: 12rem;
}

.scan-locations {
  margin: var(--space-1) 0 0;
  padding-left: var(--space-4);
  color: var(--color-ink-2);
}

.scan-coverage h3 {
  margin-top: var(--space-4);
}

.scan-exclusions {
  grid-template-columns: minmax(0, 1fr) max-content;
}

/* A path beside its label would size the column to the longest path and push
   the card past the window, so each path sits on its own line above it. The
   class pair outranks the narrow-screen .facts column, which could grow. */
.facts.scan-partly-checked {
  grid-template-columns: minmax(0, 1fr);
  row-gap: 0;
}

.scan-partly-checked dd {
  margin-bottom: var(--space-2);
}

.scan-points {
  margin: 0;
  padding-left: var(--space-6);
}

.scan-points li {
  margin-bottom: var(--space-2);
}

.scan-empty {
  margin-bottom: var(--space-4);
}

.severity-critical,
.severity-high,
.severity-error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.severity-medium,
.severity-warning {
  background: var(--color-warn-bg);
  color: var(--color-warn);
}

/* Repositories page: one line per repository, filters, the side panel for
   the findings policy, the bulk bar and the save toast. */

.page:has(> .repositories-page) {
  max-width: var(--wide-width);
}

.text-warning {
  color: var(--color-warn);
}

.repositories-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  margin-bottom: var(--space-4);
}

.repositories-head h2 {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin: 0;
}

.repository-defaults {
  font-size: var(--text-sm);
}

.repository-defaults[open] {
  flex-basis: 100%;
}

.repository-defaults summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--control-height-compact);
  color: var(--color-accent);
  cursor: pointer;
}

.repository-defaults summary:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.repository-defaults-value {
  color: var(--color-ink);
  font-weight: 600;
}

.repository-defaults-body {
  margin-top: var(--space-3);
}

.repository-defaults-body .review-default {
  margin-bottom: 0;
}

.repository-defaults-body .select,
.repository-defaults-body .button {
  min-height: var(--control-height-compact);
}

.repository-defaults summary::-webkit-details-marker {
  display: none;
}

/* A drawn chevron: points down when closed, up when open. */
.repository-defaults summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  margin-left: var(--space-1);
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms var(--ease-out);
}

.repository-defaults[open] summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.repository-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.repository-summary a {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  color: var(--color-ink);
  font-size: var(--text-sm);
  text-decoration: none;
}

.repository-summary .count {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.repository-summary a.is-warning {
  border-color: var(--color-warn);
  background: var(--color-warn-bg);
  color: var(--color-warn);
}

.repository-summary a:focus-visible,
.pager a:focus-visible,
.toast-close:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 2px;
}

.repository-filters {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-surface);
}

.filter-search {
  position: relative;
  flex: 1 1 16rem;
  max-width: 26rem;
}

.input {
  width: 100%;
  min-height: var(--control-height-compact);
  padding: var(--space-1) var(--space-8) var(--space-1) var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
  font: inherit;
  font-size: var(--text-sm);
}

.input::placeholder {
  color: var(--color-ink-2);
}

.filter-search kbd {
  position: absolute;
  top: 50%;
  right: var(--space-2);
  transform: translateY(-50%);
  padding: 0 0.4em;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  color: var(--color-ink-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  pointer-events: none;
}

.filter-search:focus-within kbd,
.input:not(:placeholder-shown) + kbd {
  display: none;
}

.filter-field {
  display: grid;
  gap: 2px;
  color: var(--color-ink-2);
  font-size: var(--text-xs);
  font-weight: 600;
}

.filter-field .select,
.repositories-table .select {
  min-height: var(--control-height-compact);
  color: var(--color-ink);
}

.repository-legend {
  max-width: 90ch;
  margin: var(--space-3) 0;
  font-size: var(--text-sm);
}

.repository-legend .policy-override {
  font-weight: 700;
}

.repository-count {
  margin: 0 0 var(--space-1);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.repositories-table th,
.repositories-table td {
  padding: var(--space-2);
  vertical-align: middle;
}

.repositories-table tbody th {
  border-top: 1px solid var(--color-line);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.repositories-table .repository-name {
  min-width: 12rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.repositories-table .badge {
  margin-left: var(--space-1);
}

/* A saved row the list's filters no longer match stays put (Undo and focus
   still find it) and says so. */
.repositories-table .badge-unmatched {
  background: var(--color-warn-bg);
  color: var(--color-warn);
}

.repository-row.is-unmatched .mono {
  color: var(--color-ink-2);
}

.repository-row.is-inactive .mono {
  color: var(--color-ink-2);
}

.col-select {
  width: 2rem;
}

.row-select,
.select-page {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--color-accent);
  vertical-align: middle;
}

.row-setting {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.policy-override {
  color: var(--color-accent);
  font-weight: 700;
}

.policy-edit-cell {
  text-align: right;
}

/* Where review intake never serves the repository, one sentence replaces the
   review settings across their columns. */
.reviews-missing {
  margin: 0;
  max-width: 70ch;
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  white-space: normal;
}

.repositories-table .scan-shortcut {
  margin-left: var(--space-2);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.repository-row:has(.row-select:checked) {
  background: color-mix(in srgb, var(--color-accent) 7%, transparent);
}

/* A saved row lights up once, then settles back. */
.repository-row.is-saved {
  animation: row-saved 1.4s var(--ease-out);
}

@keyframes row-saved {
  from {
    background: var(--color-ok-bg);
  }
}

@media (hover: hover) and (pointer: fine) {
  .repository-row:hover {
    background: color-mix(in srgb, var(--color-surface-2) 55%, transparent);
  }

  .repository-summary a:hover {
    border-color: var(--color-ink-2);
  }

  .repositories-table .select:hover,
  .filter-field .select:hover {
    border-color: var(--color-ink-2);
  }
}

@media (pointer: coarse) {
  .filter-field .select,
  .repositories-table .select,
  .input {
    min-height: var(--control-height);
  }
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding-top: var(--space-4);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.pager a {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

/* While rows are selected the bulk bar rises from the bottom edge; the page
   keeps room for it so the last row and the pager stay reachable. :has()
   works without JavaScript; repositories.js sets .has-selection for browsers
   without :has(), and :is() drops the selector it cannot parse. */
.repositories-page:is(.has-selection, :has(.row-select:checked)) {
  padding-bottom: 7rem;
}

.bulk-bar {
  position: fixed;
  z-index: 20;
  bottom: var(--space-4);
  left: 50%;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
  width: max-content;
  max-width: calc(100vw - 2 * var(--space-4));
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-raised);
  transform: translate(-50%, calc(100% + var(--space-8)));
  visibility: hidden;
  transition:
    transform 160ms var(--ease-out),
    visibility 0s linear 160ms;
}

.repositories-page:is(.has-selection, :has(.row-select:checked)) .bulk-bar {
  transform: translate(-50%, 0);
  visibility: visible;
  transition: transform 240ms var(--ease-out);
}

.bulk-count {
  align-self: center;
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bulk-actions {
  display: flex;
  gap: var(--space-2);
}

.toast {
  position: fixed;
  z-index: 30;
  right: var(--space-4);
  bottom: var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  width: min(26rem, calc(100vw - 2 * var(--space-4)));
  padding: var(--space-3) var(--space-2) var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-ink);
  color: var(--color-surface);
  box-shadow: var(--shadow-raised);
  font-size: var(--text-sm);
  opacity: 0;
  transform: translateY(calc(100% + var(--space-4)));
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms var(--ease-out);
}

.toast[data-open] {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition:
    opacity 240ms ease,
    transform 240ms var(--ease-out);
}

.toast[data-tone="warning"] {
  background: var(--color-warn);
}

.settings-saved.is-warning {
  color: var(--color-warn);
}

.toast[data-tone="error"] {
  background: var(--color-danger);
}

.repositories-page:is(.has-selection, :has(.row-select:checked)) .toast {
  bottom: 7rem;
}

.toast-body {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  min-width: 0;
}

.toast-body p {
  flex: 1 1 12rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.toast-undo {
  margin: 0;
}

.toast .button-secondary {
  border-color: rgba(255, 253, 248, 0.55);
  color: var(--color-surface);
}

.toast-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .toast .button-secondary:hover,
  .toast-close:hover {
    background: rgba(255, 253, 248, 0.14);
  }
}

/* The findings-policy panel: a modal sheet on the right edge. It slides in
   with the drawer curve and leaves faster than it came. */
.panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(32rem, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: var(--shadow-raised);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  transition:
    transform 180ms var(--ease-out),
    overlay 180ms allow-discrete,
    display 180ms allow-discrete;
}

.panel[open] {
  transform: none;
  transition:
    transform 280ms var(--ease-drawer),
    overlay 280ms allow-discrete,
    display 280ms allow-discrete;
}

@starting-style {
  .panel[open] {
    transform: translateX(100%);
  }
}

.panel::backdrop {
  background: rgba(29, 27, 22, 0);
  transition:
    background-color 180ms ease,
    overlay 180ms allow-discrete,
    display 180ms allow-discrete;
}

.panel[open]::backdrop {
  background: rgba(29, 27, 22, 0.32);
}

@starting-style {
  .panel[open]::backdrop {
    background: rgba(29, 27, 22, 0);
  }
}

.panel-body {
  min-height: 100%;
}

.panel-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--color-line);
  background: var(--color-surface);
}

.panel-head form {
  margin: 0;
}

.panel-title {
  min-width: 0;
}

.panel-title h2 {
  margin: 0;
}

.panel-title p {
  margin: var(--space-1) 0 0;
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.panel-content {
  padding: var(--space-4) var(--space-6) var(--space-8);
}

.panel-content > p,
.policy-page > p {
  font-size: var(--text-sm);
}

.policy-back {
  margin: var(--space-6) 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .button:active:not([disabled]) {
    transform: none;
  }

  .bulk-bar,
  .repositories-page:is(.has-selection, :has(.row-select:checked)) .bulk-bar {
    transform: translate(-50%, 0);
    opacity: 0;
    transition:
      opacity 160ms ease,
      visibility 0s linear 160ms;
  }

  .repositories-page:is(.has-selection, :has(.row-select:checked)) .bulk-bar {
    opacity: 1;
    transition: opacity 160ms ease;
  }

  .toast,
  .toast[data-open] {
    transform: none;
  }

  .panel,
  .panel[open] {
    transform: none;
    opacity: 0;
    transition:
      opacity 160ms ease,
      overlay 160ms allow-discrete,
      display 160ms allow-discrete;
  }

  .panel[open] {
    opacity: 1;
  }

  @starting-style {
    .panel[open] {
      opacity: 0;
    }
  }
}

/* API access page (web/api_access.html): the key and limit forms, the key
   shown once with its copy buttons, and a connected app's identity. */

.api-form {
  display: grid;
  gap: var(--space-4);
  max-width: var(--measure);
  margin: var(--space-4) 0 var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-line);
}

.api-form-inline {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  align-items: end;
  max-width: none;
}

.api-form .button {
  justify-self: start;
  min-height: var(--control-height);
}

.api-field {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.api-field > label,
.api-field > legend {
  padding: 0;
  font-size: var(--text-sm);
  font-weight: 600;
}

.api-field .input {
  max-width: 24rem;
  padding-right: var(--space-3);
}

.sponsorship-form .input {
  width: 100%;
  min-width: 0;
}

.sponsorship-form input.input {
  min-height: var(--control-height);
}

.api-field .input-days {
  max-width: 8rem;
}

/* A select is as wide as its longest option (a 100-character key label):
   keep it inside its field, so the form never widens the page. */
.api-field .select {
  width: 100%;
  max-width: 100%;
  min-height: var(--control-height-compact);
}

.api-field p {
  margin: 0;
  font-size: var(--text-sm);
}

.check {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.check input {
  flex: none;
}

.form-error {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-md);
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.key-created {
  border-color: var(--color-accent);
}

.key-created h3 {
  margin: var(--space-4) 0 var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-md);
}

.copy-block {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-2) var(--space-3);
}

/* A command keeps the site's dark pre; the key itself reads as a value. */
.copy-block .secret,
.copy-block .command {
  flex: 1 1 16rem;
  min-width: 0;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.copy-block .secret {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  color: var(--color-ink);
}

/* Public assistant pages: steps with their copyable commands. */
.assistant-client h3,
.api-docs h3 {
  margin: var(--space-6) 0 var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-md);
}

.assistant-client h2 + p {
  color: var(--color-ink-2);
}

.assistant-steps li {
  margin-bottom: var(--space-4);
}

.assistant-steps li p {
  margin: 0;
  max-width: var(--measure);
}

.assistant-steps .copy-block {
  margin-top: var(--space-2);
}

.assistant-client .source {
  margin: var(--space-4) 0 0;
  overflow-wrap: anywhere;
}

.prompts {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-6);
}

.prompts li {
  margin-bottom: var(--space-1);
}

.agent-card {
  border-left: 4px solid var(--color-accent);
}

.setup-connect {
  margin-top: var(--space-6);
}

.app-identity {
  display: grid;
  gap: 2px;
  font-size: var(--text-sm);
}

.app-identity .mono {
  overflow-wrap: anywhere;
}

.table td.num {
  font-variant-numeric: tabular-nums;
}

/* Positioned, so the visually-hidden column headings are clipped by the
   scrolling wrap instead of widening the page on a phone. */
.api-access .table-wrap {
  position: relative;
}

/* Headings, labels (up to 100 characters, maybe one long word), accounts,
   states and paths wrap, at any character if need be, so every table fits
   a desktop card; on a phone they scroll inside their wrap. */
.api-access .table th,
.api-docs .table th {
  white-space: normal;
}

.api-access .table td.wrap,
.api-docs .table td.wrap {
  overflow-wrap: anywhere;
}

.api-access .table td.wrap:not(:empty),
.api-docs .table td.wrap:not(:empty) {
  min-width: 8rem;
}

.api-access .table .cell-detail,
.api-access .table td.dates span {
  display: block;
}

.api-access .table .cell-detail {
  font-size: var(--text-xs);
}

.api-access .table td.path {
  overflow-wrap: anywhere;
}

/* Revoke and Remove stay at the visible right edge of a table that scrolls
   sideways, so they are reachable without scrolling at any width. */
.api-access .table .actions {
  position: sticky;
  right: 0;
  background: var(--color-surface);
  box-shadow: inset 1px 0 0 var(--color-line);
}

.credential-state[data-state="revoked"],
.credential-state[data-state="expired"] {
  color: var(--color-ink-2);
}

/* Small screens */

@media (max-width: 40rem) {
  .site-header,
  .site-footer,
  .page {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .site-header {
    gap: var(--space-1) var(--space-3);
    padding-block: var(--space-2);
  }

  .site-nav {
    margin-left: 0;
    gap: 0 var(--space-3);
    font-size: var(--text-sm);
  }

  .marketing-columns {
    gap: var(--space-4);
  }

  .page {
    padding-top: var(--space-6);
  }

  h1 {
    font-size: var(--text-xl);
  }

  h2 {
    font-size: var(--text-lg);
  }

  .card {
    padding: var(--space-4);
    border-radius: var(--radius-md);
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 0 var(--space-4);
  }

  .facts dd {
    margin-bottom: var(--space-2);
  }

  .month-nav h2 {
    flex-basis: 100%;
  }

  .review-default-controls {
    display: flex;
    width: 100%;
  }

  .review-default-controls .select,
  .repository-filters .filter-field,
  .bulk-bar .filter-field {
    flex: 1 1 8rem;
    min-width: 0;
  }

  .repository-filters {
    position: static;
  }

  .filter-search {
    flex-basis: 100%;
    max-width: none;
  }

  .filter-search kbd {
    display: none;
  }

  .repositories .table-wrap {
    overflow: visible;
  }

  /* Each repository becomes a compact block on a six-column grid: the
     checkbox and the name, then two settings per line, then the three
     findings passes side by side. Labels sit above their values. */
  .repositories-table,
  .repositories-table tbody,
  .repositories-table td,
  .repositories-table tbody th {
    display: block;
  }

  .repositories-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .repositories-table .repository-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-2) var(--space-3);
    padding: var(--space-3) 0 var(--space-4);
    border-top: 1px solid var(--color-line);
  }

  .repositories-table .repository-row > * {
    padding: 0;
    border: 0;
  }

  .repositories-table .col-select {
    display: flex;
    align-items: center;
    width: auto;
  }

  .repositories-table .repository-name {
    grid-column: 2 / -1;
    align-self: center;
    min-width: 0;
  }

  .repositories-table [data-label] {
    grid-column: span 3;
    min-width: 0;
  }

  .repositories-table .policy-pass {
    grid-column: span 2;
  }

  .repositories-table .reviews-missing-cell {
    grid-column: 1 / -1;
  }

  .repositories-table .policy-owner + .policy-pass {
    grid-column: 1 / span 2;
  }

  .repositories-table [data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--color-ink-2);
    font-size: var(--text-xs);
    font-weight: 600;
  }

  .repositories-table .row-setting {
    flex-wrap: wrap;
  }

  .repositories-table .row-setting .select {
    flex: 1 1 100%;
    min-width: 0;
  }

  .repositories-table .scan-note {
    max-width: none;
  }

  .repositories-table .select,
  .repositories-table .policy-edit {
    min-height: var(--control-height);
  }

  .repositories-table .policy-edit-cell {
    grid-column: 1 / -1;
    text-align: left;
  }

  .policy-edit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  /* Findings stack per row so the location stays on screen. */
  .scan-findings,
  .scan-findings tbody,
  .scan-findings tr,
  .scan-findings td {
    display: block;
  }

  .scan-findings thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .scan-findings tr {
    padding: var(--space-3) 0;
    border-top: 1px solid var(--color-line);
  }

  .scan-findings td {
    padding: var(--space-1) 0;
    border: 0;
  }

  .scan-findings td.wrap:not(:empty) {
    min-width: 0;
  }

  .scan-exclusions {
    grid-template-columns: 1fr;
  }

  .repository-filters .select,
  .bulk-bar .select {
    width: 100%;
    min-width: 0;
  }

  .bulk-bar {
    width: calc(100vw - 2 * var(--space-4));
  }
}

.video-frame {
  aspect-ratio: 9 / 16;
  max-width: 320px;
  margin: 0 auto 1rem;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Public page: anonymized review examples, above the videos */

.review-examples-label {
  display: inline-block;
  margin: 0 0 var(--space-4);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
  color: var(--color-ink-2);
  font-size: var(--text-xs);
}

.review-examples-gallery {
  display: grid;
  gap: var(--space-8);
}

.review-example {
  margin: 0;
}

.review-examples-card .review-example {
  max-width: var(--measure);
}

.review-example-frame {
  display: block;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.review-example-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.review-example-frame:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 3px;
}

.review-example figcaption {
  margin-top: var(--space-3);
  max-width: var(--measure);
}

.review-example-open {
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

@media (hover: hover) and (pointer: fine) {
  .review-example-frame:hover {
    border-color: var(--color-accent-2);
    box-shadow: var(--shadow-raised);
  }
}

@media (max-width: 40rem) {
  .review-examples-gallery {
    gap: var(--space-6);
  }

  .review-examples-label {
    font-size: var(--text-sm);
  }
}

.llm-instructions {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Advertising consent banner (diffcritic/ads). */
.consent-banner {
  position: fixed;
  inset: auto var(--space-4) var(--space-4) auto;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 24rem;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 24px rgb(29 27 22 / 0.18);
  font-size: var(--text-sm);
}

.consent-banner[hidden] {
  display: none;
}

.consent-banner p {
  margin: 0;
}

.consent-actions {
  display: flex;
  gap: var(--space-2);
}

@media (max-width: 40rem) {
  .consent-banner {
    inset-inline: var(--space-2);
    max-width: none;
  }
}

.consent-actions .button {
  background: var(--color-surface);
  color: var(--color-ink);
  border-color: var(--color-ink-2);
  min-height: var(--control-height);
  flex: 1;
}

.consent-actions .button:hover {
  background: var(--color-surface-2);
  border-color: var(--color-accent);
}
