/* Figures share the article's surface and typographic scale. */
.articles {
  --guide-point: 1.333px;
  --guide-step-title: calc(19px - var(--guide-point));
  --guide-step-copy: max(15px, calc(16px - var(--guide-point)));
  --guide-figure-title: calc(17px - var(--guide-point));
  --guide-wire: #748d81;
}

.guide-start-intro {
  display: grid;
  gap: clamp(24px, 3.5vw, 32px);
  margin-block-end: clamp(44px, 6.7vw, 92px);
}
.guide-start-text h2 {
  margin: 0 0 14px;
  font-size: calc(clamp(30px, 3vw, 42px) - var(--guide-point));
  line-height: 1.15;
  font-weight: 660;
  letter-spacing: -.046em;
}
.guide-start-copy {
  max-width: 62ch;
  color: var(--copy);
  font-size: max(15px, calc(clamp(16px, 1.24vw, 18px) - var(--guide-point)));
  line-height: 1.67;
  text-wrap: pretty;
}
.guide-start-note {
  max-width: 62ch;
  margin-block-start: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.g-art > .compact-map {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding-block: 8px 4px;
  container: handbook-diagram / inline-size;
  overflow-wrap: anywhere;
}
.compact-map :is(ol, ul), .connection-flow :is(ol, ul) { margin: 0; padding: 0; list-style: none; }
.compact-map :is(.map-node, .map-flow > li, .map-split > div), .connection-flow > div { min-width: 0; }
.compact-map .map-node {
  display: flex;
  align-items: start;
  gap: 8px;
  color: var(--g-ink);
}
.compact-map .map-node strong {
  display: block;
  font-size: var(--guide-figure-title);
  font-weight: 670;
  letter-spacing: -.015em;
  line-height: 1.34;
}
.compact-map .map-node > div > span:not(.branded-name) {
  display: block;
  margin-block-start: 4px;
  color: var(--g-muted);
  font-size: 15px;
  line-height: 1.45;
}
.g-art .map-node .map-mark {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  margin: 0;
}
.g-art .guide-brand {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  object-fit: contain;
  margin: 0;
}
.g-art .guide-brand--hermes {
  padding: 1px;
}
.branded-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.branded-name > span { min-width: 0; }
.guide-start-intro .g-art { min-width: 0; margin: 0; }
.g-art > [data-layout="getting-started"] { padding: 0; }
.compact-map .start-apps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(12px, 3cqi, 26px);
}
.compact-map .start-apps > li {
  padding-block: 13px;
  border-block-start: 1px solid var(--rule);
}
.compact-map .start-apps .guide-brand { margin-block-start: 1px; }
.compact-map .start-apps .map-node strong {
  font-size: calc(clamp(17px, 3cqi, 20px) - var(--guide-point));
  line-height: 1.22;
}
@container handbook-diagram (min-width: 580px) {
  .compact-map .start-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Arrows have their own space with blank room on either side. */
.connection-figure { container: handbook-connection / inline-size; }
.connection-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(50px, 8cqi, 82px) minmax(0, 1.32fr) clamp(50px, 8cqi, 82px) minmax(0, .95fr);
  align-items: center;
}
.connection-apps, .connection-start { align-self: start; }
.connection-flow h3 {
  margin-block-end: 20px;
  font-size: calc(22px - var(--guide-point));
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.2;
  text-wrap: balance;
}
.connection-flow li {
  display: flex;
  gap: 10px;
  padding-block: 16px;
  border-block-start: 1px solid var(--rule);
  font-size: var(--guide-figure-title);
  line-height: 1.35;
}
.connection-apps li { font-weight: 620; }
.connection-apps p, .connection-source p {
  color: var(--g-muted);
  font-size: 15px;
  line-height: 1.45;
}
.connection-apps p { margin-block-start: 17px; }
.connection-start ol { counter-reset: connection-step; }
.connection-start li { counter-increment: connection-step; }
.connection-start li::before {
  content: counter(connection-step, decimal-leading-zero);
  flex: 0 0 18px;
  color: var(--g-muted);
  font-size: 12px;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}
