:root {
  --canvas: #f3f4f1;
  --stock: #ffffff;
  --ink: #171815;
  --muted: #5a5d57;
  --quiet: #777a74;
  --rule: #d6d8d2;
  --rule-dark: #aeb1aa;
  --signal: #b83526;
  --signal-deep: #8f291e;
  --signal-wash: #f8ece9;
  --success: #216346;
  --danger: #8e2d26;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

html {
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
  scroll-behavior: smooth;
}

body.buyer-flow {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

.buyer-flow button,
.buyer-flow input,
.buyer-flow select {
  font: inherit;
}

.buyer-flow .topbar {
  width: 100%;
  height: 64px;
  padding: 0 max(24px, calc((100% - 1100px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  background: var(--stock);
}

.buyer-flow .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -.025em;
}

.buyer-flow .brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--signal);
  border-radius: 2px;
  background: var(--signal);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1;
}

.buyer-flow .top-note {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .015em;
}

.buyer-flow .shell {
  width: min(1100px, 100% - 48px);
  margin: 0 auto;
  padding: 34px 0 22px;
  display: grid;
  grid-template-columns: minmax(230px, .78fr) minmax(0, 1.52fr);
  gap: clamp(24px, 4vw, 46px);
  align-items: start;
}

.buyer-flow .edition-folio {
  position: sticky;
  top: 22px;
  align-self: start;
  min-width: 0;
  padding: 24px 24px 22px;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}

.buyer-flow .folio-kicker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .27);
  color: rgba(255, 255, 255, .76);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .11em;
}

.buyer-flow .folio-mark {
  color: #ed8577;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
}

.buyer-flow .edition-folio .eyebrow {
  margin: 24px 0 8px;
  color: #ef9386;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .14em;
}

.buyer-flow #edition-title {
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.buyer-flow .paper-cover {
  display: block;
  width: 100%;
  max-height: 360px;
  margin: 18px 0 0;
  object-fit: contain;
  object-position: left center;
  background: #fff;
}

.buyer-flow .paper-cover[hidden],
.buyer-flow .paper-cover.hidden {
  display: none !important;
}

.buyer-flow .paper-description {
  max-width: 38em;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 13px;
  line-height: 1.6;
}

.buyer-flow .paper-description:empty {
  display: none;
}

.buyer-flow .folio-rule {
  height: 1px;
  margin: 24px 0 14px;
  background: rgba(255, 255, 255, .27);
}

.buyer-flow .folio-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 0;
  color: rgba(255, 255, 255, .66);
  font-size: 9px;
  letter-spacing: .07em;
}

.buyer-flow .folio-meta strong {
  color: #fff;
  font-size: 10px;
  font-weight: 650;
  text-align: right;
}

.buyer-flow .purchase-card {
  min-width: 0;
  padding: 30px 34px 24px;
  border: 0;
  border-radius: 0;
  background: var(--stock);
  box-shadow: none;
}

.buyer-flow .notice {
  margin: 0 0 22px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--signal);
  background: #fafaf8;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.buyer-flow .notice.error-text {
  border-left-color: var(--danger);
  color: var(--danger);
}

.buyer-flow .flow-section {
  min-width: 0;
  margin: 0 0 23px;
  padding: 0 0 23px;
  border-bottom: 1px solid var(--rule);
}

.buyer-flow .step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin: 0 0 15px;
}

.buyer-flow .step:not(:first-child) {
  margin-top: 0;
}

.buyer-flow .step-num {
  width: 28px;
  height: auto;
  display: block;
  padding-top: 2px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--signal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}

.buyer-flow .step h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.buyer-flow .step p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.buyer-flow .field-label {
  min-width: 0;
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.4;
}

.buyer-flow .control {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin-top: 7px;
  padding: 11px 13px;
  border: 1px solid var(--rule-dark);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
}

.buyer-flow select.control {
  padding-right: 34px;
}

.buyer-flow .control::placeholder {
  color: #747771;
  opacity: 1;
}

.buyer-flow .control:focus,
.buyer-flow .control:focus-visible {
  border-color: var(--signal);
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  box-shadow: none;
}

.buyer-flow .format-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border-top: 1px solid var(--rule-dark);
  border-bottom: 1px solid var(--rule-dark);
  border-radius: 0;
  background: #fff;
}

.buyer-flow .format-option {
  position: relative;
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  align-items: center;
  justify-content: initial;
  gap: 4px 10px;
  padding: 14px 13px;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  cursor: pointer;
}

.buyer-flow .format-option + .format-option {
  border-left: 1px solid var(--rule);
}

.buyer-flow .format-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.buyer-flow .format-code {
  grid-row: 1 / span 2;
  min-width: 38px;
  color: var(--quiet);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
}

.buyer-flow .format-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.buyer-flow .format-option strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.25;
}

.buyer-flow .format-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.buyer-flow .format-option:has(input:checked) {
  box-shadow: inset 0 -3px var(--signal);
  color: var(--ink);
}

