:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-strong: #eef5ff;
  --text: #141923;
  --muted: #5d6a7c;
  --line: #dfe6ef;
  --blue: #1769ff;
  --blue-deep: #0f4fc4;
  --green: #12a66a;
  --amber: #f2b84b;
  --red: #ec625f;
  --shadow: 0 24px 70px rgba(20, 25, 35, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(23, 105, 255, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(18, 166, 106, 0.08), transparent 30%), var(--bg);
}

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

.site-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--text);
  box-shadow: 0 10px 24px rgba(20, 25, 35, 0.18);
}

.text-link {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.text-link:hover {
  color: var(--blue);
}

.hero,
.affiliate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: center;
  margin-top: 56px;
}

.compact-hero {
  min-height: 460px;
}

.hero-copy,
.affiliate-panel,
.info-panel,
.visual-card {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 1.03;
  letter-spacing: 0;
}

.affiliate-panel h1 {
  font-size: clamp(34px, 6vw, 64px);
}

.lead {
  max-width: 650px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 800;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

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

.button.primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 16px 34px rgba(23, 105, 255, 0.24);
}

.button.primary:hover {
  background: var(--blue-deep);
}

.button.secondary {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}

.button.is-disabled {
  color: #7a8493;
  background: #e7ecf3;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.visual-card,
.info-panel,
.affiliate-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.visual-card {
  display: grid;
  min-height: 360px;
  place-items: center;
  padding: 34px;
}

.visual-card img {
  width: min(360px, 100%);
  height: auto;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.resource-card {
  display: grid;
  gap: 10px;
  min-height: 156px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(20, 25, 35, 0.06);
}

.resource-card:hover {
  border-color: rgba(23, 105, 255, 0.45);
}

.resource-card.muted {
  color: #778293;
}

.resource-kicker {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.resource-card strong {
  font-size: 20px;
}

.resource-card span:last-child {
  color: var(--muted);
  line-height: 1.65;
}

.affiliate-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: stretch;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: stretch;
  margin-top: 56px;
}

.affiliate-panel,
.tool-panel {
  padding: 42px;
}

.notice {
  margin-top: 26px;
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  padding: 18px 18px 18px 20px;
  background: #fff8e7;
}

.notice strong {
  display: block;
  margin-bottom: 8px;
}

.notice p {
  margin: 0;
  color: #566172;
  line-height: 1.75;
}

.status-text {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.status-text.is-error {
  color: var(--red);
}

.info-panel,
.tool-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  background:
    linear-gradient(180deg, var(--surface-strong), #fff 54%),
    var(--surface);
}

.tool-panel,
.tool-side {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.command-box {
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid #cfd9e7;
  border-radius: 8px;
  background: #111827;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.16);
}

.command-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px 12px 18px;
  color: #d9e5f6;
  background: #1f2937;
  font-weight: 800;
}

.copy-button {
  min-width: 82px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.copy-button:hover {
  background: var(--blue-deep);
}

.code-line {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  color: #e8f0ff;
  font-size: 16px;
  line-height: 1.7;
  white-space: pre;
}

.code-line code {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.info-visual {
  width: 100%;
  max-width: 300px;
  align-self: center;
  margin: 6px 0 26px;
}

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

.quick-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.quick-list span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quick-list strong {
  display: block;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .site-shell {
    width: min(100% - 28px, 680px);
    padding-bottom: 34px;
  }

  .hero,
  .affiliate-layout,
  .tool-layout {
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .compact-hero {
    min-height: 0;
  }

  h1,
  .affiliate-panel h1,
  .tool-panel h1 {
    font-size: 42px;
    line-height: 1.08;
  }

  .lead {
    font-size: 17px;
  }

  .visual-card {
    min-height: 260px;
    padding: 24px;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .affiliate-panel,
  .tool-panel {
    padding: 28px;
  }

  .info-panel,
  .tool-side {
    padding: 22px;
  }
}

@media (max-width: 480px) {
  .site-shell {
    width: min(100% - 22px, 440px);
  }

  .topbar {
    align-items: flex-start;
  }

  h1,
  .affiliate-panel h1 {
    font-size: 34px;
  }

  .actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .visual-card,
  .affiliate-panel,
  .info-panel,
  .tool-panel,
  .tool-side,
  .resource-card {
    border-radius: 8px;
  }

  .command-header {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-button {
    width: 100%;
  }

  .code-line {
    padding: 18px;
    font-size: 14px;
  }
}

.xui-page {
  min-height: 100vh;
  color: #f2f2f2;
  background:
    radial-gradient(circle at 20% 0%, rgba(23, 105, 255, 0.16), transparent 30%),
    #171717;
}

.xui-shell {
  width: min(1420px, calc(100% - 72px));
  margin: 0 auto;
  padding: 28px 0 76px;
}

.xui-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
}

.xui-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f4f4f5;
  font-weight: 800;
}

.xui-page .brand-mark {
  color: #151515;
  background: #f6f6f6;
  box-shadow: none;
}

.xui-home-link {
  color: #b8b8b8;
  font-size: 15px;
  font-weight: 700;
}

.xui-home-link:hover {
  color: #ffffff;
}

.xui-doc {
  width: min(1220px, 100%);
  margin-top: 72px;
}

.single-command-doc {
  width: min(1040px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.xui-kicker {
  margin: 0 0 14px;
  color: #a6a6a6;
  font-size: 14px;
  font-weight: 800;
}

.xui-doc h1 {
  max-width: 1100px;
  color: #ffffff;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.12;
}

.single-command-doc h1 {
  max-width: 760px;
}

.xui-intro {
  max-width: 760px;
  margin: 22px 0 0;
  color: #b9b9b9;
  font-size: 19px;
  line-height: 1.8;
}

.doc-step {
  margin-top: 52px;
}

.single-command-section {
  margin-top: 42px;
}

.doc-step h2 {
  margin: 0 0 20px;
  color: #f1f1f1;
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.25;
  font-weight: 800;
}

.notion-code-block {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  background: #222222;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.notion-code-block pre {
  margin: 0;
  padding: 64px 36px 42px;
  overflow-x: auto;
  color: #f1f1f1;
  font-size: clamp(17px, 2vw, 26px);
  line-height: 1.9;
  white-space: pre;
}

.single-command-doc .notion-code-block pre {
  font-size: clamp(14px, 1.45vw, 18px);
}

.notion-code-block code {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.code-toolbar {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0 10px 0 16px;
  color: #8f8f8f;
  background: rgba(34, 34, 34, 0.88);
  backdrop-filter: blur(12px);
}

.notion-copy-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0 6px 0 14px;
  color: #bdbdbd;
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.notion-copy-button:hover,
.notion-copy-button.is-copied {
  color: #ffffff;
}

.copy-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
}

.copy-icon::before,
.copy-icon::after {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 3px;
  content: "";
}

.copy-icon::before {
  left: 1px;
  top: 1px;
  opacity: 0.55;
}

.copy-icon::after {
  left: 5px;
  top: 5px;
}

.xui-copy-status {
  min-height: 26px;
  margin: 22px 0 0;
  color: #a6d7b2;
  font-size: 15px;
  line-height: 1.7;
}

.xui-copy-status.is-error {
  color: #ff9b9b;
}

.xui-note {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin-top: 36px;
  border-left: 4px solid #e7c967;
  border-radius: 10px;
  padding: 18px 20px;
  color: #cfcfcf;
  background: rgba(255, 255, 255, 0.06);
}

.xui-note strong {
  color: #ffffff;
}

@media (max-width: 760px) {
  .xui-shell {
    width: min(100% - 28px, 620px);
    padding-bottom: 42px;
  }

  .xui-doc {
    margin-top: 42px;
  }

  .xui-doc h1 {
    font-size: 42px;
  }

  .xui-intro {
    font-size: 17px;
  }

  .doc-step {
    margin-top: 38px;
  }

  .doc-step h2 {
    font-size: 25px;
  }

  .notion-code-block pre {
    padding: 74px 22px 28px;
    font-size: 15px;
    line-height: 1.85;
  }

  .code-toolbar {
    left: 12px;
    right: 12px;
    justify-content: space-between;
  }
}
