/* Atlas purchase journey and public documents. Load after Atlas and the v2 journey. */
html:not([data-theme]) body.shop-body.atlas :is(#checkout, #cashier, #account, #orders, #modal),
body.auth-body.atlas:not(.admin-auth),
body.legal-body.atlas {
  color-scheme: light;
  --bg: #f5f3ef;
  --bg-sunken: #eeebe4;
  --paper: #fff;
  --paper-raised: #fff;
  --paper-soft: #f5f3ef;
  --line: #ded9d0;
  --line-soft: #eae6df;
  --line-strong: #b8b1a7;
  --ink: #28263b;
  --ink-soft: #3f3b50;
  --muted: #625c70;
  --muted-soft: #706978;
  --brand: #5141a6;
  --brand-hi: #6451bb;
  --brand-deep: #44358d;
  --brand-line: #cdc3ed;
  --brand-wash: #f0ecfb;
  --on-brand: #fff;
  --blue: var(--brand);
  --blue-hover: var(--brand-deep);
  --blue-line: var(--brand-line);
  --blue-wash: var(--brand-wash);
  --journey-frame: 1px solid var(--line);
  --journey-radius: 10px;
  --journey-shadow: none;
  --atlas-flow-inset: clamp(16px, 3vw, 32px);
  --atlas-flow-shadow: 0 22px 60px -22px rgb(40 38 59 / 36%);
  color: var(--ink);
}

html:not([data-theme]) body.shop-body.atlas :is(#checkout, #cashier, #account, #orders, #modal) :is(.dark-button, .outline-button),
body.auth-body.atlas:not(.admin-auth) .user-auth-form .dark-button.full,
body.legal-body.atlas .legal-header .outline-button {
  min-height: 46px;
  border-radius: 6px;
  box-shadow: none;
}

html:not([data-theme]) body.shop-body.atlas :is(#checkout, #cashier, #account, #orders, #modal) .dark-button,
body.auth-body.atlas:not(.admin-auth) .user-auth-form .dark-button.full { color: var(--on-brand); }

html:not([data-theme]) body.shop-body.atlas :is(#checkout, #cashier, #account, #orders, #modal) .text-button { color: var(--brand-deep); }

html:not([data-theme]) body.shop-body.atlas :is(#checkout, #cashier, #account, #orders, #modal) :focus-visible,
body.auth-body.atlas:not(.admin-auth) :focus-visible,
body.legal-body.atlas :focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

html:not([data-theme]) body.shop-body.atlas :is(#checkout .form-grid, #orders #query-form, #modal .search-input, #modal .admin-form) input,
body.auth-body.atlas:not(.admin-auth) .user-auth-form .auth-panel input {
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
}

html:not([data-theme]) body.shop-body.atlas :is(#checkout .form-grid, #orders #query-form, #modal .search-input, #modal .admin-form) input:focus,
body.auth-body.atlas:not(.admin-auth) .user-auth-form .auth-panel input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-wash);
}

/* Checkout: step numbers follow the displayed panels, including signed-in checkout. */
html:not([data-theme]) body.shop-body.atlas #checkout .checkout-wrap { max-width: 1120px; }

html:not([data-theme]) body.shop-body.atlas #checkout .checkout-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .65fr);
  align-items: end;
  gap: 6px clamp(18px, 4vw, 52px);
  margin-bottom: clamp(20px, 3.5vw, 36px);
  padding: 6px 0 clamp(16px, 2.5vw, 26px);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

html:not([data-theme]) body.shop-body.atlas #checkout .checkout-title > .kicker { grid-column: 1 / -1; margin: 0; }
html:not([data-theme]) body.shop-body.atlas #checkout .checkout-title h1 { margin: 0; font-size: clamp(34px, 5vw, 58px); }
html:not([data-theme]) body.shop-body.atlas #checkout .checkout-title > p:not(.kicker) { max-width: 40ch; margin: 0 0 3px; font-size: 14px; }

html:not([data-theme]) body.shop-body.atlas #checkout .checkout-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, .52fr);
  gap: clamp(16px, 3vw, 36px);
}

html:not([data-theme]) body.shop-body.atlas #checkout .checkout-main {
  display: block;
  border: var(--journey-frame);
  border-radius: var(--journey-radius);
  background: var(--paper);
  counter-reset: atlas-checkout-step;
}

html:not([data-theme]) body.shop-body.atlas #checkout .checkout-block {
  padding: var(--atlas-flow-inset);
  border: 0;
  border-radius: 0;
  background: transparent;
  counter-increment: atlas-checkout-step;
}

html:not([data-theme]) body.shop-body.atlas #checkout .checkout-block + .checkout-block { border-top: var(--journey-frame); }

html:not([data-theme]) body.shop-body.atlas #checkout .checkout-block > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  font-size: clamp(18px, 2.3vw, 23px);
}

html:not([data-theme]) body.shop-body.atlas #checkout .checkout-block > h2::before {
  content: counter(atlas-checkout-step, decimal-leading-zero) / "";
  display: grid;
  flex: 0 0 34px;
  height: 30px;
  place-items: center;
  border-radius: 4px;
  background: var(--brand-wash);
  color: var(--brand-deep);
  font: 700 12px/1 var(--journey-mono);
}