.buyer-flow .format-option:has(input:checked) .format-code {
  color: var(--signal);
}

.buyer-flow .format-option:has(input:disabled) {
  color: var(--quiet);
  cursor: not-allowed;
}

.buyer-flow .format-option:has(input:disabled) strong,
.buyer-flow .format-option:has(input:disabled) small {
  color: var(--quiet);
}

.buyer-flow .format-option:focus-within {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  z-index: 1;
}

.buyer-flow .period-grid {
  display: block;
}

.buyer-flow .period-year-group + .period-year-group {
  margin-top: 22px;
}

.buyer-flow .period-year {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.15;
}

.buyer-flow .period-calendar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule-dark);
  border-left: 1px solid var(--rule-dark);
}

.buyer-flow .period-choice {
  appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 7px 3px;
  border: 0;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: var(--stock);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 570;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 120ms ease-out, color 120ms ease-out, transform 120ms ease-out;
}

.buyer-flow .period-choice:hover:not(:disabled) {
  background: var(--signal-wash);
  color: var(--signal-deep);
}

.buyer-flow .period-choice:active:not(:disabled) {
  transform: scale(.98);
}

.buyer-flow .period-choice[aria-pressed="true"] {
  background: var(--signal);
  color: #fff;
  font-weight: 720;
  box-shadow: none;
}

.buyer-flow .period-choice[aria-pressed="true"]:hover:not(:disabled) {
  background: var(--signal-deep);
}

.buyer-flow .period-choice:focus-visible,
.buyer-flow a:focus-visible,
.buyer-flow button:focus-visible {
  position: relative;
  z-index: 2;
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.buyer-flow .period-choice:disabled,
.buyer-flow .period-choice.unavailable {
  background: #f1f2ef;
  color: #62655f;
  text-decoration: line-through;
  cursor: not-allowed;
}

.buyer-flow .period-selection-summary {
  margin-top: 10px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.buyer-flow .period-selection-summary.has-selection {
  color: var(--signal-deep);
  font-weight: 680;
}

.buyer-flow .details {
  border-color: var(--rule);
}

.buyer-flow .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 13px;
}

.buyer-flow .form-grid .full {
  grid-column: 1 / -1;
}

.buyer-flow #address-block.hidden {
  display: none !important;
}

.buyer-flow .final-section {
  margin-bottom: 16px;
  padding-bottom: 18px;
}

.buyer-flow .promo-row {
  margin: 0;
}

.buyer-flow .promo-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.buyer-flow .promo-input .control {
  min-width: 0;
}

.buyer-flow .button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: background-color 120ms ease-out, color 120ms ease-out, border-color 120ms ease-out, transform 120ms ease-out;
}

.buyer-flow .button:active:not(:disabled) {
  transform: translateY(1px);
}

.buyer-flow .button:disabled {
  background: #e7e8e4;
  color: #555851;
  cursor: not-allowed;
}

.buyer-flow .button-primary {
  min-height: 52px;
  border-color: var(--signal);
  background: var(--signal);
  color: #fff;
}

.buyer-flow .button-primary:hover:not(:disabled) {
  border-color: var(--signal-deep);
  background: var(--signal-deep);
}

.buyer-flow .button-light {
  min-height: 46px;
  border-color: var(--rule-dark);
  background: #fff;
  color: var(--ink);
}

.buyer-flow .button-light:hover:not(:disabled) {
  border-color: var(--signal);
  background: var(--signal-wash);
  color: var(--signal-deep);
}

.buyer-flow .field-hint {
  min-height: 0;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.buyer-flow .field-hint:empty {
  display: none;
}

.buyer-flow .field-hint.ok {
  color: var(--success);
}

.buyer-flow .field-hint.error {
  color: var(--danger);
}

.buyer-flow .checkout-dock {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--rule-dark);
}

