@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@600;700;800&family=Inter:wght@400;500;600;700;800&family=EB+Garamond&family=Merriweather&family=Cormorant+Garamond&family=Spectral&family=Literata&family=Source+Serif+4&display=swap');
/* The six extra families above (EB Garamond, Merriweather, Cormorant
   Garamond, Spectral, Literata, Source Serif 4) are ONLY for the Step 1
   wizard's live sample-paragraph preview (#page-preview, driven by
   PRESET_BODY_FONTS in app.js) -- they mirror each genre preset's real
   body_font_stack (backend/layout/presets.py) so the on-screen preview
   is a close match, not a generic placeholder. Nothing printed/exported
   reads these; the actual PDF/EPUB body text is set by the backend's own
   embedded fonts, independent of what loads here. */

:root {
  --parchment: #fcfbf7;
  --parchment-deep: #f3efe4;
  --navy: #0f2233;
  --navy-2: #1c3549;
  --gold: #f4b236;
  --gold-deep: #d9932a;
  --muted: #5b6b78;
  --line: #e4ddc9;
  --error: #a3312a;
  --success: #3f7a5c;
  --radius: 14px;
  --display: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 2px rgba(15, 34, 51, .06);
  --shadow-md: 0 12px 28px -14px rgba(15, 34, 51, .28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--parchment);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

header.site {
  text-align: center;
  margin-bottom: 40px;
}

header.site .brand-mark {
  height: 50px;
  width: auto;
  display: inline-block;
  /* Source PNG is a solid navy mark; brightness(0)+invert(1) recolors it
     white so it reads against the page's new navy background below. */
  filter: brightness(0) invert(1);
}

header.site .tagline {
  color: #aebdc8;
  font-size: 0.95rem;
  margin-top: 10px;
}

.card {
  background: #fff;
  /* Text inside the card defaults to navy regardless of what body sets
     (body is now parchment-on-navy for the page backdrop) -- without this,
     every element in here that doesn't set its own color (h1 titles,
     .status-text, the price-line's plain label, the dropzone prompt)
     silently inherits body's parchment color and disappears against this
     white background. Anything that wants a different color still
     overrides it explicitly below, same as before. */
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.screen {
  animation: fade-in 0.2s ease;
}

.screen[hidden] {
  display: none !important;
}

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

h1 {
  font-family: var(--display);
  font-size: 1.4rem;
  margin: 0 0 8px;
}

h1 .step,
h2 .step {
  color: var(--gold-deep);
  font-weight: 700;
  font-size: 0.82rem;
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

p.helper {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0;
}

.field {
  margin-bottom: 22px;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: var(--navy);
}

.field .hint {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

.field .hint-explainer {
  line-height: 1.5;
}

/* Live decorative-initial font swatch -- see index.html's
   #decorative-font-preview and app.js's updateDecorativeFontPreview().
   A quick specimen letter in the selected font, right next to the
   picker, so a customer can see what it looks like without leaving this
   screen for the full "Preview my book" render. */
.decorative-font-preview {
  margin-top: 10px;
  padding: 14px 0 6px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: center;
  min-height: 84px;
  background: var(--parchment-deep);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.decorative-font-preview span {
  font-size: 64px;
  line-height: 1;
  color: var(--navy);
  /* app.js sets font-family per selection; this is just a sane fallback
     before the chosen font's @font-face has loaded or if it fails. */
  font-family: var(--display);
}

/* ---- Step 1 redesign: custom picker widgets ----
   Trim size / Style / Chapter opener / Text size / Format each keep a
   real, functional <select> (see .sr-only-select below) driving every
   existing app.js code path unchanged -- these are purely the visible
   swatch/card/pill/chip layer on top of it, built and kept in sync by
   app.js's "custom picker widgets" section. */

/* Visually hides a <select> without removing it from the DOM or from
   being a normal, settable form control -- app.js still reads/writes
   .value on it directly and it still participates in form submission.
   Paired with aria-hidden="true" + tabindex="-1" in the markup so it's
   also out of the accessibility tree and tab order (the custom widget
   next to it provides full keyboard/ARIA support instead -- see
   wireRadioGroup() in app.js). Standard visually-hidden pattern, not
   display:none, so nothing about the element's presence/size assumptions
   elsewhere breaks. */
.sr-only-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.progress-row {
  margin-bottom: 20px;
}

.progress-segments {
  display: flex;
  gap: 5px;
}

.progress-segments span {
  height: 5px;
  flex: 1;
  border-radius: 3px;
  background: var(--line);
}

.progress-segments span.done {
  background: var(--gold);
}

.progress-labels {
  display: flex;
  margin-top: 6px;
}

.progress-labels span {
  flex: 1;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.progress-labels span.current {
  color: var(--gold-deep);
}

.dz-icon {
  color: var(--navy);
  margin-bottom: 6px;
}

.dz-title {
  font-weight: 600;
}

.dz-sub {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

.dropzone.filled {
  border-style: solid;
  border-color: var(--success);
  background: #eef4ee;
}

.dropzone.filled .filename::before {
  content: "\2713  ";
  color: var(--success);
  font-weight: 700;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 12px;
}

.field-head label {
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.info-toggle {
  font-size: 0.74rem;
  color: var(--gold-deep);
  font-weight: 700;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--sans);
  text-align: right;
}

.info-toggle:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}

.info-panel {
  display: none;
  background: var(--parchment-deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.info-panel.open {
  display: block;
}

.micro {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 8px;
}

.micro b {
  color: var(--navy);
}

.trim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.trim-card {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: var(--parchment-deep);
  text-align: center;
}

.trim-card:hover {
  border-color: var(--gold-deep);
}

.trim-card.selected {
  border-color: var(--gold-deep);
  background: #fdf3dc;
  box-shadow: 0 0 0 1px var(--gold-deep) inset;
}

.trim-card:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 2px;
}

.trim-swatch {
  background: #fff;
  border: 1.5px solid var(--navy-2);
  border-radius: 2px;
}

.trim-card .t-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
}

.trim-card .t-tag {
  position: absolute;
  top: -8px;
  right: -6px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.56rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.trim-card .check {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-deep);
  display: none;
  align-items: center;
  justify-content: center;
}

.trim-card.selected .check {
  display: flex;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.style-card {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  background: var(--parchment-deep);
  text-align: center;
}

.style-card:hover {
  border-color: var(--gold-deep);
}

.style-card.selected {
  border-color: var(--gold-deep);
  background: #fdf3dc;
}

.style-card:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 2px;
}

.style-card .s-letter {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--navy);
}

.style-card .s-label {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--navy);
}

.page-preview {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf7;
  padding: 16px 18px;
  min-height: 88px;
  overflow: hidden;
}

.page-preview .pp-cap {
  float: left;
  font-size: 2.6em;
  line-height: 0.82;
  margin-right: 7px;
  color: var(--navy);
}

.page-preview .pp-body {
  color: #2c3a45;
}

/* Chapter heading mock at the top of #page-preview -- same "illustrative,
   not pixel-exact" mockup as the homepage Style Inspector's #ipHeadingMock
   (frontend/index.html), ported to this preview's light parchment palette
   instead of that section's dark navy one. Built/updated by
   renderPagePreview() in app.js so a customer sees their chosen Chapter
   heading layout + Chapter numbers reflected live, the same way the
   sample paragraph below it already reflects Style/Chapter opener/Text
   size -- see the field comment above #chapter-heading-style-pill-row. */
.page-preview .pp-heading {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.page-preview .pp-heading-number {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--navy);
  font-size: 0.85rem;
  text-align: center;
}

.page-preview .pp-heading-divider {
  display: none;
  width: 30px;
  height: 2px;
  background: var(--gold);
  margin: 8px auto;
  border-radius: 2px;
}

.page-preview .pp-heading-divider.show {
  display: block;
}

.page-preview .pp-heading-title {
  font-family: var(--display);
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
  text-align: center;
  margin-top: 4px;
}

.page-preview .pp-heading.align-left .pp-heading-number,
.page-preview .pp-heading.align-left .pp-heading-title {
  text-align: left;
}

.page-preview .pp-heading.align-left .pp-heading-divider {
  margin: 8px 0;
}

.page-preview .pp-heading.style-numeral_ornament .pp-heading-number {
  font-size: 1.5rem;
}

.page-preview .pp-heading.style-left_block {
  border-bottom: none;
  padding-bottom: 0;
}

.page-preview .pp-heading.style-left_block .pp-heading-number {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.page-preview .pp-heading.style-left_block .pp-heading-title {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.page-preview-caption {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
  font-style: italic;
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border: 1.5px solid var(--line);
  border-radius: 30px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  background: var(--parchment-deep);
}

.pill:hover {
  border-color: var(--gold-deep);
}

.pill.selected {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.pill:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 2px;
}

.pill .rec {
  font-weight: 600;
  opacity: 0.7;
  font-size: 0.72em;
}

.decorative-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-top: 4px;
}

.d-chip {
  flex: 0 0 auto;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 64px;
  text-align: center;
  cursor: pointer;
  background: var(--parchment-deep);
}

.d-chip:hover {
  border-color: var(--gold-deep);
}

.d-chip.selected {
  border-color: var(--gold-deep);
  background: #fdf3dc;
}

.d-chip:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 2px;
}

.d-chip .dc-letter {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--navy);
}

.d-chip .dc-label {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
}

/* Price line + submit button, pinned to the bottom of the viewport while
   the rest of the form scrolls above it (position: sticky against .card,
   which is taller than the viewport on the real device this was designed
   for -- a phone). The negative side/bottom margins bleed it out to
   .card's own edges (.card has 32px padding -- see the media query
   override below for the 22px mobile breakpoint) so it reads as a single
   flush bar rather than a floating box with its own margins. */
.sticky-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  margin: 24px -32px -32px;
  padding: 16px 32px 32px;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 16px -12px rgba(15, 34, 51, 0.18);
}

.sticky-actions .price-line {
  margin: 0 0 14px;
  padding-top: 0;
  border-top: none;
}

input[type="file"],
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--sans);
  background: var(--parchment-deep);
  color: var(--navy);
}

