/* Attesta: design tokens (healthcare blue) ------------------------------------ */
:root {
  --navy: #0b1f4b;
  --navy-2: #12348a;
  --blue: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-300: #93c5fd;
  --blue-200: #bfdbfe;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --cyan: #06b6d4;
  --cyan-300: #67e8f9;

  --ink: #0f172a;
  --muted: #475569;
  --line: #dbe3ef;
  --bg: #f5f8fe;
  --surface: #ffffff;
  --focus: #f59e0b;

  --red: #b42318;
  --red-bg: #fdecea;
  --amber: #8a4f00;
  --amber-strong: #c27a00;
  --amber-bg: #fff4dc;
  --green: #0f7a4a;
  --green-500: #10b981;
  --green-bg: #e3f6ee;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 75, 0.06);
  --shadow: 0 1px 2px rgba(11, 31, 75, 0.05), 0 10px 30px rgba(11, 31, 75, 0.08);
  --shadow-lg: 0 20px 60px rgba(11, 31, 75, 0.18);
  --gradient-hero: radial-gradient(circle at 85% 15%, rgba(96, 165, 250, 0.35), transparent 42%),
    radial-gradient(circle at 10% 90%, rgba(6, 182, 212, 0.22), transparent 40%),
    linear-gradient(135deg, #0b1f4b 0%, #12348a 55%, #1d4ed8 100%);
  --gradient-blue: linear-gradient(135deg, #2563eb 0%, #1d4ed8 60%, #1e40af 100%);

  --font-body: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Segoe UI Semibold', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img,
svg {
  max-width: 100%;
}
img {
  height: auto;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.015em;
}
h1 {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.75rem);
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.35rem;
}
h4 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--blue);
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--navy);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

[id] {
  scroll-margin-top: 5.5rem;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
}
.skip-link:focus {
  top: 1rem;
  color: #fff;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 0.9rem;
}
.center {
  text-align: center;
  justify-content: center;
}

/* Layout ---------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.container.narrow {
  max-width: 880px;
}

.section {
  padding-block: clamp(4rem, 9vw, 6.5rem);
}
.section-white {
  background: var(--surface);
}
.section-tint {
  background: linear-gradient(180deg, #eaf2ff 0%, #f5f8fe 100%);
}

.section-head {
  max-width: 50rem;
  margin-bottom: 2.75rem;
}
.section-head.is-centered {
  margin-inline: auto;
  text-align: center;
}
.section-head.is-tight {
  /* Wider than the default head so a long title holds one line, while the lead
     below stays at a comfortable reading width. */
  max-width: 58rem;
  margin-bottom: 1.9rem;
}
.section-head.is-tight .lead {
  max-width: 44rem;
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow::before {
  content: '';
  width: 1.5rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.is-centered .eyebrow::before {
  display: none;
}

.lead {
  font-size: clamp(1.075rem, 2vw, 1.25rem);
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card > :last-child {
  margin-bottom: 0;
}

/* Header ---------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(160%) blur(10px);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 6px 24px rgba(11, 31, 75, 0.08);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  color: var(--navy);
  text-decoration: none;
}
.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.6rem;
}
.site-nav a:not(.btn) {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.975rem;
}
.site-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.3rem;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.site-nav a:not(.btn):hover {
  color: var(--blue);
}
.site-nav a:not(.btn):hover::after {
  transform: scaleX(1);
}
/* Scoped under .site-header so these win over the generic .btn display rule below. */
.site-header .nav-toggle {
  display: none;
}

@media (max-width: 900px) {
  .js .site-header .nav-toggle {
    display: inline-flex;
  }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: calc(-1 * clamp(1rem, 4vw, 2rem));
    right: calc(-1 * clamp(1rem, 4vw, 2rem));
    padding: 0.5rem clamp(1rem, 4vw, 2rem) 1.25rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .js .site-nav.is-open {
    display: block;
  }
  .js .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .js .site-nav li a:not(.btn) {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav li a:not(.btn)::after {
    display: none;
  }
  .js .site-nav li .btn {
    width: 100%;
    margin-top: 1rem;
  }
  .header-inner {
    flex-wrap: wrap;
  }
}

/* Buttons --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.9rem;
  padding: 0.7rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn .icon {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.18s;
}
.btn:hover .icon {
  transform: translateX(2px);
}
.btn-primary {
  background: var(--gradient-blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.28);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 12px 26px rgba(29, 78, 216, 0.36);
}
.btn-secondary {
  background: #fff;
  color: var(--blue);
  border-color: var(--blue-200);
}
.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--navy);
}
.btn-cta {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.25);
}
.btn-cta:hover {
  background: var(--blue-50);
  color: var(--navy);
}
.btn-light {
  background: #fff;
  color: var(--navy);
}
.btn-light:hover {
  background: var(--blue-50);
  color: var(--navy);
}
.btn-outline-light,
.btn-ghost-light {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-outline-light:hover,
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: #fff;
}
.btn-lg {
  min-height: 3.35rem;
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
}
.btn-small {
  min-height: 2.35rem;
  padding: 0.4rem 1rem;
  font-size: 0.925rem;
}
.btn-link {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--blue);
  font-weight: 500;
  text-decoration: underline;
}
.btn-link:hover {
  transform: none;
}
.btn:disabled {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.cta-row {
  margin: 1.25rem 0 0;
}

/* Hero ------------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(6rem, 11vw, 8.5rem);
  background: var(--gradient-hero);
  color: #dbe7ff;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 {
  color: #fff;
}
.highlight {
  position: relative;
  white-space: nowrap;
  background: linear-gradient(90deg, #67e8f9, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.highlight::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.02em;
  height: 0.12em;
  border-radius: 999px;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  opacity: 0.7;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
  padding: 0.4rem 0.9rem 0.4rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e0ecff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.pulse-dot {
  position: relative;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--cyan-300);
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--cyan-300);
  animation: pulse 2s ease-out infinite;
}
.hero-lead {
  max-width: 36rem;
  margin-bottom: 2rem;
  font-size: clamp(1.1rem, 2vw, 1.28rem);
  color: #c9dafb;
}
.hero-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin: 2rem 0 0;
  padding: 0;
  font-size: 0.95rem;
  color: #d6e4ff;
}
.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.hero-trust .icon {
  color: var(--cyan-300);
}

.hero-visual {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
}
.hero-visual img {
  display: block;
  width: 100%;
  filter: drop-shadow(0 30px 50px rgba(2, 6, 23, 0.35));
}
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.95rem 0.65rem 0.65rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.3;
  animation: float 6s ease-in-out infinite;
}
.float-card strong {
  display: block;
  color: var(--navy);
  font-size: 0.9rem;
}
.float-card small {
  color: var(--muted);
  font-size: 0.78rem;
}
.float-icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  background: var(--blue-100);
  color: var(--blue);
}
.float-icon.is-green {
  background: var(--green-bg);
  color: var(--green);
}
.float-icon.is-cyan {
  background: #cffafe;
  color: #0e7490;
}
.float-card-1 {
  top: 4%;
  left: -4%;
}
.float-card-2 {
  top: 48%;
  right: -6%;
  animation-delay: -2s;
}
.float-card-3 {
  bottom: 2%;
  left: 6%;
  animation-delay: -4s;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    max-width: 460px;
  }
  .float-card-1 {
    left: 0;
  }
  .float-card-2 {
    right: 0;
  }
}
@media (max-width: 520px) {
  .float-card {
    font-size: 0.78rem;
    padding: 0.5rem 0.7rem 0.5rem 0.5rem;
  }
  .float-card small {
    display: none;
  }
  .float-card-3 {
    display: none;
  }
}

/* Facts strip ----------------------------------------------------------------- */
.facts-strip {
  position: relative;
  z-index: 2;
  margin-top: clamp(-4.5rem, -8vw, -3.5rem);
}
.fact-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.fact-cards li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.9rem;
  align-items: center;
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.fact-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue);
}
.fact-icon .icon {
  width: 1.5rem;
  height: 1.5rem;
}
.fact-value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.fact-label {
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--muted);
}
@media (max-width: 900px) {
  .fact-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .fact-cards li {
    padding: 1rem;
  }
  .fact-icon {
    width: 2.5rem;
    height: 2.5rem;
  }
  .fact-value {
    font-size: 1.45rem;
  }
}

/* Key question cards ---------------------------------------------------------- */
.kq-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.kq-card {
  position: relative;
  overflow: hidden;
  padding: 1.15rem 1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.kq-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--gradient-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}
.kq-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-200);
  box-shadow: var(--shadow);
}
.kq-card:hover::before {
  transform: scaleX(1);
}
.kq-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.5rem;
}
.kq-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 11px;
  background: var(--gradient-blue);
  color: #fff;
  box-shadow: 0 6px 14px rgba(29, 78, 216, 0.25);
}
.kq-icon .icon {
  width: 1.15rem;
  height: 1.15rem;
}
.kq-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}
.kq-card p:last-child {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}
@media (max-width: 1000px) {
  .kq-grid {
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  }
}