.connection-arrow {
  display: block;
  position: relative;
  height: 26px;
  color: var(--guide-wire);
}
.connection-arrow::before, .connection-arrow::after,
.compact-map .map-flow > li:not(:last-child)::before,
.compact-map .map-flow > li:not(:last-child)::after {
  content: "";
  position: absolute;
}
.connection-arrow::before {
  inset: calc(50% - .5px) 14px auto;
  border-block-start: 1px solid currentColor;
}
.connection-arrow::after {
  inset: calc(50% - 3px) 14px auto auto;
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 1px 1px 0 0;
  transform: rotate(45deg);
}
.g-art.connection-figure > figcaption {
  display: grid;
  gap: 12px;
  margin-block-start: 30px;
  padding-block-start: 22px;
  border-block-start: 1px solid var(--rule);
}
.connection-routes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 30px;
  width: 100%;
  margin: 0;
}
.connection-routes dt { color: var(--g-ink); font-size: 15px; font-weight: 670; }
.connection-routes dd { margin: 9px 0 0; }
.connection-pilot { color: var(--g-lime-hi); }
@container handbook-connection (max-width: 595px) {
  .connection-flow { grid-template-columns: minmax(0, 1fr); }
  .connection-flow h3 { margin-block-end: 15px; }
  .connection-flow li { padding-block: 13px; }
  .connection-apps p { margin-block-start: 13px; }
  .g-art.connection-figure > figcaption { margin-block-start: 23px; padding-block-start: 19px; }
  .connection-routes dd { margin-block-start: 7px; }
  .connection-arrow { height: 42px; width: 20px; margin-inline-start: 4px; }
  .connection-arrow::before { inset: 8px auto 8px 9px; border: 0; border-inline-start: 1px solid currentColor; }
  .connection-arrow::after { inset: auto auto 8px 6.5px; transform: rotate(135deg); }
  .connection-routes { grid-template-columns: minmax(0, 1fr); }
}

/* Ordered processes and comparisons use different arrangements. */
.compact-map .map-flow {
  --flow-gap: 42px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: var(--flow-gap);
}
.compact-map .map-flow > li { position: relative; padding-block: 7px; }
.compact-map .map-flow > li:not(:last-child)::before {
  inset: calc(50% - .5px) auto auto calc(100% + 9px);
  width: calc(var(--flow-gap) - 18px);
  border-block-start: 1px solid var(--guide-wire);
}
.compact-map .map-flow > li:not(:last-child)::after {
  inset: calc(50% - 3px) auto auto calc(100% + var(--flow-gap) - 15px);
  width: 6px;
  height: 6px;
  border: solid var(--guide-wire);
  border-width: 1px 1px 0 0;
  transform: rotate(45deg);
}
[data-layout="source"] .map-flow { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
[data-layout="index"] .map-flow { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr) minmax(0, 1fr); }
[data-layout="week"] .map-flow .map-node { flex-direction: column; }
.compact-map :is(.map-tags, .map-note, .map-return) {
  color: var(--g-muted);
  font-size: 15px;
  line-height: 1.5;
}
.compact-map .map-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.compact-map .map-node + .map-tags { margin-block-start: 9px; }
.compact-map .map-tags li { padding: 0; }
:is([data-layout="source"], [data-layout="fit"], [data-layout="quality"]) .map-node + .map-tags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
  padding-block-start: 8px;
  border-block-start: 1px solid var(--rule);
}
.compact-map .map-diff {
  display: grid;
  gap: 4px;
  padding-block-start: 8px;
  margin-block-start: 9px;
  border-block-start: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.4;
}
.compact-map del { color: var(--g-muted); }
.compact-map ins { color: var(--g-lime-hi); text-decoration: none; font-weight: 670; }
.compact-map .map-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 32px;
}
.compact-map .map-split > div { padding-block: 11px; border-block-start: 1px solid var(--rule); }
.compact-map .map-root { justify-self: start; align-items: center; }
[data-layout="fit"] .map-flow {
  grid-auto-flow: row;
  grid-template-columns: minmax(0, 1fr);
  max-width: 660px;
  gap: 0;
}
[data-layout="fit"] .map-flow > li + li { border-block-start: 1px solid var(--rule); padding-block-start: 14px; }
[data-layout="fit"] .map-flow > li:not(:last-child)::before,
[data-layout="fit"] .map-flow > li:not(:last-child)::after { content: none; }