select:focus,
input[type="file"]:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.dropzone {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.drag-over {
  border-color: var(--gold-deep);
  background: var(--parchment-deep);
}

.dropzone .filename {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 8px;
}

button {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

button.primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

button.primary:hover:not(:disabled) {
  background: var(--gold-deep);
  box-shadow: var(--shadow-md);
}

button.primary:disabled {
  background: var(--parchment-deep);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

button.secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}

button.secondary:hover {
  background: var(--parchment-deep);
}

.button-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

/* "What's included" checklist on the preview screen -- see the HTML
   comment above #preview-includes-list in index.html for why this exists
   and why it's populated dynamically rather than hand-written per format. */
.includes-box {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--parchment-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.includes-heading {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}

.includes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.includes-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--navy-2);
  line-height: 1.4;
}

.includes-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  background-color: var(--success);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  border-radius: 50%;
}

/* Screen 2's "I agree to the Terms of Service" gate on the preview screen
   -- reuses .field's spacing/margin rhythm rather than inventing a new one,
   just swapping the bold .field label for a normal-weight inline checkbox
   label since this isn't a section heading like the other .field labels
   are. */
.tos-field {
  margin-top: 4px;
}

.tos-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--navy);
  cursor: pointer;
}

.tos-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: none;
  accent-color: var(--gold-deep);
  cursor: pointer;
}

