/*
  PT Session Ledger · product page styles (owned by seed-etsy-ptledger)
  Loaded after /assets/site.css on every /pt-session-ledger/ page. Uses the shared classes and
  only adds ptl- prefixed ones, plus token overrides scoped to these pages.
  Direction: "Coach's ledger". Paper, ink, navy sheet header, amber input cells, and one orange
  accent used only for the marker ring around the cell that matters.
*/

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2");
}

/* Light only, to match the Etsy images. html:root beats the shared :root and its dark block. */
html:root {
  color-scheme: light;
  --bg: #f6f2ea;
  --bg-alt: #efe9dd;
  --surface: #ffffff;
  --surface-2: #f1ece2;
  --ink: #15283a;
  --ink-2: #374857;
  --ink-3: #55646f;
  --line: #e3dccd;
  --line-strong: #cbc1ad;
  --accent: #15283a;
  --accent-ink: #f6f2ea;
  --accent-edge: #15283a;
  --accent-soft: #fff5df;
  --link: #253c50;
  --link-hover: #15283a;
  --focus: #253c50;
  --warn-bg: #fff5df;
  --warn-line: #ecd6a6;
  --warn-ink: #6b4a00;
  --shadow-1: 0 1px 2px rgb(21 40 58 / 0.06), 0 1px 1px rgb(21 40 58 / 0.04);
  --shadow-2: 0 1px 2px rgb(21 40 58 / 0.05), 0 8px 24px -8px rgb(21 40 58 / 0.14);

  --ptl-paper: #f6f2ea;
  --ptl-ink: #15283a;
  --ptl-navy: #253c50;
  --ptl-orange: #e8572a;
  --ptl-amber: #fff5df;
  --ptl-display: "Bricolage Grotesque", var(--font-sans);
  --ptl-sheet-shadow: 0 1px 0 rgb(21 40 58 / 0.06), 0 30px 60px -28px rgb(21 40 58 / 0.42), 0 0 0 1px rgb(21 40 58 / 0.08);
}
/* Undo the shared dark-scheme tweaks that assume a dark page. */
@media (prefers-color-scheme: dark) {
  .ptl .feature__icon { color: var(--ink); }
  .ptl .brand__mark { box-shadow: none; }
  .ptl .appnav__icon, .ptl .hero__icon { box-shadow: none; }
  .ptl .appnav__links a[aria-current="page"]::after { background: var(--ink); }
  .ptl .plan--featured { border-color: var(--ink); }
  .ptl .plan__list li::before { border-color: var(--ink); }
}

.ptl ::selection { background: var(--ptl-amber); color: var(--ptl-ink); }

/* Buttons: ink fill instead of the site lime. */
.ptl .btn--primary { background: var(--ptl-ink); color: var(--ptl-paper); border-color: var(--ptl-ink); }
.ptl .btn--primary:hover { background: var(--ptl-navy); color: #fff; }
.ptl .btn--secondary { background: transparent; }

/* Headline face */
.ptl-display,
.ptl .page-head__title {
  font-family: var(--ptl-display);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.ptl-hl { color: var(--ptl-orange); }

/* ---------- Etsy button: one href switches it on ----------
   While the href starts with "#", the button looks inactive and says "Coming soon".
   Give it the real Etsy URL and it becomes the normal primary button, and the
   "Coming soon to Etsy" notes beside it disappear. */
.ptl-etsy__soon {
  display: none;
  padding: 0.1rem 0.5rem;
  border-radius: var(--r-pill);
  background: var(--ptl-amber);
  color: var(--ptl-ink);
  font-size: var(--t-xs);
  font-weight: 600;
}
.ptl-etsy[href^="#"] {
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px dashed var(--line-strong);
}
.ptl-etsy[href^="#"]:hover { background: var(--surface-2); color: var(--ink); }
.ptl-etsy[href^="#"] .ptl-etsy__soon { display: inline-block; }
.ptl-soon-note { color: var(--ink-3); font-size: var(--t-sm); }
.ptl-soon-note strong { color: var(--ink); font-weight: 620; }
:is(.hero__actions, .ptl-buy__actions):has(.ptl-etsy[href^="http"]) + .ptl-soon-note,
.ptl-hero:has(.ptl-etsy[href^="http"]) .ptl-soon-badge { display: none; }

/* ---------- Ledger paper (atmosphere plane) ---------- */
.ptl-ruled { position: relative; isolation: isolate; }
.ptl-ruled::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to right, transparent calc(var(--gutter) + 2.25rem), rgb(37 60 80 / 0.10) calc(var(--gutter) + 2.25rem) calc(var(--gutter) + 2.25rem + 1px), transparent calc(var(--gutter) + 2.25rem + 1px)),
    repeating-linear-gradient(to bottom, transparent 0 2.25rem, rgb(37 60 80 / 0.075) 2.25rem calc(2.25rem + 1px));
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  pointer-events: none;
}

