/* AI maturity model (/resources/ai-maturity-model-levels/): level overview strip,
   the level-by-level column (content left, CTA card right), and the topic
   form dialog that submits through HubSpot (see maturity-levels.js).
   Uses site.css tokens only. */

/* ---------- Overview strip ---------- */
.ml-overview { padding: 56px 0; }
/* Static maturity ramp above the level boxes (restored from the original scroll chart) */
.ml-chart { margin: 8px 0 20px; }
.ml-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.mlc-ramp { fill: #d9defb; }
.mlc-tick { stroke: #cfd4df; stroke-width: 2; }
.mlc-axis { fill: #8a90a2; font-size: 24px; font-weight: 600; letter-spacing: 1.9px; }
.mlc-zone-mark { fill: var(--magenta); opacity: .55; }
.mlc-gov { color: #16a34a; }
.mlc-zone { color: var(--magenta); }
.mlc-stroke { fill: none; stroke: currentColor; stroke-linecap: round; }
.mlc-fill { fill: currentColor; }
.mlc-text { fill: currentColor; font-size: 40px; font-weight: 700; }
.mlc-hit { fill: transparent; }
.ml-chart-in { grid-column: 2 / -1; grid-row: 1; margin: 0 0 36px; }
.ml-panel.has-chart > .ml-marker { grid-row: 2; }
.ml-panel.has-chart > .ml-body { grid-column: 2; grid-row: 2; }
.ml-panel.has-chart > .ml-cta { grid-row: 2; }
.ml-see { margin-top: 20px; font-size: 15px; color: var(--muted); }
.ml-see a { color: var(--blue); font-weight: 500; }
.mlc-disc { fill: var(--blue); stroke: #fff; stroke-width: 4; transition: transform .3s cubic-bezier(.2, .7, .3, 1); transform-box: fill-box; transform-origin: center; }
.mlc-num { fill: #fff; font-weight: 700; text-anchor: middle; pointer-events: none; }
.mlc-node:hover .mlc-disc, .mlc-node:focus-visible .mlc-disc { transform: scale(1.12); }
.mlc-node:focus-visible { outline: none; }
.mlc-node:focus-visible .mlc-disc { stroke: var(--blue); stroke-dasharray: 4 4; }
.ml-overview-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ml-ov {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ml-ov:hover { border-color: #c9cee0; box-shadow: var(--shadow); transform: translateY(-2px); }
.ml-ov-n { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.ml-ov-t { font-size: 16px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; color: var(--text); }
.ml-ov-d { font-size: 14px; line-height: 1.45; color: var(--muted); }
.ml-ov-moves { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ml-move {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 100px; border: 1px solid var(--line); background: var(--bg);
  font-size: 14px; color: var(--muted); transition: border-color .2s;
}
.ml-move strong { font-weight: 600; color: var(--text); }
.ml-move:hover { border-color: var(--text); }
.ml-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.ml-move.is-zone .ml-dot { background: var(--magenta); }

/* ---------- The level column ---------- */
.ml-column { position: relative; }
/* the rail: a quiet vertical line through every marker */
.ml-column::before {
  content: ""; position: absolute; left: 21px; top: 24px; bottom: 24px; width: 2px;
  background: linear-gradient(var(--line), var(--line)) 0 0 / 100% 100% no-repeat;
}
.ml-panel {
  position: relative; display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(0, 340px);
  column-gap: 40px; padding: 48px 0;
  scroll-margin-top: 88px;
}
.ml-panel + .ml-panel { border-top: 1px solid var(--line); }
/* the rule stops short of the rail so the line reads as continuous */
.ml-panel + .ml-panel { border-image: linear-gradient(90deg, transparent 0 84px, var(--line) 84px) 1; }

.ml-marker {
  position: relative; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 17px; font-weight: 600; line-height: 1;
  background: var(--bg); color: var(--blue); border: 2px solid var(--blue);
  transition: background-color .25s, color .25s, box-shadow .25s;
}
.ml-marker svg { width: 18px; height: 18px; }
.ml-panel.is-active .ml-marker,
.ml-panel:target .ml-marker { background: var(--blue); color: #fff; box-shadow: 0 0 0 6px var(--blue-50); }
.ml-panel.is-move .ml-marker { width: 32px; height: 32px; margin: 6px; border-width: 1.5px; font-size: 14px; }
.ml-panel.is-zone .ml-marker { color: var(--magenta); border-color: var(--magenta); }
.ml-panel.is-zone.is-active .ml-marker,
.ml-panel.is-zone:target .ml-marker { background: var(--magenta); color: #fff; box-shadow: 0 0 0 6px rgba(242, 5, 92, .1); }

.ml-kicker { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }
.ml-panel.is-zone .ml-kicker { color: var(--magenta); }
.ml-title { font-size: clamp(24px, 2.4vw, 30px); color: var(--text); }
.ml-sub { margin-top: 20px; font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ml-intro { margin-top: 12px; color: var(--muted); max-width: 620px; }

.ml-list { margin-top: 14px; display: grid; gap: 10px; max-width: 640px; }
.ml-list li { position: relative; padding-left: 22px; color: var(--text); }
.ml-list li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 2px;
  background: var(--blue-300);
}

/* named items (governance pieces, rollout pitfalls) */
.ml-items { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ml-item { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.ml-item strong { display: block; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.ml-item span { display: block; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ml-panel.is-move .ml-item { border-left: 3px solid var(--blue); }
.ml-panel.is-zone .ml-item { border-left: 3px solid var(--magenta); }

/* ---------- CTA card (right column, sticky within its panel) ---------- */
.ml-cta { align-self: stretch; }
.ml-cta-card {
  position: sticky; top: 104px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 24px; border-radius: var(--radius);
  background: var(--bg-subtle); border: 1px solid var(--line);
}
.ml-cta-q { font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.ml-cta-card p:not(.ml-cta-q) { font-size: 15px; line-height: 1.5; color: var(--muted); }
.ml-cta-card .btn { margin-top: 4px; }
.ml-panel.is-zone .ml-cta-card { border-top: 3px solid var(--magenta); }
.ml-panel.is-move .ml-cta-card { border-top: 3px solid var(--blue); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .ml-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ml-panel { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 280px); column-gap: 28px; }
  .ml-items { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .ml-panel { grid-template-columns: 44px minmax(0, 1fr); column-gap: 20px; row-gap: 24px; }
  .ml-cta { grid-column: 2; }
  .ml-panel.has-chart > .ml-cta { grid-row: 3; }
  .ml-cta-card { position: static; }
}
@media (max-width: 767px) {
  .mlc-text, .mlc-axis { display: none; }
  .ml-overview { padding: 40px 0; }
  .ml-overview-grid { grid-template-columns: 1fr; gap: 8px; }
  .ml-ov { padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 2px; }
  .ml-ov-n { grid-row: span 2; align-self: start; padding-top: 3px; }
  .ml-ov-d { font-size: 13px; }
  .ml-column::before { left: 15px; }
  .ml-panel { grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; padding: 36px 0; }
  .ml-panel + .ml-panel { border-image: linear-gradient(90deg, transparent 0 46px, var(--line) 46px) 1; }
  .ml-marker { width: 32px; height: 32px; font-size: 14px; }
  .ml-panel.is-move .ml-marker { width: 26px; height: 26px; margin: 3px; font-size: 12px; }
  .ml-marker svg { width: 14px; height: 14px; }
  .ml-cta-card { padding: 20px; }
  .ml-cta-card .btn { width: 100%; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .ml-ov, .ml-marker { transition: none; }
  .ml-ov:hover { transform: none; }
}

/* ---------- Topic form dialog ----------
   Carried over unchanged from the previous version of this page
   (maturity-model.css) so the HubSpot-backed form looks and works exactly as
   before. Scoped to #mm-maturity, which wraps only the dialog. */
html.mm-modal-open { overflow: hidden; }
#mm-maturity {
  --font-display: inherit;
  --ground:      var(--bg);
  --surface:     #fff;
  --surface-2:   var(--bg-subtle);
  --line-strong: #cfd4df;
  --ink-1: var(--text);
  --ink-2: var(--muted);
  --ink-3: var(--muted);
  --ink-4: #8a90a2;
  --accent:      var(--blue);
  --accent-ink:  var(--blue-600);
  --accent-soft: var(--blue-50);
  --accent-line: #c5cdf6;
  --danger:      var(--magenta);
  --shadow-lift: var(--shadow), 0 20px 40px -12px rgba(10, 15, 31, .18);
}
#mm-maturity .cta {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-1);
  width: min(620px, calc(100vw - 28px));
  max-height: min(88vh, 840px);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
#mm-maturity .cta[open] { display: flex; flex-direction: column; }
#mm-maturity .cta::backdrop { background: rgba(7, 11, 24, .55); }
#mm-maturity .cta-panel { overflow-y: auto; padding: clamp(20px, 3.4vw, 32px); }
#mm-maturity .cta-calendly { height: 680px; margin: 16px calc(-1 * clamp(20px, 3.4vw, 32px)) calc(-1 * clamp(20px, 3.4vw, 32px)); }
#mm-maturity .cta-x {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
}
#mm-maturity .cta-x:hover { background: var(--surface-2); color: var(--ink-1); }
#mm-maturity .cta-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-4);
}
#mm-maturity .cta-title {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--ink-1);

  padding-right: 30px;
}
#mm-maturity .cta-lede {
  margin: 9px 0 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}
#mm-maturity .cta-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;

  padding-right: 30px;
}
#mm-maturity .cta-head .cta-title { padding-right: 0; }
#mm-maturity .cta-head .cta-lede { margin: 0; }
#mm-maturity .cta-all {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;

  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
#mm-maturity .cta-all:hover { color: var(--accent-ink); text-decoration: underline; }
#mm-maturity .cta-all:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
#mm-maturity .cta-form { display: grid; gap: 22px; margin-top: 22px; }
#mm-maturity .cta-set { border: 0; margin: 0; padding: 0; }
#mm-maturity .cta-set legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}
#mm-maturity .cta-checks { display: grid; gap: 7px; }
#mm-maturity .cta-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
#mm-maturity .cta-check:hover { border-color: var(--line-strong); }
#mm-maturity .cta-check:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
#mm-maturity .cta-check input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
#mm-maturity .cta-check span { font-size: 0.875rem; line-height: 1.4; color: var(--ink-1); }
#mm-maturity .cta-err { margin: 9px 0 0; font-size: 13px; font-weight: 600; color: var(--danger); }
#mm-maturity .cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#mm-maturity .cta-field { display: grid; gap: 5px; }
#mm-maturity .cta-field--wide { grid-column: 1 / -1; }
#mm-maturity .cta-field > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}
#mm-maturity .cta-field > span i { font-style: normal; font-weight: 400; color: var(--ink-4); }
#mm-maturity .cta-field input, #mm-maturity .cta-field textarea {
  font: inherit;
  font-size: 0.9375rem;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--ground);
  color: var(--ink-1);
}
#mm-maturity .cta-field input:focus-visible, #mm-maturity .cta-field textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
#mm-maturity .cta-field textarea { resize: vertical; min-height: 68px; line-height: 1.45; }
#mm-maturity .cta-submit {
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  width: 100%;
  padding: 13px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--surface);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
#mm-maturity .cta-submit:hover { background: var(--accent-ink); }
#mm-maturity .cta-submit:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#mm-maturity .cta-legal {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
}
#mm-maturity .cta-legal a { color: inherit; text-decoration: underline; }
#mm-maturity .cta-legal a:hover { color: var(--ink-1); }
#mm-maturity .hs-legacy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
}
#mm-maturity .hs-legacy.is-shown {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  opacity: 1;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
#mm-maturity .hs-legacy fieldset { border: 0; margin: 0; padding: 0; max-width: none; }
#mm-maturity .hs-legacy fieldset.form-columns-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#mm-maturity .hs-legacy fieldset.form-columns-2 .hs-form-field { margin: 0; }
#mm-maturity .hs-legacy .hs_ai_level, #mm-maturity .hs-legacy .hs_ai_level_topics { display: none; }
#mm-maturity .hs-legacy .hs-form-required { display: none; }
#mm-maturity .hs-legacy .hs-form-field { display: grid; gap: 5px; margin: 0 0 12px; }
#mm-maturity .hs-legacy .hs-form-field > label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}
#mm-maturity .hs-legacy .hs-form-required { color: var(--danger); }
#mm-maturity .hs-legacy .hs-field-desc { display: none; }
#mm-maturity .hs-legacy input[type="text"], #mm-maturity .hs-legacy input[type="email"], #mm-maturity .hs-legacy input[type="tel"], #mm-maturity .hs-legacy input[type="number"], #mm-maturity .hs-legacy textarea, #mm-maturity .hs-legacy select {
  font: inherit;
  font-size: 0.9375rem;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--ground);
  color: var(--ink-1);
}
#mm-maturity .hs-legacy input:focus-visible, #mm-maturity .hs-legacy textarea:focus-visible, #mm-maturity .hs-legacy select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
#mm-maturity .hs-legacy textarea { resize: vertical; min-height: 68px; line-height: 1.45; }
#mm-maturity .hs-legacy .hs-button {
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  width: 100%;
  padding: 13px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--surface);
  cursor: pointer;
}
#mm-maturity .hs-legacy .hs-error-msg, #mm-maturity .hs-legacy .hs-main-font-element {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
}
#mm-maturity .hs-legacy ul.hs-error-msgs { list-style: none; margin: 6px 0 0; padding: 0; }
#mm-maturity .hs-legacy .hs_error_rollup { margin: 0 0 12px; }
#mm-maturity .cta-done-body { display: grid; gap: 16px; margin-top: 18px; }
#mm-maturity .cta-again {
  font: inherit;
  font-size: 13px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  justify-self: center;
}
#mm-maturity .cta-again:hover { color: var(--ink-1); }
@media (max-width: 520px) {
#mm-maturity .cta-grid { grid-template-columns: 1fr; }
}
