/* ============================================================
   TraceMind Docs
   Restrained editorial design system.
   One accent (logo steel), cool gray scale, no decorative icons.
   ============================================================ */

:root {
  --tm-steel: 148, 165, 170;
  --tm-accent: #6e868c;
  --tm-accent-hi: #c5d3d6;
  --tm-accent-dim: rgba(var(--tm-steel), 0.16);
  --tm-accent-line: rgba(var(--tm-steel), 0.5);
  --tm-accent-fill: #9aafb3;
  --tm-accent-fill-hover: #d5e0e2;
  --tm-ink: #121618;

  --tm-radius: 10px;
  --tm-radius-lg: 14px;
  --tm-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tm-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: #15191b;
  --md-default-fg-color: rgb(232, 236, 238);
  --md-default-fg-color--light: rgba(196, 206, 210, 0.74);
  --md-default-fg-color--lighter: rgba(148, 165, 170, 0.55);
  --md-default-fg-color--lightest: rgba(148, 165, 170, 0.26);

  --md-primary-fg-color: #15191b;
  --md-primary-bg-color: rgb(232, 236, 238);
  --md-accent-fg-color: var(--tm-accent-hi);
  --md-typeset-a-color: var(--tm-accent-hi);

  --md-code-bg-color: rgba(0, 0, 0, 0.3);
  --md-code-fg-color: rgb(214, 221, 232);

  --tm-bg: #15191b;
  --tm-surface: rgba(255, 255, 255, 0.032);
  --tm-surface-2: rgba(255, 255, 255, 0.058);
  --tm-border: rgba(255, 255, 255, 0.085);
  --tm-border-2: rgba(255, 255, 255, 0.15);
  --tm-text: rgb(235, 238, 245);
  --tm-dim: rgba(200, 208, 220, 0.74);
  --tm-muted: rgba(150, 162, 178, 0.8);
}

/* ---------- Base ---------- */
.md-grid {
  max-width: 64rem;
}

body {
  background: var(--tm-bg);
}

html {
  scroll-behavior: smooth;
}

.md-typeset {
  font-feature-settings: "liga" 1, "calt" 1;
  font-size: 0.79rem;
  line-height: 1.7;
}

/* ============================================================
   AMBIENT BACKGROUND: fine grid + soft glow
   Masked so it never sits behind body copy at full strength.
   ============================================================ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.038) 1px, transparent 1px);
  background-size: 58px 58px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 95% 60% at 50% 2%, #000 0%, rgba(0, 0, 0, 0.4) 48%, transparent 80%);
  mask-image: radial-gradient(ellipse 95% 60% at 50% 2%, #000 0%, rgba(0, 0, 0, 0.4) 48%, transparent 80%);
}

body::after {
  content: "";
  position: fixed;
  top: -14rem;
  left: 50%;
  width: 62rem;
  height: 40rem;
  margin-left: -31rem;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(var(--tm-steel), 0.14), rgba(var(--tm-steel), 0.05) 40%, transparent 68%);
}

.md-header,
.md-tabs,
.md-container,
.md-main,
.md-footer {
  position: relative;
  z-index: 1;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  border: 3px solid var(--tm-bg);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* ---------- Header and tabs ---------- */
.md-header {
  background: rgba(16, 20, 22, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--tm-border);
  box-shadow: none;
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  width: 1.5rem;
  height: 1.5rem;
}

.md-header__title {
  font-weight: 650;
  letter-spacing: -0.012em;
  font-size: 0.86rem;
}

.md-tabs {
  background: transparent;
  border-bottom: 1px solid var(--tm-border);
}

.md-tabs__link {
  opacity: 0.68;
  font-weight: 550;
  font-size: 0.72rem;
  transition: opacity 0.2s var(--tm-ease), color 0.2s var(--tm-ease);
}
.md-tabs__link:hover {
  opacity: 1;
}
.md-tabs__link--active {
  opacity: 1;
  color: var(--tm-text);
}

body.tm-home .md-tabs {
  display: none;
}
body.tm-home .md-container {
  overflow-x: clip;
}
body.tm-home .md-main__inner {
  margin-top: 0;
}
body.tm-home .md-content__inner {
  padding-top: 0;
  margin-top: 0;
}

/* ---------- Typography ---------- */
.md-typeset h1 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--tm-text);
  font-size: 1.9rem;
  line-height: 1.15;
}

.md-typeset h2 {
  font-weight: 650;
  letter-spacing: -0.015em;
  font-size: 1.22rem;
  margin: 3.2rem 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--tm-border);
}

.md-typeset h3 {
  font-weight: 620;
  letter-spacing: -0.01em;
  font-size: 0.98rem;
  margin-top: 2rem;
}

.md-typeset h4 {
  font-weight: 620;
  font-size: 0.88rem;
}

.md-typeset h1 + p,
.tm-lead {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--tm-dim);
}

.md-typeset hr {
  border: none;
  height: 1px;
  background: var(--tm-border);
  margin: 2.6rem 0;
}

.md-typeset blockquote {
  border-left: 2px solid var(--tm-accent-line);
  background: transparent;
  color: var(--tm-dim);
  margin-left: 0;
  padding-left: 1.1rem;
}

.md-nav__link--active,
.md-nav__link:hover {
  color: var(--tm-accent-hi);
}

/* ============================================================
   LANDING HERO
   Cinematic splash over the showcase video, then the intro.
   ============================================================ */
