:root {
  color-scheme: light;
  --ink: #171b16;
  --muted: #62685e;
  --paper: #f4f1e9;
  --panel: #fffdf7;
  --line: #d8d7cd;
  --acid: #c9f64a;
  --acid-dark: #8eb51e;
  --purple: #6d51d9;
  --purple-soft: #ebe6ff;
  --orange: #f4a340;
  --red: #e8563f;
  --shadow: 0 22px 70px rgba(37, 42, 30, 0.09);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 0%, rgba(201, 246, 74, 0.18), transparent 28rem),
    var(--paper);
}

button,
textarea,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible + span,
.slop-segment:focus-visible {
  outline: 3px solid rgba(109, 81, 217, 0.35);
  outline-offset: 3px;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 27, 22, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--acid);
}

.brand-mark svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.model-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 253, 247, 0.66);
  font-size: 12px;
  font-weight: 650;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.powered-by {
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
}

.powered-by strong {
  color: var(--ink);
}

.powered-by:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a6aaa1;
  box-shadow: 0 0 0 3px rgba(166, 170, 161, 0.15);
}

.model-status.ready .status-dot {
  background: #70a918;
  box-shadow: 0 0 0 3px rgba(112, 169, 24, 0.16);
}

.model-status.missing .status-dot {
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(244, 163, 64, 0.16);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  padding: 32px 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: end;
  column-gap: 56px;
  row-gap: 14px;
}

.eyebrow {
  grid-column: 1 / -1;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow span {
  padding: 5px 8px;
  border-radius: 4px;
  color: #fff;
  background: var(--purple);
  letter-spacing: 0.03em;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 6.2vw, 88px);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.064em;
}

.hero h1 em {
  position: relative;
  font-weight: 400;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -0.04em;
  bottom: 0.05em;
  left: -0.04em;
  height: 0.26em;
  border-radius: 2px;
  background: var(--acid);
  transform: rotate(-1.2deg);
}

.hero-copy {
  max-width: 37ch;
  margin: 0 0 5px;
  color: #484e45;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.52;
}

.detector-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.editor-panel {
  min-width: 0;
  padding: 28px 30px 19px;
}

.panel-heading,
.results-header,
.card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.panel-heading > div:first-child,
.results-header > div:first-child,
.control-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-number {
  color: var(--purple);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 750;
}

h2,
h3,
p {
  margin-top: 0;
}

.panel-heading h2,
.control-panel h2,
.results-header h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.editor-actions {
  display: flex;
  gap: 16px;
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 680;
}

.text-button:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#text-input {
  width: 100%;
  height: 330px;
  margin-top: 25px;
  padding: 0 6px 0 0;
  resize: vertical;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.65;
}

.inline-highlighted-document {
  height: 330px;
  margin-top: 25px;
  padding: 0 8px 0 0;
  overflow-y: auto;
  border: 0;
  background: transparent;
  cursor: text;
}

.inline-highlighted-document:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 6px;
}

.edit-button {
  color: var(--purple);
  font-weight: 800;
}

.inline-highlighted-document[hidden] {
  display: none;
}

.editor-panel.scanned .editor-footer {
  color: var(--ink);
}

#text-input::placeholder {
  color: #9b9d95;
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: #858980;
  font-size: 11px;
}

.shortcut {
  display: flex;
  align-items: center;
  gap: 3px;
}

kbd {
  min-width: 20px;
  padding: 2px 5px;
  border: 1px solid #d1d2ca;
  border-bottom-width: 2px;
  border-radius: 4px;
  color: #62675e;
  background: #f9f8f3;
  font-family: inherit;
  font-size: 10px;
  text-align: center;
}

.control-panel {
  display: flex;
  flex-direction: column;
  padding: 30px;
  border-left: 1px solid var(--ink);
  background: #eeece3;
}

.control-copy {
  align-items: flex-start;
}

.control-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.process-heading {
  margin-bottom: 29px;
}

.process-list {
  position: relative;
  display: grid;
  gap: 17px;
  margin: 0 0 27px;
  padding: 0;
  list-style: none;
}

.process-list::before {
  content: "";
  position: absolute;
  top: 19px;
  bottom: 19px;
  left: 14px;
  width: 1px;
  background: #cbc9c0;
}

.process-list li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #777c73;
  transition: color 180ms ease;
}

