/* Alex 官网样式 — 纯 CSS，无构建依赖。
 * 设计方向：暖纸色底、衬线标题、细线分隔、克制的单一强调色。
 * 不使用渐变文字、光晕、emoji 图标等“模板化”元素。 */

:root {
  /* ---------- Raw palette ---------- */
  --bg-light: #faf9f5;
  --bg-dark: #1f1e1d;
  --tint-light: #f3f1ea;
  --tint-dark: #262624;
  --surface-light: #ffffff;
  --surface-dark: #2b2a27;
  --text-light: #141413;
  --text-dark: #f5f4ee;
  --text-2-light: #3d3d3a;
  --text-2-dark: #dcdad2;
  --muted-light: #6f6e68;
  --muted-dark: #a6a39a;
  --faint-light: #a3a199;
  --faint-dark: #77756d;
  --border-light: #e5e3da;
  --border-dark: #3a3936;
  --border-strong-light: #d4d1c6;
  --border-strong-dark: #4a4844;
  --accent-light: #b85a3a;
  --accent-dark: #e08a6a;
  --ink-light: #141413; /* inverted surfaces: dark button / CTA */
  --ink-dark: #f5f4ee;
  --on-ink-light: #faf9f5;
  --on-ink-dark: #141413;

  /* ---------- Semantic tokens (fallback = light) ---------- */
  --bg: var(--bg-light);
  --tint: var(--tint-light);
  --surface: var(--surface-light);
  --text: var(--text-light);
  --text-2: var(--text-2-light);
  --muted: var(--muted-light);
  --faint: var(--faint-light);
  --border: var(--border-light);
  --border-strong: var(--border-strong-light);
  --accent: var(--accent-light);
  --ink: var(--ink-light);
  --on-ink: var(--on-ink-light);

  @media (prefers-color-scheme: dark) {
    --bg: var(--bg-dark);
    --tint: var(--tint-dark);
    --surface: var(--surface-dark);
    --text: var(--text-dark);
    --text-2: var(--text-2-dark);
    --muted: var(--muted-dark);
    --faint: var(--faint-dark);
    --border: var(--border-dark);
    --border-strong: var(--border-strong-dark);
    --accent: var(--accent-dark);
    --ink: var(--ink-dark);
    --on-ink: var(--on-ink-dark);
  }

  @supports (color: light-dark(white, black)) {
    --bg: light-dark(var(--bg-light), var(--bg-dark));
    --tint: light-dark(var(--tint-light), var(--tint-dark));
    --surface: light-dark(var(--surface-light), var(--surface-dark));
    --text: light-dark(var(--text-light), var(--text-dark));
    --text-2: light-dark(var(--text-2-light), var(--text-2-dark));
    --muted: light-dark(var(--muted-light), var(--muted-dark));
    --faint: light-dark(var(--faint-light), var(--faint-dark));
    --border: light-dark(var(--border-light), var(--border-dark));
    --border-strong: light-dark(var(--border-strong-light), var(--border-strong-dark));
    --accent: light-dark(var(--accent-light), var(--accent-dark));
    --ink: light-dark(var(--ink-light), var(--ink-dark));
    --on-ink: light-dark(var(--on-ink-light), var(--on-ink-dark));
  }

  --serif: "Tiempos Headline", "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif SC",
    "Source Han Serif SC", "STSong", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 60px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light dark;
  accent-color: var(--accent);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);

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

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  font-weight: 500;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.1em 0.38em;
  border-radius: 5px;
  background: var(--tint);
  border: 1px solid var(--border);
  overflow-wrap: anywhere;
}

::selection {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--on-ink);
  font-size: 14px;

  &:focus {
    top: 12px;
  }
}

.text-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s;

  &:hover {
    text-decoration-color: currentColor;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-sm {
  min-block-size: 34px;
  padding: 0 14px;
  font-size: 14px;
}

.btn-lg {
  min-block-size: 46px;
  padding: 0 22px;
  font-size: 15px;
  max-inline-size: 100%;
}

.btn-dark {
  background: var(--ink);
  color: var(--on-ink);

  &:hover {
    background: color-mix(in srgb, var(--ink) 86%, var(--bg));
  }
}

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

  &:hover {
    background: color-mix(in srgb, var(--on-ink) 88%, var(--ink));
  }
}

.btn-quiet {
  border-color: var(--border-strong);
  color: var(--text);

  &:hover {
    background: var(--tint);
  }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;

  & img {
    border-radius: 7px;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 26px);
  min-width: 0;
  margin-right: auto;
  font-size: 14px;
  color: var(--muted);

  & a {
    white-space: nowrap;
    transition: color 0.15s;

    &:hover {
      color: var(--text);
    }
  }
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.lang-toggle {
  min-inline-size: 44px;
  padding-inline: 10px;
  background: transparent;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);

  &:hover {
    color: var(--text);
  }
}

