/* LETTERHEAD collection — "Your name, typeset like it runs an empire."
   Ivory stock only in v1 (slate reserved for a future stock axis).
   Everything scoped under .lth-; root is main.lth-root. */

/* ============ FRAUNCES, SELF-HOSTED ============ */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fraunces-var-300-700-397b623a.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext kept solely for the rupee glyph in the pay chips — the browser
   only fetches this face when a codepoint in its range is rendered. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fraunces-var-300-700-ext-53ea12c1.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fraunces-var-300-700-italic-f4852aad.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metrics-matched stand-in so the masthead doesn't jump when Fraunces arrives */
@font-face {
  font-family: "Fraunces-fallback";
  src: local("Georgia");
  ascent-override: 97%;
  descent-override: 27%;
  line-gap-override: 0%;
  size-adjust: 104%;
}

/* ============ TOKENS + ROOT ============ */
.lth-root {
  /* ivory stock; slate pair reserved for the future owner-side stock axis */
  --paper: #F5F1E8;
  --ink: #181510;
  --ink-62: rgba(24, 21, 16, .62);
  --ink-38: rgba(24, 21, 16, .38);
  --hairline: rgba(24, 21, 16, .14);
  --wash: rgba(24, 21, 16, .06);
  --tear: rgba(24, 21, 16, .32);
  --ghost: rgba(24, 21, 16, .075);
  --accent: #B3271E;
  --accent-soft: rgba(179, 39, 30, .55);
  --deboss: 0 1px 0 rgba(255, 255, 255, .55);
  --press: cubic-bezier(.16, 1, .3, 1);
  --settle: cubic-bezier(.4, 0, .2, 1);

  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
  font-family: "Fraunces", "Fraunces-fallback", Georgia, "Noto Serif", serif;
  font-optical-sizing: auto;
  line-height: 1.6;
  min-height: 100svh;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
.lth-root ::selection { background: rgba(179, 39, 30, .2); }
.lth-root a { color: inherit; }
.lth-root :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lth-num { font-variant-numeric: lining-nums tabular-nums; }

/* ============ THE SHEET ============ */
.lth-sheet {
  position: relative;
  background: var(--paper);
  min-height: 100svh;
  max-width: 440px;
  margin: 0 auto;
  padding: 20px;
}
.lth-sheet::before { /* paper grain, 64px tile, fixed low alpha (banding defense) */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='64' height='64' filter='url(%23g)'/%3E%3C/svg%3E") repeat;
  background-size: 64px 64px;
  opacity: .045;
}
@media (prefers-reduced-data: reduce) {
  .lth-sheet::before { display: none; }
}
.lth-frame {
  position: relative;
  z-index: 1;
  border: 1px solid var(--hairline);
  padding: 26px 22px 38px;
  min-height: calc(100svh - 40px);
}

/* ============ MASTHEAD ============ */
.lth-masthead { position: relative; }
.lth-eyebrow-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 34px;
}
.lth-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-62);
}
.lth-eyebrow a { text-decoration: none; }
.lth-eyebrow-logo {
  display: inline-block;
  width: 14px;
  height: 14px;
  object-fit: cover;
  vertical-align: -2px;
  margin-right: 5px;
  border-radius: 1px;
}
.lth-top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  position: relative;
  z-index: 3;
}
/* Keep (bookmark frame) — shared partial re-dressed in letterhead voice */
.lth-keep turbo-frame { display: block; }
.lth-keep form { display: flex; }
.lth-root .lth-keep .group > .absolute { display: none; } /* stock tooltip off */
.lth-root .lth-keep turbo-frame > div,
.lth-root .lth-keep form > button {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 1px;
  color: var(--ink-62);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: color 160ms var(--settle);
}
.lth-root .lth-keep form > button:hover { background: transparent; box-shadow: none; color: var(--accent); }
.lth-root .lth-keep form > button.text-yellow-500 { color: var(--accent); }
.lth-root .lth-keep svg { width: 17px; height: 17px; }
.lth-share {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-family: inherit;
  color: var(--ink-62);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  padding: 0 0 1px;
  cursor: pointer;
  transition: color 160ms var(--settle);
  flex: none;
}
.lth-share:active { color: var(--accent); }
.lth-ghost {
  position: absolute;
  top: -30px;
  right: -14px;
  z-index: 0;
  font-size: min(172px, 46vw);
  font-weight: 340;
  line-height: 1;
  letter-spacing: -.05em;
  color: var(--ghost);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}
