/* ==========================================================================
   Red Bear AI — site stylesheet
   Brand tokens extracted from the supplied Word and PowerPoint templates:
   Segoe UI · #CA4036 (logo/accent) · #A93529 (deep accent) · #111318 (ink)
   #6B7280 (muted) · #E3E1DB (rule) · #F5F5F6 (panel) · #F6D8D3 (tint)

   Type: three primary text sizes (--fs-s / --fs-b / --fs-l) carry all body
   copy, as the templates do. Display sizes are derived from the same scale
   and used only for headings.
   ========================================================================== */

:root {
  --red: #ca4036;
  --red-deep: #a93529;
  --ink: #111318;
  --ink-soft: #33363d;
  --muted: #6b7280;
  --rule: #e3e1db;
  --panel: #f5f5f6;
  --tint: #f6d8d3;
  --white: #fff;

  --fs-s: 0.875rem;    /* small: captions, labels, notes        */
  --fs-b: 1.0625rem;   /* body                                  */
  --fs-l: 1.25rem;     /* lead paragraphs                       */

  --shell: 1160px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --pad-y: clamp(3rem, 7vw, 5.5rem);

  --font: "Segoe UI", "Segoe UI Web (West European)", Selawik, system-ui,
    -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-b);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

a { color: var(--red-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--red); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--ink); color: var(--white); padding: 0.6rem 1rem;
  border-radius: 4px; text-decoration: none; transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; color: var(--white); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* --- masthead ------------------------------------------------------------ */

.masthead { background: var(--ink); color: var(--white); position: relative; }
.masthead::after {
  content: ""; display: block; height: 4px; background: var(--red);
}
.masthead__inner {
  display: flex; align-items: center; gap: var(--gap);
  padding-top: 1rem; padding-bottom: 1rem; position: relative;
}
.masthead__brand { text-decoration: none; color: inherit; margin-right: auto; }

.logo { display: inline-flex; align-items: center; gap: 0.7rem; }
.logo__mark { width: 40px; height: 20px; display: block; }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__text strong { font-size: 1rem; letter-spacing: 0.07em; font-weight: 600; }
.logo__sub {
  font-size: 0.5625rem; letter-spacing: 0.26em; color: #c9cbd0;
  text-transform: uppercase;
}

