/* ==========================================================================
   IMATNOTE — design system layer (v2)
   ==========================================================================

   Purpose
   -------
   The original `itm-*` system lives in the Customizer's Additional CSS
   (131 classes, ~24 KB). It is NOT replaced here: existing pages keep
   working exactly as they do today. This file adds a documented, reusable
   layer on top of it for the Phase 1 commercial pages — Home, Pricing,
   Product, FAQ, Contact — and gives later pages a single place to migrate
   into.

   Load order note: the Customizer CSS is printed after theme styles, so
   anything here that must beat an older `itm-*` rule is namespaced under
   `.itmx` rather than fighting it with `!important`. New markup opts in by
   putting `itmx` on its wrapper.

   Design intent
   -------------
   White ground, deep navy ink, generous vertical rhythm, hairline rules
   instead of stacked cards. The brand blue is an accent, not a texture:
   it appears on links, on the small labels above a heading, and on the
   primary CTA. Buttons are deliberately scarce — three per page at most.
   ========================================================================== */

.itmx {
  /* --- ink ------------------------------------------------------------- */
  --x-ink: #0B1524;          /* headings, primary text */
  --x-ink-2: #3D4A5C;        /* body copy */
  --x-ink-3: #6B7787;        /* meta, captions, muted */

  /* --- ground ---------------------------------------------------------- */
  --x-paper: #FFFFFF;
  --x-paper-2: #FAFBFC;      /* the only alternate band; used sparingly */

  /* --- rules ----------------------------------------------------------- */
  --x-line: #E8EBEF;         /* hairline; the main structural device */
  --x-line-2: #D6DBE2;       /* button outline, slightly stronger */

  /* --- brand ----------------------------------------------------------- */
  /* Deep blue rather than the brighter #2563EB used in the older itm- rules.
     The value is pulled towards the header's own button colour (#025BAC) so
     a page CTA and the header CTA read as the same brand rather than two
     different blues, and darkened from there so it sits closer to navy.
     8.4:1 against white, so it passes AA both as a text colour and as a
     button fill with white text. */
  --x-accent: #0A4E93;
  --x-accent-ink: #063761;   /* hover / pressed */
  --x-accent-soft: #EDF4FB;  /* tint for the row the visitor selected */

  /* --- geometry -------------------------------------------------------- */
  --x-radius: 10px;
  --x-radius-sm: 8px;
  --x-wrap: 1080px;
  --x-gutter: 40px;

  /* --- rhythm ---------------------------------------------------------- */
  --x-section: 112px;        /* vertical padding between major blocks */
  --x-section-sm: 80px;

  color: var(--x-ink);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 640px) {
  .itmx {
    --x-gutter: 22px;
    --x-section: 72px;
    --x-section-sm: 56px;
  }
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.itmx .x-wrap {
  max-width: var(--x-wrap);
  margin: 0 auto;
  padding: 0 var(--x-gutter);
}

.itmx .x-block {
  padding: var(--x-section) 0;
  border-bottom: 1px solid var(--x-line);
}

.itmx .x-block--tight { padding: var(--x-section-sm) 0; }
.itmx .x-block--plain { border-bottom: 0; }
.itmx .x-block--alt { background: var(--x-paper-2); }

/* The theme runs a transparent header: its row is absolutely positioned and
   painted over the top of the page, so page content begins at y=0 and the
   first block has to clear the header itself. Blocksy publishes the current
   height as `--theme-header-height` and keeps it up to date across
   breakpoints and the sticky/shrink state, so we lean on that rather than
   hard-coding a number. The fallback matches the desktop default. */
.itmx .x-hero {
  padding-top: calc(var(--theme-header-height, 105px) + 76px);
  padding-bottom: 92px;
  border-bottom: 1px solid var(--x-line);
}
.itmx .x-hero--sub { padding-bottom: 64px; }

@media (max-width: 640px) {
  .itmx .x-hero {
    padding-top: calc(var(--theme-header-height, 105px) + 40px);
    padding-bottom: 60px;
  }
  .itmx .x-hero--sub { padding-bottom: 48px; }
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

.itmx .x-eyebrow {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--x-ink-3);
  margin: 0;
}

.itmx .x-h1,
.itmx .x-h2,
.itmx .x-h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--x-ink);
  text-wrap: balance;
}

