/* commercetools brand tokens, from commercetools.com/brand-guidelines */
:root {
  --ct-violet: #6359ff;
  --ct-violet-dark: #4e4ed8;
  --ct-violet-light: #c2c2ff;
  --ct-teal: #0bbfbf;
  --ct-teal-dark: #097f79;
  --ct-teal-light: #9ff7ee;
  --ct-yellow: #ffc806;
  --ct-yellow-light: #ffe9a1;
  --ct-plum: #191741;
  --ct-plum-soft: #4f4f99;
  --ct-earth: #f7f2ea;
  --ct-earth-light: #fbf9f5;
  --ct-earth-line: #dedad4;
  --ct-earth-mid: #7c7975;
  --ct-link: #2667d2;
  --white: #ffffff;
  --fail: #c62f2e;
  --fail-bg: #fbe4e3;

  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, Menlo, monospace;

  --radius: 1rem;
  --radius-small: 0.5rem;
  --radius-round: 100vw;
  --shadow: 0 12px 32px -16px rgba(25, 23, 65, 0.25);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ct-earth);
  color: var(--ct-plum);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--ct-link); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--ct-violet);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--ct-plum); color: var(--white);
  padding: 0.5rem 1rem; border-radius: var(--radius-small);
}
.skip:focus { top: 1rem; }

/* Header */
.site-header { background: var(--ct-earth); }
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 1.25rem; padding-bottom: 1.25rem;
}
.brand { display: flex; align-items: center; gap: 0.875rem; text-decoration: none; color: var(--ct-plum); }
.brand img { display: block; height: 2.25rem; width: auto; }
.brand-divider { width: 1px; height: 1.5rem; background: var(--ct-earth-line); }
.brand-product { font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; }
.site-header nav { display: flex; align-items: center; gap: 1.25rem; }
.site-header nav a:not(.button) { color: var(--ct-plum); font-weight: 500; text-decoration: none; }
.site-header nav a:not(.button):hover { text-decoration: underline; }

/* Buttons: pill shape, as on commercetools.com */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: 1px solid var(--ct-violet); border-radius: var(--radius-round);
  background: var(--ct-violet); color: var(--white);
  font-family: var(--font-head); font-weight: 600; font-size: 1rem; line-height: 1.2;
  padding: 0.75rem 1.75rem; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.button:hover { background: var(--ct-violet-dark); border-color: var(--ct-violet-dark); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.button-large { font-size: 1.0625rem; padding: 1rem 2.25rem; }
.button-small { font-size: 0.875rem; padding: 0.5rem 1.125rem; }
.button-secondary { background: transparent; color: var(--ct-plum); border-color: var(--ct-plum); }
.button-secondary:hover { background: var(--ct-plum); color: var(--white); border-color: var(--ct-plum); }
.button-on-dark { background: var(--white); color: var(--ct-plum); border-color: var(--white); }
.button-on-dark:hover { background: var(--ct-yellow); border-color: var(--ct-yellow); color: var(--ct-plum); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 3.5rem 0 4rem; }
.hero-inner { position: relative; }
.eyebrow {
  font-family: var(--font-head); font-weight: 600; font-size: 0.8125rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ct-violet-dark);
  margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(2.25rem, 5.4vw, 4rem); max-width: 46rem; }
.lede { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); margin-top: 1.25rem; max-width: 42rem; }

