/* ScorX site components: Train + Measure design language.
   Built on css/tokens.css. Everything is prefixed x- so it can't clash with css/style.css.
   Mobile-first: base styles are for phones, min-width queries add the desktop layout.

   Where tokens.css is NOT loaded (blog posts: tokens.css would override the legacy
   --font-display and --shadow-card that style.css relies on), wrap the component in
   .x-scope, which re-declares the light-theme tokens locally. */

.x-scope {
  --canvas: #F4F7F8;
  --surface: #FFFFFF;
  --surface-tint: #EDF4F4;
  --inset: #E8EEF1;
  --line: #E2E9ED;
  --line-strong: #D2DCE2;
  --navy: #0F2A44;
  --navy-deep: #081B2E;
  --turq: #00D4C4;
  --turq-ink: #00897C;
  --turq-bright: #1FEDD8;
  --ink: #0F2A44;
  --mid: #51677A;
  --faint: #8DA0AF;
  --r-card: 22px;
  --r-inner: 14px;
  --r-pill: 100px;
  --shadow-card: 0 8px 24px -16px rgba(15, 42, 68, 0.14);
  --shadow-raised: 0 16px 36px -18px rgba(8, 27, 46, 0.45);
  --grad-turq: linear-gradient(160deg, var(--turq-bright), var(--turq));
  --font-display: 'Fraunces', Georgia, serif;
  --font-text: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-family: var(--font-text);
  color: var(--ink);
}

/* ---------- Layout ---------- */
.x-section {
  padding: 56px 0;
  position: relative;
}
.x-section--tint { background: var(--surface-tint); }
.x-section--tight { padding: 32px 0; }

.x-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
.x-container--narrow { max-width: 760px; }

/* ---------- Type ---------- */
.x-eyebrow {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--turq-ink);
  margin: 0 0 12px;
  line-height: 1.4;
}

.x-display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 8.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
  margin: 0 0 14px;
}
.x-display em {
  font-style: italic;
  font-weight: 500;
  color: var(--turq-ink);
}
.x-display--md {
  font-weight: 600;
  font-size: clamp(26px, 6vw, 38px);
  line-height: 1.12;
}

.x-lede {
  font-family: var(--font-text);
  font-size: clamp(16px, 4.2vw, 18px);
  line-height: 1.55;
  color: var(--mid);
  margin: 0 0 20px;
  max-width: 560px;
}

.x-text {
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.65;
  color: var(--mid);
  margin: 0 0 14px;
}

.x-link {
  color: var(--turq-ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
}
.x-link:hover { color: var(--turq-ink); border-bottom-color: currentColor; }

/* ---------- Buttons (pill) ---------- */
.x-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  font-family: var(--font-text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.x-btn:active { transform: scale(0.98); }
.x-btn:focus-visible { outline: 3px solid var(--turq-ink); outline-offset: 3px; }

.x-btn--primary {
  background: var(--grad-turq);
  color: #0F2A44;
  box-shadow: 0 10px 24px -12px rgba(0, 212, 196, 0.7);
}
.x-btn--primary:hover { color: #0F2A44; transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(0, 212, 196, 0.8); }

.x-btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.x-btn--ghost:hover { color: var(--ink); border-color: var(--turq-ink); background: var(--surface); }

.x-btn--block { width: 100%; }
.x-btn--sm { min-height: 44px; padding: 10px 20px; font-size: 15px; }

.x-btn-row { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
@media (min-width: 560px) {
  .x-btn-row { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* ---------- Card ---------- */
.x-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  color: var(--ink);
}
.x-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
  margin: 0 0 8px;
}
.x-card p { color: var(--mid); font-size: 15.5px; line-height: 1.6; margin: 0 0 12px; }
.x-card p:last-child { margin-bottom: 0; }

.x-card-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .x-card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .x-card-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .x-card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .x-card-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.x-step-num {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--turq-ink);
  margin-bottom: 10px;
}

/* ---------- Chips ---------- */
.x-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
a.x-chip:hover { color: var(--ink); border-color: var(--turq-ink); }
.x-chip--more { color: var(--turq-ink); border-style: dashed; }
.x-chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Quote ---------- */
.x-quote {
  margin: 0;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--turq);
  border-radius: var(--r-inner);
}
.x-quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 10px;
}
.x-quote footer, .x-quote cite {
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--mid);
}

