﻿:root {
  --cloth: #861a1c;
  --cloth-deep: #5e1012;
  --gold: #e6b84e;
  --gold-deep: #b08a2e;
  --paper: #f4f0e6;
  --paper-edge: #e3dcc8;
  --rule: rgba(160, 36, 36, 0.5);
  --print: #8c1d1d;
  --ink: #2b3fc0;
  --ink-soft: #4b5bd0;
  --coral: #d2452b;
  --stamp: #a52b15;
  --text: #1d1a17;
  --on-cloth: #fff7ee;
  --on-cloth-soft: #f3d9cf;
  --shadow: 0 22px 40px -22px rgba(30, 6, 6, 0.7), 0 3px 8px rgba(30, 6, 6, 0.28);
  --gutter: clamp(16px, 5vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Hind, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--on-cloth);
  background-color: var(--cloth);
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.07) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px),
    radial-gradient(130% 70% at 50% 0, rgba(255, 255, 255, 0.09), transparent 60%);
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--cloth-deep); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
::selection { background: var(--gold); color: var(--cloth-deep); }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1120px; margin: 0 auto; padding: 14px var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: "Yatra One", Hind, sans-serif; font-size: 1.5rem; color: var(--gold); }
.brand img { border-radius: 9px; }
.top nav { display: flex; gap: 20px; font-weight: 600; font-size: 0.95rem; }
.top nav a { color: var(--on-cloth-soft); text-decoration: none; padding: 8px 0; }
.top nav a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }

/* cover */
.cover { max-width: 1120px; margin: 0 auto; padding: clamp(8px, 3vw, 32px) var(--gutter) 56px; }
h1 { margin: 0; font-family: "Yatra One", Hind, sans-serif; font-weight: 400; color: var(--gold); line-height: 1.04; text-wrap: balance; text-shadow: 0 -1px 0 rgba(255, 238, 176, 0.55), 0 2px 0 rgba(60, 8, 8, 0.55), 0 7px 12px rgba(30, 4, 4, 0.35); }
h1 .l1 { display: block; font-size: clamp(3.6rem, 17vw, 8rem); }
h1 .l2 { display: block; font-size: clamp(1.9rem, 8vw, 3.6rem); margin-top: 0.1em; }
.lede { max-width: 34em; margin: 18px 0 0; font-size: clamp(1.1rem, 3.4vw, 1.3rem); color: var(--on-cloth); text-wrap: pretty; }
.cta { margin: 26px 0 38px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.cta-note { margin: 0; color: var(--on-cloth-soft); font-size: 0.95rem; }

.play {
  display: inline-flex; align-items: center; gap: 14px; min-height: 60px;
  padding: 10px 26px 10px 20px; border-radius: 16px; text-decoration: none;
  background: var(--gold); color: var(--cloth-deep);
  box-shadow: 0 10px 22px -10px rgba(20, 4, 4, 0.8);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s;
}
.play[href]:hover { transform: translateY(-2px); box-shadow: 0 16px 26px -12px rgba(20, 4, 4, 0.85); }
.play[href]:active { transform: translateY(1px); }
.play span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.play small { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.play b { font-size: 1.45rem; font-weight: 700; }

/* ledger */
.ledger { position: relative; max-width: 780px; }
.ledger-bar {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px 16px;
  padding: 12px 14px; margin-bottom: -2px; position: relative; z-index: 1;
  background: var(--cloth-deep); border-radius: 18px 18px 0 0;
  border: 1px solid rgba(230, 184, 78, 0.35); border-bottom: 0;
}
.mic {
  appearance: none; border: 0; cursor: pointer; width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--ink);
  box-shadow: 0 8px 16px -6px rgba(0, 0, 20, 0.8), 0 0 0 4px rgba(244, 240, 230, 0.16);
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}
.mic:hover { transform: scale(1.05); }
.mic:active { transform: scale(0.96); }
.mic[aria-pressed="true"] { background: var(--coral); }
.say { margin: 0; font-family: "Yatra One", Hind, sans-serif; font-size: 1.5rem; color: var(--gold); line-height: 1.3; }
.say-sub { margin: 2px 0 0; font-size: 0.92rem; color: var(--on-cloth-soft); line-height: 1.35; }
.vu { width: clamp(104px, 22vw, 150px); height: auto; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35)); }

