:root {
  --component-switch-off: #C9CEC6;
  --component-switch-knob: #FFFFFF;
  --component-code-key: #B9E5AE;
  --component-code-string: #F9E1A6;
}

.tabs {
  min-width: 0;
}

.tab-list {
  display: flex;
  max-width: 100%;
  gap: 7px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel-muted);
  color: var(--color-text);
  scrollbar-width: thin;
}

.tab-list [role="tab"] {
  min-width: max-content;
  min-height: 42px;
  padding: 8px 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-muted);
  font-weight: 680;
  cursor: pointer;
}

.tab-list [role="tab"]:hover {
  color: var(--color-text);
}

.tab-list [role="tab"][aria-selected="true"],
.tab-list [role="tab"].is-active {
  background: var(--color-panel);
  color: var(--color-accent-deep);
  box-shadow: 0 4px 14px var(--color-shadow-soft);
}

.tab-panel {
  padding-top: 30px;
}

.tab-panel[hidden] {
  display: none;
}

.jump-nav {
  position: sticky;
  z-index: 20;
  top: 12px;
  display: flex;
  max-width: 100%;
  gap: 8px;
  margin-bottom: 36px;
  padding: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: 0 8px 24px var(--color-shadow-soft);
  -webkit-overflow-scrolling: touch;
}

.jump-nav.is-static {
  position: static;
}

.jump-nav a {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.jump-nav a:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-deep);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  overflow: clip;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: 0 6px 20px var(--color-shadow-soft);
}

.faq-item summary {
  position: relative;
  padding: 19px 56px 19px 20px;
  color: var(--color-text);
  font-weight: 720;
  cursor: pointer;
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 20px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  color: var(--color-accent-deep);
  font-size: 19px;
  line-height: 1;
  transform: translateY(-50%);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 20px 20px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.faq-answer > :first-child {
  margin-top: 17px;
}

.faq-answer > :last-child {
  margin-bottom: 0;
}

.term-card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

.term-card::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 0;
  width: 4px;
  height: 34px;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  background: var(--color-accent);
}

.term-card dt {
  margin-bottom: 9px;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 780;
}

.term-card dd {
  margin: 0;
  color: var(--color-text-muted);
}

.client-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 20px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

.client-card__head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 16px;
}

.client-card__head img {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
}

.client-card__title {
  min-width: 0;
  flex: 1;
}

.client-card__title h3 {
  margin-bottom: 4px;
}

.client-card__meta {
  color: var(--color-text-muted);
  font: 12px/1.6 var(--font-mono);
  overflow-wrap: anywhere;
}

.client-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.client-card__actions .button {
  flex: 1 1 190px;
}

.client-badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 750;
}

.client-badge--primary,
.client-badge--recommended {
  background: var(--color-accent-soft);
  color: var(--color-accent-deep);
}

.client-badge--retired {
  border: 1px solid var(--color-error);
  background: var(--color-panel);
  color: var(--color-error);
}

.article-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  color: var(--color-text-muted);
  font: 12px/1.5 var(--font-mono);
}

.article-card h3 {
  font-size: 22px;
}

.article-card p {
  color: var(--color-text-muted);
}

.article-card__link {
  margin-top: auto;
  font-weight: 700;
  text-decoration: none;
}

.callout {
  position: relative;
  margin-block: 26px;
  padding: 20px 22px 20px 54px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-accent-soft);
  color: var(--color-text);
}

.callout::before {
  content: "i";
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-accent-deep);
  color: var(--color-white);
  font: 700 12px/1 var(--font-mono);
}

.callout--warning {
  border-color: var(--color-warning);
  background: var(--color-panel);
  color: var(--color-text);
}

.callout--warning::before {
  content: "!";
  background: var(--color-warning);
  color: var(--color-text);
}

.callout--danger {
  border-color: var(--color-error);
  background: var(--color-panel);
  color: var(--color-text);
}

.callout--danger::before {
  content: "!";
  background: var(--color-error);
  color: var(--color-white);
}

.dl-fab {
  position: fixed;
  z-index: 80;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  max-width: min(330px, calc(100vw - 36px));
  align-items: center;
  gap: 12px;
  padding: 13px 17px 13px 13px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.dl-fab:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-deep);
}

.dl-fab__icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-white);
}

.dl-fab__icon svg {
  width: 20px;
  height: 20px;
}

.dl-fab__copy {
  min-width: 0;
  line-height: 1.35;
}

.dl-fab__copy strong,
.dl-fab__copy small {
  display: block;
}

.dl-fab__copy strong {
  font-size: 14px;
}

.dl-fab__copy small {
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: 11px;
}

.end-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-panel-muted);
  color: var(--color-text);
}

.end-download-card__copy {
  max-width: 650px;
}

.end-download-card__copy p {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.feature-card {
  overflow: clip;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-canvas {
  min-height: 250px;
  padding: clamp(22px, 4vw, 38px);
}

.feature-canvas--green {
  background: var(--color-pastel-green);
  color: var(--color-text);
}

.feature-canvas--yellow {
  background: var(--color-pastel-yellow);
  color: var(--color-text);
}

.feature-canvas--blue {
  background: var(--color-pastel-blue);
  color: var(--color-text);
}

.feature-canvas--pink {
  background: var(--color-pastel-pink);
  color: var(--color-text);
}

.feature-copy {
  padding: clamp(24px, 4vw, 38px);
}

.settings-window {
  max-width: 440px;
  margin-inline: auto;
  padding: 14px 17px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-tile);
}

.window-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.window-chrome span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: var(--color-border);
}

.window-chrome span:first-child {
  background: var(--color-error);
}