.callout-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.5rem;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--blue-200);
  border-left: 5px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue-50);
  color: var(--navy);
}
.callout-bar p {
  margin: 0;
}
.callout-bar .icon {
  width: 1.6rem;
  height: 1.6rem;
  color: var(--blue);
}

/* Paper vs proof ---------------------------------------------------------------- */
.segmented {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.segmented button {
  min-height: 2.5rem;
  padding: 0.45rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.segmented button[aria-pressed='true'] {
  background: var(--gradient-blue);
  color: #fff;
}
.proof-grid {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}
.proof-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.proof-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue);
}
.proof-title {
  margin: 0 0 0.2rem;
  font-weight: 700;
  color: var(--navy);
}
.proof-paper,
.proof-evidence {
  display: flex;
  gap: 0.45rem;
  align-items: baseline;
  margin: 0;
  font-size: 0.95rem;
}
.proof-paper {
  color: var(--muted);
}
.proof-paper::before {
  content: '✕';
  color: var(--red);
  font-weight: 700;
}
.proof-evidence {
  color: var(--ink);
  font-weight: 500;
}
.proof-evidence::before {
  content: '✓';
  color: var(--green);
  font-weight: 800;
}
.proof-grid[data-view='paper'] .proof-evidence,
.proof-grid[data-view='proof'] .proof-paper {
  display: none;
}
.proof-grid[data-view='proof'] .proof-card {
  border-color: #a7e3c8;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.1);
}
.proof-grid[data-view='proof'] .proof-icon {
  background: var(--green-bg);
  color: var(--green);
}
.proof-grid[data-view] .proof-paper,
.proof-grid[data-view] .proof-evidence {
  animation: fade-up 0.35s ease both;
}

