/* One quiet visual language across the home, work and article pages. */
:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #050505;
  --muted: #767676;
  --soft: #f6f6f6;
  --gutter: 64px;
  --frame: 64px;
  --column-gap: 64px;
  --section-gap: 80px;
  font-family: -apple-system, system-ui, "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
::selection { background: #e7e7e7; color: var(--ink); }
a { color: inherit; text-decoration-color: #b5b5b5; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { font-size: inherit; font-weight: 400; line-height: 1.25; }
strong { font-weight: 600; }
ul, ol { padding-left: 22px; }
.shell { position: relative; max-width: 1600px; margin-inline: auto; }
.page-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--column-gap); }
.grid-content { grid-column: 2 / -1; }
.site-header { position: absolute; z-index: 2; top: var(--frame); left: var(--gutter); width: 64px; height: 64px; }
.brand { width: 64px; height: 64px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; text-decoration: none; }
.brand img { display: block; width: 64px; height: 64px; border: 1px solid #e8e8e8; border-radius: 50%; object-fit: cover; transition: transform 200ms ease-out; }
@media (hover: hover) and (min-width: 768px) {
  .brand:hover img { transform: rotate(-3deg); }
}
.skip-link { position: fixed; z-index: 10; top: -100px; left: 16px; padding: 10px 16px; color: white; background: var(--ink); }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
main { padding: var(--frame) var(--gutter) 0; }
.intro-copy { max-width: 460px; }
.intro-copy p + p { margin-top: 8px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.button { min-height: 36px; padding: 6px 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--soft); color: var(--ink); text-decoration: none; line-height: 24px; white-space: nowrap; }
.button:hover { background: #ebebeb; }
.writing-section { margin-top: var(--section-gap); }
.section-heading { line-height: 20px; font-weight: 600; }
.writing-list { list-style: none; margin: 0; padding: 0; max-width: 700px; }
.writing-list li + li { margin-top: 24px; }
.writing-link { display: block; text-decoration: none; }
.writing-title { display: block; line-height: 20px; }
.writing-description { display: block; color: var(--muted); line-height: 24px; margin-top: 4px; }
.writing-link:hover .writing-title { text-decoration: underline; text-underline-offset: 3px; }
.site-footer { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--column-gap); align-items: center; margin-top: 80px; padding: 0 var(--gutter) 80px; color: var(--muted); font-size: 14px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-links { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 24px; }
.linkedin-link { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; }
.linkedin-link svg { display: block; width: 18px; height: 18px; }
.work-main > .page-heading, .work-main > .page-lead { grid-column: 2 / -1; max-width: 620px; }
.page-heading { line-height: 20px; font-weight: 600; }
.page-lead { margin-top: 8px; }
.service-section, .work-section { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--column-gap); margin-top: var(--section-gap); }
.service-section > h2, .work-section > h2 { grid-column: 1; font-weight: 600; }
.service-list, .work-section > p, .work-section > .actions { grid-column: 2 / -1; max-width: 620px; }
.service { max-width: 620px; }
.service + .service { margin-top: 32px; }
.service h3 { line-height: 20px; }
.service p { color: var(--muted); margin-top: 4px; }
.work-section > p + p { margin-top: 16px; }
.location, .page-kicker { color: var(--muted); }
.work-section > .actions { margin-top: 20px; }
.article-main article { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--column-gap); }
.article-header, .prose, .article-sources { grid-column: 2 / -1; max-width: 655px; }
.article-header { margin-bottom: 64px; }
.page-kicker { margin-bottom: 8px; }
.prose { line-height: 24px; }
.prose p { margin-bottom: 16px; }
.prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose ul { margin: 0 0 16px; padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.prose h2 { margin: 36px 0 16px; font-weight: 600; }
.prose > h2:first-child { margin-top: 0; }
.prose a, .article-sources a { overflow-wrap: anywhere; }
.prose sup { line-height: 0; font-size: 12px; }
.ai-diagram { margin: 28px 0 32px; min-width: 0; }
.ai-diagram-canvas { padding: 24px; border: 1px solid #e8e8e8; border-radius: 14px; background: #fafafa; }
.ai-diagram figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 20px; }
.prose .ai-diagram-kicker { margin: 0 0 24px; color: #777f89; font-size: 11px; font-weight: 500; letter-spacing: .13em; line-height: 16px; }
.prose .ai-diagram-note { margin: 20px 0 0; color: #68717b; font-size: 12px; line-height: 18px; }
.prose .ai-example-line { margin: 0 0 18px; font-size: 20px; line-height: 28px; }
.ai-token-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-token { display: inline-flex; align-items: center; min-height: 34px; padding: 5px 11px; border: 1px solid #aec2e8; border-radius: 7px; background: #fff; color: #456aad; font: 13px/22px ui-monospace, SFMono-Regular, Menlo, monospace; }
.ai-token-accent { background: #eef3fc; border-color: #789ad7; }
.ai-network-art { display: block; width: 100%; height: auto; margin-bottom: 18px; }
.ai-network-flow, .ai-training-grid, .ai-grounding-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ai-flow-item, .ai-mini-card { min-width: 0; padding: 14px; border: 1px solid #e0e3e8; border-radius: 9px; background: #fff; }
.ai-flow-item { display: flex; flex-direction: column; gap: 7px; }
.ai-flow-num { color: #5c7fbe; font-size: 12px; line-height: 16px; }
.ai-flow-item strong, .ai-mini-card strong { font-size: 14px; font-weight: 500; line-height: 20px; }
.ai-flow-item > span:last-child { color: #68717b; font-size: 12px; line-height: 18px; }
.ai-score-preview { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ai-score-label { flex-basis: 100%; color: #68717b; font-size: 12px; line-height: 18px; }
.ai-mini-card-accent { border-color: #9fb9e7; background: #f1f5fd; }
.ai-mini-label { display: block; margin-bottom: 10px; color: #68717b; font-size: 11px; font-weight: 500; letter-spacing: .04em; line-height: 16px; }
.ai-mini-card strong { display: block; }
.ai-mini-card p { margin: 0; font-size: 14px; line-height: 20px; }
.ai-context-sentence { font-size: 18px; line-height: 30px; }
.ai-context-sentence mark { padding: 3px 5px; border: 1px solid #9fb9e7; border-radius: 5px; background: #eef3fc; color: #456aad; }
.ai-context-link { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 25px; color: #456aad; font-size: 13px; line-height: 20px; }
.ai-context-link span:first-child, .ai-context-link span:last-child { padding: 6px 10px; border: 1px solid #c7d5ef; border-radius: 7px; background: #fff; }
.prose .ai-prompt { margin: 0 0 16px; font-size: 17px; line-height: 26px; }
.ai-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ai-bars { display: grid; gap: 10px; }
.ai-bar-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 70px; align-items: center; gap: 10px; color: #48515b; font-size: 12px; line-height: 18px; }
.ai-bar-row > span:last-child { color: #7c848d; text-align: right; }
.ai-bar-track { display: block; height: 11px; border-radius: 999px; background: #e8eaee; }
.ai-bar-track > span { display: block; height: 100%; border-radius: inherit; background: #a9bfe7; }
.ai-bar-row:first-child .ai-bar-track > span { background: #779bd9; }
.ai-eval-table { border: 1px solid #e0e3e8; border-radius: 9px; overflow: hidden; background: #fff; }
.ai-eval-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.ai-eval-row + .ai-eval-row { border-top: 1px solid #e8eaed; }
.ai-eval-row > span { min-width: 0; padding: 10px 12px; font-size: 13px; line-height: 19px; }
.ai-eval-row > span + span { border-left: 1px solid #e8eaed; }
.ai-eval-head { background: #f3f5f8; color: #68717b; font-weight: 500; }
.article-sources { margin-top: 48px; }
.article-sources h2 { font-weight: 600; }
.resource-list { list-style: none; margin: 16px 0 0; padding: 0; }
.resource-list li + li { margin-top: 12px; }
.read-next { margin: 64px 0 0 calc((100% - 3 * var(--column-gap)) / 4 + var(--column-gap)); }
.error-page { margin-left: calc((100% - 3 * var(--column-gap)) / 4 + var(--column-gap)); max-width: 620px; }
.error-page p:not(.page-kicker) { margin-top: 16px; }
@media (min-width: 768px) {
  .footer-links { align-items: center; }
  .article-shell .site-header { position: sticky; top: 64px; left: auto; width: 64px; margin-left: 64px; margin-bottom: -64px; }
}
@media (max-width: 767px) {
  :root { --gutter: 16px; --frame: 48px; --column-gap: 0px; --section-gap: 64px; }
  .page-grid, .service-section, .work-section, .article-main article { grid-template-columns: minmax(0, 1fr); }
  .grid-content, .work-main > .page-heading, .work-main > .page-lead, .service-section > h2, .service-list, .work-section > h2, .work-section > p, .work-section > .actions, .article-header, .prose, .article-sources { grid-column: 1; }
  .home-main, .work-main, .article-main, .error-main { padding-top: 128px; }
  .writing-section { row-gap: 24px; }
  .writing-list { margin-top: 24px; }
  .service-section, .work-section { row-gap: 24px; }
  .service + .service { margin-top: 24px; }
  .article-main { padding-top: 160px; }
  .article-header { margin-bottom: 56px; }
  .read-next, .error-page { margin-left: 0; }
  .site-footer { grid-template-columns: minmax(0, 1fr); row-gap: 8px; margin-top: 64px; padding-bottom: 64px; }
  .footer-links { grid-column: 1; flex-direction: column; gap: 8px; }
}
@media (max-width: 600px) {
  .ai-diagram-canvas { padding: 18px; }
  .ai-network-flow, .ai-training-grid, .ai-grounding-grid, .ai-choice-grid { grid-template-columns: minmax(0, 1fr); }
  .ai-flow-item { gap: 4px; }
  .ai-context-sentence { font-size: 16px; line-height: 28px; }
  .ai-bar-row { grid-template-columns: 70px minmax(0, 1fr); }
  .ai-bar-row > span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .brand:hover img { transform: none; }
}
@media (forced-colors: active) {
  .brand, .button { border: 1px solid ButtonText; background: ButtonFace; color: ButtonText; }
}
@media print {
  body { color: #000; background: #fff; }
  .site-header, .site-footer, .actions, .read-next, .skip-link { display: none; }
  main, .home-main, .work-main, .article-main { padding: 0; }
  .page-grid, .service-section, .work-section, .article-main article { display: block; }
  .writing-section, .service-section, .work-section { margin-top: 32px; }
  .prose, .article-header, .article-sources { max-width: none; }
  h1, h2, h3 { break-after: avoid; }
  p { orphans: 3; widows: 3; }
}
