/* The visual guide uses real HTML, so diagrams work without JavaScript. */
.map-main {
  max-width: 1120px;
  padding-bottom: 36px;
}
.map-intro {
  padding: 65px 0 35px;
}
.map-intro h1 {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.1;
  letter-spacing: -2.6px;
  font-weight: 500;
  margin: 24px 0;
}
.map-intro h1 span {
  color: var(--muted);
}
.map-intro > p {
  max-width: 660px;
  color: #aebba3;
  font-size: 16px;
  line-height: 1.8;
}
.map-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
  margin-bottom: 48px;
}
.map-tabs a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  font-size: 13px;
  color: #a7b69b;
}
.map-tabs a + a {
  border-left: 1px solid var(--line);
}
.map-tabs a > span {
  font: 11px var(--mono);
  color: #7c926b;
}
.map-tabs a[aria-current="page"] {
  background: #c5f66b0d;
  color: var(--lime);
  box-shadow: inset 0 -2px var(--lime);
}
.map-tabs a[aria-current="page"] > span {
  color: var(--lime);
}
.map-section {
  margin: 48px 0 28px;
}
.map-section-title {
  display: flex;
  gap: 15px;
  align-items: baseline;
  margin-bottom: 24px;
}
.map-section-title > span {
  font: 12px var(--mono);
  color: var(--lime);
  border: 1px solid #526837;
  padding: 6px 9px;
  border-radius: 5px;
}
.map-section-title h2 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.6px;
  line-height: 1.4;
  margin: 0;
}
.map-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.map-person,
.map-pair > article {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 26px;
  border-radius: 8px;
}
.map-icon {
  font: 24px var(--mono);
  color: var(--lime);
}
.map-page h3 {
  font-size: 17px;
  font-weight: 550;
  line-height: 1.4;
  margin: 15px 0 11px;
}
.map-page p {
  line-height: 1.8;
}
.map-person p,
.map-pair article p {
  font-size: 14px;
  color: #aebba3;
  margin-bottom: 0;
}
.map-person b {
  color: #e0e9d8;
  font-weight: 550;
}
.map-takeaway {
  font-size: 14px;
  color: #b2c39e;
  border-left: 2px solid var(--lime);
  padding: 10px 18px;
  margin: 22px 0;
}
.map-takeaway b {
  color: var(--text);
}
.map-figure {
  margin: 0;
  border: 1px solid #303a27;
  border-radius: 9px;
  padding: 26px;
  background: linear-gradient(140deg, #11180d, #0f130c);
}
.map-figure > figcaption {
  font-size: 13px;
  color: #c5d4b7;
  margin-bottom: 24px;
}
.map-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.map-flow.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.map-flow.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.map-node {
  position: relative;
  background: #161e11;
  border: 1px solid #3d4b31;
  border-radius: 7px;
  padding: 20px;
  min-width: 0;
}
.map-node strong {
  display: block;
  font-size: 14px;
  font-weight: 550;
  color: #e2ecd9;
  line-height: 1.5;
}
.map-node p {
  font-size: 13px;
  color: #a9b69e;
  margin: 12px 0 0;
}
.map-node:not(:last-child):after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -25px;
  transform: translateY(-50%);
  font-size: 20px;
  color: #a2c677;
}
.map-node.lime {
  background: #223117;
  border-color: #7fa34e;
}
.map-node.lime strong {
  color: var(--lime);
}
.map-caption {
  font-size: 12px;
  color: #9aa98c;
  margin: 22px 0 0;
  line-height: 1.8;
}
.map-host {
  border: 1px solid #567039;
  border-radius: 8px;
  padding: 24px;
  background: #b5eb6610;
}
.map-host.external {
  border-color: #405467;
  background: #8bc3ea05;
}
.map-host-label,
.map-label {
  font: 10px/1.6 var(--mono);
  letter-spacing: 0.8px;
  color: #b8d49b;
  display: block;
}
.map-host-label {
  margin-bottom: 20px;
}
.external .map-host-label {
  color: #a1c4db;
}
.external .map-node {
  border-color: #3d4e57;
  background: #121b1e;
}
.map-connector {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #a9b899;
  padding: 15px 7px;
}
.map-connector > span {
  font-size: 26px;
  color: var(--lime);
  line-height: 1.2;
}
.map-branches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.map-storage,
.map-tenant,
.map-outcome {
  padding: 24px;
  background: #141c0e;
  border: 1px solid #3c502b;
  border-radius: 8px;
  min-width: 0;
}
.map-storage p,
.map-tenant p,
.map-outcome p {
  font-size: 13px;
  color: #aebba3;
  margin: 0;
}
.map-storage.pending {
  border-style: dashed;
  border-color: #7c713d;
  background: #24231540;
}
.map-storage.pending .map-icon,
.map-storage.pending .map-label {
  color: #d5c581;
}
.map-storage.pending .map-label {
  margin-top: 14px;
}
.map-detail {
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 20px 0;
  background: #10160c;
}
.map-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 22px;
  cursor: pointer;
  font-size: 13px;
  color: #c0d2ae;
  list-style: none;
}
.map-detail summary::-webkit-details-marker {
  display: none;
}
.map-detail summary > span {
  font: 19px var(--mono);
  color: var(--lime);
}
.map-detail[open] summary {
  border-bottom: 1px solid var(--line);
}
.map-detail[open] summary > span {
  transform: rotate(45deg);
}
.map-detail summary:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
.map-detail > div {
  padding: 24px;
}
.map-detail > div > p {
  font-size: 13px;
  color: #aebba3;
  margin: 0 0 16px;
}
.map-detail > div > p:last-child {
  margin: 16px 0 0;
}
.map-detail .map-pair {
  margin-bottom: 20px;
}
.map-code-path {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  border: 1px solid #324324;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}
.map-code-path > span {
  font-size: 12px;
  color: #a2b58f;
}
.map-page code {
  font-size: 11px;
  color: #c9e4b1;
  overflow-wrap: anywhere;
}
.map-code-path code {
  border: 1px solid #455b31;
  padding: 13px 18px;
  line-height: 1.6;
  text-align: center;
  border-radius: 5px;
  background: #1b2812;
}
.map-glossary {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px 24px;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}
.map-glossary dt {
  color: var(--lime);
}
.map-glossary dd {
  margin: 0;
  color: #b1bfa5;
}
.map-note {
  border: 1px solid #716439;
  background: #322d171f;
  border-radius: 7px;
  padding: 21px 24px;
  color: #c8bd97;
  font-size: 13px;
  line-height: 1.8;
  margin: 28px 0;
}
.map-note strong {
  display: block;
  color: #e3d6a6;
  font-size: 14px;
  margin-bottom: 5px;
}
.map-branches.compact {
  margin-top: 20px;
}
.map-action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.map-action-grid > article {
  padding: 23px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.map-action-grid h3 {
  margin-top: 0;
}
.map-action-grid p,
.map-action-grid li {
  font-size: 13px;
  color: #aebba3;
  line-height: 1.8;
}
.map-action-grid ol {
  padding-left: 18px;
  margin: 0;
}
.map-action-grid li + li {
  margin-top: 9px;
}
.map-action-grid li::marker {
  color: var(--lime);
  font: 10px var(--mono);
}
.map-owner {
  max-width: 580px;
  text-align: center;
  margin: auto;
  padding: 26px;
  background: #223318;
  border: 1px solid #77984e;
  border-radius: 8px;
}
.map-owner h3 {
  font-size: 21px;
  color: #dbf1c1;
}
.map-owner p {
  font-size: 13px;
  color: #aebf9e;
  margin: 0;
}
.map-tenant h3 {
  margin: 14px 0;
}
.map-db-root {
  border: 1px solid #739b4a;
  border-radius: 6px;
  padding: 21px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: #1d2c13;
}
.map-db-root code {
  font-size: 16px;
  color: var(--lime);
}
.map-db-root span {
  font-size: 13px;
  color: #b7c6aa;
  line-height: 1.7;
}
.map-drawers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.map-drawers article {
  border: 1px solid #36472a;
  border-radius: 7px;
  background: #131b0e;
  padding: 22px;
  min-width: 0;
}
.map-drawers h3 {
  font-size: 16px;
  margin: 13px 0 20px;
}
.map-drawers dl {
  margin: 0;
}
.map-drawers dt {
  font: 11px/1.6 var(--mono);
  color: #d3e8c0;
  overflow-wrap: anywhere;
}
.map-drawers dd {
  font-size: 12px;
  line-height: 1.8;
  margin: 5px 0 20px;
  color: #aab99c;
}
.map-drawers dd:last-child {
  margin-bottom: 0;
}
.map-file-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.map-file-groups > article {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}
.map-file-groups p {
  font-size: 12px;
  color: #aebba3;
  margin: 10px 0 0;
}
.map-file-table th {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  width: 48%;
  background: #141c0e;
  border-top: 1px solid var(--line);
  line-height: 1.8;
  vertical-align: top;
}
.map-file-table td {
  font-size: 12px;
  line-height: 1.8;
  vertical-align: top;
}
.map-file-table code {
  word-break: break-word;
}
.map-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin: 46px 0 25px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}
.map-pagination .button {
  font-size: 12px;
  padding: 14px 18px;
  gap: 12px;
}
.map-page .footer {
  font-size: 11px;
  color: #a6b397;
}
@media (max-width: 900px) {
  .map-flow,
  .map-flow.two,
  .map-flow.three {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .map-node:not(:last-child):after {
    content: "↓";
    top: auto;
    bottom: -29px;
    right: 50%;
    transform: translateX(50%);
    line-height: 26px;
  }
  .map-action-grid,
  .map-drawers {
    grid-template-columns: 1fr;
  }
  .map-drawers dl {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
  }
  .map-drawers dd {
    margin: 0;
  }
  .map-node {
    padding: 19px;
  }
  .map-node p {
    margin-top: 7px;
  }
  .map-file-groups {
    grid-template-columns: 1fr 1fr;
  }
  .map-section-title h2 {
    font-size: 22px;
  }
  .map-tabs a {
    padding: 17px 14px;
    font-size: 12px;
    gap: 10px;
  }
}
@media (max-width: 600px) {
  .map-intro {
    padding: 39px 0 20px;
  }
  .map-intro h1 {
    font-size: 36px;
    letter-spacing: -1.6px;
  }
  .map-intro > p {
    font-size: 14px;
  }
  .map-tabs {
    margin-bottom: 32px;
  }
  .map-tabs a {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    font-size: 10px;
    padding: 16px 10px;
    line-height: 1.5;
  }
  .map-tabs a > span {
    font-size: 10px;
  }
  .map-pair,
  .map-branches,
  .map-file-groups {
    grid-template-columns: 1fr;
  }
  .map-figure {
    padding: 18px 15px;
  }
  .map-host {
    padding: 18px 14px;
  }
  .map-section {
    margin-top: 33px;
  }
  .map-section-title {
    gap: 12px;
  }
  .map-section-title h2 {
    font-size: 21px;
  }
  .map-section-title > span {
    font-size: 10px;
  }
  .map-person,
  .map-pair > article {
    padding: 22px;
  }
  .map-person p,
  .map-pair article p {
    font-size: 13px;
  }
  .map-detail summary {
    padding: 19px 16px;
    font-size: 12px;
    line-height: 1.6;
  }
  .map-detail > div {
    padding: 18px 15px;
  }
  .map-detail .map-figure {
    padding: 15px 12px;
  }
  .map-glossary {
    grid-template-columns: 85px 1fr;
    gap: 13px;
    font-size: 12px;
  }
  .map-drawers dl {
    display: block;
  }
  .map-drawers dd {
    margin: 5px 0 20px;
  }
  .map-db-root {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .map-code-path {
    padding: 20px 12px;
  }
  .map-code-path > span {
    text-align: center;
    line-height: 1.7;
  }
  .map-code-path code {
    font-size: 10px;
    padding: 12px;
  }
  .map-note {
    padding: 19px;
  }
  .map-file-table th,
  .map-file-table td {
    padding: 12px 10px;
    font-size: 11px;
  }
  .map-file-table code {
    font-size: 9px;
  }
  .map-pagination {
    gap: 12px;
    align-items: stretch;
  }
  .map-pagination .button {
    font-size: 10px;
    padding: 12px;
    line-height: 1.6;
    min-width: 0;
  }
  .map-pagination .text-link {
    font-size: 11px;
  }
  .map-page .footer {
    flex-wrap: wrap;
    gap: 18px;
  }
  .map-page .footer > span {
    display: none;
  }
  .map-page .topbar .nav-actions {
    font-size: 11px;
    gap: 15px;
  }
  .map-page .brand small {
    display: none;
  }
}
@media print {
  .map-page {
    background: white;
    color: #111;
  }
  .map-page .topbar,
  .map-tabs,
  .map-pagination,
  .map-page .footer,
  .skip {
    display: none;
  }
  .map-main {
    width: 100%;
    max-width: none;
  }
  .map-intro {
    padding-top: 0;
  }
  .map-intro h1 {
    font-size: 34px;
  }
  .map-page p,
  .map-page h3,
  .map-page code,
  .map-page span,
  .map-node strong,
  .map-figure figcaption,
  .map-section-title h2 {
    color: #222 !important;
  }
  .map-figure,
  .map-node,
  .map-host,
  .map-storage,
  .map-tenant,
  .map-person,
  .map-owner,
  .map-outcome,
  .map-drawers article,
  .map-action-grid article,
  .map-file-groups article,
  .map-note,
  .map-detail {
    background: white;
    border-color: #888;
    box-shadow: none;
  }
  .map-figure,
  .map-section-title,
  .map-node {
    break-inside: avoid;
  }
  .map-section-title {
    break-after: avoid;
  }
}
