:root {
  color-scheme: dark;
  --night: #05080c;
  --night-soft: #090e13;
  --paper: #edf2f5;
  --mist: #b3bec6;
  --quiet: #84919a;
  --rule: rgba(222, 237, 247, .18);
  --rule-bright: rgba(222, 237, 247, .38);
  --signal: #dcebf2;
  --warning: #e6d3ae;
  --font: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--night); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(ellipse at 78% 14%, rgba(126, 155, 174, .08), transparent 32rem),
    linear-gradient(180deg, #080d12 0%, var(--night) 66%);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 350;
  line-height: 1.7;
  letter-spacing: .012em;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .24em; }
a:hover { color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}
button, input { font: inherit; }
[hidden] { display: none !important; }
.masthead {
  width: min(100% - 3rem, 1180px);
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-inline: auto;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  font-size: .69rem;
  font-weight: 500;
  letter-spacing: .4em;
  text-decoration: none;
}
.glyph {
  position: relative;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(232, 243, 250, .65);
  border-radius: 50%;
}
.glyph::before, .glyph::after {
  position: absolute;
  left: 50%;
  width: 1px;
  content: "";
  background: rgba(232, 243, 250, .7);
  transform: translateX(-50%);
}
.glyph::before { top: -5px; height: 12px; }
.glyph::after { bottom: -5px; height: 12px; }
.glyph i { position: absolute; top: 50%; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--signal); transform: translate(-50%, -50%); }
.masthead-note, .eyebrow, .micro {
  color: var(--quiet);
  font-size: .64rem;
  font-weight: 450;
  letter-spacing: .25em;
  line-height: 1.6;
  text-transform: uppercase;
}
.masthead-note { margin: 0; }
.page-shell {
  width: min(100% - 3rem, 1080px);
  min-height: calc(100vh - 166px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, .72fr);
  align-items: center;
  gap: clamp(3rem, 9vw, 9rem);
  margin-inline: auto;
  padding-block: clamp(4.5rem, 10vh, 8rem);
}
.page-copy { max-width: 600px; }
.eyebrow { margin: 0 0 1.3rem; color: #c1ccd3; }
h1, h2 { margin: 0; font-weight: 300; letter-spacing: -.035em; line-height: 1.12; }
h1 { max-width: 11ch; font-size: clamp(3rem, 6vw, 5.8rem); }
.lede { max-width: 43ch; margin: 1.6rem 0 0; color: var(--mist); font-size: 1.05rem; line-height: 1.85; }
.support-copy { margin-top: 1.5rem; color: var(--quiet); font-size: .86rem; }
.purchase-panel {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--rule-bright);
  background: rgba(9, 14, 19, .68);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .18);
}
.panel-index { margin: 0 0 2rem; color: var(--quiet); font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; }
.book-title { margin: 0; font-size: 1.1rem; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; }
.book-series { margin: .35rem 0 1.8rem; color: var(--quiet); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; }
.price { margin: 0; color: var(--paper); font-size: 1.65rem; font-weight: 300; letter-spacing: .025em; }
.price-note { margin: .25rem 0 1.6rem; color: var(--quiet); font-size: .78rem; }
.consent {
  display: grid;
  grid-template-columns: 19px 1fr;
  align-items: start;
  gap: .8rem;
  margin: 1.3rem 0 1.2rem;
  color: var(--mist);
  font-size: .86rem;
  line-height: 1.65;
}
.consent input { width: 17px; height: 17px; margin: .2rem 0 0; accent-color: #dcebf2; }
.consent a, .policy-link { color: #e0e9ee; }
.primary-action {
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(232, 243, 250, .68);
  padding: .8rem 1rem;
  color: var(--paper);
  background: rgba(220, 239, 249, .055);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, opacity .2s ease;
}
.primary-action:hover:not(:disabled) { border-color: #f1f8fb; background: rgba(220, 239, 249, .12); }
.primary-action:disabled { opacity: .42; cursor: not-allowed; }
.status-message {
  min-height: 1.7em;
  margin: .9rem 0 0;
  color: var(--mist);
  font-size: .84rem;
}
.status-message[data-kind="error"], .status-message[data-kind="warning"] { color: var(--warning); }
.status-message[data-kind="success"] { color: #d6e5dd; }
.quiet-note {
  margin: 1.5rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  color: var(--quiet);
  font-size: .78rem;
  line-height: 1.75;
}
.test-notice {
  margin: 1rem 0 0;
  padding: .9rem 1rem;
  border-left: 1px solid var(--warning);
  color: var(--warning);
  background: rgba(230, 211, 174, .055);
  font-size: .79rem;
  line-height: 1.65;
}
.page-footer {
  width: min(100% - 3rem, 1180px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-inline: auto;
  padding: 1.1rem 0 1.7rem;
  border-top: 1px solid var(--rule);
  color: var(--quiet);
  font-size: .72rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-links a { color: var(--mist); }
.order-shell {
  width: min(100% - 3rem, 720px);
  min-height: calc(100vh - 166px);
  margin-inline: auto;
  padding-block: clamp(5rem, 13vh, 10rem);
}
.order-shell h1 { max-width: 13ch; }
.order-panel {
  margin-top: 3rem;
  padding: clamp(1.4rem, 4vw, 2.3rem);
  border: 1px solid var(--rule-bright);
  background: rgba(9, 14, 19, .68);
}
.state-label { display: flex; align-items: center; gap: .7rem; margin: 0 0 1rem; color: var(--signal); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; }
.state-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.order-message { margin: 0; color: var(--mist); line-height: 1.8; }
.reference { margin: 1.6rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.reference dt { color: var(--quiet); font-size: .63rem; letter-spacing: .2em; text-transform: uppercase; }
.reference dd { margin: .4rem 0 0; color: var(--paper); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .9rem; overflow-wrap: anywhere; }
.order-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.7rem; }
.text-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: .5rem .15rem;
  border: 0;
  color: var(--mist);
  background: transparent;
  font-size: .68rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  cursor: pointer;
}
.text-action:hover { color: var(--paper); }
.text-action:disabled { opacity: .45; cursor: not-allowed; }
.order-test { margin-top: 1.2rem; }
.order-delivery { margin-top: 1.55rem; padding-top: 1.35rem; border-top: 1px solid var(--rule); }
.delivery-state { margin: 0; color: var(--mist); font-size: .84rem; line-height: 1.75; }
.delivery-details { display: grid; gap: .65rem; margin: 1rem 0 0; }
.delivery-details > div { display: grid; grid-template-columns: minmax(9rem, .7fr) minmax(0, 1fr); gap: .8rem; padding-top: .65rem; border-top: 1px solid var(--rule); }
.delivery-details dt { color: var(--quiet); font-size: .63rem; letter-spacing: .14em; text-transform: uppercase; }
.delivery-details dd { margin: 0; color: var(--paper); font-size: .77rem; overflow-wrap: anywhere; }
.download-action { margin-top: 1.2rem; }
.download-message { margin-top: .7rem; }
.order-message[data-kind="error"] { color: var(--warning); }
.order-message[data-kind="success"] { color: #d6e5dd; }
.skeleton {
  overflow: hidden;
  position: relative;
  background: rgba(220, 239, 249, .055);
}
.skeleton::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(220,239,249,.075), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.6s ease-in-out infinite;
}
.skeleton-line { width: min(100%, 28rem); height: 1rem; margin-top: 1rem; }
.skeleton-line.short { width: min(65%, 17rem); }
@keyframes shimmer { to { transform: translateX(100%); } }

@media (max-width: 760px) {
  .masthead, .page-footer { width: min(100% - 2.2rem, 1180px); }
  .masthead { min-height: 72px; }
  .masthead-note { font-size: .55rem; text-align: right; }
  .page-shell { width: min(100% - 2.2rem, 600px); grid-template-columns: 1fr; gap: 2.7rem; padding-block: 4.5rem; }
  h1 { font-size: clamp(2.8rem, 12vw, 4.6rem); }
  .purchase-panel { padding: 1.45rem; }
  .page-footer { align-items: flex-start; flex-direction: column; padding-bottom: 1.2rem; }
  .order-shell { width: min(100% - 2.2rem, 720px); padding-block: 4.8rem; }
  .delivery-details > div { grid-template-columns: 1fr; gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