.tm-hero {
  position: relative;
  margin: 0 0 3.6rem;
  padding: 0;
  border-bottom: none;
}

.tm-splash {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  height: clamp(320px, 34vw, 440px);
  background: #0c1012;
}
.md-typeset .tm-splash__video,
.tm-splash__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center 28%;
}
.tm-splash__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 62% 78% at 50% 46%, rgba(8, 12, 14, 0.68), rgba(8, 12, 14, 0.22) 58%, rgba(8, 12, 14, 0.34) 100%),
    linear-gradient(180deg, rgba(8, 12, 14, 0.16) 0%, rgba(8, 12, 14, 0.04) 70%, var(--tm-bg) 100%);
}
.tm-splash__lockup {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.25rem 1.25rem 1.8rem;
}
.tm-splash__logo {
  width: clamp(78px, 9vw, 112px);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.65));
}
.md-typeset .tm-splash__title {
  margin: 0.4rem 0 0.28rem;
  padding: 0;
  border: none;
  font-size: clamp(2.4rem, 5.2vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  color: #f5f7f8;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.65);
}
.tm-splash__tag {
  margin: 0;
  font-size: clamp(0.92rem, 1.6vw, 1.22rem);
  font-weight: 500;
  letter-spacing: 0.012em;
  color: rgba(214, 222, 226, 0.92);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7);
}

.tm-intro {
  max-width: 46rem;
  margin: 2.4rem 0 0;
}
.md-typeset .tm-intro__title {
  margin: 0 0 0.85rem;
  padding: 0;
  border: none;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--tm-text);
}
.tm-intro__text {
  margin: 0 0 1.5rem;
  max-width: 58ch;
  font-size: 0.95rem;
  line-height: 1.68;
  color: var(--tm-dim);
}

.tm-eyebrow {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tm-muted);
  margin-bottom: 1.3rem;
  position: relative;
  padding-left: 2.2rem;
}
.tm-eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.6rem;
  height: 1px;
  background: var(--tm-accent);
}

.tm-accent {
  color: var(--tm-accent-hi);
}

/* Figures used as component shells keep block layout and left aligned captions */
.md-typeset figure.tm-frame,
.md-typeset figure.tm-guide__media,
.md-typeset figure.tm-video {
  display: block;
  margin: 1.5rem 0 2rem;
  max-width: none;
  text-align: left;
}
.md-typeset figure.tm-guide__media {
  margin: 0;
}
.md-typeset .tm-frame__note,
.md-typeset .tm-guide__cap {
  display: block;
  max-width: none;
  margin: 0;
  text-align: left;
  font-style: normal;
}

/* Product preview frame */
.tm-frame {
  position: relative;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-lg);
  background: var(--tm-surface);
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
}
.tm-frame__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--tm-border);
  background: rgba(255, 255, 255, 0.02);
}
.tm-frame__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.tm-frame__label {
  margin-left: 0.5rem;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tm-muted);
}
.tm-frame img,
.tm-video video {
  display: block;
  width: 100%;
  height: auto;
  background: #0c1012;
}
.tm-frame__note,
.md-typeset figure.tm-video figcaption {
  padding: 0.6rem 0.9rem;
  border-top: 1px solid var(--tm-border);
  font-size: 0.7rem;
  color: var(--tm-muted);
}

.md-typeset figure.tm-video {
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-lg);
  background: #0c1012;
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
}

/* ---------- Inner page hero ---------- */
.tm-page-hero {
  margin: 0 0 2.6rem;
  padding: 0 0 1.6rem;
  border-bottom: 1px solid var(--tm-border);
}
.md-typeset .tm-page-hero h1 {
  margin: 0 0 0.7rem;
}
.tm-page-hero p {
  margin: 0;
  color: var(--tm-dim);
  max-width: 62ch;
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ---------- Buttons ---------- */
.tm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.md-typeset .tm-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.62rem 1.25rem;
  border-radius: var(--tm-radius);
  font-weight: 600;
  font-size: 0.76rem;
  border: 1px solid var(--tm-border-2);
  color: var(--tm-text) !important;
  background: transparent;
  text-decoration: none !important;
  transition: background 0.22s var(--tm-ease), border-color 0.22s var(--tm-ease);
}
.md-typeset .tm-btn:hover {
  background: var(--tm-surface-2);
}

.md-typeset .tm-btn--primary {
  background: var(--tm-accent-fill);
  border-color: var(--tm-accent-fill);
  color: var(--tm-ink) !important;
}
.md-typeset .tm-btn--primary:hover {
  background: var(--tm-accent-fill-hover);
  border-color: var(--tm-accent-fill-hover);
}

/* ---------- Stats ---------- */
.tm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 3rem 0 0;
  border-top: 1px solid var(--tm-border);
}
.tm-stat {
  padding: 1.4rem 1.4rem 0 0;
}
.tm-stat__value {
  display: block;
  font-size: 1.45rem;
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--tm-text);
}
.tm-stat__label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--tm-muted);
  line-height: 1.5;
}

/* ============================================================
   ANIMATED FLOW: sequence with per-step commentary
   ============================================================ */
.tm-flow {
  margin: 1.8rem 0 2.4rem;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-lg);
  background: var(--tm-surface);
  overflow: hidden;
  container-type: inline-size;
  container-name: tmflow;
}