/* Relationship diagrams keep branching without arrows. */
.map-network {
  --branch-stem: 13px;
  --branch-gap: 16px;
  display: grid;
  justify-items: center;
  gap: calc(2 * var(--branch-stem) + 14px);
}
.compact-map .map-junction { position: relative; }
.compact-map .map-junction::after {
  content: "";
  position: absolute;
  inset: calc(100% + 7px) auto auto 50%;
  height: var(--branch-stem);
  border-inline-start: 1px solid var(--guide-wire);
}
.compact-map .map-branches {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--branch-gap);
  width: 100%;
}
.compact-map .map-branches::before {
  content: "";
  position: absolute;
  inset: calc(-1 * (var(--branch-stem) + 7px)) calc((100% - 3 * var(--branch-gap)) / 8) auto;
  border-block-start: 1px solid var(--guide-wire);
}
.compact-map .map-branches > .map-node {
  position: relative;
  justify-content: center;
  text-align: center;
}
.compact-map .map-branches > .map-node::before {
  content: "";
  position: absolute;
  inset: calc(-1 * (var(--branch-stem) + 7px)) auto auto 50%;
  height: var(--branch-stem);
  border-inline-start: 1px solid var(--guide-wire);
}
[data-layout="service"] .map-root {
  justify-self: stretch;
  padding-block: 0 10px;
  border-block-end: 1px solid var(--rule);
}
.compact-map .map-excerpt { width: min(100%, 600px); }
.compact-map .excerpt-file {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 5px 16px;
  padding-block: 8px;
  border-bottom: 1px solid var(--rule);
}
.compact-map .excerpt-file strong { font-size: var(--guide-figure-title); font-weight: 670; }
.compact-map .excerpt-file span, .compact-map .excerpt-lines b {
  color: var(--g-muted);
  font: 600 14px/1.5 ui-monospace, monospace;
}
.compact-map .excerpt-lines > div {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 5px;
  border-bottom: 1px solid var(--rule);
}
.compact-map .excerpt-lines i { width: 62%; height: 1px; background: #929b94; }
.compact-map .excerpt-lines > div:nth-child(2) i { width: 74%; }
.compact-map .excerpt-lines > div:last-child i { width: 46%; }

@container handbook-diagram (max-width: 570px) {
  .compact-map .map-flow {
    --flow-gap: 30px;
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 1fr);
  }
  .compact-map .map-flow > li:not(:last-child)::before {
    inset: calc(100% + 7px) auto auto 10px;
    height: calc(var(--flow-gap) - 14px);
    width: 0;
    border: 0;
    border-inline-start: 1px solid var(--guide-wire);
  }
  .compact-map .map-flow > li:not(:last-child)::after {
    inset: calc(100% + var(--flow-gap) - 13px) auto auto 8px;
    transform: rotate(135deg);
  }
  [data-layout="fit"] .map-flow { gap: 0; }
  [data-layout="week"] .map-flow .map-node { flex-direction: row; }
  .compact-map .map-network { gap: 12px; justify-items: start; }
  .compact-map .map-junction::after, .compact-map .map-branches::before { content: none; }
  .compact-map .map-branches {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-inline-start: 10px;
    width: calc(100% - 10px);
    padding-inline-start: 20px;
    border-inline-start: 1px solid var(--guide-wire);
  }
  .compact-map .map-branches > .map-node {
    justify-content: start;
    padding-block: 6px;
    text-align: start;
  }
  .compact-map .map-branches > .map-node::before {
    inset: 50% auto auto -21px;
    width: 14px;
    height: 0;
    border: 0;
    border-block-start: 1px solid var(--guide-wire);
  }
}
@container handbook-diagram (max-width: 460px) {
  .compact-map .map-split { grid-template-columns: minmax(0, 1fr); }
}

