:root {
  color-scheme: dark;
  --ink: #f3f6ff; --muted: #b6c5dd; --page: #08101f; --card: #0e1a30;
  --accent: #adcaff; --line: #304264; --control: #10223bbf; --pill: #9bbdff2b;
  --hero-glass: #0e1d3acf; --focus: #adc8ff; --note: #ffdbe2;
  --ease: cubic-bezier(.22, 1, .36, 1); --shift: 650ms var(--ease);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--page); color: var(--ink);
}
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #102548; --muted: #2c4667; --page: #e9f3ff; --card: #f7fbff;
  --accent: #174e9e; --line: #acc5e3; --control: #edf6ffdb; --pill: #4887e92f;
  --hero-glass: #e3f2ffdb; --focus: #235fb7; --note: #741938;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 280px; background: var(--page); color: var(--ink); transition: background-color var(--shift), color var(--shift); }
a { color: inherit; text-decoration: none; }
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, textarea, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; }
button:disabled { cursor: wait; opacity: .58; }
.symbols, .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.topbar { position: absolute; z-index: 3; inset: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 26px; min-height: 75px; padding: 0 clamp(24px,5vw,84px); }
.brand { justify-self: start; display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 26px; font-weight: 610; letter-spacing: -.038em; }
.brand img { filter: drop-shadow(0 0 8px #699dff60); }
.topbar nav { display: flex; gap: clamp(20px,3vw,48px); align-items: center; white-space: nowrap; }
.topbar nav a { padding: 13px 0; color: var(--muted); position: relative; font-size: 15px; font-weight: 520; transition: color var(--shift); }
.topbar nav a:hover, .topbar nav .nav-current { color: var(--ink); }
.topbar nav .nav-current::after { content: ""; position: absolute; left: calc(50% - 10px); width: 20px; height: 2px; bottom: 3px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px #6386ff90; }
.top-actions { justify-self: end; display: flex; gap: 10px; }
.icon-button { width: 42px; height: 42px; border: 1px solid transparent; background: transparent; display: grid; place-items: center; position: relative; border-radius: 50%; transition: background-color var(--shift), border-color var(--shift), transform 270ms var(--ease); }
.icon-button:hover { transform: translateY(-2px); background: var(--control); border-color: var(--line); }
.icon-button svg, .send svg, .composer-spark, .modes svg, .text-button svg, .explore svg, .feature-grid svg, .sub-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.theme-button svg { position: absolute; transition: opacity var(--shift), transform var(--shift); }
.theme-button .moon, [data-theme="light"] .theme-button .sun { opacity: 0; transform: rotate(-38deg) scale(.72); }
[data-theme="light"] .theme-button .moon { opacity: 1; transform: none; }
.start { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; min-height: 42px; white-space: nowrap; border-radius: 999px; border: 1px solid #d1d6fc; background: linear-gradient(115deg,#f8fbff,#c7bfff); color: #25215d; box-shadow: 0 0 13px #9e9cff62; font-size: 13px; font-weight: 650; transition: transform 390ms var(--ease), box-shadow 390ms var(--ease); }
.start:hover { transform: translateY(-2px); box-shadow: 0 0 21px #9e9cff9a; }
.start svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.hero { display: grid; justify-items: center; align-content: start; position: relative; min-height: max(755px, 100svh); isolation: isolate; overflow: clip; }
.scenery, .sky, .vignette, #stars { position: absolute; inset: 0; pointer-events: none; }
.scenery { z-index: -1; overflow: hidden; background: #081322; }
.sky { inset: -12px; background-position: center center; background-size: cover; transform: translate3d(var(--px, 0px),var(--py, 0px),0); }
.sky-night { background-image: url('/assets/night.webp'); background-size: 100% 100%; }
.sky-day { background-image: url('/assets/day.webp'); background-color: #82b9ee; opacity: 0; transition: opacity 950ms var(--ease); }
[data-theme="light"] .sky-day { opacity: 1; }
.vignette { background: linear-gradient(180deg,#050a1412,transparent 16%,transparent 75%,#08101f10 94%,#08101f 100%); transition: opacity 950ms var(--ease); }
.scenery::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,#e9f3ff42,transparent 14%,transparent 76%,#e9f3ff80 91%,#e9f3ff 100%),radial-gradient(ellipse closest-side at 50% 46%,#b8defb62,transparent 97%); opacity: 0; transition: opacity 950ms var(--ease); }
[data-theme="light"] .scenery::after { opacity: 1; }
[data-theme="light"] .vignette { opacity: 0; }
.airglow { position: absolute; inset: 38% -12% 0; pointer-events: none; background: radial-gradient(ellipse 24% 18% at 74% 58%, #94bfff43, transparent), radial-gradient(ellipse 42% 18% at 47% 54%, #9686ff32, transparent); animation: atmosphere 14s ease-in-out infinite; }
@keyframes atmosphere { 0%,100% { opacity: .45; transform: translate3d(-2%,0,0) scale(1); } 50% { opacity: .92; transform: translate3d(2%,-1%,0) scale(1.08); } }
#stars { width: 100%; height: 100%; opacity: .56; transition: opacity var(--shift); }
[data-theme="light"] #stars { opacity: 0; }
.orbit-movement { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); opacity: 1; transform: translate3d(var(--px, 0px),var(--py, 0px),0); transition: opacity var(--shift); }
.orbit-pulse { mix-blend-mode: screen; opacity: .72; }
[data-theme="light"] .orbit-movement { opacity: 0; }
.hero-content { display: flex; flex-direction: column; align-items: center; width: min(100% - 44px, 970px); padding-top: clamp(205px, 31svh, 365px); position: relative; }
.identity { display: grid; justify-items: center; position: relative; width: 100%; isolation: isolate; }
.hero-mark { position: absolute; top: -125px; width: clamp(72px, 8.2vw, 112px); height: auto; filter: drop-shadow(0 0 14px #d0f8ffb4); opacity: 0; animation: mark-float 8s ease-in-out infinite; transition: opacity var(--shift); }
[data-theme="light"] .hero-mark { opacity: 1; }
@keyframes mark-float { 50% { transform: translateY(-7px); } }
.identity h1 { font-size: clamp(58px,7.1vw,120px); margin: 7px 0 0; font-weight: 610; font-style: italic; line-height: 1.03; letter-spacing: -.033em; padding: 0 .14em 0 .04em; transform: scaleX(1.16); text-shadow: 0 0 30px #8cb5ff8c,0 4px 25px #10184672; transition: text-shadow var(--shift); }
.identity h1 span { transition: color var(--shift); }
[data-theme="light"] .identity h1 { text-shadow: 0 1px 24px #edf7ffc0; }
[data-theme="light"] .identity h1 span { color: #1559bd; }
.motto { margin: 0; font-size: clamp(16px,2vw,27px); font-weight: 490; letter-spacing: .27em; padding-left: .27em; white-space: nowrap; text-shadow: 0 2px 20px #0810269f; }
.hero-intro { margin: clamp(15px,2.5svh,27px) 0 0; font-size: clamp(14px,1.55vw,22px); letter-spacing: .11em; color: var(--muted); transition: color var(--shift); }
.orbit { position: absolute; z-index: -1; top: 9%; width: min(106%, 820px); aspect-ratio: 2; transform: translate3d(calc(var(--px, 0px) * -.8),calc(-50% + var(--py, 0px) * -.8),0); opacity: 0; transition: opacity var(--shift); pointer-events: none; }
.orbit img { display: block; width: 100%; height: auto; }
.orbit-flare { position: absolute; inset: 4% 3%; transform: rotate(-13deg); }
.orbit-flare::after { content: ""; position: absolute; width: 34px; height: 34px; background: radial-gradient(closest-side,#fbfdff 5%,#b9e6ffbd 15%,#5289ff52 38%,transparent 100%); offset-path: ellipse(45% 21% at 50% 51%); animation: flyby 10s linear infinite; }
@keyframes flyby { 0% { offset-distance: 0%; opacity: 0; } 12%,87% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
[data-theme="light"] .orbit { opacity: .44; }

.composer { position: relative; width: 100%; max-width: 820px; margin-top: clamp(26px,4.2svh,49px); border-radius: 999px; background: linear-gradient(120deg,#a093db,#5d80bc 28%,#a0afde 57%,#a699e0 82%,#d4bff0); padding: 1px; box-shadow: 0 0 25px #6d94ef66,0 9px 32px #030f2c52; transition: box-shadow var(--shift), transform 350ms var(--ease); }
.composer:focus-within { box-shadow: 0 0 34px #9da1ffb0, 0 12px 36px #030f2c5a; transform: translateY(-2px); }
.composer::after { content: ""; position: absolute; z-index: 2; inset: 0 auto auto 0; width: 104px; height: 20px; pointer-events: none; background: radial-gradient(ellipse closest-side,#d9edffca 7%,#7fa5ff50 29%,transparent 97%); offset-path: inset(0 round 999px); animation: focus-current 8s linear infinite; }
@keyframes focus-current { 0% { offset-distance: 0%; opacity: 0; } 13%,78% { opacity: .67; } 100% { offset-distance: 100%; opacity: 0; } }
.composer-glow { position: absolute; inset: -1px; z-index: 0; border-radius: inherit; background: linear-gradient(100deg,#a499fa,#c2b7ff 16%,#55d8ff 35%,#c8eaff 52%,#9d95ff 72%,#bc9df1); box-shadow: 0 0 18px #9399ff70; animation: breathing 7s ease-in-out infinite; pointer-events: none; }
@keyframes breathing { 0%,100% { opacity: .25; } 48% { opacity: .65; } }
.composer-energy { position: absolute; inset: -40px -23px; border-radius: inherit; pointer-events: none; background: url('/assets/halo.webp') center / 100% 100% no-repeat; animation: energy-float 8s ease-in-out infinite; }
@keyframes energy-float { 0%,100% { opacity: .34; transform: scale(.995,.98) translateY(0); } 50% { opacity: .77; transform: scale(1.015,1.07) translateY(-2px); } }
.composer-body { background: var(--hero-glass); border-radius: inherit; position: relative; display: flex; align-items: center; gap: clamp(11px,2vw,22px); padding: 8px 9px 8px clamp(15px,2.6vw,29px); min-height: 68px; box-shadow: inset 0 0 24px #87acff38; transition: background-color var(--shift); }
.composer-body::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(100deg,#b493ffdd,#b493ff00 30%,#9bcaff00 63%,#5ce1ffc0); opacity: 0; mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); mask-composite: exclude; padding: 1px; animation: energy-current 5.5s ease-in-out infinite; }
@keyframes energy-current { 0%,100% { opacity: .2; transform: scale(.997,.98); } 45% { opacity: .94; transform: scale(1.002,1.025); } 68% { opacity: .56; } }
.composer-spark { flex: none; color: var(--accent); filter: drop-shadow(0 0 7px #a4bfff); }
.composer textarea { appearance: none; flex: 1; width: 0; min-width: 0; min-height: 36px; max-height: 138px; border: 0; outline: none; background: transparent; resize: none; padding: 6px 1px; line-height: 24px; font-size: clamp(15px,1.55vw,19px); }
.composer textarea:focus-visible { outline: none; }
.composer textarea::placeholder { color: var(--muted); opacity: 1; }
.send { width: 65px; height: 50px; flex: none; position: relative; isolation: isolate; border: 1px solid #d1dbffbd; border-radius: 999px; display: grid; place-items: center; color: #382bc3; background: linear-gradient(140deg,#f3fbff 7%,#e7eaff 50%,#bcb6ff); box-shadow: 0 0 17px #91acff8f; transition: transform 310ms var(--ease), opacity 230ms ease, box-shadow var(--shift), color var(--shift), border-color var(--shift); }
.send::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(140deg,#2d83ed,#3559cc 82%); opacity: 0; z-index: -1; transition: opacity var(--shift); }
.send svg { width: 24px; height: 24px; transition: transform 420ms var(--ease); }
.send:not(:disabled):hover { transform: scale(1.05); box-shadow: 0 0 25px #a8c0ffc9; }
.send:not(:disabled):hover svg { transform: translate(2px,-2px); }
.send:not(:disabled):active { transform: scale(.94); }
[data-theme="light"] .send { color: white; border-color: #9fbaff; }
[data-theme="light"] .send::before { opacity: 1; }
.control-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; width: min(100% - 30px, 780px); margin: 12px auto 0; }
.modes { min-width: 0; margin: 0; padding: 3px; display: flex; border: 1px solid var(--line); border-radius: 999px; background: var(--control); transition: background-color var(--shift), border-color var(--shift); }
.modes label { position: relative; cursor: pointer; }
.modes input { position: absolute; opacity: 0; }
.modes span { display: flex; align-items: center; gap: 6px; white-space: nowrap; padding: 7px 11px; border-radius: 999px; color: var(--muted); font-size: 12px; transition: background-color var(--shift), color var(--shift); }
.modes input:checked + span { background: var(--pill); color: var(--ink); }
.modes input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.modes svg,.text-button svg { width: 15px; height: 15px; }
.text-button { display: flex; align-items: center; gap: 7px; border: 0; background: var(--control); padding: 8px 11px; border-radius: 999px; color: var(--ink); font-size: 12px; white-space: nowrap; transition: background-color var(--shift), transform 310ms var(--ease); }
.text-button:hover { transform: translateX(3px); }
.composer-message { margin: 10px 0 0; min-height: 1.4em; color: var(--note); font-size: 13px; text-align: center; }
.hero-features { position: absolute; bottom: clamp(35px,7.5svh,95px); width: min(100% - 64px, 1150px); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.hero-features > * { position: relative; display: grid; justify-items: center; align-content: start; text-align: center; gap: 7px; padding: 0 8px; color: var(--ink); font: inherit; border: 0; background: transparent; transition: color var(--shift), transform 400ms var(--ease); }
.hero-features > :hover { transform: translateY(-4px); }
.hero-features > :not(:first-child)::before { content: ""; position: absolute; top: 38%; left: 0; width: 1px; height: 53%; background: var(--line); opacity: .85; }
.hero-features svg { width: 43px; height: 43px; margin: 0 0 4px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; color: var(--accent); filter: drop-shadow(0 0 8px #9da3ffba); transition: color var(--shift); }
.hero-features strong { font-size: clamp(15px,1.48vw,22px); font-weight: 570; }
.hero-features span { color: var(--muted); font-size: clamp(12px,1.1vw,16px); transition: color var(--shift); }

.framework, .run-section { width: min(100% - 48px, 1080px); margin: 0 auto; padding: 87px 0; }
.framework-heading { margin-bottom: 33px; }
.framework h2,.run-section h2 { margin: 0; font-size: clamp(26px,4.5vw,44px); letter-spacing: -.045em; line-height: 1.18; }
.framework p { color: var(--muted); line-height: 1.75; transition: color var(--shift); }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.feature-grid article { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px; transition: transform 420ms var(--ease), background-color var(--shift), border-color var(--shift); }
.feature-grid article:hover { transform: translateY(-4px); }
.feature-grid svg { color: var(--accent); width: 27px; height: 27px; }
.feature-grid h3 { margin-bottom: 0; }
.feature-grid p { margin-bottom: 0; font-size: 14px; }
footer { width: min(100% - 48px, 1080px); margin: 0 auto; padding: 23px 0 35px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 15px; font-size: 13px; color: var(--muted); }
.footer-brand { font-weight: 700; color: var(--ink); }

.run-section { scroll-margin-top: 16px; padding: clamp(25px,4vw,46px); background: var(--card); border: 1px solid var(--line); border-radius: 24px; animation: reveal 520ms var(--ease) both; transition: background-color var(--shift), border-color var(--shift); }
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } }
.run-heading, .dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.run-heading h2 { font-size: clamp(24px,4vw,36px); }
.run-actions { display: flex; gap: 6px; }
.kicker { color: var(--accent); margin: 0 0 8px; font-size: 13px; font-weight: 650; }
.run-prompt { padding: 12px 16px; border-left: 2px solid var(--accent); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--control); border-radius: 0 9px 9px 0; line-height: 1.55; }
.sub-button { display: inline-flex; align-items: center; gap: 6px; justify-content: center; min-height: 37px; padding: 5px 12px; border: 1px solid var(--line); background: var(--control); border-radius: 10px; font-size: 13px; white-space: nowrap; transition: background-color var(--shift), transform 320ms var(--ease); }
.sub-button:not(:disabled):hover { transform: translateY(-2px); background: var(--pill); }
.sub-button svg { width: 16px; height: 16px; }
.sub-button.primary { background: var(--pill); padding: 7px 20px; }
.stages { margin: 18px 0; padding: 0; display: flex; list-style: none; flex-wrap: wrap; gap: 7px; }
.stages li { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; animation: reveal 350ms var(--ease) both; }
.stages li:last-child { color: var(--accent); }
.answer { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.78; }
.run-note { color: var(--muted); margin: 14px 0 0; font-size: 13px; line-height: 1.5; }
.run-note:empty { display: none; }

dialog { width: min(100% - 36px, 440px); max-height: 85svh; overflow: auto; border: 1px solid var(--line); border-radius: 23px; padding: 0; background: var(--card); color: var(--ink); box-shadow: 0 25px 80px #050e2566; opacity: 0; transform: translateY(13px) scale(.985); transition: opacity 290ms var(--ease), transform 350ms var(--ease), display 350ms allow-discrete, overlay 350ms allow-discrete; }
dialog[open] { opacity: 1; transform: none; }
@starting-style { dialog[open] { opacity: 0; transform: translateY(13px) scale(.985); } }
dialog::backdrop { background: #02071490; opacity: 0; transition: opacity 350ms var(--ease), display 350ms allow-discrete, overlay 350ms allow-discrete; }
dialog[open]::backdrop { opacity: 1; }
@starting-style { dialog[open]::backdrop { opacity: 0; } }
.dialog-content { padding: 22px; }
.dialog-content h2 { margin: 0; font-size: 22px; }
.dialog-info { font-size: 13px; color: var(--muted); line-height: 1.6; }
.dialog-content label { display: block; font-size: 14px; margin: 19px 0 8px; }
.dialog-content input { width: 100%; border: 1px solid var(--line); background: var(--page); border-radius: 10px; padding: 11px; }
.history-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.history-list button { width: 100%; white-space: normal; overflow-wrap: anywhere; justify-content: flex-start; text-align: left; }

@media (max-width: 670px) {
  .topbar { min-height: 70px; padding-inline: 15px; grid-template-columns: 1fr auto; gap: 7px; }
  .topbar nav { display: none; }
  .start { display: none; }
  .top-actions { gap: 1px; }
  .brand { font-size: 19px; gap: 5px; }
  .brand img { width: 30px; height: 30px; }
  .icon-button { width: 38px; height: 38px; }
  .icon-button svg { width: 18px; height: 18px; }
  .hero { min-height: max(760px, 100svh); }
  .hero-content { width: calc(100% - 34px); padding-top: clamp(206px, 26svh, 270px); }
  .identity h1 { font-size: clamp(43px,12vw,74px); transform: scaleX(1.08); }
  .motto { letter-spacing: .22em; }
  .composer { border-radius: 23px; margin-top: 33px; }
  .composer-energy { inset: -22px -12px; }
  .composer-body { border-radius: 22px; min-height: 62px; padding: 7px 8px 7px 12px; gap: 8px; }
  .composer-spark { width: 17px; height: 17px; }
  .composer textarea { font-size: 16px; }
  .send { width: 46px; height: 45px; border-radius: 17px; }
  .send svg { width: 19px; height: 19px; }
  .sky { background-position: 58% center; }
  .sky-night { background-position: center; background-size: cover; }
  .orbit-movement { display: none; }
  .control-row { margin-top: 11px; }
  .modes span { padding-inline: 8px; }
  .hero-features { width: calc(100% - 42px); grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px 0; bottom: 34px; }
  .hero-features > :nth-child(odd)::before { display: none; }
  .hero-features svg { width: 29px; height: 29px; margin-bottom: 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .framework { padding: 54px 0; }
  .run-section { width: calc(100% - 30px); }
}
@media (max-width: 335px) {
  .hero-content { width: calc(100% - 24px); }
  .modes svg { display: none; }
  .composer-spark { display: none; }
  .composer textarea::placeholder { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  #stars { display: none; }
  .orbit-movement { display: none; }
  .composer-energy { opacity: .5; }
}