.visual-card {
  margin: 0;
  padding: clamp(1rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.visual-card img {
  display: block;
  width: 100%;
}
.visual-card figcaption {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

/* Self-check -------------------------------------------------------------------- */
.self-check-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) {
  .self-check-wrap {
    grid-template-columns: 1fr;
  }
}
.self-check {
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.sc-questions {
  margin: 1.25rem 0;
  padding: 0;
  border: 0;
}
.sc-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 0.6rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.sc-item:hover {
  border-color: var(--blue-300);
}
.sc-item:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-50);
}
.sc-item input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  accent-color: var(--blue);
}
.sc-result {
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: 14px;
  background: var(--red-bg);
  transition: background-color 0.3s;
}
.sc-result[data-state='documented'] {
  background: var(--amber-bg);
}
.sc-result[data-state='operating'] {
  background: var(--green-bg);
}
.sc-meter {
  height: 0.55rem;
  margin-bottom: 0.8rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
}
.sc-meter-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--red);
  transition: width 0.4s ease, background-color 0.3s;
}
.sc-result[data-state='documented'] .sc-meter-fill {
  background: var(--amber-strong);
}
.sc-result[data-state='operating'] .sc-meter-fill {
  background: var(--green-500);
}
.sc-state {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--red);
}
.sc-result[data-state='documented'] .sc-state {
  color: var(--amber);
}
.sc-result[data-state='operating'] .sc-state {
  color: var(--green);
}
.sc-result p:last-child {
  margin: 0;
  color: var(--ink);
}

/* Journey --------------------------------------------------------------------- */
.journey {
  counter-reset: step;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.journey li {
  position: relative;
  padding: 1.6rem 1.2rem 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.journey li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 3rem;
  right: -1rem;
  width: 1rem;
  border-top: 2px dashed var(--blue-300);
}
/* Icon beside the step title, description below. */
.journey-item > summary {
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}
.journey-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--gradient-blue);
  color: #fff;
  box-shadow: 0 0 0 6px var(--blue-50);
}
.journey-icon .icon {
  width: 1.4rem;
  height: 1.4rem;
}
/* Room for a two-line title, so the five descriptions start level. */
.journey-heading {
  display: block;
  min-height: 4.2rem;
  align-content: center;
}
.journey-step {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}
.journey h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}
.journey p {
  margin: 0;
  color: var(--muted);
  font-size: 0.975rem;
}
/* Narrower: one column of step titles, each opening to its description. */
@media (max-width: 1100px) {
  .journey {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
    max-width: 44rem;
    margin-inline: auto;
  }
  .journey li {
    padding: 0;
  }
  .journey li::after {
    display: none;
  }
  .journey-item > summary {
    gap: 1rem;
    margin: 0;
    padding: 0.85rem 1.1rem 0.85rem 0.95rem;
  }
  .journey-item > summary::after {
    margin-left: auto;
  }
  .journey-icon {
    width: 2.6rem;
    height: 2.6rem;
    box-shadow: 0 0 0 4px var(--blue-50);
  }
  .journey-icon .icon {
    width: 1.2rem;
    height: 1.2rem;
  }
  .journey-heading {
    min-height: 0;
  }
  .journey-step {
    margin-bottom: 0.05rem;
    font-size: 0.72rem;
  }
  .journey h3 {
    margin: 0;
    font-size: 1.08rem;
  }
  .journey-item > p {
    padding: 0 1.1rem 1rem calc(0.95rem + 2.6rem + 1rem);
  }
}

/* Application sections ------------------------------------------------------------- */
.app-section {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}
.app-section.is-tinted {
  background: linear-gradient(180deg, #eaf2ff 0%, #f5f8fe 60%);
}
/* The library itself is tall, so its section needs less padding around it. */
#templates.section {
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
#problem.section {
  padding-block: clamp(3rem, 6.5vw, 5rem);
}
.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
  .app-layout .app-aside img {
    display: none;
  }
}
.app-aside {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
}
.app-aside img {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
}
.aside-list {
  list-style: none;
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
}
.aside-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  font-size: 0.925rem;
  color: var(--muted);
}
.aside-list strong {
  display: block;
  color: var(--navy);
}
.aside-icon {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--blue);
}