.scan-form {
  display: flex; gap: 0.5rem; margin-top: 2rem; max-width: 40rem;
  background: var(--white); border: 1px solid var(--ct-plum); border-radius: var(--radius-round);
  padding: 0.375rem; box-shadow: var(--shadow);
}
.scan-form:focus-within { border-color: var(--ct-violet); box-shadow: 0 0 0 3px var(--ct-violet-light), var(--shadow); }
.scan-form input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ct-plum);
  font: inherit; font-size: 1.0625rem; padding: 0.75rem 0.5rem 0.75rem 1.25rem;
}
.scan-form input:focus { outline: none; }
.scan-form input::placeholder { color: var(--ct-earth-mid); }
.hint { margin-top: 0.875rem; font-size: 0.875rem; color: #5d5a56; max-width: 40rem; }
.form-error {
  margin-top: 0.875rem; padding: 0.625rem 1rem; max-width: 40rem;
  background: var(--fail-bg); color: #7d1a19; border-radius: var(--radius-small); font-weight: 500;
}

/* Supporting shapes from the brand's graphic language: rounded square, diamond, tilted triangle */
.shapes { position: absolute; inset: 0; pointer-events: none; }
.shape { position: absolute; display: block; }
.shape-square {
  width: 11rem; height: 11rem; right: 6%; top: 3.5rem;
  background: var(--ct-violet-light); border-radius: 2rem; transform: rotate(12deg);
}
.shape-diamond {
  width: 7rem; height: 7rem; right: 19%; top: 15rem;
  background: var(--ct-yellow); border-radius: 1rem; transform: rotate(45deg);
}
.shape-triangle {
  width: 8rem; height: 8rem; right: 5%; top: 17rem;
  background: var(--ct-teal); clip-path: polygon(50% 6%, 96% 92%, 4% 92%); transform: rotate(-18deg);
}
@media (max-width: 68rem) { .shapes { display: none; } }

/* Status */
.status { margin-bottom: 3rem; }
.status-card {
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--white); border-radius: var(--radius); padding: 1.5rem 1.75rem;
  border: 1px solid var(--ct-earth-line);
}
.status-title { font-family: var(--font-head); font-weight: 600; font-size: 1.125rem; overflow-wrap: anywhere; }
.status-step { color: #5d5a56; margin-top: 0.125rem; }
.spinner {
  flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  border: 4px solid var(--ct-violet-light); border-top-color: var(--ct-violet);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Intro */
.intro { padding-bottom: 5rem; }
.intro h2, .report h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); }
.section-lede { margin-top: 0.75rem; max-width: 42rem; font-size: 1.0625rem; }
.stage-grid {
  list-style: none; padding: 0; margin: 2rem 0 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.stage-card {
  background: var(--white); border-radius: var(--radius); padding: 1.5rem;
  border: 1px solid var(--ct-earth-line);
}
.stage-card h3 { font-size: 1.25rem; margin: 1rem 0 0.5rem; }
.stage-card p { font-size: 0.9375rem; }
.stage-number {
  display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem;
  border-radius: 0.625rem; background: var(--ct-plum); color: var(--white);
  font-family: var(--font-head); font-weight: 700;
}
.stage-card:nth-child(2) .stage-number { background: var(--ct-violet); }
.stage-card:nth-child(3) .stage-number { background: var(--ct-teal); color: var(--ct-plum); }
.stage-card:nth-child(4) .stage-number { background: var(--ct-yellow); color: var(--ct-plum); }
.notes {
  display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--ct-earth-line);
}
.notes h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }

