:root {
  --night: #111212;
  --paper: #f8f8f6;
  --ink: #21211e;
  --muted: #63645d;
  --edge: #d8d8d1;
  --amber: #efba6c;
  --type:
    "Instrument Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-family: var(--type);
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}
* {
  box-sizing: border-box;
}
body,
figure,
fieldset,
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
img {
  display: block;
}
a:focus-visible,
summary:focus-visible,
.choices input:focus-visible + span {
  outline: 3px solid #bb7513;
  outline-offset: 4px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 10px;
  top: 10px;
  z-index: 5;
  background: white;
  padding: 8px;
}
.frame {
  width: min(1240px, 88%);
  margin-inline: auto;
}
header,
.hero,
footer {
  background: var(--night);
  color: #f8f7f2;
}
.mast,
footer .frame {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mast {
  min-height: 70px;
  border-bottom: 1px solid #ffffff24;
}
.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 26px;
  font-weight: 725;
  letter-spacing: -0.07em;
  text-decoration: none;
}
.mast nav {
  display: flex;
  gap: 30px;
}
.mast nav a,
footer a {
  text-decoration: none;
}
.mast nav a {
  color: #d6d6d2;
  font-size: 14px;
}
.mast nav a:hover,
footer a:hover {
  color: var(--amber);
}
.hero {
  overflow: hidden;
}
.opening {
  position: relative;
  isolation: isolate;
  min-height: clamp(475px, 36vw, 575px);
  display: flex;
  align-items: center;
}
.hero-art {
  position: absolute;
  z-index: -1;
  inset: 0 -5% 0 36%;
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    transparent,
    black 17%,
    black 92%,
    transparent
  );
}
.hero-art img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  object-position: center;
  mask-image: linear-gradient(
    to bottom,
    transparent,
    black 9%,
    black 93%,
    transparent
  );
}
.lead {
  padding: 48px 0 43px;
  width: 42%;
}
.edition {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13px;
  color: #e1d6bf;
  font-weight: 600;
}
.edition b {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  letter-spacing: 0.02em;
  border: 1px solid #7b6e53;
  border-radius: 999px;
  color: #efd5a8;
}
h1 {
  font-size: clamp(54px, 5vw, 78px);
  line-height: 1.1;
  letter-spacing: -0.06em;
  margin: 18px 0 16px;
  font-weight: 690;
}
.intro {
  font-size: 16px;
  line-height: 1.8;
  max-width: 370px;
  color: #c8c7c1;
  text-wrap: pretty;
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  margin: 24px 0 12px;
}
.primary,
.dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 630;
  font-size: 14px;
}
.primary {
  padding: 13px 19px;
  background: #f7f4ec;
  color: #1e201e;
}
.primary:hover {
  background: #f4d399;
}
.download-icon {
  line-height: 1;
  border-bottom: 1.5px solid;
  font-size: 15px;
  padding: 0 2px 1px;
}
.guide-link {
  text-decoration: none;
  font-size: 14px;
}
.guide-link span {
  margin-left: 3px;
  color: var(--amber);
}
.guide-link:hover {
  text-decoration: underline;
}
.platform-note {
  font-size: 12px;
  color: #b9bab1;
}
.section {
  padding-block: clamp(46px, 5vw, 76px);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 25px;
}
h2 {
  font-size: clamp(32px, 3.3vw, 50px);
  letter-spacing: -0.065em;
  line-height: 1.2;
  font-weight: 670;
}
.section-head p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}
.minor,
.download-foot,
footer {
  font-size: 13px;
}
.minor:hover,
.download-foot a:hover,
details a:hover {
  color: #86521d;
}
.picker fieldset {
  padding: 0;
  border: 0;
  margin-bottom: 17px;
}
legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 650;
}
.panel-title {
  grid-column: 1 / -1;
  font-size: 16px;
  margin-bottom: 18px;
}
.choices {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: 10px;
  background: #eaeae5;
}
.choices label {
  position: relative;
  cursor: pointer;
}
.choices input {
  position: absolute;
  opacity: 0;
}
.choices span {
  display: block;
  border-radius: 7px;
  padding: 9px 15px;
  font-size: 13px;
  color: #50524b;
}
.choices input:checked + span {
  color: white;
  background: #292a27;
  font-weight: 620;
}
.panel {
  border-block: 1px solid var(--edge);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding-block: 25px;
}
/* Without relational selectors, show all labeled packages and both guides. */