.app-shell {
  padding: clamp(1.1rem, 4vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.scale {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  text-align: left;
}
.scale div {
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.scale dt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--navy);
}
.scale dd {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.scale-score {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  color: #fff;
  font-size: 0.85rem;
}
.scale-2 {
  background: var(--green-500);
}
.scale-1 {
  background: var(--amber-strong);
}
.scale-0 {
  background: var(--red);
}
@media (max-width: 640px) {
  .scale {
    grid-template-columns: 1fr;
  }
}

/* Forms ------------------------------------------------------------------------ */
.label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: var(--navy);
}
.hint {
  margin: 0 0 0.5rem;
  font-size: 0.925rem;
  color: var(--muted);
}
.optional {
  font-weight: 400;
  color: var(--muted);
}
.input,
.select {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.95rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 2px solid #b6c3d6;
  border-radius: 12px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.input:hover,
.select:hover {
  border-color: var(--blue-300);
}
.input:focus,
.select:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}
.input[aria-invalid='true'],
.select[aria-invalid='true'] {
  border-color: var(--red);
}
.field {
  min-width: 0;
  margin-bottom: 1.1rem;
}
.field-error {
  margin: 0.35rem 0 0;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--red);
}
.field-error::before {
  content: '! ';
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}
.checkbox input {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  margin-top: 0.2rem;
  accent-color: var(--blue);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice {
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.notice > :last-child {
  margin-bottom: 0;
}
.notice-error {
  background: var(--red-bg);
  border-color: #f1b7b1;
  color: #7a1a12;
}
.notice-warning {
  background: var(--amber-bg);
  border-color: #efcd84;
  color: #5e3700;
}
.notice-demo {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}
.notice .btn {
  margin-top: 0.75rem;
}

.error-summary {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--red-bg);
  border: 2px solid var(--red);
  border-radius: 12px;
}
.error-summary p {
  margin-bottom: 0.25rem;
}
.error-summary ul {
  margin: 0;
  padding-left: 1.25rem;
}
.error-summary a {
  color: #7a1a12;
  font-weight: 600;
}

.loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
}
.spinner {
  width: 1.3rem;
  height: 1.3rem;
  border: 3px solid var(--blue-100);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Data labels and ratings ----------------------------------------------------------- */
.data-label {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
  vertical-align: middle;
}
.data-label-cqc {
  background: #e2e8f0;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}
.data-label-attesta {
  background: var(--blue-100);
  color: var(--blue);
  border: 1px solid var(--blue-200);
}
.data-label-demo {
  margin-left: 0.4rem;
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.rating {
  display: inline-block;
  padding: 0.08rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef1f4;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}
.rating-outstanding {
  background: #e0e7ff;
  color: #3730a3;
  border-color: #c7d2fe;
}
.rating-good {
  background: var(--green-bg);
  color: var(--green);
  border-color: #a7e3c8;
}
.rating-requires-improvement {
  background: var(--amber-bg);
  color: var(--amber);
  border-color: #efcd84;
}
.rating-inadequate {
  background: var(--red-bg);
  color: var(--red);
  border-color: #f1b7b1;
}

/* Practice lookup ------------------------------------------------------------------- */
.lookup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.lookup-row .input {
  flex: 1 1 16rem;
}
.lookup-output:not(:empty) {
  margin-top: 1.5rem;
}
.lookup-heading {
  font-size: 1.2rem;
}
.lookup-skip {
  margin: 1.5rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.match-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}
.match {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: 100%;
  padding: 0.95rem 3rem 0.95rem 1.15rem;
  font: inherit;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s, transform 0.18s;
}
.match::after {
  content: '→';
  position: absolute;
  right: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue);
  font-weight: 700;
}
.match:hover {
  border-color: var(--blue);
  background: var(--blue-50);
  transform: translateX(2px);
}
.match-name {
  font-weight: 600;
  color: var(--navy);
}
.match-meta {
  font-size: 0.875rem;
  color: var(--muted);
}

.practice-card {
  padding: 1.4rem 1.5rem;
  background: #fbfcfe;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #334155;
  border-radius: var(--radius);
  animation: fade-up 0.35s ease both;
}
.card-labels {
  margin: 0 0 0.6rem;
}
.practice-name {
  margin-bottom: 0.2rem;
}
.practice-address {
  color: var(--muted);
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  margin: 0 0 1rem;
}
.facts dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
}
.not-available {
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
}
.facts-subtitle {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}
.kq-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
}
.kq-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.practice-link {
  font-weight: 600;
}
.source-note {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* Scorecard --------------------------------------------------------------------------- */
.scorecard-context {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 12px;
  font-size: 0.95rem;
}
.progress-wrap {
  margin-bottom: 1rem;
}
.progress-text {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}
progress {
  display: block;
  width: 100%;
  height: 0.65rem;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--blue-100);
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: var(--blue-100);
  border-radius: 999px;
}
progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  border-radius: 999px;
  transition: width 0.3s;
}
progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  border-radius: 999px;
}

.step-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
  padding: 0;
}
.step-pill {
  min-height: 2.35rem;
  padding: 0.35rem 0.9rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s;
}
.step-pill:hover {
  border-color: var(--blue);
}
.step-pill.is-complete {
  background: var(--green-bg);
  border-color: #a7e3c8;
}
.step-pill.is-complete::after {
  content: ' ✓';
  color: var(--green);
  font-weight: 700;
}
.step-pill[aria-current='step'] {
  background: var(--gradient-blue);
  border-color: transparent;
  color: #fff;
}
.step-pill[aria-current='step'].is-complete::after {
  color: #a7f3d0;
}