.md-typeset ol.tm-flow__track {
  list-style: none;
  margin: 0;
  padding: 1.5rem 1.6rem 1.3rem;
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  overflow-x: auto;
}

.md-typeset .tm-flow__node {
  margin: 0;
  flex: 1 1 0;
  min-width: 7.4rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--tm-sans);
  padding: 0;
}

/* connector line between nodes */
.tm-flow__node::before {
  content: "";
  position: absolute;
  top: 0.53rem;
  left: -50%;
  width: 100%;
  height: 1px;
  background: var(--tm-border-2);
}
.tm-flow__node:first-child::before {
  display: none;
}
.tm-flow__node[data-state="done"]::before,
.tm-flow__node[data-state="active"]::before {
  background: var(--tm-accent);
}

.tm-flow__dot {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  border: 1px solid var(--tm-border-2);
  background: var(--tm-bg);
  position: relative;
  z-index: 1;
  transition: border-color 0.35s var(--tm-ease), background 0.35s var(--tm-ease), box-shadow 0.35s var(--tm-ease);
}
.tm-flow__node[data-state="done"] .tm-flow__dot {
  border-color: var(--tm-accent);
  background: var(--tm-accent);
}
.tm-flow__node[data-state="active"] .tm-flow__dot {
  border-color: var(--tm-accent);
  background: var(--tm-accent);
  box-shadow: 0 0 0 4px rgba(var(--tm-steel), 0.18);
}

.tm-flow__label {
  font-size: 0.73rem;
  font-weight: 550;
  line-height: 1.35;
  color: var(--tm-muted);
  padding: 0 0.3rem;
  transition: color 0.3s var(--tm-ease);
}
.tm-flow__node[data-state="active"] .tm-flow__label {
  color: var(--tm-text);
  font-weight: 620;
}
.tm-flow__node[data-state="done"] .tm-flow__label {
  color: var(--tm-dim);
}

.tm-flow__caption {
  border-top: 1px solid var(--tm-border);
  padding: 1.25rem 1.6rem 1.35rem;
  background: rgba(255, 255, 255, 0.015);
  min-height: 6.2rem;
}
.tm-flow__step {
  display: block;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tm-accent-hi);
  margin-bottom: 0.4rem;
}
.md-typeset .tm-flow__title {
  font-size: 0.95rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
  color: var(--tm-text);
}
.md-typeset .tm-flow__text {
  margin: 0;
  color: var(--tm-dim);
  font-size: 0.84rem;
  line-height: 1.65;
  max-width: 68ch;
}
.tm-flow__caption[data-anim="in"] {
  animation: tm-fade 0.4s var(--tm-ease);
}

.tm-flow__controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1.6rem 1.2rem;
}
.md-typeset .tm-flow__btn {
  appearance: none;
  border: 1px solid var(--tm-border-2);
  background: transparent;
  color: var(--tm-dim);
  border-radius: 6px;
  font-family: var(--tm-sans);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: color 0.2s var(--tm-ease), border-color 0.2s var(--tm-ease);
}
.md-typeset .tm-flow__btn:hover {
  color: var(--tm-text);
  border-color: var(--tm-border-2);
}

/* Too narrow for a readable rail, so the sequence stacks vertically */
@container tmflow (max-width: 38rem) {
  .md-typeset ol.tm-flow__track {
    flex-direction: column;
    align-items: stretch;
    overflow-x: visible;
    padding: 1.2rem 1.4rem;
  }
  .md-typeset .tm-flow__node {
    flex-direction: row;
    text-align: left;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    gap: 0.85rem;
    padding: 0.45rem 0;
  }
  .tm-flow__node::before {
    display: block;
    top: 0;
    bottom: 0;
    left: 0.52rem;
    width: 1px;
    height: auto;
  }
  .tm-flow__node:first-child::before {
    display: block;
    top: 50%;
  }
  .tm-flow__node:last-child::before {
    bottom: 50%;
  }
  .tm-flow__label {
    padding: 0;
  }
  .tm-flow__caption,
  .tm-flow__controls {
    padding-left: 1.4rem;
    padding-right: 1.4rem;
  }
}

/* ============================================================
   GUIDE: step list + media panel (GIF walkthrough)
   ============================================================ */
.tm-guide {
  display: grid;
  grid-template-columns: 13.5rem 1fr;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-lg);
  overflow: hidden;
  margin: 1.6rem 0 2.4rem;
  background: var(--tm-surface);
}
@media (max-width: 55rem) {
  .tm-guide {
    grid-template-columns: 1fr;
  }
}

