/* Appily-OneHundred cart ONLY — Spine Folio
   Isolation: scoped to body.page-a100-blotter · loaded via a100-shell-head.php
   (shared Typebar Cascade nav — same as index.php).
   Never pair with a36-cart.css / style.css / store-chrome.css / a100-intray-* /
   shared .page-cart recipes / peer Appily-* cart sheets.
   Session cookie APPSESSappilyonehundred.

   Button map (not peer clones):
   - Keep = bookmark ribbon from book gutter
   - No dual Update/Keep under lines (qty autosaves)
   - Checkout = press lever under centered wax seal on RECTO page
*/

:root {
  --a100-ink: #182030;
  --a100-ink-deep: #0F141F;
  --a100-text: #141820;
  --a100-mute: #3E4A5C;
  --a100-field: #FFF0E4;
  --a100-field-2: #FFE4D0;
  --a100-surface: #FFFFFF;
  --a100-accent: #E8330C;
  --a100-accent-deep: #A8240A;
  --a100-secondary: #008F82;
  --a100-secondary-deep: #005F58;
  --a100-bloom: #FFC933;
  --a100-bloom-ink: #2E2400;
  --a100-on-ink: #FFF6EE;
  --a100-placeholder: #5A6578;
  --a100-shadow-hard: 5px 5px 0 #182030;
  --a100-font-display: "Grandstander", system-ui, sans-serif;
  --a100-font-body: "Commissioner", system-ui, sans-serif;
  --a100-max: 1180px;
  --bf-paper: #FFFBF5;
  --bf-rule: rgba(24, 32, 48, 0.12);
  --bf-wax: #C41E0A;
  --bf-wax-deep: #8B1408;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.page-a100-blotter {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--a100-font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--a100-text);
  background:
    radial-gradient(ellipse 50% 40% at 85% 10%, rgba(255, 201, 51, 0.22), transparent 60%),
    radial-gradient(ellipse 40% 35% at 5% 80%, rgba(0, 143, 130, 0.10), transparent 55%),
    linear-gradient(160deg, var(--a100-field) 0%, var(--a100-field-2) 55%, #FFD8BE 100%);
  -webkit-font-smoothing: antialiased;
}

body.page-a100-blotter ::placeholder {
  color: var(--a100-placeholder);
  opacity: 1;
}

body.page-a100-blotter .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0; white-space: nowrap;
}

/* —— Main —— */
body.page-a100-blotter .bf-main {
  flex: 1;
  width: min(100% - 40px, var(--a100-max));
  margin: 0 auto;
  padding: 28px 0 72px;
}