.g-art figcaption { align-items: center; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 14px; }

.memory-overview {
  display: grid;
  gap: 30px;
  margin-block-end: clamp(44px, 6vw, 76px);
}
.memory-overview-intro h3 {
  margin-block-end: 12px;
  color: var(--ink);
  font-size: calc(clamp(30px, 3vw, 40px) - var(--guide-point));
  font-weight: 660;
  letter-spacing: -.045em;
  line-height: 1.15;
  text-wrap: balance;
}
.memory-overview-intro p {
  max-width: 36ch;
  color: var(--copy);
  font-size: calc(17px - var(--guide-point));
  line-height: 1.65;
  text-wrap: pretty;
}
.memory-overview-figure { min-width: 0; margin: 0; }
.memory-overview-steps { list-style: none; padding: 0; }
.memory-overview-steps li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: baseline;
  gap: 5px 12px;
  padding-block: 19px;
}
.memory-overview-steps li:first-child { padding-block-start: 0; }
.memory-overview-steps li:last-child { padding-block-end: 0; }
.memory-overview-steps li + li { border-top: 1px solid var(--rule); }
.memory-overview-number {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .05em;
  line-height: 1.3;
}
.memory-overview-steps h4 {
  color: var(--ink);
  font-size: var(--guide-step-title);
  font-weight: 640;
  letter-spacing: -.025em;
  line-height: 1.3;
}
.memory-overview-steps p {
  grid-column: 2;
  color: var(--copy);
  font-size: var(--guide-step-copy);
  line-height: 1.58;
}
@container handbook-article (min-width: 700px) {
  .memory-overview {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    column-gap: 7.5%;
  }
  .memory-overview-intro h3 { max-width: 15ch; }
  .memory-overview-steps li {
    grid-template-columns: 20px minmax(88px, .74fr) minmax(0, 1.75fr);
    column-gap: clamp(12px, 2cqi, 20px);
  }
  .memory-overview-steps p { grid-column: 3; }
}

/* Body lists align each label with its explanation on wide articles. */
.chapter:not(.contact) > h2 {
  font-size: calc(clamp(25px, 2.2vw, 33px) - var(--guide-point));
}
.topic-text strong { font-size: var(--guide-step-title); }
.topic-text > span { font-size: var(--guide-step-copy); }
.topic-body .entry + .entry, .topic-body ol + .entry { margin-top: 0; }
.topic-body > .entry,
.topic-body > :is(.sequence, .week) > li {
  margin: 0;
  padding: 12px 0;
  border-block-start: 1px solid var(--rule);
}
.topic-body > :is(.sequence, .week) {
  padding: 0;
  list-style: none;
}
.topic-body > :is(.sequence, .week) > li {
  display: grid;
  grid-template-columns: minmax(0, .58fr) minmax(0, 1.42fr);
  gap: 7px 18px;
}
.topic-body :is(.sequence, .week) > li > strong { margin: 0; }
@media (max-width: 740px) {
  .topic-text strong { font-size: var(--guide-figure-title); }
}
@container handbook-article (max-width: 480px) {
  .topic-body > .sequence > li { grid-template-columns: minmax(0, 1fr); }
  .topic-body > .week > li { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; }
}