html:not([data-theme]) body.shop-body.atlas :is(#checkout, #modal) .payment-options,
html:not([data-theme]) body.shop-body.atlas #checkout .purchase-mode { gap: 8px; }

html:not([data-theme]) body.shop-body.atlas #checkout .purchase-mode { grid-template-columns: minmax(0, 1fr); }

html:not([data-theme]) body.shop-body.atlas :is(#checkout, #modal) :is(.mode-choice, .pay-option) {
  min-height: 60px;
  padding: 10px 12px;
  border-color: var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  overflow-wrap: anywhere;
}

html:not([data-theme]) body.shop-body.atlas :is(#checkout, #modal) :is(.mode-choice, .pay-option):hover { border-color: var(--brand); }
html:not([data-theme]) body.shop-body.atlas :is(#checkout, #modal) :is(.mode-choice, .pay-option).active {
  border-color: var(--brand);
  background: var(--brand-wash);
  color: var(--brand-deep);
  box-shadow: inset 3px 0 var(--brand);
}

html:not([data-theme]) body.shop-body.atlas :is(#checkout, #modal) .payment-unavailable { grid-column: 1 / -1; }

html:not([data-theme]) body.shop-body.atlas #checkout .checkout-summary {
  top: calc(var(--header-h, 68px) + 16px);
  gap: 14px;
  padding: var(--atlas-flow-inset);
  border-top: 3px solid var(--brand);
  background: var(--paper-soft);
  box-shadow: none;
}

html:not([data-theme]) body.shop-body.atlas #checkout .checkout-summary > h2 { font-size: 22px; }
html:not([data-theme]) body.shop-body.atlas #checkout .summary-item { border-color: var(--line); }
html:not([data-theme]) body.shop-body.atlas #checkout .summary-total strong { font-size: clamp(26px, 3.2vw, 37px); }
html:not([data-theme]) body.shop-body.atlas #checkout .checkout-consent { border-color: var(--line); }

/* Cashier: a low-profile progress strip above separate payment and receipt panels. */
html:not([data-theme]) body.shop-body.atlas #cashier.shop-page { background: transparent; }

html:not([data-theme]) body.shop-body.atlas #cashier .cashier-shell {
  width: min(100%, 1120px);
  padding: 0;
  border: 0;
  background: transparent;
}

html:not([data-theme]) body.shop-body.atlas #cashier .cashier-head { margin-bottom: 0; padding: 0 0 17px; }
html:not([data-theme]) body.shop-body.atlas #cashier .cashier-brand b { font-size: clamp(18px, 2.6vw, 27px); }
html:not([data-theme]) body.shop-body.atlas #cashier .cashier-brand-mark { width: 36px; height: 36px; }

html:not([data-theme]) body.shop-body.atlas #cashier .cashier-steps {
  gap: 0;
  margin: 0 0 clamp(16px, 3vw, 28px);
  border-bottom: var(--journey-frame);
}

html:not([data-theme]) body.shop-body.atlas #cashier .cashier-step {
  min-height: 50px;
  padding: 8px 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

html:not([data-theme]) body.shop-body.atlas #cashier .cashier-step.active {
  border-bottom-color: var(--brand);
  background: var(--brand-wash);
  color: var(--brand-deep);
}

html:not([data-theme]) body.shop-body.atlas #cashier .cashier-grid {
  grid-template-columns: minmax(0, 1fr) minmax(270px, .47fr);
  align-items: start;
  gap: clamp(12px, 2.8vw, 28px);
  padding: 0;
  border: 0;
  background: transparent;
}

