:root {
  --paper: #efe6d6;
  --paper-deep: #e5d8c4;
  --ink: #1c1915;
  --muted: #6f675c;
  --line: #ddcfb8;
  --card: #fbf6ec;
  --copper: #c6532a;
  --copper-deep: #8d3b1c;
  --pine: #1e5c40;
  --danger: #8d2f2a;
  --shadow: 0 24px 50px rgba(28, 25, 20, 0.08);
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.02rem;
  line-height: 1.45;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.35;
  background-image: radial-gradient(rgba(28, 25, 20, 0.18) 0.55px, transparent 0.6px);
  background-size: 3px 3px;
}

body.pay { background: var(--paper-deep); }

h1, h2, .price, .amount, .brand, .mark {
  font-family: Fraunces, Palatino, "Iowan Old Style", Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); line-height: 1.02; margin: 0 0 0.4rem; }
h2 { font-size: 1.55rem; margin: 0 0 0.8rem; }

p { margin: 0 0 0.8rem; }

a { color: var(--ink); }
a:hover { color: var(--copper-deep); }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: white;
  padding: 8px 10px;
  z-index: 5;
}
.skip:focus { top: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: rgba(251, 246, 236, 0.94);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand img {
  display: block;
  height: 28px;
  width: auto;
}

.nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.nav a { text-decoration: none; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--copper); }

button, .choose, .pay {
  font-family: Outfit, "Avenir Next", sans-serif;
  font-weight: 600;
}

button.link, .text-danger {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.text-danger { color: var(--danger); }

.wrap { width: min(1080px, calc(100% - 40px)); margin: 32px auto 72px; }
.wrap.narrow { width: min(480px, calc(100% - 32px)); }

.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--copper-deep);
}

.lede { max-width: 38rem; color: var(--muted); }

.ledger { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }

.row, .slip, .ticket {
  background: var(--card);
  border: 1px solid var(--line);
  animation: rise 0.45s ease both;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 22px;
  align-items: center;
  padding: 20px 20px 20px 22px;
  border-left: 4px solid var(--copper);
}

