:root {
  --navy-950: #061728;
  --navy-900: #081e33;
  --navy-800: #0d304b;
  --navy-700: #164661;
  --blue-700: #0e68ae;
  --blue-600: #147bc4;
  --blue-500: #2798d4;
  --cyan-300: #80cce9;
  --ink: #152a3a;
  --ink-soft: #425d6d;
  --muted: #637987;
  --line: #d4e1e8;
  --line-strong: #b8ced9;
  --surface: #f4f8fa;
  --surface-blue: #edf6fa;
  --white: #ffffff;
  --success: #16643e;
  --success-bg: #eaf7ef;
  --warning: #8a4e00;
  --warning-bg: #fff5df;
  --danger: #a22b2b;
  --danger-bg: #fff0ef;
  --shadow-sm: 0 5px 18px rgba(8, 30, 51, 0.07);
  --shadow-lg: 0 24px 60px rgba(8, 30, 51, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  color: var(--navy-900);
  letter-spacing: -0.025em;
}

h1 {
  max-width: 780px;
  margin-bottom: 1.25rem;
  font-size: clamp(2.55rem, 6vw, 5.2rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1.12;
}

h3 {
  margin-bottom: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

[hidden] {
  display: none !important;
}

.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;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy-900);
  font-weight: 800;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

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

:focus-visible {
  outline: 3px solid #f1b93c;
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0.8rem max(1.25rem, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(8, 30, 51, 0.97);
  color: var(--white);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 11px;
  background: linear-gradient(145deg, var(--blue-500), var(--blue-700));
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.94rem;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: -0.12rem;
  color: #b9d8e8;
  font-size: 0.72rem;
}

nav {
  display: flex;
  gap: 1.45rem;
}

nav a {
  color: #d9e8f0;
  font-size: 0.87rem;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover {
  color: var(--white);
}

main,
footer {
  width: min(1240px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.55fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  min-height: 650px;
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1rem, 4vw, 3.25rem);
  overflow: hidden;
}

.hero::before {
  position: absolute;
  top: 5%;
  right: -6%;
  width: 440px;
  height: 440px;
  border: 1px solid #cae5f0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(39, 152, 212, 0.13), transparent 66%);
  content: "";
  pointer-events: none;
}

.hero-copy,
.hero-proof {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin-bottom: 0.65rem;
  color: var(--blue-700);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-intro {
  max-width: 720px;
  margin-bottom: 1.5rem;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 2rem;
}

.chips span {
  padding: 0.42rem 0.75rem;
  border: 1px solid #c3dae5;
  border-radius: 999px;
  background: var(--white);
  color: #28556d;
  font-size: 0.77rem;
  font-weight: 750;
}

.primary-link,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 48px;
  padding: 0.72rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.primary-link,
.primary-button {
  border: 1px solid var(--blue-700);
  background: var(--blue-700);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(14, 104, 174, 0.18);
}

.primary-link:hover,
.primary-button:hover {
  border-color: #095a99;
  background: #095a99;
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.secondary-button {
  border: 1px solid #9bc4d7;
  background: var(--white);
  color: var(--blue-700);
}

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

.hero-proof {
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--navy-900), var(--navy-700));
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.proof-kicker {
  margin-bottom: 1rem;
  color: var(--cyan-300);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-proof ol {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-proof li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.5rem;
  align-items: center;
  min-height: 68px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #eaf4f8;
  font-size: 0.9rem;
}

.hero-proof li span {
  color: var(--cyan-300);
  font-size: 0.72rem;
  font-weight: 850;
}

.examples,
.method {
  padding: clamp(4rem, 7vw, 6.5rem) clamp(1rem, 4vw, 3.25rem);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-heading > p {
  max-width: 520px;
  margin-bottom: 0.15rem;
  color: var(--muted);
}

.compact-heading h2 {
  max-width: 600px;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.example-card {
  min-height: 164px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.example-card:hover {
  border-color: #81b9d4;
  box-shadow: 0 12px 28px rgba(8, 30, 51, 0.11);
  transform: translateY(-2px);
}

.example-card strong,
.example-card small,
.example-number {
  display: block;
}

.example-number {
  margin-bottom: 1.5rem;
  color: var(--blue-600);
  font-size: 0.71rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.example-card strong {
  color: var(--navy-900);
  font-size: 1rem;
}

.example-card small {
  margin-top: 0.22rem;
  color: var(--muted);
}

.workspace {
  padding: clamp(2.5rem, 5vw, 4.5rem);
  border-radius: var(--radius-lg);
  background: var(--navy-900);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.workspace h2,
.workspace h3 {
  color: var(--white);
}

.workspace .eyebrow {
  color: var(--cyan-300);
}

.workspace-header {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.scale {
  display: flex;
  gap: 1rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #d5e6ee;
  font-size: 0.75rem;
}

.scale b {
  margin-right: 0.2rem;
  color: var(--cyan-300);
}

.input-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 1.25rem;
  align-items: start;
}

.form-panel,
.review-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
}

.form-panel {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.form-panel h3,
.review-panel h3 {
  color: var(--navy-900);
}

.step-heading {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 1.65rem;
}

.step-heading > span {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-blue);
  color: var(--blue-700);
  font-size: 0.72rem;
  font-weight: 900;
}

.step-heading p {
  margin-bottom: 0.1rem;
  color: var(--blue-700);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

label,
legend {
  color: var(--navy-900);
  font-size: 0.87rem;
  font-weight: 800;
}

.field-help {
  margin: 0.18rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
}

textarea,
input[type="text"],
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fbfdfe;
  color: var(--ink);
}

textarea,
input[type="text"] {
  padding: 0.75rem 0.85rem;
}

select {
  min-height: 48px;
  padding: 0.55rem 2.3rem 0.55rem 0.75rem;
}

textarea {
  display: block;
  margin-bottom: 1.15rem;
  resize: vertical;
}

textarea::placeholder,
input::placeholder {
  color: #81929d;
}

textarea:focus,
input[type="text"]:focus,
select:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(20, 123, 196, 0.14);
  outline: none;
}

textarea[aria-invalid="true"],
input[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fffafa;
}

.required-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.criterion-list {
  display: grid;
  gap: 1rem;
}

.criterion {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.criterion legend {
  padding: 0 0.3rem;
}

.criterion > p {
  margin: -0.05rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.score-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.score-options label {
  position: relative;
  cursor: pointer;
}

.score-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.score-options span {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
  justify-content: center;
  min-height: 42px;
  padding: 0.52rem 0.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink-soft);
  text-align: center;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.score-options b {
  color: var(--navy-900);
  font-size: 0.95rem;
}

.score-options small {
  font-size: 0.68rem;
  font-weight: 700;
}

.score-options input:checked + span {
  border-color: var(--blue-600);
  background: #e8f4fa;
  color: var(--blue-700);
  box-shadow: inset 0 0 0 1px var(--blue-600);
}

.score-options input:focus-visible + span {
  outline: 3px solid #f1b93c;
  outline-offset: 2px;
}

.note-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.76rem;
}

.note-label span {
  color: var(--muted);
  font-weight: 500;
}

.criterion input[type="text"] {
  min-height: 42px;
  font-size: 0.8rem;
}

.review-panel {
  margin-top: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.review-fields {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 1rem;
}

.review-fields label {
  display: block;
  margin-bottom: 0.4rem;
}

.review-fields textarea {
  margin-bottom: 0;
}

.submit-row {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.submit-row p {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.primary-button {
  min-width: 220px;
}

.error-summary {
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #df8c85;
  border-left: 4px solid var(--danger);
  border-radius: 9px;
  background: var(--danger-bg);
  color: #721f1f;
  font-weight: 700;
}

.results {
  padding: clamp(4rem, 7vw, 6rem) clamp(1rem, 4vw, 3.25rem);
}

.result-heading {
  align-items: center;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.metric {
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.metric span,
.metric strong,
.metric small {
  display: block;
}

.metric span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric strong {
  margin: 0.35rem 0 0.2rem;
  color: var(--navy-900);
  font-size: clamp(1.3rem, 3vw, 2rem);
  line-height: 1.15;
}

.metric small {
  color: var(--muted);
}

.identifier-card {
  display: grid;
  grid-template-columns: minmax(190px, 0.35fr) minmax(0, 1.65fr);
  gap: 2rem;
  align-items: center;
  padding: 1.35rem;
  margin-top: 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(130deg, var(--navy-900), var(--navy-700));
  color: var(--white);
}

.identifier-card span {
  display: block;
  color: var(--cyan-300);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.identifier-card p {
  margin: 0.25rem 0 0;
  color: #d4e7f0;
  font-size: 0.78rem;
}

.identifier-card code {
  overflow-wrap: anywhere;
  color: var(--white);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(0.72rem, 1.5vw, 0.9rem);
}

.risk-panel {
  padding: 1.2rem 1.35rem;
  margin-top: 1rem;
  border: 1px solid #e6bf71;
  border-radius: var(--radius-md);
  background: var(--warning-bg);
}

.risk-panel.no-risks {
  border-color: #8fc7a6;
  background: var(--success-bg);
}

.risk-panel h3 {
  color: var(--warning);
}

.risk-panel.no-risks h3 {
  color: var(--success);
}

.risk-panel ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: 0.65rem 0 0;
  list-style: none;
}

.risk-panel li {
  padding: 0.35rem 0.62rem;
  border: 1px solid rgba(138, 78, 0, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #68400d;
  font-size: 0.76rem;
  font-weight: 750;
}

.score-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
}

caption {
  padding: 1rem;
  color: var(--navy-900);
  font-weight: 850;
  text-align: left;
}

th,
td {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line);
  text-align: left;
}

thead th {
  background: var(--surface);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody th {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

tbody td {
  color: var(--blue-700);
  font-weight: 850;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.method-grid article {
  padding: 1.25rem;
  border-top: 2px solid var(--blue-500);
  background: var(--surface);
}

.method-grid article > span {
  color: var(--blue-600);
  font-size: 0.72rem;
  font-weight: 900;
}

.method-grid h3 {
  margin: 0.65rem 0 0.5rem;
  font-size: 1rem;
}

.method-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.privacy {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 5rem;
  border-radius: var(--radius-lg);
  background: var(--surface-blue);
}

.privacy-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 18px;
  background: var(--navy-900);
  color: var(--cyan-300);
  font-size: 2rem;
}

.privacy h2 {
  margin-bottom: 0.7rem;
}

.privacy p:last-child {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--ink-soft);
}

footer {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .hero,
  .input-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-proof {
    max-width: 560px;
  }

  .example-grid,
  .method-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .review-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  main,
  footer {
    width: min(100% - 1rem, 1240px);
  }

  .site-header {
    min-height: 66px;
    padding-inline: 0.8rem;
  }

  nav {
    display: none;
  }

  .brand small {
    display: none;
  }

  .hero,
  .examples,
  .method,
  .results {
    padding-inline: 0.75rem;
  }

  .hero {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  h1 {
    font-size: clamp(2.4rem, 13vw, 3.7rem);
  }

  .section-heading,
  .workspace-header,
  .submit-row,
  footer {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading {
    display: flex;
  }

  .example-grid,
  .metric-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding: 2rem 0.75rem;
    border-radius: 18px;
  }

  .scale {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
  }

  .form-panel,
  .review-panel {
    padding: 1.15rem;
  }

  .score-options span {
    display: grid;
    gap: 0;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .identifier-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

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

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .examples,
  .workspace,
  .method,
  .privacy,
  footer,
  #download-result {
    display: none !important;
  }

  main,
  .results {
    width: 100%;
    padding: 0;
  }

  .results[hidden] {
    display: none !important;
  }
}