html:not([data-theme]) body.shop-body.atlas #cashier .cashier-payment-card {
  grid-template-columns: minmax(0, .74fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(14px, 2.4vw, 24px);
  padding: var(--atlas-flow-inset);
}

html:not([data-theme]) body.shop-body.atlas #cashier .cashier-qr-wrap {
  padding: clamp(8px, 1.5vw, 14px);
  border: var(--journey-frame);
  border-radius: 6px;
  background: var(--paper-soft);
}

html:not([data-theme]) body.shop-body.atlas #cashier .cashier-qr-wrap :is(p, small) { color: var(--muted); }
html:not([data-theme]) body.shop-body.atlas #cashier .online-pay-qr-frame { background: var(--paper); }
html:not([data-theme]) body.shop-body.atlas #cashier .cashier-transfer { padding: 0; }
html:not([data-theme]) body.shop-body.atlas #cashier .cashier-transfer ol { gap: 0; }
html:not([data-theme]) body.shop-body.atlas #cashier .cashier-transfer li {
  padding: 11px 0 11px 31px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}
html:not([data-theme]) body.shop-body.atlas #cashier .cashier-transfer li::before { left: 0; font-family: var(--journey-mono); }

html:not([data-theme]) body.shop-body.atlas #cashier .cashier-info-card {
  padding: var(--atlas-flow-inset);
  border-top: 3px solid var(--brand);
  background: var(--paper-soft);
}

html:not([data-theme]) body.shop-body.atlas #cashier .cashier-info-card h1 { font-size: clamp(27px, 3.4vw, 39px); }
html:not([data-theme]) body.shop-body.atlas #cashier .cashier-order-meta div { border-color: var(--line); }
html:not([data-theme]) body.shop-body.atlas #cashier .cashier-order-meta span { color: var(--muted); }
html:not([data-theme]) body.shop-body.atlas #cashier #cashier-order-total { color: var(--brand-deep); font-variant-numeric: tabular-nums; }
html:not([data-theme]) body.shop-body.atlas #cashier .cashier-contact-panel > div { min-width: 0; overflow-wrap: anywhere; }
html:not([data-theme]) body.shop-body.atlas #cashier .cashier-contact { border-color: var(--brand-line); background: var(--brand-wash); color: var(--brand-deep); }
html:not([data-theme]) body.shop-body.atlas #cashier .cashier-footnote { justify-content: flex-start; }

/* Account: the wallet is a sidebar alongside the order history. */
html:not([data-theme]) body.shop-body.atlas #account .account-page-wrap,
html:not([data-theme]) body.shop-body.atlas #orders .orders-wrap { max-width: 1120px; }

html:not([data-theme]) body.shop-body.atlas #account .account-orders:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(230px, .68fr) minmax(0, 1.32fr);
  grid-template-rows: auto auto 1fr;
  align-items: start;
  column-gap: clamp(15px, 3.4vw, 36px);
  padding: 0;
  border: 0;
  background: transparent;
}

html:not([data-theme]) body.shop-body.atlas #account .account-orders-head {
  grid-column: 1 / -1;
  margin-bottom: clamp(16px, 3vw, 30px);
  border-color: var(--line);
}

html:not([data-theme]) body.shop-body.atlas #account .account-orders-head h1,
html:not([data-theme]) body.shop-body.atlas #orders .order-query h1 { font-size: clamp(34px, 5vw, 57px); }

html:not([data-theme]) body.shop-body.atlas #account .wallet-card {
  grid-column: 1;
  grid-row: 2 / span 2;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: var(--atlas-flow-inset);
  border: var(--journey-frame);
  border-top: 3px solid var(--brand);
  background: var(--paper-soft);
}

html:not([data-theme]) body.shop-body.atlas #account .wallet-card-main { padding: 0; }
html:not([data-theme]) body.shop-body.atlas #account .wallet-card-main h2 { font-size: 20px; }
html:not([data-theme]) body.shop-body.atlas #account #wallet-balance { display: block; margin-top: 6px; }
html:not([data-theme]) body.shop-body.atlas #account .wallet-card-actions { justify-content: flex-start; }
html:not([data-theme]) body.shop-body.atlas #account .wallet-ledger { grid-column: auto; border-color: var(--line); }
html:not([data-theme]) body.shop-body.atlas #account .wallet-ledger-item { padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
html:not([data-theme]) body.shop-body.atlas #account .wallet-ledger-item:last-child { border-bottom: 0; }

