@font-face {
    font-family: "AMI Mono";
    src: url("fonts/jetbrains-mono-regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "AMI Mono";
    src: url("fonts/jetbrains-mono-semibold.ttf") format("truetype");
    font-style: normal;
    font-weight: 600 800;
    font-display: swap;
}

@font-face {
    font-family: "AMI Narrow";
    src: url("fonts/liberation-sans-narrow-regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "AMI Narrow";
    src: url("fonts/liberation-sans-narrow-bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --black: #090b09;
    --graphite: #101310;
    --graphite-2: #171b17;
    --graphite-3: #202620;
    --graphite-4: #2a312b;
    --text: #f2f5ef;
    --muted: #bac2ba;
    --line: #4b554d;
    --line-strong: #7b877d;
    --acid: #35f28a;
    --acid-dark: #075732;
    --violet: #b68cff;
    --pink: #ff5c9a;
    --yellow: #f5dd4c;
    --error: #ff8178;
    --success: #53f49a;
    --focus: #f5dd4c;
    --gutter: clamp(1rem, 4vw, 4rem);
    --measure: 70ch;
    --content-max: 100rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    background: var(--black);
    color: var(--text);
    font-family: "AMI Narrow", "Nimbus Sans Narrow", sans-serif;
    font-size: 1.08rem;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

button {
    font: inherit;
}

button,
a {
    touch-action: manipulation;
}

a {
    color: var(--acid);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
}

a:hover {
    color: var(--yellow);
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--text);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-weight: 600;
    line-height: 1.08;
    text-wrap: balance;
}

h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(2.65rem, 5.2vw, 4.8rem);
    letter-spacing: -0.055em;
}

h2 {
    margin-bottom: 0.75rem;
    font-size: clamp(1.75rem, 2.8vw, 2.65rem);
    letter-spacing: -0.04em;
}

h3 {
    margin-bottom: 0.5rem;
    font-size: 1.08rem;
    letter-spacing: -0.02em;
}

img,
svg {
    max-width: 100%;
}

.shell {
    width: min(calc(100% - (var(--gutter) * 2)), var(--content-max));
    margin-left: var(--gutter);
    margin-right: auto;
}

.sr-only {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1000;
    padding: 0.7rem 1rem;
    background: var(--yellow);
    color: var(--black);
    border: 2px solid var(--black);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--black);
    border-top: 4px solid var(--acid);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    min-height: 4.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.brand {
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    font-family: "AMI Mono", ui-monospace, monospace;
    text-decoration: none;
}

.brand:hover {
    color: var(--text);
}

.brand-mark {
    width: 2.15rem;
    height: 2.15rem;
    flex: 0 0 auto;
    overflow: visible;
    fill: var(--black);
    stroke: var(--acid);
    stroke-width: 1.7;
}

.brand-mark-core {
    fill: var(--pink);
    stroke: var(--black);
}

.brand-lockup {
    display: flex;
    flex-direction: column;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: 0.02em;
}

.brand-signal {
    color: var(--acid);
}

.brand-expansion {
    margin-top: 0.2rem;
    color: var(--muted);
    font-family: "AMI Narrow", "Nimbus Sans Narrow", sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.primary-nav {
    display: flex;
    align-items: stretch;
    align-self: stretch;
}

.primary-nav a {
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    padding-inline: 0.78rem;
    color: var(--muted);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
    background: var(--graphite-3);
    color: var(--acid);
    border-color: var(--line);
}

.nav-toggle {
    display: none;
    min-width: 4.5rem;
    min-height: 2.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-family: "AMI Mono", ui-monospace, monospace;
    cursor: pointer;
}

.architecture-notice {
    position: relative;
    background: var(--yellow);
    color: var(--black);
    border-bottom: 4px solid var(--pink);
}

.architecture-notice-grid {
    min-height: 11rem;
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 3rem);
    align-items: center;
    padding-block: 1.4rem;
}

.notice-mark {
    width: 4rem;
    overflow: visible;
    fill: none;
    stroke: var(--black);
    stroke-linecap: square;
    stroke-linejoin: miter;
    stroke-width: 4;
}

.notice-mark path:last-child {
    stroke-width: 5;
}

.architecture-notice h2 {
    margin-bottom: 0.45rem;
    color: var(--black);
    font-size: clamp(1.55rem, 2.4vw, 2.3rem);
}

.architecture-notice p {
    max-width: 75ch;
    margin-bottom: 0;
}

.notice-kicker,
.hero-overline,
.designation-syntax,
.agent-register-label,
.skill-code,
.class-code {
    font-family: "AMI Mono", ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

.notice-kicker {
    margin-bottom: 0.45rem !important;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero {
    position: relative;
    padding-block: clamp(3rem, 6vw, 5.5rem);
    background: var(--black);
    border-bottom: 1px solid var(--line);
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: min(22rem, 50vw);
    height: 5px;
    background: var(--pink);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(18rem, 0.72fr) minmax(32rem, 1.28fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: center;
}

.hero-copy {
    max-width: 42rem;
    padding-left: 1.4rem;
    border-left: 0.45rem solid var(--acid);
}

.hero-overline {
    margin-bottom: 1rem;
    color: var(--yellow);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lede {
    max-width: 42rem;
    margin-bottom: 1.75rem;
    color: #d2d8d2;
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    line-height: 1.48;
}

.lede-small {
    max-width: var(--measure);
    font-size: 1.18rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.button {
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    border: 2px solid var(--acid);
    border-radius: 0;
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.button-primary {
    background: var(--acid);
    color: var(--black);
}

.button-primary:hover {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--black);
}

.button-secondary {
    background: transparent;
    color: var(--text);
}

.button-secondary:hover {
    background: var(--text);
    border-color: var(--text);
    color: var(--black);
}

.button-on-dark {
    border-color: var(--line-strong);
    color: var(--text);
}

.agent-instrument {
    min-width: 0;
    margin: 0;
    background: var(--graphite);
    border: 1px solid var(--line-strong);
}

.agent-instrument figcaption {
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    color: var(--muted);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.agent-instrument figcaption strong {
    color: var(--yellow);
    font-weight: 600;
}

.agent-map {
    display: block;
    width: 100%;
    height: auto;
    padding: 0.5rem;
    background: var(--black);
    border-bottom: 1px solid var(--line);
}

.agent-links path {
    fill: none;
    stroke: #7e8b80;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.agent-links .channel-violet {
    stroke: var(--violet);
}

.agent-links .channel-pink {
    stroke: var(--pink);
}

.agent-nodes circle,
.agent-nodes rect {
    fill: var(--graphite-2);
    stroke: var(--acid);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.agent-nodes .node-violet {
    fill: var(--violet);
    stroke: var(--black);
}

.agent-nodes .node-pink {
    fill: var(--pink);
    stroke: var(--black);
}

.agent-nodes .node-yellow {
    fill: var(--yellow);
    stroke: var(--black);
}

.agent-nodes .node-acid,
.agent-nodes .node-model {
    fill: var(--acid);
    stroke: var(--black);
}

.agent-labels {
    fill: var(--muted);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 13px;
    font-weight: 600;
}

.system-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0;
}

.system-summary > div {
    min-width: 0;
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.8rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.system-summary > div:nth-child(even) {
    border-right: 0;
}

.system-summary > div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.system-summary dt {
    color: var(--acid);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.system-summary dd {
    min-width: 0;
    margin: 0;
    color: var(--text);
    font-size: 0.94rem;
    overflow-wrap: anywhere;
}

.section,
.page-header {
    position: relative;
    background: var(--black);
    border-top: 1px solid var(--line);
}

.section {
    padding-block: clamp(3.5rem, 6vw, 6rem);
}

.section::before {
    position: absolute;
    top: 1rem;
    right: var(--gutter);
    color: var(--line-strong);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

#capabilities::before {
    content: "01 / OPERATING PRINCIPLES";
}

#naming::before {
    content: "02 / DESIGNATIONS";
}

#specialists::before {
    content: "03 / SPECIALIST REGISTER";
}

#combinations::before {
    content: "04 / COMBINED AGENTS";
}

#skills::before {
    content: "05 / SKILL CATALOG";
}

#architecture::before {
    content: "06 / MACHINE LAYER";
}

.section-ink,
.section-dark,
.section-muted,
.section-rule {
    background: var(--black);
    color: var(--text);
}

.section-heading {
    max-width: 66rem;
    margin-bottom: 2rem;
}

.section-heading > p,
.section-heading > div > p {
    max-width: var(--measure);
    margin-bottom: 0;
    color: var(--muted);
}

.split-heading {
    max-width: none;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.text-link {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.82rem;
    font-weight: 600;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line-strong);
    border-left: 1px solid var(--line-strong);
}

.principle {
    min-width: 0;
    min-height: 16rem;
    padding: 1.5rem;
    border-right: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
}

.principle p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.principle-number,
.profile-code,
.catalog-code,
.footer-protocol {
    font-family: "AMI Mono", ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.principle-number {
    margin-bottom: 3rem;
    color: var(--acid);
    font-size: 2.25rem;
    line-height: 1;
}

.principle:nth-child(2) .principle-number {
    color: var(--violet);
}

.principle:nth-child(3) .principle-number {
    color: var(--pink);
}

.anchor-alias {
    position: absolute;
    top: -5.5rem;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.designation-syntax {
    max-width: none !important;
    margin: 0;
    padding: 0.75rem 0.9rem;
    color: var(--yellow) !important;
    font-size: 0.82rem;
    border-top: 2px solid var(--yellow);
    border-bottom: 1px solid var(--line-strong);
    white-space: nowrap;
}

.designation-syntax strong {
    margin-right: 0.75rem;
    color: var(--muted);
    font-size: 0.65rem;
}

.classification-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 2rem;
    border-top: 1px solid var(--line-strong);
    border-left: 1px solid var(--line-strong);
}

.classification-grid article {
    min-width: 0;
    min-height: 12rem;
    padding: 1.2rem;
    border-right: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
}

.classification-grid article:nth-child(2) {
    background: var(--graphite-2);
}

.classification-grid article:nth-child(3) {
    background: var(--graphite-3);
}

.classification-grid article:nth-child(4) {
    border-top: 0.35rem solid var(--yellow);
}

.classification-grid h3 {
    margin-top: 2rem;
}

.classification-grid article > p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.class-code {
    margin-bottom: 0;
    color: var(--acid);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 600;
    line-height: 1;
}

.classification-grid article:nth-child(2) .class-code {
    color: var(--violet);
}

.classification-grid article:nth-child(3) .class-code {
    color: var(--pink);
}

.classification-grid article:nth-child(4) .class-code {
    color: var(--yellow);
}

.production-skill-register {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--line-strong);
    border-left: 1px solid var(--line-strong);
}

.production-skill-register article {
    min-width: 0;
    min-height: 14rem;
    padding: 1rem;
    border-right: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
}

.production-skill-register article:nth-child(odd) {
    background: var(--graphite-2);
}

.production-skill-register article > p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.96rem;
}

.skill-code {
    margin-bottom: 2.5rem;
    color: var(--acid);
    font-size: 1.1rem;
    font-weight: 600;
}

.agent-register {
    border-top: 1px solid var(--line-strong);
    border-left: 1px solid var(--line-strong);
}

.agent-register-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(16rem, 0.8fr) minmax(22rem, 1.35fr) minmax(15rem, 0.7fr);
    gap: 0;
    align-items: stretch;
    border-right: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
}

.agent-register-row:nth-child(even) {
    background: var(--graphite-2);
}

.agent-register-row > div {
    min-width: 0;
    padding: 1rem;
    border-right: 1px solid var(--line);
}

.agent-identity h3 {
    font-size: clamp(1.15rem, 1.8vw, 1.55rem);
}

.agent-identity h3 span {
    color: var(--yellow);
    white-space: nowrap;
}

.agent-identity > p:last-child {
    max-width: 60ch;
    margin-bottom: 0;
    color: var(--muted);
}

.agent-register-label {
    margin-bottom: 0.55rem;
    color: var(--acid);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.agent-register-value {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.agent-register-detail {
    max-width: 60ch;
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.combination-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line-strong);
    border-left: 1px solid var(--line-strong);
}

.combination-example {
    min-width: 0;
    padding: 1.25rem;
    border-right: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
}

.combination-example:nth-child(4n + 2),
.combination-example:nth-child(4n + 3) {
    background: var(--graphite-2);
}

.combination-example header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1.5rem;
}

.combination-example h3 {
    font-size: clamp(1.15rem, 1.8vw, 1.5rem);
}

.combination-example h3 span {
    color: var(--yellow);
    white-space: nowrap;
}

.combination-count {
    flex: 0 0 auto;
    margin: 0;
    color: var(--muted);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.72rem;
}

.combination-skill-line {
    margin: 1.25rem 0;
    padding-block: 0.65rem;
    color: var(--acid);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.65;
    overflow-wrap: anywhere;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.combination-example > p:last-child {
    max-width: 70ch;
    margin-bottom: 0;
    color: var(--muted);
}

.table-region {
    max-width: 100%;
    overflow-x: auto;
    background: var(--graphite);
    border: 1px solid var(--line-strong);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.product-table {
    min-width: 68rem;
}

.architecture-table {
    min-width: 60rem;
}

th,
td {
    padding: 0.9rem;
    vertical-align: top;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

tr > *:last-child {
    border-right: 0;
}

thead th {
    background: var(--acid);
    color: var(--black);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
}

tbody th {
    color: var(--text);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.92rem;
}

tbody tr:last-child > * {
    border-bottom: 0;
}

tbody tr:hover {
    background: var(--graphite-3);
}

.number {
    white-space: nowrap;
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.83rem;
    font-variant-numeric: tabular-nums;
}

.availability-key {
    max-width: 22rem;
    margin: 0;
    padding: 0.7rem 0.9rem;
    color: var(--text);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.77rem;
    border-left: 0.35rem solid var(--pink);
    background: var(--graphite-2);
}

.skill-catalog-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line-strong);
    border-left: 1px solid var(--line-strong);
}

.skill-catalog-item {
    min-width: 0;
    min-height: 14rem;
    display: block;
    padding: 1.2rem;
    border-right: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
}

.catalog-code {
    margin-bottom: 2rem;
    color: var(--acid);
    font-size: 1.65rem;
    line-height: 1;
}

.skill-catalog-item:nth-child(4n + 2) .catalog-code {
    color: var(--violet);
}

.skill-catalog-item:nth-child(4n + 3) .catalog-code {
    color: var(--pink);
}

.skill-catalog-item:nth-child(4n + 4) .catalog-code {
    color: var(--yellow);
}

.skill-catalog-item p {
    margin-bottom: 0.65rem;
    color: var(--muted);
    font-size: 0.98rem;
}

.availability,
.profile-status {
    color: var(--text) !important;
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.68rem !important;
}

.safety-note,
.legal-warning {
    margin-top: 1.5rem;
    padding: 1.25rem;
    color: var(--text);
    border: 1px solid var(--pink);
    border-left-width: 0.45rem;
    background: var(--graphite-2);
}

.safety-note p,
.legal-warning p {
    margin-bottom: 0;
}

.compact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: stretch;
    padding: clamp(1.5rem, 4vw, 3rem);
    background: var(--acid);
    color: var(--black);
}

.compact-grid h2,
.compact-grid a {
    color: var(--black);
}

.ternary-signature {
    display: flex;
    width: fit-content;
    margin-bottom: 2.25rem;
    color: var(--black);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 1.4rem;
    font-weight: 600;
}

.ternary-signature span {
    min-width: 4.25rem;
    padding: 0.5rem 0.75rem;
    text-align: center;
    border: 2px solid var(--black);
    border-right: 0;
}

.ternary-signature span:last-child {
    border-right: 2px solid var(--black);
}

.link-list {
    align-self: end;
    border-top: 2px solid var(--black);
}

.link-list a {
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--black);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

.page-header {
    padding-block: clamp(2.5rem, 5vw, 4.5rem);
    background: var(--graphite);
    border-bottom: 5px solid var(--acid);
}

.page-header-grid {
    display: grid;
    grid-template-columns: minmax(17rem, 0.65fr) minmax(26rem, 1.35fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: end;
}

.page-header h1 {
    margin-bottom: 0;
    font-size: clamp(2.4rem, 4vw, 4rem);
}

.page-header-grid > p,
.legal-notice p {
    margin-bottom: 0;
    color: var(--muted);
}

.revision-date {
    margin: 1rem 0 0;
    color: var(--yellow);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.76rem;
}

.legal-notice {
    padding: 1rem 1.25rem;
    border: 1px solid var(--pink);
    border-left-width: 0.45rem;
}

.legal-notice h2 {
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.profile-index {
    padding-block: 3.5rem;
}

.index-links {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line-strong);
    border-left: 1px solid var(--line-strong);
}

.index-links a {
    min-height: 5.2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.65rem 0.8rem;
    border-right: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    color: var(--acid);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.82rem;
    text-decoration: none;
}

.index-links a:nth-child(5n + 2) {
    color: var(--violet);
}

.index-links a:nth-child(5n + 3) {
    color: var(--pink);
}

.index-links a:nth-child(5n + 4) {
    color: var(--yellow);
}

.index-links a:hover {
    background: var(--graphite-3);
    color: var(--text);
}

.index-links span {
    margin-top: 0.25rem;
    color: var(--muted);
    font-family: "AMI Narrow", "Nimbus Sans Narrow", sans-serif;
    font-size: 0.82rem;
    line-height: 1.2;
}

.profile-list {
    border-top: 1px solid var(--line-strong);
}

.tech-profile {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(15rem, 0.42fr) minmax(0, 1.58fr);
    border-right: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    border-left: 1px solid var(--line-strong);
}

.tech-profile > header {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--graphite-2);
    border-right: 1px solid var(--line-strong);
}

.tech-profile h3 {
    margin-bottom: 0;
}

.profile-code {
    margin-bottom: 1.5rem;
    color: var(--acid);
    font-size: 1.65rem;
    line-height: 1;
}

.tech-profile:nth-child(4n + 2) .profile-code {
    color: var(--violet);
}

.tech-profile:nth-child(4n + 3) .profile-code {
    color: var(--pink);
}

.tech-profile:nth-child(4n + 4) .profile-code {
    color: var(--yellow);
}

.profile-header-actions {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 0.75rem;
}

.profile-status {
    margin: 0;
}

.profile-toggle {
    display: none;
    min-height: 2.75rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--acid);
    border-radius: 0;
    background: transparent;
    color: var(--acid);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.72rem;
    cursor: pointer;
}

.profile-toggle span {
    display: inline-block;
    margin-left: 0.5rem;
    color: var(--yellow);
    font-size: 1rem;
}

.spec-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0;
}

.spec-list > div {
    min-width: 0;
    display: grid;
    grid-template-columns: 7.4rem minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.7rem 0.85rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.spec-list > div:nth-child(even) {
    border-right: 0;
}

.spec-list > div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.spec-list dt {
    color: var(--acid);
    font-family: "AMI Mono", ui-monospace, monospace;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
}

.spec-list dd {
    min-width: 0;
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.revision-note {
    max-width: var(--measure);
    margin: 2.5rem 0 0;
    padding: 1rem;
    color: var(--muted);
    border-left: 0.35rem solid var(--violet);
    background: var(--graphite-2);
}

.legal-layout {
    display: grid;
    grid-template-columns: 16rem minmax(0, 50rem);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: start;
    padding-block: clamp(3rem, 6vw, 5rem);
}

.terms-nav {
    position: sticky;
    top: 6rem;
    padding: 1.15rem;
    border: 1px solid var(--line-strong);
    border-top: 0.4rem solid var(--yellow);
    background: var(--graphite-2);
}

.terms-nav h2 {
    font-size: 1.05rem;
    letter-spacing: 0;
}

.terms-nav ol {
    margin: 0;
    padding-left: 1.4rem;
}

.terms-nav a {
    min-height: 2.15rem;
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    font-size: 0.92rem;
}

.terms-nav a:hover {
    color: var(--acid);
}

.legal-document {
    max-width: var(--measure);
}

.legal-document section {
    padding-block: 0.25rem 2.25rem;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 6rem;
}

.legal-document section + section {
    padding-top: 2.25rem;
}

.legal-document h2 {
    color: var(--acid);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.legal-document h3 {
    margin-top: 1.8rem;
    color: var(--text);
}

.legal-document p,
.legal-document li {
    color: #d5dbd5;
}

.legal-document li + li {
    margin-top: 0.45rem;
}

.legal-warning {
    margin-block: 1.25rem;
}

.site-footer {
    padding-block: 2.5rem;
    background: var(--black);
    color: var(--text);
    border-top: 5px solid var(--violet);
}

.footer-inner {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 2rem;
}

.footer-inner p {
    margin-bottom: 0;
}

.footer-protocol {
    margin-top: 0.65rem !important;
    color: var(--muted);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.footer-inner a {
    min-width: 2.75rem;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    color: var(--muted);
}

@media (max-width: 75rem) {
    .architecture-notice-grid {
        grid-template-columns: 4rem minmax(0, 1fr);
    }

    .hero-grid,
    .page-header-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-copy {
        max-width: 56rem;
    }

    .skill-catalog-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .production-skill-register {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .index-links {
        grid-template-columns: repeat(4, 1fr);
    }

    .tech-profile {
        grid-template-columns: minmax(13rem, 0.35fr) minmax(0, 1.65fr);
    }
}

@media (max-width: 58rem) {
    .header-inner {
        flex-wrap: wrap;
        gap: 0;
        padding-block: 0.4rem;
    }

    .js .nav-toggle {
        display: inline-block;
    }

    .primary-nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        padding-top: 0.5rem;
    }

    .js .primary-nav {
        display: none;
    }

    .js .primary-nav[data-open="true"] {
        display: grid;
    }

    .primary-nav a {
        border: 1px solid var(--line);
        margin: -1px 0 0 -1px;
    }

    .split-heading,
    .footer-inner {
        align-items: start;
        flex-direction: column;
    }

    .principles-grid,
    .compact-grid,
    .legal-layout {
        grid-template-columns: 1fr;
    }

    .classification-grid,
    .production-skill-register {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agent-register-row {
        grid-template-columns: 1fr 1fr;
    }

    .agent-register-row .agent-identity {
        grid-column: 1 / -1;
        border-bottom: 1px solid var(--line);
    }

    .principle {
        min-height: 0;
    }

    .principle-number {
        margin-bottom: 1.5rem;
    }

    .skill-catalog-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .skill-catalog-item {
        min-height: 0;
    }

    .terms-nav {
        position: static;
    }

    .terms-nav ol {
        columns: 2;
        column-gap: 2rem;
    }

    .tech-profile {
        display: block;
    }

    .tech-profile > header {
        min-height: 0;
        flex-direction: row;
        align-items: end;
        border-right: 0;
    }

    .profile-header-actions {
        align-items: end;
    }

    .profile-toggle {
        display: inline-flex;
        align-items: center;
    }

    .js .page-technical .tech-profile .spec-list {
        display: none;
    }

    .js .page-technical .tech-profile[data-open="true"] .spec-list {
        display: grid;
    }
}

@media (max-width: 42rem) {
    :root {
        --gutter: 0.85rem;
    }

    body {
        font-size: 1rem;
    }

    h1 {
        font-size: clamp(2.25rem, 12vw, 3.25rem);
    }

    .brand-expansion {
        display: none;
    }

    .architecture-notice-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
        padding-block: 1.15rem;
    }

    .notice-mark {
        width: 3.25rem;
    }

    .hero,
    .section,
    .page-header {
        padding-block: 2.75rem;
    }

    .hero-grid {
        gap: 2rem;
    }

    .hero-copy {
        padding-left: 1rem;
    }

    .button-row {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .agent-instrument figcaption {
        align-items: start;
        flex-direction: column;
        gap: 0.25rem;
    }

    .system-summary {
        grid-template-columns: 1fr;
    }

    .designation-syntax {
        width: 100%;
        white-space: normal;
    }

    .classification-grid article {
        min-height: 10.5rem;
        padding: 0.9rem;
    }

    .classification-grid h3 {
        margin-top: 1.25rem;
    }

    .production-skill-register article {
        min-height: 0;
        padding: 0.9rem;
    }

    .skill-code {
        margin-bottom: 1.25rem;
    }

    .agent-register-row {
        display: block;
    }

    .agent-register-row > div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .system-summary > div,
    .system-summary > div:nth-child(even),
    .system-summary > div:nth-last-child(-n + 2) {
        grid-template-columns: 7rem minmax(0, 1fr);
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .system-summary > div:last-child {
        border-bottom: 0;
    }

    .section::before {
        top: 0.65rem;
        right: var(--gutter);
        font-size: 0.58rem;
    }

    .skill-catalog-list {
        grid-template-columns: 1fr 1fr;
    }

    .skill-catalog-item {
        padding: 0.9rem;
    }

    .catalog-code {
        margin-bottom: 1.25rem;
        font-size: 1.3rem;
    }

    .skill-catalog-item h3 {
        font-size: 0.9rem;
        overflow-wrap: anywhere;
    }

    .skill-catalog-item p {
        font-size: 0.88rem;
    }

    .compact-grid {
        padding: 1.15rem;
    }

    .ternary-signature {
        width: 100%;
    }

    .ternary-signature span {
        min-width: 0;
        flex: 1;
    }

    .index-links {
        grid-template-columns: 1fr 1fr;
    }

    .combination-grid {
        grid-template-columns: 1fr;
    }

    .combination-example:nth-child(n) {
        background: transparent;
    }

    .combination-example:nth-child(even) {
        background: var(--graphite-2);
    }

    .combination-example header {
        align-items: start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .tech-profile > header {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-header-actions {
        align-items: stretch;
    }

    .profile-toggle {
        justify-content: space-between;
    }

    .spec-list,
    .js .page-technical .tech-profile[data-open="true"] .spec-list {
        grid-template-columns: 1fr;
    }

    .spec-list > div,
    .spec-list > div:nth-child(even),
    .spec-list > div:nth-last-child(-n + 2) {
        grid-template-columns: 6.5rem minmax(0, 1fr);
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .spec-list > div:last-child {
        border-bottom: 0;
    }

    .terms-nav ol {
        columns: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    .site-header,
    .site-footer,
    .skip-link,
    .button-row,
    .terms-nav,
    .profile-toggle,
    .section::before {
        display: none !important;
    }

    body,
    .section,
    .page-header,
    .section-muted,
    .section-dark,
    .section-ink,
    .tech-profile > header {
        background: white !important;
        color: black !important;
    }

    h1,
    h2,
    h3,
    p,
    li,
    dt,
    dd {
        color: black !important;
    }

    .legal-layout {
        display: block;
    }

    .spec-list {
        display: grid !important;
    }
}

/* Generated project identity; existing controls and layout remain unchanged. */
header img.project-generated-logo{display:block;width:44px!important;height:44px!important;object-fit:contain!important;flex:0 0 44px;background:#08070a;border-radius:3px;}

/* PATTALIUM_CONTROLLER_START */
.pattalium-controller-active :focus { outline: 3px solid #dcc4ff !important; outline-offset: 4px !important; }
.ptl-pad-hint, .ptl-pad-help, .ptl-pad-keyboard { color-scheme: dark; font: 400 14px/1.5 system-ui,sans-serif; color: #f1ecfa; background: #21182c; border: 1px solid #8a739f; box-shadow: 0 8px 32px #0008; }
.ptl-pad-hint { position: fixed; z-index: 2147483000; bottom: max(14px, env(safe-area-inset-bottom)); right: max(14px, env(safe-area-inset-right)); max-width: min(340px,calc(100vw - 28px)); padding: 10px 14px; min-height: 44px; border-radius: 8px; cursor: pointer; }
.ptl-pad-hint[hidden] { display: none; }
.ptl-pad-cursor { pointer-events:none; position:fixed; z-index:2147483003; width:20px; height:20px; border:2px solid #fff; outline:2px solid #533773; border-radius:50%; transform:translate(-50%,-50%); box-shadow:0 0 18px #a877d4; }
.ptl-pad-help { z-index: 2147483001; width: min(440px,calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; padding: 28px; border-radius: 14px; }
.ptl-pad-help::backdrop { background: #08050ccd; }
.ptl-pad-help h2 { margin: 0 0 20px; color: inherit; font: 600 23px/1.2 system-ui,sans-serif; }
.ptl-pad-help dl { display: grid; grid-template-columns: 1fr 1.35fr; gap: 12px; }
.ptl-pad-help dt { color: #dcc4ff; font-weight: 600; }
.ptl-pad-help dd { margin: 0; }
.ptl-pad-help p { color: #c9bbd8; margin: 20px 0; }
.ptl-pad-help button, .ptl-pad-keyboard button { font: inherit; color: #fff; background: #3e2f50; border: 1px solid #8a739f; border-radius: 5px; min-height: 44px; padding: 8px 12px; cursor: pointer; }
.ptl-pad-help button:hover, .ptl-pad-keyboard button:hover { background: #5b436f; }
.ptl-pad-keyboard { position: fixed; z-index: 2147483002; bottom: max(10px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(650px,calc(100vw - 20px)); padding: 14px; border-radius: 12px; }
.ptl-pad-keyboard p { margin: 0 0 12px; }
.ptl-pad-key-row { display: flex; gap: 5px; justify-content: center; margin-block: 5px; }
.ptl-pad-key-row button { flex: 1 1 0; min-width: 0; padding: 6px 2px; }
@media (max-width:420px) { .ptl-pad-keyboard { padding: 9px; } .ptl-pad-key-row { gap: 3px; } }

/* PATTALIUM_CONTROLLER_END */

/* PATTALIUM LEGAL START */
/* Shared local privacy controls. Scoped so each experience keeps its own design. */
.ptl-legal{box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;gap:4px 18px;width:100%;min-width:0;padding:12px 0;font:400 12px/1.5 system-ui,sans-serif;letter-spacing:normal;text-transform:none;color:inherit}
.ptl-legal>span{white-space:nowrap}.ptl-legal nav{display:flex;flex-wrap:wrap;align-items:center;gap:2px 14px}.ptl-legal a{display:inline-flex;align-items:center;min-height:32px;padding:2px 0;color:inherit;font:inherit;text-decoration:underline;text-underline-offset:3px}.ptl-legal a:focus-visible{outline:2px solid currentColor;outline-offset:4px}.ptl-legal--standalone{padding:16px 24px;flex:none}.ptl-legal--compact{width:auto;gap:4px 14px;padding:4px 0}.ptl-legal--compact a{min-height:32px}
.ptl-privacy-dialog{box-sizing:border-box;position:fixed;inset:0;z-index:2147483000;width:min(580px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(100dvh - 32px);height:auto;margin:auto;padding:24px;overflow:auto;overscroll-behavior:contain;border:1px solid #9b90a8;border-radius:4px;background:#f8f5fa;color:#251c30;font:400 15px/1.6 system-ui,sans-serif;letter-spacing:normal;text-transform:none;text-align:left;color-scheme:light;isolation:isolate}
.ptl-privacy-dialog::backdrop{background:rgb(12 8 18 / .7)}.ptl-privacy-dialog *{box-sizing:border-box}.ptl-privacy-dialog .ptl-privacy-heading{display:flex;align-items:start;justify-content:space-between;gap:16px}.ptl-privacy-dialog h2{margin:0;font:600 23px/1.3 system-ui,sans-serif;color:inherit;letter-spacing:-.025em}.ptl-privacy-dialog h3{margin:0 0 6px;font:600 16px/1.4 system-ui,sans-serif;color:inherit}.ptl-privacy-dialog p{margin:12px 0;max-width:none;font:inherit;color:inherit}.ptl-privacy-dialog .ptl-privacy-essential{padding:16px 0;border-block:1px solid #d6cedd;margin:16px 0}.ptl-privacy-essential p{margin:0}.ptl-privacy-dialog button{appearance:none;display:inline-flex;align-items:center;justify-content:center;position:static;width:auto;min-height:44px;margin:0;padding:9px 14px;border:1px solid #92839f;border-radius:4px;background:#eee7f3;color:#251c30;font:600 14px/1.4 system-ui,sans-serif;letter-spacing:normal;text-transform:none;cursor:pointer;transform:none;box-shadow:none}.ptl-privacy-dialog button:hover{background:#e1d6e9}.ptl-privacy-dialog button:focus-visible,.ptl-privacy-dialog a:focus-visible,.ptl-privacy-dialog input:focus-visible{outline:3px solid #684886;outline-offset:3px}.ptl-privacy-dialog .ptl-privacy-close{background:transparent;flex:none}.ptl-privacy-dialog .ptl-privacy-actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 0}.ptl-privacy-dialog .ptl-privacy-actions button{flex:1 1 auto}.ptl-privacy-dialog .ptl-privacy-links{display:flex;flex-wrap:wrap;gap:0 18px;border-top:1px solid #d6cedd;padding-top:12px;margin-top:16px}.ptl-privacy-dialog a{display:inline-flex;align-items:center;min-height:40px;color:#50356c;font:500 14px/1.5 system-ui,sans-serif;text-decoration:underline;text-underline-offset:3px}.ptl-privacy-dialog small{display:block;margin-top:12px;font:400 12px/1.5 system-ui,sans-serif}.ptl-privacy-dialog .ptl-privacy-option{display:flex;align-items:start;gap:12px;margin:16px 0;cursor:pointer}.ptl-privacy-option input{appearance:auto;flex:none;width:22px;height:22px;margin:2px 0;accent-color:#684886}.ptl-privacy-option span{display:block}.ptl-privacy-dialog .ptl-privacy-status:empty{display:none}
@media(max-width:420px){.ptl-privacy-dialog{padding:18px}.ptl-privacy-dialog .ptl-privacy-heading{gap:10px}.ptl-privacy-dialog h2{font-size:21px}.ptl-privacy-dialog .ptl-privacy-actions{flex-direction:column}}
@media(forced-colors:active){.ptl-privacy-dialog,.ptl-privacy-dialog button{border:1px solid CanvasText;background:Canvas;color:CanvasText}}

/* PATTALIUM LEGAL END */

/* Keep legal actions above the controller connection hint. */
body:has(.ptl-pad-hint:not([hidden])) .ptl-legal{padding-bottom:calc(68px + env(safe-area-inset-bottom,0px))}