.step-enter {
  animation: fade-up 0.35s ease both;
}
.step-header {
  margin-bottom: 1.25rem;
}
.step-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.step-icon {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 16px;
  background: var(--gradient-blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.28);
}
.step-icon .icon {
  width: 1.6rem;
  height: 1.6rem;
}
.step-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}
.step-title {
  margin: 0;
  font-size: 1.75rem;
}
.step-question {
  color: var(--muted);
  font-size: 1.05rem;
}
.cqc-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.question {
  min-width: 0;
  margin: 0 0 1rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.question:focus-within {
  border-color: var(--blue-200);
  box-shadow: 0 8px 24px rgba(29, 78, 216, 0.08);
}
.question.has-error {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}
.question legend {
  float: left;
  width: 100%;
  margin-bottom: 0.4rem;
  padding: 0;
}
.question-number {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}
.question-text {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
}
.question-desc {
  clear: both;
  margin: 0 0 0.95rem;
  font-size: 0.925rem;
  color: var(--muted);
}

.options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
.option {
  position: relative;
}
.option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.option label {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  height: 100%;
  padding: 0.85rem 0.95rem 0.85rem 2.75rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s, transform 0.18s;
}
.option label::before {
  content: '';
  position: absolute;
  left: 0.9rem;
  top: 1rem;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
  transition: border-color 0.18s, background 0.18s;
}
.option label:hover {
  border-color: var(--blue-300);
  transform: translateY(-1px);
}
.option input:checked + label {
  border-color: var(--blue);
  background: var(--blue-50);
}
.option input:checked + label::before {
  border-color: var(--blue);
  background: radial-gradient(circle, var(--blue) 0 45%, #fff 50%);
}
.option input:focus-visible + label {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.option-label {
  font-weight: 600;
  color: var(--navy);
}
.option-hint {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--muted);
}
@media (max-width: 720px) {
  .options {
    grid-template-columns: 1fr;
  }
  .question {
    padding: 1rem;
  }
  .step-title {
    font-size: 1.45rem;
  }
}
@media (forced-colors: active) {
  .option input {
    position: static;
    opacity: 1;
    width: auto;
    height: auto;
  }
  .option label::before {
    display: none;
  }
  .option label {
    padding-left: 0.95rem;
  }
}
.step-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Results --------------------------------------------------------------------------- */
.results {
  animation: fade-up 0.45s ease both;
}
.results-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.results-header .eyebrow {
  margin-bottom: 0.35rem;
}
.results-header p:last-child {
  margin: 0;
}
.results-title {
  margin-bottom: 0.2rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
}
.panel {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.panel > :last-child {
  margin-bottom: 0;
}
.panel-attesta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #eef4ff 0%, #ffffff 70%);
  border-color: var(--blue-200);
  border-top: 5px solid var(--blue);
}
.panel-cqc {
  background: #f8fafc;
  border-color: #cbd5e1;
  border-top: 5px solid #334155;
}
.panel-cqc .practice-card {
  padding: 0;
  border: 0;
  background: transparent;
  animation: none;
}
.panel-title {
  margin: 0.6rem 0 1rem;
}
.panel-empty {
  margin: 0.75rem 0;
}

.score-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.score-ring {
  --score: 0;
  --ring: var(--blue);
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--score) * 1%), var(--blue-100) 0);
  box-shadow: 0 12px 30px rgba(29, 78, 216, 0.18);
}
.score-ring[data-band='red'] {
  --ring: var(--red);
}
.score-ring[data-band='amber'] {
  --ring: var(--amber-strong);
}
.score-ring[data-band='green'] {
  --ring: var(--green-500);
}
.score-ring::before {
  content: '';
  position: absolute;
  inset: 0.9rem;
  border-radius: 50%;
  background: #fff;
}
.score-ring-inner {
  position: relative;
  text-align: center;
  line-height: 1.1;
}
.score-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.score-raw {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

.band {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.05rem;
  border: 2px solid;
  border-radius: 14px;
  animation: pop 0.45s 0.2s ease both;
}
.band-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
}
.band-label {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.band-headline {
  display: block;
  font-weight: 600;
}
.band-red {
  border-color: var(--red);
  background: var(--red-bg);
  color: #7a1a12;
}
.band-red .band-icon {
  background: var(--red);
}
.band-amber {
  border-color: var(--amber-strong);
  background: var(--amber-bg);
  color: #5e3700;
}
.band-amber .band-icon {
  background: var(--amber-strong);
}
.band-green {
  border-color: var(--green-500);
  background: var(--green-bg);
  color: #134a2f;
}
.band-green .band-icon {
  background: var(--green-500);
}

.result-block {
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.category-list {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.category {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.category.is-weakest {
  border-color: #efcd84;
  background: #fffbf2;
}
.category-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin-bottom: 0.5rem;
}
.category-name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--navy);
}
.category-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: var(--blue-50);
  color: var(--blue);
}
.category-icon .icon {
  width: 1.1rem;
  height: 1.1rem;
}
.category-score {
  margin-left: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bar {
  display: block;
  height: 0.7rem;
  overflow: hidden;
  background: var(--blue-100);
  border-radius: 999px;
}
.bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue-500), var(--blue));
  border-radius: 999px;
  animation: grow 0.8s ease both;
  transform-origin: left;
}
.category.is-weakest .bar-fill {
  background: linear-gradient(90deg, #f59e0b, var(--amber-strong));
}
.category-cqc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.tag {
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.tag-weak {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid #efcd84;
}

.weak-callout {
  margin-bottom: 0.75rem;
  padding: 1.1rem 1.3rem;
  background: var(--amber-bg);
  border-left: 5px solid var(--amber-strong);
  border-radius: 0 14px 14px 0;
}
.weak-callout p:last-child {
  margin: 0;
}
.weak-name {
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: var(--navy);
}

.gap-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}
.gap {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem 0.9rem;
  padding: 0.7rem 0.95rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.gap-status {
  justify-self: start;
  padding: 0.12rem 0.55rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}
.gap-0 .gap-status {
  background: var(--red-bg);
  color: var(--red);
}
.gap-1 .gap-status {
  background: var(--amber-bg);
  color: var(--amber);
}
.gap-title {
  font-weight: 600;
}
.gap-category {
  font-size: 0.85rem;
  color: var(--muted);
}
@media (max-width: 640px) {
  .gap {
    grid-template-columns: 1fr;
  }
}

.package-card {
  padding: 1.4rem 1.5rem;
  background: linear-gradient(160deg, #eef4ff 0%, #ffffff 60%);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
}
.package-card > :last-child {
  margin-bottom: 0;
}
.package-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
}
.package-price {
  margin: 0.1rem 0 0.6rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blue);
}
.secondary-rec {
  margin: 1rem 0 0;
}

.lead-block {
  padding: clamp(1.1rem, 3vw, 1.75rem);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--blue-50), #fff 50%);
}
.lead-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.25rem;
}
@media (max-width: 640px) {
  .lead-grid {
    grid-template-columns: 1fr;
  }
}
.lead-success {
  padding: 1.5rem;
  background: var(--green-bg);
  border: 2px solid var(--green-500);
  border-radius: var(--radius);
  animation: pop 0.4s ease both;
}
.lead-success > :last-child,
.lead-success [data-booking-wrapper] > :last-child {
  margin-bottom: 0;
}

