@layer od-layout {
  :where(.od-stack,.od-row,.od-row-top,.od-cluster,.od-grid,.od-field,.od-stat,.od-cell,.od-tile) > :where(*) { min-width: 0; }

  .od-stack   { display: flex; flex-direction: column; gap: var(--od-gap, 8px); }
  .od-row     { display: flex; align-items: center; gap: var(--od-gap, 8px); }
  .od-row-top { display: flex; align-items: flex-start; gap: var(--od-gap, 8px); }
  .od-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--od-gap, 8px); }
  .od-fill    { flex: 1 1 0; min-width: 0; }
  .od-fixed   { flex: none; }
  .od-grid    { display: grid; gap: var(--od-gap, 12px); grid-template-columns: repeat(var(--od-cols, 3), minmax(0, 1fr)); }

  .od-stat, .od-field, .od-cell { display: grid; gap: var(--od-gap, 2px); }
  :where(.od-stat,.od-field,.od-cell) > :where(*) { display: block; }
  .od-tile { display: grid; grid-template-rows: auto 1fr; }
  :where(.od-tile) > :where(*) { display: block; }

  .od-media { display: block; width: 100%; height: auto; aspect-ratio: var(--od-ratio, auto); }
  .od-media-cover { object-fit: cover; }

  .od-icon { display: inline-block; inline-size: var(--od-icon-size, 1em); block-size: var(--od-icon-size, 1em); flex: none; }

  .od-truncate { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .od-clamp-2, .od-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
  .od-clamp-2 { -webkit-line-clamp: 2; }
  .od-clamp-3 { -webkit-line-clamp: 3; }
  .od-lines-2 { min-height: calc(2 * 1.4em); }
  .od-nowrap  { white-space: nowrap; }
  .od-keep    { word-break: keep-all; overflow-wrap: anywhere; }

  .od-screen { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
  .od-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }

  .od-rail { display: flex; gap: var(--od-gap, 8px); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
             padding-inline: var(--od-rail-pad, 16px); scroll-padding-inline: var(--od-rail-pad, 16px); }
  .od-rail::-webkit-scrollbar { display: none; }
  :where(.od-rail) > :where(*) { flex: none; scroll-snap-align: start; }
  :where(.od-rail) > :where(:last-child) { margin-inline-end: var(--od-rail-pad, 16px); }

  .od-spacer { flex: none; visibility: hidden; pointer-events: none; }
  .od-touch  { min-width: 44px; min-height: 44px; }
}
/* /OD-LAYOUT-PRIMITIVES v1 */

:root {
  --ink: #1b1e1a;
  --ink-soft: #252922;
  --ink-3: #32372c;
  --paper: #f2f3e9;
  --paper-2: #e8eade;
  --paper-3: #dbdecb;
  --maize: #f2c84b;
  --maize-soft: #f7de96;
  --maize-deep: #8a6110;
  --sage: #7e9a72;
  --sage-deep: #4d6847;
  --celadon: #a9bc9c;
  --line: rgba(27, 30, 26, 0.14);
  --line-strong: rgba(27, 30, 26, 0.3);
  --ink-line: rgba(242, 243, 233, 0.16);
  --ink-line-strong: rgba(242, 243, 233, 0.32);
  --muted: #58635a;
  --muted-2: #7a857c;
  --on-dark-muted: #aeb9ae;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --shell: 1280px;
  --gutter: clamp(20px, 4.2vw, 56px);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--maize);
  color: var(--ink);
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

.section-dark :focus-visible,
.hero-panel :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--maize);
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--maize);
  flex: none;
}

.section-dark .eyebrow {
  color: var(--on-dark-muted);
}

.section-dark .eyebrow::before {
  background: var(--maize);
}

.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;
}

[hidden] {
  display: none !important;
}

.btn .od-icon {
  --od-icon-size: 16px;
}

.copy-btn .od-icon {
  --od-icon-size: 12px;
}

.arrow-link .od-icon {
  --od-icon-size: 14px;
}

.empty-state {
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 3px;
  background: var(--paper-2);
}

.empty-state h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}

.empty-state p {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--muted);
}



.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible {
  transform: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  flex: none;
}

.btn-ink {
  background: var(--ink);
  color: var(--paper);
}

