/* Domino: system-mono identity, restrained shell surfaces, two color themes. */
:root {
  --page: #0c0e0e;
  --surface: #101414;
  --soft: #171d1d;
  --ink: #e4e9e6;
  --muted: #939f9c;
  --line: #303b39;
  --accent: #35bfc2;
  --accent-soft: #193234;
  --shell-bg: #171b1a;
  --shell-border: #414a46;
  --shell-ink: #ededeb;
  --shell-muted: #c7cac5;
  --shell-success: #ededeb;
  --shell-user: #84bb36;
  --shell-path: #6a9fd3;
  --mono: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "PingFang SC", "Microsoft YaHei", monospace;
  color-scheme: dark;
  font: 600 14px/1.6 var(--mono);
  font-synthesis: none;
  font-variant-ligatures: none;
  font-feature-settings: "zero" 1, "liga" 0, "calt" 0;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="light"] {
  --page: #f3f5f2;
  --surface: #fafbf9;
  --soft: #e8eeea;
  --ink: #202e2c;
  --muted: #536863;
  --line: #bdcdc6;
  --accent: #08777a;
  --accent-soft: #dceceb;
  --shell-bg: #e8ede9;
  --shell-border: #bdc9c2;
  --shell-ink: #273b33;
  --shell-muted: #52655b;
  --shell-success: #305e45;
  --shell-user: #426b24;
  --shell-path: #346c99;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 40px; }
body { margin: 0; background: var(--page); isolation: isolate; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; }
button:disabled { cursor: default; }
p, h1, h2, h3 { margin: 0; }
p { line-height: 1.85; }
h1, h2, h3 { font-weight: 600; }
code, pre { font-family: var(--mono); }
::selection { background: var(--accent); color: var(--page); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
svg { display: block; width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.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; }
.skip-link { position: fixed; z-index: 50; top: -80px; left: 20px; padding: 12px 18px; background: var(--ink); color: var(--page); }
.skip-link:focus { top: 12px; }
.hero, .section-shell, .install-inner, .site-footer { width: calc(100% - 96px); max-width: 1040px; margin-inline: auto; }

/* Decorative code is never an information source. */
.code-atmosphere { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--page); }
#code-rain { display: block; width: 100%; height: 100%; opacity: .16; filter: blur(3px); }
.code-atmosphere::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--page) 72%, transparent) 22%, color-mix(in srgb, var(--page) 65%, transparent) 78%, transparent); }
[data-theme="light"] #code-rain { opacity: .1; }

/* Navigation and controls. */
.site-header { height: 88px; max-width: 1320px; margin: auto; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--page) 75%, transparent); position: relative; z-index: 10; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; letter-spacing: -.8px; }
.brand-prompt { color: var(--accent); }
.desktop-nav, .header-actions { display: flex; align-items: center; }
.desktop-nav { gap: 32px; font-size: 14px; color: var(--muted); }
.header-actions { gap: 22px; }
.github-link { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }
.github-link svg { width: 16px; height: 16px; }
a:hover { color: var(--accent); }
.icon-button { width: 34px; height: 34px; display: inline-flex; justify-content: center; align-items: center; background: transparent; border-radius: 2px; }
.icon-button:hover { background: var(--soft); }
.language-toggle, .rain-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 34px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 2px; background: var(--page); font-size: 12px; white-space: nowrap; }
.language-toggle { min-width: 44px; }
.rain-toggle { color: var(--accent); font-size: 15px; }
.language-toggle:hover, .rain-toggle:hover { border-color: var(--accent); }
.sun-icon, [data-theme="dark"] .moon-icon, .menu-toggle { display: none; }
[data-theme="dark"] .sun-icon { display: block; }
.mobile-nav { position: absolute; top: 74px; left: 20px; right: 20px; padding: 10px; background: var(--surface); border: 1px solid var(--line); }
.mobile-nav a { display: block; padding: 12px 16px; }