.disclaimer {
  margin: 2rem 0 0;
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
  background: var(--bg);
  border-radius: 12px;
}
.retake {
  margin: 1.25rem 0 0;
}

/* Fractional Compliance Lead ----------------------------------------------------- */
#fractional-title .line {
  display: block;
}
.compare-wrap {
  max-width: 62rem;
  margin-inline: auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}
.compare th,
.compare td {
  padding: 0.95rem 1.25rem;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}
.compare thead th,
.compare thead td {
  padding-block: 0.9rem;
  border-top: 0;
  font-weight: 700;
  color: #fff;
  background: var(--navy);
}
.compare thead th.is-attesta {
  background: var(--blue-600);
}
.compare tbody th {
  width: 22%;
  font-weight: 700;
  color: var(--navy);
}
.compare tbody td {
  width: 39%;
  color: var(--muted);
}
.compare td.is-attesta {
  color: var(--ink);
  background: var(--blue-50);
}
.compare td.is-attesta strong {
  color: var(--navy);
}
.compare sup a {
  padding-inline: 0.1rem;
  font-weight: 700;
  text-decoration: none;
}
.compare-gap {
  max-width: 44rem;
  margin: 1.75rem auto 0.75rem;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--navy);
}
.compare-footnote {
  max-width: 62rem;
  margin: 0 auto;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.hire-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2.5rem;
  max-width: 62rem;
  margin: 2rem auto 0;
  padding: 1.5rem 1.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.hire-box > div:first-child {
  flex: 1 1 26rem;
}
.hire-box h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}
.hire-box p {
  margin: 0;
  color: var(--muted);
}
.hire-box-action {
  flex: 0 1 auto;
  text-align: center;
}
.hire-box-action p {
  margin-top: 0.5rem;
  font-size: 0.82rem;
}
/* Phones: each row becomes a card, with the two options side by side under the row name. */
@media (max-width: 720px) {
  /* The two headline sentences wrap naturally rather than each breaking on its own. */
  #fractional-title .line {
    display: inline;
  }
  .compare thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .compare,
  .compare tbody {
    display: block;
  }
  .compare tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.5rem;
    padding: 0.9rem 0.85rem;
    border-top: 1px solid var(--line);
  }
  .compare tbody tr:first-child {
    border-top: 0;
  }
  .compare tbody th,
  .compare tbody td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
  }
  .compare tbody th {
    grid-column: 1 / -1;
  }
  .compare tbody td {
    padding: 0.55rem 0.65rem;
    font-size: 0.9rem;
    border-radius: 10px;
    background: var(--bg);
  }
  .compare tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .compare tbody td.is-attesta::before {
    color: var(--blue);
  }
  .hire-box {
    padding: 1.25rem;
  }
  .hire-box-action,
  .hire-box-action .btn {
    width: 100%;
  }
}

/* Pricing --------------------------------------------------------------------- */
/* Four across: Diagnostic, Sprint, Fractional, Retainer. Two by two on tablets, stacked on phones. */
.pricing {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
  align-items: stretch;
  margin-top: 0.85rem;
}
@media (min-width: 1151px) {
  .pricing .price-card {
    padding: 1.9rem 1.35rem 1.5rem;
  }
  .pricing .price {
    font-size: 2.2rem;
  }
}
@media (max-width: 1150px) {
  .pricing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.75rem;
  }
}
@media (max-width: 960px) {
  .pricing {
    grid-template-columns: 1fr;
    max-width: 34rem;
    margin-inline: auto;
  }
}
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem 1.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 0.2s, box-shadow 0.2s;
}
.price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.price-card h3 {
  font-size: 1.3rem;
}
.price-card.is-featured {
  background: var(--gradient-hero);
  border-color: transparent;
  color: #dbe7ff;
  box-shadow: var(--shadow-lg);
}
.price-card.is-featured h3,
.price-card.is-featured .price {
  color: #fff;
}
.price-card.is-featured .check-list li::before {
  color: var(--cyan-300);
}
.price-badge {
  position: absolute;
  top: -0.85rem;
  left: 1.5rem;
  margin: 0;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}