.desc { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.price { margin: 0; font-size: 1.7rem; white-space: nowrap; }
.vat-note { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.vat-help { margin: 8px 0 0; color: var(--muted); font-size: 0.85rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.total-line { margin: 0 0 16px; color: var(--pine); font-weight: 600; }
.price.small { font-size: 1.15rem; }

.choose, .pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  color: #f6efe2;
}
.choose { background: var(--ink); min-height: 46px; padding: 0 16px; }
.choose:hover { background: #322c26; color: #f6efe2; }
.row-action { display: flex; justify-content: flex-end; }
button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  min-height: 46px;
  padding: 0 16px;
  cursor: pointer;
}
button.ghost:hover { border-color: var(--ink); }
dialog.modal {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 22px 22px 18px;
  width: min(440px, calc(100vw - 32px));
  box-shadow: var(--shadow);
}
dialog.modal::backdrop { background: rgba(28, 25, 20, 0.48); }
dialog.modal h2 { font-size: 1.85rem; }
dialog.modal p { color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.public-bar { padding: 22px 28px; }
.public-bar img { display: block; height: 28px; width: auto; }
.pay-list { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.pay-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--copper);
  padding: 18px 20px 16px;
}
.pay-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.pay-head .price { font-size: 1.45rem; }
.pay-card .stamp { margin: 0 0 8px; }
.pay-card .meta { margin-top: 12px; }
.pay-card form { margin-top: 8px; }
.pay {
  width: 100%;
  min-height: 58px;
  background: var(--copper);
  color: #fff8f3;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.pay:hover { background: var(--copper-deep); }
button:disabled { opacity: 0.65; cursor: wait; }

.slip { padding: 22px; }
.empty { max-width: 28rem; }

.split {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 18px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  padding: 12px;
}

textarea { min-height: 130px; resize: vertical; }
.field { margin-bottom: 16px; }

.alert, .notice { padding: 12px 14px; margin: 12px 0; }
.alert { background: #f8e6e1; color: #6f241e; border: 1px solid #e4b2a8; }
.notice { background: #e5f0e8; color: var(--pine); border: 1px solid #b7d4c4; }
.muted { color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 500; color: var(--ink); }
.check input { width: 18px; height: 18px; }
.logo-preview { display: block; max-width: 180px; max-height: 72px; margin: 8px 0 12px; object-fit: contain; background: #fff; }
.email-hint { margin: 8px 0 0; color: #6d6e78; font-size: 12px; }

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
td, th { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.actions { display: flex; gap: 14px; align-items: center; }
.actions form { margin: 0; }

.ticket {
  position: relative;
  padding: 34px 30px 26px;
  box-shadow: var(--shadow);
}
.ticket::before, .ticket::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  height: 12px;
  background-image: radial-gradient(circle, var(--paper-deep) 5px, transparent 5.5px);
  background-size: 18px 12px;
  background-repeat: repeat-x;
}
.ticket::before { top: -6px; }
.ticket::after { bottom: -6px; }

.amount {
  font-size: clamp(3rem, 8vw, 4.5rem);
  line-height: 0.92;
  margin: 8px 0 18px;
}

.meta { margin: 0 0 18px; }
.meta div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
}
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }

.brand-pill {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 1px 7px 2px;
  margin-right: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fine { color: var(--muted); font-size: 0.92rem; margin: 14px 0 0; }
.back { margin-top: 18px; }

.stamp {
  display: inline-block;
  margin: 0 0 12px;
  border: 3px solid currentColor;
  padding: 0.28rem 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  font-size: 0.82rem;
  transform: rotate(-6deg);
}
.stamp.ok { color: var(--pine); }
.stamp.bad { color: var(--danger); }
.stamp.wait { color: var(--copper-deep); }

.login { background: var(--ink); }
.login::before { display: none; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(260px, 0.9fr) 1.1fr; }
.login-aside {
  color: #f6efe2;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(160deg, rgba(198, 83, 42, 0.22), transparent 42%),
    var(--ink);
}
.login-aside h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); max-width: 9ch; }
.login-aside p:last-child { max-width: 28ch; color: #e6d8c6; }
.mark-logo {
  display: block;
  height: 36px;
  width: auto;
  margin-bottom: auto;
  background: #fff;
}
.login-main {
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.login-form { width: min(380px, 100%); }
.login-form h2 { font-size: 2.4rem; }

:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
::selection { background: #f0c2b0; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 800px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-aside { min-height: 34vh; padding: 28px 22px; }
  .login-aside h1 { max-width: none; }
  .row, .split { grid-template-columns: 1fr; }
  .topbar { padding: 14px 16px; }
  .nav { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .row, .slip, .ticket { animation: none; }
}

/* Payment screen: two-column checkout. Card details are not posted. */
body.checkout {
  --gs-ink: #30313d;
  --gs-muted: #6d6e78;
  --gs-line: #e6e6e6;
  --gs-purple: #6c4dff;
  --gs-purple-deep: #5838f0;
  --gs-link: #00d66f;
  --gs-soft: #f2f4f7;
  --gs-field: #ffffff;
  background: #fff;
  color: var(--gs-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0;
}
body.checkout::before { display: none; }
body.checkout [hidden] { display: none !important; }
body.checkout h2,
body.checkout p,
body.checkout button,
body.checkout input,
body.checkout select {
  font-family: inherit;
  letter-spacing: 0;
}
body.checkout :focus-visible {
  outline: 2px solid var(--gs-purple);
  outline-offset: 2px;
}

.checkout-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  animation: checkout-in 0.35s ease;
}
.summary {
  display: flex;
  justify-content: flex-end;
  background: #fff;
  border-right: 1px solid var(--gs-line);
  padding: 56px 0 64px;
}
.summary-inner {
  width: 380px;
  max-width: calc(100% - 48px);
  margin-right: 48px;
}
.paycol {
  display: flex;
  justify-content: flex-start;
  background: #fff;
  padding: 56px 0 72px;
}
.pay-inner {
  width: 400px;
  max-width: calc(100% - 48px);
  margin-left: 48px;
}

.gs-logo {
  display: block;
  height: 32px;
  width: auto;
}

.subscribe-kicker {
  margin: 22px 0 2px;
  color: var(--gs-muted);
  font-size: 15px;
  font-weight: 500;
}
.due {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 26px;
}
.due-amt {
  margin: 0;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #1a1a1a;
}
.due-per {
  margin: 0;
  color: var(--gs-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.15;
}
.product {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.product-name,
.product-price {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.product-price { white-space: nowrap; }
.billed {
  margin: 2px 0 0;
  color: var(--gs-muted);
  font-size: 13px;
}
.rule {
  border: 0;
  border-top: 1px solid var(--gs-line);
  margin: 16px 0;
}
.sum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  font-size: 14px;
}
.sum-row.total { font-weight: 600; margin-top: 14px; }
.with-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gs-muted);
  cursor: pointer;
}
.info-tip {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: min(240px, 68vw);
  padding: 8px 10px;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  z-index: 4;
}
.info:hover .info-tip,
.info:focus-visible .info-tip,
.info[aria-expanded="true"] .info-tip { display: block; }

.promo {
  appearance: none;
  border: 0;
  background: var(--gs-soft);
  color: var(--gs-ink);
  border-radius: 8px;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.promo:hover { background: #e6e9ee; }
.promo-box { gap: 8px; margin: 8px 0 4px; }
.promo-box:not([hidden]) { display: flex; }
.promo-box input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--gs-line);
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  font-size: 14px;
}
.promo-box button {
  border: 0;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.promo-msg { margin: 4px 0 8px; color: var(--gs-muted); font-size: 13px; }

.wallets {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.apple, .link {
  height: 44px;
  border: 0;
  border-radius: 6px;
  font-size: 19px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.apple { background: #000; color: #fff; }
.apple:hover { background: #1a1a1a; }
.link { background: var(--gs-link); color: #011e0f; }
.link:hover { background: #00c864; }
.wallet-note { margin: 8px 0 0; color: var(--gs-muted); font-size: 13px; }
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
  color: var(--gs-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.or::before, .or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gs-line);
}

.block-title {
  margin: 22px 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}
.email-box {
  display: block;
  background: #f6f8fa;
  border: 1px solid #e0e0e6;
  border-radius: 6px;
  padding: 7px 12px 8px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: inherit;
}
.email-box span {
  display: block;
  font-size: 12px;
  color: var(--gs-muted);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.email-box input {
  border: 0;
  background: transparent;
  padding: 1px 0 0;
  font-size: 16px;
  color: var(--gs-ink);
  width: 100%;
}
.email-box:focus-within { box-shadow: 0 0 0 3px rgba(108, 77, 255, 0.18); border-color: var(--gs-purple); }

.method {
  border: 1px solid #e0e0e6;
  border-radius: 8px;
  padding: 12px 12px 14px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}
.method-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gs-ink);
  text-transform: none;
  letter-spacing: 0;
}
.method-head input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--gs-purple);
}
.field-label {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--gs-muted);
}
.card-entry, .addr, .solo {
  border: 1px solid #e0e0e6;
  border-radius: 6px;
  background: var(--gs-field);
}
.card-entry { margin-bottom: 14px; overflow: hidden; }
.card-row { position: relative; display: flex; align-items: center; border-bottom: 1px solid #e0e0e6; }
.card-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.card-entry input, .addr input, .addr select {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--gs-ink);
  padding: 12px;
  font-size: 16px;
}
.solo {
  width: 100%;
  color: var(--gs-ink);
  padding: 12px;
  font-size: 16px;
  background: #fff;
}
.card-row input { padding-right: 118px; }
.card-entry input::placeholder, .addr input::placeholder, .solo::placeholder { color: #8b909a; }
.schemes {
  position: absolute;
  right: 10px;
  display: flex;
  gap: 3px;
  pointer-events: none;
}
.cvc-wrap {
  display: flex;
  align-items: center;
  border-left: 1px solid #e0e0e6;
}
.cvc-wrap input { flex: 1; min-width: 0; }
.cvc-icon { flex: none; margin-right: 10px; }
.addr { overflow: hidden; }
.addr-row + .addr-row { border-top: 1px solid #e0e0e6; }
.has-chevron, .has-optional { position: relative; }
.addr select {
  appearance: none;
  padding-right: 32px;
}
.chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.has-optional span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa0aa;
  font-size: 14px;
  pointer-events: none;
}
.has-optional input { padding-right: 76px; }
.solo { margin-bottom: 14px; }

.card-entry input:focus, .addr input:focus, .addr select:focus, .solo:focus, .email-box input:focus {
  outline: none;
}
.card-row:focus-within, .card-split input:focus, .cvc-wrap:focus-within, .addr-row:focus-within, .solo:focus {
  box-shadow: inset 0 0 0 1px var(--gs-purple);
}

.save {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--gs-ink);
  text-transform: none;
  letter-spacing: 0;
}
.save input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--gs-purple); }
.secure, .legal {
  margin: 0 0 8px;
  color: var(--gs-muted);
  font-size: 12px;
  line-height: 1.45;
}
.subscribe {
  width: 100%;
  height: 48px;
  margin-top: 10px;
  border: 0;
  border-radius: 6px;
  background: var(--gs-purple);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.subscribe:hover { background: var(--gs-purple-deep); }
.subscribe:disabled { cursor: wait; opacity: 0.7; }
.powered {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 16px 0 0;
  color: #8d919c;
  font-size: 12px;
}
.powered strong { color: #6b7280; font-weight: 700; letter-spacing: -0.03em; }
.powered a { color: #8d919c; text-decoration: none; }
.powered a:hover { color: var(--gs-ink); }

body.checkout .alert {
  background: #fff4f4;
  color: #9f1239;
  border: 1px solid #fecdd3;
  border-radius: 6px;
  font-size: 14px;
}

@keyframes checkout-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 860px) {
  .checkout-shell { grid-template-columns: 1fr; }
  .summary, .paycol { justify-content: center; padding: 28px 20px 36px; }
  .summary { border-right: 0; border-bottom: 1px solid var(--gs-line); }
  .summary-inner, .pay-inner { width: min(460px, 100%); max-width: 100%; margin: 0; }
  .due-amt { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .checkout-shell { animation: none; }
}
