:root {
  color-scheme: light;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --primary-border: #c7d2fe;
  --text: #0f172a;
  --muted: #64748b;
  --background: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --ai: #f59e0b;
  --ai-soft: #fef3c7;
  --mixed: #7c3aed;
  --mixed-soft: #ede9fe;
  --human: #059669;
  --human-soft: #d1fae5;
  --error: #dc2626;
  --shadow-small: 0 10px 30px rgb(15 23 42 / 7%);
  --shadow-large: 0 28px 80px rgb(15 23 42 / 12%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 9%, rgb(79 70 229 / 12%), transparent 30rem),
    radial-gradient(circle at 8% 32%, rgb(124 58 237 / 7%), transparent 26rem),
    var(--background);
}

a {
  color: inherit;
}

.site-header,
footer,
main {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.site-header nav {
  display: flex;
  gap: 28px;
}

.site-header nav a,
.compact-header > a:last-child,
footer a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-header nav a:hover,
.compact-header > a:last-child:hover,
footer a:hover {
  color: var(--primary);
}

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

.brand-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: contain;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.9fr);
  gap: clamp(56px, 7vw, 104px);
  align-items: center;
  min-height: 650px;
  padding: 82px 0 98px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  color: var(--text);
  letter-spacing: -0.035em;
}

h1,
h2 {
  font-weight: 780;
}

.hero h1 {
  max-width: 690px;
  margin-bottom: 26px;
  font-size: clamp(3rem, 5.7vw, 5.2rem);
  line-height: 0.99;
}

.hero-lede {
  max-width: 650px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 750;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: white;
  background: var(--primary);
  box-shadow: 0 10px 24px rgb(79 70 229 / 22%);
}

.button-primary:hover {
  background: var(--primary-hover);
}

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

.button-secondary:hover {
  border-color: var(--primary-border);
  background: var(--primary-soft);
}

.availability,
.card-note,
.share-created {
  color: var(--muted);
  font-size: 0.86rem;
}

.signal-card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--primary-border);
  border-radius: 20px;
  background: rgb(255 255 255 / 92%);
  box-shadow: var(--shadow-large);
  backdrop-filter: blur(16px);
}

.signal-card-header,
.document-heading,
.share-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.signal-card-header {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-pill {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--primary-hover);
  background: var(--primary-soft);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.example-result {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--primary-border);
  border-radius: 14px;
  background: var(--primary-soft);
}

.example-score {
  position: relative;
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--ai) 72%, #d9ddea 0);
  text-align: center;
}

.example-score::before {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--primary-soft);
  content: "";
}

.example-score strong,
.example-score small {
  position: relative;
  z-index: 1;
}

.example-score strong {
  font-size: 1.25rem;
  line-height: 1.05;
}

.example-score small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.example-result > div > strong {
  display: block;
  margin-bottom: 7px;
  font-size: 1.2rem;
}

.example-result p,
.card-note {
  margin-bottom: 0;
  line-height: 1.5;
}

.example-confidence {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: capitalize;
}

.example-confidence::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--human);
  content: "";
}

.sentence-preview {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.sentence-preview-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
}

.sentence-preview-title strong {
  font-size: 0.92rem;
}

.sentence-preview-title > span {
  color: var(--muted);
  font-size: 0.7rem;
}

.sentence-preview-title .example-highlight-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.example-highlight-legend i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: var(--ai-soft);
  box-shadow: inset 0 0 0 1px rgb(245 158 11 / 45%);
}

.sentence-lines {
  display: grid;
  gap: 7px;
}

.sentence-line {
  position: relative;
  height: 25px;
  overflow: hidden;
  border-radius: 6px;
  background: #f1f5f9;
}

.sentence-line::after {
  position: absolute;
  top: 10px;
  right: 18%;
  left: 10px;
  height: 5px;
  border-radius: 99px;
  background: #cbd5e1;
  content: "";
}

.sentence-line:nth-child(2)::after,
.sentence-line:nth-child(4)::after {
  right: 31%;
}

.sentence-line-ai {
  background: var(--ai-soft);
}

.sentence-line-ai::after {
  background: #fbbf24;
}