body.page-a100-blotter .bf-mast {
  margin-bottom: 28px;
  max-width: 40rem;
}
body.page-a100-blotter .bf-kicker {
  margin: 0 0 6px;
  font-family: var(--a100-font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--a100-secondary-deep);
}
body.page-a100-blotter .bf-mast h1 {
  margin: 0 0 10px;
  font-family: var(--a100-font-display);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 800;
  color: var(--a100-ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
body.page-a100-blotter .bf-lede {
  margin: 0;
  color: var(--a100-mute);
  max-width: 38ch;
}

/* —— Empty: closed book + ribbon pull (not dashed card + coral CTA) —— */
body.page-a100-blotter .bf-empty {
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: 420px;
  padding: 8px 0 24px;
}
body.page-a100-blotter .bf-empty-book {
  position: relative;
  width: 140px;
  height: 170px;
  margin-bottom: 8px;
}
body.page-a100-blotter .bf-empty-cover {
  position: absolute;
  inset: 0 12px 0 0;
  background: var(--a100-accent);
  border: 3px solid var(--a100-ink);
  border-radius: 4px 10px 10px 4px;
  box-shadow: var(--a100-shadow-hard);
}
body.page-a100-blotter .bf-empty-cover::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; top: 22%;
  height: 3px;
  background: var(--a100-bloom);
  box-shadow: 0 14px 0 var(--a100-bloom), 0 28px 0 var(--a100-bloom);
}
body.page-a100-blotter .bf-empty-edge {
  position: absolute;
  top: 8px; bottom: 8px; right: 0;
  width: 14px;
  background:
    repeating-linear-gradient(
      180deg,
      #F4E8D8 0 6px,
      #E8D4BC 6px 7px
    );
  border: 2px solid var(--a100-ink);
  border-left: 0;
  border-radius: 0 6px 6px 0;
}
body.page-a100-blotter .bf-empty h2 {
  margin: 0;
  font-family: var(--a100-font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--a100-ink);
}
body.page-a100-blotter .bf-empty p {
  margin: 0;
  color: var(--a100-mute);
}
body.page-a100-blotter .bf-ribbon {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  color: var(--a100-ink) !important;
  font-family: var(--a100-font-display);
  font-weight: 800;
  font-size: 0.95rem;
  margin-top: 6px;
}
body.page-a100-blotter .bf-ribbon--empty span {
  display: inline-block;
  padding: 12px 22px 12px 18px;
  background: var(--a100-bloom);
  border: 3px solid var(--a100-ink);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
  box-shadow: 4px 4px 0 var(--a100-ink);
  transition: transform 0.2s ease;
}
body.page-a100-blotter .bf-ribbon--empty:hover span,
body.page-a100-blotter .bf-ribbon--empty:focus-visible span {
  transform: translate(-2px, -2px);
  outline: none;
}

/* —— Open book —— */
body.page-a100-blotter .bf-form { margin: 0; }
body.page-a100-blotter .bf-book {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 18px minmax(0, 0.85fr);
  gap: 0;
  background: var(--bf-paper);
  border: 3px solid var(--a100-ink);
  box-shadow: var(--a100-shadow-hard);
  min-height: 520px;
}

/* Bookmark ribbon — Keep shopping (unique placement) */
body.page-a100-blotter .bf-bookmark {
  position: absolute;
  top: -18px;
  left: 46%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 56px;
  text-decoration: none !important;
  color: var(--a100-ink) !important;
  filter: drop-shadow(2px 3px 0 rgba(24, 32, 48, 0.25));
  transition: transform 0.25s ease;
}
body.page-a100-blotter .bf-bookmark:hover,
body.page-a100-blotter .bf-bookmark:focus-visible {
  transform: translateY(-4px);
  outline: none;
}
body.page-a100-blotter .bf-bookmark-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: var(--a100-secondary);
  color: #fff;
  font-family: var(--a100-font-display);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 14px 8px 18px;
  border: 2px solid var(--a100-ink);
  border-bottom: 0;
}
body.page-a100-blotter .bf-bookmark-tail {
  width: 0; height: 0;
  border-left: 28px solid transparent;
  border-right: 28px solid transparent;
  border-top: 16px solid var(--a100-secondary);
  margin-top: -1px;
  filter: drop-shadow(0 2px 0 var(--a100-ink));
}

body.page-a100-blotter .bf-gutter {
  background:
    linear-gradient(90deg, rgba(24, 32, 48, 0.18), rgba(24, 32, 48, 0.05) 40%, rgba(24, 32, 48, 0.05) 60%, rgba(24, 32, 48, 0.18)),
    repeating-linear-gradient(
      180deg,
      #C8B8A4 0 3px,
      #B8A690 3px 6px
    );
  border-left: 1px solid rgba(24, 32, 48, 0.2);
  border-right: 1px solid rgba(24, 32, 48, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  padding: 24px 0;
}
body.page-a100-blotter .bf-gutter span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--a100-ink);
  opacity: 0.35;
}

/* Verso — line ledger (no foot CTAs) */
body.page-a100-blotter .bf-verso {
  padding: 28px 22px 28px 24px;
  background:
    repeating-linear-gradient(
      transparent,
      transparent 31px,
      var(--bf-rule) 31px,
      var(--bf-rule) 32px
    );
  border-right: 0;
}
body.page-a100-blotter .bf-page-head {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--a100-ink);
}
body.page-a100-blotter .bf-page-head h2 {
  margin: 0;
  font-family: var(--a100-font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--a100-ink);
}
body.page-a100-blotter .bf-page-head p {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--a100-mute);
}

body.page-a100-blotter .bf-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

