/* Components used only by the four-part Briefing Engine guide (/briefing-engine/).
   The rules come from the standalone documents the guide was written as; the
   shared guide reader (guide-editorial.css) supplies everything else. */

/* Sections */
.eg-article .project-section > h2:first-child { margin-top: 0; }
.eg-article .project-section + .project-section { border-top: 1px solid var(--eg-rule); padding-top: 36px; margin-top: 45px; }

/* Tables */
.eg-article .table-holder { margin: 22px 0 28px; }
.eg-article .table-holder table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 15px; text-align: left; }
.eg-article .table-holder th,
.eg-article .table-holder td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--eg-rule); overflow-wrap: anywhere; line-height: 1.6; }
.eg-article .table-holder th:first-child { width: 36%; }
.eg-article .table-holder thead th { font-weight: 600; background: #f0f4f6; color: #263e4c; }
.eg-article .table-holder tbody th { font-weight: 550; background: transparent; color: var(--eg-ink); }
.eg-article .run-log td:first-child,
.eg-article .run-log th:first-child { font-variant-numeric: tabular-nums; }
.eg-article .table-holder .run-log th:first-child { width: 18%; }
.eg-article .table-holder .run-log tbody th { white-space: nowrap; overflow-wrap: normal; }
.eg-article .table-holder .changes th:first-child { width: 24%; }

/* Numbered steps */
.eg-article ol.execution-steps { list-style: decimal outside; padding: 0 0 0 1.65em; margin: 16px 0 27px; }
.eg-article ol.execution-steps > li { padding-left: .35em; margin: 0 0 15px; }
.eg-article ol.execution-steps > li::marker { font: 600 .94em var(--eg-sans); color: var(--eg-ink); font-variant-numeric: tabular-nums; }

/* Diagrams */
.eg-article .system-map { margin: 26px 0 30px; padding: 10px 8px 0; border: 1px solid var(--eg-rule); background: #f5f7f8; }
.eg-article .system-map figcaption { margin: 0; padding: 9px 11px 12px; text-align: left; font: 400 13px/1.55 var(--eg-sans); color: #495e69; }
.system-map .architecture-view { display: block; width: 100%; height: auto; font-family: var(--eg-sans); font-variant-ligatures: none; }
.system-map .arch-mobile { display: none; }
.system-map .node,
.system-map .external { fill: #fff; stroke: #adbdc5; stroke-width: 1.1; }
.system-map .flow-ext { fill: #fff; stroke: #adbdc5; stroke-width: 1.1; stroke-dasharray: 4 3; }
.system-map .frame { fill: #fbfcfc; stroke: #adbdc5; stroke-width: 1.1; }
.system-map .docker-frame { fill: #f2f6f8; stroke: #668594; stroke-width: 1.2; }
.system-map .db,
.system-map .layer-base { fill: #e8f1f4; stroke: #668594; stroke-width: 1.3; }
.system-map .worker-node { fill: #eaf2ed; stroke: #748b7e; stroke-width: 1.3; }
.system-map .layer-demo { fill: #fbfcfc; stroke: #748b7e; stroke-width: 1.4; stroke-dasharray: 7 5; }
.system-map .wire { stroke: #48616c; stroke-width: 1.45; fill: none; }
.system-map .label { font-size: 16px; font-weight: 640; fill: #203745; }
.system-map .core-title { font-size: 20px; font-weight: 650; fill: #183442; }
.system-map .detail { font-size: 13px; font-weight: 400; fill: #3d515c; }
.system-map .edge { font-size: 12px; font-weight: 550; fill: #405963; }

/* Screenshot */
.eg-article .screenshot { margin: 28px 0 32px; }
.eg-article .screenshot img { display: block; width: 100%; height: auto; border: 1px solid var(--eg-rule); }
.eg-article .screenshot figcaption { margin-top: 10px; }

/* Expandable reference sections */
.eg-article .reference-group { margin: 0; border-top: 1px solid var(--eg-rule); }
.eg-article .reference-group:last-child { border-bottom: 1px solid var(--eg-rule); }
.eg-article .reference-group > summary { display: list-item; padding: 18px 2px; color: var(--eg-ink); line-height: 1.5; }
.eg-article .reference-group > summary h3 { display: inline; margin: 0; font-size: 18px; line-height: 1.5; letter-spacing: normal; font-weight: 600; }
.eg-article .reference-group > summary:hover { color: var(--eg-accent); }
.eg-article .reference-group > summary:hover h3 { color: inherit; }
.eg-article .reference-content { min-width: 0; padding: 0 0 24px; }
.eg-article .reference-content h4 { font: 650 20px/1.4 var(--eg-sans); color: var(--eg-ink); margin: 30px 0 15px; letter-spacing: -.015em; }
.eg-article .reference-content h5 { font: 600 17px/1.5 var(--eg-sans); color: var(--eg-ink); margin: 25px 0 12px; }
.eg-article .reference-content > h4:first-child { margin-top: 4px; }
.eg-article .reference-content > p:last-child { margin-bottom: 0; }

@media (max-width: 650px) {
  .system-map .arch-wide { display: none; }
  .system-map .arch-mobile { display: block; }
  .system-map .arch-mobile .label { font-size: 14px; }
  .system-map .arch-mobile .core-title { font-size: 17px; }
  .system-map .arch-mobile .detail { font-size: 12px; }
  .system-map .arch-mobile .edge { font-size: 11px; }
}

@media (max-width: 540px) {
  .eg-article .table-holder th,
  .eg-article .table-holder td { font-size: 14px; padding: 10px 7px; }
  .eg-article .table-holder th:first-child { width: 38%; }
  .eg-article .table-holder .run-log th:first-child { width: 27%; }
  .eg-article .project-section + .project-section { margin-top: 32px; padding-top: 24px; }
  .eg-article .reference-group > summary h3 { font-size: 17px; }
  .eg-article .reference-content h4 { font-size: 19px; }
  .eg-article .reference-content table { font-size: 14px; }
}

@media print {
  .system-map { break-inside: avoid; }
  .eg-article .reference-group > summary { break-after: avoid; }
  .eg-article .reference-content h4,
  .eg-article .reference-content h5 { break-after: avoid; }
}
