@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=DM+Serif+Display:ital@0;1&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink: #1a1a1a;
  --ink-mid: #4a4a4a;
  --ink-light: #888;
  --rule: #e0e0e0;
  --page: #fafaf8;
  --paper-bg: #e8e8e4;
  --accent: #2d6a4f;
  --accent-soft: #d8ede4;
  --accent-bg: #eaf3ee;
}

html,
body {
  min-height: 100%;
  background: var(--paper-bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.site-index {
  padding: 40px;
}

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

.site-shell {
  max-width: 960px;
  margin: 0 auto;
}

.index-header {
  border-bottom: 1.5px solid var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 22px;
  margin-bottom: 28px;
}

.index-header h1 {
  font-family: "DM Serif Display", serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.05;
  max-width: 620px;
}

.index-header em,
.page-title em {
  color: var(--accent);
  font-style: italic;
}

.eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.index-note {
  color: var(--ink-light);
  font-size: 12px;
  line-height: 1.65;
  max-width: 250px;
  padding-top: 6px;
  text-align: right;
}

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

.nav-card {
  background: var(--page);
  border-top: 2px solid var(--ink);
  min-height: 190px;
  padding: 22px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.nav-card:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.nav-card.available {
  border-top-color: var(--accent);
}

.nav-kicker {
  color: var(--ink-light);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.nav-title {
  font-family: "DM Serif Display", serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 12px;
}

.nav-desc {
  color: var(--ink-mid);
  font-size: 12px;
  line-height: 1.6;
}

.export-panel {
  border-top: 1px solid var(--rule);
  color: var(--ink-mid);
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
  margin-top: 30px;
  padding-top: 18px;
}

.export-panel h2 {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.export-panel p,
.export-panel li {
  font-size: 11px;
  line-height: 1.7;
}

.export-panel ol {
  padding-left: 18px;
}

.page {
  background: var(--page);
  margin: 40px auto;
  min-height: 1123px;
  padding: 52px 56px 48px;
  position: relative;
  width: min(794px, calc(100% - 32px));
}

.page-header {
  align-items: flex-start;
  border-bottom: 1.5px solid var(--ink);
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
}

.page-header-left {
  max-width: 500px;
}

.page-title {
  color: var(--ink);
  font-family: "DM Serif Display", serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
}

.page-header-right {
  color: var(--ink-light);
  font-size: 11px;
  line-height: 1.6;
  padding-top: 4px;
  text-align: right;
}

.section-label {
  color: var(--ink-light);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.diagram {
  margin-bottom: 28px;
}

.diagram-inner {
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}

.bu-label-row,
.bu-row {
  display: flex;
}

.bu-label-row {
  background: #f5f5f3;
  border-bottom: 1px solid var(--rule);
}

.bu-label {
  border-right: 1px solid var(--rule);
  color: var(--ink-light);
  flex: 1;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  text-align: center;
  text-transform: uppercase;
}

.bu-label:last-child,
.bu-unit:last-child {
  border-right: 0;
}

.bu-row {
  border-bottom: 1.5px solid var(--rule);
}

.bu-unit {
  align-items: center;
  background: var(--page);
  border-right: 1px solid var(--rule);
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 14px 12px;
}

.role-pair,
.human-fig,
.agent-fig,
.coe-eng-fig {
  align-items: center;
  display: flex;
  flex-direction: column;
}

.role-pair {
  gap: 4px;
  width: 100%;
}

.human-fig,
.agent-fig,
.coe-eng-fig {
  gap: 2px;
}

.human-fig .head {
  background: var(--ink);
  border: 2px solid var(--page);
  border-radius: 50%;
  height: 18px;
  outline: 1.5px solid var(--ink);
  width: 18px;
}

.human-fig .body {
  background: var(--ink);
  border-radius: 4px 4px 0 0;
  height: 14px;
  width: 24px;
}

.human-fig .label,
.agent-fig .label,
.coe-eng-fig .label {
  font-size: 8.5px;
  font-weight: 500;
  white-space: nowrap;
}

.human-fig .label {
  color: var(--ink-mid);
}

.agent-fig .label,
.coe-eng-fig .label {
  color: var(--accent);
}

.connector {
  align-items: center;
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.connector-line {
  background: var(--accent);
  height: 10px;
  width: 1.5px;
}

.connector-arrow {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--accent);
  height: 0;
  width: 0;
}

.agent-box {
  align-items: center;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  display: flex;
  height: 22px;
  justify-content: center;
  width: 26px;
}

.agent-box svg {
  height: 13px;
  width: 13px;
}

.coe-row {
  align-items: center;
  background: var(--accent-bg);
  border-bottom: 1.5px solid var(--rule);
  display: flex;
  gap: 20px;
  padding: 14px 20px;
}

.coe-engineers {
  align-items: center;
  display: flex;
  gap: 10px;
}

.coe-eng-fig .head {
  background: var(--accent);
  border-radius: 50%;
  height: 15px;
  width: 15px;
}

.coe-eng-fig .body {
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  height: 11px;
  width: 20px;
}

.coe-eng-fig .label {
  font-size: 8px;
}

.deploy-line {
  align-items: center;
  display: flex;
  gap: 4px;
}

.deploy-rule {
  border-top: 1.5px dashed var(--accent);
  width: 52px;
}

.deploy-text {
  color: var(--accent);
  font-size: 8px;
}

.coe-row-title {
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.coe-row-desc {
  color: var(--ink-mid);
  font-size: 9.5px;
  line-height: 1.5;
}

.infra-row {
  align-items: center;
  background: #e8f2ec;
  display: flex;
  gap: 12px;
  padding: 9px 20px;
}

.infra-label {
  color: var(--accent);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: rgba(45, 106, 79, 0.12);
  border: 1px solid rgba(45, 106, 79, 0.25);
  border-radius: 3px;
  color: var(--accent);
  font-size: 8.5px;
  font-weight: 500;
  padding: 2px 7px;
}

.roles {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr 1fr;
  margin-bottom: 24px;
}

.role-card {
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}

.role-card.accent-card {
  border-top-color: var(--accent);
}

.role-title {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.accent-card .role-title {
  color: var(--accent);
}

.role-subtitle {
  color: var(--ink-light);
  font-size: 9.5px;
  font-style: italic;
  margin-bottom: 10px;
}

.role-body {
  color: var(--ink-mid);
  font-size: 10.5px;
  line-height: 1.65;
}

.role-body p + p {
  margin-top: 7px;
}

.role-body strong {
  color: var(--ink);
  font-weight: 600;
}

.stack-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.2fr 0.8fr;
  margin-bottom: 24px;
}

.stack-diagram {
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 1fr 86px;
  overflow: hidden;
}

.stack-main {
  display: flex;
  flex-direction: column;
}

.stack-layer {
  border-bottom: 1.5px solid var(--rule);
  min-height: 126px;
  padding: 18px 20px;
}

.stack-layer:last-child {
  border-bottom: 0;
}

.stack-layer.context-layer {
  background: var(--accent-bg);
}

.stack-layer-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.context-layer .stack-layer-title,
.stack-governance-title {
  color: var(--accent);
}

.stack-layer-desc {
  color: var(--ink-mid);
  font-size: 10.5px;
  line-height: 1.55;
  margin-bottom: 10px;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stack-chip {
  background: #f5f5f3;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink-mid);
  font-size: 8.5px;
  font-weight: 500;
  padding: 2px 7px;
}

.context-layer .stack-chip {
  background: rgba(45, 106, 79, 0.1);
  border-color: rgba(45, 106, 79, 0.22);
  color: var(--accent);
}

.stack-governance {
  align-items: center;
  background: #f4f6f3;
  border-left: 1.5px solid var(--rule);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 14px;
  text-align: center;
}

.stack-governance-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.governance-list {
  color: var(--ink-mid);
  display: flex;
  flex-direction: column;
  font-size: 8.5px;
  gap: 7px;
  line-height: 1.25;
}

.stack-principles {
  display: grid;
  gap: 16px;
}

.principle-card {
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}

.principle-card.accent-card {
  border-top-color: var(--accent);
}

.principle-title {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.accent-card .principle-title {
  color: var(--accent);
}

.principle-body {
  color: var(--ink-mid);
  font-size: 10.5px;
  line-height: 1.6;
}

.stack-flow {
  background: var(--accent-bg);
  border: 1.5px solid rgba(45, 106, 79, 0.22);
  border-radius: 6px;
  margin-bottom: 24px;
  padding: 15px 18px;
}

.stack-flow-title {
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.stack-flow-body {
  color: var(--ink-mid);
  font-size: 10.5px;
  line-height: 1.6;
}

.loop-page .page-header {
  margin-bottom: 26px;
}

.loop-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.1fr 0.9fr;
  margin-bottom: 24px;
}

.loop-diagram {
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  padding: 18px;
}

.macro-track {
  display: grid;
  gap: 10px;
}

.loop-step {
  align-items: flex-start;
  background: var(--page);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ink);
  border-radius: 4px;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px 1fr;
  padding: 12px;
}

.loop-step.accent-step {
  background: var(--accent-bg);
  border-left-color: var(--accent);
}

.step-number {
  align-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: var(--page);
  display: flex;
  font-size: 10px;
  font-weight: 600;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.accent-step .step-number {
  background: var(--accent);
}

.step-title {
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.accent-step .step-title {
  color: var(--accent);
}

.step-body {
  color: var(--ink-mid);
  font-size: 9.5px;
  line-height: 1.45;
}

.loop-arrow {
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
  text-align: center;
}

.micro-loop {
  background: #f4f6f3;
  border: 1.5px dashed rgba(45, 106, 79, 0.45);
  border-radius: 6px;
  padding: 12px;
}

.micro-label {
  color: var(--accent);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 9px;
  text-transform: uppercase;
}

.micro-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.micro-card {
  background: var(--page);
  border-top: 2px solid var(--accent);
  padding: 10px;
}

.micro-title {
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.micro-body {
  color: var(--ink-mid);
  font-size: 9.3px;
  line-height: 1.45;
}

.loop-cards {
  display: grid;
  gap: 15px;
}

.loop-card {
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}

.loop-card.accent-card {
  border-top-color: var(--accent);
}

.loop-card-title {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.accent-card .loop-card-title {
  color: var(--accent);
}

.loop-card-body {
  color: var(--ink-mid);
  font-size: 10.5px;
  line-height: 1.58;
}

.loop-summary {
  background: var(--accent-bg);
  border: 1.5px solid rgba(45, 106, 79, 0.22);
  border-radius: 6px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 24px;
  padding: 15px 18px;
}

.summary-kicker {
  color: var(--accent);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.summary-text {
  color: var(--ink-mid);
  font-size: 10px;
  line-height: 1.5;
}

.roadmap-page .page-header {
  margin-bottom: 26px;
}

.roadmap-timeline {
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  margin-bottom: 24px;
  overflow: hidden;
}

.roadmap-step {
  display: grid;
  grid-template-columns: 82px 1fr;
  min-height: 126px;
}

.roadmap-step + .roadmap-step {
  border-top: 1.5px solid var(--rule);
}

.roadmap-marker {
  align-items: center;
  background: #f5f5f3;
  border-right: 1.5px solid var(--rule);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 10px;
  text-align: center;
}

.roadmap-step.accent-step .roadmap-marker {
  background: var(--accent-bg);
}

.roadmap-number {
  color: var(--accent);
  font-family: "DM Serif Display", serif;
  font-size: 30px;
  line-height: 1;
  margin-bottom: 6px;
}

.roadmap-marker-label {
  color: var(--ink-light);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roadmap-body {
  padding: 16px 18px;
}

.roadmap-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.accent-step .roadmap-title {
  color: var(--accent);
}

.roadmap-desc {
  color: var(--ink-mid);
  font-size: 10.5px;
  line-height: 1.55;
  margin-bottom: 10px;
}

.roadmap-meta {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.roadmap-meta-block {
  border-top: 1px solid var(--rule);
  padding-top: 6px;
}

.roadmap-meta-label {
  color: var(--ink-light);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.roadmap-meta-text {
  color: var(--ink-mid);
  font-size: 9px;
  line-height: 1.45;
}

.roadmap-principles {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 24px;
}

.roadmap-card {
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}

.roadmap-card.accent-card {
  border-top-color: var(--accent);
}

.roadmap-card-title {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.accent-card .roadmap-card-title {
  color: var(--accent);
}

.roadmap-card-body {
  color: var(--ink-mid);
  font-size: 10.5px;
  line-height: 1.58;
}

.page-footer {
  align-items: center;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
}

.footer-note {
  color: var(--ink-light);
  font-size: 9.5px;
  font-style: italic;
  line-height: 1.5;
  max-width: 420px;
}

.footer-note strong {
  color: var(--ink-mid);
  font-style: normal;
}

.footer-right {
  color: var(--ink-light);
  font-size: 9px;
  text-align: right;
}

@media (max-width: 900px) {
  body.site-index {
    padding: 24px;
  }

  .index-header {
    display: block;
  }

  .index-note {
    margin-top: 16px;
    max-width: none;
    text-align: left;
  }

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

  .export-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    background: var(--page);
  }

  .page {
    margin: 0 auto;
    min-height: 0;
    padding: 28px 24px 32px;
    width: 100%;
  }

  .page-header {
    display: block;
    margin-bottom: 26px;
  }

  .page-title {
    font-size: 34px;
  }

  .page-header-right {
    margin-top: 14px;
    max-width: 360px;
    text-align: left;
  }

  .diagram {
    margin-bottom: 26px;
  }

  .diagram-inner {
    border-radius: 0;
  }

  .bu-label-row {
    display: none;
  }

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

  .bu-unit {
    border-bottom: 1px solid var(--rule);
    min-height: 132px;
  }

  .bu-unit:nth-child(2n) {
    border-right: 0;
  }

  .bu-unit:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .coe-row,
  .infra-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .deploy-line {
    width: 100%;
  }

  .deploy-rule {
    flex: 0 0 52px;
  }

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

  .stack-layout {
    grid-template-columns: 1fr;
  }

  .loop-layout,
  .loop-summary,
  .roadmap-principles {
    grid-template-columns: 1fr;
  }

  .roadmap-step {
    grid-template-columns: 68px 1fr;
  }

  .roadmap-meta {
    grid-template-columns: 1fr;
  }

  .stack-diagram {
    grid-template-columns: 1fr;
  }

  .stack-governance {
    border-left: 0;
    border-top: 1.5px solid var(--rule);
  }

  .stack-governance-title {
    writing-mode: horizontal-tb;
  }

  .governance-list {
    flex-flow: row wrap;
    justify-content: center;
  }

  .role-body {
    font-size: 12px;
    line-height: 1.6;
  }

  .page-footer {
    align-items: flex-start;
    display: block;
  }

  .footer-right {
    margin-top: 10px;
    text-align: left;
  }
}

@media (max-width: 480px) {
  body.site-index {
    padding: 20px;
  }

  .index-header h1 {
    font-size: 34px;
  }

  .nav-title {
    font-size: 26px;
  }

  .page {
    padding: 24px 18px 30px;
  }

  .page-title {
    font-size: 30px;
  }

  .infra-label {
    white-space: normal;
  }
}

@media print {
  @page {
    margin: 0;
    size: A4;
  }

  html,
  body {
    background: white;
  }

  .page {
    margin: 0;
    min-height: 1123px;
    width: 794px;
  }

  .page-header {
    display: flex;
  }

  .page-header-right {
    margin-top: 0;
    max-width: none;
    text-align: right;
  }

  .bu-label-row,
  .bu-row {
    display: flex;
  }

  .bu-unit {
    border-bottom: 0;
    min-height: 0;
  }

  .coe-row,
  .infra-row {
    align-items: center;
    flex-direction: row;
  }

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

  .stack-layout {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .loop-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .loop-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .roadmap-principles {
    grid-template-columns: repeat(3, 1fr);
  }

  .roadmap-step {
    grid-template-columns: 82px 1fr;
  }

  .roadmap-meta {
    grid-template-columns: 1fr 1fr;
  }

  .stack-diagram {
    grid-template-columns: 1fr 86px;
  }

  .stack-governance {
    border-left: 1.5px solid var(--rule);
    border-top: 0;
  }

  .stack-governance-title {
    writing-mode: vertical-rl;
  }

  .governance-list {
    flex-direction: column;
    justify-content: center;
  }

  .role-body {
    font-size: 10.5px;
    line-height: 1.65;
  }

  .page-footer {
    align-items: center;
    display: flex;
  }

  .footer-right {
    margin-top: 0;
    text-align: right;
  }
}