html:not([data-theme]) body.shop-body.atlas #account :is(.account-orders-subhead, #my-orders) { grid-column: 2; margin: 0; min-width: 0; }
html:not([data-theme]) body.shop-body.atlas #account .account-orders-subhead { padding: 0 0 11px; }
html:not([data-theme]) body.shop-body.atlas #account .account-orders-subhead h2 { font-size: 22px; }

/* Order lookup: form and introduction side by side, with results below. */
html:not([data-theme]) body.shop-body.atlas #orders .order-query {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(300px, 1fr);
  grid-template-rows: auto auto 1fr;
  gap: 0 clamp(18px, 5vw, 62px);
  width: 100%;
  padding: var(--atlas-flow-inset);
  border-top: 3px solid var(--brand);
  box-shadow: none;
}

html:not([data-theme]) body.shop-body.atlas #orders .order-query > :is(p, h1) { grid-column: 1; }
html:not([data-theme]) body.shop-body.atlas #orders .order-query > p:not(.kicker) { margin: 12px 0 0; max-width: 34ch; font-size: 14px; }

html:not([data-theme]) body.shop-body.atlas #orders #query-form {
  grid-column: 2;
  grid-row: 1 / span 3;
  gap: 13px;
  padding: var(--atlas-flow-inset);
  border: var(--journey-frame);
  border-radius: 6px;
  background: var(--paper-soft);
}

html:not([data-theme]) body.shop-body.atlas #orders #query-result { grid-column: 1 / -1; margin-top: 24px; padding-top: 17px; border-top: var(--journey-frame); }

html:not([data-theme]) body.shop-body.atlas :is(#account, #orders) .order-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 12px; }
html:not([data-theme]) body.shop-body.atlas :is(#account, #orders) .order-list-card { align-content: start; border-inline-start: 3px solid var(--brand-line); }
html:not([data-theme]) body.shop-body.atlas :is(#account, #orders) .order-list-time { color: var(--muted); overflow-wrap: anywhere; }
html:not([data-theme]) body.shop-body.atlas :is(#account, #orders) .order-list-actions [data-open-order-detail] {
  border-color: var(--brand-line) !important;
  background: var(--brand-wash) !important;
  color: var(--brand-deep) !important;
}
html:not([data-theme]) body.shop-body.atlas :is(#account, #orders) .order-list-actions [data-open-order-detail]:hover {
  border-color: var(--brand) !important;
  background: var(--paper) !important;
}
html:not([data-theme]) body.shop-body.atlas :is(#orders, #account, #cashier, #modal) :is(.od-copy-btn, .od-reveal-btn, .od-secret-content) { border-color: var(--line); background: var(--paper-soft); }
html:not([data-theme]) body.shop-body.atlas :is(#orders, #account, #cashier, #modal) :is(.od-guide, .od-product small, .od-secret-content) { color: var(--ink-soft); }

/* Shared modal. Search reads as a centered result panel, and the cart docks on the right. */
html:not([data-theme]) body.shop-body.atlas #modal.modal-layer {
  background: rgb(40 38 59 / 28%);
  backdrop-filter: blur(3px);
}

html:not([data-theme]) body.shop-body.atlas #modal .modal-card {
  border: var(--journey-frame);
  border-top: 3px solid var(--brand);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--atlas-flow-shadow);
  overscroll-behavior: contain;
}

html:not([data-theme]) body.shop-body.atlas #modal .modal-x {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: var(--paper-soft);
  color: var(--ink);
}

html:not([data-theme]) body.shop-body.atlas #modal .modal-x:hover { background: var(--brand-wash); color: var(--brand-deep); }
html:not([data-theme]) body.shop-body.atlas #modal #modal-body > h2 { padding-bottom: 12px; border-bottom: var(--journey-frame); font-size: clamp(24px, 4vw, 35px); }
html:not([data-theme]) body.shop-body.atlas #modal.entry-notice-open .modal-card::before { display: none; }
html:not([data-theme]) body.shop-body.atlas #modal .entry-notification-icon { background: var(--brand-wash); color: var(--brand-deep); }
html:not([data-theme]) body.shop-body.atlas #modal .entry-notification-copy { background: var(--paper-soft); }

html:not([data-theme]) body.shop-body.atlas #modal:has(#modal-body > .search-input) {
  place-items: start center;
  padding: clamp(12px, 8vh, 70px) clamp(10px, 3vw, 26px) 12px;
}