.price {
  margin: 0 0 0.75rem;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.price small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.price-card.is-featured .price small {
  color: #c9dafb;
}
.price-card.is-highlighted {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 1px var(--blue-500), var(--shadow);
}
.price-card.is-highlighted .price-badge {
  background: var(--blue);
}
/* Full width, so "Send us your job description" holds one line in a four-across card. */
.price-card [data-jd-wrapper] .btn {
  width: 100%;
  padding-inline: 0.6rem;
  font-size: 0.92rem;
}
.price-card [data-jd-wrapper],
.price-card [data-booking-wrapper] {
  margin: 1rem 0 0;
}
.price-note {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
}
.pricing-extra {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 1.5rem;
  padding: 1.15rem 1.5rem;
  background: #fff;
  border: 1px dashed var(--blue-300);
  border-radius: var(--radius);
}
.pricing-extra p {
  margin: 0;
}

.check-list {
  list-style: none;
  margin: 0.5rem 0 1rem;
  padding: 0;
}
.check-list li {
  position: relative;
  margin-bottom: 0.45rem;
  padding-left: 1.7rem;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 800;
}

/* About / case study ------------------------------------------------------------ */
.case-card {
  margin: 1.75rem 0;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.case-card h3 {
  font-size: 1.15rem;
}
.case-timeline {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0.5rem;
  padding: 0;
}
.case-step {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  text-align: center;
}
.case-step strong {
  display: block;
  font-size: 1rem;
}
.case-step span {
  font-size: 0.85rem;
}
.case-step.is-before {
  background: var(--amber-bg);
  color: var(--amber);
}
.case-step.is-after {
  background: var(--green-bg);
  color: var(--green);
}
.case-arrow {
  color: var(--blue);
  font-weight: 700;
  text-align: center;
}
.case-arrow span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}
@media (max-width: 520px) {
  .case-timeline {
    grid-template-columns: 1fr;
  }
}

/* Resources / FAQ ----------------------------------------------------------------- */
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}
.col-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.4rem;
}
.col-title .icon {
  color: var(--blue);
}
.resource {
  margin-bottom: 0.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.resource[open] {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-sm);
}
.resource summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--navy);
}
.resource summary::-webkit-details-marker {
  display: none;
}
.resource summary::after {
  content: '+';
  display: grid;
  place-items: center;
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue);
  font-size: 1.2rem;
  line-height: 1;
}
.resource[open] summary::after {
  content: '−';
  background: var(--blue);
  color: #fff;
}
.resource-body {
  padding: 0 1.35rem 1.25rem;
  color: var(--muted);
}
.resource-body > :last-child {
  margin-bottom: 0;
}

/* Final CTA ------------------------------------------------------------------------ */
.final-cta {
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  color: #dbe7ff;
}
.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.final-cta .container {
  position: relative;
}
.final-cta h2 {
  color: #fff;
}
.final-cta .lead {
  color: #c9dafb;
}
.final-cta .btn-row {
  margin-top: 1.75rem;
}
.contact-line {
  margin: 1.5rem 0 0;
}
.final-cta a:not(.btn) {
  color: #fff;
}

/* Footer ---------------------------------------------------------------------------- */
.site-footer {
  padding-block: 3.5rem calc(2rem + env(safe-area-inset-bottom, 0px));
  background: #06122e;
  color: #a9b8d6;
  font-size: 0.9rem;
}
.site-footer a {
  color: #e0e9fb;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 2fr);
  gap: 2rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: #fff;
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.footer-heading {
  margin-bottom: 0.6rem;
  color: #fff;
  font-weight: 600;
}
@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Sticky mobile CTA ----------------------------------------------------------------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 0.75rem clamp(1rem, 4vw, 2rem) calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(11, 31, 75, 0.1);
  animation: slide-up 0.3s ease both;
}
.sticky-cta .btn {
  width: 100%;
}
@media (min-width: 721px) {
  .sticky-cta {
    display: none !important;
  }
}

/* Prose pages ---------------------------------------------------------------------------- */
.prose {
  max-width: 46rem;
}
.prose h2 {
  margin-top: 2rem;
  font-size: 1.5rem;
}

/* Motion ---------------------------------------------------------------------------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: none;
  }
}

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

@media print {
  .site-header,
  .site-footer,
  .sticky-cta,
  .step-nav,
  .lead-block,
  .retake,
  .results-actions,
  .gate,
  .gate-progress,
  .gate-dialog,
  .section:not(#scorecard) {
    display: none !important;
  }
  .app-shell {
    box-shadow: none;
    border: 0;
  }
}

/* Email gate ---------------------------------------------------------------------- */
.gate {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 2rem 1.75rem;
  background: var(--surface);
  border: 2px solid var(--blue-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.gate.is-compact {
  padding: 1.75rem 1.6rem 1.5rem;
  box-shadow: none;
  border: none;
}
.gate-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  color: #fff;
  background: var(--gradient-blue);
  border-radius: 14px;
}
.gate-icon .icon {
  width: 1.5rem;
  height: 1.5rem;
}
.gate-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.25;
  color: var(--navy);
}
.gate-title:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
.gate-description {
  margin: 0 0 1.4rem;
  color: var(--muted);
}
.gate-form .field {
  margin-bottom: 0.9rem;
}
.gate-consent {
  margin: 0.4rem 0 1.2rem;
  font-size: 0.95rem;
}
.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.gate-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
}
.gate-privacy {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 1.1rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.gate-privacy-icon {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  color: var(--blue);
}
.gate-wrap {
  padding: 0.5rem 0;
}
.gate-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 auto 1.5rem;
  max-width: 640px;
  padding: 0.8rem 1.1rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  border-radius: 999px;
  text-align: center;
}
.gate-progress-icon {
  display: inline-flex;
  flex: none;
}
.gate-progress-icon .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.gate-dialog {
  width: min(560px, calc(100vw - 2rem));
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.gate-dialog::backdrop {
  background: rgba(11, 31, 75, 0.55);
}
.gate-dialog-inner {
  max-height: min(85vh, 760px);
  overflow-y: auto;
}

@media (max-width: 560px) {
  .gate {
    padding: 1.5rem 1.25rem 1.35rem;
  }
  .gate-actions .btn {
    flex-basis: 100%;
  }
}

/* Template library ----------------------------------------------------------------- */
.template-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.template-search {
  flex: 1 1 22rem;
  max-width: 34rem;
}
.template-total {
  margin: 0 0 0.35rem;
  font-weight: 600;
  color: var(--muted);
}

/* One dropdown per category. Closed, the six categories take about the height of one open one. */
.template-accordion {
  display: grid;
  gap: 0.75rem;
}
.template-category {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.template-category:hover {
  border-color: var(--blue-300);
}
.template-category.is-open {
  border-color: var(--blue-200);
  box-shadow: var(--shadow);
}
.template-category-heading {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}
.template-category-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.35rem 1rem;
  width: 100%;
  padding: 0.9rem 1.25rem 0.9rem 1rem;
  font: inherit;
  text-align: left;
  color: var(--navy);
  background: none;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.template-category-toggle:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.template-category-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  color: var(--blue);
  background: var(--blue-50);
  transition: background 0.18s, color 0.18s;
}
.template-category.is-open .template-category-icon {
  color: #fff;
  background: var(--gradient-blue);
}
.template-category-icon .icon {
  width: 1.35rem;
  height: 1.35rem;
}
.template-category-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.template-category-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}
.template-category-summary {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
}
.template-category-count {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--navy);
  background: var(--blue-50);
}
/* Same +/− marker as the FAQ dropdowns, so every dropdown on the page reads alike. */
.template-category-chevron::after,
.disclosure > summary::after {
  content: '+';
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--blue);
  background: var(--blue-50);
  transition: background 0.18s, color 0.18s;
}
.template-category.is-open .template-category-chevron::after,
.disclosure[open] > summary::after {
  content: '−';
  color: #fff;
  background: var(--blue);
}
.template-category-panel {
  padding: 0.25rem 1.25rem 1.25rem;
}