@media (width < 760px) {
  .nav-links {
    display: none;
  }

  .nav {
    justify-content: space-between;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(56px, 9vw, 112px);
}

.hero-inner {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  font-size: 13px;
  color: var(--muted);

  & .sep {
    inline-size: 1px;
    block-size: 12px;
    background: var(--border-strong);
  }
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6.6vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 640px;
  margin: 28px auto 0;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.75;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

/* ---------- Mockup ---------- */
.mockup {
  margin: clamp(56px, 8vw, 88px) 0 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 1px 0 var(--border), 0 30px 60px -40px rgb(20 20 19 / 0.25);
  font-size: 12.5px;
  color: var(--text-2);
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 40px;
  padding: 0 14px;
  min-width: 0;
  border-bottom: 1px solid var(--border);
  background: var(--tint);

  & .dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;

    & i {
      inline-size: 10px;
      block-size: 10px;
      border-radius: 50%;
      background: var(--border-strong);
    }
  }
}

.mockup-tabs {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow: hidden;

  & span {
    padding: 4px 10px;
    border-radius: 6px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  & .active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 0 0 1px var(--border);
  }
}

.mockup-title {
  margin-left: auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--faint);
}

.mockup-body {
  display: grid;
  grid-template-columns: 192px minmax(0, 1fr) 264px;
  min-height: 400px;
}

.mk-label {
  margin: 14px 0 6px;
  font-size: 11px;
  color: var(--faint);

  &:first-child {
    margin-top: 0;
  }
}

.mk-tree {
  min-width: 0;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
}

.mk-node {
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  &.folder {
    color: var(--text);
    font-weight: 500;
  }

  &.sub {
    padding-left: 18px;
    color: var(--muted);
  }

  &.active {
    background: var(--tint);
    color: var(--text);
  }

  &.table {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--muted);
  }

  & em {
    margin-left: 4px;
    padding: 0 5px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    font-style: normal;
    font-size: 10px;
    color: var(--muted);
  }
}

.mk-canvas {
  min-width: 0;
  padding: 22px;
  background:
    radial-gradient(circle, var(--border) 1px, transparent 1px) 0 0 / 16px 16px,
    var(--bg);
}

.mk-page {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.mk-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;

  & strong {
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
  }
}

.mk-btn {
  display: inline-block;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 11.5px;

  &.ghost {
    background: transparent;
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--border-strong);
  }

  &.sm {
    margin-top: 10px;
  }
}