/* The v2 drawer and the legacy mobile dialog both use important widths. */
html:not([data-theme]) body.shop-body.atlas #modal:has(#modal-body > .search-input) .modal-card {
  width: min(100%, 700px) !important;
  max-width: 100% !important;
  height: auto;
  max-height: 100%;
  padding: var(--atlas-flow-inset);
  border: var(--journey-frame);
  border-top: 3px solid var(--brand);
  border-radius: 10px;
  box-shadow: var(--atlas-flow-shadow);
  animation: none;
}

html:not([data-theme]) body.shop-body.atlas #modal .search-input { margin-top: 0; padding: 0; border: 0; }
html:not([data-theme]) body.shop-body.atlas #modal .search-input > svg { top: 50%; transform: translateY(-50%); }
html:not([data-theme]) body.shop-body.atlas #modal .search-results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
html:not([data-theme]) body.shop-body.atlas #modal .search-results button {
  min-height: 64px;
  padding: 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
html:not([data-theme]) body.shop-body.atlas #modal .search-results button:hover { border-color: var(--brand); background: var(--brand-wash); }
html:not([data-theme]) body.shop-body.atlas #modal .search-results > .field-help { grid-column: 1 / -1; }

html:not([data-theme]) body.shop-body.atlas #modal:has(#modal-body > div > :is(.cart-empty, .cart-line)) {
  place-items: stretch end;
  padding: clamp(8px, 2vw, 20px);
}

html:not([data-theme]) body.shop-body.atlas #modal:has(#modal-body > div > :is(.cart-empty, .cart-line)) .modal-card {
  width: min(100%, 470px) !important;
  max-width: 100% !important;
  padding: var(--atlas-flow-inset);
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  border: var(--journey-frame);
  border-top: 3px solid var(--brand);
  border-radius: 10px;
  box-shadow: var(--atlas-flow-shadow);
}

html:not([data-theme]) body.shop-body.atlas #modal .cart-line { padding: 14px 0; border-bottom-color: var(--line); }
html:not([data-theme]) body.shop-body.atlas #modal .cart-line > :first-child { grid-row: 1 / span 2; align-self: start; }
html:not([data-theme]) body.shop-body.atlas #modal .cart-line-qty { background: var(--paper-soft); }
html:not([data-theme]) body.shop-body.atlas #modal .cart-total {
  gap: 12px;
  margin: 16px 0 10px;
  padding: 12px;
  border: var(--journey-frame);
  border-radius: 6px;
  background: var(--paper-soft);
}
html:not([data-theme]) body.shop-body.atlas #modal .cart-total > strong { font-size: clamp(22px, 3vw, 30px); overflow-wrap: anywhere; }
html:not([data-theme]) body.shop-body.atlas #modal .cart-empty { margin-top: 10px; }

/* Customer sign-in: a framed form and a short introduction on the stone canvas. */
body.auth-body.atlas:not(.admin-auth), body.legal-body.atlas { background: var(--bg); }

body.auth-body.atlas:not(.admin-auth) .auth-shell {
  width: min(100%, 940px);
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: clamp(20px, 4vw, 52px);
  overflow: visible;
  border: 0;
  background: transparent;
}

body.auth-body.atlas:not(.admin-auth) .user-auth-aside {
  display: grid;
  align-content: start;
  justify-content: stretch;
  gap: clamp(24px, 5vw, 58px);
  padding: clamp(8px, 1.6vw, 20px) 0 0;
  border: 0;
  background: transparent;
}

body.auth-body.atlas:not(.admin-auth) .user-auth-aside > div { padding-top: 20px; border-top: 1px solid var(--brand-line); }
body.auth-body.atlas:not(.admin-auth) .user-auth-aside h1 { margin: 8px 0 12px; font-size: clamp(31px, 4.7vw, 53px); }
body.auth-body.atlas:not(.admin-auth) .auth-form-wrap {
  padding: clamp(16px, 4vw, 40px);
  border: var(--journey-frame);
  border-top: 3px solid var(--brand);
  border-radius: 10px;
  background: var(--paper);
}
body.auth-body.atlas:not(.admin-auth) .user-auth-form h2 { font-size: clamp(26px, 3.6vw, 42px); }
body.auth-body.atlas:not(.admin-auth) .user-auth-form .auth-tabs {
  gap: 12px;
  padding: 0;
  border: 0;
  border-bottom: var(--journey-frame);
  border-radius: 0;
  background: transparent;
}
body.auth-body.atlas:not(.admin-auth) .user-auth-form .auth-tab { border-radius: 0; }
body.auth-body.atlas:not(.admin-auth) .user-auth-form .auth-tab.active {
  background: var(--brand-wash);
  color: var(--brand-deep);
  box-shadow: inset 0 -2px var(--brand);
}
body.auth-body.atlas:not(.admin-auth) .user-auth-form .auth-footer { margin-top: 16px; padding-top: 12px; border-top: var(--journey-frame); }