.tos-label a {
  color: var(--gold-deep);
  font-weight: 700;
  text-decoration: underline;
}

.tos-label a:hover {
  color: var(--navy);
}

.preview-frame-wrap {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  /* Defensive addition for the 2026-10-13 mobile-scroll bug -- doesn't
     fix the underlying iOS iframe/PDF limitation on its own (that's what
     #preview-open-new-tab is for), but costs nothing and helps on
     browsers where the only issue is momentum scrolling. */
  -webkit-overflow-scrolling: touch;
}

.preview-frame {
  display: block;
  width: 100%;
  height: min(70vh, 640px);
  border: none;
}

/* 2026-10-13: reliable fallback for the iOS Safari blob-PDF-in-iframe
   scroll bug -- see the HTML comment above this link's markup. */
.preview-open-new-tab {
  display: block;
  margin: -8px 0 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: underline;
  text-align: center;
}

.preview-open-new-tab:hover {
  color: var(--accent, var(--navy));
}

.price-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 24px 0 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.price-line .amount {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
}

.error-box {
  background: #fdecea;
  border: 1px solid #f3c6c2;
  color: var(--error);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.notice-box {
  background: #fdf3dc;
  border: 1px solid #f0d99a;
  color: var(--gold-deep);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid var(--line);
  border-top-color: var(--gold-deep);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Pre-flight scan panel (screen 1, right under the dropzone) — see
   index.html's comment on #preflight-panel and app.js's runPreflightScan().
   Reuses .spinner/@keyframes spin above rather than a second spinner style. */
.preflight-panel {
  margin-top: 10px;
}

/* :not([hidden]) rather than a plain .preflight-scanning selector -- an
   author-stylesheet `display: flex` here would otherwise beat the
   browser's own `[hidden] { display: none }` UA rule (author rules win
   ties with UA rules regardless of selector specificity), so
   preflightScanning.hidden = true from app.js would stop being true
   visually even though it's true in the DOM. Caught via a real rendered
   screenshot during verification, not just a DOM-property check -- see
   app.js's own comment on the earlier font-family quote-collision bug for
   why this screen's testing always checks actual rendering. */
.preflight-scanning:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.preflight-scanning .spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.preflight-clear {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--success);
}

.preflight-findings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preflight-finding {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.45;
  border: 1px solid var(--line);
  background: var(--parchment-deep);
  color: var(--navy-2);
}

.preflight-finding.warn {
  background: #fdf3dc;
  border-color: #f0d99a;
  color: #7a5c14;
}

.preflight-finding .pf-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border-radius: 4px;
  color: #fff;
  background: var(--navy-2);
  margin-top: 1px;
}