body.page-a100-blotter .bf-line {
  display: grid;
  grid-template-columns: 28px 64px minmax(0, 1fr) auto;
  grid-template-areas:
    "rule thumb copy copy"
    "rule thumb dial due"
    "rule thumb strike strike";
  gap: 6px 10px;
  align-items: center;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid transparent;
  border-bottom: 2px solid var(--a100-ink);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
body.page-a100-blotter .bf-line.is-struck {
  opacity: 0;
  transform: translateX(-12px) skewX(-2deg);
  background: rgba(232, 51, 12, 0.12);
}
body.page-a100-blotter .bf-rule {
  grid-area: rule;
  font-family: var(--a100-font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--a100-secondary-deep);
}
body.page-a100-blotter .bf-thumb {
  grid-area: thumb;
  width: 64px; height: 64px;
  border: 2px solid var(--a100-ink);
  background: var(--a100-field);
  overflow: hidden;
  text-decoration: none;
  display: grid;
  place-items: center;
}
body.page-a100-blotter .bf-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
body.page-a100-blotter .bf-thumb-ph {
  font-family: var(--a100-font-display);
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--a100-accent);
}
body.page-a100-blotter .bf-line-copy { grid-area: copy; min-width: 0; }
body.page-a100-blotter .bf-line-copy h3 {
  margin: 0;
  font-family: var(--a100-font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}
body.page-a100-blotter .bf-line-copy h3 a {
  color: var(--a100-ink);
  text-decoration: none;
}
body.page-a100-blotter .bf-line-copy h3 a:hover,
body.page-a100-blotter .bf-line-copy h3 a:focus-visible {
  color: var(--a100-accent-deep);
  outline: none;
}
body.page-a100-blotter .bf-meta {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--a100-mute);
}
body.page-a100-blotter .bf-unit {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--a100-secondary-deep);
}

body.page-a100-blotter .bf-dial {
  grid-area: dial;
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--a100-ink);
  background: var(--a100-surface);
  border-radius: 999px;
  overflow: hidden;
}
body.page-a100-blotter .bf-dial-btn {
  width: 32px; height: 32px;
  border: 0;
  background: var(--a100-field);
  color: var(--a100-ink);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}
body.page-a100-blotter .bf-dial-btn:hover,
body.page-a100-blotter .bf-dial-btn:focus-visible {
  background: var(--a100-bloom);
  outline: none;
}
body.page-a100-blotter .bf-dial input {
  width: 40px;
  border: 0;
  text-align: center;
  font: inherit;
  font-weight: 700;
  background: transparent;
  color: var(--a100-ink);
  -moz-appearance: textfield;
}
body.page-a100-blotter .bf-dial input::-webkit-outer-spin-button,
body.page-a100-blotter .bf-dial input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
body.page-a100-blotter .bf-line-due {
  grid-area: due;
  font-family: var(--a100-font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--a100-ink);
  justify-self: end;
}
body.page-a100-blotter .bf-strike {
  grid-area: strike;
  justify-self: start;
  margin-top: 2px;
  border: 0;
  background: transparent;
  color: var(--a100-accent-deep);
  font-family: var(--a100-font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0;
}
body.page-a100-blotter .bf-strike:hover,
body.page-a100-blotter .bf-strike:focus-visible {
  color: var(--a100-ink);
  outline: none;
}

/* Recto — centered wax seal + press lever (not hang-tag aside stack) */
body.page-a100-blotter .bf-recto {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 36px 24px 32px;
  background:
    radial-gradient(circle at 50% 38%, rgba(232, 51, 12, 0.08), transparent 55%),
    linear-gradient(180deg, #FFF8F0 0%, #FFE8D4 100%);
  text-align: center;
}
body.page-a100-blotter .bf-recto-kicker {
  margin: 0;
  font-family: var(--a100-font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--a100-secondary-deep);
}

body.page-a100-blotter .bf-seal {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: scale(0.94);
  opacity: 0.85;
  transition: transform 0.55s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.4s ease;
}
body.page-a100-blotter .bf-seal.is-pressed {
  transform: scale(1);
  opacity: 1;
}
body.page-a100-blotter .bf-seal-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 0deg,
      var(--bf-wax) 0 8deg,
      var(--bf-wax-deep) 8deg 16deg
    );
  box-shadow:
    0 0 0 4px var(--a100-ink),
    6px 8px 0 rgba(24, 32, 48, 0.2);
}
body.page-a100-blotter .bf-seal-core {
  position: relative;
  z-index: 1;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bf-wax);
  border: 3px solid #5C0E06;
  color: #FFF5E8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px;
}
body.page-a100-blotter .bf-seal-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.9;
}
body.page-a100-blotter .bf-seal-total {
  font-family: var(--a100-font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}
body.page-a100-blotter .bf-seal-break {
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.92;
}
body.page-a100-blotter .bf-seal-break div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 88px;
}
body.page-a100-blotter .bf-seal-break dt { margin: 0; }
body.page-a100-blotter .bf-seal-break dd { margin: 0; font-weight: 800; }

