/* ==========================================================================
   AI Agent Protocol (extends /styles.css + /work/work.css)
   Hand-written; the page itself is generated by tools/geo/build.py
   ========================================================================== */
.ap-hero { padding: clamp(130px, 14vw, 190px) var(--gutter) clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.ap-hero__title { font-size: clamp(38px, 5.6vw, 92px); line-height: .98; letter-spacing: -0.05em; font-weight: 500; margin: 0; max-width: 16ch; }
.ap-hero__title em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .06em .2em 0; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ap-hero__lede { max-width: 680px; color: #c2c6cc; font-size: clamp(17px, 1.4vw, 20px); margin: 28px 0 0; }

.ap-draft { margin-top: 28px; max-width: 680px; padding: 14px 18px; border: 1px dashed #ffb547; border-radius: 14px; color: #ffd9a0; background: rgba(255, 181, 71, .06); font-size: 15px; }
.ap-todo { background: rgba(255, 181, 71, .16); color: #ffd9a0; border-radius: 4px; padding: 0 4px; font-family: var(--mono); font-size: .82em; }

.ap-stats { margin: clamp(36px, 4vw, 56px) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.ap-stat { background: var(--void); padding: 20px 22px; display: grid; gap: 8px; align-content: start; }
.ap-stat dt { color: var(--muted); }
.ap-stat dd { margin: 0; display: grid; gap: 4px; }
.ap-stat strong { font-size: clamp(28px, 2.6vw, 40px); line-height: 1.05; letter-spacing: -0.04em; font-weight: 500; }
.ap-stat span { color: var(--muted); font-size: 13px; }

.ap-layout { display: grid; grid-template-columns: 220px minmax(0, 820px); gap: clamp(32px, 6vw, 110px); padding: 0 var(--gutter); }
.ap-toc { padding-top: clamp(48px, 6vw, 88px); }
.ap-toc > * { position: sticky; }
.ap-toc p { top: 110px; margin: 0 0 14px; }
.ap-toc ol { top: 140px; list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ap-toc a { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; color: #b9bdc3; font-size: 15px; transition: color .3s; }
.ap-toc a:hover { color: var(--acid); }
.ap-toc .mono { font-size: 11px; color: var(--muted); }

.ap-sec { padding: clamp(48px, 6vw, 88px) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.ap-sec:last-child { border-bottom: 0; }
.ap-sec .eyebrow { margin-bottom: 12px; }
.ap-sec__title { font-size: clamp(30px, 3.4vw, 52px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 500; margin: 0 0 28px; }
.ap-body h3 { margin-top: 1.6em; }
.ap-body > h3:first-child { margin-top: 0; }
.ap-label { margin: 1.6em 0 .8em !important; }
.ap-tags { display: flex !important; gap: 6px !important; }
.ap-tags li { padding-left: 10px; }
.ap-tags li::before { display: none; }

.ap-table { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: 16px; }
.ap-table table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.ap-table th, .ap-table td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ap-table tr:last-child > * { border-bottom: 0; }
.ap-table thead th { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 400; background: var(--ink); }
.ap-table tbody th { color: var(--text); font-weight: 500; white-space: nowrap; width: 1%; }

.ap-offer { padding: 28px 0; border-top: 1px solid var(--line); }
.ap-offer:first-of-type { margin-top: 1.6em; }
.ap-offer h3 { margin-top: 0 !important; }
.ap-dl { margin: 1.2em 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 16px; }
.ap-dl > div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 12px 18px; background: var(--void); }
.ap-dl dt { color: var(--muted); padding-top: 3px; }
.ap-dl dd { margin: 0; }

.ap-callout { margin: 1.6em 0; padding: 22px 24px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--ink); }
.ap-callout > :last-child { margin-bottom: 0; }
.ap-callout .mono { color: var(--acid); margin: 0 0 10px; }

.ap-qa { margin-top: 2em; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.ap-qa__item { background: var(--void); padding: 22px 24px; }
.ap-qa__item h3 { font-size: 19px !important; margin: 0 0 8px !important; letter-spacing: -0.02em; }
.ap-qa__item p { margin: 0; font-size: 16px; }

.ap-guard li { color: var(--text); }

@media (max-width: 960px) {
  .ap-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ap-toc { padding-top: 40px; }
  .ap-toc > * { position: static; }
  .ap-toc ol { grid-template-columns: repeat(2, 1fr); column-gap: 24px; }
  .ap-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .ap-toc ol { grid-template-columns: 1fr; }
  .ap-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .ap-table tbody th { white-space: normal; width: auto; }
  .ap-table th, .ap-table td { padding: 12px 14px; }
  .ap-qa__item, .ap-callout { padding: 18px; }
}