.preflight-finding.warn .pf-badge {
  background: var(--gold-deep);
}

.status-text {
  font-size: 1rem;
}

.status-sub {
  color: var(--muted);
  font-size: 0.85rem;
}

.download-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.download-buttons a {
  flex: 1;
  display: block;
  text-align: center;
  text-decoration: none;
  background: var(--gold);
  color: var(--navy);
  padding: 13px 0;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.download-buttons a:hover {
  background: var(--gold-deep);
  box-shadow: var(--shadow-md);
}

.download-buttons a[hidden] {
  /* The a[hidden] declaration above ".download-buttons a { display: block }"
     wins by source order + equal specificity, so a single-format purchase
     (app.js hides whichever download link wasn't part of what was bought)
     actually disappears instead of rendering as a dead link. */
  display: none;
}

.expiry-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 16px;
  text-align: center;
}

.review-note {
  font-size: 0.85rem;
  background: #eef4ee;
  color: var(--success);
  border: 1px solid #c9e0cb;
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 16px;
}

footer.site {
  text-align: center;
  margin-top: 40px;
  color: #aebdc8;
  font-size: 0.8rem;
}

footer.site p {
  margin: 0 0 8px;
}

footer.site p:last-child {
  margin-bottom: 0;
}

footer.site a {
  color: #aebdc8;
  text-decoration: underline;
}

footer.site a:hover {
  color: #ffffff;
}

@media (max-width: 480px) {
  .wrap { padding: 28px 14px 60px; }
  .card { padding: 22px; }
  .sticky-actions { margin: 24px -22px -22px; padding: 16px 22px 22px; }
}
