.csp-main {
  padding-top: 48px;
  padding-bottom: 50px;
}
.header nav {
  align-items: center;
}
.tool-badge {
  color: #9cdfca;
  border: 1px solid #53e3bd44;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}
.csp-intro h1 {
  font-size: clamp(2.3rem, 4.3vw, 3.7rem);
  margin-bottom: 20px;
}
.csp-intro .eyebrow {
  margin-bottom: 20px;
}
.csp-intro > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 680px;
}
.privacy-line {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #8fcbb8;
  font-size: 0.8rem;
  margin-top: 18px;
}
.privacy-line > span {
  font-size: 1.15rem;
}
button,
textarea,
select,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}
#csp-form {
  margin-top: 35px;
}
.input-panel {
  border: 1px solid #35465d;
  border-radius: 10px;
  overflow: hidden;
  background: #0b1526;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #132036;
  border-bottom: 1px solid #2b3c55;
  padding: 10px 18px;
  flex-wrap: wrap;
}
.panel-heading > label {
  font-size: 0.88rem;
  font-weight: 600;
}
.panel-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}
select,
input[type="url"],
input[type="text"],
input[type="search"] {
  color: #d4e4ee;
  background: #132036;
  border: 1px solid #35465d;
  border-radius: 6px;
  padding: 9px 12px;
  min-height: 42px;
}
select {
  padding-right: 30px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #a7b5c9 50%),
    linear-gradient(135deg, #a7b5c9 50%, transparent 50%);
  background-repeat: no-repeat;
  background-position:
    right 14px center,
    right 9px center;
  background-size: 5px 5px;
}
.panel-tools select {
  min-height: 36px;
  font-size: 0.82rem;
}
textarea {
  display: block;
  width: 100%;
  resize: vertical;
  color: #d4e4ee;
  background: #0b1526;
  border: 0;
  padding: 18px 20px;
  font:
    0.88rem/1.7 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  min-height: 140px;
}
textarea::placeholder,
input::placeholder {
  color: #70849f;
  opacity: 1;
}
[aria-invalid="true"] {
  box-shadow: inset 3px 0 #ee9b97;
}
button:focus-visible,
textarea:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
textarea:focus-visible {
  outline-offset: -3px;
}
.quiet {
  border: 0;
  padding: 9px 0;
  background: none;
  color: #b5c6d9;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.input-error {
  color: #ffb9b3;
  padding: 12px 18px;
  margin: 0;
  border-top: 1px solid #733c41;
  background: #351f2a;
  font-size: 0.86rem;
  line-height: 1.6;
}
.settings,
.test-form {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.field label {
  color: #afbdd0;
  font-size: 0.8rem;
}
.field.grow {
  flex: 1 1 280px;
}
.field.full {
  flex: 1 1 100%;
}
.field.full textarea {
  border: 1px solid #35465d;
  border-radius: 8px;
  min-height: 110px;
}
.button {
  border: 0;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 7px;
  font-size: 0.87rem;
}
button.primary {
  color: #091224;
}
button.secondary {
  color: #d4e4ee;
  border: 1px solid #46536a;
  background: transparent;
}
button.small {
  min-height: 36px;
  padding: 7px 13px;
  font-size: 0.8rem;
}
.input-help,
.block-help {
  font-size: 0.78rem;
  color: #8f9fb6;
  line-height: 1.65;
  margin-top: 12px;
}
.input-help code,
.block-help code {
  color: #b9cadb;
}
.results {
  margin-top: 40px;
  border: 1px solid #324a5b;
  border-radius: 12px;
  background: #101b2d;
  padding: 28px;
}
.results-heading h2 {
  font-size: 1.65rem;
  margin-bottom: 10px;
}
h2:focus {
  outline: none;
}
.results .eyebrow,
.reference .eyebrow {
  font-size: 0.65rem;
  margin-bottom: 10px;
}
#result-summary {
  color: #a7b5c9;
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0;
}
.result-block {
  border-top: 1px solid #263248;
  margin-top: 28px;
  padding-top: 24px;
}
.result-block > h3 {
  font-size: 1.15rem;
  margin: 0 0 6px;
}
.empty {
  color: #a7f5df;
}
.finding {
  border: 1px solid #34465c;
  border-left: 4px solid #8fa2bc;
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 12px;
  background: #0e192b;
}
.finding[data-severity="high"] {
  border-left-color: #ff8f88;
}
.finding[data-severity="medium"] {
  border-left-color: #f5c46b;
}
.finding[data-severity="low"] {
  border-left-color: #8fc7f5;
}
.finding-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.finding h4 {
  margin: 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.finding p {
  color: #b9c7d8;
  font-size: 0.86rem;
  line-height: 1.7;
  margin: 8px 0 0;
}
.severity,
.badge,
.policy-mode,
.fallback-tag {
  flex: none;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 7px;
  border-radius: 4px;
  background: #23324a;
  color: #c3d1e2;
}
.finding[data-severity="high"] .severity {
  background: #4d2d38;
  color: #ffc3c1;
}
.finding[data-severity="medium"] .severity {
  background: #493e2b;
  color: #f5d399;
}
.finding[data-severity="low"] .severity {
  background: #22384d;
  color: #b9dcf7;
}
.badge.warn {
  background: #4d2d38;
  color: #ffc3c1;
}
.fallback-tag {
  margin-left: 8px;
  font-weight: 500;
  background: #1f3e3c;
  color: #93e4ca;
}
.finding-links,
.card-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.finding-links a,
.card-links a,
.coverage-table a,
.policy-results a,
.ref-links a,
.source-link a,
.feedback a {
  color: #87d9c2;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.policy-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 8px;
  font-size: 0.95rem;
}
.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid #2d3e56;
  border-radius: 8px;
}
.coverage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.coverage-table th,
.coverage-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid #22314a;
  vertical-align: top;
}
.coverage-table thead th {
  color: #93a7bf;
  font-weight: 500;
  font-size: 0.75rem;
  background: #132036;
}
.coverage-table tbody th {
  font-weight: 500;
  color: #d4e4ee;
  white-space: nowrap;
}
.coverage-table tr:last-child > * {
  border-bottom: 0;
}
.coverage-table .unrestricted > * {
  color: #7f91a8;
}
.sources-cell code {
  color: #cfe0ec;
}
.directive-card {
  border: 1px solid #34465c;
  border-radius: 9px;
  padding: 16px 18px;
  margin-top: 14px;
  background: #0e192b;
}
.directive-card.ignored {
  border-color: #6b3b44;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.card-head > code {
  font-size: 1rem;
  color: #a7f5df;
}
.card-summary {
  margin: 8px 0 0;
  color: #d4e4ee;
  font-size: 0.9rem;
  line-height: 1.65;
}
.uses,
.warning {
  font-size: 0.84rem;
  line-height: 1.65;
  color: #a7b5c9;
  margin: 8px 0 0;
}
.warning {
  color: #ffc3c1;
}
.source-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}
.source-list > li {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 4px 16px;
  padding: 9px 12px;
  border-radius: 6px;
  background: #132036;
  font-size: 0.84rem;
  line-height: 1.6;
}
.source-list > li > code {
  color: #cfe0ec;
}
.source-list > li > span {
  color: #b2c1d3;
}
.source-list > li.invalid > code {
  color: #ffb9b3;
  text-decoration: line-through;
}
.source-list .problems {
  grid-column: 1 / -1;
}
.problems {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.82rem;
  line-height: 1.6;
}
.problems li {
  color: #c9d5e3;
  margin-top: 4px;
}
.problems li[data-severity="high"] {
  color: #ffc3c1;
}
.problems li[data-severity="medium"] {
  color: #f5d399;
}
.card-more {
  margin-top: 12px;
  font-size: 0.84rem;
  line-height: 1.7;
  color: #b2c1d3;
}
.card-more summary,
.ref-item summary {
  cursor: pointer;
  color: #c9d8e8;
}
.card-more p,
.card-more ul {
  margin: 8px 0 0;
}
.support,
.ref-support {
  color: #93a7bf;
  font-size: 0.8rem;
}
.card-links {
  margin: 12px 0 0;
  font-size: 0.82rem;
}
.mode-switch {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  margin-top: 14px;
  background: #111e32;
  border: 1px solid #2a3a52;
  border-radius: 9px;
}
.mode-switch button {
  border: 0;
  background: transparent;
  color: #a7b5c9;
  padding: 10px 16px;
  border-radius: 5px;
  font-size: 0.88rem;
  font-weight: 550;
}
.mode-switch [aria-pressed="true"] {
  color: #091224;
  background: #53e3bd;
}
.test-result {
  margin-top: 20px;
  border: 1px solid #34465c;
  border-left: 4px solid #8fa2bc;
  border-radius: 8px;
  padding: 16px 18px;
  background: #0e192b;
  font-size: 0.86rem;
  line-height: 1.7;
}
.test-result[data-outcome="allowed"] {
  border-left-color: #53e3bd;
}
.test-result[data-outcome="blocked"] {
  border-left-color: #ff8f88;
}
.test-result[data-outcome="reported"],
.test-result[data-outcome="varies"],
.test-result[data-outcome="needs-content"] {
  border-left-color: #f5c46b;
}
.test-result[data-outcome="error"] {
  border-left-color: #ff8f88;
  padding: 0;
}
.result-head .outcome {
  font-size: 1.05rem;
}
.result-head p {
  margin: 4px 0 0;
  color: #d4e4ee;
}
.policy-results,
.notes,
.differences ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #b9c7d8;
}
.differences h4 {
  margin: 14px 0 0;
  font-size: 0.86rem;
  color: #f5d399;
}
.notes {
  color: #93a7bf;
  font-size: 0.8rem;
}
.hash-hint {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #263248;
}
.hash-hint p {
  margin: 0 0 6px;
}
.hash-hint code {
  display: block;
  padding: 8px 10px;
  margin-bottom: 10px;
  border-radius: 6px;
  background: #132036;
  color: #cfe0ec;
}
.reference {
  margin-top: 56px;
}
.reference-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 12px;
}
.reference-heading > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 680px;
}
#reference-filter {
  width: min(420px, 100%);
  margin-top: 8px;
}
.ref-group {
  margin-top: 30px;
}
.ref-group > h3 {
  font-size: 1.1rem;
  margin: 0;
}
.ref-item {
  border: 1px solid #2d3e56;
  border-radius: 8px;
  margin-top: 10px;
  background: #0e192b;
}
.ref-item > summary {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  list-style-position: outside;
}
.ref-item > summary > code {
  color: #a7f5df;
  min-width: 170px;
}
.ref-summary {
  flex: 1 1 300px;
  color: #b9c7d8;
  font-size: 0.86rem;
  line-height: 1.6;
}
.ref-item[open] > summary {
  border-bottom: 1px solid #22314a;
}
.ref-body {
  padding: 4px 16px 14px;
  font-size: 0.86rem;
  line-height: 1.7;
  color: #c3d0df;
}
.ref-body h4 {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: #93a7bf;
}
.ref-body ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.ref-fallback {
  color: #a7b5c9;
}
.ref-links {
  display: flex;
  gap: 18px;
  font-size: 0.82rem;
}
.compat-note {
  margin-top: 18px;
  font-size: 0.75rem;
  color: #7f91a8;
}
.tool-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  border-top: 1px solid #263248;
  padding-top: 30px;
  margin-top: 50px;
}
.tool-notes h2 {
  font-size: 1rem;
  margin-bottom: 12px;
}
.tool-notes p,
.feedback {
  color: #8fa2bc;
  font-size: 0.84rem;
  line-height: 1.8;
}
.feedback {
  margin-top: 25px;
}
.source-link {
  font-size: 0.8rem;
  margin-top: 22px;
  color: #8fa2bc;
}
#status {
  position: sticky;
  bottom: 12px;
  background: #132c32;
  border: 1px solid #3b7565;
  border-radius: 8px;
  padding: 12px 16px;
  color: #b9eadb;
  font-size: 0.85rem;
  line-height: 1.6;
}
#status:empty {
  display: none;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  .csp-main {
    padding-top: 30px;
  }
  .header nav {
    width: auto;
    gap: 16px;
  }
  .results {
    padding: 20px 16px;
  }
  .settings > .button,
  .test-form > .button {
    width: 100%;
  }
  .field,
  .field.grow {
    flex: 1 1 100%;
  }
  .source-list > li {
    grid-template-columns: 1fr;
  }
  .ref-item > summary > code {
    min-width: 0;
  }
  .tool-notes {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .mode-switch {
    display: flex;
  }
  .mode-switch button {
    flex: 1;
  }
}