/* Press lever — primary checkout (unique vs full-width coral under score) */
body.page-a100-blotter .bf-press {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  color: var(--a100-ink) !important;
  min-width: 160px;
}
body.page-a100-blotter .bf-press-knob {
  width: 54px;
  height: 22px;
  border-radius: 11px;
  background: var(--a100-bloom);
  border: 3px solid var(--a100-ink);
  box-shadow: 0 4px 0 var(--a100-ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
body.page-a100-blotter .bf-press-label {
  display: block;
  width: 100%;
  padding: 12px 18px;
  background: var(--a100-accent);
  color: #fff;
  font-family: var(--a100-font-display);
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
  border: 3px solid var(--a100-ink);
  box-shadow: 4px 4px 0 var(--a100-ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
body.page-a100-blotter .bf-press:hover .bf-press-knob,
body.page-a100-blotter .bf-press:focus-visible .bf-press-knob {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--a100-ink);
}
body.page-a100-blotter .bf-press:hover .bf-press-label,
body.page-a100-blotter .bf-press:focus-visible .bf-press-label {
  background: var(--a100-accent-deep);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--a100-ink);
  outline: none;
}

body.page-a100-blotter .bf-ship {
  margin: 0;
  max-width: 26ch;
  font-size: 0.82rem;
  color: var(--a100-mute);
}

body.page-a100-blotter .bf-stamp {
  width: min(100%, 240px);
  margin-top: 4px;
  padding-top: 14px;
  border-top: 2px dashed rgba(24, 32, 48, 0.25);
  text-align: left;
}
body.page-a100-blotter .bf-stamp label {
  display: block;
  font-family: var(--a100-font-display);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--a100-ink);
}
body.page-a100-blotter .bf-stamp-row {
  display: flex;
  gap: 0;
  border: 2px solid var(--a100-ink);
  background: var(--a100-surface);
  overflow: hidden;
}
body.page-a100-blotter .bf-stamp-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 10px 12px;
  font: inherit;
  background: transparent;
  color: var(--a100-ink);
}
body.page-a100-blotter .bf-stamp-btn {
  border: 0;
  border-left: 2px solid var(--a100-ink);
  background: var(--a100-secondary);
  color: #fff;
  font-family: var(--a100-font-display);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 10px 12px;
  cursor: pointer;
  white-space: nowrap;
}
body.page-a100-blotter .bf-stamp-btn:hover,
body.page-a100-blotter .bf-stamp-btn:focus-visible {
  background: var(--a100-secondary-deep);
  outline: none;
}
body.page-a100-blotter .bf-stamp-note {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--a100-secondary-deep);
}
body.page-a100-blotter .bf-stamp-note.is-error {
  color: var(--a100-accent-deep);
}

/* Pigeon foot sits below; ensure main grows */
body.page-a100-blotter .ph-foot,
body.page-a100-blotter footer {
  margin-top: auto;
}

@media (max-width: 960px) {
  body.page-a100-blotter .bf-book {
    grid-template-columns: 1fr;
    grid-template-rows: auto 12px auto;
  }
  body.page-a100-blotter .bf-gutter {
    flex-direction: row;
    padding: 0 24px;
    min-height: 12px;
  }
  body.page-a100-blotter .bf-gutter span {
    width: 6px; height: 6px;
  }
  body.page-a100-blotter .bf-bookmark {
    left: auto;
    right: 18px;
    top: -14px;
  }
  body.page-a100-blotter .bf-recto {
    padding-top: 28px;
  }
}

@media (max-width: 720px) {
  body.page-a100-blotter .bf-main {
    width: min(100% - 24px, var(--a100-max));
    padding-top: 20px;
  }
  body.page-a100-blotter .bf-line {
    grid-template-columns: 24px 56px minmax(0, 1fr);
    grid-template-areas:
      "rule thumb copy"
      "rule thumb dial"
      "rule thumb due"
      "rule thumb strike";
  }
  body.page-a100-blotter .bf-line-due { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  body.page-a100-blotter .bf-seal,
  body.page-a100-blotter .bf-line,
  body.page-a100-blotter .bf-bookmark,
  body.page-a100-blotter .bf-press-knob,
  body.page-a100-blotter .bf-press-label {
    transition: none;
  }
  body.page-a100-blotter .bf-seal {
    transform: none;
    opacity: 1;
  }
}