.btn-ink:hover {
  background: var(--ink-3);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-light {
  background: var(--paper);
  color: var(--ink);
}

.btn-light:hover {
  background: #ffffff;
}

.btn-maize {
  background: var(--maize);
  color: var(--ink);
}

.btn-maize:hover {
  background: #ecc153;
}

.btn-sm {
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
}

.btn-lg {
  height: 54px;
  padding: 0 28px;
  font-size: 15px;
}

.icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 3px;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.icon-only:hover {
  border-color: var(--ink);
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s var(--ease);
}

.arrow-link svg {
  transition: transform 0.2s var(--ease);
}

.arrow-link:hover {
  border-bottom-color: var(--maize-deep);
}

.arrow-link:hover svg {
  transform: translateX(3px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
  flex: none;
  box-shadow: 0 0 0 1px rgba(27, 30, 26, 0.08), 0 6px 14px -10px rgba(27, 30, 26, 0.5);
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand:hover .brand-mark {
  transform: rotate(-4deg) scale(1.06);
  box-shadow: 0 0 0 1px rgba(242, 200, 75, 0.55), 0 10px 22px -12px rgba(27, 30, 26, 0.6);
}

.brand-word {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}

.brand-code {
  margin-left: 3px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--maize-deep);
  vertical-align: 3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 36px);
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--maize);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s var(--ease);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
}

.header-login {
  font-size: 14px;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.header-login:hover {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  position: fixed;
  top: 74px;
  left: 0;
  right: 0;
  z-index: 79;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 12px var(--gutter) 28px;
}

.mobile-menu nav {
  display: grid;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 24px;
  text-decoration: none;
}

.mobile-menu a span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

.mobile-menu .btn {
  margin-top: 20px;
  width: 100%;
}

.hero {
  position: relative;
  padding-top: clamp(26px, 3.6vw, 42px);
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-top span:last-child {
  color: var(--maize-deep);
}

.hero-title {
  margin: clamp(30px, 4.4vw, 54px) 0 clamp(34px, 5vw, 60px);
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(46px, 8vw, 118px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-title .line {
  display: block;
}

.title-dot {
  display: inline-block;
  width: 0.11em;
  height: 0.11em;
  margin-left: 0.07em;
  background: var(--maize);
  vertical-align: baseline;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
  padding-bottom: clamp(48px, 6vw, 84px);
}

.hero-lede {
  max-width: 33em;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.85;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 42px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-meta span::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--maize);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 44px 90px -66px rgba(16, 26, 21, 0.7);
}

.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-line);
}

.panel-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.model-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.model-tabs button {
  border: 0;
  background: transparent;
  padding: 5px 9px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--on-dark-muted);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.model-tabs button:hover {
  color: var(--paper);
}

.model-tabs button[aria-selected="true"] {
  background: rgba(242, 200, 75, 0.14);
  color: var(--maize);
}

.hero-code {
  margin: 0;
  padding: 20px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.85;
  color: #dce5dd;
  overflow-x: auto;
  flex: 1;
  tab-size: 2;
}

.tok-key {
  color: var(--celadon);
}

.tok-str {
  color: var(--maize);
}

.tok-com {
  color: #70857a;
}

.tok-num {
  color: #d7e3d9;
}

.tok-method {
  color: var(--maize);
  font-weight: 500;
}

.panel-response {
  border-top: 1px solid var(--ink-line);
  padding: 15px 20px 18px;
  background: rgba(243, 243, 236, 0.03);
}

.res-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--on-dark-muted);
}

.res-meta .ok {
  color: var(--maize);
}

.res-text {
  margin-top: 9px;
  min-height: 3.3em;
  font-size: 13.5px;
  line-height: 1.65;
  color: #d5ded7;
}

@media (max-width: 419px) {
  .res-text {
    min-height: 4.95em;
  }
}

.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 17px 0;
  background: var(--paper);
}

.ticker-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: ticker 34s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-group {
  display: flex;
  align-items: center;
  gap: 34px;
  padding-right: 34px;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 34px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.ticker-item::after {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--maize);
}

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

.section {
  padding: clamp(68px, 9vw, 128px) 0;
}

.section-dark {
  background: var(--ink);
  color: var(--paper);
}

