:root {
  color-scheme: light;
  --paper: #f6f3ec;
  --paper-deep: #ece7dc;
  --surface: #fffefa;
  --surface-strong: #ffffff;
  --ink: #18171b;
  --ink-soft: #35323b;
  --muted: #746f79;
  --muted-strong: #5a5560;
  --line: #d8d2c8;
  --line-dark: #bdb6ac;
  --purple: #6d48df;
  --purple-dark: #5432bd;
  --purple-soft: #ede8ff;
  --red: #cf3f50;
  --red-dark: #9e2939;
  --red-soft: #fff0f1;
  --amber: #b45d16;
  --amber-dark: #81400c;
  --amber-soft: #fff4df;
  --green: #14795d;
  --green-soft: #e8f6ef;
  --blue: #2b61c9;
  --shadow: 0 28px 70px rgba(42, 34, 26, 0.1), 0 3px 12px rgba(42, 34, 26, 0.06);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 13%, rgba(109, 72, 223, 0.09), transparent 23rem),
    radial-gradient(circle at 92% 20%, rgba(226, 133, 47, 0.08), transparent 21rem),
    var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

svg {
  display: block;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-weight: 750;
  transform: translateY(-160%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(1460px, calc(100% - 64px));
  min-height: 78px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid rgba(24, 23, 27, 0.14);
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 820;
  letter-spacing: -0.025em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.brand-mark svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark.small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.header-proof {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 690;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.header-proof > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border: 2px solid rgba(20, 121, 93, 0.18);
  border-radius: 50%;
  box-sizing: content-box;
}

.header-divider {
  width: 1px;
  height: 12px;
  background: var(--line-dark);
}

.quiet-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.quiet-link svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.quiet-link:hover svg {
  transform: translate(2px, -2px);
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  padding: clamp(74px, 8vw, 124px) 0 clamp(86px, 10vw, 138px);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.75fr);
  gap: clamp(64px, 9vw, 142px);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -220px;
  bottom: 40px;
  width: 520px;
  height: 220px;
  opacity: 0.24;
  background-image: radial-gradient(var(--line-dark) 1.2px, transparent 1.2px);
  background-size: 16px 16px;
  transform: rotate(-8deg);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow > span {
  display: inline-block;
  margin-right: 9px;
  padding: 4px 8px 3px;
  color: var(--purple-dark);
  background: var(--purple-soft);
  border: 1px solid rgba(109, 72, 223, 0.22);
  border-radius: 5px;
  letter-spacing: 0.08em;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(43px, 5.4vw, 80px);
  font-weight: 820;
  line-height: 0.98;
  letter-spacing: -0.062em;
}

.hero h1 em {
  position: relative;
  color: var(--purple);
  font-style: normal;
}

.hero-lede {
  max-width: 690px;
  margin: 30px 0 0;
  color: var(--muted-strong);
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.55;
  letter-spacing: -0.012em;
}

.install-row {
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  margin-top: 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #f5f2fa;
  background: var(--ink);
  border: 1px solid #000;
  border-radius: 10px;
  box-shadow: 5px 5px 0 rgba(109, 72, 223, 0.2);
}

.install-row code {
  padding: 13px 17px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.install-row code span {
  margin-right: 8px;
  color: #a993ff;
}

.copy-button {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  color: #d9d3e1;
  background: #25232a;
  border: 0;
  border-left: 1px solid #444049;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.copy-button:hover {
  color: #fff;
  background: #302d36;
}

.copy-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.drift-card {
  position: relative;
  min-width: 0;
  padding: 22px;
  background: rgba(255, 254, 250, 0.92);
  border: 1px solid var(--ink);
  border-radius: 17px;
  box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(1.2deg);
}

.drift-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 16px -17px -17px 16px;
  background: var(--purple-soft);
  border: 1px solid rgba(109, 72, 223, 0.42);
  border-radius: 17px;
}

.drift-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red-dark);
}

.pulse i {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(207, 63, 80, 0.11);
}