.template-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.template-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.7rem 0.6rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.18s, background 0.18s;
}
.template-row:hover {
  border-color: var(--blue-300);
  background: #fff;
}
/* Attesta's own reference code for the document (CH-01, CORE-12, P-03). */
.template-code {
  flex: none;
  min-width: 4.25rem;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--blue-200);
}
.template-row-text {
  flex: 1;
  min-width: 0;
}
.template-name {
  display: block;
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1.35;
  color: var(--navy);
}
.template-summary {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
}
.template-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}
.template-actions .btn-small {
  min-height: 2.1rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.875rem;
}
.template-actions .icon {
  width: 1rem;
  height: 1rem;
}
.template-busy {
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 980px) {
  .template-rows {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .template-category-toggle {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.8rem 0.9rem 0.8rem 0.8rem;
    gap: 0.25rem 0.75rem;
  }
  .template-category-summary {
    display: none;
  }
  .template-category-count {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    padding: 0;
    font-weight: 600;
    color: var(--muted);
    background: none;
  }
  .template-category-chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
  .template-category-icon {
    grid-row: 1 / span 2;
    width: 2.4rem;
    height: 2.4rem;
  }
  .template-category-panel {
    padding: 0.1rem 0.75rem 0.9rem;
  }
  .template-row {
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
  }
  .template-row-text {
    flex-basis: calc(100% - 5rem);
  }
  .template-actions {
    flex-basis: 100%;
    justify-content: flex-start;
  }
}
/* One inline strip instead of a stacked list, so the header stays short. */
.template-highlights {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.6rem;
  margin: 1.5rem 0 0;
  padding: 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.template-highlights li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.template-highlights .icon {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--green-500);
}
.template-footnote {
  max-width: 72ch;
  margin: 1.5rem auto 0;
  text-align: center;
}

/* Dropdowns ---------------------------------------------------------------------- */
.disclosure > summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
  cursor: pointer;
}
.disclosure > summary::-webkit-details-marker {
  display: none;
}
.disclosure > summary::after {
  flex: none;
}
.disclosure > summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 10px;
}
/* Held open on wide screens (see initResponsiveDisclosures): no marker, no pointer. */
details[data-collapse-at]:not(.is-collapsible) > summary {
  cursor: default;
}
details[data-collapse-at]:not(.is-collapsible) > summary::after,
details[data-collapse-at]:not(.is-collapsible) .disclosure-count {
  display: none;
}
.disclosure-count {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.75;
}

/* Scorecard scale: a small pill under the lead that opens to the three answer levels. */
.scale-disclosure {
  margin-top: 1.25rem;
}
.scale-disclosure > summary {
  width: fit-content;
  margin-inline: auto;
  padding: 0.35rem 0.4rem 0.35rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.scale-disclosure > summary:hover {
  border-color: var(--blue-300);
}
.scale-disclosure > summary::after {
  width: 1.45rem;
  height: 1.45rem;
  font-size: 1.05rem;
}
.scale-disclosure .scale {
  margin-top: 1rem;
}

/* Pricing: the list shows as normal on the three-across layout; stacked, it becomes a dropdown. */
.price-includes {
  flex: 1;
}
.price-includes:not(.is-collapsible) > summary {
  display: none;
}
.price-includes.is-collapsible {
  flex: none;
  margin: 0.25rem 0 0.75rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.price-includes.is-collapsible > summary {
  justify-content: space-between;
  padding: 0.75rem 0;
  font-weight: 700;
  color: var(--navy);
}
.price-includes.is-collapsible > summary .disclosure-count {
  margin-right: auto;
}
.price-includes.is-collapsible .check-list {
  margin-top: 0;
}
.price-card.is-featured .price-includes.is-collapsible {
  border-color: rgba(255, 255, 255, 0.2);
}
.price-card.is-featured .price-includes > summary {
  color: #fff;
}
.price-card.is-featured .price-includes > summary::after {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}
.price-card.is-featured .price-includes[open] > summary::after {
  color: var(--navy);
  background: #fff;
}