/* Detailed examples retain the document, dialogue, and decision evidence. */
.g-figure .mono { font-family: inherit; }
.g-doc {
  padding: 4px 26px;
  border-color: var(--rule);
  background: transparent;
  box-shadow: none;
}
.g-doc-sec { border-block-start: 1px solid var(--rule); }
.g-doc-sec .g-doc-hl { padding: 3px 0; background: none; box-shadow: none; }
.g-doc-sec .g-doc-archive::before { content: none; }
.g-notes li { padding-block: 11px; }
.g-figure .g-read { align-items: start; }
.g-strip li {
  padding: 10px 0;
  border: 0;
  border-block-start: 1px solid var(--rule);
  font-size: var(--guide-figure-title);
}
.g-strip li:is(:first-child, :nth-child(2)) { border-color: var(--rule); }
.g-bubble { max-width: 100%; padding: 8px 0; }
.g-bubble-q { background: none; font-style: italic; }
.g-bubble-a { border: 0; border-block-start: 1px solid var(--rule); background: none; }
.g-bubble-a > p:first-child { font-size: var(--guide-figure-title); }
.g-cite { padding: 0; border: 0; }
.g-figure .g-pipe { column-gap: 31px; }
.g-figure .g-pipe li { padding-block: 10px; border-block-start: 1px solid var(--rule); }
.g-figure .g-pipe li:not(:last-child)::after { right: -22px; }
.g-pipe h3 { font-size: calc(18px - var(--guide-point)); }
.g-pipe .g-diff { padding-inline: 0; background: none; }
.g-figure .g-stale { padding-block: 8px; background: transparent; }
.g-figure .g-task, .g-figure .g-zones { align-items: start; }
.g-task-card h3 { font-size: calc(22px - var(--guide-point)); }
.g-figure .g-ask li { padding-inline: 0; border: 0; }
.g-figure .g-ask ul { gap: 4px 16px; }
.g-figure .g-zone-row { gap: 12px 18px; }
.g-figure .g-zone { padding-block: 10px; border-block-start: 1px solid var(--rule); }
.g-figure .g-zone-private { border-inline-start: 0; padding-inline-start: 0; }
.g-figure .g-states li:last-child { padding-inline: 0; border: 0; }
.g-figure .g-ladder { display: block; }
.g-figure .g-ladder li { border-color: var(--rule); }
.g-figure .g-ladder h3 { font-size: var(--guide-figure-title); }
.g-figure .g-ladder em { border: 0; padding: 0; }
.g-figure .g-timeline .guide-brand { width: 16px; height: 16px; flex-basis: 16px; }
.g-figure .branded-name { margin-block-end: 4px; }
@container handbook-article (max-width: 740px) {
  .g-figure .g-pipe { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .g-figure .g-pipe li { padding-inline: 0; border-inline-start: 0; }
  .g-figure .g-pipe li:not(:last-child)::after { content: none; }
}

.memory-methods { margin-block: 18px 22px; }
.memory-methods table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.memory-methods :is(th, td) {
  padding: 11px 8px;
  border-block-end: 1px solid var(--rule);
  text-align: start;
  vertical-align: top;
}
.memory-methods tr > :first-child { padding-inline-start: 0; }
.memory-methods th { font-weight: 650; }
.memory-methods thead .mono { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.memory-methods .g-col-moai { color: var(--product-text); }
.memory-methods .method-name { display: none; }
@container handbook-article (max-width: 670px) {
  .memory-methods :is(table, tbody, tr) { display: block; }
  .memory-methods thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .memory-methods tbody th {
    display: block;
    padding: 11px 0 7px;
    border-block-end: 0;
    font-weight: 700;
  }
  .memory-methods tbody td {
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
    gap: 10px;
    padding: 8px 0;
  }
  .memory-methods tbody tr + tr { margin-block-start: 12px; }
  .memory-methods .method-name { display: block; font-weight: 580; }
}
/* 2026-12-02: fewer rules — entries inside a topic are separated by space, not lines. */
.topic-body > .entry { border-block-start: 0; padding-block: 9px; }
.topic-body > .entry:first-child { padding-block-start: 16px; }