.page {
  position: relative; overflow: hidden;
  background-color: var(--paper);
  background-image: linear-gradient(90deg, rgba(60, 40, 20, 0.16), transparent 22px);
  color: var(--text); border-radius: 4px 4px 12px 12px; padding: 14px 0 12px;
  border: 1px solid var(--paper-edge);
  box-shadow: var(--shadow);
}
.page::after { content: ""; position: absolute; inset: auto 0 -7px 6px; height: 7px; background: var(--paper-edge); border-radius: 0 0 10px 10px; z-index: -1; }
.heard { margin: 0 18px 12px; min-height: 3.4em; font-family: Kalam, Hind, sans-serif; font-size: clamp(1.05rem, 3.6vw, 1.3rem); line-height: 1.35; color: var(--ink); }
.heard-label { font-family: Hind, sans-serif; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--print); margin-right: 6px; }
.heard .w { opacity: 0; transition: opacity 0.2s; }
.heard .w.on { opacity: 1; }

.grid { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) 4.3rem 4.3rem; align-items: stretch; }
.grid > span { padding: 0 8px; border-left: 3px double var(--rule); }
.grid > span:first-child { border-left: 0; padding-left: 14px; }
.grid > span { padding: 0 6px; }
.head { background: rgba(160, 36, 36, 0.06); border-top: 2px solid var(--rule); border-bottom: 3px double var(--rule); font-family: "Yatra One", Hind, sans-serif; color: var(--print); font-size: 0.86rem; line-height: 1.4; }
.head > span { padding-top: 9px; padding-bottom: 9px; }
.n { text-align: right; }
.row { min-height: 3.7rem; border-bottom: 1px solid var(--rule); font-family: Kalam, Hind, sans-serif; color: var(--ink); }
.row > .c { display: flex; align-items: center; }
.row .who .ink { display: flex; flex-direction: column; line-height: 1.1; }
.row .who b { font-weight: 700; font-size: 1.28rem; }
.row .who small { font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); }
.row .n .ink, .foot .n .ink { margin-left: auto; font-weight: 700; font-size: 1.25rem; }
.row .date .ink { font-size: 0.92rem; }
.row.blank { min-height: 2.9rem; }
.foot { border-top: 3px double var(--rule); min-height: 3rem; font-family: Kalam, Hind, sans-serif; }
.foot > span { display: flex; align-items: center; }
.foot .tot { font-family: "Yatra One", Hind, sans-serif; color: var(--print); font-size: 0.95rem; }

.ink { display: inline-block; clip-path: inset(-6px -6px -6px -6px); }
.ledger.pending .ink { clip-path: inset(-6px 100% -6px -6px); }
.ledger.writing .ink { transition: clip-path 0.85s cubic-bezier(0.3, 0.7, 0.2, 1); transition-delay: var(--d, 0s); clip-path: inset(-6px -6px -6px -6px); }

.stamp {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%) rotate(-9deg);
  padding: 6px 16px 4px; border: 3px solid var(--stamp); border-radius: 8px; color: var(--stamp);
  font-family: "Yatra One", Hind, sans-serif; text-align: center; line-height: 1.1; opacity: 0.96;
  mix-blend-mode: multiply; filter: url(#rough); pointer-events: none;
}
.stamp span { display: block; font-size: 1.55rem; letter-spacing: 0.12em; text-transform: uppercase; }
.stamp small { display: block; font-size: 0.85rem; letter-spacing: 0.1em; margin-top: 3px; }
.ledger.pending .stamp { opacity: 0; transform: translateY(-50%) rotate(-9deg) scale(1.9); }
.ledger.stamped .stamp { opacity: 0.96; transform: translateY(-50%) rotate(-9deg) scale(1); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.12s; }
.blank-rows { position: relative; }
.demo-note { margin: 12px 4px 0; font-size: 0.88rem; color: var(--on-cloth-soft); }