.section-tint {
  background: var(--paper-2);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 68px);
}

.section-head h2 {
  margin-top: 18px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.section-note {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 34em;
  justify-self: end;
}

.section-dark .section-note {
  color: var(--on-dark-muted);
}

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink-line);
  border-left: 1px solid var(--ink-line);
}

.cap-cell {
  display: flex;
  flex-direction: column;
  min-height: 232px;
  padding: clamp(24px, 3vw, 36px);
  border-right: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  transition: background-color 0.25s var(--ease);
}

.cap-cell:hover {
  background: rgba(243, 243, 236, 0.035);
}

.cap-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--maize);
}

.cap-cell h3 {
  margin-top: auto;
  padding-top: 40px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.1vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cap-cell p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--on-dark-muted);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.model-table {
  width: 100%;
  min-width: 820px;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: left;
}

.model-table th {
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.model-table th:nth-child(1) { width: 27%; }
.model-table th:nth-child(2) { width: 15%; }
.model-table th:nth-child(3) { width: 11%; }
.model-table th:nth-child(4) { width: 17.5%; }
.model-table th:nth-child(5) { width: 17.5%; }
.model-table th:nth-child(6) { width: 12%; }

.model-table th:nth-child(3),
.model-table th:nth-child(4),
.model-table th:nth-child(5) {
  text-align: right;
}

.model-table th:first-child,
.model-table td:first-child {
  padding-left: 18px;
}

.model-table th:last-child,
.model-table td:last-child {
  padding-right: 18px;
  text-align: right;
}

.model-table td {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 14px;
}

.model-table td.num-cell,
.model-table td.price-cell {
  text-align: right;
}

.model-table tbody tr {
  transition: background-color 0.22s var(--ease);
}

@media (hover: hover) {
  .model-table tbody tr:hover {
    background: rgba(242, 200, 75, 0.085);
  }

  .model-table tbody tr:hover .model-vendor {
    border-color: var(--line-strong);
    color: var(--ink);
  }

  .model-table tbody tr:hover .model-id {
    color: var(--muted);
  }
}

.model-name {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.model-id {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.01em;
  color: var(--muted-2);
  transition: color 0.22s var(--ease);
}

.model-vendor {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  transition: border-color 0.22s var(--ease), color 0.22s var(--ease);
}

.num-cell {
  font-family: var(--mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price-cell {
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price-cell small {
  font-size: 10px;
  color: var(--muted-2);
  margin-left: 2px;
}

.table-note {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

.integ {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}

.integ h2 {
  margin-top: 18px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.steps {
  margin-top: 40px;
  display: grid;
}

.step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--ink-line);
}

.step-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--maize);
  padding-top: 4px;
}

.step h3 {
  font-size: 15px;
  font-weight: 500;
}

.step p {
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--on-dark-muted);
}

.code-card {
  min-width: 0;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  background: #0b1410;
  overflow: hidden;
}

.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ink-line);
  background: rgba(243, 243, 236, 0.02);
}

.code-tabs {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.code-tabs button {
  border: 0;
  background: transparent;
  padding: 6px 10px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--on-dark-muted);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.code-tabs button:hover {
  color: var(--paper);
}

.code-tabs button[aria-selected="true"] {
  background: rgba(242, 200, 75, 0.14);
  color: var(--maize);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--ink-line);
  border-radius: 2px;
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--on-dark-muted);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.copy-btn:hover {
  color: var(--paper);
  border-color: var(--ink-line-strong);
}

.code-body {
  margin: 0;
  padding: 22px;
  min-height: 292px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.85;
  color: #dce5dd;
  overflow-x: auto;
  tab-size: 2;
}

.code-pane[hidden] {
  display: none;
}

.mock {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fbfbf6;
  overflow: hidden;
  box-shadow: 0 50px 100px -80px rgba(16, 26, 21, 0.65);
}

.mock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.mock-url {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
}

.mock-badge {
  color: var(--maize-deep);
  letter-spacing: 0.1em;
}

.mock-body {
  display: grid;
  grid-template-columns: 182px minmax(0, 1fr);
  min-height: 384px;
}

.mock-side {
  background: var(--ink);
  color: var(--paper);
  padding: 16px 12px;
}

