/* Ecosystem portal pages (CR-0142): /architecture/, /ecosystem/registry/, /operators/, /ghostllm/architecture/ and the
 * technology pages generated by scripts/website/portal.py. Builds on ghost.css + pages.css tokens; adds no new colours.
 * Every interactive part also works without JavaScript. */

/* the status variants gu-badge--verified / gu-badge--shadow live in ghost.css (used on every page) */

.pt-two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
.pt-uses { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 12px; }
.pt-uses li { border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; background: rgba(255, 255, 255, .5); }
.pt-tally { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.pt-tally li { display: inline-flex; align-items: center; gap: 8px; }
.pt-tally b { font: 600 20px/1 var(--mono); }

/* tables: horizontal scroll inside their own region, never the page */
.pt-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 14px; }
.pt-table-wrap:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.pt-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 40rem; }
.pt-table th, .pt-table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.pt-table thead th { font: 500 11.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); background: var(--mist-bg); }
.pt-table tbody th { font-weight: 600; min-width: 11rem; }
.pt-table code { font-size: 12.5px; overflow-wrap: anywhere; }
.pt-table tr:last-child th, .pt-table tr:last-child td { border-bottom: 0; }
.pt-matrix td { white-space: nowrap; }
.pt-cell { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; font-size: 12.5px; }
.pt-cell--live { background: var(--blue); border-color: var(--blue); color: #fff; }
.pt-cell--experimental { border-style: dashed; }
.pt-cell--none { color: var(--ink-soft); border-style: dotted; }

/* architecture map */
.pt-arch { margin: 0; }
.pt-arch-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 18px; background: rgba(255, 255, 255, .45); }
.pt-arch svg { display: block; width: 100%; min-width: 760px; height: auto; font-family: var(--sans); }
.pt-layer { font: 500 12px/1 var(--mono); letter-spacing: .14em; fill: var(--ink-soft); }
.pt-rule { stroke: var(--border); stroke-width: 1; }
.pt-edge { fill: none; stroke: var(--titanium); stroke-width: 1.2; opacity: .45; transition: opacity .2s, stroke .2s, stroke-width .2s; }
.pt-node rect { fill: var(--porcelain); stroke: var(--ink); stroke-width: 1.4; transition: stroke .2s; }
.pt-node text { font-size: 14px; font-weight: 500; fill: var(--ink); pointer-events: none; }
.pt-node--live rect { fill: var(--blue); stroke: var(--blue); }
.pt-node--live text { fill: #fff; }
.pt-node--deployed rect { stroke: var(--blue); stroke-width: 2; }
.pt-node--experimental rect, .pt-node--verified rect, .pt-node--shadow rect { stroke-dasharray: 6 4; }
.pt-node--development rect, .pt-node--planned rect { stroke-dasharray: 2 4; }
.pt-node:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.pt-node:focus-visible rect, .pt-node:hover rect { stroke: var(--amber); stroke-width: 3; }
.pt-arch.is-focus .pt-edge { opacity: .08; }
.pt-arch.is-focus .pt-edge.is-on { opacity: 1; stroke: var(--blue); stroke-width: 2.4; }
.pt-arch.is-focus .pt-node:not(.is-on) { opacity: .35; }
.pt-arch-info { min-height: 3em; margin: 12px 0 4px; font-size: 15px; }
.pt-layers { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 24px; }
.pt-layer-list ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 14px; }
.pt-layer-list li { display: grid; gap: 4px; }
.pt-layer-list li > a, .pt-table a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: .2em; }
.pt-layer-list li .gu-badge { justify-self: start; }
.pt-layer-list li > span:not(.gu-badge) { font-size: 14.5px; color: var(--ink-soft); }
.pt-layer-list .pt-links { font-size: 13px; }

/* flows and operator blocks */
.pt-flow { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; counter-reset: s; }
.pt-flow li { border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: grid; gap: 6px; align-content: start; counter-increment: s; }
.pt-flow li::before { content: counter(s); font: 600 12px/1 var(--mono); color: var(--blue); }
.pt-flow span { font-size: 14px; color: var(--ink-soft); }
.pt-ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 18px 28px; }
.pt-ops p { margin: 6px 0 0; }
.pt-metrics { margin-bottom: 14px; }

@media (max-width: 900px) {
  .pt-two, .pt-flow { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-edge, .pt-node rect { transition: none; }
}