.tm-guide__list {
  border-right: 1px solid var(--tm-border);
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
@media (max-width: 55rem) {
  .tm-guide__list {
    border-right: none;
    border-bottom: 1px solid var(--tm-border);
    flex-direction: row;
    overflow-x: auto;
  }
}

.md-typeset .tm-guide__step {
  appearance: none;
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  width: 100%;
  text-align: left;
  font-family: var(--tm-sans);
  background: transparent;
  border: none;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  padding: 0.65rem 0.7rem;
  cursor: pointer;
  color: var(--tm-muted);
  transition: color 0.2s var(--tm-ease), background 0.2s var(--tm-ease), border-color 0.2s var(--tm-ease);
}
.md-typeset .tm-guide__step:hover {
  color: var(--tm-text);
  background: var(--tm-surface-2);
}
.md-typeset .tm-guide__step[aria-selected="true"] {
  color: var(--tm-text);
  background: var(--tm-surface-2);
  border-left-color: var(--tm-accent);
}
.tm-guide__num {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--tm-accent-hi);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.tm-guide__name {
  font-size: 0.78rem;
  font-weight: 550;
  line-height: 1.35;
}
@media (max-width: 55rem) {
  .md-typeset .tm-guide__step {
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 6px 6px 0 0;
    white-space: nowrap;
  }
  .md-typeset .tm-guide__step[aria-selected="true"] {
    border-left-color: transparent;
    border-bottom-color: var(--tm-accent);
  }
}

.tm-guide__stage {
  padding: 1.5rem 1.7rem 1.6rem;
  min-width: 0;
}
.tm-guide__panel {
  display: none;
}
.tm-guide__panel[data-active="true"] {
  display: block;
  animation: tm-fade 0.35s var(--tm-ease);
}
.md-typeset .tm-guide__title {
  font-size: 1rem;
  font-weight: 650;
  margin: 0 0 0.4rem;
  color: var(--tm-text);
}
.md-typeset .tm-guide__text {
  margin: 0 0 1.1rem;
  color: var(--tm-dim);
  font-size: 0.85rem;
  line-height: 1.68;
  max-width: 64ch;
}
.tm-guide__media {
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}
.tm-guide__media img {
  display: block;
  width: 100%;
  height: auto;
}
.tm-guide__cap {
  padding: 0.55rem 0.85rem;
  border-top: 1px solid var(--tm-border);
  font-size: 0.7rem;
  color: var(--tm-muted);
}

/* No-JS fallback */
.tm-guide:not([data-tm-ready]) .tm-guide__list {
  display: none;
}
.tm-guide:not([data-tm-ready]) {
  grid-template-columns: 1fr;
}
.tm-guide:not([data-tm-ready]) .tm-guide__panel {
  display: block;
  margin-bottom: 2rem;
}

/* ============================================================
   EXPLORER: side menu + detail body
   ============================================================ */
.tm-explorer {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-lg);
  overflow: hidden;
  margin: 1.6rem 0 2.4rem;
  background: var(--tm-surface);
}

.tm-explorer__nav {
  border-right: 1px solid var(--tm-border);
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 27rem;
  overflow-y: auto;
}

.md-typeset .tm-explorer__tab {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--tm-sans);
  font-size: 0.78rem;
  font-weight: 550;
  line-height: 1.35;
  color: var(--tm-muted);
  background: transparent;
  border: none;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  padding: 0.62rem 0.8rem;
  cursor: pointer;
  transition: color 0.2s var(--tm-ease), background 0.2s var(--tm-ease), border-color 0.2s var(--tm-ease);
}
.md-typeset .tm-explorer__tab:hover {
  color: var(--tm-text);
  background: var(--tm-surface-2);
}
.md-typeset .tm-explorer__tab[aria-selected="true"] {
  color: var(--tm-text);
  background: var(--tm-surface-2);
  border-left-color: var(--tm-accent);
}

/* Generous, symmetric body padding */
.tm-explorer__body {
  padding: 1.7rem 2rem;
  min-height: 12rem;
}

.tm-explorer__panel {
  display: none;
}
.tm-explorer__panel[data-active="true"] {
  display: block;
  padding: 1.45rem 1.55rem 1.5rem;
  min-width: 0;
  animation: tm-fade 0.35s var(--tm-ease);
}

.tm-explorer:not([data-tm-ready]) .tm-explorer__nav {
  display: none;
}
.tm-explorer:not([data-tm-ready]) {
  grid-template-columns: 1fr;
}
.tm-explorer:not([data-tm-ready]) .tm-explorer__panel {
  display: block;
  border-bottom: 1px solid var(--tm-border);
  padding: 1.35rem 1.6rem 1.15rem;
  margin-bottom: 0;
}

.md-typeset .tm-explorer__title {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 0.55rem;
  color: var(--tm-text);
}
.md-typeset .tm-explorer__panel p {
  margin: 0 0 0.75rem;
  color: var(--tm-dim);
  font-size: 0.85rem;
  line-height: 1.68;
  max-width: 64ch;
}
.md-typeset .tm-explorer__panel p:last-child {
  margin-bottom: 0;
}

@media (max-width: 48rem) {
  .tm-explorer {
    grid-template-columns: 1fr;
  }
  .tm-explorer__nav {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--tm-border);
    max-height: none;
  }
  .md-typeset .tm-explorer__tab {
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 6px 6px 0 0;
  }
  .md-typeset .tm-explorer__tab[aria-selected="true"] {
    border-left-color: transparent;
    border-bottom-color: var(--tm-accent);
  }
  .tm-explorer__body {
    padding: 1.4rem 1.3rem;
  }
}

/* ---------- Meta list (used in explorer/guide panels) ---------- */
.md-typeset ul.tm-meta {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0.15rem 0 0;
  border-top: 1px solid var(--tm-border);
}
.md-typeset .tm-meta li {
  margin: 0;
  padding: 0.8rem 0.15rem;
  border-bottom: 1px solid var(--tm-border);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--tm-muted);
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  column-gap: 1.25rem;
  align-items: start;
}
.tm-meta li:last-child {
  border-bottom: none;
}
.tm-meta b {
  color: var(--tm-dim);
  font-weight: 600;
  min-width: 0;
}
@media (max-width: 40rem) {
  .md-typeset .tm-meta li {
    grid-template-columns: 1fr;
    row-gap: 0.2rem;
  }
}