/* ---------- Hero ---------- */
.ptl-hero { padding-block: clamp(2rem, 1.2rem + 3.5vw, 4.5rem) clamp(3.5rem, 2.5rem + 4vw, 6rem); overflow: clip; }
.ptl-hero__top { display: grid; gap: var(--s-5); }
.ptl-hero__badges { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.ptl-hero__title {
  font-size: clamp(2.6rem, 1.35rem + 5.4vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 13ch;
  text-wrap: balance;
}
.ptl-hero__title .ptl-hl { display: inline-block; }
.ptl-hero__side > * + * { margin-top: var(--s-4); }
.ptl-hero__lede { max-width: 34rem; color: var(--ink-2); font-size: var(--t-lg); line-height: 1.55; }
.ptl-hero__note { color: var(--ink-3); font-size: var(--t-sm); }
@media (min-width: 64em) {
  .ptl-hero__top { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); align-items: start; gap: var(--s-8); }
  .ptl-hero__side { padding-top: 0.5rem; }
  .ptl-hero__badges { grid-column: 1 / -1; }
}

/* The stage: back sheet, front sheet, marker ring, prompt card. */
.ptl-stage { position: relative; margin-top: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.ptl-plane img { width: 100%; height: auto; border-radius: clamp(8px, 1vw, 14px); box-shadow: var(--ptl-sheet-shadow); background: #fff; }
.ptl-plane--back {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 70%;
  transform: translate(2%, -9%) rotate(2deg);
  opacity: 0.92;
}
.ptl-plane--back img { box-shadow: 0 20px 50px -30px rgb(21 40 58 / 0.4), 0 0 0 1px rgb(21 40 58 / 0.08); }
.ptl-front { position: relative; z-index: 1; width: 90%; margin-top: 15%; }
.ptl-fg { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

/* The marker ring: orange, around the column that answers the headline. Positions are measured
   from the rendered sheet (tools/web-hero.mjs in seed-etsy-ptledger). */
.ptl-ring {
  position: absolute;
  left: calc(31.49% - 0.6%);
  top: calc(11.14% - 1.6%);
  width: calc(13.5% + 1.2%);
  height: calc(81.82% + 3.2%);
  border: clamp(3px, 0.35vw, 5px) solid var(--ptl-orange);
  border-radius: clamp(8px, 0.9vw, 14px);
  box-shadow: 0 0 0 clamp(4px, 0.6vw, 8px) rgb(232 87 42 / 0.16);
}
.ptl-chip {
  position: absolute;
  left: calc(31.49% + 6.75%);
  bottom: calc(100% + 1.25rem);
  transform: translateX(-50%);
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
  background: var(--ptl-ink);
  color: #fff;
  font-size: clamp(0.8125rem, 0.75rem + 0.3vw, 1rem);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 12px 26px -12px rgb(21 40 58 / 0.7);
}
.ptl-stem {
  position: absolute;
  left: calc(31.49% + 6.75% - 1.5px);
  top: -1.25rem;
  width: 3px;
  height: calc(9.54% + 1.25rem);
  border-radius: 2px;
  background: var(--ptl-ink);
}

/* Foreground prompt card (the "what to do next" a trainer gets from the sheet). */
.ptl-card {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: -2.25rem;
  display: grid;
  gap: 0.15rem;
  min-width: 15rem;
  padding: 0.85rem 1rem 0.9rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 48px -20px rgb(21 40 58 / 0.45), 0 0 0 1px rgb(21 40 58 / 0.08);
  font-size: var(--t-sm);
  line-height: 1.35;
}
.ptl-card__who { color: var(--ink-3); font-size: var(--t-xs); font-weight: 550; }
.ptl-card__line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem var(--s-3); font-weight: 600; color: var(--ink); white-space: nowrap; }
.ptl-card__tag { padding: 0.15rem 0.55rem; border: 1px solid var(--warn-line); border-radius: 6px; background: var(--ptl-amber); font-weight: 600; white-space: nowrap; }
.ptl-stage__caption { margin-top: clamp(3.25rem, 2.5rem + 2vw, 4.25rem); max-width: 40rem; color: var(--ink-3); font-size: var(--t-sm); }

/* Phone and small tablet: its own composition (narrow sheet, ring on the last column). */
.ptl-front .ptl-ring--m { display: none; }
@media (max-width: 55.99em) {
  .ptl-stage { margin-top: 4.5rem; }
  .ptl-stage__caption { margin-top: 4.75rem; }
  .ptl-front { width: min(88%, 30rem); margin-top: 12%; }
  .ptl-plane--back { width: 70%; transform: translate(-1%, -7%) rotate(2.5deg); }
  .ptl-front .ptl-ring { display: none; }
  .ptl-front .ptl-ring--m {
    display: block;
    left: calc(69.44% - 1%);
    width: calc(30.56% + 1%);
    top: calc(11.14% - 1.6%);
    height: calc(81.82% + 3.2%);
  }
  .ptl-chip { left: auto; right: 0; transform: none; }
  .ptl-stem { left: calc(84.65% - 1.5px); }
  .ptl-card { right: auto; left: 34%; bottom: -3.25rem; min-width: 0; width: min(64%, 16rem); }
}
@media (max-width: 30em) {
  .ptl-card { left: 14%; width: 84%; }
  .ptl-sheet th, .ptl-sheet td { padding-inline: var(--s-3); }
  .ptl-sheet tbody th { white-space: normal; }
}

/* ---------- Motion (none when the visitor prefers reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .ptl-ring { animation: ptl-ring-in 700ms cubic-bezier(0.2, 0.8, 0.2, 1.15) 350ms both; }
  .ptl-chip, .ptl-stem { animation: ptl-fade-up 500ms var(--ease) 800ms both; }
  .ptl-card { animation: ptl-fade-up 600ms var(--ease) 1000ms both; }
  @supports (animation-timeline: scroll()) {
    .ptl-plane--back { animation: ptl-par-back linear both; animation-timeline: scroll(root block); animation-range: 0 80vh; }
    .ptl-fg { animation: ptl-par-fg linear both; animation-timeline: scroll(root block); animation-range: 0 80vh; }
    .ptl-card-wrap { animation: ptl-par-card linear both; animation-timeline: scroll(root block); animation-range: 0 80vh; }
  }
}
@keyframes ptl-ring-in {
  from { opacity: 0; transform: scale(1.12) rotate(-1.5deg); }
  to { opacity: 1; transform: none; }
}
@keyframes ptl-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes ptl-par-back {
  from { translate: 0 0; }
  to { translate: 0 70px; }
}
@keyframes ptl-par-fg {
  from { translate: 0 0; }
  to { translate: 0 -18px; }
}
@keyframes ptl-par-card {
  from { translate: 0 0; }
  to { translate: 0 -48px; }
}
.ptl-card-wrap { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ptl-card-wrap .ptl-card { pointer-events: auto; }

/* ---------- Section titles ---------- */
.ptl-title {
  font-family: var(--ptl-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 1.25rem + 2.6vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.ptl-lede { margin-top: var(--s-4); color: var(--ink-2); font-size: var(--t-lg); line-height: 1.55; max-width: 36rem; }

/* ---------- What it does: pinned index beside a stream of real sheets ---------- */
.ptl-does { display: grid; gap: var(--s-7); }
.ptl-does__index { margin-top: var(--s-6); list-style: none; padding: 0; border-top: 1px solid var(--line); }
.ptl-does__index li { border-bottom: 1px solid var(--line); }
.ptl-does__index a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0;
  color: var(--ink-2);
  font-weight: 550;
  text-decoration: none;
}
.ptl-does__index a:hover { color: var(--ink); text-decoration: underline; }
.ptl-does__index { display: none; }
.ptl-does__list { display: grid; gap: clamp(3rem, 2rem + 4vw, 5.5rem); list-style: none; padding: 0; }
.ptl-item h3 { font-size: var(--t-xl); letter-spacing: -0.02em; font-weight: 680; }
.ptl-item p { margin-top: var(--s-2); max-width: 38rem; color: var(--ink-2); }
.ptl-item .ptl-zoom { margin-top: var(--s-5); }
/* Listing images open full size, so phones can zoom into the sheet detail. */
.ptl-zoom { position: relative; display: block; border-radius: var(--r-lg); text-decoration: none; }
.ptl-zoom picture { display: block; }
.ptl-zoom__hint {
  display: inline-block;
  margin-top: var(--s-2);
  color: var(--link);
  font-size: var(--t-sm);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
}
.ptl-band .ptl-zoom__hint { color: #fff; }
.ptl-zoom:hover .ptl-zoom__hint { text-decoration-color: currentColor; }
@media (min-width: 64em) and (hover: hover) {
  .ptl-zoom__hint { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.ptl-shot {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  box-shadow: var(--ptl-sheet-shadow);
  background: var(--ptl-paper);
}
@media (min-width: 64em) {
  .ptl-does { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: var(--s-8); align-items: start; }
  .ptl-does__head { position: sticky; top: calc(var(--header-h) + var(--s-6)); }
  .ptl-does__index { display: block; }
}

/* ---------- How it works: the navy sheet-header band ---------- */
.ptl-band { background: var(--ptl-ink); color: var(--ptl-paper); padding-block: var(--section); }
.ptl-band .ptl-title { color: #fff; }
.ptl-band .ptl-lede { color: #d5dde4; }
.ptl-band a { color: #fff; }
.ptl-steps { display: grid; gap: var(--s-6); margin-top: var(--s-7); list-style: none; padding: 0; counter-reset: ptl-step; }
@media (min-width: 48em) { .ptl-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ptl-step { counter-increment: ptl-step; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 var(--s-4); align-items: start; }
.ptl-step::before {
  content: counter(ptl-step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--ptl-paper);
  color: var(--ptl-ink);
  font-family: var(--ptl-display);
  font-weight: 800;
  font-size: 1.375rem;
  line-height: 1;
}
.ptl-step h3 { padding-top: 0.45rem; font-size: var(--t-lg); color: #fff; font-weight: 650; }
.ptl-step p { margin-top: var(--s-2); color: #d5dde4; font-size: var(--t-sm); line-height: 1.6; }
.ptl-band__shot { margin-top: var(--s-7); }
.ptl-band__shot .ptl-shot { box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.7); }
.ptl-band__shot figcaption { margin-top: var(--s-3); color: #c3ccd4; font-size: var(--t-sm); }
@media (min-width: 64em) { .ptl-band__shot { max-width: 60rem; margin-inline: auto; } }

/* ---------- Included ---------- */
.ptl-split { display: grid; gap: var(--s-7); align-items: center; }
.ptl-split > *, .ptl-does > * { min-width: 0; }
@media (min-width: 64em) {
  .ptl-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); }
  .ptl-split--flip > :first-child { order: 2; }
}
.ptl-files { margin-top: var(--s-6); display: grid; gap: var(--s-4); list-style: none; padding: 0; }
.ptl-file { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 var(--s-4); }
.ptl-file__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r);
  background: var(--ptl-amber);
  border: 1px solid var(--warn-line);
  color: var(--ptl-ink);
}
.ptl-file__icon svg { width: 1.25rem; height: 1.25rem; }
.ptl-file__name { font-weight: 650; color: var(--ink); padding-top: 0.1rem; }
.ptl-file__text { margin: 0.1rem 0 0; color: var(--ink-2); font-size: var(--t-sm); }

/* A real table dressed as the sheet: navy header, white rows, amber where you type. */
.ptl-sheet-wrap {
  margin-top: var(--s-6);
  overflow-x: auto;
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--ptl-sheet-shadow);
}
.ptl-sheet { width: 100%; border-collapse: collapse; font-size: var(--t-sm); line-height: 1.4; }
.ptl-sheet caption { caption-side: bottom; padding: var(--s-3) var(--s-4); text-align: left; color: var(--ink-3); font-size: var(--t-xs); border-top: 1px solid #e1e3e6; background: #f8f9fa; }
.ptl-sheet th, .ptl-sheet td { padding: 0.7rem var(--s-4); text-align: left; vertical-align: top; border-bottom: 1px solid #d6e6f2; }
.ptl-sheet thead th { background: var(--ptl-navy); color: #fff; font-weight: 650; white-space: nowrap; border-bottom: 0; }
.ptl-sheet tbody th { font-weight: 600; color: var(--ink); background: #f3f6f9; white-space: nowrap; }
.ptl-sheet td { color: var(--ink-2); }
.ptl-sheet .ptl-sub { display: block; margin-top: 0.15rem; color: var(--ink-3); font-size: var(--t-xs); font-weight: 450; white-space: normal; }
.ptl-sheet td.ptl-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; white-space: nowrap; }
.ptl-sheet thead th.ptl-num { text-align: right; }
.ptl-sheet tbody tr:last-child > * { border-bottom: 0; }
.ptl-yes { color: #1d5b2c; font-weight: 650; }
.ptl-no { color: var(--ink); font-weight: 650; }
.ptl-untested { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 5px; background: var(--ptl-amber); border: 1px solid var(--warn-line); color: var(--warn-ink); font-weight: 600; white-space: nowrap; }
.ptl-fine { margin-top: var(--s-4); color: var(--ink-3); font-size: var(--t-sm); max-width: 40rem; }

/* ---------- Buy (close) ---------- */
.ptl-buy { text-align: center; padding-block: var(--section); }
.ptl-buy__card {
  position: relative;
  max-width: 34rem;
  margin-inline: auto;
  padding: clamp(1.75rem, 1.25rem + 2.5vw, 3rem);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--ptl-sheet-shadow);
}
.ptl-buy__name { color: var(--ink-3); font-size: var(--t-sm); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.ptl-price { position: relative; display: inline-block; margin-top: var(--s-4); padding: 0.1em 0.35em; font-family: var(--ptl-display); font-weight: 800; font-size: clamp(3.5rem, 2.6rem + 4vw, 5.5rem); line-height: 1; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ptl-price::after {
  content: "";
  position: absolute;
  inset: -0.08em -0.05em -0.12em;
  border: clamp(3px, 0.35vw, 5px) solid var(--ptl-orange);
  border-radius: 0.28em;
  box-shadow: 0 0 0 clamp(4px, 0.6vw, 8px) rgb(232 87 42 / 0.16);
  transform: rotate(-2.5deg);
}
.ptl-buy__unit { margin-top: var(--s-4); color: var(--ink-2); font-size: var(--t-lg); }
.ptl-buy__list { margin: var(--s-5) auto 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); max-width: 24rem; text-align: left; color: var(--ink-2); font-size: var(--t-sm); }
.ptl-buy__list li { position: relative; padding-left: 1.6rem; }
.ptl-buy__list li::before { content: ""; position: absolute; left: 0.15rem; top: 0.42em; width: 0.8rem; height: 0.45rem; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }
.ptl-buy__actions { margin-top: var(--s-6); display: flex; justify-content: center; }
.ptl-buy .ptl-soon-note { margin-top: var(--s-3); }
.ptl-buy__fine { margin-top: var(--s-5); color: var(--ink-3); font-size: var(--t-xs); }

/* ---------- Support page bits ---------- */
.ptl-kbd { padding: 0.05rem 0.4rem; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; font-size: 0.92em; white-space: nowrap; }
.ptl-amber-cell { padding: 0 0.3rem; background: var(--ptl-amber); border: 1px solid var(--warn-line); border-radius: 4px; }

/* Trailer on the paper background (outside the dark band) */
.ptl-video figcaption { color: var(--ptl-ink-2, #46525c); }
.ptl-video figcaption a { color: inherit; }