.card-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.principles {
  padding: 104px 0;
  border-top: 1px solid var(--border);
}

.section-heading {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  margin-bottom: 54px;
}

.section-heading h2,
.privacy-callout h2,
.policy-title h1 {
  margin-bottom: 0;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1.05;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.principle-grid article {
  min-height: 244px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.step {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-bottom: 48px;
  place-items: center;
  border-radius: 10px;
  color: var(--primary-hover);
  background: var(--primary-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.principle-grid h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  font-weight: 730;
}

.principle-grid p,
.privacy-callout > p,
.policy-shell section p {
  color: var(--muted);
  line-height: 1.68;
}

.privacy-callout {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr auto;
  gap: clamp(30px, 5vw, 68px);
  align-items: center;
  margin-bottom: 104px;
  padding: clamp(32px, 5vw, 56px);
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 14%, rgb(255 255 255 / 14%), transparent 18rem),
    linear-gradient(135deg, #312e81, var(--primary));
  color: white;
  box-shadow: 0 24px 60px rgb(79 70 229 / 20%);
}

.privacy-callout h2 {
  color: white;
}

.privacy-callout .eyebrow,
.privacy-callout > p,
.privacy-callout .text-link {
  color: rgb(255 255 255 / 82%);
}

.text-link {
  white-space: nowrap;
  font-weight: 760;
  text-decoration: none;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 42px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

.compact-header {
  min-height: 72px;
}

.share-shell {
  min-height: calc(100vh - 164px);
  padding: 60px 0 90px;
}

.state-panel {
  display: grid;
  max-width: 620px;
  min-height: 420px;
  margin: 4vh auto;
  place-items: center;
  align-content: center;
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow-large);
}

.state-panel h1 {
  margin: 24px 0 12px;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.state-panel p {
  max-width: 420px;
  margin-bottom: 28px;
  color: var(--muted);
  line-height: 1.6;
}

.loading-mark,
.state-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 16px;
  color: var(--primary-hover);
  background: var(--primary-soft);
  font-weight: 800;
}

.loading-mark::after {
  width: 16px;
  height: 16px;
  border: 3px solid rgb(79 70 229 / 22%);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  content: "";
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.share-title {
  margin-bottom: 34px;
}

.share-title h1 {
  margin-bottom: 0;
  font-size: clamp(2.5rem, 5vw, 4.3rem);
}

.share-expiry {
  display: grid;
  gap: 5px;
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: right;
}

.share-expiry strong {
  color: var(--text);
  font-size: 0.9rem;
}

.result-summary,
.document-panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.result-summary {
  --result-accent: var(--mixed);
  --result-border: #ddd6fe;
  --result-surface: var(--mixed-soft);
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 32px;
  gap: clamp(22px, 3vw, 36px);
  align-items: center;
  margin: 0;
  padding: clamp(24px, 4vw, 36px);
  overflow: visible;
  border-color: var(--result-border);
  background: linear-gradient(120deg, var(--result-surface), var(--surface) 78%);
  box-shadow: 0 18px 44px rgb(15 23 42 / 8%);
}

.result-summary.result-ai {
  --result-accent: var(--ai);
  --result-border: #fde68a;
  --result-surface: var(--ai-soft);
}

.result-summary.result-mixed {
  --result-accent: var(--mixed);
  --result-border: #ddd6fe;
  --result-surface: var(--mixed-soft);
}

.result-summary.result-human {
  --result-accent: var(--human);
  --result-border: #a7f3d0;
  --result-surface: var(--human-soft);
}

.result-ring {
  position: relative;
  display: grid;
  width: 106px;
  height: 106px;
  place-items: center;
  border-radius: 50%;
}

.result-ring canvas {
  position: absolute;
  inset: 0;
  width: 106px;
  height: 106px;
}

.result-ring::before {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 4px 18px rgb(15 23 42 / 7%);
  content: "";
}

.result-ring-inner {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--text);
  line-height: 1.1;
  text-align: center;
}

.result-ring-inner strong {
  font-size: 1.28rem;
}

.result-ring-inner span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

.result-copy h2,
.result-copy p {
  margin: 0;
}

.result-copy h2 {
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  line-height: 1.25;
}

.result-copy .result-eyebrow {
  margin-bottom: 4px;
  color: var(--result-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-confidence {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px !important;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: capitalize;
}

.result-confidence::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--result-accent);
  content: "";
}

.result-tooltip-root {
  position: relative;
  align-self: start;
}

.result-info-button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #a5b4fc;
  border-radius: 50%;
  color: var(--primary-hover);
  background: var(--surface);
  font-family: Georgia, serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.result-info-button:focus-visible {
  outline: 3px solid rgb(79 70 229 / 20%);
  outline-offset: 2px;
}

.result-tooltip {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 3;
  width: min(300px, calc(100vw - 56px));
  display: none;
  padding: 12px;
  border-radius: 9px;
  color: #fff;
  background: #1e293b;
  box-shadow: 0 18px 40px rgb(15 23 42 / 18%);
  font-size: 0.78rem;
  line-height: 1.45;
}

.result-tooltip-root:hover .result-tooltip,
.result-tooltip-root:focus-within .result-tooltip,
.result-tooltip.visible {
  display: block;
}

.document-panel {
  padding: clamp(28px, 5vw, 50px);
}

.result-summary + .document-panel {
  margin-top: clamp(28px, 4vw, 44px);
}

.document-heading h2 {
  margin-bottom: 0;
  font-size: 2rem;
}

.document-heading-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.document-heading-meta > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.ai-highlight-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ai-highlight-legend span {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: var(--ai-soft);
  box-shadow: inset 0 0 0 1px rgb(245 158 11 / 45%);
}

.impact-ai {
  background: var(--ai-soft);
}

.document-text {
  max-width: 100%;
  margin: 22px 0 0;
  padding: 22px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #334155;
  background: var(--background);
  font: 1rem/1.85 var(--font-sans, Inter, ui-sans-serif, system-ui, sans-serif);
}

.document-text mark {
  margin: 0 -1px;
  padding: 2px 1px;
  border-radius: 4px;
  color: inherit;
}

.share-created {
  margin: 22px 4px 0;
}

.policy-shell {
  max-width: 820px;
  padding: 82px 0 116px;
}

.policy-title {
  margin-bottom: 66px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.policy-title h1 {
  margin-bottom: 24px;
}

.policy-title > p:last-child {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.14rem;
  line-height: 1.7;
}

.policy-shell section {
  margin-top: 40px;
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.policy-shell section h2 {
  margin-bottom: 14px;
  font-size: 1.35rem;
}

.policy-shell section p {
  margin-bottom: 0;
  font-size: 1rem;
}

.policy-shell section p + p {
  margin-top: 16px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .hero,
  .section-heading,
  .privacy-callout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 66px 0 80px;
  }

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

  .principle-grid article {
    min-height: 200px;
  }

  .privacy-callout {
    align-items: start;
  }

}

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

  .site-header nav a:first-child {
    display: none;
  }

  .brand {
    font-size: 0.9rem;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .signal-card,
  .result-summary,
  .document-panel,
  .state-panel {
    border-radius: 16px;
  }

  .sentence-preview-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  footer {
    flex-direction: column;
  }

  .share-title,
  .document-heading {
    flex-direction: column;
  }

  .document-heading-meta {
    justify-items: start;
  }

  .share-expiry {
    text-align: left;
  }

  .result-summary {
    grid-template-columns: 68px minmax(0, 1fr) 28px;
    gap: 14px;
    padding: 18px;
  }

  .result-ring,
  .result-ring canvas {
    width: 68px;
    height: 68px;
  }

  .result-ring::before {
    width: 51px;
    height: 51px;
  }

  .result-ring-inner strong {
    font-size: 0.9rem;
  }

  .result-ring-inner span {
    font-size: 0.54rem;
  }

  .result-copy h2 {
    font-size: 1rem;
  }

  .result-info-button {
    width: 28px;
    height: 28px;
  }

  .policy-shell section {
    padding: 22px 20px;
  }
}

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

  .button {
    transition: none;
  }

  .loading-mark::after {
    animation-duration: 1.8s;
  }
}
