:root {
  --background: #050505;
  --foreground: #f7f7f4;
  --surface: #0d0d0d;
  --surface-elevated: #111111;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --muted: #8a8a8a;
  --muted-strong: #b8b8b8;
  --inverse-background: #ffffff;
  --inverse-foreground: #050505;
  --inverse-surface: #f7f7f4;
  --inverse-border: #e5e5e5;
  --signal: #c9c9c5;
  --max-width: 1240px;
  --radius: 10px;
  --motion-fast: 160ms;
  --motion-base: 240ms;
  --motion-slow: 600ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.light-page {
  background: var(--inverse-background);
  color: var(--inverse-foreground);
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
h4 {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-140%);
  background: var(--foreground);
  color: var(--background);
  padding: 10px 14px;
  border-radius: 6px;
  transition: transform var(--motion-fast) var(--ease);
}

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

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(18px);
  transition: border-color var(--motion-base) var(--ease), background var(--motion-base) var(--ease);
}

.light-page .site-header {
  background: rgba(255, 255, 255, 0.9);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.light-page .site-header.is-scrolled {
  border-bottom-color: var(--inverse-border);
}

.nav-shell {
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  font-weight: 650;
  color: var(--foreground);
}

.light-page .brand {
  color: var(--inverse-foreground);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.light-page .nav-links {
  color: #5e5e5e;
}

.nav-links a {
  transition: color var(--motion-fast) var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--foreground);
}

.light-page .nav-links a:hover,
.light-page .nav-links a[aria-current="page"] {
  color: var(--inverse-foreground);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}

.light-page .nav-toggle {
  border-color: var(--inverse-border);
  color: var(--inverse-foreground);
}

.nav-toggle-lines {
  width: 18px;
  height: 12px;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle-lines span {
  height: 1px;
  background: currentColor;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.hero {
  min-height: calc(100svh - 72px);
  display: flex;
  align-items: center;
  padding: 84px 0 96px;
}

.hero.compact {
  min-height: auto;
  padding: 104px 0 92px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 72px;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-strong);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.4;
  text-transform: uppercase;
}

.light-page .kicker {
  color: #6f6f6f;
}

.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.hero-title,
.page-title,
.section-title {
  font-weight: 560;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-title {
  margin-top: 26px;
  font-size: 6.2rem;
  max-width: 980px;
}

.page-title {
  margin-top: 24px;
  font-size: 5rem;
  max-width: 980px;
}

.section-title {
  font-size: 4rem;
  max-width: 840px;
}

.lead {
  margin-top: 28px;
  color: var(--muted-strong);
  font-size: 1.16rem;
  line-height: 1.65;
  max-width: 680px;
}

.light-page .lead,
.light-page .section-copy,
.light-page .muted,
.light-page .card p,
.light-page .list-line p {
  color: #5f5f5f;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  padding: 0 18px;
  color: var(--foreground);
  font-size: 0.94rem;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease);
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.42);
}

.button.primary {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

.button.primary:hover {
  background: #ffffff;
}

.button.secondary {
  background: transparent;
}

.light-page .button {
  border-color: #d8d8d8;
  color: var(--inverse-foreground);
}

.light-page .button.primary {
  background: var(--inverse-foreground);
  color: var(--inverse-background);
  border-color: var(--inverse-foreground);
}

.light-page .button.secondary:hover {
  border-color: #aaa;
  background: #f4f4f1;
}

.page-section {
  padding: 144px 0;
}

.page-section.tight {
  padding: 96px 0;
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 5fr);
  gap: 64px;
  align-items: start;
  margin-bottom: 64px;
}

.section-copy {
  color: var(--muted-strong);
  font-size: 1.04rem;
  line-height: 1.75;
}

.section-copy p + p {
  margin-top: 18px;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: 1 / -1;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  padding: 30px;
  transition: border-color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease);
}

.card:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.035);
}

.light-page .card {
  border-color: var(--inverse-border);
  background: #ffffff;
}

.light-page .card:hover {
  border-color: #cfcfcf;
  background: #fbfbf8;
}

.card-meta,
.mono {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
}

.card h3 {
  margin-top: 18px;
  font-size: 1.4rem;
  font-weight: 560;
  line-height: 1.18;
}

.card p {
  margin-top: 16px;
  color: var(--muted-strong);
}