.itmx .x-h1 { font-size: clamp(2.6rem, 5.6vw, 4.1rem); }
/* Section pages carry the same heading level as Home but should not shout
   as loudly as the front page does. */
.itmx .x-h1--sub { font-size: clamp(2.2rem, 4.4vw, 3.2rem); }
.itmx .x-h2 { font-size: clamp(1.85rem, 3.3vw, 2.6rem); }
.itmx .x-h3 { font-size: 1.06rem; letter-spacing: -0.02em; font-weight: 500; }

.itmx .x-lead {
  margin: 18px 0 0;
  font-size: 1.09rem;
  line-height: 1.55;
  color: var(--x-ink-2);
  max-width: 54ch;
  letter-spacing: -0.008em;
}

.itmx .x-note {
  margin: 0;
  font-size: .875rem;
  color: var(--x-ink-3);
  line-height: 1.6;
}

.itmx .x-head { max-width: 62ch; }
.itmx .x-head .x-h2 { margin-top: 16px; }

/* --------------------------------------------------------------------------
   Buttons — used sparingly. Three per page is the working ceiling.
   -------------------------------------------------------------------------- */

.itmx .x-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--x-radius-sm);
  padding: 13px 24px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.itmx .x-btn--primary {
  background: var(--x-accent);
  color: #FFFFFF !important;
  border-color: var(--x-accent);
}
.itmx .x-btn--primary:hover,
.itmx .x-btn--primary:focus-visible {
  background: var(--x-accent-ink);
  border-color: var(--x-accent-ink);
}

.itmx .x-btn--quiet {
  background: transparent;
  color: var(--x-ink);
  border-color: var(--x-line-2);
}
.itmx .x-btn--quiet:hover,
.itmx .x-btn--quiet:focus-visible { border-color: var(--x-ink-3); }

.itmx .x-btn:focus-visible {
  outline: 2px solid var(--x-accent);
  outline-offset: 3px;
}

.itmx .x-cta-row {
  display: flex;
  gap: 12px;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Rule-separated grids — the card replacement.
   Structure comes from 1px lines and whitespace, not from boxes.
   -------------------------------------------------------------------------- */

.itmx .x-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 56px;
  border-top: 1px solid var(--x-line);
}
.itmx .x-steps > * {
  padding: 30px 26px 30px 0;
  border-right: 1px solid var(--x-line);
}
.itmx .x-steps > *:last-child { border-right: 0; }
.itmx .x-steps > * + * { padding-left: 26px; }

.itmx .x-step-n {
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--x-accent);
}
.itmx .x-steps .x-h3 { margin-top: 13px; }
.itmx .x-steps p {
  margin: 9px 0 0;
  font-size: 1rem;
  color: var(--x-ink-2);
  line-height: 1.55;
}

@media (max-width: 860px) {
  .itmx .x-steps { grid-template-columns: 1fr 1fr; }
  .itmx .x-steps > * {
    border-right: 0;
    border-bottom: 1px solid var(--x-line);
    padding: 24px 0;
  }
  .itmx .x-steps > * + * { padding-left: 0; }
}
@media (max-width: 560px) {
  .itmx .x-steps { grid-template-columns: 1fr; }
}

/* Definition rows: label left, explanation right. */
.itmx .x-rows { margin-top: 52px; border-top: 1px solid var(--x-line); }
.itmx .x-row {
  display: grid;
  grid-template-columns: 2.1fr 3fr;
  gap: 40px;
  padding: 22px 0;
  border-bottom: 1px solid var(--x-line);
  align-items: baseline;
}
.itmx .x-row p { margin: 0; font-size: 1rem; color: var(--x-ink-2); }
@media (max-width: 700px) {
  .itmx .x-row { grid-template-columns: 1fr; gap: 6px; }
}

