:root {
  --paper: #f6f5f0;
  --ink: #203b35;
  --muted: #67746b;
  --line: #d9ddd4;
  --olive: #6e8251;
  --panel: #e9ede3;
  font: 100%/1.55 Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid #65822c; outline-offset: 6px; }
h1, h2, h3, p { margin: 0; }

.skip-link {
  position: absolute;
  inset: .75rem auto auto .75rem;
  z-index: 1;
  padding: .5rem;
  background: var(--paper);
  transform: translateY(-180%);
}

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

.page {
  display: flex;
  flex-direction: column;
  max-width: 1424px;
  min-height: 100vh;
  margin: auto;
  padding: 0 64px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.mark {
  padding-right: 8px;
  font: 35px Georgia, serif;
  font-weight: 700;
  letter-spacing: -7px;
  text-transform: none;
}

.mark span { color: #718644; }
.github-link { font-size: 13px; }

.portfolio-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px clamp(26px, 4vw - 16px, 40px);
  padding: 48px 0 26px;
  font-size: 18px;
  line-height: 1.4;
  text-align: center;
}

.portfolio-nav [aria-disabled="true"] { color: var(--muted); }
.portfolio-current { font-weight: 700; }

.nav-divider {
  width: 1px;
  height: 1em;
  background: var(--line);
}

.catalog-layout {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  flex: 1;
  align-items: start;
  gap: 72px;
  padding: 82px 0 112px;
}

.sidebar {
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.navigation, .flow, .components {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-section, .nav-agent { display: block; }
.nav-section { padding: 6px 10px; font-weight: 700; }
.nav-agents { margin-top: 12px; }
.nav-agent { padding: 7px 10px 7px 20px; color: var(--muted); font-size: 14px; }
.sidebar [aria-current="page"] { border-left: 2px solid #718644; color: var(--ink); }

h1 {
  margin-bottom: 18px;
  font-size: clamp(46px, 5.4vw, 78px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.045em;
}

h1 em { color: var(--olive); font-family: Georgia, "Times New Roman", serif; }
h2 { font-size: 27px; font-weight: 400; letter-spacing: -.6px; }
h3 { font-size: 17px; }
.intro { max-width: 590px; color: var(--muted); line-height: 1.8; }
.agent-list { margin-top: 56px; border-top: 1px solid var(--line); }

.agent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 25px 4px 25px 0;
  border-bottom: 1px solid var(--line);
}

.agent-row h2 { margin-bottom: 9px; }
.agent-row p, .flow p, .components p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.agent-action { font-size: 14px; white-space: nowrap; }

.github-link:hover, .portfolio-nav a:hover, .sidebar a:hover,
.agent-row:hover .agent-action, .components a, footer a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.architecture { margin-top: 46px; }
.architecture h2 { margin-bottom: 16px; }
.flow, .components { display: grid; gap: 16px; }
.flow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); }
.components { grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); }

.flow li, .components li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
}

.flow li { background: var(--panel); border-top-color: var(--olive); }
.components a { margin-top: auto; font-size: 14px; overflow-wrap: anywhere; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

footer a { color: var(--ink); }
.footer-signature { text-transform: uppercase; }

@media (max-width: 1000px) {
  .page { padding: 0 32px; }
  .portfolio-nav { column-gap: 26px; font-size: 16px; }
  .catalog-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 36px; }
}

@media (max-width: 760px) {
  .catalog-layout { grid-template-columns: 1fr; gap: 34px; padding: 40px 0 72px; }
  .agent-row { align-items: start; }
}

@media (max-width: 700px) {
  .page { padding: 0 23px; }
  .masthead { min-height: 84px; }
  .wordmark { gap: 10px; font-size: 9px; letter-spacing: 1px; }
  .github-link { font-size: 11px; }
  .portfolio-nav { column-gap: 22px; padding: 28px 0 12px; font-size: 14px; }
}

@media (max-width: 440px) {
  .agent-row { flex-direction: column; gap: 10px; }
}