.nav__list {
  display: flex; align-items: center; gap: 0.35rem;
  list-style: none; margin: 0; padding: 0;
}
.nav__item { position: relative; }
.nav__link,
.nav__link--menu {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.55rem 0.8rem; border-radius: 4px;
  color: #e7e8ea; text-decoration: none; font-size: var(--fs-s);
  letter-spacing: 0.02em; background: none; border: 0; cursor: pointer;
  font-family: inherit;
}
.nav__link:hover, .nav__link--menu:hover { background: #23262d; color: var(--white); }
.nav__link.is-active { color: var(--white); box-shadow: inset 0 -2px 0 var(--red); }
.nav__chev {
  width: 0; height: 0; border-left: 4px solid transparent;
  border-right: 4px solid transparent; border-top: 5px solid currentColor;
}
.nav__menu {
  position: absolute; top: calc(100% + 0.35rem); left: 0; min-width: 15rem;
  background: var(--white); border: 1px solid var(--rule); border-radius: 6px;
  box-shadow: 0 12px 28px rgba(17, 19, 24, 0.16);
  list-style: none; margin: 0; padding: 0.35rem; display: none; z-index: 40;
}
.nav__item--has-menu.is-open .nav__menu { display: block; }
.nav__sublink {
  display: block; padding: 0.55rem 0.7rem; border-radius: 4px;
  color: var(--ink); text-decoration: none; font-size: var(--fs-s);
}
.nav__sublink:hover { background: var(--panel); color: var(--red-deep); }
.nav__sublink[aria-current="page"] { color: var(--red-deep); font-weight: 600; }

.nav-toggle {
  display: none; align-items: center; gap: 0.5rem; margin-left: auto;
  background: none; border: 1px solid #3a3d45; color: var(--white);
  border-radius: 4px; padding: 0.5rem 0.75rem; font: inherit;
  font-size: var(--fs-s); cursor: pointer;
}
.nav-toggle__bars {
  position: relative; width: 16px; height: 2px; background: currentColor;
}
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

/* --- hero ---------------------------------------------------------------- */

.hero { position: relative; background: #0b1018; color: var(--white); overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.55;
}
.hero__inner {
  position: relative; padding-top: clamp(4rem, 11vw, 8.5rem);
  padding-bottom: clamp(4rem, 11vw, 8.5rem); max-width: 46rem;
}
.hero__eyebrow {
  margin: 0 0 1rem; font-size: var(--fs-s); letter-spacing: 0.16em;
  text-transform: uppercase; color: #f0b9b2;
}
.hero__title {
  margin: 0 0 1.25rem; font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  line-height: 1.08; font-weight: 600; letter-spacing: -0.015em;
}
.hero__lead { margin: 0 0 2rem; font-size: var(--fs-l); color: #e4e5e8; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* --- page heads ---------------------------------------------------------- */

.pagehead { background: var(--white); border-bottom: 1px solid var(--rule); }
.pagehead > .shell { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.pagehead__eyebrow {
  margin: 0 0 0.9rem; font-size: var(--fs-s); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--red);
}
.pagehead__title {
  margin: 0 0 1rem; font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.14; font-weight: 600; letter-spacing: -0.012em;
  max-width: 22ch;
}
.pagehead--product .pagehead__title { max-width: 26ch; }
.pagehead__lead {
  margin: 0; font-size: var(--fs-l); color: var(--ink-soft); max-width: 62ch;
}
.pagehead__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* --- sections ------------------------------------------------------------ */

.section { padding-top: var(--pad-y); padding-bottom: var(--pad-y); }
.section--light { background: var(--white); }
.section--panel { background: var(--panel); }
.section--ink { background: var(--ink); color: var(--white); }
.section--ink .eyebrow { color: #f0b9b2; }
.section--ink .lead { color: #d7d9dd; }
.section--cta { text-align: left; }

.eyebrow {
  margin: 0 0 0.8rem; font-size: var(--fs-s); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--red);
}
.h2 {
  margin: 0 0 1rem; font-size: clamp(1.5rem, 3vw, 2.05rem);
  line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; max-width: 26ch;
}
.h3 { margin: 0 0 0.75rem; font-size: 1.1875rem; font-weight: 600; }
.lead { font-size: var(--fs-l); color: var(--ink-soft); max-width: 68ch; margin: 0 0 1.75rem; }
.muted { color: var(--muted); }
.smallnote { font-size: var(--fs-s); color: var(--muted); max-width: 70ch; }

.prose p { max-width: 66ch; margin: 0 0 1rem; }
.prose--invert p { color: #d7d9dd; }

.cols { display: grid; gap: var(--gap); }
/* A grid item defaults to min-width:auto, so a child with a min-width — the
   44rem on .cap-table / .def-table — widens the whole track instead of
   scrolling inside its own .table-wrap, and the page scrolls sideways. Found
   on /moat.html at 390px, where it pushed the layout 334px wide. */
.cols > * { min-width: 0; }
.cols--2 { grid-template-columns: 1fr; }
@media (min-width: 860px) { .cols--2 { grid-template-columns: 1.25fr 1fr; } }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.4rem; border-radius: 4px; text-decoration: none;
  font-size: var(--fs-s); font-weight: 600; letter-spacing: 0.02em;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-deep); color: var(--white); }
.btn--ghost { border: 1px solid currentColor; color: inherit; }
.btn--ghost:hover { background: rgba(202, 64, 54, 0.1); color: inherit; }
.section--ink .btn--ghost, .hero .btn--ghost { color: var(--white); }

/* --- cards and grids ----------------------------------------------------- */

.grid { display: grid; gap: var(--gap); }
.grid--2, .grid--3, .grid--5 { grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--5 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) { .grid--5 { grid-template-columns: repeat(5, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--rule); border-radius: 8px;
  padding: clamp(1.5rem, 3vw, 2rem);
  display: flex; flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.section--panel .card { background: var(--white); }
.card:hover { border-color: var(--red); box-shadow: 0 10px 28px rgba(17, 19, 24, 0.08); }
.card__eyebrow {
  margin: 0 0 0.6rem; font-size: var(--fs-s); color: var(--muted);
  letter-spacing: 0.04em;
}
.card__title { margin: 0 0 0.9rem; font-size: 1.4rem; font-weight: 600; }
.card__body p { margin: 0 0 0.9rem; }
.card__for { font-size: var(--fs-s); color: var(--muted); }
.card__link {
  margin-top: auto; font-weight: 600; font-size: var(--fs-s);
  text-decoration: none;
}
.card__link::after { content: " \2192"; }
.card__link:hover { text-decoration: underline; }

.principle { border-top: 3px solid var(--red); padding-top: 1rem; }
.principle__t { margin: 0 0 0.5rem; font-size: 1.0625rem; font-weight: 600; }
.principle__d { margin: 0; color: #c9cbd0; font-size: var(--fs-s); line-height: 1.65; }
.section--light .principle__d { color: var(--ink-soft); }

.stance { border-top: 1px solid var(--rule); padding-top: 1.1rem; }
.stance__t { margin: 0 0 0.5rem; font-size: 1.0625rem; font-weight: 600; }
.stance__d { margin: 0; color: var(--ink-soft); }

.pillcard {
  display: flex; flex-direction: column; gap: 0.35rem; text-decoration: none;
  background: var(--white); border: 1px solid var(--rule); border-radius: 6px;
  padding: 0.9rem 1rem; color: var(--ink);
}
.pillcard:hover { border-color: var(--red); color: var(--red-deep); }
.pillcard__n { font-size: var(--fs-s); font-weight: 600; color: var(--red); }
.pillcard__t { font-size: var(--fs-s); font-weight: 600; line-height: 1.35; }

/* --- lists --------------------------------------------------------------- */

.keylist { list-style: none; margin: 0; padding: 0; }
.keylist li {
  position: relative; padding-left: 1.4rem; margin-bottom: 0.7rem;
  max-width: 62ch;
}
.keylist li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 7px; height: 7px; background: var(--red);
}

/* --- callouts ------------------------------------------------------------ */

.callout {
  border-left: 4px solid var(--red); padding: 1.1rem 1.3rem;
  border-radius: 0 6px 6px 0; margin-bottom: 1.25rem;
}
.callout--tint { background: var(--tint); }
.callout--plain { background: var(--panel); border-left-color: var(--ink); }
.callout__title {
  margin: 0 0 0.5rem; font-weight: 600; font-size: var(--fs-s);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--red-deep);
}
.callout--plain .callout__title { color: var(--ink); }
.callout__body p { margin: 0; }

.notice {
  background: #fbf0dc; border-left: 4px solid #8a5a0b;
  padding: 1rem 1.25rem; border-radius: 0 6px 6px 0; margin-bottom: 2rem;
}
.notice p { margin: 0; font-size: var(--fs-s); }

.pending {
  background: repeating-linear-gradient(135deg, #f6d8d3, #f6d8d3 6px, #fbe9e7 6px, #fbe9e7 12px);
  border: 1px dashed var(--red); padding: 0.1rem 0.45rem; border-radius: 3px;
  font-size: 0.95em; color: var(--red-deep);
}

/* --- tables -------------------------------------------------------------- */

.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.cap-table, .def-table {
  width: 100%; border-collapse: collapse; font-size: var(--fs-s);
  min-width: 44rem; background: var(--white);
}
.cap-table th, .cap-table td,
.def-table th, .def-table td {
  border: 1px solid var(--rule); padding: 0.85rem 1rem;
  text-align: left; vertical-align: top;
}
.cap-table thead th, .def-table thead th {
  background: var(--ink); color: var(--white); font-weight: 600;
  letter-spacing: 0.02em;
}
.cap-table tbody th, .def-table tbody th { font-weight: 600; width: 26%; }
.cap-table tbody tr:nth-child(even) td,
.cap-table tbody tr:nth-child(even) th,
.def-table tbody tr:nth-child(even) td,
.def-table tbody tr:nth-child(even) th { background: var(--panel); }
.cap-table__name { display: block; }
.cap-table__desc {
  display: block; margin-top: 0.3rem; font-weight: 400; color: var(--muted);
}

/* --- steps --------------------------------------------------------------- */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--gap); grid-template-columns: 1fr;
}
@media (min-width: 680px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps__item { border-top: 3px solid var(--red); padding-top: 0.9rem; }
.steps__n { font-size: var(--fs-s); font-weight: 600; color: var(--red); }
.steps__t { margin: 0.3rem 0 0.4rem; font-size: 1.0625rem; font-weight: 600; }
.steps__d { margin: 0; font-size: var(--fs-s); color: var(--ink-soft); }

/* --- figures and diagrams ------------------------------------------------ */

.figure { margin: 0 0 2rem; }
.figure__canvas {
  background: var(--white); border: 1px solid var(--rule); border-radius: 8px;
  padding: clamp(0.75rem, 2.5vw, 1.5rem); overflow-x: auto;
}
.section--ink .figure__canvas { background: var(--white); border-color: #2b2e36; }
.diagram { display: block; width: 100%; height: auto; min-width: 34rem; }
.figure__caption {
  margin-top: 0.9rem; font-size: var(--fs-s); color: var(--muted);
  max-width: 78ch;
}

/* --- layers / stages ----------------------------------------------------- */

.layerlist { display: grid; gap: 1rem; margin: 2rem 0; }
@media (min-width: 860px) { .layerlist { grid-template-columns: repeat(2, 1fr); } }
.layer {
  background: var(--white); border: 1px solid var(--rule); border-radius: 6px;
  padding: 1.1rem 1.25rem;
}
.layer__n { margin: 0; font-size: var(--fs-s); font-weight: 600; color: var(--red); }
.layer__t { margin: 0.2rem 0 0.5rem; font-size: 1.0625rem; font-weight: 600; }
.layer__w { margin: 0 0 0.6rem; }
.layer__d { margin: 0; font-size: var(--fs-s); color: var(--muted); }

.stages { display: grid; gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 860px) { .stages { grid-template-columns: repeat(3, 1fr); } }
.stage { border-top: 3px solid var(--red); padding-top: 1rem; }
.stage__s { margin: 0; font-weight: 600; color: var(--red); font-size: var(--fs-s); }
.stage__t { margin: 0.2rem 0 0.5rem; font-size: 1.0625rem; font-weight: 600; }
.stage__w { margin: 0 0 0.6rem; font-size: var(--fs-s); }
.stage__d { margin: 0; font-size: var(--fs-s); color: var(--muted); }
.typologies { margin-top: 2rem; }

/* --- pillars ------------------------------------------------------------- */

.pillars > .pillar:nth-child(odd) { background: var(--white); }
.pillars > .pillar:nth-child(even) { background: var(--panel); }
.pillar { padding-top: var(--pad-y); padding-bottom: var(--pad-y); border-top: 1px solid var(--rule); scroll-margin-top: 2rem; }
.pillar__head { display: flex; gap: 1rem; align-items: baseline; margin-bottom: 1.25rem; }
.pillar__n { margin: 0; font-size: 1.25rem; font-weight: 600; color: var(--red); }
.pillar__t { margin: 0; font-size: clamp(1.35rem, 2.6vw, 1.85rem); font-weight: 600; line-height: 1.22; }
.pillar__hl { color: var(--ink-soft); font-weight: 400; }
.pillar__what { margin: 0; }
.pillar__problem { margin: 0; color: var(--ink-soft); }
.pillar__foot { margin-top: 1.5rem; }

/* --- people -------------------------------------------------------------- */

.people { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 620px) { .people { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .people { grid-template-columns: repeat(4, 1fr); } }
.person { border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.person__photo {
  aspect-ratio: 1 / 1; background: var(--panel); border-radius: 6px;
  display: grid; place-items: center; overflow: hidden; margin-bottom: 1rem;
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person__ph { color: #b9bbc0; font-size: 2rem; }
.person--placeholder .person__photo {
  background: repeating-linear-gradient(135deg, #f5f5f6, #f5f5f6 10px, #ececed 10px, #ececed 20px);
}
.person__name { margin: 0 0 0.2rem; font-size: 1.0625rem; font-weight: 600; }
.person__role { margin: 0 0 0.7rem; font-size: var(--fs-s); color: var(--red-deep); }
.person__bio { margin: 0 0 0.7rem; font-size: var(--fs-s); color: var(--ink-soft); }
.person__link { font-size: var(--fs-s); font-weight: 600; }
.person__flag {
  margin: 0.7rem 0 0; font-size: 0.8125rem; color: #8a5a0b;
  border: 1px dashed #c9a35a; border-radius: 4px; padding: 0.35rem 0.5rem;
}

/* --- contact ------------------------------------------------------------- */

.channels { display: grid; gap: 1.25rem; margin-bottom: 1.5rem; }
.channel__label {
  margin: 0 0 0.25rem; font-size: var(--fs-s); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.channel__value { margin: 0; font-size: var(--fs-l); }

/* --- footer -------------------------------------------------------------- */

.footer { background: var(--ink); color: #c9cbd0; padding-top: 3rem; }
.footer__inner {
  display: grid; gap: var(--gap); grid-template-columns: 1fr;
  padding-bottom: 2.5rem;
}
@media (min-width: 760px) { .footer__inner { grid-template-columns: 1.5fr 1fr; } }
.footer__line { margin: 0.9rem 0 0; font-size: var(--fs-s); }
.footer__nav { display: grid; gap: var(--gap); grid-template-columns: repeat(2, 1fr); }
.footer__head {
  margin: 0 0 0.7rem; font-size: var(--fs-s); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--white);
}
.footer__nav a {
  display: block; color: #c9cbd0; text-decoration: none;
  font-size: var(--fs-s); padding: 0.22rem 0;
}
.footer__nav a:hover { color: var(--white); text-decoration: underline; }
.footer__legal {
  border-top: 1px solid #2b2e36; padding-top: 1.25rem; padding-bottom: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
}
.footer__legal p { margin: 0; font-size: 0.8125rem; }
.footer__pending { color: #f0b9b2; }

/* --- the Enterprise Decision Intelligence wordmark --------------------------------------------- */

.ai { color: var(--red); font-weight: 600; }
.masthead .ai, .footer .ai, .section--ink .ai, .hero .ai { color: #e7776b; }

/* --- responsive nav ------------------------------------------------------ */

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink); border-top: 1px solid #2b2e36; z-index: 50;
    padding: 0.5rem 1.25rem 1.25rem;
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link, .nav__link--menu {
    width: 100%; justify-content: space-between; padding: 0.85rem 0.25rem;
    border-bottom: 1px solid #23262d; border-radius: 0; font-size: var(--fs-b);
  }
  .nav__menu {
    position: static; display: none; background: transparent; border: 0;
    box-shadow: none; padding: 0 0 0.5rem 0.9rem;
  }
  .nav__item--has-menu.is-open .nav__menu { display: block; }
  .nav__sublink { color: #c9cbd0; padding: 0.65rem 0.25rem; }
  .nav__sublink:hover { background: transparent; color: var(--white); }
}

/* --- motion preferences -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- print --------------------------------------------------------------- */

@media print {
  .masthead, .footer, .skip-link, .hero__bg { display: none; }
  body { font-size: 11pt; }
  .section { padding-block: 1rem; }
}

/* --- books ---------------------------------------------------------------- */

.books { display: grid; gap: clamp(1.75rem, 4vw, 3rem); }

.book {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  grid-template-columns: 1fr;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--book-colour, var(--red));
  border-radius: 8px;
  padding: clamp(1.25rem, 3vw, 2rem);
  scroll-margin-top: 2rem;
}
@media (min-width: 720px) { .book { grid-template-columns: 230px 1fr; } }
@media (min-width: 1000px) { .book { grid-template-columns: 260px 1fr; } }

.book__cover {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(17, 19, 24, 0.18);
}

.book__n {
  margin: 0 0 0.35rem;
  font-size: var(--fs-s);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--book-colour, var(--red-deep));
}
.book__title { margin: 0 0 0.25rem; font-size: 1.5rem; font-weight: 600; line-height: 1.15; }
.book__sub { margin: 0 0 1rem; font-size: var(--fs-l); color: var(--ink-soft); }
.book__blurb { margin: 0 0 1.5rem; max-width: 62ch; }
.book__learnhead {
  margin: 0 0 0.6rem;
  font-size: var(--fs-s);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.book__learn li::before { background: var(--book-colour, var(--red)); }
.book__meta {
  margin: 1.25rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  font-size: var(--fs-s);
  color: var(--muted);
}

.books__author { margin-top: clamp(1.75rem, 4vw, 2.75rem); }

/* --- downloads ------------------------------------------------------------ */

.dlgroup { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); scroll-margin-top: 2rem; }
.dllist { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.dl {
  display: grid; gap: 1rem; align-items: start;
  grid-template-columns: 1fr; padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 760px) { .dl { grid-template-columns: 1fr auto; align-items: center; } }
.dl--pending { background: linear-gradient(to right, var(--panel), transparent 65%); }
.dl__title {
  margin: 0 0 0.4rem; font-size: 1.0625rem; font-weight: 600;
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: baseline;
}
.dl__tag {
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: #8a5a0b;
  border: 1px solid #c9a35a; border-radius: 3px; padding: 0.1rem 0.4rem;
}
.dl__summary { margin: 0 0 0.5rem; font-size: var(--fs-s); color: var(--ink-soft); max-width: 62ch; }
.dl__meta {
  margin: 0; font-size: 0.8125rem; color: var(--muted);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.dl__action { justify-self: start; }
@media (min-width: 760px) { .dl__action { justify-self: end; } }

/* --- conceptual interface mockups ---------------------------------------- */

.mocks { display: grid; gap: var(--gap); }
@media (min-width: 900px) { .mocks--2 { grid-template-columns: repeat(2, 1fr); } }

.mock { margin: 0 0 1.5rem; }
.mock__frame {
  background: var(--white); border: 1px solid var(--rule); border-radius: 10px;
  overflow: hidden; box-shadow: 0 10px 30px rgba(17, 19, 24, 0.07);
}
.mock__frame--phone { max-width: 22rem; margin-inline: auto; border-radius: 16px; }
.mock__chrome {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--ink); color: var(--white); padding: 0.6rem 0.9rem;
}
.mock__dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--red);
  flex: none;
}
.mock__label { font-size: var(--fs-s); font-weight: 600; }
.mock__tag {
  margin-left: auto; font-size: 0.6875rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: #c9cbd0;
  border: 1px dashed #5a5e68; border-radius: 3px; padding: 0.1rem 0.45rem;
}
.mock__body { padding: 1.1rem 1.15rem; }
.mock__caption {
  margin-top: 0.75rem; font-size: var(--fs-s); color: var(--muted);
  max-width: 56ch;
}

.mk-row { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.mk-row:last-child { border-bottom: 0; padding-bottom: 0; }
.mk-row__label {
  display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.45rem;
}
.mk-row__hint { margin: 0.45rem 0 0; font-size: 0.8125rem; color: var(--muted); }
.mk-inline { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.mk-sep { font-size: var(--fs-s); color: var(--muted); }

.mk-input {
  display: inline-block; border: 1px solid var(--rule); border-radius: 4px;
  padding: 0.3rem 0.6rem; font-size: var(--fs-s); background: var(--white);
}
.mk-input--wide { min-width: 16rem; }
.mk-chip {
  display: inline-block; border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.22rem 0.7rem; font-size: 0.8125rem; color: var(--muted);
  background: var(--white);
}
.mk-chip--on { background: var(--tint); border-color: var(--red); color: var(--red-deep); font-weight: 600; }

.mk-seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 5px; overflow: hidden; }
.mk-seg__opt { padding: 0.35rem 0.8rem; font-size: 0.8125rem; color: var(--muted); border-right: 1px solid var(--rule); }
.mk-seg__opt:last-child { border-right: 0; }
.mk-seg__opt.is-on { background: var(--ink); color: var(--white); font-weight: 600; }

.mk-toggle { display: inline-flex; align-items: center; gap: 0.6rem; }
.mk-toggle__track {
  width: 34px; height: 19px; border-radius: 999px; background: #d4d5d8;
  position: relative; flex: none;
}
.mk-toggle.is-on .mk-toggle__track { background: var(--red); }
.mk-toggle__knob {
  position: absolute; top: 2px; left: 2px; width: 15px; height: 15px;
  border-radius: 50%; background: #fff;
}
.mk-toggle.is-on .mk-toggle__knob { left: auto; right: 2px; }
.mk-toggle__text { font-size: var(--fs-s); }

.mk-person { display: flex; align-items: center; gap: 0.7rem; }
.mk-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: repeating-linear-gradient(135deg, #e9eaec, #e9eaec 5px, #f3f4f5 5px, #f3f4f5 10px);
}
.mk-person__name { display: block; font-size: var(--fs-s); font-weight: 600; }
.mk-person__role { display: block; font-size: 0.8125rem; color: var(--muted); }

.mk-note__why {
  margin: 0 0 0.4rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--red);
}
.mk-note__what { margin: 0 0 0.9rem; font-size: 1.0625rem; font-weight: 600; }
.mk-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.9rem; margin: 0 0 1rem; }
.mk-facts dt { font-size: 0.8125rem; color: var(--muted); }
.mk-facts dd { margin: 0; font-size: 0.8125rem; }
.mk-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mk-btn {
  display: inline-block; border: 1px solid var(--rule); border-radius: 4px;
  padding: 0.4rem 0.8rem; font-size: 0.8125rem; font-weight: 600;
}
.mk-btn--go { background: var(--red); border-color: var(--red); color: #fff; }
.mk-btn--no { color: var(--muted); }
.mk-note__foot { margin: 0.9rem 0 0; font-size: 0.75rem; color: var(--muted); }

.mk-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.mk-table th, .mk-table td { text-align: left; padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--rule); }
.mk-table thead th { font-size: 0.6875rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.mk-table__row.is-stalled td:first-child { box-shadow: inset 3px 0 0 var(--red); padding-left: 0.7rem; }
.mk-pill {
  display: inline-block; border-radius: 999px; padding: 0.12rem 0.6rem;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.05em;
}
.mk-pill--stalled { background: var(--tint); color: var(--red-deep); }
.mk-pill--ageing { background: #fbf0dc; color: #8a5a0b; }
.mk-pill--ok { background: #e8f1e6; color: #22441e; }
.mk-tablefoot { margin: 0.8rem 0 0; font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; }

/* --- story timeline ------------------------------------------------------- */

.timeline { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 0; }
.timeline__item {
  position: relative; padding: 0 0 1.5rem 2.2rem;
  border-left: 2px solid var(--rule);
}
.timeline__item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: -7px; top: 0.35rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--red); border: 3px solid var(--white);
}
.timeline__when {
  margin: 0 0 0.2rem; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--red);
}
.timeline__t { margin: 0 0 0.4rem; font-size: 1.0625rem; font-weight: 600; }
.timeline__d { margin: 0; color: var(--ink-soft); max-width: 66ch; }

/* --- prevention cards ----------------------------------------------------- */

.prevent { display: grid; gap: var(--gap); margin-bottom: 2rem; }
@media (min-width: 860px) { .prevent { grid-template-columns: repeat(2, 1fr); } }
.prevent__item { background: var(--white); border: 1px solid var(--rule); border-radius: 8px; padding: 1.25rem; }
.prevent__pillar { margin: 0 0 0.5rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }
.prevent__pillar a { text-decoration: none; }
.prevent__pillar a:hover { text-decoration: underline; }
.prevent__t { margin: 0 0 0.5rem; font-size: 1.0625rem; font-weight: 600; }
.prevent__d { margin: 0 0 0.75rem; font-size: var(--fs-s); color: var(--ink-soft); }
.prevent__e {
  margin: 0; padding-top: 0.6rem; border-top: 1px solid var(--rule);
  font-size: var(--fs-s); font-weight: 600; color: var(--red-deep);
}
.pagehead__parent { color: inherit; }

.person--tba .person__photo {
  background: repeating-linear-gradient(135deg, #f5f5f6, #f5f5f6 10px, #ececed 10px, #ececed 20px);
}
.person--tba .person__name { color: var(--muted); }

/* ---------------------------------------------------------------- downloads
   Roles and a jump nav, added 22 September 2026 when the library grew to
   eighteen documents and scanning it stopped being practical. */

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 1.5rem;
}
.jump__link {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: var(--fs-s);
  color: var(--ink);
  text-decoration: none;
  background: var(--white);
}
.jump__link:hover,
.jump__link:focus-visible { border-color: var(--red); color: var(--red-deep); }

.dl__roles {
  margin: 0 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.role {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 3px;
  background: var(--tint);
  color: var(--red-deep);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* The download button carries the whole purpose of the row, so it should not
   be the smallest thing in it. */
.dl__btn { white-space: nowrap; }
@media (min-width: 760px) { .dl__btn { min-width: 11rem; text-align: center; } }

/* Visually hidden, still read aloud. */
.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* --- moat engines --------------------------------------------------------- */
/* Added 12 October 2026 with the nine-engine moat page. */

.engines { border-top: 1px solid var(--rule); }
.engine { padding: var(--pad-y) 0; border-bottom: 1px solid var(--rule); }
.engine:nth-child(even) { background: var(--panel); }
.engine__head {
  display: flex; gap: 1rem; align-items: baseline;
  margin-bottom: 1.75rem; padding-bottom: 1rem; border-bottom: 2px solid var(--red);
}
.engine__n {
  margin: 0; font-size: 1.5rem; font-weight: 600; color: var(--red);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.engine__t { margin: 0; font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
.engine__kicker { margin: 0.3rem 0 0; color: var(--muted); font-size: var(--fs-l); }
.engine__what { margin: 0 0 1rem; font-size: var(--fs-l); line-height: 1.5; }
.engine__pain { margin: 0; color: var(--ink-soft); }
.engine__sub { margin: 2rem 0 0.75rem; }
.engine__foot { margin-top: 2rem; }
.engine__inside { margin: 0; font-weight: 600; }
.engine__link { font-weight: 600; }
.engine__note {
  margin-top: 1.5rem; padding: 0.9rem 1.1rem;
  background: var(--tint); border-radius: 4px; color: var(--ink-soft);
}
.engine:nth-child(even) .engine__note { background: var(--white); }

/* The capability lists on an engine read better with the term on its own line
   than inline, because the terms are long and the explanations are sentences. */
.keylist--engine li { margin-bottom: 0.85rem; }
.keylist--engine li strong { display: block; margin-bottom: 0.15rem; color: var(--ink); }

.pillcard__d {
  display: block; margin-top: 0.3rem;
  font-size: var(--fs-s); color: var(--muted); font-weight: 400; line-height: 1.35;
}

/* Diagrams sit on white inside a tinted band and vice versa, so they never
   disappear into the section behind them. */
/* Engine diagrams run the full width of the shell. The global .diagram rule
   sets min-width: 34rem for the wide platform diagram; here that would overflow
   the figure and the last stage would be silently clipped rather than scrolled,
   which is how a four-column flow lost its fourth column on 12 Oct 2026. Keep a
   legible floor and let the figure scroll on a phone instead. */
.engine .figure {
  margin: 2rem 0 0; padding: 1.1rem;
  background: var(--white); border: 1px solid var(--rule); border-radius: 6px;
  overflow-x: auto;
}
.engine .diagram { min-width: 30rem; }
.engine .figure__caption { margin-top: 0.8rem; }

/* --- banner page heads ---------------------------------------------------- */
/* Added 12 October 2026 with the Red Bear page artwork. Same treatment as the
   home hero, shorter, so the content a reader came for is still in the first
   view. The overlay is a gradient rather than a flat opacity because these
   images are darkest on the left, where the text sits. */

.pagehead--banner {
  position: relative; background: #0b1018; color: var(--white);
  overflow: hidden; border-bottom: none;
}
.pagehead--banner .pagehead__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 38%; opacity: 0.6;
}
.pagehead--banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(11,16,24,0.88) 0%, rgba(11,16,24,0.62) 48%, rgba(11,16,24,0.3) 100%);
}
.pagehead--banner .pagehead__inner {
  position: relative; z-index: 1; max-width: 46rem;
  padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(3rem, 8vw, 6rem);
}
.pagehead--banner .pagehead__eyebrow { color: #f0b9b2; }
.pagehead--banner .pagehead__title { color: var(--white); }
.pagehead--banner .pagehead__lead { color: #e4e5e8; }
.pagehead--banner .pagehead__status {
  margin: 1.1rem 0 0; font-size: var(--fs-s); color: #e4e5e8;
  border-left: 3px solid var(--red); padding-left: 0.85rem;
}
.pagehead--banner .pagehead__actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.pagehead--banner .pagehead__parent { color: #f0b9b2; }

/* --- home page product introductions -------------------------------------- */
/* Added 12 October 2026. A visitor may have no context at all, so each product
   answers the same five questions in the same order and a reader can compare
   three of them by scanning down the page. */

.intros { border-top: 1px solid var(--rule); }
.intro { padding: var(--pad-y) 0; border-bottom: 1px solid var(--rule); }
.intro:nth-child(even) { background: var(--panel); }
.intro__head {
  display: flex; gap: 1.1rem; align-items: baseline;
  padding-bottom: 1.25rem; margin-bottom: 1.75rem; border-bottom: 2px solid var(--red);
}
.intro__n {
  margin: 0; font-size: 1.5rem; font-weight: 600; color: var(--red);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.intro__eyebrow {
  margin: 0 0 0.5rem; font-size: var(--fs-s); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.intro__t {
  margin: 0 0 0.6rem; font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.12; font-weight: 600; letter-spacing: -0.012em;
}
.intro__audience { margin: 0; font-size: var(--fs-l); color: var(--ink-soft); max-width: 54ch; }
.intro__what { margin: 0 0 1rem; font-size: var(--fs-l); line-height: 1.5; }
.intro__status {
  margin: 0 0 1.25rem; font-size: var(--fs-s); color: var(--ink-soft);
  border-left: 3px solid var(--red); padding-left: 0.85rem;
}
.intro__sub { margin-top: 1.75rem; }
.intro__pain { margin: 0; padding-left: 1.1rem; }
.intro__pain li { margin-bottom: 0.7rem; }
.intro__pain li:last-child { margin-bottom: 0; }
.intro__how { margin-bottom: 1.75rem; }
.intro .cta-row { margin-top: 1.75rem; }

.home__email { margin: 1.25rem 0 0; font-size: var(--fs-l); font-weight: 600; }
.home__email a { color: #f0b9b2; }

/* --- drawn screens -------------------------------------------------------- */
/* Added 12 October 2026. Conceptual interfaces drawn to the current model, not
   captured from the prototype — see the note in components/mockups.mjs. */

.mk-dial { border: 1px solid var(--rule); border-radius: 6px; padding: 1rem; margin-bottom: 1rem; }
.mk-dial__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.8rem; }
.mk-dial__who { font-size: var(--fs-s); color: var(--ink-soft); }
.mk-dial__val { font-size: 1.6rem; font-weight: 600; color: var(--red); font-variant-numeric: tabular-nums; }
.mk-dial__track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.mk-dial__band {
  display: flex; flex-direction: column; gap: 0.15rem; padding: 0.5rem 0.4rem;
  background: var(--panel); border-radius: 3px; font-size: 0.7rem; color: var(--muted);
  text-align: center; line-height: 1.2;
}
.mk-dial__band.is-current { background: var(--red); color: var(--white); font-weight: 600; }
.mk-dial__bandn { font-weight: 600; font-variant-numeric: tabular-nums; }
.mk-dial__note { margin: 0.7rem 0 0; font-size: var(--fs-s); color: var(--ink-soft); }

.mk-proj { border: 1px solid var(--rule); border-radius: 6px; padding: 1rem; margin-bottom: 1rem; }
.mk-proj__t { margin: 0 0 0.75rem; font-size: var(--fs-s); font-weight: 600; }
.mk-proj__bars { display: flex; flex-direction: column; gap: 0.5rem; }
.mk-proj__bar { display: flex; align-items: stretch; gap: 2px; min-height: 2rem; }
.mk-proj__lbl { flex: 0 0 5rem; font-size: 0.75rem; color: var(--muted); align-self: center; }
.mk-proj__seg {
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 600; border-radius: 3px; padding: 0 0.3rem;
  white-space: nowrap; overflow: hidden;
}
.mk-proj__seg--hold { background: var(--tint); color: var(--red-deep); }
.mk-proj__seg--auto { background: var(--panel); color: var(--ink-soft); }
.mk-proj__read { margin: 0.75rem 0 0; font-size: 0.78rem; color: var(--muted); }

.mk-commit { border: 1px solid var(--rule); border-radius: 6px; padding: 1rem; }
.mk-commit__lbl { display: block; font-size: 0.75rem; font-weight: 600; margin-bottom: 0.4rem; }
.mk-commit__box {
  border: 1px solid var(--rule); border-radius: 3px; padding: 0.55rem 0.7rem;
  font-size: var(--fs-s); color: var(--ink-soft); background: var(--white); margin-bottom: 0.8rem;
}
.mk-commit__row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.mk-btn { font-size: 0.78rem; font-weight: 600; padding: 0.4rem 0.8rem; border-radius: 3px; }
.mk-btn--primary { background: var(--red); color: var(--white); }
.mk-commit__hint { font-size: 0.75rem; color: var(--muted); }

.mk-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
.mk-chip {
  font-size: 0.72rem; padding: 0.25rem 0.55rem; border-radius: 99px;
  background: var(--panel); color: var(--muted); border: 1px solid var(--rule);
}
.mk-chip.is-on { background: var(--ink); color: var(--white); border-color: var(--ink); }

.mk-table { width: 100%; border-collapse: collapse; font-size: 0.76rem; }
.mk-table th, .mk-table td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--rule); }
.mk-table thead th { background: var(--panel); font-weight: 600; font-size: 0.7rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.mk-table td.is-warn { color: #8a5a0b; font-weight: 600; }
.mk-table td.is-flag { color: var(--red-deep); font-weight: 600; }

.mk-rec { display: grid; gap: 0.9rem; }
.mk-rec__block, .mk-rec__outcome { border: 1px solid var(--rule); border-radius: 6px; padding: 0.9rem; }
.mk-rec__outcome { background: var(--panel); border-left: 3px solid var(--red); }
.mk-rec__k {
  margin: 0 0 0.2rem; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.mk-rec__k + .mk-rec__v { margin-bottom: 0.8rem; }
.mk-rec__block > .mk-rec__v:last-child, .mk-rec__outcome > .mk-rec__v:last-child { margin-bottom: 0; }
.mk-rec__v { margin: 0; font-size: var(--fs-s); }
.mk-rec__v--muted { color: var(--muted); }

/* queue */
.mk-queue { display: flex; flex-direction: column; gap: 0.4rem; }
.mk-q { display: flex; align-items: center; gap: 0.9rem; padding: 0.6rem 0.75rem; border: 1px solid var(--rule); border-radius: 4px; border-left-width: 3px; }
.mk-q--overdue { border-left-color: var(--red); background: var(--tint); }
.mk-q--near { border-left-color: #8a5a0b; }
.mk-q--ok { border-left-color: var(--rule); }
.mk-q__main { flex: 1 1 auto; min-width: 0; }
.mk-q__t { margin: 0; font-size: var(--fs-s); font-weight: 600; }
.mk-q__who { margin: 0.1rem 0 0; font-size: 0.72rem; color: var(--muted); }
.mk-q__time { flex: 0 0 auto; text-align: right; }
.mk-q__age { display: block; font-size: var(--fs-s); font-weight: 600; font-variant-numeric: tabular-nums; }
.mk-q__target { display: block; font-size: 0.7rem; color: var(--muted); }
.mk-q__state { flex: 0 0 7rem; text-align: right; font-size: 0.72rem; color: var(--muted); }
.mk-q--overdue .mk-q__state { color: var(--red-deep); font-weight: 600; }

.mk-btn--stop { background: var(--white); color: var(--red-deep); border: 1px solid var(--red); }
.mk-table td.is-live { color: #3f7038; font-weight: 600; }
.mk-table td.is-shadow { color: #8a5a0b; font-weight: 600; }
.mk-table td.is-blocked { color: var(--muted); font-weight: 600; }
.mk-foot { margin: 0.9rem 0 0; font-size: 0.76rem; color: var(--muted); }

/* quadrant */
.mk-quad { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.mk-quad__cell { background: var(--panel); border-radius: 4px; padding: 0.9rem; display: flex; flex-direction: column; gap: 0.15rem; font-size: var(--fs-s); font-weight: 600; }
.mk-quad__cell em { font-style: normal; font-weight: 400; font-size: 0.72rem; color: var(--muted); }
.mk-quad__cell--good { background: #e8f1e6; }
.mk-quad__cell--warn { background: #fbf0dc; }
.mk-quad__cell--flag { background: var(--tint); }
.mk-quad__n { font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* stalls */
.mk-stall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.mk-stall__col { border: 1px solid var(--rule); border-radius: 4px; padding: 0.8rem; }
.mk-stall__h { margin: 0; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.mk-stall__n { margin: 0.3rem 0; font-size: 1.6rem; font-weight: 600; color: var(--red); font-variant-numeric: tabular-nums; }
.mk-stall__d { margin: 0 0 0.4rem; font-size: 0.76rem; }
.mk-stall__o { margin: 0; font-size: 0.72rem; color: var(--muted); font-weight: 600; }

/* impact */
.mk-impact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.mk-impact__card { border: 1px solid var(--rule); border-radius: 4px; padding: 0.8rem; border-top-width: 3px; }
.mk-impact__card.is-hi { border-top-color: #3f7038; }
.mk-impact__card.is-md { border-top-color: #8a5a0b; }
.mk-impact__card.is-lo { border-top-color: var(--rule); background: var(--panel); }
.mk-impact__obj { margin: 0; font-size: 0.72rem; color: var(--muted); }
.mk-impact__move { margin: 0.2rem 0; font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.mk-impact__conf { margin: 0; font-size: 0.76rem; font-weight: 600; }
.mk-impact__card.is-lo .mk-impact__conf { color: var(--muted); }
.mk-impact__conf-d { margin: 0.15rem 0 0; font-size: 0.7rem; color: var(--muted); }

/* escalation ladder */
.mk-ladder__pos { margin: 0 0 0.8rem; font-size: var(--fs-s); font-weight: 600; color: var(--red-deep); }
.mk-ladder { display: flex; flex-direction: column; gap: 0; }
.mk-tier { display: flex; gap: 0.7rem; padding: 0.55rem 0; position: relative; }
.mk-tier__dot { flex: 0 0 10px; height: 10px; border-radius: 99px; margin-top: 0.3rem; background: var(--rule); }
.mk-tier--done .mk-tier__dot { background: var(--ink); }
.mk-tier--now .mk-tier__dot { background: var(--red); box-shadow: 0 0 0 3px var(--tint); }
.mk-tier__t { margin: 0; font-size: var(--fs-s); font-weight: 600; }
.mk-tier--next .mk-tier__t { color: var(--muted); }
.mk-tier__d { margin: 0.1rem 0 0; font-size: 0.72rem; color: var(--muted); }
.mk-group { margin: 2.5rem 0 1rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.mk-group:first-of-type { border-top: none; padding-top: 0; }

/* --- Alpha Engine screens --- */
.mk-brief { border: 1px solid var(--rule); border-radius: 4px; padding: 0.8rem; margin-bottom: 1rem; }
.mk-brief__q { margin: 0.2rem 0 0; font-size: var(--fs-s); font-style: italic; color: var(--ink-soft); }
.mk-crit { display: flex; flex-direction: column; gap: 2px; margin-top: 0.4rem; }
.mk-crit__row { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0.6rem; background: var(--panel); border-radius: 3px; }
.mk-crit__k { flex: 0 0 8rem; font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.mk-crit__v { flex: 1 1 auto; font-size: var(--fs-s); }
.mk-crit__x { flex: 0 0 auto; font-size: 0.7rem; color: var(--red-deep); font-weight: 600; }

.mk-fit__head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.8rem; }
.mk-fit__score { font-size: 2rem; font-weight: 600; color: var(--red); font-variant-numeric: tabular-nums; }
.mk-fit__t { margin: 0; font-size: var(--fs-s); font-weight: 600; }
.mk-fit__d { margin: 0.1rem 0 0; font-size: 0.72rem; color: var(--muted); }
.mk-table td.is-verified { color: #3f7038; font-weight: 600; }
.mk-table td.is-inferred { color: #8a5a0b; font-weight: 600; }
.mk-table td.is-conflict { color: var(--red-deep); font-weight: 600; }
.mk-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.mk-btn--ghost { background: var(--white); color: var(--ink); border: 1px solid var(--rule); }

.mk-onto { display: flex; flex-direction: column; gap: 0.4rem; }
.mk-onto__row { display: flex; align-items: center; gap: 0.7rem; }
.mk-onto__n { flex: 0 0 9rem; font-size: var(--fs-s); font-weight: 600; }
.mk-onto__s { flex: 0 0 7rem; font-size: 0.7rem; font-weight: 600; }
.mk-onto__s.is-confirmed { color: #3f7038; }
.mk-onto__s.is-consulted { color: #8a5a0b; }
.mk-onto__s.is-inferred { color: var(--muted); }
.mk-onto__s.is-contradiction { color: var(--red-deep); }
.mk-onto__bar { flex: 0 0 7rem; height: 7px; background: var(--panel); border-radius: 99px; overflow: hidden; }
.mk-onto__fill { display: block; height: 100%; background: var(--red); }
.mk-onto__e { flex: 1 1 auto; font-size: 0.72rem; color: var(--muted); }

.mk-apply { display: flex; flex-direction: column; gap: 2px; }
.mk-apply__row { display: flex; gap: 0.8rem; padding: 0.5rem 0.65rem; background: var(--panel); border-radius: 3px; border-left: 3px solid transparent; }
.mk-apply__row.is-gap { border-left-color: #8a5a0b; }
.mk-apply__row.is-frozen { border-left-color: var(--red); }
.mk-apply__k { flex: 0 0 14rem; font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.mk-apply__v { flex: 1 1 auto; font-size: var(--fs-s); }

.mk-attr { border: 1px solid var(--rule); border-radius: 4px; padding: 0.9rem; }
.mk-attr__row { display: flex; justify-content: space-between; margin-bottom: 0.6rem; }
.mk-attr__k { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.mk-attr__v { font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.mk-attr__split { display: flex; gap: 2px; min-height: 2.1rem; }
.mk-attr__seg { display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 600; border-radius: 3px; }
.mk-attr__seg--alpha { background: var(--red); color: var(--white); }
.mk-attr__seg--beta { background: var(--panel); color: var(--ink-soft); }
.mk-attr__ints { display: flex; justify-content: space-between; margin-top: 0.4rem; font-size: 0.7rem; color: var(--muted); }
.mk-attr__pr { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1rem; margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--rule); font-size: var(--fs-s); }
.mk-attr__pr strong { font-variant-numeric: tabular-nums; }

/* --- Architecture Engine screens --- */
.mk-ws__q { margin: 0 0 0.6rem; font-size: var(--fs-l); font-weight: 600; line-height: 1.3; }
.mk-ws__a { border: 1px solid var(--rule); border-radius: 4px; padding: 0.7rem; font-size: var(--fs-s); color: var(--ink-soft); margin-bottom: 0.8rem; }
.mk-ws__marks { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mk-mark { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; color: var(--muted); }
.mk-mark.is-on { color: var(--red-deep); font-weight: 600; }
.mk-mark__box { width: 14px; height: 14px; border: 1px solid var(--rule); border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; }
.mk-mark.is-on .mk-mark__box { background: var(--red); border-color: var(--red); color: var(--white); }

.mk-trace { display: flex; align-items: center; gap: 0.8rem; }
.mk-trace__need { flex: 0 0 13rem; border: 1px solid var(--rule); border-radius: 4px; padding: 0.7rem; }
.mk-trace__q { margin: 0.2rem 0 0; font-size: var(--fs-s); font-style: italic; }
.mk-trace__arrow { flex: 0 0 auto; color: var(--muted); font-size: 1.2rem; }
.mk-trace__out { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mk-trace__row { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.55rem; background: var(--panel); border-radius: 3px; }
.mk-trace__ref { flex: 0 0 4rem; font-size: 0.7rem; font-weight: 600; color: var(--red-deep); }
.mk-trace__t { flex: 1 1 auto; font-size: 0.76rem; min-width: 0; }
.mk-trace__s { flex: 0 0 auto; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.mk-trace__s.is-edited { color: #8a5a0b; font-weight: 600; }

.mk-gates { display: flex; flex-direction: column; gap: 2px; }
.mk-gate { display: flex; gap: 0.7rem; align-items: center; padding: 0.55rem 0.65rem; border-radius: 3px; background: var(--panel); }
.mk-gate--now { background: var(--tint); }
.mk-gate--next { opacity: 0.6; }
.mk-gate__n { flex: 0 0 1.4rem; height: 1.4rem; border-radius: 99px; background: var(--white); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 600; }
.mk-gate--done .mk-gate__n { background: var(--ink); color: var(--white); }
.mk-gate--now .mk-gate__n { background: var(--red); color: var(--white); }
.mk-gate__t { margin: 0; font-size: var(--fs-s); font-weight: 600; }
.mk-gate__d { margin: 0.1rem 0 0; font-size: 0.72rem; color: var(--muted); }

.mk-comm { display: flex; flex-direction: column; gap: 2px; margin-bottom: 0.8rem; }
.mk-comm__row { display: flex; gap: 0.8rem; padding: 0.45rem 0.6rem; background: var(--panel); border-radius: 3px; }
.mk-comm__k { flex: 0 0 9rem; font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.mk-comm__v { flex: 1 1 auto; font-size: var(--fs-s); }
.mk-warn { border: 1px solid #8a5a0b; border-left-width: 3px; border-radius: 3px; padding: 0.6rem 0.75rem; font-size: var(--fs-s); color: #4a2c05; background: #fbf0dc; }

.mk-rev { display: flex; flex-direction: column; gap: 2px; }
.mk-rev__row { display: flex; gap: 0.7rem; align-items: baseline; padding: 0.5rem 0.6rem; border-radius: 3px; background: var(--panel); border-left: 3px solid var(--rule); }
.mk-rev__row.is-critical { border-left-color: var(--red); background: var(--tint); }
.mk-rev__row.is-moderate { border-left-color: #8a5a0b; }
.mk-rev__sev { flex: 0 0 6rem; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.mk-rev__loc { flex: 0 0 7rem; font-size: 0.72rem; color: var(--muted); }
.mk-rev__txt { flex: 1 1 auto; font-size: 0.76rem; min-width: 0; }
.mk-rev__who { flex: 0 0 9rem; font-size: 0.7rem; color: var(--muted); text-align: right; }
.dlsub { margin-bottom: 2rem; }
.dlsub:last-child { margin-bottom: 0; }
.dlsub__h {
  margin: 0 0 0.9rem; font-size: var(--fs-s); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--red-deep);
  padding-bottom: 0.45rem; border-bottom: 1px solid var(--rule);
}
.doclist { list-style: none; margin: 1.5rem 0 0; padding: 0; columns: 2; column-gap: var(--gap); }
.doclist li { break-inside: avoid; margin-bottom: 0.6rem; font-size: var(--fs-s); }
.doclist a { font-weight: 600; }
.doclist__v { display: block; font-size: 0.72rem; color: var(--muted); }
@media (max-width: 700px) { .doclist { columns: 1; } }