.mock-side .brand {
  padding: 0 6px 18px;
}

.mock-side .brand-word {
  font-size: 17px;
}

.mock-side .brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.mock-nav {
  display: grid;
  gap: 2px;
}

.mock-nav span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 3px;
  font-size: 11.5px;
  color: rgba(243, 243, 236, 0.62);
}

.mock-nav span.is-active {
  background: rgba(242, 200, 75, 0.12);
  color: var(--paper);
}

.mock-main {
  padding: 18px 20px 0;
  min-width: 0;
}

.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.mock-head strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.mock-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 16px;
}

.mock-stat {
  background: #fbfbf6;
  padding: 12px 14px;
}

.mock-stat span {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.mock-stat strong {
  display: block;
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
}

.mock-chart {
  margin-top: 16px;
  border: 1px solid var(--line);
  padding: 12px 14px 8px;
  background: #fbfbf6;
}

.mock-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.mock-chart svg {
  display: block;
  width: 100%;
  height: 96px;
  margin-top: 6px;
}

.mock-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 10.5px;
}

.mock-table th {
  padding: 8px 6px;
  text-align: left;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.mock-table td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.mock-table td:first-child {
  color: var(--ink);
}

.mock-table tr:last-child td {
  border-bottom: 0;
}

.mock-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.mock-caption {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--muted-2);
}

.use-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}

.use-item {
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}

.use-num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--maize-deep);
}

.use-item h3 {
  margin-top: 24px;
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.use-item p {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

.faq {
  max-width: 880px;
  margin-inline: auto;
}

.faq-item {
  border-top: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: clamp(18px, 1.9vw, 23px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex: none;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.24s var(--ease);
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq-item[open] .faq-icon::after {
  transform: rotate(0deg);
}

.faq-answer {
  padding: 0 48px 26px 0;
  max-width: 64ch;
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
}

.cta {
  position: relative;
  overflow: hidden;
  background: var(--maize);
  color: var(--ink);
}

.cta-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding: clamp(58px, 8vw, 104px) 0;
}

.cta h2 {
  max-width: 15em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(36px, 5.2vw, 74px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.cta-note {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: rgba(16, 26, 21, 0.68);
}

.cta-pattern {
  position: absolute;
  top: 50%;
  right: -60px;
  width: 420px;
  height: 420px;
  transform: translateY(-50%);
  opacity: 0.16;
  pointer-events: none;
}

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(52px, 7vw, 80px) 0 30px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
}

.footer-brand .brand-word {
  color: var(--paper);
}

.footer-brand .brand-code {
  color: var(--maize);
}

.footer-tagline {
  margin-top: 18px;
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--on-dark-muted);
}

.footer-col h3 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.footer-col ul {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  list-style: none;
}

.footer-col a {
  font-size: 13.5px;
  color: #cbd5ce;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-col a:hover {
  color: var(--maize);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: clamp(44px, 6vw, 68px);
  padding-top: 22px;
  border-top: 1px solid var(--ink-line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--on-dark-muted);
}

.page-hero {
  padding: clamp(48px, 6vw, 76px) 0 clamp(40px, 5vw, 60px);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin-top: 22px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(42px, 6.6vw, 92px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-top: 26px;
}

.page-hero p {
  max-width: 42em;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--muted);
}

.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-self: end;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 34px 0 22px;
}

.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  font-size: 13px;
  color: var(--muted);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
    background-color 0.18s var(--ease);
}

.chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  min-width: min(280px, 100%);
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
}

.search-field:focus-within {
  border-color: var(--ink);
}

.search-field svg {
  color: var(--muted-2);
  flex: none;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13.5px;
}

.search-field input::placeholder {
  color: var(--muted-2);
}

.table-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.table-status::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--maize);
}

.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(28px, 4vw, 48px);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
}

.calc h2 {
  margin-top: 16px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.calc-intro {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--on-dark-muted);
  max-width: 36em;
}

.calc-controls {
  margin-top: 32px;
  display: grid;
  gap: 22px;
}

.field {
  display: grid;
  gap: 10px;
}

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.field-label output {
  color: var(--maize);
  letter-spacing: 0.02em;
  font-size: 11.5px;
}

