/*
 * Hosted pages: checkout link, thank-you, manage, not found. The form itself is styled by checkout.css.
 *
 * Checkout page: a deep forest panel says what is being bought (logo, a small gold eyebrow, the title, a
 * fine gold rule, the description, the support address). Beside the form's card on wide screens; a compact
 * band above it on phones and tablets. Every other page: a slim forest bar with the logo, then one card.
 * The card is paper on sand with a fine gold rule along its top. Nothing else.
 *
 *   space  4 8 12 16 20 24 32 44 56
 *   type   11.5 label (caps, tracked) / 12.5-13 footer / 15 lists / 16 body / 20 key figure (serif) / 28-44 heading (serif)
 *   lines  1px rgba(91,75,63,.18); square corners; the card carries the only shadow, and it is a soft one
 */
:root {
  --obs: #1D1F1E; --forest: #2C3F36; --mocha: #5B4B3F; --taupe: #6E665E; --gold: #C2A86C; --brass: #755A26;
  --stone: #E9E2D3; --sand: #F8F6F2; --paper: #FFFDF9; --ink: #2E2C2A; --ink-soft: #57514B; --line: rgba(91, 75, 63, 0.18);
  --pg-w: 600px; --pg-gutter: 14px; --pg-pad: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  /* The ground: the site's pale plaster tile and fine grain under a heavy wash of sand, so it stays close to #F8F6F2.
     The colour underneath matches, so nothing flashes before the images arrive. */
  background-color: #F7F5F0;
  background-image: url(/embed/grain-light-soft.png), linear-gradient(180deg, rgba(248, 246, 242, 0.74), rgba(248, 246, 242, 0.8)), url(/embed/tile-pale.jpg);
  background-size: 256px 256px, auto, 520px 520px;
  background-repeat: repeat, no-repeat, repeat;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-family: Raleway, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-variant-numeric: lining-nums;
}
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--gold); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }

.pg { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }

/* ---- The forest: a slim bar with the logo (most pages), or the checkout page's panel ---- */
/* The forest carries the site's forest tile and dark grain, washed back toward #2C3F36 (the site's forest sections, a touch quieter). */
.pg-top, .pg-panel {
  color: rgba(248, 246, 242, 0.84);
  background-color: var(--forest);
  background-image: url(/embed/grain-dark-soft.png), linear-gradient(180deg, rgba(44, 63, 54, 0.42), rgba(44, 63, 54, 0.5)), url(/embed/tile-forest.jpg);
  background-size: 256px 256px, auto, 520px 520px;
  background-repeat: repeat, no-repeat, repeat;
}
.pg-top :focus-visible, .pg-panel :focus-visible { outline-color: var(--gold); }
.pg-top { flex: 0 0 auto; padding: 0 var(--pg-gutter); }
.pg-brand { width: 100%; max-width: var(--pg-w); margin: 0 auto; height: 64px; display: flex; align-items: center; }
.pg-brand img, .pg-panel-logo { display: block; height: 28px; width: auto; }
/* Where a page carries the dark logo file, it is shown light on the forest. */
.pg-brand img[src$="/logo.svg"] { filter: brightness(0) invert(0.97); }