.card code,
.section-copy code {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
  padding: 0.08em 0.32em;
  color: var(--foreground);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.light-page .card code,
.light-page .section-copy code {
  border-color: var(--inverse-border);
  background: #f7f7f4;
  color: var(--inverse-foreground);
}

.card-link {
  display: inline-flex;
  margin-top: 28px;
  color: var(--foreground);
  font-size: 0.92rem;
}

.light-page .card-link {
  color: var(--inverse-foreground);
}

.roles-showcase {
  position: relative;
  border-top: 1px solid var(--border);
  background:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
}

.roles-intro {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
  gap: 64px;
  align-items: end;
  margin-bottom: 54px;
}

.roles-copy {
  color: var(--muted-strong);
  font-size: 1.04rem;
  line-height: 1.75;
}

.roles-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.roles-signals span,
.role-tags li {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.026);
  font-size: 0.82rem;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.role-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(9, 9, 9, 0.82);
  padding: 28px;
  transition: transform var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease);
}

.role-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(17, 17, 17, 0.92);
}

.role-card.is-emphasized {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.055);
}

.role-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.role-index {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--foreground);
}

.role-discipline {
  text-align: right;
}

.role-card h3 {
  min-height: 3.15em;
  font-size: 1.75rem;
  font-weight: 560;
  line-height: 1.08;
}

.role-summary {
  margin-top: 20px;
  color: var(--foreground);
  font-size: 1.02rem;
  line-height: 1.65;
}

.role-details {
  display: grid;
  gap: 18px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.role-details span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.role-details p {
  color: var(--muted-strong);
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.role-apply {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 34px;
  color: var(--foreground);
  font-size: 0.94rem;
}

.role-apply span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  transition: transform var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease);
}

.role-apply:hover span {
  transform: translateX(2px);
  border-color: rgba(255, 255, 255, 0.46);
}

.roles-apply-note {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.026);
  padding: 24px 28px;
}

.roles-apply-note p {
  max-width: 760px;
  color: var(--muted-strong);
}

.system-diagram {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 620px;
  padding: 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0) 36%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
}

.system-diagram::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  pointer-events: none;
}

.light-page .system-diagram {
  border-color: var(--inverse-border);
  background:
    linear-gradient(#eeeeea 1px, transparent 1px),
    linear-gradient(90deg, #eeeeea 1px, transparent 1px);
  background-size: 42px 42px;
}

.diagram-topbar,
.diagram-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.diagram-topbar {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(5, 5, 5, 0.72);
  padding: 0 14px;
}

.light-page .diagram-topbar {
  border-color: var(--inverse-border);
  background: rgba(255, 255, 255, 0.78);
}

.diagram-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
}

.diagram-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  animation: status-pulse 2.8s var(--ease) infinite;
}

.diagram-flow {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
}

.diagram-flow::before {
  content: "";
  position: absolute;
  top: 52px;
  bottom: 52px;
  left: 25px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--border-strong) 14%, var(--border-strong) 86%, transparent);
}

.diagram-node {
  position: relative;
  z-index: 1;
  min-height: 68px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  background: rgba(5, 5, 5, 0.84);
  border-radius: 8px;
  padding: 14px 16px;
  backdrop-filter: blur(10px);
  transition: border-color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease);
}

.diagram-node:hover,
.diagram-core:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(12, 12, 12, 0.92);
}

.light-page .diagram-node {
  border-color: var(--inverse-border);
  background: rgba(255, 255, 255, 0.86);
}

.node-index {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted-strong);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.7rem;
}

.node-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.node-copy strong,
.diagram-core-head strong {
  font-weight: 560;
  line-height: 1.2;
}

.node-copy span,
.diagram-core-head span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.diagram-node code,
.diagram-core-head code {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  white-space: nowrap;
}

.diagram-connector {
  position: relative;
  z-index: 1;
  height: 42px;
  display: flex;
  align-items: center;
  margin-left: 17px;
}

.diagram-connector::before,
.diagram-connector::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1px;
  height: 100%;
}

.diagram-connector::before {
  background: var(--border);
}

.diagram-connector::after {
  background: var(--signal);
  transform: translateY(-100%);
  animation: line-draw 4s var(--ease) infinite;
}

.diagram-connector span {
  margin-left: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.92);
  box-shadow: 0 0 0 8px rgba(5, 5, 5, 0.62);
  padding: 3px 9px;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.66rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.diagram-core {
  position: relative;
  z-index: 1;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018) 42%),
    rgba(9, 9, 9, 0.92);
  padding: 14px 16px;
  overflow: hidden;
  transition: border-color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease);
}

.diagram-core::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0, transparent 31%, rgba(255, 255, 255, 0.06) 31%, rgba(255, 255, 255, 0.06) calc(31% + 1px), transparent calc(31% + 1px)),
    linear-gradient(90deg, transparent 0, transparent 66%, rgba(255, 255, 255, 0.06) 66%, rgba(255, 255, 255, 0.06) calc(66% + 1px), transparent calc(66% + 1px));
  pointer-events: none;
}

