/* Full-bleed page layout adapted from the local template (MIT, see LICENSE). */
:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #141417;
  --text: #f0f0fa;
  --muted: #b9bac3;
  --line: #3d3d45;
  --accent: #eeeef5;
  --accent-ink: #121214;
  --brand-accent: #c8ec76;
  --page-font: Bahnschrift, "Microsoft YaHei UI", "PingFang SC", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--page-font); }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:disabled, select:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
.muted { color: var(--muted); }
.brand-lockup { display: inline-flex; flex: none; align-items: center; gap: 8px; color: var(--text); text-transform: none; white-space: nowrap; }
.brand-mark { display: block; flex: none; }
.brand-wordmark { display: inline-flex; align-items: baseline; font-size: 16px; line-height: 1; letter-spacing: -.025em; }
.brand-wordmark strong { font-weight: 780; }
.brand-domain { color: var(--muted); font-size: .74em; font-weight: 650; }
.skip-link { position: fixed; z-index: 200; left: 20px; top: -60px; padding: 12px; background: #fff; color: #000; }
.skip-link:focus { top: 12px; }

.mission-section { position: relative; isolation: isolate; overflow: hidden; background: #000; }
.mission-inner { position: relative; z-index: 3; height: max(100svh, 941px); max-width: 1700px; margin: 0 auto; }
.mission-media, .mission-shade { position: absolute; inset: 0; pointer-events: none; }
.mission-media { height: calc(100% + 10px); }
.mission-video { height: 100%; }
.mission-media img, .mission-media video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mission-video picture, .mission-video video { position: absolute; inset: 0; }
.mission-video video { opacity: 0; transition: opacity .2s; }
.mission-video.is-playing video { opacity: 1; }
.mission-hero .mission-media :is(img, video) { object-position: 59% center; }
.mission-subscription .mission-media :is(img, video) { object-position: 62% center; }
.mission-residency img { object-position: 63% center; }
.mission-shade { z-index: 2; }
.shade-hero { background: linear-gradient(90deg, rgb(0 0 0 / 86%), rgb(0 0 0 / 64%) 25%, rgb(0 0 0 / 22%) 53%, transparent 80%); }
.shade-right { background: linear-gradient(90deg, transparent 32%, rgb(0 0 0 / 46%) 65%, rgb(0 0 0 / 86%) 100%); }
.shade-left { background: linear-gradient(270deg, transparent 32%, rgb(0 0 0 / 46%) 65%, rgb(0 0 0 / 86%) 100%); }
.shade-bottom { background: linear-gradient(90deg, rgb(0 0 0 / 72%), transparent 67%), linear-gradient(transparent 50%, #000 100%); }

.mission-copy { position: absolute; width: 50%; max-width: 450px; }
.left-middle { left: 100px; top: 50%; transform: translateY(-50%); }
.left-top { left: 100px; top: 13%; }
.right-top { right: 100px; top: 13%; }
.mission-copy h1, .mission-copy h2 { font-weight: 760; font-size: 48px; line-height: 48px; letter-spacing: .02em; text-transform: uppercase; }
.mission-copy h1 { max-width: 90%; font-size: 80px; line-height: .95; }
.mission-copy.left-middle h2, .mission-copy.left-top h2 { max-width: 90%; }
.mission-copy.right-top h2 { line-height: 60px; }
.mission-copy p { max-width: 416px; margin: 15px 0 0; font-size: 16px; line-height: 24px; text-shadow: 0 1px 10px #0009; }
.mission-copy.right-top p { margin-top: 20px; }
.mission-action {
  margin-top: 30px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid rgb(240 240 250 / 35%);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  transition: color .3s, background .3s;
}
.action-icon { position: relative; display: inline-block; flex: none; width: 16px; height: 16px; color: inherit; }
.action-icon::before, .action-icon::after { content: ""; position: absolute; }
.action-icon::before { top: 7px; left: 2px; width: 11px; height: 1px; background: currentColor; }
.action-icon::after { top: 4px; right: 3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.mission-action:hover { color: #000; background: var(--text); }
.mission-action:hover .action-icon { animation: arrow-slide .5s; }
@keyframes arrow-slide { 40% { transform: translateX(8px); opacity: 0; } 41% { transform: translateX(-8px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 12px 60px; min-height: 48px; font-size: 12px; text-transform: uppercase; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 36px; }
.site-footer nav button { padding: 0; border: 0; background: none; color: inherit; font: inherit; }
.site-footer nav :is(a, button):hover { opacity: .65; }
.footer-contact { color: var(--brand-accent); }
.not-found-page { min-height: 100svh; display: grid; align-items: center; padding: 32px 20px; }
.not-found-content { width: min(620px, 100%); margin-inline: auto; }
.not-found-content h1 { margin-block: 24px 10px; font-size: clamp(2.375rem, 7vw, 4rem); }
.not-found-content p { color: var(--muted); }
.not-found-content .button { margin-top: 24px; }

@media (max-width: 961px) {
  .mission-inner { height: 100svh; min-height: 530px; }
  .mission-media { height: 67%; }
  .mission-shade { inset: -1px 0 auto; height: 68%; background: linear-gradient(0deg, #000 0%, transparent 50%, rgb(0 0 0 / 50%) 100%); }
  .mission-hero .mission-media :is(img, video), .mission-subscription .mission-media :is(img, video), .mission-residency img { object-position: center; }
  .mission-inference img { object-position: 34% center; }
  .mission-copy, .left-middle, .left-top, .right-top { top: auto; bottom: 5%; left: 20px; right: 20px; transform: none; width: auto; max-width: none; }
  .mission-copy h1, .mission-copy h2, .mission-copy.left-middle h2, .mission-copy.left-top h2, .mission-copy.right-top h2 { max-width: none; font-size: 36px; line-height: 36px; }
  .mission-copy p, .mission-copy.right-top p { margin: 5px 0 0; line-height: 25.6px; }
  .mission-action { margin-top: 10px; }
  .site-footer { flex-direction: column; gap: 12px; margin: 12px 16px 24px; }
  .site-footer nav { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Catalog and site controls. */

.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 9px; padding: 0 19px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--text); font-size: 14px; font-weight: 720; line-height: 1.35; text-align: center; transition: background .18s, color .18s, border-color .18s; }
.button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.button-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button-primary:hover:not(:disabled) { background: #fff; border-color: #fff; color: var(--accent-ink); }
.button-small { min-height: 42px; padding-inline: 14px; }

.catalog-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 32px 0 22px; }
.mode-selector { flex: none; display: inline-flex; gap: 4px; border: 1px solid var(--line); border-radius: 7px; padding: 4px; background: #0e1119; }
.mode-selector button { min-height: 37px; border: 1px solid transparent; border-radius: 4px; padding: 0 13px; background: none; color: var(--muted); font-size: 14px; font-weight: 680; }
.mode-selector button:hover { color: var(--text); }
.mode-selector button[aria-pressed="true"] { border-color: #576782; background: #263044; color: var(--accent); }
.catalog-controls p { font-size: 14px; }
.gpu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gpu-card { display: flex; flex-direction: column; border: 1px solid var(--line); }
.button-plus { font-size: 20px; line-height: 1; color: var(--accent); }

.boundary { border: 1px solid var(--line); border-radius: 6px; background-color: #101013; background-image: radial-gradient(#77778055 1px, transparent 1px); background-size: 16px 16px; }
.boundary-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 17px; border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; background: #1c1c20; font-size: 14px; font-weight: 650; }
.boundary-bar > span:first-child { display: flex; gap: 8px; align-items: center; }
.boundary-meta { color: var(--muted); font: 12px/1.3 var(--mono); letter-spacing: .045em; }
.route { margin: 0; padding: 23px clamp(17px, 4vw, 55px); list-style: none; }
.route-node { position: relative; display: flex; gap: 13px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #161619; }
.route-node + .route-node { margin-block-start: 16px; }
.route-node + .route-node::before { content: ""; position: absolute; inset: auto 50% 100% auto; width: 1px; height: 17px; background: #7c7c85; }
.route-node strong, .route-node div span { display: block; }
.route-node strong { font-size: 15px; }
.route-node div span { color: var(--muted); font-size: 13px; }
.route-node-model { border-color: #6d6d77; background: #202026; }
.node-icon { font: 700 16px/1 var(--mono); }
.node-gateway::before { width: 17px; height: 12px; border: 1px solid currentColor; border-radius: 2px; }
.node-gateway::after { width: 8px; height: 2px; background: currentColor; box-shadow: 0 5px 0 -0.5px currentColor; }
.boundary-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; padding: 0 14px 18px; }
.boundary-foot span { padding: 3px 9px; border: 1px solid var(--line); border-radius: 5px; background: #161619; color: var(--muted); font-size: 13px; }

.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 17px; cursor: pointer; font-weight: 670; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--accent); font-size: 23px; line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { padding: 0 25px 17px 0; color: var(--muted); font-size: 15px; }
.planner-panel { width: min(940px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); box-shadow: 0 15px 80px #000a; }
.planner-panel::backdrop { background: #000c; backdrop-filter: blur(5px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px clamp(17px, 3vw, 27px); border-bottom: 1px solid var(--line); background: var(--surface); }
.dialog-head h2 { font-size: 21px; }
.dialog-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.close-button { display: grid; flex: none; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--text); font-size: 25px; line-height: 1; }
.close-button:hover { color: var(--accent); border-color: var(--accent); }
.planner-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.planner-form, .planner-preview, .planner-success { min-width: 0; padding: clamp(17px, 3vw, 27px); }
.planner-form, .planner-fields { display: grid; align-content: start; gap: 14px; }
.planner-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.planner-fields:disabled { opacity: .7; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.planner-wide-field { grid-column: 1 / -1; }
.planner-form label { display: grid; align-content: start; gap: 5px; min-width: 0; font-size: 14px; font-weight: 650; }
.planner-field { display: grid; align-content: start; gap: 5px; min-width: 0; }
.planner-form :is(input, select, textarea) { display: block; width: 100%; min-width: 0; min-height: 42px; padding: 8px 10px; border: 1px solid #505056; border-radius: 5px; background: #0e0e11; color: var(--text); font-size: 16px; font-weight: 400; }
.planner-form select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; text-overflow: ellipsis; }
.planner-form textarea { resize: vertical; line-height: 1.55; }
.planner-form ::placeholder { color: var(--muted); }
.planner-preview > p, .planner-success p { color: var(--muted); font-size: 14px; }
.planner-form [aria-invalid="true"] { border-color: #f7a99c; }
.planner-field-error, .form-feedback[data-state="error"] { color: #f7a99c; font-size: 14px; }
.planner-form :is(input, textarea, select), .planner-success h3 { scroll-margin-top: 96px; }
#planner-submit { border-color: var(--brand-accent); background: var(--brand-accent); color: var(--accent-ink); }
#planner-submit:hover:not(:disabled) { border-color: #def7a3; background: #def7a3; }
.planner-success h3 { margin-bottom: 8px; font-size: 21px; }
#planner-inquiry-id { display: block; margin: 16px 0 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 5px; background: #09090b; font: 14px/1.6 var(--mono); overflow-wrap: anywhere; }
.planner-preview { border-inline-start: 1px solid var(--line); background: #101012; }
.planner-preview h3 { margin-bottom: 8px; font-size: 18px; }
#planner-summary { min-height: 145px; margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 5px; background: #09090b; color: var(--text); font: 14px/1.65 var(--mono), "Microsoft YaHei UI", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.planner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.planner-actions .button { min-height: 42px; }
.planner-actions [aria-disabled="true"] { opacity: .55; pointer-events: none; }
.planner-inquiry-hint { margin-block-start: 8px; }
.planner-inquiry-hint a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.form-feedback { margin-top: 8px; color: var(--muted); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.form-feedback:empty { display: none; }
.node-icon { position: relative; display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 7px; background: #1c1c20; color: var(--accent); }
.node-gateway::before, .node-gateway::after, .node-gpu::before, .node-gpu::after { content: ""; position: absolute; }
.node-gpu::before { width: 17px; height: 17px; border: 1px solid currentColor; border-radius: 3px; }
.node-gpu::after { width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 1px; }
.signal { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--text); }

@media (max-width: 720px) {
  .catalog-controls { flex-direction: column; align-items: flex-start; gap: 9px; }
  .gpu-grid, .planner-content { grid-template-columns: minmax(0, 1fr); }
  .planner-preview { border-block-start: 1px solid var(--line); border-inline-start: 0; }
}
@media (max-width: 380px) {
  .mode-selector { display: flex; flex-wrap: wrap; }
  .mode-selector button { padding-inline: 8px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}