.lth-portrait { /* affixed photograph — chassis identity slot, letterhead-dressed */
  position: absolute;
  top: 42px;
  right: 0;
  z-index: 2;
  width: 76px;
  margin: 0;
  padding: 4px 4px 6px;
  background: #FFFDF7;
  border: 1px solid var(--hairline);
  box-shadow: 0 1px 2px rgba(24, 21, 16, .14), 0 7px 16px rgba(24, 21, 16, .12);
  transform: rotate(1.6deg);
}
.lth-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.lth-masthead--photo .lth-name { padding-right: 88px; }
.lth-name {
  position: relative;
  z-index: 1;
  font-size: clamp(44px, 13.5vw, 76px);
  font-weight: 560;
  line-height: .98;
  letter-spacing: -.015em;
  text-wrap: balance;
  overflow-wrap: break-word;
  text-shadow: var(--deboss);
  max-width: 9ch;
}
/* Long names trade the monumental size for fit; words wrap whole, never clip. */
.lth-name--long {
  font-size: clamp(28px, 8.4vw, 48px);
  max-width: none;
}
.lth-rule {
  width: 44px;
  height: 3px;
  background: var(--accent);
  margin: 20px 0 16px;
  transform-origin: left center;
}
.lth-tagline {
  font-style: italic;
  font-size: 19px;
  line-height: 1.35;
  color: var(--ink-62);
  max-width: 30ch;
}

/* ============ PRIMARY ACTION ============ */
.lth-actions { margin-top: 30px; }
.lth-root .lth-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: transform 120ms var(--settle), box-shadow 120ms var(--settle);
}
.lth-cta:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .4); }
.lth-exchange {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-family: inherit;
  color: var(--ink-62);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  padding: 0 0 2px;
  cursor: pointer;
  transition: color 160ms var(--settle);
}
.lth-exchange:active { color: var(--accent); }
.lth-arrow {
  width: 13px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============ THE LEDGER ============ */
.lth-ledger { margin-top: 40px; border-top: 1px solid var(--hairline); }
.lth-row {
  display: grid;
  grid-template-columns: 18px auto 1fr;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 56px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  text-align: left;
  transition: background-color 120ms var(--settle);
}
.lth-row:active { background: var(--wash); }
.lth-glyph {
  width: 18px;
  height: 18px;
  color: var(--ink-38);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lth-lab {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-62);
}
.lth-val {
  justify-self: end;
  text-align: right;
  font-size: 17px;
  line-height: 1.3;
  color: var(--ink);
  min-width: 0;
  box-shadow: 0 2px 0 transparent;
  transition: box-shadow 120ms var(--settle);
}
.lth-row:active .lth-val { box-shadow: 0 2px 0 var(--accent); }
.lth-val-sm { /* one ledger line, always — overlong values truncate, the row is a tap action */
  font-size: 15px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lth-row-pay .lth-val { color: var(--accent); }

/* ============ THE PAYMENT SLIP (perforated, open by design) ============ */
.lth-tear {
  position: relative;
  height: 12px;
  margin: 0 -23px; /* reaches the frame border so the notches punch it */
}
.lth-tear::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 6px;
  height: 1px;
  background-image: repeating-linear-gradient(90deg, var(--tear) 0 5px, transparent 5px 11px);
}
.lth-notch {
  position: absolute;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--hairline);
}
.lth-notch-l { left: -6px; }
.lth-notch-r { right: -6px; }
.lth-slip-body { padding: 20px 2px 24px; }
.lth-slip-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-38);
}
.lth-upiid {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  margin-top: 12px;
  padding: 0;
}
.lth-upiid-text {
  display: block;
  font-size: clamp(19px, 6.4vw, 24px);
  font-weight: 560;
  letter-spacing: -.005em;
  color: var(--ink);
  text-shadow: var(--deboss);
  word-break: break-all;
}
.lth-upiid-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 18px;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-62);
  transition: color 160ms var(--settle);
}
.lth-upiid-ic { display: none; }
.lth-upiid-ic svg { width: 13px; height: 13px; }
.lth-upiid.lth-copied .lth-upiid-meta { color: var(--accent); }
.lth-upiid.lth-copied .lth-upiid-ic { display: inline-flex; }
.lth-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.lth-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: transform 120ms var(--settle), background-color 120ms var(--settle);
}
.lth-chip:active { transform: translateY(1px); background: var(--wash); }
.lth-anyrow {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 16px;
}
.lth-anyrow-cur { font-size: 16px; color: var(--ink-62); }
.lth-anyrow-input {
  flex: 0 1 150px;
  min-width: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink-38);
  border-radius: 0;
  padding: 4px 0 6px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
  transition: border-color 160ms var(--settle);
}
.lth-anyrow-input:focus { outline: none; border-bottom-color: var(--accent); }
.lth-anyrow-input::placeholder { color: var(--ink-38); font-style: italic; font-size: 14px; }
.lth-root .lth-anyrow-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 2px;
}
.lth-slip-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-38);
  font-style: italic;
}

/* ============ SECTIONS ============ */
.lth-section { margin-top: 46px; }
.lth-seclab {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-38);
  margin-bottom: 14px;
}
.lth-about { font-size: 17px; line-height: 1.6; max-width: 62ch; }
.lth-about .trix-content > div:first-child::first-letter,
.lth-about .trix-content > p:first-child::first-letter {
  float: left;
  font-size: 56px;
  line-height: .8;
  font-weight: 560;
  color: var(--accent);
  padding: 6px 10px 0 0;
}
.lth-about .trix-content a {
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 4px;
}
.lth-readmore-row { margin-top: 10px; }
.lth-readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-62);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
}
.lth-readmore svg { width: 12px; height: 12px; }