.diagram-core-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.diagram-core-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.diagram-primitives {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.diagram-primitives span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  padding: 0 10px;
  color: var(--muted-strong);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.7rem;
}

.diagram-signal {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.diagram-signal span {
  position: relative;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.diagram-signal span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--signal), transparent);
  transform: translateX(-100%);
  animation: signal-scan 3.8s var(--ease) infinite;
}

.diagram-signal span:nth-child(2)::after {
  animation-delay: 420ms;
}

.diagram-signal span:nth-child(3)::after {
  animation-delay: 820ms;
}

.diagram-footer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
}

.diagram-footer span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.022);
}

.light-page .diagram-core,
.light-page .diagram-primitives span,
.light-page .diagram-footer span,
.light-page .diagram-connector span {
  border-color: var(--inverse-border);
  background: rgba(255, 255, 255, 0.82);
}

.light-page .diagram-connector span {
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.7);
}

.light-page .node-index {
  border-color: var(--inverse-border);
  color: #555;
}

.flow-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
}

.flow-row.flow-row-six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.flow-step {
  min-height: 106px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.light-page .flow-step {
  border-color: var(--inverse-border);
}

.flow-step span {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

.flow-step strong {
  font-weight: 560;
}

.console-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #080808;
  overflow: hidden;
}

.light-page .console-panel {
  border-color: var(--inverse-border);
  background: #f9f9f6;
}

.console-topbar {
  min-height: 48px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 18px;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.76rem;
}

.light-page .console-topbar {
  border-color: var(--inverse-border);
}

.console-body {
  padding: 18px;
}

.status-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.84rem;
}

.light-page .status-row {
  border-color: var(--inverse-border);
}

.status-row:last-child {
  border-bottom: 0;
}

.status-key {
  color: var(--muted-strong);
}

.light-page .status-key {
  color: #2f2f2f;
}

.status-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--signal);
}

.light-page .status-value {
  color: #404040;
}

.status-value::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: status-pulse 2.8s var(--ease) infinite;
}

.object-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.light-page .object-table {
  border-color: var(--inverse-border);
}

.object-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.4fr;
  gap: 18px;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

.object-row:last-child {
  border-bottom: 0;
}

.object-row.header {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
}

.light-page .object-row {
  border-color: var(--inverse-border);
}

.light-page .object-row.header {
  background: #f7f7f4;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--signal);
}

.light-page .state {
  color: #2b2b2b;
}

.state::before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.split-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.018);
}

.light-page .split-band {
  border-color: var(--inverse-border);
  background: var(--inverse-surface);
}

.bottleneck {
  display: grid;
  gap: 18px;
}

.bottleneck-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  align-items: center;
}

.bottleneck-label {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.76rem;
}

.bottleneck-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.light-page .bottleneck-track {
  border-color: var(--inverse-border);
}

.bottleneck-track span {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-right: 1px solid var(--border);
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.light-page .bottleneck-track span {
  border-color: var(--inverse-border);
  color: #3c3c3c;
}

.bottleneck-track span:last-child {
  border-right: 0;
}

.bottleneck-track .missing {
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.06);
}

.light-page .bottleneck-track .missing {
  color: var(--inverse-foreground);
  background: #ecece8;
}

.list-lines {
  border-top: 1px solid var(--border);
}

.light-page .list-lines {
  border-color: var(--inverse-border);
}

.list-line {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  border-bottom: 1px solid var(--border);
  padding: 26px 0;
}

.light-page .list-line {
  border-color: var(--inverse-border);
}

.list-line strong {
  font-size: 1.08rem;
  font-weight: 560;
}

.list-line p {
  color: var(--muted-strong);
}

.article-list {
  border-top: 1px solid var(--inverse-border);
}

.article-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 140px;
  gap: 32px;
  border-bottom: 1px solid var(--inverse-border);
  padding: 34px 0;
  color: var(--inverse-foreground);
  transition: background var(--motion-fast) var(--ease);
}

.article-card:hover {
  background: #f8f8f5;
}

.article-card h3 {
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 560;
}

.article-card p {
  margin-top: 10px;
  color: #636363;
  max-width: 680px;
}

.article-date {
  color: #787878;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.76rem;
  text-align: right;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}

.category-tabs a {
  border: 1px solid var(--inverse-border);
  border-radius: 6px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #555;
  font-size: 0.9rem;
}