.pg-panel { flex: 0 0 auto; padding: 18px var(--pg-gutter) 26px; }
.pg-panel > * { width: 100%; max-width: var(--pg-w); margin-left: auto; margin-right: auto; }
.pg-panel-body { margin-top: 24px; }
.pg-eyebrow { margin: 0 0 8px; font-size: 11px; line-height: 1.5; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.pg-panel h1 { margin: 0; font-family: 'Libre Baskerville', Georgia, serif; font-weight: 400; font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; color: var(--sand); text-wrap: balance; overflow-wrap: anywhere; }
.pg-rule { display: none; width: 56px; height: 1px; background: var(--gold); }
.pg-panel .pg-desc { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: rgba(248, 246, 242, 0.82); text-wrap: pretty; }
.pg-desc p { margin: 0 0 8px; }
.pg-desc p:last-child { margin-bottom: 0; }
.pg-panel .pg-image { display: block; width: 100%; height: auto; margin: 18px 0 0; border-radius: 0; }

/* Light formatting (bold, italic, links, bullet lists) in the description, the sections and the thank-you message */
.pg-desc ul, .pg-section-body ul, .pg-message ul { margin: 0 0 8px; padding: 0 0 0 1.15em; }
.pg-desc ul:last-child, .pg-section-body ul:last-child, .pg-message ul:last-child { margin-bottom: 0; }
.pg-desc li, .pg-section-body li, .pg-message li { margin: 0 0 4px; padding-left: 2px; }
.pg-desc li::marker, .pg-panel .pg-section-body li::marker { color: var(--gold); }
.pg-section-body li::marker, .pg-message li::marker { color: var(--brass); }
.pg-panel strong { font-weight: 600; color: var(--sand); }
.pg-desc em, .pg-section-body em, .pg-message em { font-style: italic; }

/* Sections ("What's inside", a guarantee): titled boxes under a brass label. In the panel on wide screens;
   after the form on phones and tablets, so the form stays high on the screen. */
.pg-sections { display: flex; flex-direction: column; gap: 12px; }
.pg-sections--panel { display: none; margin-top: 24px; }
.pg-sections--after { width: 100%; max-width: var(--pg-w); margin: 16px auto 0; }
.pg-section { padding: 16px var(--pg-pad) 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 0; }
.pg-section-title { margin: 0 0 6px; font-family: inherit; font-size: 11.5px; line-height: 1.5; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); }
.pg-section-body { font-size: 15px; line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; overflow-wrap: anywhere; }
.pg-section-body p, .pg-message p { margin: 0 0 8px; }
.pg-section-body p:last-child, .pg-message p:last-child { margin-bottom: 0; }
.pg-section-body strong, .pg-message strong { font-weight: 600; color: var(--ink); }
.pg-panel .pg-section { padding: 16px 20px 18px; background: rgba(248, 246, 242, 0.04); border-color: rgba(194, 168, 108, 0.3); }
.pg-panel .pg-section-title { color: var(--gold); }
.pg-panel .pg-section-body { color: rgba(248, 246, 242, 0.82); }
.pg-panel .pg-section-body strong { color: var(--sand); }

/* The thank-you page's own message, under the lead */
.pg-message { margin: 16px 0 0; color: var(--ink-soft); text-wrap: pretty; overflow-wrap: anywhere; }
.pg-panel-foot { display: none; margin-bottom: 0; font-size: 13px; color: rgba(248, 246, 242, 0.8); }
.pg-panel a { text-decoration-color: rgba(194, 168, 108, 0.6); }

/* ---- The card, on sand ---- */
.pg-main { flex: 1 0 auto; padding: 16px var(--pg-gutter) 32px; }
.pg-card, .pg-foot { width: 100%; max-width: var(--pg-w); margin-left: auto; margin-right: auto; }
.pg-card {
  position: relative; background: var(--paper); border: 1px solid var(--line); border-top: 0; border-radius: 0;
  padding: 28px var(--pg-pad) 28px;
  box-shadow: 0 1px 2px rgba(46, 44, 42, 0.04), 0 24px 48px -32px rgba(91, 75, 63, 0.28);
}
.pg-card::before { content: ""; position: absolute; top: 0; left: -1px; right: -1px; height: 2px; background: var(--gold); }
.pg-card h1 { margin: 0; font-family: 'Libre Baskerville', Georgia, serif; font-size: 28px; line-height: 1.2; font-weight: 400; letter-spacing: -0.01em; color: var(--obs); text-wrap: balance; overflow-wrap: anywhere; }
.pg .ck { --ck-max-width: 100%; }