/* ============================================================
   TABS: horizontal, for small sets
   ============================================================ */
.tm-tabs {
  margin: 1.6rem 0 2.4rem;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-lg);
  overflow: hidden;
  background: var(--tm-surface);
}
.tm-tabs__nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--tm-border);
  overflow-x: auto;
  padding: 0 0.4rem;
}
.md-typeset .tm-tabs__tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--tm-sans);
  font-size: 0.78rem;
  font-weight: 570;
  color: var(--tm-muted);
  padding: 0.85rem 1.05rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s var(--tm-ease), border-color 0.2s var(--tm-ease);
}
.md-typeset .tm-tabs__tab:hover {
  color: var(--tm-text);
}
.md-typeset .tm-tabs__tab[aria-selected="true"] {
  color: var(--tm-text);
  border-bottom-color: var(--tm-accent);
}
.tm-tabs__body {
  padding: 1.7rem 2rem;
}
.tm-tabs__panel {
  display: none;
}
.tm-tabs__panel[data-active="true"] {
  display: block;
  animation: tm-fade 0.35s var(--tm-ease);
}
.md-typeset .tm-tabs__panel p {
  margin: 0 0 0.75rem;
  color: var(--tm-dim);
  font-size: 0.85rem;
  line-height: 1.68;
  max-width: 64ch;
}
.md-typeset .tm-tabs__panel p:last-child {
  margin-bottom: 0;
}
.md-typeset .tm-tabs__title {
  font-size: 1rem;
  font-weight: 650;
  margin: 0 0 0.55rem;
}
.tm-tabs[data-tm-ready] .tm-tabs__title[data-tm-dupe] {
  display: none;
}
.tm-tabs:not([data-tm-ready]) .tm-tabs__nav {
  display: none;
}
.tm-tabs:not([data-tm-ready]) .tm-tabs__panel {
  display: block;
  margin-bottom: 1.4rem;
}
@media (max-width: 48rem) {
  .tm-tabs__body {
    padding: 1.4rem 1.3rem;
  }
}

/* ============================================================
   CARDS: text only, no icons
   ============================================================ */
.tm-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--tm-border);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-lg);
  overflow: hidden;
  margin: 1.6rem 0 2.4rem;
}
.tm-cardx {
  background: var(--tm-bg);
  padding: 1.35rem 1.5rem;
  transition: background 0.25s var(--tm-ease);
  position: relative;
}
.tm-cardx:hover {
  background: var(--tm-surface-2);
}
a.tm-cardx {
  display: block;
  color: inherit !important;
  text-decoration: none !important;
}
.md-typeset .tm-cardx__title {
  font-size: 0.88rem;
  font-weight: 640;
  margin: 0 0 0.4rem;
  color: var(--tm-text);
}
.md-typeset .tm-cardx__text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--tm-dim);
}
.tm-cardx__k {
  display: block;
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tm-accent-hi);
  margin-bottom: 0.55rem;
}

/* ============================================================
   EDITORIAL LIST / STEPS / COLUMNS
   ============================================================ */
.tm-list {
  margin: 1.4rem 0 2.2rem;
  border-top: 1px solid var(--tm-border);
}
.tm-list__item {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--tm-border);
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1.8rem;
  align-items: start;
}
.md-typeset .tm-list__term {
  font-weight: 620;
  font-size: 0.85rem;
  color: var(--tm-text);
  margin: 0;
}
.md-typeset .tm-list__desc {
  margin: 0;
  color: var(--tm-dim);
  font-size: 0.84rem;
  line-height: 1.65;
}
@media (max-width: 44rem) {
  .tm-list__item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

.tm-steps {
  counter-reset: tm-step;
  margin: 1.4rem 0 2.2rem;
  border-top: 1px solid var(--tm-border);
}
.tm-step {
  position: relative;
  padding: 1.15rem 0 1.15rem 2.9rem;
  border-bottom: 1px solid var(--tm-border);
}
.tm-step::before {
  counter-increment: tm-step;
  content: counter(tm-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.2rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--tm-accent-hi);
  font-variant-numeric: tabular-nums;
}
.md-typeset .tm-step__title {
  font-weight: 620;
  font-size: 0.85rem;
  margin: 0 0 0.25rem;
  color: var(--tm-text);
}
.md-typeset .tm-step__body {
  margin: 0;
  color: var(--tm-dim);
  font-size: 0.84rem;
  line-height: 1.65;
}

.tm-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--tm-border);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-lg);
  overflow: hidden;
  margin: 1.5rem 0 2.2rem;
}
@media (max-width: 44rem) {
  .tm-cols {
    grid-template-columns: 1fr;
  }
}
.tm-panel {
  background: var(--tm-bg);
  padding: 1.4rem 1.6rem;
}
.md-typeset .tm-panel h3,
.md-typeset .tm-panel h4 {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-weight: 620;
  border: none;
  padding: 0;
}
.md-typeset .tm-panel p {
  margin: 0;
  color: var(--tm-dim);
  font-size: 0.84rem;
  line-height: 1.65;
}
.tm-panel--accent {
  box-shadow: inset 2px 0 0 var(--tm-accent);
}