.category-tabs a[aria-current="true"],
.category-tabs a:hover {
  color: var(--inverse-foreground);
  background: var(--inverse-surface);
}

.legal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}

.legal-nav {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 10px;
  font-size: 0.94rem;
}

.legal-nav a {
  color: #686868;
  padding: 8px 0;
}

.legal-nav a[aria-current="page"],
.legal-nav a:hover {
  color: var(--inverse-foreground);
}

.prose {
  max-width: 820px;
}

.prose .article-meta {
  color: #6b6b6b;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.prose h2 {
  margin-top: 48px;
  font-size: 1.7rem;
  font-weight: 560;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 30px;
  font-size: 1.16rem;
  font-weight: 560;
}

.prose p,
.prose li {
  margin-top: 16px;
  color: #555;
  line-height: 1.75;
}

.prose a {
  color: var(--inverse-foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose ul {
  margin-top: 12px;
}

.prose li {
  list-style: disc;
  margin-left: 20px;
}

.legal-callout {
  margin: 24px 0 44px;
  border: 1px solid var(--inverse-border);
  border-radius: var(--radius);
  background: #f7f7f4;
  padding: 26px;
}

.prose .legal-callout h2 {
  margin-top: 0;
  font-size: 1.36rem;
}

.prose .legal-callout p {
  margin-top: 12px;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.legal-panel {
  border: 1px solid var(--inverse-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 22px;
}

.prose .legal-panel h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.prose .legal-panel p {
  margin-top: 10px;
  line-height: 1.65;
}

.legal-matrix {
  margin-top: 24px;
  border: 1px solid var(--inverse-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.legal-matrix-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--inverse-border);
}

.legal-matrix-row:last-child {
  border-bottom: 0;
}

.legal-matrix-row > div {
  padding: 16px 18px;
  border-right: 1px solid var(--inverse-border);
  color: #555;
  line-height: 1.65;
}

.legal-matrix-row > div:last-child {
  border-right: 0;
}

.legal-matrix-row > div:first-child {
  color: var(--inverse-foreground);
  font-weight: 560;
}

.legal-matrix-head {
  background: #f7f7f4;
}

.legal-matrix-head > div {
  color: #6b6b6b;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.empty-state {
  border-top: 1px solid var(--inverse-border);
  border-bottom: 1px solid var(--inverse-border);
  padding: 44px 0;
}

.empty-state h2,
.empty-state h3 {
  font-size: 1.55rem;
  font-weight: 560;
}

.empty-state p {
  margin-top: 12px;
  max-width: 760px;
  color: #5f5f5f;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0;
  color: var(--muted);
}

.light-page .site-footer {
  border-color: var(--inverse-border);
  color: #6b6b6b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, 1fr);
  gap: 40px;
}

.footer-brand {
  color: var(--foreground);
  font-weight: 600;
}

.light-page .footer-brand {
  color: var(--inverse-foreground);
}

.footer-note {
  margin-top: 16px;
  max-width: 320px;
  color: var(--muted);
}

.footer-column h2,
.footer-column h3 {
  margin-bottom: 14px;
  color: var(--muted-strong);
  font-size: 0.88rem;
  font-weight: 560;
}

.light-page .footer-column h2,
.light-page .footer-column h3 {
  color: #3f3f3f;
}

.footer-column a {
  display: block;
  padding: 6px 0;
  color: inherit;
  font-size: 0.92rem;
}

.footer-column a:hover {
  color: var(--foreground);
}

.light-page .footer-column a:hover {
  color: var(--inverse-foreground);
}

[data-animate] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--motion-slow) var(--ease), transform var(--motion-slow) var(--ease);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes line-draw {
  0% {
    transform: translateY(-100%);
  }
  40%,
  100% {
    transform: translateY(100%);
  }
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

@keyframes signal-scan {
  0% {
    transform: translateX(-100%);
  }
  44%,
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 1080px) {
  .hero-grid,
  .section-header,
  .roles-intro,
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 4.6rem;
  }

  .page-title,
  .section-title {
    font-size: 3.7rem;
  }

  .hero-grid {
    gap: 48px;
  }

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

  .flow-row.flow-row-six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .role-card h3 {
    min-height: auto;
  }

  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8 {
    grid-column: span 6;
  }

  .legal-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 1081px) and (max-height: 820px) {
  .hero {
    padding: 52px 0 64px;
  }

  .hero-title {
    font-size: 5.4rem;
  }

  .lead {
    margin-top: 22px;
    font-size: 1.08rem;
  }

  .hero-actions {
    margin-top: 28px;
  }

  .system-diagram {
    min-height: 580px;
    padding: 18px;
    gap: 14px;
  }

  .diagram-topbar {
    min-height: 36px;
  }

  .diagram-node {
    min-height: 62px;
    padding: 12px 14px;
  }

  .diagram-core {
    padding: 12px 14px;
  }

  .diagram-connector {
    height: 34px;
  }

  .diagram-primitives {
    margin-top: 12px;
  }

  .diagram-primitives span,
  .diagram-footer span {
    min-height: 28px;
  }

  .diagram-signal {
    margin-top: 10px;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    width: min(calc(100% - 32px), var(--max-width));
    min-height: 64px;
  }

  .nav-toggle {
    display: grid;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(13, 13, 13, 0.98);
    padding: 10px;
  }

  .light-page .nav-links {
    border-color: var(--inverse-border);
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-links.is-open {
    display: flex;
  }

	  .nav-links a {
	    padding: 14px 12px;
	    border-radius: 6px;
	  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .light-page .nav-links a:hover {
    background: #f4f4f1;
  }

  .container {
    width: min(calc(100% - 32px), var(--max-width));
  }

  .hero {
    min-height: auto;
    padding: 72px 0 78px;
  }

  .hero.compact {
    padding: 72px 0 72px;
  }

  .hero-title {
    font-size: 3.25rem;
    line-height: 1;
  }

  .page-title,
  .section-title {
    font-size: 2.7rem;
    line-height: 1.04;
  }

  .lead {
    font-size: 1.04rem;
  }

  .page-section {
    padding: 96px 0;
  }

  .page-section.tight {
    padding: 72px 0;
  }

  .section-header {
    gap: 28px;
    margin-bottom: 42px;
  }

  .roles-intro {
    gap: 28px;
    margin-bottom: 42px;
  }

  .role-card {
    padding: 24px;
  }

  .roles-apply-note {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px;
  }

  .system-diagram {
    min-height: auto;
    padding: 18px;
    gap: 16px;
  }

  .system-diagram::before {
    inset: 10px;
  }

  .diagram-topbar {
    min-height: auto;
    padding: 12px;
  }

  .diagram-node,
  .diagram-core-head {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .diagram-node code,
  .diagram-core-head code {
    grid-column: 2;
    justify-self: start;
    white-space: normal;
  }

  .diagram-connector {
    height: 34px;
  }

  .diagram-primitives {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diagram-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: 1 / -1;
  }

  .flow-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-row.flow-row-six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .bottleneck-track {
    grid-template-columns: 1fr;
  }

  .bottleneck-track span {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .light-page .bottleneck-track span {
    border-color: var(--inverse-border);
  }

  .bottleneck-track span:last-child {
    border-bottom: 0;
  }

  .list-line {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .article-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .article-date {
    text-align: left;
  }

  .legal-grid,
  .legal-matrix-row {
    grid-template-columns: 1fr;
  }

  .legal-matrix-row > div {
    border-right: 0;
    border-bottom: 1px solid var(--inverse-border);
  }

  .legal-matrix-row > div:last-child {
    border-bottom: 0;
  }

	  .object-row {
	    grid-template-columns: 1fr;
	    gap: 6px;
	    padding: 14px 16px;
	  }

	  .object-row.header {
	    display: none;
	  }

	  .object-row span::before {
	    content: attr(data-label);
	    display: block;
	    margin-bottom: 3px;
	    color: var(--muted);
	    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	    font-size: 0.68rem;
	    text-transform: uppercase;
	  }
	}

@media (max-width: 520px) {
  .hero-title {
    font-size: 2.7rem;
  }

  .page-title,
  .section-title {
    font-size: 2.22rem;
  }

  .hero-actions,
  .section-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .system-diagram {
    padding: 14px;
  }

  .diagram-topbar {
    display: grid;
    justify-content: stretch;
    gap: 6px;
  }

  .diagram-node,
  .diagram-core {
    padding: 14px;
  }

  .diagram-core-head {
    gap: 12px;
  }

  .diagram-primitives {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diagram-connector span {
    max-width: calc(100vw - 124px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

	  .flow-row,
	  .legal-nav,
	  .footer-grid {
	    grid-template-columns: 1fr;
	  }

  .card,
  .role-card,
  .console-body {
    padding: 22px;
  }

  .role-card-top {
    margin-bottom: 26px;
  }

  .role-card h3 {
    font-size: 1.52rem;
  }

  .role-summary {
    font-size: 0.98rem;
  }

  .role-apply {
    padding-top: 28px;
  }

  .console-topbar {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 14px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
  }
}