.process-list i {
  z-index: 1;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #b9bbb3;
  border-radius: 50%;
  background: #eeece3;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-style: normal;
  font-weight: 760;
  transition: 180ms ease;
}

.process-list li > span,
.process-list strong,
.process-list small {
  display: block;
}

.process-list strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.process-list small {
  font-size: 9px;
}

.process-list li.active,
.process-list li.complete {
  color: var(--ink);
}

.process-list li.active i {
  border-color: var(--purple);
  color: #fff;
  background: var(--purple);
  box-shadow: 0 0 0 4px rgba(109, 81, 217, 0.12);
}

.process-list li.complete i {
  border-color: #719419;
  color: transparent;
  background: var(--acid);
}

.process-list li.complete i::after {
  content: "✓";
  position: absolute;
  color: #344706;
  font-family: inherit;
  font-size: 11px;
}

.live-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 21px;
  padding: 11px 14px 11px 11px;
  border: 1px solid #cfcec5;
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.7);
}

.stopwatch-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #cfcec5;
  border-radius: 50%;
  color: var(--ink);
  background: #fffdf7;
}

.stopwatch-icon svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timer-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-left: 9px;
}

.live-timer small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.timer-copy span {
  color: var(--muted);
  font-size: 9px;
}

.live-timer strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.live-timer.running .stopwatch-icon {
  border-color: var(--purple);
  color: var(--purple);
  box-shadow: 0 0 0 3px rgba(109, 81, 217, 0.1);
}

.live-timer.running .stopwatch-hand {
  transform-origin: 16px 17px;
  animation: stopwatch-tick 1s steps(10, end) infinite;
}

.live-timer.complete .stopwatch-icon {
  border-color: #70a918;
  color: #527e10;
  background: #f5ffd9;
}

@keyframes timer-pulse {
  to {
    opacity: 0.45;
  }
}

@keyframes stopwatch-tick {
  to {
    transform: rotate(360deg);
  }
}

.sensitivity-control {
  display: grid;
  gap: 8px;
  margin: 40px 0;
  padding: 0;
  border: 0;
}

.sensitivity-control label {
  cursor: pointer;
}

.sensitivity-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sensitivity-control span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  transition: 150ms ease;
}

.sensitivity-control span::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid #a8aaa2;
  border-radius: 50%;
  background: transparent;
}

.sensitivity-control input:checked + span {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--panel);
  box-shadow: 3px 3px 0 var(--ink);
}

.sensitivity-control input:checked + span::before {
  border-color: var(--purple);
  background: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-soft);
}

.analyze-button {
  min-height: 55px;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 20px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  color: #11160e;
  background: var(--acid);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 780;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.analyze-button:hover:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.analyze-button:active:not(:disabled) {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.analyze-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.analyze-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.analyze-button.loading svg {
  animation: scan 900ms ease-in-out infinite alternate;
}

@keyframes scan {
  to {
    transform: translateX(5px);
  }
}

.privacy-note {
  margin: 16px 3px 0;
  color: #7e8279;
  font-size: 10px;
  line-height: 1.45;
}

.setup-notice {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid #d98c2d;
  border-radius: 9px;
  background: #fff3dd;
  color: #66400d;
}

.setup-notice[hidden] {
  display: none;
}

.notice-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #d98c2d;
  font-weight: 850;
}

.setup-notice strong,
.setup-notice p {
  font-size: 12px;
}

.setup-notice p {
  margin: 3px 0 0;
}

.setup-notice code {
  font-size: 11px;
}

.results {
  padding-top: 100px;
}

.results[hidden] {
  display: none;
}

.results-header {
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(23, 27, 22, 0.2);
}

.results-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr 1fr;
  gap: 12px;
  padding: 20px 0;
}

.score-card,
.metric-card {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 253, 247, 0.77);
}

.score-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.score-ring {
  --score-angle: 0deg;
  width: 98px;
  height: 98px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--purple) var(--score-angle), #dfded7 0);
}

.score-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 77px;
  height: 77px;
  border-radius: 50%;
  background: var(--panel);
}

.score-ring > div {
  z-index: 1;
  grid-area: 1 / 1;
  text-align: center;
}

.score-ring strong {
  font-size: 27px;
  letter-spacing: -0.05em;
}

