/* Target architecture page. Loaded after index-xra.css and built from its tokens. */

/* ---------- the diagram ---------- */
.arch-figure {
  margin: 40px 0 0;
  padding: 22px 24px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.arch-figure-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 24px;
  align-items: baseline;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.arch-figure-title {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
}
.arch-figure-meta {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}
.arch-figure-sub {
  grid-column: 1 / -1;
  font-size: 14px;
  color: var(--text-dim);
}
.iso-scroll {
  overflow-x: auto;
  margin: 6px 0 0;
}
.iso {
  display: block;
  width: 100%;
  height: auto;
}
.iso-hint { display: none; }

.iso-zone {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
}
.iso-face {
  font-family: var(--font-mono);
  font-size: 9.5px;
  fill: var(--text);
}
.iso-t {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 650;
  fill: var(--text);
}
.iso-d {
  font-family: var(--font-mono);
  font-size: 10.5px;
  fill: var(--text-faint);
}
.iso-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  fill: var(--text);
}
.iso-step text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  fill: #fff;
}

.iso-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 14px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 12.5px;
  color: var(--text-faint);
}
.iso-legend li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sw {
  position: relative;
  display: inline-block;
  width: 26px;
  height: 0;
  border-top: 2px solid currentColor;
  color: var(--text);
}
.sw::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -6px;
  border: 5px solid transparent;
  border-left: 7px solid currentColor;
  border-right: 0;
}
.sw-model { color: var(--accent); }
.sw-tool { color: var(--ok); border-top-style: dashed; }
.sw-state { color: var(--ok); }
.sw-token { color: var(--warn); border-top-style: dashed; }
.sw-trace { color: var(--text-faint); border-top-style: dashed; }
.sw-image { color: #9c978d; border-top-style: dotted; }
.sw-handoff { border-top-style: dashed; }
.arch-figure-note {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

/* ---------- one request, end to end ---------- */
.turn-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.turn-steps li {
  padding: 18px 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.turn-no {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.turn-no-model { background: var(--accent); }
.turn-no-state { background: var(--ok); }
.turn-steps h3 {
  margin: 14px 0 6px;
  font-size: 16px;
}
.turn-steps p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dim);
}
.turn-note {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--text-faint);
}

/* ---------- layer by layer ---------- */
.layer-group {
  margin: 40px 0 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.layer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.layer-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layer-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.layer-card .layer-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.layer-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
}
.layer-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dim);
}
.layer-card .layer-parts {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
}
.layer-card .layer-missions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
}

/* ---------- production properties ---------- */
.props {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 32px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.props li {
  padding: 22px 0 24px;
  border-top: 1px solid rgba(251, 250, 247, 0.16);
}
.props h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--text);
}
.props h3::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}
.props p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-dim);
}

/* ---------- next step ---------- */
.arch-close .hero-actions {
  justify-content: flex-start;
  margin-top: 26px;
}

/* ---------- smaller screens ---------- */
@media (max-width: 1040px) {
  .turn-steps,
  .layer-grid,
  .layer-grid-3,
  .props { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .iso { min-width: 980px; }
  .iso-hint {
    display: block;
    margin: 12px 0 0;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
  }
}
@media (max-width: 680px) {
  .arch-figure { padding: 16px; }
  .arch-figure-head { grid-template-columns: 1fr; }
  .arch-figure-meta { grid-column: 1; grid-row: auto; }
  .turn-steps,
  .layer-grid,
  .layer-grid-3,
  .props { grid-template-columns: 1fr; }
}