/* Legal copy keeps the existing section numbers and gives each topic its own row. */
body.legal-body.atlas .legal-header {
  height: auto;
  min-height: 65px;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-block: 7px;
  background-color: var(--paper) !important;
}
body.legal-body.atlas .legal-shell {
  width: min(1020px, calc(100% - clamp(28px, 8vw, 96px)));
  max-width: none;
  margin: clamp(22px, 5vw, 62px) auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body.legal-body.atlas .legal-shell > h1 { margin: 7px 0 10px; font-size: clamp(37px, 6vw, 69px); }
body.legal-body.atlas .legal-shell > .legal-updated { margin: 0 0 clamp(18px, 4vw, 36px); }
body.legal-body.atlas .legal-shell > section {
  display: grid;
  grid-template-columns: minmax(0, .42fr) minmax(0, 1fr);
  gap: 8px clamp(16px, 3.5vw, 40px);
  margin: 0;
  padding: clamp(15px, 3vw, 29px);
  border: var(--journey-frame);
  border-bottom: 0;
  background: var(--paper);
}
body.legal-body.atlas .legal-shell > section:first-of-type { border-color: var(--line); border-top: 3px solid var(--brand); border-radius: 8px 8px 0 0; }
body.legal-body.atlas .legal-shell > section:last-of-type { border-bottom: var(--journey-frame); border-radius: 0 0 8px 8px; }
body.legal-body.atlas .legal-shell section h2 { margin: 2px 0 0; color: var(--brand-deep); }
body.legal-body.atlas .legal-shell section p { max-width: 65ch; margin: 0; }
body.legal-body.atlas .legal-footer { background: var(--paper); border-top: var(--journey-frame); }

@media (max-width: 960px) {
  html:not([data-theme]) body.shop-body.atlas #cashier .cashier-payment-card { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  html:not([data-theme]) body.shop-body.atlas #checkout .checkout-layout { grid-template-columns: minmax(0, 1fr); }
  html:not([data-theme]) body.shop-body.atlas #checkout .checkout-summary { position: static; }
}

@media (max-width: 700px) {
  html:not([data-theme]) body.shop-body.atlas #checkout .checkout-title,
  html:not([data-theme]) body.shop-body.atlas #cashier .cashier-grid,
  html:not([data-theme]) body.shop-body.atlas #account .account-orders:not([hidden]),
  html:not([data-theme]) body.shop-body.atlas #orders .order-query { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }

  html:not([data-theme]) body.shop-body.atlas #account :is(.wallet-card, .account-orders-subhead, #my-orders),
  html:not([data-theme]) body.shop-body.atlas #orders #query-form { grid-column: auto; grid-row: auto; }

  html:not([data-theme]) body.shop-body.atlas #account .wallet-card { margin-bottom: 19px; }
  html:not([data-theme]) body.shop-body.atlas #orders #query-form { margin-top: 18px; }
  html:not([data-theme]) body.shop-body.atlas #cashier .cashier-head { align-items: flex-start; }

  body.auth-body.atlas:not(.admin-auth) .auth-shell { width: min(100%, 510px); grid-template-columns: minmax(0, 1fr); }
  body.auth-body.atlas:not(.admin-auth) .user-auth-aside { gap: 12px; }
  body.auth-body.atlas:not(.admin-auth) .user-auth-aside > div { padding-top: 12px; }
  body.auth-body.atlas:not(.admin-auth) .user-auth-aside h1 br { display: none; }
  body.legal-body.atlas .legal-shell > section { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 510px) {
  html:not([data-theme]) body.shop-body.atlas #modal .search-results,
  html:not([data-theme]) body.shop-body.atlas #modal .payment-options { grid-template-columns: minmax(0, 1fr); }
  html:not([data-theme]) body.shop-body.atlas #cashier .cashier-contact-panel { flex-wrap: wrap; }
}