/* Numbered loop inside a panel */
.md-typeset ol.tm-loop {
  list-style: none;
  counter-reset: tm-loop;
  margin: 0.9rem 0 0;
  padding: 0;
}
.md-typeset ol.tm-loop li {
  position: relative;
  margin: 0;
  padding: 0.4rem 0 0.4rem 1.9rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--tm-dim);
}
.md-typeset ol.tm-loop li::before {
  counter-increment: tm-loop;
  content: counter(tm-loop);
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 1px solid var(--tm-border-2);
  font-size: 0.6rem;
  font-weight: 650;
  color: var(--tm-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.md-typeset ol.tm-loop li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0.57rem;
  top: 1.75rem;
  bottom: -0.15rem;
  width: 1px;
  background: var(--tm-border-2);
}
.md-typeset ol.tm-loop--accent li::before {
  border-color: var(--tm-accent-line);
  color: var(--tm-accent-hi);
}
.md-typeset .tm-loop__back {
  margin: 0.9rem 0 0;
  font-size: 0.74rem;
  color: var(--tm-muted);
}

/* ---------- Tags ---------- */
.tm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 1.8rem;
}
.tm-pill {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 550;
  color: var(--tm-muted);
  background: var(--tm-surface);
  border: 1px solid var(--tm-border);
  transition: color 0.2s var(--tm-ease), border-color 0.2s var(--tm-ease);
}
.tm-pill:hover {
  color: var(--tm-text);
  border-color: var(--tm-border-2);
}

/* ---------- Link row ---------- */
.tm-linkrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}
.md-typeset .tm-linkrow a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: var(--tm-radius);
  font-weight: 550;
  font-size: 0.78rem;
  color: var(--tm-dim) !important;
  border: 1px solid var(--tm-border);
  text-decoration: none !important;
  transition: color 0.2s var(--tm-ease), border-color 0.2s var(--tm-ease), background 0.2s var(--tm-ease);
}
.md-typeset .tm-linkrow a:hover {
  color: var(--tm-text) !important;
  border-color: var(--tm-border-2);
  background: var(--tm-surface);
}

/* ---------- CTA band ---------- */
.tm-banner {
  margin: 3.2rem 0 1rem;
  padding: 2.2rem 0 0;
  border-top: 1px solid var(--tm-border);
}
.md-typeset .tm-banner h2 {
  margin: 0 0 0.6rem;
  border: none;
  padding: 0;
  font-size: 1.3rem;
}
.md-typeset .tm-banner p {
  color: var(--tm-dim);
  max-width: 52ch;
  margin: 0 0 1.4rem;
  font-size: 0.9rem;
}

/* ============================================================
   TABLES, ADMONITIONS, CODE, MERMAID
   ============================================================ */
.md-typeset table:not([class]) {
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-lg);
  overflow: hidden;
  box-shadow: none;
  font-size: 0.8rem;
}
.md-typeset table:not([class]) th {
  background: var(--tm-surface-2);
  font-weight: 620;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tm-muted);
  border-bottom: 1px solid var(--tm-border);
}
.md-typeset table:not([class]) td {
  border-top: 1px solid var(--tm-border);
  color: var(--tm-dim);
}
.md-typeset table:not([class]) tr:hover td {
  background: var(--tm-surface);
  color: var(--tm-text);
}
.md-typeset table:not([class]) strong {
  color: var(--tm-text);
  font-weight: 620;
}

/* One neutral treatment for every admonition type, no colored variants */
.md-typeset .admonition,
.md-typeset details {
  border-radius: var(--tm-radius);
  border: 1px solid var(--tm-border) !important;
  border-left: 2px solid var(--tm-accent-line) !important;
  background: var(--tm-surface);
  box-shadow: none;
  font-size: 0.82rem;
}
.md-typeset .admonition-title,
.md-typeset summary {
  background: transparent !important;
  font-weight: 620;
  color: var(--tm-text);
  padding-left: 1rem;
  border: none !important;
}
.md-typeset .admonition-title::before,
.md-typeset summary::before {
  display: none;
}

.md-typeset .highlight,
.md-typeset pre > code {
  border-radius: var(--tm-radius);
}

.md-typeset code {
  font-size: 0.84em;
  border-radius: 4px;
}

/* Mermaid, toned to the palette through the theme variables Material exposes */
[data-md-color-scheme="slate"] {
  --md-mermaid-font-family: var(--tm-sans);
  --md-mermaid-edge-color: rgba(255, 255, 255, 0.3);
  --md-mermaid-node-bg-color: rgba(255, 255, 255, 0.05);
  --md-mermaid-node-fg-color: rgba(255, 255, 255, 0.2);
  --md-mermaid-label-bg-color: transparent;
  --md-mermaid-label-fg-color: var(--tm-dim);
}

.md-typeset .mermaid {
  margin: 1.8rem 0;
  padding: 1.6rem 1.4rem;
  border-radius: var(--tm-radius-lg);
  border: 1px solid var(--tm-border);
  background: var(--tm-surface);
}
.md-typeset .mermaid svg {
  width: 100%;
  height: auto;
  max-width: 100%;
}

.md-typeset .task-list-control .task-list-indicator::before {
  background-color: var(--tm-accent);
}

/* ============================================================
   MOTION
   ============================================================ */
.tm-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--tm-ease), transform 0.55s var(--tm-ease);
}
.tm-reveal.tm-visible {
  opacity: 1;
  transform: none;
}