.raw-value {
  margin: 24px 0 18px;
  padding: 20px 14px;
  overflow: hidden;
  color: var(--ink);
  background: #f5f2eb;
  border: 1px dashed var(--line-dark);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 720;
  letter-spacing: -0.045em;
  text-align: center;
  text-overflow: ellipsis;
}

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

.runtime-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted-strong);
  font-weight: 650;
}

.runtime-icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: #15130d;
  background: #f5d64d;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 9px;
}

.runtime-icon.csv {
  color: #fff;
  background: var(--purple);
}

.runtime-row code {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.runtime-row:first-of-type code {
  color: var(--red-dark);
  text-decoration: underline wavy rgba(207, 63, 80, 0.6);
  text-underline-offset: 4px;
}

.drift-note {
  margin: 14px -8px -8px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--red-dark);
  background: var(--red-soft);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 720;
}

.drift-note svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.playground-shell {
  position: relative;
  padding: clamp(72px, 8vw, 112px) max(32px, calc((100vw - 1460px) / 2)) 84px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #1c1a20;
  background-size: 28px 28px;
}

.playground-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 104px;
  height: 5px;
  background: var(--purple);
  border-radius: 0 0 5px 5px;
  transform: translateX(-50%);
}

.section-heading {
  max-width: 1460px;
  margin: 0 auto 30px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
}

.section-heading .eyebrow {
  margin-bottom: 8px;
  color: #aaa4b0;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.illustrative-badge {
  margin-bottom: 3px;
  padding: 8px 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #beb5e8;
  background: rgba(109, 72, 223, 0.12);
  border: 1px solid rgba(147, 119, 231, 0.35);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.illustrative-badge svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workbench {
  max-width: 1460px;
  min-height: 730px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid #37333d;
  border-radius: 16px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.35);
}

.editor-panel,
.results-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.editor-panel {
  background: #fbfaf6;
  border-right: 1px solid var(--line-dark);
}

.results-panel {
  background: #f4f1eb;
}

.panel-toolbar {
  min-height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.64);
  border-bottom: 1px solid var(--line);
}

.panel-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.panel-kicker {
  color: var(--purple-dark);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.panel-toolbar h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.file-pill {
  max-width: 190px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  background: #f2efe8;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 680;
}

.file-pill i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--green);
  border-radius: 50%;
}

.file-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-meta {
  min-height: 38px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  background: #f3f0e9;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

#csv-input {
  width: 100%;
  min-height: 500px;
  flex: 1;
  resize: none;
  padding: 24px;
  color: #2f2b35;
  caret-color: var(--purple);
  background:
    linear-gradient(90deg, rgba(109, 72, 223, 0.04), transparent 120px),
    #fffefa;
  border: 0;
  outline: none;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.82;
  tab-size: 2;
  white-space: pre;
}

#csv-input:focus {
  box-shadow: inset 0 0 0 2px rgba(109, 72, 223, 0.48);
}

#csv-input::selection {
  color: var(--ink);
  background: #ded4ff;
}

.editor-footer {
  min-height: 76px;
  padding: 14px 20px 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #f4f1ea;
  border-top: 1px solid var(--line);
}

.editor-footer p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 620;
}