/* Selectable option lists (preparation tracks, billing context).
   `display: grid` rather than `block` is load-bearing: the audience-routing
   rules move the visitor's matching option to the top with CSS `order`, and
   `order` only applies to grid or flex children. Changing these containers
   back to `block` would silently disable that personalisation. */
.itmx .x-list {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 52px;
  border-top: 1px solid var(--x-line);
}
.itmx .x-item {
  display: grid;
  grid-template-columns: 2.1fr 3fr auto;
  gap: 10px 40px;
  align-items: baseline;
  padding: 24px 18px 24px 0;
  border-bottom: 1px solid var(--x-line);
}
.itmx .x-item p { margin: 0; font-size: 1rem; color: var(--x-ink-2); line-height: 1.55; }
.itmx .x-item-covers { color: var(--x-ink-3); font-size: .9rem; margin-top: 5px; }
.itmx .x-item-link {
  font-size: .92rem;
  font-weight: 500;
  color: var(--x-accent);
  text-decoration: none;
  white-space: nowrap;
}
.itmx .x-item-link:hover,
.itmx .x-item-link:focus-visible { text-decoration: underline; }
@media (max-width: 780px) {
  .itmx .x-item { grid-template-columns: 1fr; gap: 6px; }
}

/* Three rule-separated columns. Same grid requirement as .x-list above. */
.itmx .x-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 48px;
  border-top: 1px solid var(--x-line);
}
.itmx .x-trio > * {
  padding: 26px 26px 26px 0;
  border-right: 1px solid var(--x-line);
}
.itmx .x-trio > *:last-child { border-right: 0; }
.itmx .x-trio > * + * { padding-left: 26px; }
.itmx .x-trio p { margin: 9px 0 0; font-size: 1rem; color: var(--x-ink-2); line-height: 1.55; }
@media (max-width: 780px) {
  .itmx .x-trio { grid-template-columns: 1fr; }
  .itmx .x-trio > * {
    border-right: 0;
    border-bottom: 1px solid var(--x-line);
    padding: 22px 0;
  }
  .itmx .x-trio > * + * { padding-left: 0; }
  .itmx .x-trio > *:last-child { border-bottom: 0; }
}

/* Applied by the audience-routing rules to the option the visitor told us
   applies to them, alongside moving it to the top of its list. It marks that
   row; the other options stay visible and readable — the rules never hide
   them. Kept to a tint plus an edge rule so nothing shifts position. */
.itmx .is-selected-track,
.itmx .is-selected-region {
  background: var(--x-accent-soft);
  box-shadow: inset 3px 0 0 var(--x-accent);
}

/* Two-column feature list, still rule-separated. */
.itmx .x-pairs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 60px;
  margin-top: 48px;
}
.itmx .x-pair {
  padding: 22px 0;
  border-top: 1px solid var(--x-line);
}
.itmx .x-pair p {
  margin: 8px 0 0;
  font-size: 1rem;
  color: var(--x-ink-2);
  line-height: 1.55;
}
@media (max-width: 760px) {
  .itmx .x-pairs { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Side-by-side comparison. Two columns separated by a rule, the left one
   deliberately quieter because it describes what we are not.
   -------------------------------------------------------------------------- */

.itmx .x-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  margin-top: 48px;
  border-top: 1px solid var(--x-line);
}
.itmx .x-two > * { padding: 26px 0; }
.itmx .x-two > *:first-child { padding-right: 48px; border-right: 1px solid var(--x-line); }
.itmx .x-two--muted > *:first-child { color: var(--x-ink-3); }
.itmx .x-two ul { margin: 14px 0 0; padding: 0; list-style: none; }
.itmx .x-two li {
  position: relative;
  padding-left: 18px;
  margin: 0 0 9px;
  font-size: 1rem;
  line-height: 1.5;
  color: inherit;
}
.itmx .x-two li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .45;
}
@media (max-width: 760px) {
  .itmx .x-two { grid-template-columns: 1fr; }
  .itmx .x-two > *:first-child {
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--x-line);
  }
}