.tm-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 100;
  background: var(--tm-accent);
  transition: width 0.1s linear;
}

@keyframes tm-fade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .tm-reveal { opacity: 1; transform: none; }
}

@media (max-width: 44rem) {
  .tm-actions { flex-direction: column; align-items: stretch; }
  .md-typeset .tm-btn { justify-content: center; }
  .tm-stat { padding-right: 1rem; border-bottom: 1px solid var(--tm-border); }
}

/* ============================================================
   INVESTIGATION HABIT: SVG flowchart + step list + caption
   ============================================================ */
.tm-habit {
  margin: 1.6rem 0 2.4rem;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-lg);
  overflow: hidden;
  background: var(--tm-surface);
}
.tm-habit__body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  border-bottom: 1px solid var(--tm-border);
}
.tm-habit__chart {
  padding: 1.35rem 1.2rem 1.1rem;
  border-right: 1px solid var(--tm-border);
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 18px 18px;
}
.tm-fc {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.tm-fc__arrowhead {
  fill: rgba(255, 255, 255, 0.28);
}
.tm-fc__edge {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1.5;
  marker-end: url(#tm-fc-arrow);
  transition: stroke 0.35s var(--tm-ease);
}
.tm-fc__edge[data-state="active"] {
  stroke: var(--tm-accent);
  stroke-dasharray: 6 10;
  animation: tm-fc-flow 1.1s linear infinite;
}
.tm-fc__edge[data-state="done"] {
  stroke: rgba(var(--tm-steel), 0.45);
}
@keyframes tm-fc-flow {
  to { stroke-dashoffset: -32; }
}
.tm-fc__node {
  cursor: pointer;
  outline: none;
}
.tm-fc__node rect {
  fill: rgba(12, 12, 14, 0.92);
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1.2;
  transition: stroke 0.3s var(--tm-ease), fill 0.3s var(--tm-ease), filter 0.3s var(--tm-ease);
}
.tm-fc__node[data-state="done"] rect {
  stroke: rgba(var(--tm-steel), 0.35);
  fill: rgba(var(--tm-steel), 0.06);
}
.tm-fc__node[data-state="active"] rect {
  stroke: var(--tm-accent);
  fill: rgba(var(--tm-steel), 0.1);
  filter: url(#tm-fc-glow);
}
.tm-fc__node:hover rect {
  stroke: rgba(255, 255, 255, 0.28);
}
.tm-fc__node[data-state="active"]:hover rect {
  stroke: var(--tm-accent-hi);
}
.tm-fc__n {
  fill: var(--tm-accent-hi);
  font-family: var(--tm-sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.tm-fc__l {
  fill: rgba(255, 255, 255, 0.72);
  font-family: var(--tm-sans);
  font-size: 10.5px;
  font-weight: 600;
}
.tm-fc__node[data-state="active"] .tm-fc__l {
  fill: #fff;
}
.tm-fc__node[data-state="done"] .tm-fc__l {
  fill: rgba(255, 255, 255, 0.45);
}

.md-typeset ol.tm-habit__steps {
  list-style: none;
  margin: 0;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.md-typeset .tm-habit__step {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.62rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s var(--tm-ease), border-color 0.25s var(--tm-ease);
}
.tm-habit__step:hover {
  background: rgba(255, 255, 255, 0.02);
}
.tm-habit__step[data-state="active"] {
  background: rgba(var(--tm-steel), 0.08);
  border-color: rgba(var(--tm-steel), 0.35);
}
.tm-habit__step[data-state="done"] {
  opacity: 0.62;
}
.tm-habit__num {
  flex-shrink: 0;
  width: 1.65rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--tm-accent-hi);
  font-variant-numeric: tabular-nums;
}
.tm-habit__label {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--tm-muted);
  transition: color 0.25s var(--tm-ease);
}
.tm-habit__step[data-state="active"] .tm-habit__label {
  color: var(--tm-text);
}
.tm-habit__caption {
  padding: 1.25rem 1.5rem 1.35rem;
  background: rgba(255, 255, 255, 0.015);
  min-height: 5.8rem;
}
.tm-habit__meta {
  display: block;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tm-accent-hi);
  margin-bottom: 0.4rem;
}
.md-typeset .tm-habit__title {
  font-size: 0.95rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
  color: var(--tm-text);
}
.md-typeset .tm-habit__text {
  margin: 0;
  color: var(--tm-dim);
  font-size: 0.84rem;
  line-height: 1.65;
  max-width: 68ch;
}
.tm-habit__caption[data-anim="in"] {
  animation: tm-fade 0.4s var(--tm-ease);
}

@media (max-width: 52rem) {
  .tm-habit__body {
    grid-template-columns: 1fr;
  }
  .tm-habit__chart {
    border-right: none;
    border-bottom: 1px solid var(--tm-border);
  }
}
@media (max-width: 36rem) {
  .tm-habit__chart {
    padding: 1rem 0.6rem 0.8rem;
  }
  .md-typeset ol.tm-habit__steps {
    padding: 0.85rem;
  }
}

/* ============================================================
   SUITE: 3 x 2 journey, no empty cells
   ============================================================ */
.tm-suite {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.6rem 0 2.4rem;
}
.md-typeset a.tm-suite__item {
  display: flex;
  flex-direction: column;
  min-height: 11.5rem;
  padding: 1.2rem 1.3rem 1.3rem;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-lg);
  background: var(--tm-surface);
  color: inherit !important;
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
  transition: border-color 0.22s var(--tm-ease), background 0.22s var(--tm-ease), transform 0.22s var(--tm-ease);
}
.md-typeset a.tm-suite__item:hover {
  border-color: var(--tm-border-2);
  background: var(--tm-surface-2);
  transform: translateY(-2px);
}
.md-typeset a.tm-suite__item--lead {
  border-color: rgba(var(--tm-steel), 0.35);
  background: linear-gradient(180deg, rgba(var(--tm-steel), 0.08), var(--tm-surface) 55%);
}
.tm-suite__idx {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--tm-muted);
  font-variant-numeric: tabular-nums;
}
.tm-suite__k {
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tm-accent-hi);
  margin-bottom: 0.45rem;
}
.md-typeset .tm-suite__title {
  font-size: 0.98rem;
  font-weight: 650;
  margin: 0 0 0.4rem;
  color: var(--tm-text);
}
.md-typeset .tm-suite__text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--tm-dim);
}
@media (max-width: 52rem) {
  .tm-suite { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 36rem) {
  .tm-suite { grid-template-columns: 1fr; }
}

/* ============================================================
   SURFACES: question → linked feature
   ============================================================ */
.tm-surfaces {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 1.4rem 0 2.2rem;
}
.md-typeset a.tm-surface {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  background: var(--tm-surface);
  text-decoration: none !important;
  color: inherit !important;
  transition: border-color 0.2s var(--tm-ease), background 0.2s var(--tm-ease);
}
.md-typeset a.tm-surface:hover {
  border-color: var(--tm-border-2);
  background: var(--tm-surface-2);
}
.tm-surface__ask {
  font-size: 0.82rem;
  color: var(--tm-dim);
  line-height: 1.45;
}
.tm-surface__go {
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--tm-accent-hi);
  letter-spacing: 0.01em;
}
@media (max-width: 44rem) {
  .tm-surfaces { grid-template-columns: 1fr; }
}