/* Report */
.report { padding-bottom: 4rem; }
.summary {
  display: grid; grid-template-columns: auto 1fr; gap: 2.5rem; align-items: center;
  background: var(--ct-plum); color: var(--white); border-radius: 1.5rem; padding: 2.5rem;
}
.dial { position: relative; width: 11rem; height: 11rem; flex: none; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial circle { fill: none; stroke-width: 10; }
.dial .track { stroke: rgba(255, 255, 255, 0.14); }
.dial .value { stroke-linecap: round; transition: stroke-dashoffset 0.8s ease-out; }
.dial-number {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  font-family: var(--font-head); font-weight: 700; font-size: 3.5rem; line-height: 1;
}
.dial-number small { display: block; font-size: 0.8125rem; font-weight: 500; opacity: 0.75; margin-top: 0.25rem; letter-spacing: 0.04em; }
.summary-target { font-family: var(--font-mono); font-size: 0.875rem; opacity: 0.8; overflow-wrap: anywhere; }
.summary h2 { font-size: clamp(1.625rem, 3.2vw, 2.5rem); margin: 0.5rem 0 0.75rem; }
.summary p.summary-text { max-width: 38rem; opacity: 0.92; }
.summary-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.tag {
  display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; font-weight: 500;
  padding: 0.25rem 0.75rem; border-radius: var(--radius-round);
  background: rgba(255, 255, 255, 0.12); color: var(--white);
}
.summary-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.notice {
  margin-top: 1rem; padding: 1rem 1.25rem; border-radius: var(--radius);
  background: var(--ct-yellow-light); border: 1px solid var(--ct-yellow);
}
.notice strong { font-family: var(--font-head); }

.stage-scores {
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-top: 1rem;
}
.stage-score {
  display: block; background: var(--white); border-radius: var(--radius); padding: 1.25rem 1.5rem;
  border: 1px solid var(--ct-earth-line); text-decoration: none; color: inherit;
}
.stage-score:hover { border-color: var(--ct-plum); }
.stage-score-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.stage-score h3 { font-size: 1.0625rem; }
.stage-score-value { font-family: var(--font-head); font-weight: 700; font-size: 1.75rem; }
.stage-score-value small { font-size: 0.8125rem; font-weight: 500; color: #5d5a56; }
.stage-score p { font-size: 0.875rem; color: #5d5a56; margin-top: 0.5rem; }
.bar { height: 0.5rem; border-radius: var(--radius-round); background: var(--ct-earth); margin-top: 0.75rem; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; }

.block { margin-top: 3rem; }
.block > h2 { margin-bottom: 0.5rem; }
.block > .section-lede { margin-bottom: 1.25rem; }

.fix-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 0.75rem; counter-reset: fix; }
.fix {
  counter-increment: fix; display: grid; grid-template-columns: auto 1fr; gap: 1rem;
  background: var(--white); border-radius: var(--radius); padding: 1.25rem 1.5rem;
  border: 1px solid var(--ct-earth-line);
}
.fix::before {
  content: counter(fix); display: grid; place-items: center; width: 2rem; height: 2rem;
  border-radius: 0.5rem; background: var(--ct-violet); color: var(--white);
  font-family: var(--font-head); font-weight: 700;
}
.fix h3 { font-size: 1.0625rem; }
.fix > div { min-width: 0; overflow-wrap: anywhere; }
.fix p { margin-top: 0.375rem; font-size: 0.9375rem; }
.fix .fix-meta { color: #5d5a56; font-size: 0.8125rem; }

.stage-detail { margin-top: 2rem; scroll-margin-top: 1rem; }
.stage-detail-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.stage-detail-head h3 { font-size: 1.375rem; }
.stage-detail-head p { color: #5d5a56; }
.checks { margin-top: 0.75rem; background: var(--white); border: 1px solid var(--ct-earth-line); border-radius: var(--radius); overflow: hidden; }
.check + .check { border-top: 1px solid var(--ct-earth-line); }
.check summary {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.875rem;
  padding: 0.875rem 1.25rem; cursor: pointer; list-style: none;
}
.check summary::-webkit-details-marker { display: none; }
.check summary:hover { background: var(--ct-earth-light); }
.check-name { font-weight: 500; }
.check-evidence { display: block; font-size: 0.875rem; color: #5d5a56; font-weight: 400; overflow-wrap: anywhere; }
.check-side { display: flex; align-items: center; gap: 0.5rem; }
.chevron { width: 0.625rem; height: 0.625rem; border-right: 2px solid var(--ct-plum); border-bottom: 2px solid var(--ct-plum); transform: rotate(45deg); transition: transform 0.2s; margin: 0 0.25rem 0.25rem; }
.check[open] .chevron { transform: rotate(-135deg); margin-bottom: -0.25rem; }
.check-body { padding: 0 1.25rem 1.25rem 3.75rem; display: grid; gap: 0.75rem; font-size: 0.9375rem; overflow-wrap: anywhere; }
.check-body > * { min-width: 0; }
.check-body h4 { font-family: var(--font-head); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #5d5a56; margin-bottom: 0.125rem; }
.check-body ul { margin: 0; padding-left: 1.125rem; }
.check-body code, .mono { font-family: var(--font-mono); font-size: 0.8125rem; overflow-wrap: anywhere; }

.status-icon {
  flex: none; width: 1.625rem; height: 1.625rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.875rem; font-weight: 700; line-height: 1;
}
.status-pass { background: var(--ct-teal); color: var(--ct-plum); }
.status-partial { background: var(--ct-yellow); color: var(--ct-plum); }
.status-fail { background: var(--fail); color: var(--white); }
.status-na { background: var(--ct-earth-line); color: var(--ct-plum); }

.pill {
  font-size: 0.75rem; font-weight: 500; padding: 0.125rem 0.625rem; border-radius: var(--radius-round);
  border: 1px solid var(--ct-earth-line); color: #5d5a56; white-space: nowrap;
}
.pill-core { border-color: var(--ct-plum); color: var(--ct-plum); }
.pill-emerging { border-color: var(--ct-violet); color: var(--ct-violet-dark); }

.reference {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 3rem; background: var(--white); border: 1px solid var(--ct-earth-line);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
}
.reference p { max-width: 44rem; font-size: 0.9375rem; }
.reference strong { font-family: var(--font-head); }

.cta {
  margin-top: 3rem; border-radius: 1.5rem; padding: 2.5rem;
  background: var(--ct-violet); color: var(--white);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.cta h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cta p { margin-top: 0.5rem; max-width: 36rem; }

/* Methodology */
.doc { padding: 2.5rem 0 5rem; }
.doc h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); }
.doc h2 { font-size: 1.625rem; margin-top: 3rem; }
.doc > .wrap > p, .doc li { max-width: 46rem; }
.doc > .wrap > p { margin-top: 1rem; }
.doc table { width: 100%; border-collapse: collapse; margin-top: 1rem; background: var(--white); border-radius: var(--radius); overflow: hidden; font-size: 0.9375rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.75rem 1rem; border-bottom: 1px solid var(--ct-earth-line); }
.doc th { font-family: var(--font-head); font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; background: var(--ct-earth-light); }
.doc tr:last-child td { border-bottom: 0; }
.doc td:last-child, .doc th:last-child { white-space: nowrap; }
.table-scroll { overflow-x: auto; }

/* Footer */
.site-footer { background: var(--ct-plum); color: var(--white); padding: 2rem 0; font-size: 0.875rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; }
.site-footer a { color: var(--white); }

@media (max-width: 44rem) {
  .wrap { padding: 0 1rem; }
  .brand-divider, .brand-product { display: none; }
  .brand img { height: 2rem; }
  .brand { min-height: 2.75rem; }
  /* The header keeps the in-site link; the external one lives in the report and footer. */
  .site-header nav .button { display: none; }
  .site-header nav a:not(.button) { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .button-small { min-height: 2.75rem; }
  .hero { padding: 1.5rem 0 2.5rem; }
  .scan-form { flex-direction: column; border-radius: 1.25rem; padding: 0.5rem; }
  .scan-form input { padding: 0.75rem 0.75rem; }
  .summary { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem; }
  .dial { width: 8.5rem; height: 8.5rem; }
  .dial-number { font-size: 2.75rem; }
  .stage-scores { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stage-score { padding: 1rem; }
  .stage-score-head { flex-direction: column; gap: 0.125rem; }
  .stage-score p { display: none; }
  .fix { padding: 1rem; gap: 0.75rem; }
  .check summary { padding: 0.875rem 1rem; gap: 0.75rem; min-height: 2.75rem; }
  .check-side .pill { display: none; }
  .check-body { padding: 0 1rem 1rem 1rem; }
  .reference { padding: 1rem; }
  .cta { padding: 1.5rem; }
  .footer-row { flex-direction: column; }
}