/* ---------- Strip (social proof / trust rows) ---------- */
.x-strip {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.x-strip__inner {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: center;
}
.x-strip__meta {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}
@media (min-width: 720px) {
  .x-strip__inner { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (min-width: 720px) {
  .x-section { padding: 88px 0; }
  .x-container { padding: 0 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .x-btn { transition: none; }
  .x-btn:active, .x-btn--primary:hover { transform: none; }
}

/* ---------- Blog end-of-post CTA (_includes/card-cta.html) ---------- */
.x-card--cta { margin: 40px 0 8px; text-align: left; }
.x-card--cta .x-btn { margin-top: 6px; }
.x-card__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.x-card--cta .x-eyebrow { margin-bottom: 8px; }
.x-card--cta h3 { text-transform: none; letter-spacing: -0.01em; line-height: 1.25; }
.x-card--cta p { font-family: var(--font-text); color: var(--mid); line-height: 1.6; }
.x-card--cta p.x-eyebrow { color: var(--turq-ink); font-size: 11px; line-height: 1.4; }
.x-card--cta a.x-btn--primary, .x-card--cta a.x-btn--primary:hover { color: #0F2A44; }

/* =====================================================================
   WP-1 shared components (Nov 2026): .x-tier, .x-pillars, .x-shot
   Copy-paste markup lives in documentation/components-demo.html.
   All three work on pages that load tokens.css; in blog posts wrap them in .x-scope.
   ===================================================================== */

/* ---------- .x-tier: Free / Premium chip ----------
   Markup: <span class="x-tier x-tier--free">Free</span>
           <span class="x-tier x-tier--premium">Premium</span>
   Same shape as the pricing page badges (pill, uppercase, 800 weight).
   Contrast (AA, 4.5:1): free ink #00675C on #DDF4F1 is about 6:1 in light; #1FEDD8 on the dark tint is 9:1+.
   Premium: navy #0F2A44 on the turquoise gradient is 7:1+ in both themes. */
:root, .x-scope {
  --x-free-bg: #DDF4F1;
  --x-free-ink: #00675C;
  --x-free-line: rgba(0, 103, 92, 0.28);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --x-free-bg: rgba(0, 212, 196, 0.14);
    --x-free-ink: #1FEDD8;
    --x-free-line: rgba(31, 237, 216, 0.4);
  }
}
:root[data-theme="dark"] {
  --x-free-bg: rgba(0, 212, 196, 0.14);
  --x-free-ink: #1FEDD8;
  --x-free-line: rgba(31, 237, 216, 0.4);
}

.x-tier {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  padding: 3px 10px;
  border-radius: var(--r-pill, 100px);
  border: 1px solid transparent;
  font-family: var(--font-text, sans-serif);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.x-tier--free {
  background: var(--x-free-bg);
  color: var(--x-free-ink);
  border-color: var(--x-free-line);
}
.x-tier--premium {
  background: var(--grad-turq, linear-gradient(160deg, #1FEDD8, #00D4C4));
  color: #0F2A44;
}

/* ---------- .x-pillars: Score / Track / Train ----------
   Markup: <div class="x-pillars"> 3x <article class="x-pillar"> with
   .x-pillar__icon > img, h3.x-pillar__title, p.x-pillar__tag, ul.x-pillar__list, a.x-pillar__link.
   Stacks below 768px. */
.x-pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0;
  padding: 0;
}
@media (min-width: 768px) {
  .x-pillars { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
.x-pillar {
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #E2E9ED);
  border-radius: var(--r-card, 22px);
  box-shadow: var(--shadow-card, none);
  padding: 24px;
  color: var(--ink, #0F2A44);
}
.x-pillar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(165deg, #16385A, #081B2E);
}
.x-pillar__icon img { display: block; width: 32px; height: 32px; }
.x-pillar__title {
  font-family: var(--font-display, Georgia, serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink, #0F2A44);
  margin: 0 0 4px;
}
.x-pillar__tag {
  font-family: var(--font-text, sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--turq-ink, #00897C);
  margin: 0 0 14px;
}
.x-pillar__list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  flex: 1 1 auto;
}
.x-pillar__list li {
  position: relative;
  padding-left: 20px;
  margin: 0 0 8px;
  font-family: var(--font-text, sans-serif);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--mid, #51677A);
}
.x-pillar__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--turq, #00D4C4);
}
.x-pillar__link {
  align-self: flex-start;
  font-family: var(--font-text, sans-serif);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--turq-ink, #00897C);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
}
.x-pillar__link:hover { border-bottom-color: currentColor; }
.x-pillar__link:focus-visible { outline: 3px solid var(--turq-ink, #00897C); outline-offset: 3px; border-radius: 4px; }

/* ---------- .x-shot: screenshot figure ----------
   Markup: <figure class="x-shot x-shot--phone"> <div class="x-shot__frame"><img ... width height loading="lazy" alt=""></div>
           <figcaption class="x-shot__cap">...</figcaption></figure>
   Variants: default/--phone (portrait, max 280px) and --ipad (portrait tablet, max 420px).
   Always set width and height attributes to the image's real pixels so the page doesn't jump.
   Missing screenshot: use .x-shot__slot (no image) plus an <!-- ASSET NEEDED: ... --> comment. */
.x-shot {
  margin: 0 auto;
  width: 100%;
  max-width: 280px;
  text-align: center;
}
.x-shot--ipad { max-width: 420px; }
.x-shot__frame {
  background: #081B2E;
  border: 1px solid var(--line-strong, #D2DCE2);
  border-radius: 34px;
  padding: 8px;
  box-shadow: var(--shadow-raised, 0 16px 36px -18px rgba(8, 27, 46, 0.45));
  overflow: hidden;
}
.x-shot--ipad .x-shot__frame { border-radius: 24px; padding: 10px; }
.x-shot__frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
}
.x-shot--ipad .x-shot__frame img { border-radius: 14px; }
.x-shot__cap {
  margin-top: 12px;
  font-family: var(--font-text, sans-serif);
  font-size: 14px;
  line-height: 1.5;
  color: var(--mid, #51677A);
}
/* TEMPORARY: hide empty screenshot slots (and their orphaned captions) on the live site.
   The owner doesn't want dashed empty frames. Remove this rule once the ASSET NEEDED images land
   and replace each slot with a real .x-shot__frame image. */
.x-shot__slot { display: none !important; }
.x-shot:has(> .x-shot__slot) { display: none; }
/* Collapse layouts whose only media is a hidden slot, so no empty column or gap is left. */
.tr-media:has(.x-shot__slot):not(:has(.x-shot__frame)) { display: none; }
.tr-split:has(.x-shot__slot):not(:has(.x-shot__frame)) { grid-template-columns: 1fr; }
.walk-step__shot:has(.x-shot__slot):not(:has(.x-shot__frame)) { display: none; }
.walk-step:has(.x-shot__slot):not(:has(.x-shot__frame)) { grid-template-columns: minmax(0, 1fr); }
.feature-detail-image:has(.x-shot__slot):not(:has(.x-shot__frame)) { display: none; }
.feature-detail:has(.x-shot__slot):not(:has(.x-shot__frame)) { grid-template-columns: 1fr; }
.x-shot__slot {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1170 / 2532;
  padding: 16px;
  border: 2px dashed var(--line-strong, #D2DCE2);
  border-radius: 34px;
  font-family: var(--font-text, sans-serif);
  font-size: 14px;
  color: var(--mid, #51677A);
}

/* ---- Shared page blocks: section head, FAQ and closer (lifted from index.html and train.css in WP-9) ---- */
.x-section-head { margin-bottom: 26px; max-width: 680px; }
.x-section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.x-section-head .x-lede { margin-bottom: 0; }

/* FAQ */
.x-faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-inner); margin-bottom: 10px; }
.x-faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; font-size: 16px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.x-faq summary::-webkit-details-marker { display: none; }
.x-faq summary::after { content: '+'; color: var(--turq-ink); font-size: 22px; line-height: 1; font-weight: 600; }
.x-faq[open] summary::after { content: '\2212'; }
.x-faq summary:focus-visible { outline: 3px solid var(--turq-ink); outline-offset: 2px; border-radius: var(--r-inner); }
.x-faq__a { padding: 0 20px 18px; }
.x-faq__a p { margin: 0; }

/* Closer */
.closer { background: var(--grad-board); border-radius: var(--r-card); padding: 44px 22px; text-align: center; color: #F8F9FA; box-shadow: var(--shadow-raised); }
.closer .x-display { color: #F8F9FA; margin-left: auto; margin-right: auto; max-width: 760px; }
.closer__badge { display: inline-block; margin: 8px 0 22px; }
.closer__badge img { height: 56px; width: auto; display: block; }
.closer__trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; list-style: none; padding: 0; margin: 0; }
.closer__trust li::before { content: '\2713\00a0'; color: var(--turq-bright); }