.editor-footer p svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.editor-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.text-button,
.scan-button {
  border: 0;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.text-button {
  padding: 9px 7px;
  color: var(--muted-strong);
  background: transparent;
}

.text-button:hover {
  color: var(--ink);
}

.scan-button {
  padding: 11px 14px 11px 16px;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: #fff;
  background: var(--purple);
  border: 1px solid var(--purple-dark);
  border-radius: 8px;
  box-shadow: 0 3px 0 var(--purple-dark);
  transition: background 140ms ease, transform 100ms ease, box-shadow 100ms ease;
}

.scan-button:hover {
  background: #7650e8;
}

.scan-button:active {
  box-shadow: 0 1px 0 var(--purple-dark);
  transform: translateY(2px);
}

.scan-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shortcut {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.shortcut kbd {
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  display: inline-grid;
  place-items: center;
  color: var(--muted-strong);
  background: #fff;
  border: 1px solid var(--line-dark);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 10px;
}

.summary {
  margin: 20px 20px 0;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 2px 6px rgba(31, 27, 23, 0.04);
}

.summary-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-icon {
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--red-dark);
  background: var(--red-soft);
  border-radius: 9px;
}

.summary-icon::before {
  content: "!";
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 850;
}

.summary.clean .summary-icon {
  color: var(--green);
  background: var(--green-soft);
}

.summary.clean .summary-icon::before {
  content: "✓";
}

.summary.input-error .summary-icon {
  color: var(--amber-dark);
  background: var(--amber-soft);
}

.summary-copy p {
  margin: 0;
  font-size: 14px;
  font-weight: 790;
  letter-spacing: -0.015em;
}

.summary-copy span:not(.summary-icon) {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-stats {
  flex: 0 0 auto;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.summary-stats > div {
  min-width: 42px;
  padding-left: 15px;
  border-left: 1px solid var(--line);
}

.summary-stats dt {
  color: var(--muted);
  font-size: 8px;
  font-weight: 740;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-stats dd {
  margin: 1px 0 0;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
}

.summary-stats .stat-error dd {
  color: var(--red-dark);
}

.summary-stats .stat-warning dd {
  color: var(--amber-dark);
}

.findings {
  flex: 1;
  max-height: 578px;
  padding: 18px 20px 28px;
  overflow: auto;
  scrollbar-color: #b9b2a8 transparent;
  scrollbar-width: thin;
  outline: none;
}

.severity-group + .severity-group {
  margin-top: 22px;
}

.group-heading {
  margin: 0 2px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.group-heading::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.finding-card {
  position: relative;
  padding: 16px 17px 15px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(37, 31, 25, 0.035);
}

.finding-card + .finding-card {
  margin-top: 8px;
}

.finding-card::before {
  content: "";
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 0;
  width: 3px;
  background: var(--red);
  border-radius: 0 3px 3px 0;
}

.finding-card.warning::before {
  background: var(--amber);
}

.finding-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rule-id {
  padding: 3px 5px;
  color: var(--red-dark);
  background: var(--red-soft);
  border: 1px solid rgba(207, 63, 80, 0.18);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 830;
  letter-spacing: 0.04em;
}

.warning .rule-id {
  color: var(--amber-dark);
  background: var(--amber-soft);
  border-color: rgba(180, 93, 22, 0.18);
}

.finding-title {
  overflow: hidden;
  font-size: 12px;
  font-weight: 790;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finding-location {
  padding-left: 8px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 640;
}

.occurrence-count {
  align-self: start;
  padding: 4px 7px;
  color: var(--muted-strong);
  background: #f3f0ea;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 750;
}

.finding-message {
  grid-column: 1 / -1;
  margin: -1px 0 0;
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.55;
}

.finding-bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finding-sample {
  min-width: 0;
  margin: 0;
  padding: 7px 8px;
  overflow: hidden;
  color: #423b49;
  background: #f5f2ed;
  border: 1px solid #e5dfd5;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finding-fix {
  flex: 0 0 auto;
  color: var(--purple-dark);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.finding-fix::before {
  content: "Fix · ";
  color: var(--muted);
  font-weight: 650;
}

.empty-state {
  min-height: 330px;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-state-inner {
  max-width: 310px;
}

.empty-state-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(20, 121, 93, 0.2);
  border-radius: 50%;
}

.empty-state.input-error .empty-state-icon {
  color: var(--amber-dark);
  background: var(--amber-soft);
  border-color: rgba(180, 93, 22, 0.2);
}

.empty-state-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state h4 {
  margin: 0 0 7px;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.canonical-note {
  max-width: 1460px;
  margin: 22px auto 0;
  padding: 18px 21px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  color: #c9c4ce;
  background: #252229;
  border: 1px solid #3b3740;
  border-radius: 11px;
}

.canonical-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #a894ed;
  background: rgba(109, 72, 223, 0.14);
  border-radius: 8px;
}

.canonical-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.canonical-note strong {
  color: #fff;
  font-size: 12px;
}

.canonical-note p {
  margin: 2px 0 0;
  color: #aaa4b0;
  font-size: 10px;
  line-height: 1.5;
}

.canonical-note a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d5caFA;
  text-decoration: none;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.canonical-note a:hover {
  color: #fff;
}

.canonical-note a svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-footer {
  width: min(1460px, calc(100% - 64px));
  min-height: 126px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand strong {
  font-size: 13px;
}

.footer-brand div > span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.site-footer > p {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  padding: 11px 14px;
  color: #fff;
  background: var(--ink);
  border: 1px solid #49444e;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
.findings:focus-visible {
  outline: 3px solid rgba(109, 72, 223, 0.42);
  outline-offset: 3px;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.7fr);
    gap: 52px;
  }

  .workbench {
    grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  }

  .editor-footer {
    align-items: flex-end;
  }

  .editor-footer p {
    max-width: 145px;
  }

  .summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-stats {
    width: 100%;
  }

  .summary-stats > div {
    flex: 1;
  }
}

@media (max-width: 820px) {
  .site-header {
    width: min(100% - 36px, 1460px);
    grid-template-columns: 1fr auto;
  }

  .header-proof {
    display: none;
  }

  .hero {
    width: min(100% - 36px, 1320px);
    grid-template-columns: 1fr;
    gap: 54px;
    padding-top: 64px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .drift-card {
    width: min(430px, calc(100% - 14px));
    justify-self: center;
  }

  .playground-shell {
    padding-right: 18px;
    padding-left: 18px;
  }

  .workbench {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  #csv-input {
    min-height: 380px;
  }

  .findings {
    max-height: none;
  }

  .canonical-note {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .canonical-note a {
    grid-column: 2;
    width: fit-content;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 68px;
  }

  .quiet-link {
    font-size: 0;
  }

  .quiet-link::before {
    content: "Rules";
    font-size: 13px;
  }

  .hero {
    padding-top: 54px;
    padding-bottom: 82px;
  }

  .hero h1 {
    font-size: clamp(39px, 12vw, 58px);
    letter-spacing: -0.055em;
  }

  .hero-lede {
    margin-top: 24px;
    font-size: 16px;
  }

  .install-row {
    width: 100%;
  }

  .install-row code {
    min-width: 0;
    flex: 1;
    font-size: 11px;
  }

  .copy-button span {
    display: none;
  }

  .copy-button {
    padding: 0 14px;
  }

  .drift-card {
    padding: 18px;
  }

  .raw-value {
    font-size: 18px;
  }

  .runtime-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .panel-toolbar,
  .editor-meta {
    padding-right: 16px;
    padding-left: 16px;
  }

  .file-pill {
    max-width: 135px;
  }

  .results-toolbar .shortcut {
    display: none;
  }

  #csv-input {
    min-height: 340px;
    padding: 18px 16px;
    font-size: 11px;
  }

  .editor-footer {
    padding: 14px 16px;
    align-items: stretch;
    flex-direction: column;
  }

  .editor-footer p {
    max-width: none;
  }

  .editor-actions {
    justify-content: flex-end;
  }

  .summary {
    margin: 14px 14px 0;
    padding: 15px;
  }

  .summary-copy span:not(.summary-icon) {
    white-space: normal;
  }

  .findings {
    padding: 15px 14px 24px;
  }

  .finding-card {
    padding-right: 13px;
  }

  .finding-location {
    width: 100%;
    padding-left: 0;
    border-left: 0;
  }

  .finding-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .finding-sample {
    width: 100%;
  }

  .canonical-note {
    padding: 16px;
  }

  .canonical-icon {
    align-self: start;
  }

  .site-footer {
    width: min(100% - 36px, 1460px);
    padding: 28px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer > p {
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #a39b90;
    --muted: #504b54;
  }
}