/* index of enclosures + links */
.lth-index { border-top: 1px solid var(--hairline); }
.lth-index .lth-seclab { padding-top: 14px; margin-bottom: 2px; }
.lth-toc {
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  transition: background-color 120ms var(--settle);
}
.lth-toc:active { background: var(--wash); }
.lth-folio { font-size: 13px; color: var(--ink-38); }
.lth-toc-t {
  font-size: 17px;
  justify-self: start;
  box-shadow: 0 2px 0 transparent;
  transition: box-shadow 120ms var(--settle);
}
.lth-toc:active .lth-toc-t { box-shadow: 0 2px 0 var(--accent); }
.lth-toc-thumb {
  width: 30px;
  height: 38px;
  border: 1px solid var(--hairline);
  background: #FFFDF7;
  padding: 2px;
}
.lth-toc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lth-toc-k {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-38);
}

/* elsewhere */
.lth-else-line { font-size: 17px; line-height: 2; color: var(--ink); }
.lth-else-line a {
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 160ms var(--settle);
}
.lth-else-line a:active { text-decoration-color: var(--accent); }
.lth-interpunct { color: var(--ink-38); padding: 0 6px; }

/* intent sentinel — invisible scroll marker */
.lth-sentinel { height: 1px; }

/* ============ COLOPHON ============ */
.lth-colophon {
  margin-top: 52px;
  padding-top: 30px;
  border-top: 1px solid var(--hairline);
}
.lth-seal { /* red chop framing the real generated QR */
  position: relative;
  width: 118px;
  height: 118px;
  transform: rotate(-2deg);
  margin: 6px 0 14px 2px;
  border: 1px solid var(--accent);
  background: #FCFAF4;
  padding: 6px;
  overflow: hidden;
}
.lth-seal::before { /* inner hairline ring */
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--accent-soft);
  pointer-events: none;
}
.lth-seal-pad { display: block; width: 100%; height: 100%; }
.lth-seal-pad img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lth-seal::after { /* the glint band, driven by --glint (glint controller) */
  content: "";
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: -52px;
  width: 52px;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .55) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(calc(var(--glint, 50) * 1.7px)) skewX(-8deg);
  pointer-events: none;
}
.lth-seal-cap {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-38);
}
.lth-serial { margin-top: 22px; font-size: 13px; color: var(--ink-62); }
.lth-signoff { margin-top: 4px; font-size: 13px; color: var(--ink-38); }
.lth-signoff a {
  color: var(--ink-62);
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.lth-signoff .lth-pressown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  text-decoration: none;
}
.lth-signoff .lth-arrow { width: 11px; height: 9px; }
.lth-share-inline { margin-bottom: 14px; }

/* ============ ENTRANCE: THE PRESS CYCLE (runs once, settles fast) ============ */
@media (prefers-reduced-motion: no-preference) {
  /* transform-only stamp: opacity + rise + scaleX settle — no letter-spacing tween */
  .lth-press-name {
    transform-origin: 0 70%;
    animation: lth-stamp 480ms var(--press) 80ms both;
  }
  @keyframes lth-stamp {
    from { opacity: 0; transform: translateY(6px) scaleX(1.012); }
    to { opacity: 1; transform: translateY(0) scaleX(1); }
  }
  .lth-rule { animation: lth-drawrule 420ms var(--press) 260ms both; }
  @keyframes lth-drawrule {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
  .lth-press-tag { animation: lth-inkup 360ms var(--settle) 360ms both; }
  .lth-press-eyebrow { animation: lth-inkup 420ms var(--settle) 140ms both; }
  .lth-ghost, .lth-portrait { animation: lth-inkup 440ms var(--settle) 460ms both; }
  @keyframes lth-inkup {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  .lth-rise {
    animation: lth-rise 340ms var(--press) both;
    animation-delay: calc(480ms + var(--i, 0) * 30ms);
  }
  @keyframes lth-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .lth-late { animation: lth-inkup 380ms var(--settle) 620ms both; }
}
@media (prefers-reduced-motion: reduce) {
  .lth-cta, .lth-chip, .lth-row, .lth-val, .lth-toc-t, .lth-share,
  .lth-exchange, .lth-upiid-meta, .lth-anyrow-input { transition: none; }
}

/* ============ DESKTOP: PAPER ON THE DESK ============ */
@media (min-width: 720px) {
  .lth-root {
    background: #2E2A23;
    background-image: radial-gradient(130% 100% at 50% 0%, #3B362C 0%, #2E2A23 55%, #241F19 100%);
  }
  .lth-sheet {
    min-height: 0;
    margin: 56px auto 72px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 40px rgba(0, 0, 0, .38), 0 40px 90px rgba(0, 0, 0, .32);
  }
  .lth-frame { min-height: 0; }
}