.select-dark {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--ink-line-strong);
  border-radius: 2px;
  background: var(--ink-soft);
  color: var(--paper);
  font-size: 13.5px;
}

input[type="range"] {
  width: 100%;
  height: 20px;
  margin: 0;
  accent-color: var(--maize);
  cursor: pointer;
}

.calc-result {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  padding-left: clamp(0px, 4vw, 48px);
  border-left: 1px solid var(--ink-line);
}

.calc-result-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.calc-amount {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.calc-amount small {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--on-dark-muted);
  margin-left: 4px;
}

.calc-lines {
  margin-top: 28px;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ink-line);
}

.calc-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--on-dark-muted);
}

.calc-line span:last-child {
  color: var(--paper);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.calc-note {
  margin-top: auto;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
  color: var(--on-dark-muted);
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.note-item {
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.note-item span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--maize-deep);
}

.note-item h3 {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 500;
}

.note-item p {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

.docs-wrap {
  padding-bottom: clamp(72px, 9vw, 120px);
}

.docs-grid {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  padding-top: clamp(32px, 4vw, 52px);
  align-items: start;
}

.docs-side {
  position: sticky;
  top: 98px;
}

.docs-side-title {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.doc-nav {
  display: grid;
}

.doc-nav a {
  padding: 8px 0 8px 14px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.doc-nav a:hover {
  color: var(--ink);
}

.doc-nav a.is-active {
  border-left: 2px solid var(--maize);
  margin-left: -1px;
  color: var(--ink);
  font-weight: 500;
}

.docs-mobile-nav {
  display: none;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 16px;
}

.docs-mobile-nav summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 13px;
  list-style: none;
}

.docs-mobile-nav summary::-webkit-details-marker {
  display: none;
}

.docs-mobile-nav .doc-nav {
  padding-bottom: 12px;
}

.docs-mobile-nav .doc-nav a {
  border-left: 0;
  border-top: 1px solid var(--line);
  padding-left: 0;
}

.docs-mobile-nav .doc-nav a.is-active {
  border-left: 0;
  margin-left: 0;
  color: var(--maize-deep);
}

.doc-content {
  min-width: 0;
  max-width: 800px;
}

.doc-lead {
  font-size: 17px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 46em;
}

.doc-section {
  margin-top: clamp(48px, 6vw, 72px);
  scroll-margin-top: 100px;
}

.doc-section h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.25;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.doc-section h3 {
  margin-top: 32px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.doc-section p {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 68ch;
}

.doc-section p strong {
  color: var(--ink);
  font-weight: 500;
}

.doc-section ul {
  margin-top: 16px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

.doc-section li::marker {
  color: var(--maize-deep);
}

.doc-section a {
  color: var(--ink);
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.doc-section a:hover {
  text-decoration-color: var(--maize-deep);
}

.inline-code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
}

.callout {
  margin-top: 22px;
  padding: 16px 20px;
  border-left: 2px solid var(--maize);
  background: var(--paper-2);
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.callout strong {
  color: var(--ink);
  font-weight: 500;
}

.doc-content .code-card {
  margin-top: 22px;
}

.doc-content .code-body {
  min-height: 0;
}

.param-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  margin-top: 20px;
  text-align: left;
}

.param-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.param-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
  vertical-align: top;
}

.param-table td:first-child {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
}

.param-table .req {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--maize-deep);
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 12.5px;
}

.endpoint .method {
  padding: 2px 7px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 300;
  transform: translate(-50%, 16px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  box-shadow: 0 20px 40px -20px rgba(16, 26, 21, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  max-width: calc(100vw - 40px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--maize);
  flex: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s var(--ease), transform 0.95s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   MOTION SYSTEM
   ============================================================ */

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: vt-out 0.18s ease both;
}

::view-transition-new(root) {
  animation: vt-in 0.4s var(--ease) both;
}

@keyframes vt-out {
  to { opacity: 0; transform: translateY(-6px); }
}

@keyframes vt-in {
  from { opacity: 0; transform: translateY(10px); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes title-in {
  from { opacity: 0; transform: translateY(0.35em); clip-path: inset(0 0 105% 0); }
  to { opacity: 1; transform: none; clip-path: inset(0); }
}

@keyframes panel-in {
  from { opacity: 0; translate: 0 28px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes header-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: none; }
}

@keyframes row-in {
  from { opacity: 0; translate: 0 8px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes faq-in {
  from { opacity: 0; translate: 0 -6px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes res-in {
  from { opacity: 0; translate: 0 6px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes field-drift {
  to { background-position: 96px 96px, -96px 96px; }
}

@keyframes kernel-drift {
  to { background-position: 26px 52px; }
}

@keyframes pattern-float {
  from { transform: translateY(-50%) rotate(0deg) scale(1); }
  to { transform: translateY(calc(-50% - 12px)) rotate(3deg) scale(1.025); }
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 200;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  background: var(--maize);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

body.console-page .scroll-progress {
  display: none;
}

.site-header {
  animation: header-in 0.7s var(--ease) both;
}

.site-header.is-scrolled {
  background: rgba(242, 243, 233, 0.96);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
}

.hero {
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.hero::before {
  inset: 0 0 0;
  background-image:
    repeating-linear-gradient(115deg, transparent 0 46px, rgba(27, 30, 26, 0.035) 46px 47px),
    repeating-linear-gradient(25deg, transparent 0 46px, rgba(27, 30, 26, 0.028) 46px 47px);
  -webkit-mask-image: radial-gradient(120% 80% at 72% 18%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 80% at 72% 18%, #000 0%, transparent 72%);
  animation: field-drift 70s linear infinite;
}

.hero::after {
  top: 7%;
  right: 0;
  width: min(52vw, 700px);
  height: 78%;
  background-image: radial-gradient(circle at 2px 2px, rgba(242, 200, 75, 0.55) 1.6px, transparent 2.2px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 66%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 66%, transparent 100%);
  opacity: 0.5;
  animation: kernel-drift 34s linear infinite;
}

.hero .shell,
.hero .ticker {
  position: relative;
  z-index: 1;
}

.hero-top {
  animation: rise-in 0.65s var(--ease) 0.05s both;
}

.hero-title .line {
  animation: title-in 0.95s var(--ease) both;
}

.hero-title .line:nth-child(1) {
  animation-delay: 0.14s;
}

.hero-title .line:nth-child(2) {
  animation-delay: 0.25s;
}

.hero-copy {
  animation: rise-in 0.85s var(--ease) 0.4s both;
}

.hero-panel {
  position: relative;
  animation: panel-in 1s var(--ease) 0.32s both;
}

.ticker {
  animation: rise-in 0.9s var(--ease) 0.55s both;
}

.hero-panel[data-tilt] {
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease);
  transform-style: preserve-3d;
}

.hero-panel[data-tilt].is-tilting {
  transition: transform 0.08s linear;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: radial-gradient(300px circle at var(--mx, 80%) var(--my, 0%), rgba(242, 200, 75, 0.10), transparent 68%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.hero-panel:hover::after {
  opacity: 1;
}

.panel-response .res-text {
  transition: color 0.3s var(--ease);
}

.panel-response.is-updating .res-text {
  animation: res-in 0.5s var(--ease) both;
}

.model-tabs button:active {
  transform: scale(0.95);
}

.page-hero .eyebrow {
  animation: rise-in 0.6s var(--ease) 0.06s both;
}

.page-hero h1 {
  animation: title-in 0.95s var(--ease) 0.12s both;
}

.page-hero .page-hero-grid {
  animation: rise-in 0.8s var(--ease) 0.34s both;
}

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --sheen: rgba(255, 255, 255, 0.18);
}

.btn::after {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: 0;
  width: 34%;
  background: linear-gradient(90deg, transparent, var(--sheen), transparent);
  transform: translateX(-160%) skewX(-18deg);
  transition: transform 0.7s var(--ease);
  pointer-events: none;
}

.btn:hover::after {
  transform: translateX(430%) skewX(-18deg);
}

.btn-ghost {
  --sheen: rgba(242, 200, 75, 0.24);
}

.btn-light {
  --sheen: rgba(27, 30, 26, 0.08);
}

.btn-maize {
  --sheen: rgba(255, 255, 255, 0.34);
}

.btn svg {
  transition: transform 0.28s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.cap-cell {
  position: relative;
  overflow: hidden;
}

.cap-cell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--maize);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.cap-cell:hover::before {
  transform: scaleX(1);
}

.cap-cell h3 {
  transition: transform 0.4s var(--ease), color 0.3s var(--ease);
}

.cap-cell:hover h3 {
  transform: translateX(4px);
  color: var(--maize-soft);
}

.cap-num {
  transition: color 0.3s var(--ease);
}

.cap-cell:hover .cap-num {
  color: var(--maize-soft);
}

.use-item {
  transition: border-color 0.4s var(--ease);
}

.use-item h3 {
  transition: transform 0.4s var(--ease);
}

.use-item:hover {
  border-top-color: var(--ink);
}

.use-item:hover h3 {
  transform: translateX(4px);
}

.step {
  transition: background-color 0.3s var(--ease);
}

.step:hover {
  background: rgba(242, 243, 233, 0.03);
}

.faq-item summary {
  transition: color 0.25s var(--ease);
}

.faq-item summary:hover {
  color: var(--maize-deep);
}

.faq-item[open] .faq-answer {
  animation: faq-in 0.4s var(--ease) both;
}

.faq-icon {
  transition: transform 0.3s var(--ease);
}

.faq-item summary:hover .faq-icon {
  transform: scale(1.12);
}

.cta-pattern {
  animation: pattern-float 14s ease-in-out infinite alternate;
  transition: opacity 0.6s var(--ease);
}

.cta:hover .cta-pattern {
  opacity: 0.24;
}

.footer-col a {
  position: relative;
}

.footer-col a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--maize);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.footer-col a:hover::after {
  transform: scaleX(1);
}

.js .reveal.is-in .model-table tbody tr {
  animation: row-in 0.6s var(--ease) both;
}

.js .reveal.is-in .model-table tbody tr:nth-child(2) { animation-delay: 0.05s; }
.js .reveal.is-in .model-table tbody tr:nth-child(3) { animation-delay: 0.1s; }
.js .reveal.is-in .model-table tbody tr:nth-child(4) { animation-delay: 0.15s; }
.js .reveal.is-in .model-table tbody tr:nth-child(5) { animation-delay: 0.2s; }
.js .reveal.is-in .model-table tbody tr:nth-child(6) { animation-delay: 0.25s; }
.js .reveal.is-in .model-table tbody tr:nth-child(7) { animation-delay: 0.3s; }

.js .reveal.is-in .step,
.js .reveal.is-in .faq-item {
  animation: row-in 0.65s var(--ease) both;
}

.js .reveal.is-in .note-item {
  animation: row-in 0.65s var(--ease) both;
}

.js .reveal.is-in .note-item:nth-child(2) { animation-delay: 0.06s; }
.js .reveal.is-in .note-item:nth-child(3) { animation-delay: 0.12s; }
.js .reveal.is-in .note-item:nth-child(4) { animation-delay: 0.18s; }

.js .reveal.is-in .step:nth-child(2),
.js .reveal.is-in .faq-item:nth-child(2) { animation-delay: 0.06s; }
.js .reveal.is-in .step:nth-child(3),
.js .reveal.is-in .faq-item:nth-child(3) { animation-delay: 0.12s; }
.js .reveal.is-in .step:nth-child(4),
.js .reveal.is-in .faq-item:nth-child(4) { animation-delay: 0.18s; }
.js .reveal.is-in .step:nth-child(5),
.js .reveal.is-in .faq-item:nth-child(5) { animation-delay: 0.24s; }

@media (max-width: 1080px) {
  .site-nav {
    gap: 20px;
  }

  .hero-title {
    font-size: clamp(46px, 8.4vw, 96px);
  }

  .cap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-top {
    grid-template-columns: 1.8fr 1fr 1fr;
  }

  .footer-col:last-child {
    grid-column: 2;
  }

  .notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-nav,
  .header-login {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero-grid,
  .section-head,
  .integ,
  .calc,
  .page-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-note {
    justify-self: start;
  }

  .hero-panel {
    margin-top: 8px;
  }

  .calc-result {
    border-left: 0;
    border-top: 1px solid var(--ink-line);
    padding-left: 0;
    padding-top: 32px;
  }

  .calc-note {
    margin-top: 16px;
  }

  .use-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .use-item h3 {
    margin-top: 14px;
  }

  .cta-inner {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .cta-pattern {
    right: -140px;
    opacity: 0.12;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-col:last-child {
    grid-column: auto;
  }

  .docs-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .docs-side {
    display: none;
  }

  .docs-mobile-nav {
    display: block;
  }

  .mock-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .mock-side {
    display: none;
  }
}

@media (max-width: 680px) {
  .header-inner {
    height: 64px;
  }

  .mobile-menu {
    top: 64px;
  }

  .header-actions .btn {
    display: none;
  }

  .hero-top span:last-child {
    display: none;
  }

  .hero-title {
    font-size: clamp(42px, 11.8vw, 66px);
    line-height: 1.06;
    letter-spacing: -0.04em;
  }

  .hero-lede {
    font-size: 15.5px;
  }

  .hero-meta {
    gap: 8px 18px;
    margin-top: 30px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    padding-inline: 16px;
  }

  .panel-bar {
    align-items: flex-start;
  }

  .hero-code {
    font-size: 11px;
    padding: 16px;
  }

  .cap-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cap-cell {
    min-height: 190px;
  }

  .section-head h2 {
    font-size: clamp(30px, 8.4vw, 42px);
  }

  .model-table {
    min-width: 760px;
  }

  .model-table th,
  .model-table td {
    padding-left: 14px;
    padding-right: 14px;
  }

  .model-table th:first-child,
  .model-table td:first-child {
    padding-left: 14px;
  }

  .model-table th:last-child,
  .model-table td:last-child {
    padding-right: 14px;
  }

  .integ h2 {
    font-size: clamp(30px, 8vw, 42px);
  }

  .code-body {
    font-size: 11.5px;
    padding: 16px;
  }

  .code-bar {
    align-items: flex-start;
  }

  .mock-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mock-stat:nth-child(3) {
    display: none;
  }

  .mock-table th:nth-child(3),
  .mock-table td:nth-child(3) {
    display: none;
  }

  .faq-answer {
    padding-right: 0;
  }

  .notes-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-hero h1 {
    font-size: clamp(38px, 10vw, 56px);
  }

  .page-hero-meta {
    justify-self: start;
  }

  .toolbar {
    align-items: stretch;
  }

  .chip-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .chip-row::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: none;
  }

  .search-field {
    width: 100%;
  }

  .calc-amount {
    font-size: 42px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-col:last-child {
    grid-column: auto;
  }

  .toast {
    bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ticker-track,
  .hero::before,
  .hero::after,
  .cta-pattern {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-panel[data-tilt] {
    transform: none !important;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

/* ---------------------------------------------------------- pricing calculator */
.calc-modes {
  display: inline-flex;
  gap: 2px;
  margin-top: 26px;
  padding: 2px;
  border: 1px solid var(--ink-line);
}

.calc-modes button {
  height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 1px;
  background: transparent;
  color: var(--on-dark-muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.calc-modes button:hover {
  color: var(--paper);
}

.calc-modes button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
}

.calc-model-field {
  margin-top: 18px;
}

.calc-controls[data-calc-panel] {
  margin-top: 20px;
}

.calc-controls[data-calc-panel][hidden] {
  display: none;
}

.calc-exact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.calc-number {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--ink-line-strong);
  border-radius: 2px;
  background: var(--ink-soft);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.calc-number:focus {
  outline: 2px solid var(--maize);
  outline-offset: 1px;
}

.calc-number::-webkit-outer-spin-button,
.calc-number::-webkit-inner-spin-button {
  opacity: 0.4;
}

.calc-exact-hint {
  font-size: 10.5px;
  line-height: 1.75;
  color: var(--on-dark-muted);
  opacity: 0.82;
}

@media (max-width: 720px) {
  .calc-exact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Native accessible dialog, styled with the shared brand palette. */
.yumi-pricing-dialog { background: var(--paper, #f2f3e9); color:var(--ink,#1c2019); border:1px solid #bbbdb2; border-radius:4px; max-width:min(760px,94vw); max-height:88dvh; padding:32px; overflow:auto; }
.yumi-pricing-dialog::backdrop { background:rgba(20,25,17,.5); }
.yumi-pricing-dialog h2 { overflow-wrap:anywhere; }