.score-ring span {
  color: var(--muted);
  font-size: 10px;
}

.metric-label {
  margin-bottom: 7px;
  color: #777c72;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.score-card h3 {
  margin-bottom: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 400;
}

.metric-note,
.metric-card span {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.metric-card strong {
  margin-bottom: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.045em;
}

.dominant-card strong {
  font-size: 24px;
  line-height: 1.05;
}

.review-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.document-card {
  min-width: 0;
  min-height: 560px;
  padding: 27px 30px 35px;
}

.card-toolbar {
  padding-bottom: 19px;
  border-bottom: 1px solid var(--line);
}

.card-toolbar h3 {
  margin-bottom: 3px;
  font-size: 14px;
}

.card-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.legend {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.legend-low {
  background: rgba(201, 246, 74, 0.9);
}

.legend-medium {
  background: rgba(244, 163, 64, 0.82);
}

.legend-high {
  background: rgba(232, 86, 63, 0.75);
}

.highlighted-document {
  padding-top: 28px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.82;
}

.slop-segment {
  border-radius: 3px;
  cursor: text;
  transition: box-shadow 120ms ease, background-color 120ms ease;
}

.slop-segment.flagged {
  padding: 2px 1px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.slop-segment.severity-low.flagged {
  background: rgba(201, 246, 74, 0.72);
}

.slop-segment.severity-medium.flagged {
  background: rgba(244, 163, 64, 0.6);
}

.slop-segment.severity-high.flagged {
  background: rgba(232, 86, 63, 0.5);
}

.slop-segment.flagged:hover,
.slop-segment.selected {
  box-shadow: inset 0 -2px 0 var(--ink);
}

.inspection-card {
  min-height: 560px;
  padding: 29px;
  border-left: 1px solid var(--ink);
  background: #eeece3;
}

.result-inspection {
  min-height: 0;
  border-left: 0;
}

.result-inspection .empty-inspection {
  min-height: 210px;
}

.result-inspection .inspection-content {
  max-width: 760px;
}

.empty-inspection[hidden],
.inspection-content[hidden] {
  display: none;
}

.empty-inspection {
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.crosshair {
  position: relative;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border: 1px solid #aaada4;
  border-radius: 50%;
}

.crosshair::before,
.crosshair::after {
  content: "";
  position: absolute;
  background: #aaada4;
}

.crosshair::before {
  top: 20px;
  left: -7px;
  width: 54px;
  height: 1px;
}

.crosshair::after {
  top: -7px;
  left: 20px;
  width: 1px;
  height: 54px;
}

.empty-inspection h3 {
  margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
}

.empty-inspection p {
  max-width: 24ch;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.inspection-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.sentence-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sentence-navigation button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #c8c7be;
  border-radius: 50%;
  color: var(--ink);
  background: #f8f6ef;
  cursor: pointer;
}

.sentence-navigation button:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--acid);
}

.sentence-navigation button:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

.sentence-navigation svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#inspection-position {
  min-width: 210px;
  text-align: center;
}

.faq {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(55px, 9vw, 130px);
  padding: 75px 0 110px;
  border-top: 1px solid rgba(23, 27, 22, 0.2);
}

.faq-intro {
  position: sticky;
  top: 35px;
  align-self: start;
}

.faq-intro h2 {
  margin: 24px 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.faq-intro > p {
  max-width: 35ch;
  margin: 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.55;
}

.faq-list {
  border-top: 1px solid var(--ink);
}

.faq-list details {
  border-bottom: 1px solid rgba(23, 27, 22, 0.23);
}

.faq-list summary {
  position: relative;
  padding: 24px 44px 24px 0;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 780;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  top: 18px;
  right: 2px;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid #c8c7be;
  border-radius: 50%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 17px;
  font-weight: 400;
}

.faq-list details[open] summary::after {
  content: "−";
  border-color: var(--ink);
  background: var(--acid);
}

.faq-list details p {
  max-width: 62ch;
  margin: -5px 45px 25px 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.65;
}

.faq-list details a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.faq-list .faq-cta {
  display: inline-block;
  margin-top: 9px;
  padding: 8px 11px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: var(--acid);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.faq-list .faq-cta:hover {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(-1px, -1px);
}

.severity-pill {
  padding: 5px 8px;
  border-radius: 999px;
  color: #41280a;
  background: rgba(244, 163, 64, 0.45);
  font-weight: 760;
}

.severity-pill.high {
  color: #5c160c;
  background: rgba(232, 86, 63, 0.35);
}

.severity-pill.low {
  color: #354c03;
  background: rgba(201, 246, 74, 0.65);
}

.inspection-content blockquote {
  margin: 22px 0;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--purple);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.55;
}

.inspection-section {
  padding: 19px 0;
  border-top: 1px solid #d2d1c8;
}

.inspection-section h3 {
  margin-bottom: 7px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.inspection-section > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.confidence-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 2px;
  border: 1px solid #d2d1c8;
  border-radius: 6px;
  background: #d2d1c8;
}

.confidence-row > div {
  padding: 13px;
  background: #f7f4eb;
}

.confidence-row span,
.confidence-row strong {
  display: block;
}

.confidence-row span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.confidence-row strong {
  font-size: 12px;
}

.cue-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cue-list span {
  padding: 5px 7px;
  border: 1px solid #cbc9be;
  border-radius: 4px;
  background: #f8f6ef;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.caveat {
  position: relative;
  margin: 18px 0 90px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
  padding: 21px 24px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 253, 247, 0.5);
}

.caveat strong {
  font-size: 12px;
}

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

.caveat a {
  color: var(--ink);
  font-size: 10px;
  font-weight: 730;
  text-underline-offset: 3px;
}

footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  padding: 22px 0 32px;
  border-top: 1px solid rgba(23, 27, 22, 0.15);
  color: var(--muted);
  font-size: 10px;
}

