/* Fabric architecture guides: the decision cards, summary table and inline diagrams.
   Loaded after article.css, so --t, --dl-ink, --dl-muted and --dl-line come from .ar.
   Brand palette only: ink, purple and the article's topic colour. */

/* ---- the 10 decisions at a glance */
.fa-table-wrap {
  margin: 22px 0 30px;
  overflow-x: auto;
  border: 1px solid var(--dl-line);
  border-radius: 14px;
  background: #fff;
}

.fa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

/* override the site-wide dark th / bordered cell styles in style.css */
.fa-table th,
.fa-table td {
  padding: 11px 16px;
  border: 0;
  border-bottom: 1px solid var(--dl-line);
  background: transparent;
  color: var(--dl-ink);
  text-align: left;
  vertical-align: top;
}

.fa-table thead th {
  background: #f4f5f7;
  font-weight: 700;
}

.fa-table tbody th {
  width: 34%;
  min-width: 170px;
  font-weight: 700;
}

.fa-table tbody th a {
  color: var(--dl-ink);
  text-decoration: none;
}

.fa-table tbody th a:hover {
  color: var(--dl-purple-dark);
  text-decoration: underline;
}

.fa-table td {
  min-width: 220px;
  color: #444f5d;
}

.fa-table tbody tr:last-child th,
.fa-table tbody tr:last-child td {
  border-bottom: 0;
}

.fa-num {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--t) 14%, #fff);
  font-size: 12px;
  font-weight: 800;
}

/* ---- one decision: default, when to move away, what it costs */
.fa-decision {
  margin: 18px 0 14px;
  border: 1px solid var(--dl-line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.fa-decision dl {
  margin: 0;
}

.fa-decision .fa-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--dl-line);
}

.fa-decision .fa-row:first-child {
  border-top: 0;
  background: color-mix(in srgb, var(--t) 7%, #fff);
}

.fa-decision dt {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
  color: var(--dl-ink);
}

.fa-decision dt i {
  margin-right: 6px;
  color: var(--t);
}

.fa-decision dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
}

.fa-learn {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--dl-muted);
}

.fa-learn i {
  margin-right: 6px;
  color: var(--t);
}

/* ---- inline diagrams */
.fa-diagram {
  margin: 26px 0 30px;
}

.fa-diagram-frame {
  padding: 14px;
  border: 1px solid var(--dl-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(48, 61, 78, 0.07);
}

.fa-diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.fa-diagram figcaption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dl-muted);
}

.fa-svg-title {
  font: 800 17px "Montserrat", sans-serif;
  fill: var(--dl-ink);
}

.fa-svg-phase {
  font: 800 12px "Montserrat", sans-serif;
  letter-spacing: 1.2px;
  fill: var(--t);
}

.fa-svg-name {
  font: 700 14px "Montserrat", sans-serif;
  fill: var(--dl-ink);
}

.fa-svg-note {
  font: 500 12.5px "Montserrat", sans-serif;
  fill: var(--dl-muted);
}

.fa-svg-box {
  fill: #fff;
  stroke: var(--dl-line);
  stroke-width: 1.5;
}

.fa-svg-band {
  fill: color-mix(in srgb, var(--t) 6%, #fff);
  stroke: color-mix(in srgb, var(--t) 24%, #fff);
  stroke-width: 1.25;
}

.fa-svg-badge {
  fill: color-mix(in srgb, var(--t) 16%, #fff);
}

.fa-svg-badge-text {
  font: 800 12px "Montserrat", sans-serif;
  fill: var(--dl-ink);
}

.fa-svg-arrow {
  fill: none;
  stroke: #9aa3ae;
  stroke-width: 1.5;
}

.fa-svg-arrowhead {
  fill: #9aa3ae;
}

/* a text version of each diagram, for screen readers and for anyone who prefers it */
.fa-diagram details {
  margin-top: 8px;
  font-size: 15px;
}

.fa-diagram summary {
  cursor: pointer;
  color: var(--dl-purple-dark);
  font-weight: 700;
}

.fa-diagram details ol {
  margin: 10px 0 0;
  padding-left: 20px;
}

/* ---- review note under the hero */
.fa-review {
  margin: 0 0 24px;
  padding: 14px 18px;
  border-left: 4px solid var(--t);
  border-radius: 0 12px 12px 0;
  background: #f6f7f9;
  font-size: 15px;
  line-height: 1.6;
}

/* ---- FAQ */
.fa-faq details {
  margin: 0 0 10px;
  padding: 14px 18px;
  border: 1px solid var(--dl-line);
  border-radius: 14px;
  background: #fff;
}

.fa-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--dl-ink);
}

.fa-faq details p {
  margin: 10px 0 0;
}

.fa-table tbody th a:focus-visible,
.fa-diagram summary:focus-visible,
.fa-faq summary:focus-visible {
  outline: 3px solid var(--dl-purple);
  outline-offset: 3px;
}

@media (max-width: 575px) {
  /* keep diagram labels readable on phones: scroll sideways instead of shrinking */
  .fa-diagram-frame {
    overflow-x: auto;
  }

  .fa-diagram svg {
    min-width: 600px;
  }

  .fa-decision .fa-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 16px;
  }

  .fa-decision dd {
    font-size: 15px;
  }
}

.fa-diagram-frame:focus-visible {
  outline: 3px solid var(--dl-purple);
  outline-offset: 3px;
}