.buyer-flow .summary {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.buyer-flow .summary-top {
  min-height: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.buyer-flow .old-price {
  color: var(--quiet);
  text-decoration: line-through;
}

.buyer-flow .price {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.12;
  font-variant-numeric: lining-nums tabular-nums;
}

.buyer-flow .price small {
  font-size: .6em;
  letter-spacing: 0;
}

.buyer-flow .price[data-state="quoted"] {
  color: var(--signal-deep);
}

.buyer-flow .summary-note {
  max-width: 40em;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.buyer-flow .checkout-dock > .button-primary {
  width: min(220px, 100%);
}

.buyer-flow .legal-note {
  max-width: 65em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.buyer-flow .http-warning {
  display: block;
  margin-top: 5px;
  color: var(--signal-deep);
  font-size: 10px;
  font-weight: 650;
}

.buyer-flow .http-warning.hidden {
  display: none !important;
}

.buyer-flow .success {
  min-height: 320px;
  padding: 48px 10px 34px;
  text-align: center;
}

.buyer-flow .success-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--success);
  border-radius: 50%;
  color: var(--success);
  font-size: 20px;
}

.buyer-flow .success .eyebrow {
  margin: 0;
  color: var(--success);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .13em;
}

.buyer-flow .success h2 {
  margin: 11px 0 8px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -.025em;
}

.buyer-flow .success p,
.buyer-flow .order-ref {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.buyer-flow .order-ref {
  margin: 14px 0 21px;
  color: var(--ink);
  font-weight: 620;
}

.buyer-flow .success .button {
  min-width: 190px;
}

.buyer-flow .footer {
  grid-column: 2;
  margin-top: -9px;
  padding: 0 34px;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.6;
}

.buyer-flow .footer a {
  color: inherit;
  text-underline-offset: 3px;
}

.buyer-flow .footer a:hover {
  color: var(--signal-deep);
}

.buyer-flow .loading,
.buyer-flow .empty {
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

@media (prefers-reduced-motion: no-preference) {
  .buyer-flow .purchase-card {
    animation: sheet-enter 180ms ease-out both;
  }

  .buyer-flow #price[data-state="quoted"] {
    animation: quote-settle 140ms ease-out;
  }
}

@keyframes sheet-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes quote-settle {
  from { opacity: .55; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .buyer-flow .topbar {
    height: 58px;
    padding: 0 16px;
  }

  .buyer-flow .brand {
    font-size: 13px;
  }

  .buyer-flow .brand-mark {
    width: 26px;
    height: 26px;
    font-size: 17px;
  }

  .buyer-flow .top-note {
    font-size: 10px;
  }

  .buyer-flow .shell {
    width: 100%;
    max-width: 560px;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 13px 14px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .buyer-flow .edition-folio {
    position: static;
    padding: 17px 18px 14px;
  }

  .buyer-flow .folio-kicker {
    padding-bottom: 10px;
    font-size: 8px;
  }

  .buyer-flow .edition-folio .eyebrow {
    margin: 13px 0 5px;
    font-size: 9px;
  }

  .buyer-flow #edition-title {
    max-width: 18ch;
    font-size: clamp(27px, 8vw, 34px);
  }

  .buyer-flow .paper-cover {
    width: min(100%, 320px);
    max-height: 230px;
    margin-top: 12px;
  }

  .buyer-flow .paper-description {
    margin-top: 8px;
    font-size: 12px;
  }

  .buyer-flow .folio-rule {
    margin: 12px 0 7px;
  }

  .buyer-flow .folio-meta {
    padding: 3px 0;
    font-size: 8px;
  }

  .buyer-flow .folio-meta strong {
    font-size: 9px;
  }

  .buyer-flow .purchase-card {
    padding: 23px 18px 18px;
  }

  .buyer-flow .flow-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
  }

  .buyer-flow .step {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 12px;
  }

  .buyer-flow .step-num {
    width: 26px;
    font-size: 14px;
  }

  .buyer-flow .step h2 {
    font-size: 20px;
  }

  .buyer-flow .format-option {
    min-height: 76px;
    gap: 4px 7px;
    padding: 11px 8px;
  }

  .buyer-flow .format-code {
    min-width: 32px;
    font-size: 8px;
  }

  .buyer-flow .format-option strong {
    font-size: 13px;
  }

  .buyer-flow .format-option small {
    font-size: 10px;
  }

  .buyer-flow .period-calendar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .buyer-flow .period-choice {
    min-height: 48px;
    font-size: 12px;
  }

  .buyer-flow .form-grid {
    gap: 13px 10px;
  }

  .buyer-flow .checkout-dock {

    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 18px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--signal);
    background: transparent;
    box-shadow: none;
  }

  .buyer-flow .summary-top {
    min-height: 0;
    font-size: 10px;
  }

  .buyer-flow .price {
    margin-top: 2px;
    font-size: 28px;
  }

  .buyer-flow .summary-note {
    max-width: 26ch;
    font-size: 9px;
    line-height: 1.35;
  }

  .buyer-flow .checkout-dock > .button-primary {
    width: 100%;
    min-height: 48px;
    padding: 9px 10px;
    font-size: 12px;
  }

  .buyer-flow .legal-note {
    margin-top: 10px;
    padding-bottom: 4px;
    font-size: 9px;
  }

  .buyer-flow .footer {
    grid-column: 1;
    margin-top: 1px;
    padding: 0 2px;
  }
}

@media (max-width: 380px) {
  .buyer-flow .topbar {
    padding: 0 12px;
  }

  .buyer-flow .top-note {
    max-width: 38vw;
    text-align: right;
  }

  .buyer-flow .shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .buyer-flow .purchase-card {
    padding-right: 14px;
    padding-left: 14px;
  }

  .buyer-flow .checkout-dock {
    grid-template-columns: minmax(0, 1fr) minmax(132px, .9fr);
  }

  .buyer-flow .format-option {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .buyer-flow .format-code {
    grid-row: auto;
  }

  .buyer-flow .period-choice {
    min-height: 46px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .buyer-flow *,
  .buyer-flow *::before,
  .buyer-flow *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