/* Plain pages and the thank-you page */
.pg-lead { margin: 12px 0 0; color: var(--ink-soft); text-wrap: pretty; }
.pg-muted { margin: 0; color: var(--taupe); font-size: 14px; }
.pg-h2 { margin: 32px 0 12px; font-family: inherit; font-size: 11.5px; line-height: 1.5; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); }
.pg-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.pg-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pg-list li span:first-child { min-width: 0; overflow-wrap: anywhere; }
.pg-list li span:last-child { white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.pg-list li.is-total { font-weight: 600; color: var(--obs); }
.pg-list li.is-total span:last-child { font-family: 'Libre Baskerville', Georgia, serif; font-weight: 400; font-size: 20px; line-height: 1.2; }

/* "Finishing your payment": a spinner while it works */
.pg-finish { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 16px; }
.pg-finish .ck-message { color: var(--ink-soft); }
.pg-finish[aria-busy="true"] { flex-direction: row; align-items: center; gap: 12px; }
.pg-finish[aria-busy="true"]::before {
  content: ""; flex: 0 0 auto; width: 16px; height: 16px;
  border: 2px solid var(--brass); border-right-color: transparent; border-radius: 50%;
  animation: pg-spin 0.8s linear infinite;
}
@keyframes pg-spin { to { transform: rotate(360deg); } }

/* The one line under the card: its two ends on the card's two edges */
.pg-foot { margin-top: 16px; margin-bottom: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; font-size: 12.5px; line-height: 1.6; color: var(--taupe); }
.pg-foot a { text-decoration-color: rgba(110, 102, 94, 0.4); }

@media (max-width: 359px) {
  :root { --pg-gutter: 10px; --pg-pad: 16px; }
}

/* ---- Tablets ---- */
@media (min-width: 600px) {
  :root { --pg-gutter: 24px; --pg-pad: 48px; }
  .pg-brand { height: 76px; }
  .pg-brand img, .pg-panel-logo { height: 30px; }
  .pg-panel { padding: 23px var(--pg-gutter) 40px; }
  .pg-panel-body { margin-top: 36px; }
  .pg-eyebrow { margin-bottom: 12px; font-size: 11.5px; }
  .pg-panel h1 { font-size: 36px; }
  .pg-rule { display: block; margin: 20px 0; }
  .pg-panel .pg-desc { margin: 0; font-size: 16px; line-height: 1.7; }
  .pg-main { padding: 40px var(--pg-gutter) 64px; }
  .pg-card { padding-top: 46px; padding-bottom: 48px; }
  .pg-card h1 { font-size: 32px; }
  .pg-foot { margin-top: 20px; }
}

/* ---- Desktop checkout: the panel on the left, full height; the form on the right ---- */
@media (min-width: 960px) {
  .pg--split { flex-direction: row; align-items: stretch; }
  .pg--split .pg-panel {
    flex: 0 0 42%; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 56px clamp(40px, 5vw, 96px) 48px;
  }
  .pg--split .pg-panel > * { max-width: 30rem; margin-left: 0; margin-right: 0; }
  .pg--split .pg-panel-body { margin: 0; padding: 40px 0; }
  .pg--split .pg-eyebrow { margin-bottom: 18px; }
  .pg--split .pg-panel h1 { font-size: clamp(34px, 3.4vw, 46px); line-height: 1.15; }
  .pg--split .pg-rule { margin: 28px 0; }
  .pg--split .pg-panel .pg-desc { font-size: 17px; line-height: 1.75; }
  .pg--split .pg-panel .pg-image { margin-top: 28px; }
  .pg--split .pg-panel-foot { display: block; }
  .pg--split .pg-sections--panel { display: flex; margin-top: 32px; }
  .pg--split .pg-sections--after { display: none; }
  .pg--split .pg-panel .pg-section { padding: 18px 22px 20px; }
  .pg--split .pg-panel .pg-section-body { font-size: 15.5px; line-height: 1.65; }
  .pg--split .pg-main { flex: 1 1 auto; min-width: 0; padding: 56px 40px 72px; }
  .pg--split .pg-foot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pg-finish[aria-busy="true"]::before { animation: none; border-right-color: var(--brass); opacity: 0.5; }
}