/* --------------------------------------------------------------------------
   Numbered vertical flow, for a sequence too long for the four-across steps.
   -------------------------------------------------------------------------- */

.itmx .x-flow {
  list-style: none;
  counter-reset: xf;
  margin: 44px 0 0;
  padding: 0;
  border-top: 1px solid var(--x-line);
  max-width: 720px;
}
.itmx .x-flow li {
  counter-increment: xf;
  position: relative;
  padding: 18px 0 18px 44px;
  border-bottom: 1px solid var(--x-line);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--x-ink-2);
  margin: 0;
}
.itmx .x-flow li::before {
  content: counter(xf);
  position: absolute;
  left: 0;
  top: 18px;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--x-accent);
}
.itmx .x-flow strong { color: var(--x-ink); font-weight: 500; }

/* --------------------------------------------------------------------------
   Redacted layout preview. Shows the shape of a study card without showing
   any of its text — the material is paid, and no sample is published.
   -------------------------------------------------------------------------- */

.itmx .x-mock {
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius);
  background: var(--x-paper);
  padding: 22px;
  max-width: 420px;
}
.itmx .x-mock-crumb {
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--x-accent);
  font-weight: 500;
  margin-bottom: 16px;
}
.itmx .x-mock-sec { margin-bottom: 16px; }
.itmx .x-mock-lbl {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--x-ink-3);
  margin-bottom: 7px;
}
.itmx .x-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--x-line);
  margin-bottom: 6px;
}
.itmx .x-bar.w95 { width: 95%; }
.itmx .x-bar.w80 { width: 80%; }
.itmx .x-bar.w70 { width: 70%; }
.itmx .x-bar.w55 { width: 55%; }
.itmx .x-bar.w40 { width: 40%; }
.itmx .x-mock-cap {
  font-size: .875rem;
  color: var(--x-ink-3);
  margin: 14px 0 0;
}

/* Two-up: the mock beside the explanation. */
.itmx .x-split {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: 48px;
  margin-top: 48px;
  align-items: start;
}
@media (max-width: 860px) {
  .itmx .x-split { grid-template-columns: 1fr; gap: 32px; }
}

/* A quiet framed aside for a caveat that must be read but not shouted. */
.itmx .x-callout {
  margin-top: 34px;
  padding: 18px 20px;
  border: 1px solid var(--x-line);
  border-left: 3px solid var(--x-accent);
  border-radius: var(--x-radius-sm);
  background: var(--x-paper-2);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--x-ink-2);
  max-width: 74ch;
}
.itmx .x-callout p { margin: 0; }

/* --------------------------------------------------------------------------
   Pricing — one bordered container, internal hairlines. Not three cards.
   -------------------------------------------------------------------------- */

.itmx .x-price {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 52px;
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius);
  overflow: hidden;
}
.itmx .x-price-col {
  padding: 34px 28px;
  border-right: 1px solid var(--x-line);
}
.itmx .x-price-col:last-child { border-right: 0; }
.itmx .x-price-col--feature { background: var(--x-paper-2); }

.itmx .x-price-name { font-size: .93rem; font-weight: 500; }
.itmx .x-price-tag {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin-top: 14px;
}
.itmx .x-price-per { font-size: .87rem; color: var(--x-ink-3); margin-top: 5px; }
.itmx .x-price-desc {
  margin-top: 16px;
  font-size: .95rem;
  color: var(--x-ink-2);
  line-height: 1.55;
  min-height: 3.4em;
}
.itmx .x-price-col .x-btn { margin-top: 22px; width: 100%; }

