/* structure.armagi.co: page-specific rules on top of base.css */
.ends { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; animation: fade .3s ease-out; }
.end { padding: 18px 20px; border-radius: var(--r); }
.end p { margin: 6px 0 0; font-size: 17px; }
.end.money { background: var(--gold-bg); border: 1px solid var(--gold-line); }
.end.research { background: var(--tint); }
.end.mid { background: #0f1d3d; color: #e6ebf5; }
.end.mid .tag { color: var(--gold-soft); }
.end.mid p { font-weight: 600; }
.ops { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; max-width: 760px; }
.ops li { display: flex; gap: 12px; align-items: baseline; color: var(--ink-2); }
.ops .dir { font-family: var(--mono); color: var(--gold-ink); font-weight: 600; width: 1.5em; }

.trace + .trace { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.trace .tag { color: var(--muted); font-size: 11px; }
.flow { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr); gap: 6px; align-items: stretch; margin-top: 8px; }
.flow > div { padding: 12px 14px; border-radius: 12px; font-size: 15px; }
.flow .end { background: var(--page); }
.flow .mid { background: var(--tint); font-weight: 500; }
.flow .arr { display: grid; place-items: center; color: var(--gold); font-weight: 700; }
#trace .aside { margin-top: 14px; }

.rows { max-width: 760px; }
.row.single { grid-template-columns: minmax(0, 1fr); font-weight: 500; }
.rows.was .row { color: var(--muted); }
.rows.now .row { background: var(--tint); border-color: transparent; color: var(--ink); }

.structure { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.structure .panel + .panel { margin-top: 0; }
.structure .panel:first-child { background: #0f1d3d; color: #e6ebf5; border-color: #0f1d3d; }
.structure .panel:first-child .tag { color: var(--gold-soft); }
.structure .tag { color: var(--muted); }
.structure b { display: block; font-size: 18px; margin-top: 4px; }
.structure ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 15px; }

@media (max-width: 860px) {
  .ends, .structure { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow .arr { transform: rotate(90deg); height: 20px; }
}