/* sheets */
.sheet, .notice {
  position: relative; max-width: 1040px; margin: 0 auto 44px; padding: clamp(24px, 5vw, 52px) clamp(20px, 5vw, 52px) clamp(24px, 5vw, 52px) calc(clamp(20px, 5vw, 52px) + 30px);
  color: var(--text);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, rgba(60, 40, 20, 0.14), transparent 26px),
    linear-gradient(90deg, transparent 34px, rgba(160, 36, 36, 0.42) 34px 35px, transparent 35px 38px, rgba(160, 36, 36, 0.42) 38px 39px, transparent 39px);
  border: 1px solid var(--paper-edge); border-radius: 6px; box-shadow: var(--shadow);
  width: calc(100% - 2 * var(--gutter));
}
.sheet { display: grid; gap: 36px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.sheet h2, .notice h2, .close h2 { margin: 0; font-family: "Yatra One", Hind, sans-serif; font-weight: 400; line-height: 1.3; text-wrap: balance; }
.sheet h2, .notice h2 { font-size: clamp(1.8rem, 6vw, 2.7rem); color: var(--print); }
.h-sub { margin: 6px 0 20px; font-family: Kalam, Hind, sans-serif; font-size: clamp(1.15rem, 3.6vw, 1.45rem); color: var(--ink); line-height: 1.4; }
.body { max-width: 31em; margin: 0 0 14px; text-wrap: pretty; }
.margin-note { margin: 22px 0 0; font-family: Kalam, Hind, sans-serif; font-size: 1.2rem; color: var(--ink); transform: rotate(-1.5deg); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; max-width: 32em; }
.steps li { padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.steps .verb { display: block; font-family: Kalam, Hind, sans-serif; font-weight: 700; font-size: clamp(1.8rem, 6vw, 2.3rem); color: var(--ink); line-height: 1.1; }
.steps p { margin: 4px 0 0; text-wrap: pretty; }

.sheet-shots { position: relative; display: flex; justify-content: center; gap: 0; padding: 12px 0; }
.sheet-shots .phone + .phone { margin-left: -10%; margin-top: 8%; }
.phone { margin: 0; width: min(62%, 260px); padding: 8px; border-radius: 32px; background: #11141f; box-shadow: 0 24px 34px -18px rgba(25, 8, 8, 0.75), 0 3px 8px rgba(25, 8, 8, 0.35); }
.sheet-shots.single .phone { width: min(70%, 270px); }
.phone img { display: block; width: 100%; border-radius: 25px; }
.phone.cut { overflow: hidden; border-radius: 32px 32px 0 0; padding-bottom: 0; align-self: flex-end; }
.phone.cut img { aspect-ratio: 720 / 1010; object-fit: cover; object-position: top; border-radius: 25px 25px 0 0; }
.tilt-l { transform: rotate(-2deg); }
.tilt-r { transform: rotate(2deg); }

.notice { text-align: left; }
.notice .h-sub { margin-bottom: 18px; }
.rules { list-style: none; margin: 0 0 18px; padding: 0; max-width: 40em; display: grid; gap: 12px; }
.rules li { position: relative; padding-left: 30px; text-wrap: pretty; }
.rules li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M2 9.5l4.5 4.5L16 4' fill='none' stroke='%232b3fc0' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; }
.links a { color: var(--ink); font-weight: 600; text-underline-offset: 4px; }

/* close */
.close { text-align: center; padding: 28px var(--gutter) 64px; }
.close h2 { font-size: clamp(3.4rem, 16vw, 7rem); color: var(--gold); text-shadow: 0 -1px 0 rgba(255, 238, 176, 0.55), 0 2px 0 rgba(60, 8, 8, 0.55), 0 7px 12px rgba(30, 4, 4, 0.35); }
.close .lede { margin: 6px auto 24px; }

.foot-bar { background: var(--cloth-deep); padding: 28px var(--gutter) 36px; display: grid; justify-items: center; gap: 14px; text-align: center; color: var(--on-cloth-soft); font-size: 0.92rem; }
.ifs { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; background: #fbf8f1; color: #4b4150; padding: 12px 22px 14px; border-radius: 14px; }
.ifs img { width: 140px; height: auto; display: block; }
.foot-bar p { margin: 0; }
.foot-bar p a { padding: 6px 4px; }

/* wider screens: ledger gets its own column feel, sheets split in two */
@media (min-width: 760px) {
  .grid { grid-template-columns: 5rem minmax(0, 1fr) 6rem 6rem; }
  .row { min-height: 4.1rem; }
  .stamp { right: 30px; }
  .sheet { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .sheet.flip .sheet-text { order: 2; }
  .sheet.flip .sheet-shots { order: 1; }
  .phone { width: min(56%, 270px); }
  .sheet-shots.single .phone { width: min(84%, 310px); }
}
@media (min-width: 1000px) {
  .cover { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); column-gap: 48px; align-items: start; }
  .cover > h1, .cover > .lede, .cover > .cta { grid-column: 1; }
  .cover > .ledger { grid-column: 2; grid-row: 1 / span 4; margin-top: 18px; max-width: none; }
}
@media (max-width: 420px) {
  .ledger-bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 12px; }
  .vu { width: 88px; }
  .play { width: 100%; justify-content: center; }
  .stamp { right: 8px; }
  .stamp span { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---- second pass ---- */
.sheet { --sheet-pad: clamp(24px, 5vw, 52px); overflow: hidden; }
.sheet > .folio, .notice > .folio { grid-column: 1 / -1; margin-top: 0; }
.sheet :focus-visible, .notice :focus-visible, .page :focus-visible { outline-color: var(--ink); }
.foot-bar p a { display: inline-block; padding: 12px 8px; }

.ribbon { position: absolute; top: 0; right: clamp(18px, 6vw, 56px); width: 26px; height: 76px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); }

.ledger-sheet { display: block; }
.steps-ledger { max-width: 46rem; margin: 6px 0 30px; border-top: 2px solid var(--rule); background: rgba(255, 255, 255, 0.28); }
.srow { position: relative; display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); border-bottom: 1px solid var(--rule); min-height: 4.4rem; }
.srow > * { padding: 12px 12px; }
.srow > :first-child { border-right: 3px double var(--rule); }
.srow p { margin: 0; text-wrap: pretty; align-self: center; }
.srow .verb { display: flex; align-items: center; font-family: Kalam, Hind, sans-serif; font-weight: 700; font-size: 1.45rem; line-height: 1.3; color: var(--ink); }
.shead { min-height: 0; background: rgba(160, 36, 36, 0.06); border-bottom: 3px double var(--rule); font-family: "Yatra One", Hind, sans-serif; color: var(--print); font-size: 0.86rem; line-height: 1.4; }
.shead > span { padding: 8px 12px; }
.srow:last-child p { padding-right: 7.2rem; }
.mini-stamp { position: absolute; right: 10px; bottom: 10px; transform: rotate(-8deg); padding: 2px 10px; border: 2px solid var(--stamp); border-radius: 6px; color: var(--stamp); font-family: "Yatra One", Hind, sans-serif; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.96; mix-blend-mode: multiply; filter: url(#rough); }

.shots { display: flex; justify-content: center; padding: 6px 0 0; }
.shots .phone { width: min(46%, 270px); }
.shots .phone + .phone { margin-left: -6%; margin-top: 7%; }
.caption { margin: 12px 0 0; text-align: center; font-size: 0.86rem; color: #5a5149; }
.sheet-shots .caption { margin-top: 14px; }
.sheet-shots { flex-direction: column; align-items: center; }

.folio { display: block; margin-top: 26px; text-align: center; font-family: "Yatra One", Hind, sans-serif; font-size: 0.85rem; letter-spacing: 0.08em; color: var(--print); }

.match { max-width: 26rem; margin: 18px 0 16px; border-top: 2px solid var(--rule); background: rgba(255, 255, 255, 0.28); }
.mrow { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 3rem; border-bottom: 1px solid var(--rule); }
.mrow > span { padding: 6px 14px; }
.mrow > span + span { border-left: 3px double var(--rule); }
.mhead { min-height: 0; background: rgba(160, 36, 36, 0.06); border-bottom: 3px double var(--rule); font-family: "Yatra One", Hind, sans-serif; color: var(--print); font-size: 0.86rem; line-height: 1.4; }
.mhead > span { padding: 8px 14px; }
.ink-s { font-family: Kalam, Hind, sans-serif; font-size: 1.35rem; color: var(--ink); }
.ink-s b { font-weight: 700; }

/* the cut screen slides behind the bottom edge of its sheet */
.sheet-shots.has-cut { align-self: end; padding-bottom: 0; margin-bottom: calc(-1 * var(--sheet-pad)); }
.phone.cut { align-self: center; }
@media (min-width: 760px) { .ledger-sheet .shots .phone { width: min(34%, 270px); } }

@media (max-width: 600px) {
  .sheet, .notice { padding: 26px 18px 26px 52px; }
  .srow { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .srow > :first-child { border-right: 0; padding-bottom: 0; }
  .srow > p { padding-top: 2px; }
  .srow:last-child p { padding-right: 12px; padding-bottom: 46px; }
  .shead { display: none; }
  .srow:first-of-type { border-top: 0; }
  .mini-stamp { bottom: 12px; }
}

/* ---- third pass ---- */
.ledger-sheet h2, .ledger-sheet .h-sub { padding-right: 44px; }
.caption { text-wrap: balance; }
.play:not([href]) { box-shadow: none; opacity: 0.9; cursor: default; }
.mrow .n { text-align: right; }
.mrow.total { border-top: 3px double var(--rule); }
.mrow.total .ink-s { font-size: 1.5rem; }
.match .ink-s { font-size: 1.25rem; }
@media (max-width: 420px) { .match .ink-s { font-size: 1.15rem; } .mrow > span { padding: 6px 10px; } }