.window-chrome span:nth-child(2) {
  background: var(--color-warning);
}

.window-chrome span:nth-child(3) {
  background: var(--color-success);
}

.window-title {
  margin-left: 6px;
  color: var(--color-text-muted);
  font: 11px/1.4 var(--font-mono);
}

.setting-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 11px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 13px;
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-row > :first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.fake-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: var(--component-switch-off);
}

.fake-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: var(--component-switch-knob);
  box-shadow: 0 1px 4px var(--color-shadow-mid);
}

.fake-switch.is-on {
  background: var(--color-accent);
}

.fake-switch.is-on::after {
  transform: translateX(16px);
}

.fake-select {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-panel-muted);
  color: var(--color-text);
  font: 11px/1.4 var(--font-mono);
}

.hero-preview {
  position: relative;
  min-height: 734px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px var(--gutter) 56px;
  overflow-x: clip;
  isolation: isolate;
}

.hero-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--color-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(to bottom, var(--color-text) 50%, transparent 96%);
  mask-image: linear-gradient(to bottom, var(--color-text) 50%, transparent 96%);
}

.hero-preview::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -160px;
  left: 4%;
  width: min(680px, 82vw);
  height: 540px;
  background: radial-gradient(closest-side, var(--color-glow), transparent 72%);
  pointer-events: none;
}

.hero-core {
  position: relative;
  z-index: 5;
  display: flex;
  width: min(780px, 100%);
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-brand-mark {
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
}

.hero-badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-text-muted);
  box-shadow: 0 2px 8px var(--color-shadow-soft);
  font: 12px/1.5 var(--font-mono);
}

.hero-preview h1 {
  margin-top: 22px;
  margin-bottom: 0;
}

.highlight-block {
  display: inline-block;
  padding: 1px 14px 3px;
  border-radius: 12px;
  background: var(--color-accent-soft);
  color: var(--color-accent-deep);
  white-space: nowrap;
}

.hero-description {
  max-width: 640px;
  margin-top: 20px;
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: 16.5px;
  line-height: 1.75;
}

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

.platform-row {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.platform-chip {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-text-muted);
  box-shadow: 0 2px 8px var(--color-shadow-soft);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.platform-chip svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.platform-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-deep);
  transform: translateY(-1px);
}

.hero-tiles {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.hero-tile {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-tile);
}

.hero-tile--icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-medium);
}

.hero-tile--icon svg {
  width: 27px;
  height: 27px;
  color: var(--color-text-muted);
}

.hero-tile--pill {
  gap: 8px;
  padding: 9px 17px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
}

.hero-tile--core {
  gap: 8px;
  padding: 11px 17px;
  border-radius: var(--radius-medium);
  font: 13px/1.4 var(--font-mono);
}

.hero-tile__dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
}

.hero-tile__tag {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--color-accent-soft);
  color: var(--color-accent-deep);
  font-size: 10px;
}

.tile-a { top: 48px; left: 7%; }
.tile-b { top: 175px; left: 15%; }
.tile-c { top: 310px; left: 5%; }
.tile-d { top: 480px; left: 12%; }
.tile-e { top: 65px; right: 7%; }
.tile-f { top: 190px; right: 16%; }
.tile-g { top: 325px; right: 5%; }
.tile-h { top: 500px; right: 12%; }

.drift-one {
  animation: tile-drift 7s ease-in-out infinite alternate;
}

.drift-two {
  animation: tile-drift 8.6s ease-in-out 900ms infinite alternate;
}

.drift-three {
  animation: tile-drift 10s ease-in-out 1800ms infinite alternate;
}

@keyframes tile-drift {
  from { transform: translateY(-7px); }
  to { transform: translateY(7px); }
}

.preview-block {
  padding-top: 86px;
  padding-bottom: 86px;
  overflow-x: clip;
}

.preview-block__heading {
  margin-bottom: 36px;
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.token-swatch {
  overflow: clip;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
  color: var(--color-text);
}

.token-swatch__color {
  height: 96px;
}

.swatch-page { background: var(--color-page); }
.swatch-panel { background: var(--color-panel); }
.swatch-panel-muted { background: var(--color-panel-muted); }
.swatch-border { background: var(--color-border); }
.swatch-accent { background: var(--color-accent); }
.swatch-accent-deep { background: var(--color-accent-deep); }
.swatch-text { background: var(--color-text); }
.swatch-muted { background: var(--color-text-muted); }
.swatch-green { background: var(--color-pastel-green); }
.swatch-yellow { background: var(--color-pastel-yellow); }
.swatch-blue { background: var(--color-pastel-blue); }
.swatch-pink { background: var(--color-pastel-pink); }

.token-swatch__label {
  padding: 13px;
  color: var(--color-text);
  font: 11px/1.55 var(--font-mono);
  overflow-wrap: anywhere;
}

.preview-footer {
  margin-top: 0;
}

@media (max-width: 1120px) {
  .hero-tile {
    display: none;
  }
}

@media (max-width: 900px) {
  .token-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .jump-nav {
    top: 8px;
    border-radius: var(--radius-medium);
  }

  .callout {
    padding: 50px 18px 18px;
  }

  .callout::before {
    top: 16px;
    left: 18px;
  }

  .end-download-card {
    align-items: stretch;
    flex-direction: column;
  }

  .dl-fab {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }

  .hero-preview {
    min-height: 630px;
    padding-top: 34px;
    padding-bottom: 44px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .button {
    flex: 1 1 145px;
  }

  .platform-row {
    gap: 8px;
  }

  .platform-chip {
    padding-inline: 11px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .drift-one,
  .drift-two,
  .drift-three {
    animation: none;
  }
}