.itmx .x-price-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--x-accent);
  background: var(--x-accent-soft);
  vertical-align: 1px;
}

/* Cost per month, so the difference between the three periods is legible
   without the reader doing the arithmetic. */
.itmx .x-price-rate {
  margin-top: 10px;
  font-size: .82rem;
  color: var(--x-ink-3);
}

@media (max-width: 820px) {
  .itmx .x-price { grid-template-columns: 1fr; }
  .itmx .x-price-col { border-right: 0; border-bottom: 1px solid var(--x-line); }
  .itmx .x-price-col:last-child { border-bottom: 0; }
}

/* --------------------------------------------------------------------------
   Compact price summary, for pages that describe one track. These pages must
   never become a second place where prices are maintained, so they list the
   catalogue and hand off to /pricing/ rather than restating terms.
   Rendered by [itm_pricing_summary]; styled outside .itmx so the older
   itm-* pages can use it before they are migrated.
   -------------------------------------------------------------------------- */

.itm-pricing-summary {
  margin: 24px 0 0;
  max-width: 640px;
}
.itm-pricing-summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #E8EBEF;
}
.itm-pricing-summary-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid #E8EBEF;
  margin: 0;
}
.itm-pricing-summary .itm-ps-name {
  font-size: 1rem;
  color: #0B1524;
}
.itm-pricing-summary .itm-ps-amount {
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0B1524;
  white-space: nowrap;
}
.itm-pricing-summary-note {
  margin: 16px 0 0;
  font-size: .875rem;
  line-height: 1.6;
  color: #6B7787;
}
.itm-pricing-summary-link {
  margin: 12px 0 0;
  font-size: 1rem;
}
.itm-pricing-summary-link a {
  color: #0A4E93;
  font-weight: 500;
  text-decoration: none;
}
.itm-pricing-summary-link a:hover,
.itm-pricing-summary-link a:focus-visible { text-decoration: underline; }

/* --------------------------------------------------------------------------
   FAQ — native <details>, no JavaScript.
   -------------------------------------------------------------------------- */

.itmx .x-faq { margin-top: 48px; border-top: 1px solid var(--x-line); max-width: 74ch; }
.itmx .x-faq details { border-bottom: 1px solid var(--x-line); }
.itmx .x-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 21px 0;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.itmx .x-faq summary::-webkit-details-marker { display: none; }
.itmx .x-faq summary:focus-visible { outline: 2px solid var(--x-accent); outline-offset: 3px; }
.itmx .x-faq .x-pm { color: var(--x-ink-3); font-weight: 400; transition: transform .15s ease; }
.itmx .x-faq details[open] .x-pm { transform: rotate(45deg); }
.itmx .x-faq p {
  margin: 0;
  padding: 0 0 21px;
  font-size: 1rem;
  color: var(--x-ink-2);
  line-height: 1.62;
  max-width: 64ch;
}

/* --------------------------------------------------------------------------
   Quiet trust strip — statements of approach, never invented numbers.
   -------------------------------------------------------------------------- */

.itmx .x-strip { display: grid; grid-template-columns: repeat(4, 1fr); }
.itmx .x-strip > * {
  padding: 24px 0;
  font-size: .88rem;
  color: var(--x-ink-2);
  font-weight: 450;
}
.itmx .x-strip span {
  display: block;
  color: var(--x-ink-3);
  font-size: .81rem;
  margin-top: 3px;
  font-weight: 400;
}
@media (max-width: 760px) {
  .itmx .x-strip { grid-template-columns: 1fr 1fr; gap: 0 24px; }
}

/* --------------------------------------------------------------------------
   Closing band
   -------------------------------------------------------------------------- */

.itmx .x-close { padding: var(--x-section) 0; text-align: center; }
.itmx .x-close .x-h2 { max-width: 20ch; margin: 0 auto; }
.itmx .x-close .x-cta-row { justify-content: center; }

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .itmx * { transition: none !important; animation: none !important; }
}