/* ============================================================
   PROMISE: unique capabilities, no comparison table
   ============================================================ */
.tm-promise {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin: 1.6rem 0 2.4rem;
}
.tm-promise__item {
  padding: 1.3rem 1.35rem 1.4rem;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-lg);
  background: var(--tm-surface);
}
.tm-promise__item--lead {
  border-color: rgba(var(--tm-steel), 0.35);
  background: linear-gradient(180deg, rgba(var(--tm-steel), 0.08), var(--tm-surface) 60%);
}
.tm-promise__k {
  display: block;
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tm-accent-hi);
  margin-bottom: 0.5rem;
}
.md-typeset .tm-promise__title {
  font-size: 0.92rem;
  font-weight: 650;
  margin: 0 0 0.4rem;
  color: var(--tm-text);
}
.md-typeset .tm-promise__text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.62;
  color: var(--tm-dim);
}
@media (max-width: 52rem) {
  .tm-promise { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 36rem) {
  .tm-promise { grid-template-columns: 1fr; }
}

/* ============================================================
   CHANGELOG (JSON driven)
   ============================================================ */
.tm-changelog {
  margin: 0.4rem 0 2rem;
}
.tm-changelog__loading,
.tm-changelog__empty {
  margin: 0;
  padding: 1.2rem 1.3rem;
  border: 1px dashed var(--tm-border);
  border-radius: var(--tm-radius);
  color: var(--tm-dim);
  font-size: 0.88rem;
}
.tm-changelog__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tm-changelog__item {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0 1.1rem;
}
.tm-changelog__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.35rem;
}
.tm-changelog__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--tm-accent);
  box-shadow: 0 0 0 3px rgba(var(--tm-steel), 0.18);
  flex-shrink: 0;
}
.tm-changelog__line {
  flex: 1;
  width: 1px;
  min-height: 1.4rem;
  margin: 0.35rem 0;
  background: linear-gradient(to bottom, var(--tm-border-2), transparent);
}
.tm-changelog__body {
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-lg);
  padding: 1.15rem 1.25rem 1.05rem;
  margin-bottom: 1rem;
  background: var(--tm-surface);
  transition: border-color 0.2s var(--tm-ease);
}
.tm-changelog__item:first-child .tm-changelog__body {
  border-color: var(--tm-border-2);
  background: linear-gradient(145deg, var(--tm-surface-2), var(--tm-surface));
}
.tm-changelog__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0.85rem;
  margin-bottom: 0.55rem;
}
.tm-changelog__ver {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--tm-text);
}
.tm-changelog__label {
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tm-accent-hi);
}
.tm-changelog__date {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--tm-muted);
}
.md-typeset .tm-changelog__sum {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--tm-dim);
  max-width: 58ch;
}
.md-typeset .tm-changelog__group {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tm-accent-hi);
}
.tm-changelog__highlights {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}
.tm-changelog__highlights li {
  position: relative;
  padding-left: 0.95rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--tm-text);
}
.tm-changelog__highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: var(--tm-accent);
  opacity: 0.85;
}
@media (max-width: 36rem) {
  .tm-changelog__date {
    margin-left: 0;
    width: 100%;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.md-footer-meta__inner {
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}
.md-copyright {
  font-size: 0.74rem;
  color: var(--tm-muted);
  line-height: 1.55;
}

.md-typeset .tm-meta a {
  font-weight: 600;
}
