@font-face {
  font-family: "Iosevka Func";
  src: url("./assets/func-brand/iosevka-fixed-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #f8f8f5;
  --ink: #0a0a09;
  --muted: #6b6b65;
  --line: #b8b8b0;
  --light-line: #deded8;
  --orange: #ff6600;
  --yellow: #fff200;
  --mono: "Iosevka Func", "SFMono-Regular", Consolas, monospace;
  --sans: "PingFang SC", "Microsoft YaHei", sans-serif;
  --page: min(980px, calc(100vw - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--mono), var(--sans);
  font-size: 13px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

::selection { color: var(--ink); background: var(--yellow); }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.skip-link {
  position: fixed;
  left: 8px;
  top: 8px;
  z-index: 100;
  padding: 5px 8px;
  transform: translateY(-150%);
  color: #fff;
  background: #000;
}
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--ink); background: var(--paper); }
.header-inner {
  width: var(--page);
  min-height: 64px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  gap: 24px;
}
.brand { width: 150px; }
.header-inner nav { min-width: 0; justify-self: center; display: flex; gap: 20px; }
.header-inner nav a { white-space: nowrap; text-decoration: none; }
.header-inner nav a:hover { text-decoration: underline; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-status { white-space: nowrap; text-decoration: none; }
.header-status:hover { text-decoration: underline; }
.header-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #00a34a;
}

.release-line {
  overflow: hidden;
  color: var(--ink);
  background: var(--orange);
  border-bottom: 1px solid var(--ink);
}
.ticker-track {
  width: max-content;
  min-height: 30px;
  display: flex;
  align-items: center;
  animation: ticker 28s linear infinite;
}
.ticker-group {
  display: flex;
  align-items: center;
  gap: 30px;
  padding-right: 30px;
  font-size: 10px;
  letter-spacing: 0.035em;
}
.ticker-group b { color: #fff; font-size: 9px; font-weight: 400; }
.ticker-group a {
  color: inherit;
  text-decoration: none;
  transition: color 120ms ease;
}
.ticker-group a:hover,
.ticker-group a:focus-visible { color: #fff; text-decoration: underline; }
.release-line :focus-visible { outline-color: var(--ink); }
.ticker-track:hover,
.ticker-track:focus-within { animation-play-state: paused; }

main, .footer-inner { width: var(--page); margin: 0 auto; }

.hero { padding: 74px 0 80px; }
.path, .section-label { color: var(--muted); font-size: 11px; letter-spacing: 0.04em; }
.path { margin: 0 0 30px; }
.path::before { content: "$ "; color: var(--orange); }

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(44px, 7.2vw, 72px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.hero h1 em { color: var(--orange); font-style: normal; }

.hero-copy {
  max-width: 710px;
  margin: 30px 0 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.8;
  text-wrap: pretty;
}

.install-block { margin-top: 48px; border: 1px solid var(--ink); background: #fff; }
.install-head, .install-foot {
  min-height: 34px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
}
.install-head { color: #fff; background: var(--ink); }
.install-head button {
  padding: 2px 5px;
  color: var(--ink);
  background: var(--yellow);
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
.install-head button:hover { color: #fff; background: var(--orange); }
.install-block pre { margin: 0; padding: 25px 18px; overflow-x: auto; }
.install-block code { font-family: var(--mono); font-size: clamp(12px, 2vw, 17px); white-space: nowrap; }
.install-block code span { color: var(--orange); }
.install-foot { border-top: 1px dashed var(--line); color: var(--muted); }
.hero-links { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 18px; }
.hero-links a { text-decoration: none; }
.hero-links a:hover { color: var(--orange); }

.raw-section {
  padding: 60px 0 68px;
}
#what { border-top: 1px solid var(--ink); }
.section-label { margin-bottom: 30px; }
.section-content { width: 100%; min-width: 0; margin: 0 auto; }
.section-content h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}
.section-intro {
  max-width: 650px;
  margin: 16px 0 0;
  color: #3f3f3b;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
}

.capability-grid {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.capability-grid button {
  min-height: 112px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  gap: 8px 10px;
  color: var(--ink);
  text-align: left;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease;
}
.capability-grid button > span {
  grid-column: 1;
  grid-row: 1;
  color: var(--orange);
  font-size: 11px;
}
.capability-grid button > strong {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.3;
}
.capability-grid button > small {
  grid-column: 2;
  grid-row: 1;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-align: right;
}
.capability-grid button > i {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: end;
  color: var(--orange);
  font-size: 10px;
  font-style: normal;
  justify-self: end;
}
.capability-grid button:hover { background: #fff; }
.capability-grid button[aria-selected="true"] { color: #fff; background: var(--ink); }
.capability-grid button[aria-selected="true"] > small { color: #b7b7b0; }
.capability-grid button[aria-selected="true"] > i { color: #fff; }

.capability-panels { min-height: 420px; padding: 38px 0 4px; }
.capability-panels > article[hidden] { display: none; }
.capability-panels > article { animation: panel-in 180ms ease-out; }
.panel-kicker { margin: 0 0 16px; color: var(--orange); font-size: 10px; letter-spacing: 0.05em; }
.capability-panels h3 {
  max-width: 760px;
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(27px, 3.2vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}
.panel-intro {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
}
.runtime-route {
  margin: 38px 0 34px;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  background: var(--orange);
}
.runtime-route b { color: #fff; font-weight: 400; }
.detail-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px;
}
.detail-options-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-options div { min-width: 0; }
.detail-options code { color: var(--orange); font-family: var(--mono); font-size: 10px; }
.detail-options strong { margin: 13px 0 8px; display: block; font-family: var(--sans); font-size: 18px; }
.detail-options p { margin: 0; color: var(--muted); font-family: var(--sans); font-size: 14px; line-height: 1.7; }
.name-list {
  margin: 34px 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px 22px;
  list-style: none;
}
.name-list li {
  min-width: 0;
  display: flex;
  gap: 7px;
  align-items: baseline;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.name-list li::before { content: "/"; flex: 0 0 auto; color: var(--orange); }
.capability-panels > article > a { color: var(--ink); text-decoration: none; }
.capability-panels > article > a:hover { color: var(--orange); text-decoration: underline; }

@keyframes panel-in {
  from { transform: translateY(5px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.application-list {
  margin-top: 42px;
}
.application-list article {
  min-height: 230px;
  padding: 26px 0;
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(360px, 1.1fr);
  align-items: stretch;
  gap: 40px;
  border-bottom: 1px solid var(--light-line);
}
.application-copy {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-content: start;
  gap: 8px 18px;
}
.application-copy span {
  padding-top: 5px;
  color: var(--orange);
  font-size: 11px;
}
.application-copy h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 23px;
  line-height: 1.4;
}
.application-copy p {
  grid-column: 2;
  margin: 16px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.75;
}
.application-list pre {
  min-width: 0;
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: #e9e9e5;
  background: var(--ink);
  border-left: 3px solid var(--orange);
}
.application-list code {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.75;
  white-space: pre;
}
.application-list code i { color: #ff9b5a; font-style: normal; }

.ai-section {
  width: 100vw;
  margin-left: calc((100% - 100vw) / 2);
  color: #fff;
  background: var(--ink);
  border-top: 1px solid var(--ink);
}
.ai-inner {
  width: var(--page);
  margin: 0 auto;
  padding: 54px 0 60px;
}
.ai-section .section-label { color: #8d8d86; }
.ai-kicker { margin: 0 0 14px; color: var(--orange); font-size: 10px; letter-spacing: 0.06em; }
.ai-section h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(30px, 3.8vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}
.ai-intro {
  max-width: 650px;
  margin: 16px 0 0;
  color: #cacac4;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
}
.ai-route {
  margin: 26px 0 22px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  background: #171715;
}
.ai-route b { color: var(--orange); font-weight: 400; }
.ai-paths { border-top: 0; }
.ai-paths article {
  min-height: 82px;
  padding: 14px 0;
  display: grid;
  grid-template-columns: 50px 150px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  border-bottom: 1px solid #3b3b38;
}
.ai-paths article > span { color: var(--orange); }
.ai-paths strong { font-family: var(--sans); font-size: 15px; }
.ai-paths p { margin: 0; color: #aaa9a3; font-family: var(--sans); font-size: 13px; line-height: 1.65; }
.ai-links { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 18px; font-size: 10px; }
.ai-links a { color: #fff; text-decoration: none; }
.ai-links a:hover { color: var(--orange); }

.production-list { margin-top: 42px; }
.production-list article {
  min-height: 94px;
  padding: 18px 0;
  display: grid;
  grid-template-columns: 100px 250px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--light-line);
}
.production-list span { color: var(--orange); }
.production-list strong { font-family: var(--sans); font-size: 18px; }
.production-list p { margin: 0; color: var(--muted); font-family: var(--sans); font-size: 14px; line-height: 1.7; }

.ascii-spec { margin-top: 38px; border: 1px solid var(--ink); background: #fff; }
.ascii-spec div {
  min-height: 42px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-bottom: 1px dashed var(--line);
}
.ascii-spec div:last-child { border-bottom: 0; }
.ascii-spec span { color: var(--muted); }
.ascii-spec strong { font-weight: 400; }
.deploy-note { max-width: 650px; margin: 20px 0 0; color: var(--muted); font-family: var(--sans); }
.raw-button {
  margin-top: 24px;
  padding: 7px 9px;
  display: inline-block;
  color: #fff;
  background: var(--ink);
  text-decoration: none;
}
.raw-button:hover { color: var(--ink); background: var(--yellow); }

footer { color: #fff; background: var(--ink); }
.footer-inner {
  min-height: 150px;
  padding: 28px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 28px;
}
.footer-inner img { width: 145px; filter: grayscale(1) brightness(0) invert(1); }
.footer-inner div { display: flex; gap: 18px; }
.footer-links { justify-self: end; }
.footer-inner p { grid-column: 1 / -1; margin: auto 0 0; color: #888881; font-size: 10px; }

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 50;
  padding: 5px 8px;
  transform: translate(-50%, 12px);
  color: var(--ink);
  background: var(--yellow);
  border: 1px solid var(--ink);
  opacity: 0;
  pointer-events: none;
}
.copy-toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 720px) {
  :root { --page: calc(100vw - 28px); }
  .header-inner {
    min-height: 0;
    padding-top: 10px;
    grid-template-columns: 1fr auto;
    gap: 9px 14px;
  }
  .brand { width: 135px; }
  .header-inner nav {
    width: 100%;
    padding: 9px 0 11px;
    grid-column: 1 / -1;
    justify-self: start;
    justify-content: flex-start;
    gap: 20px;
    overflow-x: auto;
    border-top: 1px solid var(--light-line);
    scrollbar-width: none;
  }
  .header-inner nav::-webkit-scrollbar { display: none; }
  .header-actions { justify-self: end; gap: 8px; }
  .header-status { font-size: 10px; }
  .ticker-track { min-height: 27px; }
  .ticker-group { gap: 22px; padding-right: 22px; }
  .hero { padding: 56px 0 62px; }
  .hero h1 { font-size: clamp(42px, 13vw, 58px); }
  .hero-copy { font-size: 16px; }
  .install-block { margin-top: 36px; }
  .install-foot { padding-block: 7px; flex-wrap: wrap; }
  .install-block pre { padding: 21px 12px; }
  .raw-section { padding: 48px 0 54px; }
  .ai-inner { padding: 44px 0 50px; }
  .ai-section .section-label { padding-bottom: 0; }
  .ai-route { justify-content: flex-start; flex-wrap: wrap; gap: 7px; }
  .ai-paths article { min-height: 0; grid-template-columns: 40px 1fr; gap: 6px 10px; }
  .ai-paths p { grid-column: 2; }
  .section-label { margin-bottom: 22px; padding: 0; }
  .capability-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 76vw);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }
  .capability-grid button { min-height: 104px; padding: 14px 16px; }
  .capability-grid button { scroll-snap-align: start; }
  .capability-grid button > strong { font-size: 18px; }
  .capability-panels { min-height: 560px; padding-top: 32px; }
  .panel-intro { font-size: 15px; }
  .runtime-route { gap: 7px; padding-inline: 11px; font-size: 9px; }
  .detail-options,
  .detail-options-three { grid-template-columns: 1fr; gap: 28px; }
  .name-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
  .application-list { margin-top: 34px; }
  .application-list article { min-height: 0; grid-template-columns: 1fr; gap: 20px; }
  .application-copy { grid-template-columns: 46px minmax(0, 1fr); }
  .application-copy p { margin-top: 8px; }
  .application-list pre { padding: 15px 13px; }
  .production-list article { grid-template-columns: 70px 1fr; gap: 8px 14px; }
  .production-list p { grid-column: 2; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-inner p { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .capability-grid button { transition: none; }
  .capability-panels > article { animation: none; }
}