.mk-query {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.mk-input {
  flex: 1 1 88px;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-table {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.mk-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.9fr 0.9fr;
  column-gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 7px 12px;
  border-top: 1px solid var(--border);

  & > span {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  &.head {
    border-top: 0;
    background: var(--tint);
    color: var(--muted);
    font-size: 11.5px;
  }

  &.hl {
    background: color-mix(in srgb, var(--accent) 6%, transparent);
  }
}

.tag {
  justify-self: start;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--muted);
  background: var(--tint);

  &.ok {
    color: #3f6b46;
    background: color-mix(in srgb, #3f6b46 12%, transparent);
  }

  &.wait {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
  }
}

.mk-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 72px;
  padding: 0 4px;
  border-bottom: 1px solid var(--border);

  & span {
    flex: 1;
    height: var(--h);
    border-radius: 3px 3px 0 0;
    background: var(--border-strong);

    &:nth-child(6) {
      background: var(--accent);
    }
  }
}

.mk-ai {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 16px 14px;
  border-left: 1px solid var(--border);
}

.bubble {
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.6;

  &.user {
    align-self: flex-end;
    max-width: 92%;
    background: var(--tint);
    color: var(--text);
  }

  &.bot {
    border: 1px solid var(--border);
    background: var(--surface);
  }

  & b {
    font-weight: 600;
    color: var(--text);
  }

  & ul {
    margin-top: 6px;

    & li {
      padding-left: 14px;
      position: relative;

      &::before {
        content: "";
        position: absolute;
        left: 2px;
        top: 0.8em;
        inline-size: 5px;
        block-size: 1px;
        background: var(--muted);
      }
    }
  }
}

@media (width < 1000px) {
  .mockup-body {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .mk-ai {
    display: none;
  }
}

@media (width < 640px) {
  .mockup-body {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .mk-tree,
  .mockup-tabs,
  .mk-chart {
    display: none;
  }

  .mk-canvas {
    padding: 12px;
  }

  .mk-row {
    grid-template-columns: 1.3fr 1fr 0.8fr;

    & span:nth-child(3) {
      display: none;
    }
  }
}

/* ---------- Facts ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(56px, 7vw, 80px);
  border-block: 1px solid var(--border);
}

.fact {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 24px 24px 24px 0;

  & + & {
    padding-left: 24px;
    border-left: 1px solid var(--border);
  }

  & strong {
    min-width: 0;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 20px;
    letter-spacing: -0.01em;
    overflow-wrap: break-word;
  }

  & span {
    min-width: 0;
    font-size: 14px;
    color: var(--muted);
    overflow-wrap: break-word;
  }
}

@media (width < 760px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .fact:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}

@media (width < 480px) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .fact {
    padding-inline: 0;
  }

  .fact + .fact {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(80px, 10vw, 128px);
}

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

.section-head {
  max-width: 680px;
  margin-bottom: clamp(40px, 5vw, 64px);

  & h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.015em;
  }

  & > p:not(.kicker) {
    margin-top: 18px;
    font-size: 17px;
    color: var(--muted);
  }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);

  &::before {
    content: "";
    inline-size: 18px;
    block-size: 1px;
    background: currentColor;
  }
}

/* ---------- Features ---------- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 6vw, 80px);
}

.feature {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 8px;
  padding-block: 28px;
  border-top: 1px solid var(--border);

  & h3 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.005em;
  }

  & p {
    grid-column: 2;
    margin-top: 8px;
    color: var(--muted);
    font-size: 15px;
  }
}

.f-no {
  grid-row: span 2;
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
}

@media (width < 760px) {
  .feature-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Deep dives ---------- */
.dives {
  display: grid;
  gap: clamp(80px, 10vw, 128px);
}

.dive {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);

  &.reverse .dive-text {
    order: 2;
  }
}

.dive-text {
  & h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(30px, 3.6vw, 40px);
    line-height: 1.18;
    letter-spacing: -0.015em;
  }

  & > p:not(.kicker) {
    margin-top: 18px;
    color: var(--muted);
  }
}

.checks {
  display: grid;
  gap: 12px;
  margin-top: 22px;

  & li {
    position: relative;
    padding-left: 26px;
    color: var(--text-2);

    &::before {
      content: "";
      position: absolute;
      left: 2px;
      top: 0.55em;
      inline-size: 11px;
      block-size: 6px;
      border-left: 1.5px solid var(--accent);
      border-bottom: 1.5px solid var(--accent);
      rotate: -45deg;
    }
  }
}

.dive-visual {
  display: grid;
  place-content: center;
  min-height: 320px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.flow-visual {
  justify-items: center;
}

.flow-node {
  display: grid;
  gap: 2px;
  min-width: 220px;
  padding: 14px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  text-align: center;

  & span {
    font-weight: 500;
  }

  & small {
    font-size: 12px;
    color: var(--muted);
  }

  &.db {
    border-color: var(--text);

    & span {
      font-family: var(--mono);
      font-size: 14px;
    }
  }
}

.flow-line {
  inline-size: 1px;
  block-size: 28px;
  background: repeating-linear-gradient(to bottom, var(--border-strong) 0 4px, transparent 4px 8px);
}

.chat-visual {
  gap: 12px;
  align-content: center;
  place-content: stretch;
  font-size: 14px;

  & .bubble {
    max-width: 88%;

    &.bot {
      justify-self: start;
    }

    &.user {
      justify-self: end;
    }
  }
}

.share-card {
  display: grid;
  gap: 14px;
  min-width: min(340px, 100%);
  padding: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
}

.share-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.ok-dot {
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: #4f8a5b;
}

.share-link {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--tint);
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.share-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
  color: var(--muted);
}

@media (width < 880px) {
  .dive {
    grid-template-columns: minmax(0, 1fr);

    &.reverse .dive-text {
      order: 0;
    }
  }

  .dive-visual {
    min-height: 260px;
  }
}

/* ---------- Workflow ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  padding-top: 20px;
  border-top: 1px solid var(--text);

  & h3 {
    margin-top: 14px;
    font-size: 17px;
    font-weight: 600;
  }

  & p {
    margin-top: 6px;
    font-size: 14px;
    color: var(--muted);
  }
}

.step-no {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  color: var(--faint);
}

@media (width < 960px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 40px;
  }
}

@media (width < 560px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Providers ---------- */
.providers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  border-top: 1px solid var(--border-strong);
  border-left: 1px solid var(--border-strong);

  & li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-right: 1px solid var(--border-strong);
    border-bottom: 1px solid var(--border-strong);
    font-size: 15px;
    color: var(--text-2);
    transition: background-color 0.15s;

    & img,
    & .mono-icon {
      filter: grayscale(1);
      opacity: 0.75;
      transition: filter 0.2s, opacity 0.2s;
    }

    &:hover {
      background: var(--bg);

      & img,
      & .mono-icon {
        filter: none;
        opacity: 1;
      }
    }
  }
}