footer a {
  color: inherit;
  text-underline-offset: 2px;
}

.toast {
  position: fixed;
  z-index: 10;
  right: 24px;
  bottom: 24px;
  max-width: min(390px, calc(100vw - 48px));
  padding: 14px 17px;
  border: 1px solid #6b1e13;
  border-radius: 7px;
  color: #fff;
  background: #7d2a1d;
  box-shadow: 0 15px 40px rgba(60, 20, 12, 0.25);
  font-size: 12px;
  line-height: 1.45;
}

.toast[hidden] {
  display: none;
}

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

.legal-page {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  padding: 75px 0 100px;
}

.legal-page .eyebrow {
  margin: 0 0 22px;
}

.legal-page h1 {
  margin: 0 0 35px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 8vw, 78px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.legal-card {
  padding: 30px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.legal-card h2 {
  margin: 30px 0 8px;
  font-size: 16px;
}

.legal-card h2:first-child {
  margin-top: 0;
}

.legal-card p,
.legal-card li {
  color: #50564d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.65;
}

.legal-card a {
  color: var(--purple);
}


@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 32px;
  }

  .hero-copy {
    max-width: 54ch;
  }

  .detector-shell,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .control-panel,
  .inspection-card:not(.result-inspection) {
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .analyze-button {
    margin-top: 0;
  }

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

  .score-card {
    grid-column: 1 / -1;
  }

  .inspection-card,
  .empty-inspection {
    min-height: 0;
  }

  .empty-inspection {
    padding: 45px 0;
  }

  .caveat {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .faq {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .faq-intro {
    position: static;
  }
}

@media (max-width: 600px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    height: 70px;
  }

  .hero {
    padding: 32px 0 26px;
  }

  .eyebrow {
    margin-bottom: 0;
  }

  .hero h1 {
    font-size: clamp(47px, 15vw, 66px);
  }

  .hero-copy {
    font-size: 17px;
  }

  .editor-panel,
  .control-panel,
  .document-card,
  .inspection-card {
    padding-right: 19px;
    padding-left: 19px;
  }

  #text-input {
    height: 290px;
    font-size: 17px;
  }

  .inline-highlighted-document {
    height: 290px;
    font-size: 17px;
  }

  .shortcut,
  .results-header p,
  .legend {
    display: none;
  }

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

  .score-card {
    grid-column: auto;
  }

  .metric-card {
    min-height: 120px;
  }

  .highlighted-document {
    font-size: 17px;
  }

  .inspection-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .sentence-navigation {
    width: 100%;
    justify-content: space-between;
  }

  #inspection-position {
    min-width: 0;
  }

  .faq {
    padding: 60px 0 80px;
  }

  footer {
    flex-direction: column;
    gap: 20px;
  }

  .powered-by {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
