:root {
  --sans: var(--dg-font);
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --bg: #ece2d6;
  --surface: #f7f3ed;
  --text: var(--dg-ink);
  --muted: #625c59;
  --border: #d1c9bf;
  --accent: var(--dg-blue);
  --gutter: clamp(20px, 5vw, 88px);
  --section-space: clamp(48px, 6vw, 88px);
  --heading-size: clamp(28px, 3.2vw, 44px);
}

* { box-sizing: border-box; }
body { margin: 0; font: 400 16px/1.6 var(--sans); background: var(--bg); color: var(--text); }
h1, h2, h3, p { margin: 0; }
h2 { font-size: var(--heading-size); line-height: 1.15; font-weight: 600; letter-spacing: -.025em; }
h3 { font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.015em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, pre:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
code { font: 13px/1.65 var(--mono); overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.home-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 500; text-align: center; }
.home-primary:hover { background: #1d20aa; border-color: #1d20aa; text-decoration: none; }
.home-text-link { color: var(--accent); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.home-text-link:hover { text-decoration-thickness: 2px; }
.home-section-label { font-size: 14px; color: var(--muted); margin-bottom: 16px; }

.fair-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 96px; padding: 18px var(--gutter); border-bottom: 1px solid var(--border); }
.fair-brand, .footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; line-height: 1; }
.fair-brand img { width: 190px; height: auto; }
.brand-home, .brand-powered { display: block; line-height: 1; }
.brand-powered:hover small { color: var(--accent); }
.fair-brand small, .footer-brand small { color: var(--muted); font-size: 12px; line-height: 1.4; white-space: nowrap; }
.fair-header nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.fair-header nav button, .fair-header nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; }
.fair-header nav button:hover { text-decoration: underline; text-underline-offset: 4px; }
.fair-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; padding: 40px var(--gutter) 36px; }
.city-hero-copy { min-width: 0; }
.fair-intro h1 { font-size: clamp(32px, 5vw, 96px); line-height: 1.02; font-weight: 650; letter-spacing: -.05em; }
.city-hero-accent { color: var(--accent); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .city-hero-accent { display: inline-block; background: linear-gradient(105deg, #7400d5, #2527d1); background-clip: text; -webkit-background-clip: text; color: transparent; }
}
.city-hero-description { max-width: 660px; margin: 24px 0 28px; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.65; text-wrap: pretty; }
.city-hero-description strong { color: var(--text); font-weight: 600; }
.city-hero-description a { color: var(--text); font-weight: 500; text-decoration: underline; text-decoration-color: #b8aea4; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.city-hero-description a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.city-hero-open { flex-shrink: 0; padding-top: clamp(16px, 2.2vw, 44px); font-size: 14px; }
.city-hero-open p { color: var(--text); margin-bottom: 20px; font-size: clamp(20px, 1.8vw, 30px); font-weight: 600; line-height: 1.35; letter-spacing: -.035em; }
.city-hero-open p span { display: block; color: var(--muted); }
.city-hero-open a { display: inline-flex; align-items: center; gap: 16px; min-height: 44px; color: var(--accent); }
.city-hero-open a span { font-size: 22px; }

.home-example { display: grid; grid-template-columns: minmax(0, .6fr) minmax(0, 1.4fr); gap: clamp(32px, 5vw, 72px); padding: var(--section-space) var(--gutter); border-top: 1px solid var(--border); align-items: start; }
.home-example-copy { min-width: 0; max-width: 480px; }
.home-example-copy h2 { margin-bottom: 20px; }
.home-example-copy > p:not(.home-section-label) { color: var(--muted); }
.home-steps { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.home-step { padding: 4px 12px 14px 14px; border-bottom: 1px solid var(--border); border-left: 2px solid transparent; transition: background-color .15s, border-color .15s; }
.home-step.is-active { background: rgba(37, 39, 209, .05); border-left-color: var(--accent); }
.home-step-trigger { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0; font-size: 16px; font-weight: 600; text-align: left; }
.home-step.is-active .code-note-number { border-color: var(--accent); background: var(--accent); color: #fff; }
.home-step p { margin-left: 33px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.home-feature-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; }
.home-feature-links a { display: inline-flex; align-items: center; min-height: 44px; }
.home-code { --code-line-height: 19.5px; --code-padding: 20px; min-width: 0; border: 1px solid #c8bfb4; border-radius: 8px; background: #fffdfa; color: var(--text); overflow: hidden; box-shadow: 0 1px 2px rgba(20, 19, 38, .06), 0 20px 44px -28px rgba(20, 19, 38, .45); }
.home-code-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 4px 20px; background: #f3eee7; border-bottom: 1px solid var(--border); }
.home-code-heading > span { min-width: 0; color: var(--muted); font-size: 14px; }
.home-code-heading [data-copy-example] { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; margin-right: -13px; border-radius: 6px; color: var(--muted); }
.home-code-heading [data-copy-example]:hover { color: var(--accent); background: rgba(37, 39, 209, .06); }
.home-code-body { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); }
.home-code-lines { position: relative; z-index: 1; display: grid; align-content: start; padding: calc(var(--code-padding) + var(--setup-lines, 0) * var(--code-line-height)) 0 var(--code-padding) 16px; color: #a49c94; font: 13px/var(--code-line-height) var(--mono); text-align: right; user-select: none; font-variant-numeric: tabular-nums; }
.home-code pre { position: relative; z-index: 1; min-width: 0; margin: 0; padding: var(--code-padding) var(--code-padding) var(--code-padding) 16px; overflow: auto; max-width: 100%; tab-size: 4; }
.home-code pre:focus-visible { outline-offset: -3px; }
.home-code pre code { display: block; font-size: 13px; line-height: var(--code-line-height); white-space: pre; overflow-wrap: normal; }
/* Brand-tinted: DataGOL purple keywords and blue calls, with teal and magenta accents. */
.home-code .syntax-keyword { color: #6f06cc; }
.home-code .syntax-call, .home-code .syntax-decorator, .home-code .syntax-builtin { color: #2527d1; }
.home-code .syntax-type { color: #4338ca; }
.home-code .syntax-string { color: #0b7a6e; }
.home-code .syntax-number, .home-code .syntax-constant { color: #b4236e; }
.home-code .syntax-comment { color: #716e86; }
.home-code-focus { position: absolute; left: 0; right: 0; top: calc(var(--code-padding) + (var(--start, 0) + var(--setup-lines, 0)) * var(--code-line-height)); height: calc((var(--end, 0) - var(--start, 0) + 1) * var(--code-line-height)); border-left: 2px solid var(--accent); background: rgba(37, 39, 209, .06); pointer-events: none; transition: top .2s, height .2s; }
.code-note-number { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid #c9c3d3; border-radius: 50%; color: #554178; background: #fcfaf6; font-size: 12px; font-weight: 600; }
.home-highlights { padding: var(--section-space) var(--gutter); border-top: 1px solid var(--border); }
.home-section-heading { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; gap: 32px; margin-bottom: 32px; }
.home-section-heading h2 { max-width: 23ch; }
.home-section-heading > p { color: var(--muted); max-width: 42ch; }
.home-highlights-grid, .home-capabilities-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.home-capabilities { padding: var(--section-space) var(--gutter); border-top: 1px solid var(--border); background: var(--surface); }
.home-feature-card { --visual-bg: #e9e9f2; --visual-line: #c4c3d5; --visual-ink: #393951; min-width: 0; display: flex; align-items: flex-start; gap: 24px; padding: 28px 0; border-top: 1px solid var(--border); }
.home-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.home-card-body h3 { margin-bottom: 8px; font-size: 19px; }
.home-card-body > p { color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.home-card-body .home-feature-label { font-size: 12px; color: var(--accent); margin-bottom: 6px; }
.home-card-body .home-feature-links, .home-card-body > .home-text-link { margin-top: auto; }
.home-card-body > .home-text-link { min-height: 44px; display: inline-flex; align-items: center; }
.home-card-thumb { position: relative; flex-shrink: 0; width: 220px; height: 159px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--visual-bg); filter: grayscale(1); }
/* Diagrams are laid out at 360 x 260 and scaled down to the thumbnail. */
.home-card-visual { position: absolute; top: 0; left: 0; display: grid; align-items: center; width: 360px; height: 260px; padding: 24px; background: var(--visual-bg); color: var(--visual-ink); font-size: 12px; line-height: 1.5; transform: scale(.6111); transform-origin: 0 0; }
.home-card-visual > div { width: 100%; max-width: 340px; margin: auto; }
.home-card-visual strong { font-weight: 600; }
.home-card-visual small { display: block; font-size: 12px; font-weight: 400; color: #666477; }
.home-card-visual code { font-size: 12px; }
.home-card-memory, .home-card-extensions { --visual-bg: #eee4d7; --visual-line: #cdbda8; --visual-ink: #574b3c; }
.home-card-knowledge, .home-card-durable { --visual-bg: #e1ebe5; --visual-line: #b5c9bd; --visual-ink: #315744; }
.visual-agent { width: fit-content; min-width: 132px; margin: 0 auto; padding: 9px 16px; border-radius: 5px; background: var(--accent); color: #fff; text-align: center; font-weight: 500; }
.visual-branch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; position: relative; padding-top: 28px; }
.visual-branch::before { content: ''; position: absolute; left: 25%; right: 25%; top: 14px; height: 14px; border: 1px solid var(--visual-line); border-bottom: 0; border-radius: 4px 4px 0 0; }
.visual-branch::after { content: ''; position: absolute; left: 50%; top: 0; height: 14px; border-left: 1px solid var(--visual-line); }
.visual-branch > div { position: relative; display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border: 1px solid var(--visual-line); border-radius: 5px; background: #fbfafc; text-align: center; gap: 2px; }
.visual-symbol { color: var(--accent); font-weight: 600; font-size: 19px; line-height: 1; margin-bottom: 8px; }
.visual-symbol-mcp { color: #426b5a; }
.home-card-visual .visual-note { font-size: 12px; color: #666477; text-align: center; margin: 16px 0 0; }
.visual-memory { position: relative; height: 186px; }
.memory-sheet { position: absolute; display: flex; flex-direction: column; gap: 7px; width: calc(100% - 36px); padding: 14px 18px; min-height: 92px; border: 1px solid var(--visual-line); border-radius: 5px; background: #f7f1e8; }
.memory-sheet span { font-size: 12px; }
.memory-sheet-back { top: 0; left: 0; }
.memory-sheet-middle { top: 47px; left: 18px; background: #fbf6ed; }
.memory-sheet-front { top: 94px; left: 36px; background: #fffdf8; box-shadow: 0 3px 0 #d7c8b533; }
.knowledge-query { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--visual-line); border-radius: 5px; background: #f8fcf9; }
.knowledge-query b { font-size: 12px; font-weight: 500; color: #315744; }
.knowledge-record { display: flex; align-items: center; gap: 14px; padding: 17px 12px; border: 1px solid var(--visual-line); background: #f8fcf9; border-radius: 5px; margin-top: 10px; }
.knowledge-record small { color: #52685b; margin-top: 3px; }
.knowledge-document { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 30px; height: 38px; border: 1px solid #91ac9c; padding: 6px; flex-shrink: 0; }
.knowledge-document i { height: 1px; background: #91ac9c; }
.knowledge-document i:last-child { width: 65%; }
.knowledge-relations { display: flex; justify-content: center; align-items: center; margin-top: 15px; }
.knowledge-relations > span { padding: 4px 7px; border: 1px solid var(--visual-line); border-radius: 4px; }
.knowledge-relations > i { width: 12px; height: 1px; background: var(--visual-line); }
.visual-specialists .visual-branch { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.visual-specialists .visual-branch::before { left: 16.666%; right: 16.666%; }
.visual-specialists .visual-branch::after { height: 28px; }
.visual-specialists .visual-branch > div { padding: 14px 2px; }
.event-flow { display: flex; align-items: center; margin-bottom: 17px; }
.event-flow > span { flex: 1; padding: 7px 3px; border: 1px solid var(--visual-line); background: #faf9fc; border-radius: 4px; text-align: center; white-space: nowrap; }
.event-flow > span:nth-of-type(2) { background: var(--accent); color: #fff; border-color: var(--accent); }
.event-flow > i { width: 14px; height: 1px; background: var(--visual-line); }
.event-feed > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--visual-line); }
.event-feed b { font-weight: 500; text-align: right; }
.extension-package { border: 1px solid var(--visual-line); border-radius: 6px; background: #fffaf3; padding: 14px; }
.extension-package > strong { display: block; margin-bottom: 12px; }
.extension-package > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.extension-package > div > span { padding: 7px 2px; background: #f0e8dc; text-align: center; border-radius: 3px; }
.visual-connector { width: 1px; height: 24px; background: var(--visual-line); margin: auto; }
.extension-target { padding: 10px; border: 1px solid var(--visual-line); border-radius: 5px; background: #fbf5ed; text-align: center; }
.home-card-approvals { --visual-bg: #292943; --visual-line: #555571; --visual-ink: #fff; }
.visual-caption { display: block; font-size: 12px; color: #cecede; margin-bottom: 10px; }
.policy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--visual-line); }
.policy-row > span { min-width: 48px; text-align: center; font-size: 12px; }
.policy-allow { color: #aad9bb; }
.policy-ask { color: #edce91; }
.policy-deny { color: #efb7b3; }
.policy-limit { display: flex; justify-content: space-between; margin-top: 13px; color: #cecede; }
.policy-limit strong { color: #fff; }
.durable-step { display: flex; position: relative; align-items: center; gap: 14px; padding: 10px 0; }
.durable-step small { color: #52685b; margin-top: 2px; }
.durable-step::before { content: ''; position: absolute; left: 6px; top: 0; height: 100%; border-left: 1px solid var(--visual-line); }
.durable-step:first-child::before { top: 50%; height: 50%; }
.durable-step:last-child::before { height: 50%; }
.durable-dot { width: 13px; height: 13px; border: 2px solid #6b927c; border-radius: 50%; background: var(--visual-bg); z-index: 1; flex-shrink: 0; }
.durable-store .durable-dot { background: #527b63; }
.recorder-timeline > div { display: flex; align-items: center; gap: 12px; position: relative; padding: 7px 0; }
.recorder-timeline > div::before { content: ''; position: absolute; left: 3px; top: 0; bottom: 0; width: 1px; background: var(--visual-line); }
.recorder-timeline > div > i { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: #75749d; z-index: 1; }
.timeline-bar { margin-left: auto; width: 25%; height: 6px; background: #c6c5de; border-radius: 2px; }
.recorder-timeline > div:nth-child(2) .timeline-bar { width: 37%; background: #7b7db5; }
.recorder-timeline > div:nth-child(3) .timeline-bar { width: 15%; }
.recorder-export { display: flex; justify-content: space-between; gap: 12px; padding-top: 13px; margin-top: 12px; border-top: 1px solid var(--visual-line); }
.home-card-fallback { --visual-bg: #e4eaf3; --visual-line: #becbdd; --visual-ink: #334d6a; }
.fallback-model { padding: 10px 12px; background: #f8fafd; border: 1px solid var(--visual-line); border-radius: 5px; }
.fallback-model small { margin-top: 3px; color: #5d6d80; }
.fallback-backup { border-color: #909ecc; }
.fallback-connector { position: relative; height: 36px; margin-left: 18px; border-left: 1px solid #95aac3; }
.fallback-connector > span { display: inline-block; padding: 8px 0 0 12px; font-size: 12px; }
.fallback-connector::after { content: ''; position: absolute; left: -4px; bottom: 2px; width: 6px; height: 6px; border-right: 1px solid #95aac3; border-bottom: 1px solid #95aac3; transform: rotate(45deg); }
.fair-start { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding: var(--section-space) var(--gutter); border-top: 1px solid var(--border); }
.fair-start p { color: var(--muted); margin-top: 16px; }
.home-start-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.install { display: inline-flex; align-items: center; gap: 16px; min-height: 44px; padding: 8px 0; font-size: 14px; text-align: left; }
.install > span { color: var(--accent); }
footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding: 28px var(--gutter); border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.footer-brand img { width: 132px; height: auto; }
.city-footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.city-footer-links > a { display: inline-flex; align-items: center; min-height: 44px; }
.city-github-link { justify-content: center; width: 44px; }
.skip-link { position: fixed; left: 16px; top: -100px; padding: 14px 20px; background: #fff; color: var(--accent); z-index: 100; }
.skip-link:focus { top: 12px; }
.no-script-note { padding: 16px var(--gutter); background: var(--surface); font-size: 14px; }
.no-script-note a { color: var(--accent); text-decoration: underline; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 13px 20px; background: var(--text); color: #fff; font-size: 14px; border-radius: 4px; z-index: 50; opacity: 0; pointer-events: none; }
#toast.show { opacity: 1; }

@media (max-width: 1050px) {
  .home-example { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .home-example-copy { max-width: 640px; }
  .home-highlights-grid, .home-capabilities-grid { gap: 0 32px; }
}
@media (max-width: 900px) {
  .fair-intro { flex-direction: column; align-items: flex-start; gap: 20px; }
  .city-hero-open { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 0; }
  .city-hero-open p { margin: 0; font-size: 18px; }
}
@media (max-width: 760px) {
  .fair-header { min-height: 84px; gap: 16px; padding-block: 14px; }
  .fair-brand img { width: 152px; }
  .fair-header nav [data-city-tour], .fair-header nav .city-company-link { display: none; }
  .fair-intro { padding-block: 32px; }
  .fair-intro h1 { font-size: clamp(26px, 7.5vw, 48px); }
  .city-hero-description { margin-top: 20px; }
  .home-code-heading { padding-inline: 16px; }
  .home-code pre { padding: var(--code-padding) 16px var(--code-padding) 12px; }
  .home-code-lines { padding-left: 12px; }
  .home-highlights-grid, .home-capabilities-grid { grid-template-columns: minmax(0, 1fr); }
  .home-section-heading { grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; }
  .fair-start { align-items: flex-start; flex-direction: column; gap: 24px; }
  .city-footer-links { width: 100%; justify-content: space-between; gap: 16px; }
}
@media (max-width: 560px) {
  .home-feature-card { gap: 16px; }
  .home-card-thumb { width: 140px; height: 101px; }
  .home-card-visual { transform: scale(.3889); }
}
@media (max-width: 365px) {
  .fair-brand img { width: 140px; }
  .fair-header nav { font-size: 12px; }
  .extension-package > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .city-hero-accent { background: none; color: CanvasText; }
}
