/* Curtin Tools chassis — shared styles for embedded quiz & kit builder.
   Everything scoped under .ct so it can't fight the theme. */
.ct {
  --bg: #faf6f3;
  --ink: #3c3835;
  --ink-soft: #6f6a65;
  --accent: #bc773f;
  --accent-soft: #f5ece5;
  --line: #e5e4df;
  --dark: #262625;
  --radius: 6px;
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Inter", -apple-system, "Segoe UI", sans-serif;
  --eo: cubic-bezier(.16, 1, .32, 1);
  --bounce: cubic-bezier(.33, 1, .68, 1);

  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  margin: 32px 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.ct * { box-sizing: border-box; margin: 0; padding: 0; }
.ct ::selection { background: var(--accent-soft); color: var(--ink); }

.ct .ct-brandrow { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ct .ct-brandmark { width: 24px; height: 24px; flex: 0 0 auto; }
.ct .ct-brandmark path, .ct .ct-brandmark circle { stroke: var(--accent); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ct .ct-brandmark .drop { fill: var(--accent); stroke: none; }
.ct .ct-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
}
.ct h3.ct-title {
  font-family: var(--font-display); font-weight: 500; line-height: 1.2;
  letter-spacing: -0.01em; font-size: clamp(22px, 4vw, 28px);
  margin: 0 0 10px 0; color: var(--ink); background: none; border: 0; padding: 0;
}
.ct h3.ct-title::before, .ct h3.ct-title::after { content: none; }
.ct .ct-lede { color: var(--ink-soft); margin-bottom: 22px; max-width: 52ch; font-size: 15px; }

/* hero — dark pattern-interrupt band on light article pages */
.ct .ct-hero {
  background: linear-gradient(158deg, #1F503F 0%, #022F2A 100%);
  border-radius: calc(var(--radius) + 2px);
  padding: 24px 22px 20px;
  margin: -6px 0 24px;
}
.ct .ct-hero .ct-brandrow { margin-bottom: 14px; }
.ct .ct-hero .ct-kicker { color: #E9DFD3; opacity: 0.85; }
.ct .ct-hero .ct-brandmark path, .ct .ct-hero .ct-brandmark circle { stroke: #F95E2C; }
.ct .ct-hero .ct-brandmark .drop { fill: #F95E2C; stroke: none; }
.ct .ct-hero .ct-title { color: #F4EDE4; margin-bottom: 8px; }
.ct .ct-hero .ct-lede { color: rgba(233, 223, 211, 0.82); margin-bottom: 14px; }
.ct .ct-effort {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em;
  color: #F95E2C; margin-bottom: 16px; text-transform: uppercase;
}
.ct .ct-btn.ct-btn-go {
  background: #F95E2C; color: #17130E; font-weight: 600; font-size: 16px;
  padding: 16px 28px; border-radius: var(--radius); width: 100%;
  justify-content: center;
}
.ct .ct-btn.ct-btn-go:hover { background: #ff6c3d; color: #17130E; }
.ct .ct-trust {
  display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none;
  margin-top: 14px; font-size: 12.5px; color: rgba(233, 223, 211, 0.72);
}
.ct .ct-trust li::before { content: "·"; color: #F95E2C; font-weight: 700; margin-right: 8px; }
.ct .ct-qtitle {
  font-family: var(--font-display); font-weight: 500; line-height: 1.2;
  font-size: clamp(19px, 3.4vw, 23px); margin-bottom: 4px; color: var(--ink);
}

/* progress */
.ct .ct-progress { margin-bottom: 20px; }
.ct .ct-progress-track { height: 3px; background: var(--line); border-radius: 99px; overflow: hidden; }
.ct .ct-progress-fill { height: 100%; background: var(--accent); width: 0%; transition: width 500ms var(--bounce); }
.ct .ct-progress-label {
  margin-top: 7px; font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft);
}

/* screens */
.ct .ct-screen { display: none; }
.ct .ct-screen.active { display: block; animation: ctScreenIn 320ms var(--eo); }
@keyframes ctScreenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* option / pick cards */
.ct .ct-options, .ct .ct-cards { display: grid; gap: 10px; margin-top: 18px; }
.ct .ct-option, .ct .ct-card {
  display: flex; align-items: flex-start; gap: 14px; width: 100%;
  padding: 14px 16px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-ui); font-size: 15px; color: var(--ink);
  transition: border-color 150ms var(--eo), background 150ms var(--eo);
}
.ct .ct-option:hover, .ct .ct-card:hover { border-color: var(--accent); background: #fffdfb; }
.ct .ct-option.pick { animation: ctPick 340ms var(--bounce); }
@keyframes ctPick { 0% { transform: scale(1); } 40% { transform: scale(0.985); } 100% { transform: scale(1); } }
.ct .ct-option:focus-visible, .ct .ct-card:focus-visible, .ct .ct-btn:focus-visible,
.ct .ct-back:focus-visible, .ct .ct-textlink:focus-visible, .ct .ct-clear:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.ct .ct-marker, .ct .ct-card-tick {
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px;
  border: 1.5px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; transition: border-color 150ms var(--eo), background 200ms var(--eo);
}
.ct .ct-option:hover .ct-marker, .ct .ct-card:hover .ct-card-tick { border-color: var(--accent); }
.ct .ct-marker svg, .ct .ct-card-tick svg { width: 10px; height: 10px; }
.ct .ct-marker svg path, .ct .ct-card-tick svg path {
  stroke: var(--accent); stroke-width: 3.4; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24; stroke-dashoffset: 24;
}
.ct .ct-option.chosen .ct-marker { border-color: var(--accent); background: var(--accent-soft); }
.ct .ct-option.chosen .ct-marker svg path { stroke-dashoffset: 0; transition: stroke-dashoffset 260ms var(--eo) 60ms; }
.ct .ct-card.selected { border: 1.5px dashed var(--accent); background: #fffdfb; }
.ct .ct-card.selected .ct-card-tick { border-color: var(--accent); background: var(--accent-soft); }
.ct .ct-card.selected .ct-card-tick svg path { stroke-dashoffset: 0; transition: stroke-dashoffset 260ms var(--eo) 60ms; }
.ct .ct-option-title, .ct .ct-card-name { display: block; font-weight: 600; }
.ct .ct-option-sub, .ct .ct-card-note { display: block; font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }

/* buttons */
.ct .ct-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--dark); color: #faf6f3;
  font-family: var(--font-ui); font-size: 14.5px; font-weight: 600;
  text-decoration: none; transition: background 150ms var(--eo);
}
.ct .ct-btn:hover { background: #171716; color: #faf6f3; }
.ct .ct-btn:active { animation: ctPick 300ms var(--bounce); }
.ct .ct-btn svg { width: 13px; height: 13px; }
.ct .ct-btn-accent { background: var(--accent); }
.ct .ct-btn-accent:hover { background: #a8663a; }
.ct .ct-btn-block { width: 100%; justify-content: center; margin-top: 14px; }
.ct .ct-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.ct .ct-btn[disabled]:hover { background: var(--dark); }

.ct .ct-back, .ct .ct-clear {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px; padding: 4px 0; border: 0; background: none; cursor: pointer;
  font-family: var(--font-ui); font-size: 13px; font-weight: 500;
  color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: transparent; transition: text-decoration-color 150ms var(--eo), color 150ms var(--eo);
}
.ct .ct-back:hover, .ct .ct-clear:hover { color: var(--ink); text-decoration-color: var(--ink); }
.ct .ct-back svg { width: 12px; height: 12px; }

/* analysis */
.ct .ct-analysis { margin-top: 26px; }
.ct .ct-analysis-step {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; font-size: 14.5px; color: var(--ink);
  opacity: 0; transform: translateY(8px);
  transition: opacity 320ms var(--eo), transform 320ms var(--eo);
  border-bottom: 1px solid var(--line);
}
.ct .ct-analysis-step.show { opacity: 1; transform: translateY(0); }
.ct .ct-analysis-tick {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft); display: grid; place-items: center;
  transform: scale(0.6); transition: transform 300ms var(--bounce);
}
.ct .ct-analysis-step.show .ct-analysis-tick { transform: scale(1); }
.ct .ct-analysis-tick svg { width: 11px; height: 11px; }
.ct .ct-analysis-tick svg path {
  stroke: var(--accent); stroke-width: 3; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24; stroke-dashoffset: 24;
}
.ct .ct-analysis-step.show .ct-analysis-tick svg path { stroke-dashoffset: 0; transition: stroke-dashoffset 300ms var(--eo) 120ms; }
.ct .ct-analysis-step small { color: var(--ink-soft); margin-left: auto; font-size: 12px; }

/* verdict */
.ct .ct-verdict { margin-top: 26px; display: none; }
.ct .ct-verdict.show { display: block; animation: ctVerdictIn 480ms var(--bounce); }
@keyframes ctVerdictIn { 0% { opacity: 0; transform: translateY(16px) scale(0.98); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
.ct .ct-verdict-type {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.ct .ct-verdict-name {
  font-family: var(--font-display); font-size: 22px; font-weight: 500;
  line-height: 1.25; margin-bottom: 12px;
}
.ct .ct-verdict-name .w { display: inline-block; opacity: 0; transform: translateY(6px); animation: ctWordIn 380ms var(--eo) forwards; }
@keyframes ctWordIn { to { opacity: 1; transform: translateY(0); } }
.ct .ct-why { margin: 0 0 18px 0; padding: 0; list-style: none; }
.ct .ct-why li {
  position: relative; padding: 6px 0 6px 22px; font-size: 14px; color: var(--ink);
  border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(6px);
  animation: ctWordIn 380ms var(--eo) forwards;
}
.ct .ct-why li:last-child { border-bottom: 0; }
.ct .ct-why li::before {
  content: ""; position: absolute; left: 2px; top: 13px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.ct .ct-also { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-soft); }
.ct .ct-also strong { color: var(--ink); font-weight: 600; }
.ct .ct-companion {
  margin-top: 14px; background: var(--accent-soft); border-radius: var(--radius);
  padding: 14px 16px; font-size: 13.5px;
  opacity: 0; transform: translateY(6px);
  animation: ctWordIn 420ms var(--eo) 260ms forwards;
}
.ct .ct-companion strong { font-weight: 600; }

/* kit zones + panel */
.ct .ct-zone { margin-bottom: 26px; }
.ct .ct-zone-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.ct .ct-zone-num { font-family: var(--font-display); font-size: 14px; color: var(--accent); font-weight: 600; }
.ct .ct-zone-title { font-family: var(--font-display); font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.ct .ct-zone-hint { font-size: 13px; color: var(--ink-soft); }
.ct .ct-kit {
  margin-top: 26px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 20px;
}
.ct .ct-kit-title { font-family: var(--font-display); font-size: 18px; font-weight: 500; margin-bottom: 2px; }
.ct .ct-kit-count { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 10px; }
.ct .ct-kit-list { list-style: none; }
.ct .ct-kit-item { padding: 10px 0; border-bottom: 1px solid var(--line); animation: ctScreenIn 250ms var(--eo); }
.ct .ct-kit-item-name { font-size: 14px; font-weight: 600; line-height: 1.4; }
.ct .ct-kit-item-zone { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.08em; }
.ct .ct-kit-empty { padding: 12px 0; font-size: 13.5px; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.ct .ct-kit-free { margin: 14px 0; padding: 12px 14px; background: var(--accent-soft); border-radius: var(--radius); font-size: 13px; }
.ct .ct-kit-free strong { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.ct .ct-kit-free ul { margin-left: 18px; }
.ct .ct-kit-free li { padding: 2px 0; }
.ct .ct-copied { margin-top: 8px; font-size: 12px; color: var(--accent); font-weight: 600; opacity: 0; transition: opacity 200ms; }
.ct .ct-copied.show { opacity: 1; }
.ct .ct-clear { margin-top: 10px; }

.ct .ct-textlink {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--accent); font-weight: 600; font-size: 13px;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: transparent; transition: text-decoration-color 150ms var(--eo);
}
.ct .ct-textlink:hover { text-decoration-color: var(--accent); }
.ct .ct-textlink svg { width: 11px; height: 11px; }

.ct .ct-disclosure { margin-top: 16px; font-size: 12px; line-height: 1.55; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  .ct *, .ct *::before, .ct *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .ct .ct-verdict-name .w, .ct .ct-why li, .ct .ct-companion { opacity: 1; transform: none; animation: none; }
}

/* ══════ dark theme — follows the host site's header colour (set as --ct-bg by chassis.js) ══════ */
.ct.ct-dark {
  --bg: var(--ct-bg, #0d2b26);
  --ink: #F4EDE4;
  --ink-soft: rgba(244, 237, 228, 0.68);
  --accent: #F95E2C;
  --accent-soft: rgba(249, 94, 44, 0.18);
  --line: rgba(244, 237, 228, 0.16);
  --dark: #F4EDE4;
  border-color: rgba(244, 237, 228, 0.12);
}
.ct.ct-dark .ct-hero { background: rgba(0, 0, 0, 0.22); }
.ct.ct-dark .ct-option, .ct.ct-dark .ct-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  color: var(--ink);
}
.ct.ct-dark .ct-option:hover, .ct.ct-dark .ct-card:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--accent); }
.ct.ct-dark .ct-card.selected { background: rgba(255, 255, 255, 0.08); }
.ct.ct-dark .ct-kit { background: rgba(255, 255, 255, 0.05); border-color: var(--line); }
.ct.ct-dark .ct-btn { background: var(--accent); color: #17130E; }
.ct.ct-dark .ct-btn:hover { background: #ff6c3d; color: #17130E; }
.ct.ct-dark .ct-btn-accent { background: var(--accent); }
.ct.ct-dark .ct-btn-accent:hover { background: #ff6c3d; }
.ct.ct-dark .ct-btn[disabled]:hover { background: var(--accent); }
.ct.ct-dark .ct-back:hover, .ct.ct-dark .ct-clear:hover { color: var(--ink); text-decoration-color: var(--ink); }
.ct.ct-dark .ct-also strong { color: var(--ink); }
.ct.ct-dark ::selection { background: rgba(249, 94, 44, 0.35); color: var(--ink); }
