/** Script ID: AIAGF-GUIDES-031 */
/** File: public/guides/aiagf-system-map.css */
/** Purpose: Responsive visual layouts for the architecture and state-flow explorer */
/** Owner: AIAGF */
/** Tags: architecture, presentation, state-flow, public */
/** Created: 2026-11-19 */
/** Last-Reviewed: 2026-11-19 */

:root {
  color-scheme: dark;
  font: 16px/1.55 "Segoe UI", system-ui, sans-serif;
  --ground: #08101c;
  --panel: #0f1c30;
  --field: #0b1525;
  --ink: #f0f3f6;
  --muted: #a9bec4;
  --line: #2b4264;
  --focus: #99bae9;
  background: var(--ground);
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse 55% 32rem at 70% 0%, #182c49, transparent);
}
.wrap { width: min(100% - 3rem, 83rem); margin-inline: auto; }
a { color: inherit; text-decoration-color: #628088; text-underline-offset: .25em; }
a:hover { color: var(--focus); text-decoration-color: currentColor; }
input { font: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: .22rem; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { text-wrap: balance; }
ul, ol { margin: 0; padding: 0; }

.skip { position: absolute; inset: .75rem auto auto 1rem; padding: .6rem .9rem; transform: translateY(-200%); background: var(--panel); }
.skip:focus { transform: none; z-index: 3; }
.site-header { border-bottom: 1px solid var(--line); }
.site-links, .site-links nav { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem 1.4rem; }
.site-links { min-height: 4.2rem; justify-content: space-between; padding-block: .5rem; }
.site-links a, .footer a { display: inline-flex; min-height: 2.75rem; align-items: center; }
.brand { font-size: 1.24rem; font-weight: 750; text-decoration: none; }
.site-links nav, .footer { color: var(--muted); font-size: .95rem; }
.intro { padding-block: clamp(1.75rem, 5vw, 4rem) 1.6rem; }
.intro h1 {
  margin-bottom: .85rem;
  font-size: clamp(2.55rem, 6.5vw, 5.6rem);
  letter-spacing: -.065em;
  line-height: 1.03;
}
.intro p { max-width: 62ch; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.25rem); }
.entry-points { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.55fr); align-items: center; gap: 1rem 1.5rem; margin-bottom: 1.5rem; padding: clamp(1rem, 2.5vw, 1.5rem); border: 1px solid var(--line); border-radius: .8rem; background: linear-gradient(125deg, #112441, #0c1727 72%); }
.entry-heading { max-width: 29rem; }
.entry-heading h2 { margin-bottom: .45rem; font-size: clamp(1.35rem, 2.4vw, 1.9rem); letter-spacing: -.035em; line-height: 1.15; }
.entry-heading p:last-child { margin-bottom: 0; color: var(--muted); font-size: .94rem; }
.entry-eyebrow, .start-label { margin-bottom: .35rem; color: var(--focus); font-size: .73rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.start-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.start-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; min-height: 8rem; padding: .75rem; border: 1px solid var(--line); border-top: 2px solid var(--node, var(--focus)); border-radius: .5rem; background: #0b171b99; text-decoration: none; }
.start-card:hover, .start-card:focus-visible { border-color: var(--node, var(--focus)); color: var(--ink); }
.start-card strong { margin-bottom: .25rem; font-size: .98rem; line-height: 1.25; }
.start-description { color: var(--muted); font-size: .83rem; line-height: 1.4; }
.start-action { margin-top: auto; padding-top: .5rem; color: var(--node, var(--focus)); font-size: .82rem; font-weight: 700; }
.future-start { grid-column: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .6rem; margin: -.3rem 0 0; padding-top: .65rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.future-start > span:first-child { color: #f8d086; font-size: .72rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.future-start a { font-weight: 650; }
.toolbar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: end;
  gap: .9rem 1rem;
  margin-bottom: 1rem;
}
.mode-nav, .flow-choice { display: flex; flex-wrap: wrap; gap: .35rem; }
.mode-nav { padding: .25rem; border: 1px solid var(--line); border-radius: .52rem; background: var(--field); }
.mode-nav a, .flow-choice a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .45rem .75rem;
  border-radius: .3rem;
  text-decoration: none;
}
.mode-nav a[aria-current], .flow-choice a[aria-current] {
  background: var(--focus);
  color: #0a1627;
  font-weight: 700;
}
.search { display: grid; width: min(100%, 23rem); gap: .3rem; color: var(--muted); font-size: .9rem; }
.search input { width: 100%; min-height: 2.75rem; padding: .45rem .75rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--field); color: var(--ink); }
.search input::placeholder { color: var(--muted); }

.map-grid { display: grid; grid-template-columns: minmax(0, 1.36fr) minmax(0, 1fr); align-items: start; gap: 1rem; }
.map-panel, .inspector {
  min-width: 0;
  padding: clamp(.9rem, 2.1vw, 1.45rem);
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--panel);
  box-shadow: 0 1rem 3rem #070e1166;
}
.map-panel h2 { margin-bottom: .3rem; font-size: 1.3rem; }
.map-panel p { color: var(--muted); }
.map-panel > div > p { margin-bottom: 1rem; }
.groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin-bottom: 1rem;
  list-style: none;
}
[data-color="amber"] { --node: #f8d086; }
[data-color="cyan"] { --node: #97e3ed; }
[data-color="blue"] { --node: #adc9ff; }
[data-color="rose"] { --node: #ffbaa9; }
[data-color="violet"] { --node: #d9c5fa; }
.groups a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .2rem;
  height: 100%;
  min-height: 4.5rem;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-top: 2px solid var(--node);
  border-radius: .35rem;
  background: var(--field);
  font-size: .95rem;
  font-weight: 680;
  text-decoration: none;
  line-height: 1.3;
}
.groups a[aria-current], .groups a:hover { border-color: var(--node); color: var(--node); }
.groups small { color: var(--muted); font-size: .78rem; font-weight: 450; }
.nodes { display: grid; gap: .45rem; list-style: none; }
.nodes a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .2rem .65rem;
  min-height: 2.85rem;
  padding: .5rem .65rem;
  border: 1px solid var(--line);
  border-radius: .35rem;
  background: var(--field);
  font-weight: 600;
  text-decoration: none;
}
.nodes a:hover, .nodes a[aria-current] { border-color: var(--focus); color: var(--focus); }
.nodes small { color: var(--muted); font-size: .78rem; font-weight: 450; }
.flow-choice { margin-bottom: 1rem; }
.flow-choice a { border: 1px solid var(--line); font-size: .88rem; }
.flow-track { counter-reset: step; gap: .38rem; }
.flow-track li { position: relative; display: grid; grid-template-columns: 1.9rem minmax(0, 1fr); align-items: center; counter-increment: step; }
.flow-track li::before {
  z-index: 1;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--field);
  color: var(--muted);
  content: counter(step);
  font-size: .72rem;
  text-align: center;
  line-height: 1.28rem;
}
.flow-track li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  left: .66rem;
  width: 1px;
  height: calc(100% + .38rem);
  background: var(--line);
  content: "";
}
.flow-track li:has(a[aria-current])::before { background: var(--focus); color: var(--ground); border-color: var(--focus); }
.inspector { border-top: 2px solid var(--node, var(--focus)); overflow-wrap: anywhere; }
.inspector-head > p:first-child { margin-bottom: .4rem; color: var(--node, var(--focus)); font-size: .85rem; font-weight: 650; }
.inspector h2 { margin-bottom: .55rem; font-size: clamp(1.65rem, 3vw, 2.55rem); letter-spacing: -.045em; line-height: 1.14; }
.inspector-head > p:last-child { margin-bottom: 1rem; color: var(--muted); }
.destinations, .connections ul { display: grid; gap: .3rem; list-style: none; }
.destinations a, .connections a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 2.75rem;
  padding: .38rem .65rem;
  border-left: 2px solid var(--line);
  background: var(--field);
  font-weight: 620;
  text-decoration: none;
}
.destinations a:hover, .connections a:hover { border-color: var(--focus); }
.destinations small, .connections small { color: var(--muted); font-weight: 480; font-size: .8rem; }
.connections { margin-top: 1.25rem; }
.connections h3 { margin-bottom: .45rem; font-size: 1rem; }
.connections ul {
  margin-left: .3rem;
  padding-left: .85rem;
  border-left: 1px solid var(--node, var(--focus));
}
.connections li { position: relative; }
.connections li::before {
  position: absolute;
  top: 50%;
  left: -.85rem;
  width: .85rem;
  height: 1px;
  background: var(--node, var(--focus));
  content: "";
}
.flow-navigation { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .4rem 1rem; margin-top: 1.2rem; border-top: 1px solid var(--line); }
.flow-navigation a { min-height: 2.75rem; align-content: center; font-size: .9rem; }
.footer { display: flex; flex-wrap: wrap; gap: .25rem 1.3rem; margin-top: 2.25rem; padding-block: .6rem 1.2rem; border-top: 1px solid var(--line); }

@media (max-width: 60rem) {
  .entry-points { grid-template-columns: 1fr; }
  .entry-heading { max-width: 48rem; }
  .future-start { grid-column: 1; }
  .map-grid { grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); }
  .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 46rem) {
  .wrap { width: calc(100% - 1.7rem); }
  .start-grid { grid-template-columns: 1fr; }
  .start-card { min-height: 0; }
  .map-grid { grid-template-columns: 1fr; }
  .groups a { min-height: 3.65rem; }
  .inspector { scroll-margin-top: 1rem; }
}
@media (forced-colors: active) {
  [aria-current] { outline: 2px solid Highlight; outline-offset: -2px; }
}