/* Brand and first impression. */
.hero { padding-top: 40px; }
.hero-brand { margin-bottom: 20px; padding-bottom: 12px; }
.brand-caption { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.hero-wordmark { font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; font-size: clamp(76px, 19vw, 260px); font-weight: 600; letter-spacing: -.08em; line-height: 1.18; min-height: 1.18em; white-space: nowrap; color: var(--accent); }
.brand-cursor { display: inline-block; animation: cursor-blink 2.4s step-end infinite; }
.is-typing .brand-cursor { animation: none; opacity: 1; }
.hero-copy { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 36px; align-items: baseline; }
.hero-copy h1 { font-size: 24px; font-weight: 500; letter-spacing: -.035em; line-height: 1.6; }
.hero-description { font-size: 12px; font-weight: 400; line-height: 1.8; color: var(--muted); }
.hero-actions { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.button { min-height: 44px; padding: 11px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; font-weight: 500; border-radius: 2px; }
.button-quiet { background: transparent; border: 1px solid var(--line); }
.button-primary, .button-primary:visited { background: var(--accent); color: var(--page); }
.button-primary:hover { background: var(--ink); color: var(--page); }
.support-summary { margin-top: 20px; font-size: 11px; color: var(--muted); }

/* Optional TUI preview. */
.hero-stage { margin-top: 12px; max-width: 840px; }
.hero-stage:not([open]) { width: fit-content; max-width: 100%; }
.hero-stage > summary, .inline-disclosure > summary, .python-install-help > summary { display: flex; align-items: center; gap: 14px; width: fit-content; min-height: 36px; padding-block: 10px; list-style: none; cursor: pointer; font-size: 12px; color: var(--muted); }
summary::-webkit-details-marker { display: none; }
.hero-stage > summary > span:first-child { color: var(--accent); }
.disclosure-symbol, .venv-expand { color: var(--accent); display: inline-block; }
details[open] > summary .disclosure-symbol, details[open] > summary .venv-expand { transform: rotate(45deg); }
.demo-label { color: var(--muted); font-size: 10px; padding-top: 12px; }
.ui-hint { color: var(--muted); font-size: 11px; padding: 8px 0 16px; }
.terminal-window { background: var(--page); border: 1px solid var(--line); font-family: var(--mono); }
.terminal-body { position: relative; padding: 24px 20px 0; font-size: 11px; }
.terminal-heading { display: flex; align-items: flex-start; gap: 25px; }
.terminal-logo { font: 400 14px/1.35 "SFMono-Regular", Menlo, Consolas, monospace; margin: 0; color: var(--accent); }
.terminal-info { display: grid; gap: 3px; line-height: 1.45; white-space: nowrap; min-width: 0; font-size: 10px; color: var(--muted); }
.terminal-info > span { overflow: hidden; text-overflow: ellipsis; }
.terminal-info strong { font-size: 12px; color: var(--ink); }
.terminal-version { margin-left: 12px; font-size: 10px; }
.tui-dot { display: inline-block; height: 7px; width: 7px; background: #68c59d; border-radius: 50%; margin-right: 6px; }
.terminal-output { min-height: 90px; margin-top: 18px; font-size: 11px; }
.terminal-output:empty { margin-top: 0; }
.terminal-output p { line-height: 1.85; overflow-wrap: anywhere; }
.terminal-output .muted { color: var(--muted); }
.terminal-output .success { color: var(--accent); }
.terminal-output .tui-command { color: var(--ink); padding-bottom: 6px; }
.terminal-form { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 4px 0; border-top: 2px dashed var(--line); }
.terminal-form:focus-within { border-top-color: var(--accent); }
.prompt-symbol { color: var(--accent); font-weight: 600; }
.terminal-form input { width: 100%; min-width: 0; min-height: 31px; border: 0; background: transparent; padding: 0; font-size: 11px; }
.terminal-form input:focus-visible { outline: none; }
.terminal-status { display: flex; justify-content: space-between; gap: 12px; padding: 9px 20px; border-top: 2px dashed var(--line); color: var(--muted); font-size: 11px; }
.command-menu { position: absolute; z-index: 2; left: 34px; right: 20px; bottom: 47px; max-height: 170px; padding: 3px 0; background: var(--soft); border-right: 6px solid var(--line); overflow-y: auto; }
.command-menu button { width: 100%; display: grid; grid-template-columns: 95px 1fr; gap: 12px; text-align: left; font-size: 11px; line-height: 1.35; padding: 3px 8px; background: transparent; color: var(--muted); }
.command-menu button code { color: var(--ink); font: inherit; font-weight: 600; }
.command-menu button[aria-pressed="true"], .command-menu button:hover { background: var(--accent-soft); color: var(--ink); }

/* Shared deployment, installation and quick-start terminal surface. */
.mac-shell { background: var(--shell-bg); border: 1px solid var(--shell-border); color: var(--shell-ink); font: 600 12px/1.6 var(--mono); letter-spacing: 0; }
.mac-shell .shell-identity { color: var(--shell-user); }
.mac-shell .shell-directory { color: var(--shell-path); }
.mac-shell .shell-punctuation, .mac-shell code { color: var(--shell-ink); }
.mac-shell code { font: inherit; }
.how-section { margin-top: 28px; padding-top: 40px; padding-bottom: 72px; border-top: 1px solid color-mix(in srgb, var(--ink) 28%, var(--page)); }
.workflow-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; align-items: stretch; }
.deployment-intro { min-width: 0; display: flex; flex-direction: column; }
.deployment-intro h2 { font-size: 24px; line-height: 1.5; }
.deployment-heading { margin-top: 18px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.deployment-context { margin-top: auto; padding-top: 24px; }
.deployment-route { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; }
.deployment-route > span:not(.deployment-link) { display: grid; gap: 10px; color: var(--muted); font-size: 11px; }
.deployment-route code { font: 11px var(--mono); color: var(--ink); }
.deployment-link { position: relative; display: grid; place-items: center; flex: 1; min-width: 24px; height: 35px; border-top: 1px dashed var(--line); padding-top: 8px; font-size: 10px; color: var(--accent); }
.deployment-link i { position: absolute; width: 8px; height: 4px; left: 0; top: -3px; background: var(--accent); opacity: 0; }
[data-playing="true"] .deployment-link i { opacity: 1; animation: deployment-packet 1.6s linear infinite; }
[data-progress="4"] .deployment-route code { color: var(--accent); }
.deployment-hint { font-size: 11px; color: var(--ink); line-height: 1.8; }
.workflow-transcript { min-width: 0; padding: 18px 16px; }
.workflow-command, .shell-ready { font: inherit; line-height: 1.6; overflow-wrap: anywhere; }
.workflow-command { margin-bottom: 16px; }
#workflow-output { min-height: 88px; }
#workflow-output p { line-height: 1.6; overflow-wrap: anywhere; }
#workflow-output p + p { margin-top: 3px; }
#workflow-output .muted { color: var(--shell-muted); }
#workflow-output .success { color: var(--shell-success); }
.shell-ready { margin-top: 18px; }
.deploy-caret { color: var(--shell-ink); margin-left: 3px; animation: cursor-blink 2.4s step-end infinite; }
[data-playing="true"] .shell-ready { visibility: hidden; }
[data-playing="true"] .deploy-caret { animation: none; }
[data-playing="false"] .workflow-command .deploy-caret { visibility: hidden; }
.inline-disclosure { margin-top: 12px; }
.inline-disclosure > summary { font-size: 11px; color: var(--accent); }
.disclosure-content { padding-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.disclosure-content p + p { margin-top: 12px; }

/* Installation and optional follow-up instructions. */
.install-inner { padding: 48px 0 60px; border-top: 1px solid var(--line); }
.install-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.install-heading h2 { font-size: 25px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.install-panel { width: 100%; }
.install-tabs { display: flex; gap: 28px; margin-bottom: 18px; }
.install-tabs button { padding: 8px 0; font-size: 14px; background: transparent; color: var(--muted); }
.install-tabs button[aria-selected="true"] { color: var(--accent); }
.install-shell { padding: 24px; }
.install-shell-line { overflow-wrap: anywhere; }
#install-command .install-shell-line + .install-shell-line { margin-top: 12px; }
.install-shell > .install-shell-line { margin-top: 18px; }
.shell-prompt { white-space: nowrap; }
#install-command code { white-space: pre-wrap; overflow-wrap: anywhere; }
.install-footnote { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-top: 14px; }
.install-detail { font-size: 11px; line-height: 1.8; color: var(--muted); }
.copy-button { display: inline-flex; align-items: center; min-height: 32px; padding: 0; background: transparent; color: var(--accent); font-size: 11px; white-space: nowrap; }
.copy-fallback { display: block; width: 100%; margin-top: 14px; padding: 16px; resize: vertical; font-size: 12px; }
.python-install-help { margin-top: 12px; }
.python-install-help > summary { color: var(--accent); font-size: 11px; }
.venv-instructions { padding-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.venv-code, .quick-code { padding: 18px 20px; margin: 12px 0 22px; white-space: pre-wrap; overflow-wrap: anywhere; }
.quick-start { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 24px; }
.quick-start > summary { font-size: 12px; }
.quick-start .disclosure-content { max-width: 82ch; }
.runtime-note { border-left: 2px solid var(--line); padding-left: 16px; }
.quick-step { margin-top: 28px; }
.quick-step h3 { font-size: 13px; color: var(--ink); margin-bottom: 8px; }
.install-note { margin-top: 22px; color: var(--muted); font-size: 11px; line-height: 1.8; }

/* A small footer, without another giant wordmark. */
.site-footer { padding: 24px 0; border-top: 1px solid var(--line); }
.footer-top { display: flex; align-items: center; gap: 25px; }
.footer-top > .wordmark { font-size: 20px; }
.footer-top > span { display: none; }
.footer-top > div { display: flex; gap: 27px; margin-left: auto; font-size: 12px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; color: var(--muted); font-size: 10px; }

@keyframes cursor-blink { 0%, 64% { opacity: 1; } 65%, 100% { opacity: 0; } }
@keyframes deployment-packet { to { left: calc(100% - 8px); } }
[data-motion="paused"] .brand-cursor, [data-motion="paused"] .deploy-caret { animation: none; }

@media (max-width: 1100px) {
  .hero-copy { grid-template-columns: minmax(0, 1fr); }
  .hero-copy h1 { font-size: 24px; }
  .hero-description { margin-top: 10px; font-size: 13px; }
}
@media (max-width: 1000px) {
  .workflow-demo { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .deployment-context { margin-top: 0; }
  .deployment-route { max-width: 500px; }
  .workflow-transcript { min-height: 230px; padding: 24px; }
  .header-actions { gap: 14px; }
  .desktop-nav { gap: 22px; }
}
@media (max-width: 760px) {
  .hero, .section-shell, .install-inner, .site-footer { width: calc(100% - 40px); }
  .site-header { height: 74px; padding-inline: 16px; gap: 12px; }
  .wordmark { font-size: 24px; }
  .desktop-nav, .header-actions .github-link { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-actions { gap: 6px; }
  .hero { padding-top: 28px; }
  .hero-wordmark { font-size: 20.5vw; }
  .hero-brand { margin-bottom: 16px; }
  .hero-copy h1 { font-size: clamp(22px, 5.5vw, 26px); }
  .hero-description { font-size: 13px; }
  .support-summary { max-width: 42ch; font-size: 10px; }
  .hero-stage > summary { gap: 12px; font-size: 11px; }
  .terminal-body { padding: 18px 12px 0; }
  .terminal-heading { gap: 12px; }
  .terminal-logo { font-size: 9px; line-height: 1.5; }
  .terminal-info { font-size: 9px; gap: 1px; }
  .terminal-info strong { font-size: 11px; }
  .terminal-version { font-size: 9px; margin-left: 5px; }
  .terminal-status { padding: 9px 12px; font-size: 10px; }
  .command-menu { left: 23px; right: 12px; max-height: 148px; }
  .command-menu button { grid-template-columns: 68px 1fr; gap: 6px; font-size: 10px; }
  .how-section { margin-top: 24px; padding-top: 30px; padding-bottom: 48px; }
  .deployment-intro h2 { font-size: 21px; }
  .deployment-route { gap: 12px; }
  .deployment-route > span:not(.deployment-link), .deployment-route code { font-size: 10px; }
  .mac-shell { font-size: 11px; }
  .workflow-transcript { padding: 20px 14px; }
  .install-inner { padding: 32px 0 40px; }
  .install-heading { gap: 20px; margin-bottom: 20px; }
  .install-heading .text-link { max-width: 21ch; text-align: right; line-height: 1.7; }
  .install-shell { padding: 20px 14px; }
  .install-footnote { align-items: flex-start; gap: 14px; }
  .venv-code, .quick-code { padding: 16px 14px; }
  .footer-top { flex-wrap: wrap; gap: 18px; }
  .footer-top > div { gap: 20px; }
  .footer-bottom { flex-wrap: wrap; }
  .footer-bottom > span:nth-child(2) { display: none; }
  #code-rain { opacity: .12; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