.mono-icon {
  inline-size: 22px;
  block-size: 22px;
  flex-shrink: 0;
  background-color: currentColor;
  mask: var(--src) no-repeat center / contain;
  -webkit-mask: var(--src) no-repeat center / contain;
}

.fine {
  margin-top: 20px;
  font-size: 13px;
  color: var(--faint);

  &.center {
    text-align: center;
  }
}

/* ---------- Download ---------- */
.release-date,
.source-note {
  color: var(--muted);
}

.recommend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 32px;
  margin-bottom: 24px;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-ink);

  & > div {
    min-width: 0;
    flex: 1 1 240px;
  }

  &[hidden] {
    display: none;
  }

  & h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 26px;
    letter-spacing: -0.01em;
  }

  & .btn {
    background: var(--on-ink);
    color: var(--ink);

    &:hover {
      background: color-mix(in srgb, var(--on-ink) 88%, var(--ink));
    }
  }
}

.recommend-kicker {
  margin-bottom: 4px;
  font-size: 13px;
  opacity: 0.65;
}

.recommend-meta {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.65;
}

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

.platform {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);

  &.is-current {
    border-color: var(--text);

    & .p-current {
      display: inline-block;
    }
  }
}

.p-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;

  & > div {
    min-width: 0;
  }

  & h3 {
    font-size: 18px;
    font-weight: 600;
  }

  & p {
    font-size: 13px;
    color: var(--muted);
  }
}

.p-logo {
  inline-size: 28px;
  block-size: 28px;
  flex-shrink: 0;
}

.p-current {
  display: none;
  margin-left: auto;
  align-self: flex-start;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 1px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.assets {
  display: grid;
  gap: 8px;
}

.asset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s, background-color 0.15s;

  &:is(a):hover {
    border-color: var(--border-strong);
    background: var(--tint);

    & .asset-cta {
      color: var(--text);
    }
  }

  &.skeleton {
    height: 58px;
    background: var(--tint);
    border-color: transparent;
  }

  &.unavailable {
    border-style: dashed;
  }
}

.asset-main {
  display: grid;
  min-width: 0;
}

.asset-name {
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.asset-meta {
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-cta {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--muted);
  transition: color 0.15s;
}

.p-tip {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .asset.skeleton {
    animation: pulse 1.4s ease-in-out infinite;
  }

  @keyframes pulse {
    50% {
      opacity: 0.55;
    }
  }
}

@media (width < 960px) {
  .platforms {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- FAQ ---------- */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;

  & .section-head {
    margin-bottom: 0;
  }
}

.faq {
  border-top: 1px solid var(--border-strong);

  & details {
    border-bottom: 1px solid var(--border-strong);
  }

  & summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 0;
    list-style: none;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;

    &::-webkit-details-marker {
      display: none;
    }

    /* Plus that turns into a minus; sits before the label for easier scanning. */
    &::before {
      content: "";
      inline-size: 12px;
      block-size: 12px;
      flex-shrink: 0;
      background:
        linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat,
        linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
      color: var(--muted);
    }

    &:hover {
      color: var(--accent);
    }
  }

  & details[open] > summary::before {
    background: linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat;
  }

  & details p {
    padding: 0 0 24px 26px;
    color: var(--muted);
  }

  & details::details-content {
    interpolate-size: allow-keywords;
    overflow: clip;
    contain: layout;
  }

  & details:not([open])::details-content {
    block-size: 0;
  }

  @media (prefers-reduced-motion: no-preference) {
    & details::details-content {
      transition: block-size, content-visibility, display;
      transition-duration: 0.28s;
      transition-timing-function: var(--ease);
      transition-behavior: allow-discrete;
    }
  }
}

@media (width < 880px) {
  .faq-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- CTA ---------- */
.cta {
  padding-block: clamp(80px, 10vw, 120px);
  background: var(--ink);
  color: var(--on-ink);
}

.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: end;
  gap: 40px;

  & h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(36px, 5.2vw, 60px);
    line-height: 1.1;
    letter-spacing: -0.02em;
  }
}

.cta-side {
  display: grid;
  justify-items: start;
  gap: 24px;

  & p {
    font-size: 17px;
    opacity: 0.7;
  }
}

@media (width < 760px) {
  .cta-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 32px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 28px;

  & .brand {
    color: var(--text);
    font-size: 15px;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-left: auto;

  & a:hover {
    color: var(--text);
  }
}

/* ---------- Scroll reveal (decorative, progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-in {
      from {
        opacity: 0;
        transform: translateY(16px);
      }
    }

    .reveal {
      animation: reveal-in linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 50%;
    }
  }
}
