:root{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
html[lang="ja"]{--font:"Avenir Next","Hiragino Kaku Gothic ProN","Yu Gothic","Meiryo",sans-serif;line-break:strict}
.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}
.header-actions{gap:16px}
.preference-controls{display:flex;align-items:center;gap:4px}
.preference-picker{position:relative}
.preference-trigger{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:8px 10px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted);font:500 14px/1.5 var(--font);white-space:nowrap;transition:background .16s,color .16s,border-color .16s}
.preference-trigger svg,.preference-menu svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.preference-trigger .preference-chevron{width:12px;height:12px;opacity:.6;transition:transform .16s}
.preference-trigger:hover{background:var(--soft);color:var(--ink)}
.preference-trigger[aria-expanded="true"]{background:var(--soft);color:var(--ink);border-color:var(--line)}
.preference-trigger[aria-expanded="true"] .preference-chevron{transform:rotate(180deg)}
.preference-trigger:focus-visible,.preference-menu button:focus-visible{outline:2px solid var(--purple);outline-offset:2px}
.theme-trigger{width:40px;padding:8px}
#theme-icon{display:inline-flex}
.theme-trigger svg{width:20px;height:20px}
.preference-menu{position:absolute;z-index:30;right:0;top:calc(100% + 9px);width:184px;padding:7px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);box-shadow:0 12px 38px #17182318,0 2px 6px #17182308}
.preference-menu[hidden]{display:none}
.preference-menu-title{display:block;padding:6px 10px 7px;color:var(--muted);font-size:11px;line-height:1.5}
.preference-menu button{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:9px 10px;border-radius:7px;background:transparent;color:var(--ink);font:500 14px/1.5 var(--font);text-align:left}
.preference-menu button>span{flex:1}
.preference-menu button:hover{background:#f4f2fa}
.preference-menu button[aria-checked="true"]{background:#eee8fc;color:#6545c2}
.preference-menu .preference-check{width:16px;height:16px;opacity:0;stroke-width:1.8;margin-left:auto}
.preference-menu button[aria-checked="true"] .preference-check{opacity:1}
html[data-theme="dark"] .preference-menu{background:#1b1d28;border-color:#343647;box-shadow:0 14px 40px #0005,0 2px 8px #0003}
html[data-theme="dark"] .preference-menu button:hover{background:#262936}
html[data-theme="dark"] .preference-menu button[aria-checked="true"]{background:#302840;color:#c9b6ff}
@media(prefers-reduced-motion:no-preference){.preference-menu:not([hidden]){animation:preference-appear .14s ease-out;transform-origin:top right}}
@keyframes preference-appear{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
html:not([lang="zh-CN"]) .hero h1{white-space:normal;font-size:clamp(44px,5.5vw,78px);letter-spacing:-2.6px}
html[lang="en"] .headline-window{margin-inline-start:.12em}
html[lang="en"] .detail-readout strong>span{margin-inline-start:.2em}
html:not([lang="zh-CN"]) .trace-step b,html:not([lang="zh-CN"]) .trace-step small{white-space:normal;line-height:1.5}
html:not([lang="zh-CN"]) .trace-step b{min-width:0}
html:not([lang="zh-CN"]) .loop-caption{white-space:normal;max-width:260px;text-align:center}
.hero-actions,.closing-actions{flex-wrap:wrap}
.hero-actions>.button,.closing-actions>.button{max-width:100%;white-space:normal;text-align:center}
html:not([lang="zh-CN"]) .cost-heading h2,html:not([lang="zh-CN"]) .connect-heading h2,html:not([lang="zh-CN"]) .deployment-section h2{font-size:clamp(31px,3.2vw,44px)}
@media(max-width:1150px){.site-header nav{display:none}}
@media(max-width:700px){
  .site-header{padding:0 18px;gap:8px;min-height:75px;height:auto}
  .site-header .brand{gap:7px}
  .site-header .brand-mark{width:28px;height:28px}
  .site-header .brand-wordmark{height:18px}
  .header-actions{gap:0}
  .header-actions>.button{display:none}
  .preference-controls{gap:2px}
  .preference-trigger{gap:6px;padding:8px;font-size:13px}
  .preference-trigger svg{width:16px;height:16px}
  .preference-trigger .preference-chevron{width:11px;height:11px}
  .theme-trigger{width:40px}
  .theme-trigger svg{width:19px;height:19px}
  .preference-menu{width:180px}
  html:not([lang="zh-CN"]) .hero h1{font-size:clamp(30px,8.6vw,46px);letter-spacing:-1px;line-height:1.5}
  html:not([lang="zh-CN"]) .headline-lead{display:block}
  html:not([lang="zh-CN"]) .loop-caption{max-width:none;text-align:left}
  html:not([lang="zh-CN"]) .trace-step small{max-width:106px}
  html:not([lang="zh-CN"]) .connect-selector{gap:10px}
  html:not([lang="zh-CN"]) .evidence-footer{gap:5px}
  html:not([lang="zh-CN"]) .usage-legend{gap:12px;flex-wrap:wrap}
  html:not([lang="zh-CN"]) .faq-section h2{font-size:26px}
}
@media(max-width:340px){.site-header{flex-wrap:wrap;justify-content:center;gap:10px;padding:13px 16px}}

/* Loaded after styles.css. Palette-only overrides preserve layout and motion. */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #efedf7;
  --muted: #aaa7ba;
  --purple: #b79cff;
  --purple-dark: #d1bdff;
  --line: #343647;
  --soft: #1b1c29;
  --teal: #78d7bd;
  --orange: #e8b475;
  --dark-canvas: #11131c;
  --dark-surface: #191b27;
  --dark-raised: #222432;
  --dark-soft: #1d1b2b;
  --dark-border: #363648;
  --dark-text: #efedf7;
  --dark-muted: #aaa7ba;
  --dark-subtle: #9794ab;
  --dark-lilac: #c4aff1;
}
html[data-theme="dark"] body {background: var(--dark-canvas); color: var(--dark-text)}
html[data-theme="dark"] .site-header {background: #11131cee}
html[data-theme="dark"] .site-header nav,
html[data-theme="dark"] .github-link {color: #c4c0d2}
html[data-theme="dark"] .button.primary {background: #7355ec; color: #fff; box-shadow: 0 5px 18px #00000030}
html[data-theme="dark"] .button.primary:hover {background: #7858dc; box-shadow: 0 9px 25px #7355ec30}
html[data-theme="dark"] .button.quiet {background: var(--dark-surface); color: #d7d1e7; border-color: #494158}
html[data-theme="dark"] .button.quiet:hover {background: #252033; border-color: #9b81c9}
html[data-theme="dark"] .hero-intro,
html[data-theme="dark"] .hero-description {color: #bbb6cc}
html[data-theme="dark"] .window-corner {border-color: #b79cff}
html[data-theme="dark"] .hero-proof span+span {border-color: #464052}
html[data-theme="dark"] .hero-proof button {color: #ccb1f5; border-color: #74608d}
html[data-theme="dark"] .hero-proof,
html[data-theme="dark"] .trace-meta,
html[data-theme="dark"] .fine,
html[data-theme="dark"] .detail-readout small,
html[data-theme="dark"] .trace-extension>span {color: var(--dark-muted)!important}
html[data-theme="dark"] .explore-prompts button {color: #b6acc9}
html[data-theme="dark"] .explore-prompts button[aria-selected="true"] {background: #2b2242; color: #d1bbff; border-color: #614981}
html[data-theme="dark"] .explore-prompts button:hover {color: #d5c2ff}
html[data-theme="dark"] .trace-canvas {background: linear-gradient(135deg,#1a1b29,#1c1a2a 65%,#171a25); border-color: #393448; box-shadow: 0 16px 70px #00000025}
html[data-theme="dark"] .trace-topbar {background: #1c1c2ac4; border-color: #373246}
html[data-theme="dark"] .task-icon {background: #2c2640; color: #c4aeee; border-color: #514263}
html[data-theme="dark"] .demo-label {color: #bbb1cc; border-color: #51455e}
html[data-theme="dark"] .trajectory {background-image: radial-gradient(#4b435c .7px,transparent .7px)}
html[data-theme="dark"] .trajectory:before {background: #514763}
html[data-theme="dark"] .route-line,
html[data-theme="dark"] .branch-line {stroke: #574b6a}
html[data-theme="dark"] .loop-line {stroke: #a386d2}
html[data-theme="dark"] .route-dot {fill: #88779e}
html[data-theme="dark"] #flow-signal {fill: #c1a4ff}
html[data-theme="dark"] .ambient-flow {stroke: #b79cff}
html[data-theme="dark"] .tool-flow {stroke: #78d7bd}
html[data-theme="dark"] .agent-flow {stroke: #c09aee}
html[data-theme="dark"] .loop-caption {color: #c1a3de; background: #211c30}
html[data-theme="dark"] .trace-step {background: #232131; border-color: #4b405b; color: #bbb0c9; box-shadow: 0 7px 20px #00000015}
html[data-theme="dark"] .trace-step b {color: #e2dbea}
html[data-theme="dark"] .trace-step small {color: #bbb0c9}
html[data-theme="dark"] .trace-step:hover {border-color: #a88bc9; box-shadow: 0 12px 27px #00000030}
html[data-theme="dark"] .trace-step.highlighted {background: #2d233e; border-color: #ae8bd3; box-shadow: 0 7px 22px #00000025}
html[data-theme="dark"] .step-glyph {background: #383044; color: #c6a9e9}
html[data-theme="dark"] .rule-glyph {background: #263249; color: #91b9f7}
html[data-theme="dark"] .tool-glyph {background: #203b34; color: #85d8bd}
html[data-theme="dark"] .retry-glyph {background: #3d3021; color: #e9bc84}
html[data-theme="dark"] .test-glyph {background: #26392e; color: #98d0a7}
html[data-theme="dark"] .step-retry.highlighted {background: #30271f; border-color: #aa8153}
html[data-theme="dark"] .step-flag {background: #3c2e1d; color: #efc48e; border-color: #9b764c}
html[data-theme="dark"] .trace-canvas[data-mode="tools"] .step-tool {border-color: #6cb9a1; box-shadow: 0 7px 23px #78d7bd12}
html[data-theme="dark"] .trace-canvas[data-mode="rules"] .step-rules,
html[data-theme="dark"] .trace-canvas[data-mode="rules"] .step-test {border-color: #9a8cc3; box-shadow: 0 7px 23px #b79cff12}
html[data-theme="dark"] .trace-branch {background: #232031; border-color: #4b405d; color: #b7a6c9}
html[data-theme="dark"] .trace-branch b {color: #d2bde6}
html[data-theme="dark"] .branch-dot.teal {background: #78d7bd}
html[data-theme="dark"] .branch-dot.purple {background: #c09aee}
html[data-theme="dark"] .lens-detail {background: #191925; border-color: #433650}
html[data-theme="dark"] .detail-label {color: #c1a4e0}
html[data-theme="dark"] .detail-main p {color: #bcb1c8}
html[data-theme="dark"] .detail-readout {border-color: #433650; color: #bda8d0}
html[data-theme="dark"] .detail-readout strong {color: #d6b9f2}
html[data-theme="dark"] .mini-breakdown i {background: #b095d0}
html[data-theme="dark"] .mini-breakdown i:nth-child(2) {background: #8c65b6}
html[data-theme="dark"] .mini-breakdown i:nth-child(3) {background: #5b496e}
html[data-theme="dark"] .trace-hint {color: #b6a5ca}
html[data-theme="dark"] .trace-extension button {color: #cfb9e9}
html[data-theme="dark"] .trace-extension a {color: #cfb9e9}
html[data-theme="dark"] .trace-extension button span {color: #aa94bb}
html[data-theme="dark"] .replay-button,
html[data-theme="dark"] .motion-toggle {background: #24202f; color: #d2b8e7; border-color: #5c466c}
html[data-theme="dark"] .replay-button:hover,
html[data-theme="dark"] .replay-button[aria-pressed="true"],
html[data-theme="dark"] .motion-toggle:hover {background: #31253f; color: #e1c6fc; border-color: #a183bc}
html[data-theme="dark"] .motion-toggle[aria-pressed="true"] {color: #c8afff}
html[data-theme="dark"] .ecosystem p,
html[data-theme="dark"] .tool-names a {color: #a99bb9}
html[data-theme="dark"] .tool-names span {color: #b9adc8}
html[data-theme="dark"] .section-tag {color: #c1a0e7}
html[data-theme="dark"] .diagnosis-section {background: #1c1928; border-color: #3a3049}
html[data-theme="dark"] .diagnosis-copy>p {color: #bfb1ce}
html[data-theme="dark"] .diagnosis-path {color: #c6a5e9}
html[data-theme="dark"] .diagnosis-path i {background: #76618e}
html[data-theme="dark"] .evidence-explorer {background: #232030; border-color: #554062; box-shadow: 0 20px 40px #00000022}
html[data-theme="dark"] .evidence-header {border-color: #4b365a}
html[data-theme="dark"] .evidence-tabs button {color: #b8a2cc}
html[data-theme="dark"] .evidence-tabs button[aria-selected="true"] {color: #edc18c; background: #403020}
html[data-theme="dark"] .finding-mark {background: #41301e; color: #f0c28b}
html[data-theme="dark"] .finding p {color: #baa5c9}
html[data-theme="dark"] .event-stream {border-color: #8b6d45}
html[data-theme="dark"] .event-stream>div,
html[data-theme="dark"] .event-stream time {color: #bda7d0}
html[data-theme="dark"] .event-stream>div:before {background: #d1a673}
html[data-theme="dark"] .event-stream span,
html[data-theme="dark"] .event-stream code {color: #d1b4eb}
html[data-theme="dark"] .event-stream b {color: #bda3d2}
html[data-theme="dark"] .review-question {background: #2c233a}
html[data-theme="dark"] .review-question>span {color: #bb9fd2}
html[data-theme="dark"] .review-question p {color: #d2b5e9}
html[data-theme="dark"] .evidence-footer {background: #221c2d; border-color: #4b365a; color: #bfa4d2}
html[data-theme="dark"] .connector-dot {background: #8b6ea5}
html[data-theme="dark"] .cost-heading p,
html[data-theme="dark"] .connect-heading p {color: #c0afcf}
html[data-theme="dark"] .usage-header b {color: #c6b0d9}
html[data-theme="dark"] .usage-total strong {color: #d0adeb}
html[data-theme="dark"] .usage-total>span {color: #baa4cc}
html[data-theme="dark"] .usage-input {--segment-color: #aa88d6; color: #21132e!important}
html[data-theme="dark"] .usage-cache {--segment-color: #72509a; color: #fff}
html[data-theme="dark"] .usage-output {--segment-color: #3c2d4c; color: #e8d0fc!important}
html[data-theme="dark"] .swatch.input {background: #aa88d6}
html[data-theme="dark"] .swatch.cache {background: #72509a}
html[data-theme="dark"] .swatch.output {background: #8b71a6}
html[data-theme="dark"] .usage-legend {color: #c7afd9}
html[data-theme="dark"] .cost-note {color: #bba5cd}
html[data-theme="dark"] .case-story-link {background: #251c33; border-color: #543960; color: #ddc1f0}
html[data-theme="dark"] .case-story-link>span:first-child {color: #bfa0d5}
html[data-theme="dark"] .story-action {color: #d2b1eb}
html[data-theme="dark"] .case-story-link:hover {background: #30223f; border-color: #a87fc6}
html[data-theme="dark"] .connect-section {background: #151520; border-color: #393047}
html[data-theme="dark"] .connect-selector {border-color: #50355e}
html[data-theme="dark"] .connect-selector button {color: #bca0ce}
html[data-theme="dark"] .connect-selector button[aria-selected="true"] {color: #dbb9f3}
html[data-theme="dark"] .connect-selector button[aria-selected="true"]:after {background: #c697e6}
html[data-theme="dark"] .connect-message p {color: #c4a8d7}
html[data-theme="dark"] .connect-steps li>span {background: #30213e; border-color: #68437b; color: #dcabea}
html[data-theme="dark"] .connect-steps b {color: #d3afe8}
html[data-theme="dark"] .connect-steps p,
html[data-theme="dark"] .framework-paths p {color: #bea3d0}
html[data-theme="dark"] .framework-paths h4 {color: #d9b3ef}
html[data-theme="dark"] .framework-paths>div+div {border-color: #4d335c}
html[data-theme="dark"] .framework-paths>a {color: #d0a6e9}
html[data-theme="dark"] .env-block {background: #261b32; border-color: #5a366a}
html[data-theme="dark"] .env-block pre {color: #dbb2ef}
html[data-theme="dark"] .env-block p {color: #bfa0d3}
html[data-theme="dark"] .deployment-section,
html[data-theme="dark"] .deployment-options>a {border-color: #453052}
html[data-theme="dark"] .deployment-section>div>p {color: #c5a7d7}
html[data-theme="dark"] .deploy-type {color: #c3a1dc}
html[data-theme="dark"] .deployment-options strong {color: #d9b6ee}
html[data-theme="dark"] .deployment-options p {color: #bca0d0}
html[data-theme="dark"] .deploy-link {color: #cdaaeb}
html[data-theme="dark"] .deployment-options a:hover strong {color: #eccaff}
html[data-theme="dark"] .faq-list details {border-color: #4d315c}
html[data-theme="dark"] .faq-list summary {color: #d2b0e7}
html[data-theme="dark"] .faq-list summary>span {color: #bc94d6}
html[data-theme="dark"] .faq-list p {color: #c4a5d6}
html[data-theme="dark"] .closing {border-color: #4c2d5d}
html[data-theme="dark"] .closing p {color: #c4a0da}
html[data-theme="dark"] .community-actions b {color: #d5adee}
html[data-theme="dark"] .community-actions span {color: #bca0d0}
html[data-theme="dark"] .community-actions a:hover b {color: #eac9ff}
html[data-theme="dark"] .site-footer {border-color: #4d2f5c}
html[data-theme="dark"] .footer-top p,
html[data-theme="dark"] .footer-top>a:last-child {color: #b79acb}
html[data-theme="dark"] .footer-wordmark {color: #2c2239}
html[data-theme="dark"] .modal {background: #1f1b2a; color: var(--dark-text); border-color: #634874; box-shadow: 0 30px 140px #00000088}
html[data-theme="dark"] .modal::backdrop {background: #080811b8}
html[data-theme="dark"] .modal-close {color: #c6a7dc}
html[data-theme="dark"] .modal-close:hover {background: #382447}
html[data-theme="dark"] .modal>p,
html[data-theme="dark"] .feature-modal p {color: #c7a9da}
html[data-theme="dark"] .deploy-prompt {background: #2c2038; border-color: #69437c; color: #e0bdec}
html[data-theme="dark"] .modal-actions>a {color: #d2aee8}
html[data-theme="dark"] .after-deploy {border-color: #543763; color: #c5a3d9}
html[data-theme="dark"] .modal pre {background: #2a1d36; color: #dab3ec; border-color: #634071}
html[data-theme="dark"] .feature-modal .feature-example {background: #2b2038; border-color: #b28ad1; color: #dbb7f0}
html[data-theme="dark"] .feature-modal a {color: #d8afea}
html[data-theme="dark"] .feature-modal .fine {color: #bba1cc!important}
html[data-theme="dark"] .feature-metrics strong {color: #e0b9f5}
html[data-theme="dark"] .feature-metrics span {color: #bc9ece}
html[data-theme="dark"] .primitive-example {border-color: #684178; color: #cdb0df}
html[data-theme="dark"] .primitive-example strong {color: #ddb7f2}
html[data-theme="dark"] .toast {background: #493061; color: #f4eaff; box-shadow: 0 7px 30px #00000070}
html[data-theme="dark"] .skip-link {background: #2c253b; color: #f0e7ff}
@media(max-width:700px) {
  html[data-theme="dark"] .loop-caption {background: transparent}
  html[data-theme="dark"] .detail-readout {border-color: #433650}
}

html[data-theme="dark"] .diagnosis-return{color:#76618e}
html[data-theme="dark"] .diagnosis-return>span{background:#1c1928;color:#c6a5e9}
html[data-theme="dark"] .footer-period{color:#694781}
html[data-theme="dark"] .loop-orbit{color:#bc9fdf}