@supports selector(:has(*)) {
  .picker:has(:is(#win64,#winarm,#mac64,#macarm):checked) .panel { display: none; }
  .picker:has(:is(#route-codex,#route-claude):checked) .panel { grid-template-columns: repeat(2,minmax(0,1fr)); }
  main:has(#route-codex:checked) :is(.pkg-claude, .for-claude),
  main:has(#route-claude:checked) :is(.pkg-codex, .for-codex),
  main:has(:is(#win64,#winarm):checked) .os-guide.mac,
  main:has(:is(#mac64,#macarm):checked) .os-guide.windows { display: none; }
  .picker:has(#win64:checked) #packages-win64,
  .picker:has(#winarm:checked) #packages-winarm,
  .picker:has(#macarm:checked) #packages-macarm,
  .picker:has(#mac64:checked) #packages-mac64 { display: grid; }
}
.pkg {
  display: grid;
  align-content: start;
  justify-items: start;
  padding: 4px clamp(18px, 2.5vw, 42px);
  border-left: 1px solid var(--edge);
}
.pkg:first-of-type {
  border-left: 0;
  padding-left: 0;
}
.pkg-icon {
  height: 44px;
  width: 44px;
  margin-bottom: 15px;
}
.pkg-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pkg h4 {
  margin: 0;
  font-size: clamp(22px, 2.1vw, 32px);
  font-weight: 640;
  letter-spacing: -0.055em;
  line-height: 1.2;
}
.pkg p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
  margin: 8px 0 12px;
}
.pkg small {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.dl {
  margin-top: 17px;
  padding: 9px 15px;
  border: 1px solid #bbbcb3;
  color: var(--ink);
}
.dl span {
  font-size: 16px;
  line-height: 1;
}
.dl:hover {
  background: #e4e4dd;
}
.pkg-aipro .dl {
  background: #262723;
  color: white;
  border-color: #262723;
}
.pkg-aipro .dl:hover {
  background: #47473d;
}
.download-foot {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 14px;
  color: var(--muted);
}
.guide-band {
  background: #eaeae5;
}
.routes { gap: 4px; }
.routes strong { display: block; font-size: 16px; margin-top: 3px; }
.choices.routes span { padding: 12px 20px; }
.picker fieldset + fieldset { margin-top: 22px; }
.architecture { max-width: 640px; margin: 0 0 12px; }
.architecture summary, .inline-help summary {
  justify-content: flex-start; padding: 7px 0; color: #73501d; font-size: 14px;
}
.architecture p, .inline-help p { padding: 4px 0 8px; }
.lesson {
  display: grid; grid-template-columns: minmax(180px, .7fr) minmax(0, 1.65fr);
  gap: clamp(22px, 5vw, 84px); padding: 32px 0;
  border-top: 1px solid #c7c8c0;
}
.lesson:last-child { padding-bottom: 0; }
.step { color: #6b521e; font-size: 13px; font-weight: 650; }
.lesson h3 { margin-top: 7px; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.3; }
.instruction { line-height: 1.8; max-width: 78ch; }
.instruction ol { margin: 0 0 12px; padding-left: 1.6em; }
.instruction li { padding-left: .2em; margin-bottom: 6px; }
.instruction li::marker { color: #74531e; font-weight: bold; }
.os-guide h4 { font-size: 17px; margin-bottom: 8px; }
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.figures, .wide-shot { margin: 16px 0; }
.figures figure, .wide-shot { min-width: 0; }
.figures a, .wide-shot a {
  background: #deded7; border-radius: 10px; display: grid; place-items: center;
  padding: 14px; cursor: zoom-in;
}
.figures img { max-width: 100%; width: auto; height: 210px; object-fit: contain; }
.wide-shot img { width: 100%; height: auto; }
figcaption { margin-top: 5px; font-size: 13px; color: #51534b; }
blockquote {
  margin: 12px 0; border-left: 3px solid #a37a37; background: #faf9f5;
  padding: 10px 16px; font-weight: 600;
}
.states { margin: 14px 0; }
.states div {
  display: grid; grid-template-columns: 12em 1fr; gap: 12px; padding: 9px 0;
  border-top: 1px solid #cecec6;
}
.states dt { font-weight: 650; }
.states dd { margin: 0; }
details p { font-size: 14px; line-height: 1.85; color: #50524d; }
.faq {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 30px;
}
.answers details {
  border-bottom: 1px solid var(--edge);
}
.answers details:first-child {
  border-top: 1px solid var(--edge);
}
summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 19px 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: #696b61;
}
details[open] summary::after {
  content: "−";
}
details p {
  padding-bottom: 20px;
}
footer .frame {
  gap: 16px;
  min-height: 86px;
}
footer .frame > span {
  color: #c2c2b9;
}
footer .frame > a:last-child {
  margin-left: auto;
}
@media (max-width: 820px) {
  .frame {
    width: 90%;
  }
  .lead {
    width: 47%;
  }
  .hero-art {
    left: 38%;
    right: -10%;
  }
  .pkg {
    padding-inline: 16px;
  }
  .pkg p {
    min-height: 3.3em;
  }
}
@media (max-width: 650px) {
  .frame {
    width: calc(100% - 36px);
  }
  .mast {
    min-height: 60px;
  }
  .mast nav {
    gap: 13px;
  }
  .mast nav a {
    font-size: 12px;
  }
  .brand {
    font-size: 23px;
    gap: 6px;
  }
  .brand img {
    width: 26px;
    height: 26px;
  }
  .opening {
    display: grid;
    min-height: auto;
  }
  .lead {
    padding: 34px 0 0;
    width: 100%;
  }
  h1 {
    font-size: clamp(47px, 10vw, 61px);
    margin: 15px 0 12px;
  }
  .intro {
    font-size: 14px;
    max-width: 33em;
  }
  .actions {
    margin: 17px 0 9px;
  }
  .hero-art {
    position: relative;
    inset: auto;
    grid-row: 2;
    width: calc(100% + 36px);
    margin-left: -18px;
    height: clamp(190px, 50vw, 280px);
    mask-image: linear-gradient(
      90deg,
      transparent,
      black 14%,
      black 86%,
      transparent
    );
  }
  .hero-art img {
    object-fit: contain;
    mask-image: linear-gradient(
      to bottom,
      transparent,
      black 10%,
      black 93%,
      transparent
    );
  }
  .section {
    padding-block: 36px;
  }
  .section-head {
    align-items: start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
  }
  .choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .choices span {
    text-align: center;
  }
  .panel {
    grid-template-columns: 1fr;
    padding-block: 0;
  }
  .pkg,
  .pkg:first-of-type {
    padding: 16px 0;
    border-left: none;
    grid-template-columns: 38px 1fr;
    column-gap: 12px;
  }
  .pkg + .pkg {
    border-top: 1px solid var(--edge);
  }
  .pkg-icon {
    grid-row: 1/3;
    width: 36px;
    height: 36px;
    margin: 0;
  }
  .pkg h4,
  .pkg p,
  .pkg small,
  .pkg .dl {
    grid-column: 2;
  }
  .pkg p {
    min-height: 0;
    margin: 4px 0 7px;
  }
  .pkg .dl {
    margin-top: 10px;
  }
  .download-foot {
    flex-wrap: wrap;
    gap: 7px;
  }
  .lesson, .faq { grid-template-columns: 1fr; gap: 16px; }
  .lesson { padding-block: 24px; }
  .states div { grid-template-columns: 1fr; gap: 0; }
  .figures img { height: 145px; }
  .panel-title { margin: 12px 0 0; }
  .choices.routes span { padding: 10px; }
  .routes strong { font-size: 14px; }

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

.hero .lead { width: min(620px, 59%); }
.quick-download {
  margin-top: 20px;
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: #151615;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.quick-download caption { text-align: left; font-weight: 650; margin-bottom: 8px; }
.quick-download th, .quick-download td { padding: 4px 5px; border-bottom: 1px solid #48483f; }
.quick-download thead th { color: #cbc9bd; font-size: 12px; font-weight: 500; }
.quick-download tbody th { font-weight: 550; }
.quick-download a {
  display: block; text-align: center; white-space: nowrap;
  color: #f6f3eb; background: #333531; border-radius: 5px;
  text-decoration: none; padding: 8px 4px;
}
.quick-download td:first-of-type a { background: #e5ce9f; color: #211e18; font-weight: 650; }
.quick-download a:hover { background: #53554b; }
.quick-download td:first-of-type a:hover { background: #f5dfa9; }
.hero-art { left: 48%; }
@media (max-width: 820px) {
  .hero .lead { width: min(550px, 74%); }
  .hero-art { left: 61%; }
}
@media (max-width: 650px) {
  .hero .lead { width: 100%; }
  .hero-art { left: auto; }
  .quick-download { font-size: 12px; }
  .quick-download th, .quick-download td { padding: 4px 2px; }
  .quick-download a { padding: 9px 2px; }
  .picker:has(:is(#route-codex,#route-claude):checked) .panel { grid-template-columns: 1fr; }
}
