/* The public site, "Buku Akaun": the page is a Malaysian account book, ruled paper with a red
   margin, and the product is what keeps it in order. Plex Sans and Mono are the app's own type;
   Instrument Serif and a pencil hand (Caveat) are the book's. */
:root {
  --paper: #F5F0E4; --sheet: #FBF8F0; --rule: #DCD3BD; --rule-soft: #E8DFCB;
  --ink: #1D2B4C; --ink-2: #4A5672; --pencil: #6B6455; --red: #B8362B; --green: #2F6B4F; --tape: rgba(238,222,170,.78);
  --serif: "Instrument Serif", Georgia, serif; --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace; --hand: "Caveat", "Comic Sans MS", cursive;
  --margin: 88px; --line: 32px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* The book: ruling, a red margin line and a little paper grain over everything */
.book { position: relative; overflow: hidden; overflow: clip; /* clip, not hidden, so the top bar can stick */
  background-image: repeating-linear-gradient(180deg, transparent 0 calc(var(--line) - 1px), var(--rule) calc(var(--line) - 1px) var(--line)); }
.book::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--margin); width: 1px; background: var(--red); box-shadow: 4px 0 0 rgba(184,54,43,.4); z-index: 0; }
.book::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; mix-blend-mode: multiply; opacity: .55;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .55 0 0 0 0 .5 0 0 0 0 .4 0 0 0 .1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.inner { position: relative; z-index: 1; max-width: 1260px; margin: 0 auto; padding: 0 48px 0 calc(var(--margin) + 48px); }
@media (max-width: 900px) { :root { --margin: 22px; } .inner { padding: 0 20px 0 calc(var(--margin) + 22px); } }

/* Type */
.folio { font: 500 12px var(--mono); letter-spacing: .14em; color: var(--red); text-transform: uppercase; margin: 0 0 16px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.015em; }
h1 { font-size: clamp(56px, 8.4vw, 104px); line-height: .94; }
h2 { font-size: clamp(40px, 5.4vw, 64px); line-height: 1; }
h3 { font-size: 30px; line-height: 1.05; }
h1 em, h2 em { color: var(--red); }
.lede { font-size: 19px; color: var(--ink-2); max-width: 31em; margin: 24px 0 0; }
.hand { font: 600 23px/1.15 var(--hand); color: var(--pencil); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
section { position: relative; padding: 112px 0; }
section + section { border-top: 2px solid var(--ink); }
@media (max-width: 900px) { section { padding: 72px 0; } }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 15px var(--sans); text-decoration: none; padding: 13px 22px;
  border-radius: 2px; border: 1.5px solid var(--ink); color: var(--ink); background: transparent; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { box-shadow: 3px 3px 0 var(--red); }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: rgba(245,240,228,.93); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); }
.top .inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 24px/1 var(--sans); letter-spacing: -.025em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand svg { flex: none; display: block; }
.brand .tld { color: var(--red); }
.links { display: none; gap: 24px; margin-left: auto; font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.links a { text-decoration: none; color: var(--ink-2); }
.links a:hover { color: var(--red); }
.top .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.top .actions a { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.top .signin { color: var(--ink-2); padding: 8px 4px; }
.top .go { background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 2px; white-space: nowrap; }
@media (min-width: 1080px) { .links { display: flex; } .top .actions { margin-left: 8px; } }
@media (max-width: 520px) { .top .signin { display: none; } }

/* Hero */
.hero { padding: 72px 0 104px; }
.hero-grid { display: grid; gap: 56px; align-items: start; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 1.02fr 1fr; } }
.hero-grid > * { min-width: 0; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .note { display: inline-block; margin-top: 22px; transform: rotate(-2deg); }
.hero .note::before { content: "↳ "; }
.todo { margin-top: 36px; max-width: 470px; }
.todo .hand { margin-bottom: 4px; display: block; }
.todo ul { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; gap: 12px; min-height: var(--line); font-size: 15px; }
.todo .amt { margin-left: auto; font: 14px var(--mono); color: var(--ink-2); white-space: nowrap; }
.box { position: relative; flex: none; width: 18px; height: 18px; border: 1.5px solid var(--ink-2); border-radius: 2px; }
.box::after { content: ""; position: absolute; left: 4px; top: -5px; width: 7px; height: 14px; border-right: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green);
  transform: rotate(40deg) scale(0); transform-origin: bottom right; }
.todo li.done .box::after { animation: tick .25s forwards; }
.todo li.done .what { text-decoration: line-through; text-decoration-color: transparent; animation: strike .3s forwards; }
.todo li:nth-child(1) .box::after { animation-delay: 4.2s; } .todo li:nth-child(1) .what { animation-delay: 4.4s; }
.todo li:nth-child(2) .box::after { animation-delay: 4.8s; } .todo li:nth-child(2) .what { animation-delay: 5s; }
@keyframes tick { to { transform: rotate(40deg) scale(1); } }
@keyframes strike { to { text-decoration-color: var(--red); color: var(--pencil); } }

/* A ledger sheet */
.sheet { position: relative; background: var(--sheet); border: 1px solid #D8CDB4; padding: 22px 0 16px;
  box-shadow: 0 1px 0 #fff inset, 0 30px 60px -32px rgba(60,40,10,.4), 0 2px 0 #E8DFC9; }
.sheet.tilt { transform: rotate(.6deg); }
.sheet::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 9px; background: repeating-linear-gradient(90deg, #E3D9C2 0 14px, transparent 14px 22px); }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 24px 12px; }
.sheet-head b { font: italic 400 27px var(--serif); }
.sheet-head span { font: 500 10.5px var(--mono); letter-spacing: .12em; color: var(--ink-2); text-transform: uppercase; white-space: nowrap; }
.sheet table { width: 100%; border-collapse: collapse; font: 14px var(--mono); }
.sheet th { font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--green); text-align: left; padding: 8px 12px; border-top: 2px solid var(--green); border-bottom: 1px solid var(--green); }
.sheet td { padding: 0 12px; height: 38px; border-bottom: 1px solid var(--rule-soft); white-space: nowrap; }
.sheet .n { text-align: right; border-left: 1px solid #E9B3AC; }
.sheet td:first-child, .sheet th:first-child { padding-left: 24px; color: var(--ink-2); }
.sheet td:last-child, .sheet th:last-child { padding-right: 24px; }
.sheet tr.total td { border-top: 1.5px solid var(--ink); border-bottom: 3px double var(--ink); font-weight: 500; color: var(--ink); }
.write { display: inline-block; clip-path: inset(0 100% 0 0); animation: write .9s steps(18) forwards; }
@keyframes write { to { clip-path: inset(0 0 0 0); } }
.pencil-note { font: 600 21px/1 var(--hand); color: var(--red); display: inline-block; transform: rotate(-6deg); opacity: 0; animation: fade .4s 1.3s forwards; }
@keyframes fade { to { opacity: 1; } }
@media (max-width: 640px) {
  .sheet .hide-sm { display: none; }
  .sheet-head { margin: 0 14px 10px; flex-wrap: wrap; } .sheet-head b { white-space: nowrap; font-size: 23px; }
  .sheet table { table-layout: fixed; font-size: 12px; }
  .sheet th:first-child, .sheet td:first-child { display: none; }
  .sheet td, .sheet th { padding: 0 8px; } .sheet th.n, .sheet td.n { width: 82px; }
  .sheet td:nth-child(2), .sheet th:nth-child(2) { padding-left: 14px; overflow: hidden; text-overflow: ellipsis; }
  .sheet td:last-child, .sheet th:last-child { padding-right: 12px; }
}

/* The rubber stamp */
.stamp { position: absolute; width: 168px; height: 168px; border-radius: 50%; border: 3px solid var(--red); color: var(--red); display: grid; place-items: center; text-align: center;
  font: 600 12.5px/1.25 var(--mono); letter-spacing: .12em; text-transform: uppercase; mix-blend-mode: multiply; opacity: 0; transform: rotate(-14deg) scale(2.4); pointer-events: none;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='g'><feTurbulence baseFrequency='.08' numOctaves='3'/><feComponentTransfer><feFuncA type='discrete' tableValues='1 1 1 0 1 1 1 1'/></feComponentTransfer></filter><rect width='200' height='200' filter='url(%23g)'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='g'><feTurbulence baseFrequency='.08' numOctaves='3'/><feComponentTransfer><feFuncA type='discrete' tableValues='1 1 1 0 1 1 1 1'/></feComponentTransfer></filter><rect width='200' height='200' filter='url(%23g)'/></svg>"); }
.stamp::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1.5px solid var(--red); }
.stamp b { display: block; font-size: 22px; letter-spacing: .06em; margin: 3px 0; }
.stamp.now, .in .stamp { animation: stamp .35s .3s cubic-bezier(.3,1.6,.5,1) forwards; }
.hero .stamp { right: 22px; bottom: 50px; animation: stamp .35s 3.5s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes stamp { 60% { opacity: .95; transform: rotate(-14deg) scale(.94); } to { opacity: .88; transform: rotate(-14deg) scale(1); } }
@media (max-width: 640px) { .hero .stamp { width: 128px; height: 128px; right: 8px; bottom: 40px; font-size: 10.5px; } .hero .stamp b { font-size: 17px; } }

/* Polaroids */
.who-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 40px; margin-bottom: 64px; }
.who-head p { max-width: 28em; margin: 0; }
.polaroids { display: grid; gap: 120px 44px; padding: 0 12px 80px; max-width: 1060px; }
@media (min-width: 760px) { .polaroids { grid-template-columns: repeat(3, 1fr); } }
.polaroid { position: relative; margin: 0; background: #fff; padding: 12px 12px 54px; box-shadow: 0 22px 44px -22px rgba(60,40,10,.5); transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .7s; }
.polaroid:nth-child(1) { transform: rotate(-3deg); } .polaroid:nth-child(2) { transform: rotate(2deg) translateY(18px); } .polaroid:nth-child(3) { transform: rotate(-1.5deg); }
.polaroid:hover { transform: rotate(0) translateY(-6px); z-index: 2; }
.polaroid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 12%; filter: sepia(.12) saturate(.92) contrast(1.02); }
.polaroid figcaption { position: absolute; left: 12px; right: 12px; bottom: 12px; text-align: center; font: 600 24px/1 var(--hand); color: var(--ink-2); }
.polaroid .tape { position: absolute; top: -14px; left: 50%; width: 96px; height: 28px; margin-left: -48px; background: var(--tape); transform: rotate(-4deg); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.polaroid p { position: absolute; left: 0; right: 0; top: 100%; margin: 22px 4px 0; font-size: 15px; color: var(--ink-2); }

/* Chapters */
.chapters { display: grid; gap: 64px 56px; margin-top: 64px; }
@media (min-width: 900px) { .chapters { grid-template-columns: 1fr 1fr; } }
.chap { display: grid; grid-template-columns: 64px 1fr; gap: 0 20px; }
.chap > * { min-width: 0; }
.chap .roman { font: italic 56px/1 var(--serif); color: var(--red); }
.chap p { margin: 10px 0 18px; color: var(--ink-2); }
.excerpt { background: var(--sheet); border: 1px solid #DDD2BA; font: 13.5px var(--mono); box-shadow: 0 14px 30px -24px rgba(60,40,10,.5); }
.excerpt .row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--rule-soft); }
.excerpt .row:first-child { border-top: 0; }
.excerpt .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.excerpt .ok { color: var(--green); font-weight: 500; }
.excerpt .late { color: var(--red); font-weight: 500; }
.excerpt .bars { display: flex; gap: 4px; padding: 4px 14px 14px; }
.excerpt .bars i { flex: 1; height: 6px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.excerpt .bars i.open { background: var(--ink); }
.no-js .excerpt .bars i, .in .excerpt .bars i { transform: none; }
.in .excerpt .bars i:nth-child(2) { transition-delay: .12s; } .in .excerpt .bars i:nth-child(3) { transition-delay: .24s; }
.in .excerpt .bars i:nth-child(4) { transition-delay: .36s; } .in .excerpt .bars i:nth-child(5) { transition-delay: .48s; }

/* E-invoicing: an invoice that gets stamped, and the checker on an index card */
.split { display: grid; gap: 56px; align-items: start; }
@media (min-width: 1000px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; } }
.split > * { min-width: 0; }
.filed { position: relative; height: 230px; margin-top: 44px; max-width: 460px; }
.filed .sheet { position: absolute; left: 0; top: 0; width: min(330px, 100%); padding: 18px 22px; transform: rotate(-2deg); font: 13.5px var(--mono); line-height: 1.9; }
.filed .sheet b { display: block; font: italic 400 25px var(--serif); line-height: 1.2; margin-bottom: 4px; }
.filed .stamp { left: min(240px, 52%); top: 34px; }
.ticks { list-style: none; margin: 26px 0 0; padding: 0; }
.ticks li { position: relative; padding-left: 34px; margin-bottom: 12px; color: var(--ink-2); }
.ticks li::before { content: "✓"; position: absolute; left: 4px; top: -6px; font: 600 26px var(--hand); color: var(--green); }
.ticks b { color: var(--ink); font-weight: 600; }
.card { position: relative; background: #FFFEFA; border: 1px solid #D9CFB8; box-shadow: 0 26px 50px -30px rgba(60,40,10,.5); padding: 24px 28px 18px; transform: rotate(.8deg);
  background-image: linear-gradient(transparent 70px, rgba(184,54,43,.55) 70px 71px, transparent 71px), repeating-linear-gradient(180deg, transparent 0 39px, #E3EAF3 39px 40px); background-position: 0 0, 0 31px; }
.card fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.card legend { font: italic 28px var(--serif); padding: 0; margin: 0 0 22px; }
.card label { display: flex; align-items: center; gap: 12px; height: 40px; cursor: pointer; font-size: 15.5px; }
.card input[type=radio] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--ink-2); border-radius: 2px; margin: 0; flex: none; position: relative; cursor: pointer; background: #FFFEFA; }
.card input[type=radio]:checked::after { content: ""; position: absolute; left: 4px; top: -6px; width: 7px; height: 14px; border-right: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(40deg); }
.answer { margin-top: 14px; padding: 14px 0 6px; border-top: 1.5px dashed #CFC5AE; min-height: 112px; }
.answer strong { display: block; font: 600 28px/1.1 var(--hand); color: var(--red); }
.answer p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }
.source { margin-top: 10px; font-size: 12.5px; color: var(--pencil); }
.source a { color: var(--pencil); }

/* Firms: a ledger page of everyone's work, ticking itself off */
.qlist { list-style: none; margin: 0; padding: 0; height: 372px; overflow: hidden; border-top: 2px solid var(--green); }
.qrow { display: flex; align-items: center; gap: 14px; padding: 0 22px; height: 62px; border-bottom: 1px solid var(--rule-soft); font-size: 14.5px;
  transition: opacity .45s, transform .45s, height .45s .3s, padding .45s .3s; }
.qrow .what { flex: 1; min-width: 0; }
.qrow .what b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow .what small { display: block; font: 12.5px var(--mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow .flag { font: 600 21px/1 var(--hand); color: var(--red); white-space: nowrap; transform: rotate(-4deg); }
.qrow.doing .box::after { animation: tick .25s forwards; }
.qrow.doing .what b { text-decoration: line-through; text-decoration-color: var(--red); color: var(--pencil); }
.qrow.gone { opacity: 0; transform: translateX(20px); height: 0; padding-top: 0; padding-bottom: 0; border-bottom-width: 0; }
.qrow.new .what b, .qrow.new .what small { clip-path: inset(0 100% 0 0); animation: write .8s steps(16) forwards; }
.qrow.new .what small { animation-delay: .3s; }
.queue .count { color: var(--green); }
.calc { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 28px; font: 600 27px/1.3 var(--hand); color: var(--pencil); }
.calc input { width: 74px; font: 600 30px var(--hand); color: var(--ink); background: transparent; border: 0; border-bottom: 2px solid var(--ink-2); text-align: center; padding: 0 2px; -moz-appearance: textfield; }
.calc input::-webkit-inner-spin-button { opacity: .4; }
.calc output { color: var(--ink); border-bottom: 3px double var(--ink); padding: 0 2px; }

/* Price list */
.prices { margin-top: 48px; overflow-x: auto; padding: 4px 4px 40px; }
.prices table { width: 100%; min-width: 780px; border-collapse: collapse; background: var(--sheet); border: 1px solid #D8CDB4; box-shadow: 0 30px 60px -36px rgba(60,40,10,.45); }
.prices th { font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--green); text-align: left; padding: 14px 20px; border-bottom: 2px solid var(--green); }
.prices th.n { text-align: right; font: 500 10.5px var(--mono); border-left: 1px solid #E9B3AC; }
.prices .btn { white-space: nowrap; padding: 10px 16px; font-size: 14px; }
.prices td { padding: 22px 20px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.prices .n { text-align: right; font: 500 23px var(--mono); white-space: nowrap; border-left: 1px solid #E9B3AC; }
.prices .n small { display: block; font: 12px var(--mono); color: var(--ink-2); font-weight: 400; margin-top: 2px; }
.prices .plan { font: 400 30px/1 var(--serif); white-space: nowrap; }
.prices .plan small { display: block; font: 13.5px var(--sans); color: var(--ink-2); margin-top: 8px; white-space: normal; }
.prices .inc { font-size: 14.5px; color: var(--ink-2); }
.prices tr.pick td { background: rgba(232,214,170,.28); }
.prices .mark { display: block; font: 600 21px var(--hand); color: var(--red); transform: rotate(-3deg); margin-top: 8px; }
.prices tr.addon td { border-bottom: 3px double var(--ink); }
.fine { margin-top: 2px; font-size: 13.5px; color: var(--pencil); }
@media (max-width: 760px) {
  .prices { overflow: visible; padding: 4px 0 24px; }
  .prices table, .prices tbody, .prices tr, .prices td { display: block; min-width: 0; width: 100%; }
  .prices table { min-width: 0; } .prices thead { display: none; }
  .prices tr { padding: 18px 18px 20px; border-bottom: 1px solid var(--rule-soft); }
  .prices tr.addon { border-bottom: 3px double var(--ink); }
  .prices td { padding: 0; border: 0; }
  .prices td.inc { margin: 10px 0 12px; }
  .prices td.n { display: inline-block; width: auto; border: 0; text-align: left; margin-right: 22px; font-size: 21px; }
  .prices td.n::before { content: attr(data-label); display: block; font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--green); margin-bottom: 2px; }
  .prices td:last-child { margin-top: 14px; } .prices td:last-child:empty { display: none; }
  .prices tr.pick { background: rgba(232,214,170,.28); } .prices tr.pick td { background: transparent; }
}

/* Security: the printed rules at the front of the book */
.rules { display: grid; gap: 0 56px; margin-top: 56px; counter-reset: r; }
@media (min-width: 900px) { .rules { grid-template-columns: 1fr 1fr; } }
.rule { display: grid; grid-template-columns: 56px 1fr; gap: 0 18px; padding: 24px 0; border-top: 1px solid var(--rule); counter-increment: r; }
.rule::before { content: counter(r, upper-roman) "."; font: italic 34px/1 var(--serif); color: var(--red); grid-row: span 2; }
.rule h3 { font-size: 27px; }
.rule p { margin: 8px 0 0; color: var(--ink-2); font-size: 15.5px; }

/* FAQ */
.faq { margin-top: 48px; max-width: 880px; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 18px; font: 400 27px/1.15 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 22px var(--mono); color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 12px 0 0; color: var(--ink-2); max-width: 66ch; }

/* Early access: a paper form, stamped when you join */
.slip { position: relative; background: #FFFEFA; border: 1px solid #D9CFB8; padding: 28px 30px 26px; box-shadow: 0 30px 60px -34px rgba(60,40,10,.5); transform: rotate(-.6deg); }
.slip .form-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 20px; }
.slip .form-title b { font: italic 400 30px var(--serif); }
.slip .form-title span { font: 500 10.5px var(--mono); letter-spacing: .14em; color: var(--ink-2); white-space: nowrap; }
.slip label { display: block; margin-bottom: 18px; font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.slip input[type=text], .slip input[type=email], .slip select { display: block; width: 100%; margin-top: 4px; font: 400 17px var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1.5px solid var(--ink-2); padding: 6px 2px; border-radius: 0; }
.slip input:focus, .slip select:focus { outline: none; border-bottom-color: var(--red); }
.slip .consent { display: flex; gap: 12px; align-items: flex-start; font: 400 14px/1.5 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink-2); margin: 22px 0; }
.slip .consent input { margin-top: 3px; accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
.slip p.consent { display: block; }
.stamp[hidden], .thanks[hidden] { display: none; }
.slip .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.slip .stamp { right: 26px; bottom: 22px; width: 138px; height: 138px; }
.errors { margin: 6px 0 0; padding: 0; list-style: none; font: 400 13px var(--sans); letter-spacing: 0; text-transform: none; color: var(--red); }
.thanks { font: 600 27px/1.2 var(--hand); color: var(--green); margin: 0 0 18px; }

/* Scroll reveal, switched on by the script so the page reads fine without it */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .polaroid[data-reveal]:not(.in) { opacity: 0; transform: translateY(40px) rotate(0); }
.js .polaroid[data-reveal].in:nth-child(1) { transform: rotate(-3deg); }
.js .polaroid[data-reveal].in:nth-child(2) { transform: rotate(2deg) translateY(18px); transition-delay: .1s; }
.js .polaroid[data-reveal].in:nth-child(3) { transform: rotate(-1.5deg); transition-delay: .2s; }
.js .polaroid[data-reveal].in:hover { transform: rotate(0) translateY(-6px); transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-delay: 0s !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}


/* ---------- Unified footer: the back page of the book ---------- */
.foot { position: relative; z-index: 1; border-top: 3px double var(--ink); padding: 64px 0 40px; background: rgba(237,230,212,.55); }
.foot-grid { display: grid; gap: 40px 48px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.foot-brand .brand { font-size: 29px; gap: 12px; }
.foot-brand p { margin: 14px 0 10px; color: var(--ink-2); max-width: 24em; font-size: 15px; }
.foot nav h2 { font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--green); margin: 6px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--green); }
.foot nav a { display: block; text-decoration: none; color: var(--ink); font-size: 15px; line-height: var(--line); }
.foot nav a:hover { color: var(--red); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.foot-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--rule); font: 12.5px var(--mono); color: var(--ink-2); }

/* ---------- Inner pages ---------- */
.page-head { padding: 72px 0 64px; }
.page-head h1 { font-size: clamp(48px, 6.6vw, 86px); line-height: .96; max-width: 14ch; }
.page-head .lede { margin-top: 22px; }
.page-head .meta { margin-top: 22px; font: 12.5px var(--mono); color: var(--ink-2); letter-spacing: .04em; }
.page-head .head-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px 48px; }
.draft { flex: none; align-self: center; border: 3px solid var(--red); color: var(--red); padding: 10px 16px 8px; transform: rotate(-6deg); text-align: center; mix-blend-mode: multiply;
  font: 600 13px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.draft b { display: block; font-size: 24px; letter-spacing: .1em; }
.tbd { font: 500 .86em var(--mono); color: var(--pencil); background: rgba(238,222,170,.55); padding: 1px 6px; border-radius: 2px; white-space: nowrap; }

/* Legal pages: a contents list in the margin, numbered clauses beside it */
.legal { display: grid; gap: 40px; align-items: start; padding-bottom: 40px; }
@media (min-width: 1000px) { .legal { grid-template-columns: 230px 1fr; gap: 64px; } }
.toc { position: sticky; top: 96px; font-size: 14px; }
.toc h2 { font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--green); margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--green); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: 10px; padding: 5px 0; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.toc a::before { content: counter(t) "."; font: italic 17px/1.1 var(--serif); color: var(--red); min-width: 20px; }
.toc a:hover, .toc a.here { color: var(--ink); }
.toc a.here { font-weight: 600; }
@media (max-width: 999px) { .toc { position: static; border: 1px solid var(--rule); background: var(--sheet); padding: 16px 18px; } }
.clauses { max-width: 72ch; counter-reset: c; }
.clauses > section { padding: 0 0 40px; border: 0; counter-increment: c; }
.clauses > section + section { border-top: 1px solid var(--rule); padding-top: 36px; }
.clauses h2 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.05; display: flex; gap: 16px; align-items: baseline; margin-bottom: 14px; }
.clauses h2::before { content: counter(c) "."; font: italic 1em var(--serif); color: var(--red); min-width: 1.2em; }
.clauses h3 { font-size: 23px; margin: 22px 0 6px; }
.clauses p, .clauses li { color: #2E3A58; font-size: 16.5px; line-height: 1.7; }
.clauses p { margin: 0 0 14px; }
.clauses ul { margin: 0 0 16px; padding-left: 22px; }
.clauses li { margin-bottom: 6px; }
.clauses li::marker { color: var(--red); }
.clauses a { color: var(--ink); text-decoration-color: var(--red); text-underline-offset: 3px; }
.plain { margin: 0 0 18px; padding: 14px 18px; background: var(--sheet); border-left: 3px solid var(--green); font-size: 15.5px; color: var(--ink-2); }
.plain b { color: var(--green); font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; display: block; margin-bottom: 4px; }
.ledger-table { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1px solid #D8CDB4; margin: 8px 0 20px; font-size: 14.5px; }
.ledger-table th { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--green); text-align: left; padding: 10px 14px; border-bottom: 2px solid var(--green); }
.ledger-table td { padding: 12px 14px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; color: #2E3A58; }
.ledger-table code { font: 500 13.5px var(--mono); color: var(--ink); }
@media (max-width: 640px) { .ledger-table, .ledger-table tbody, .ledger-table tr, .ledger-table td { display: block; } .ledger-table thead { display: none; } .ledger-table tr { padding: 10px 0; border-bottom: 1px solid var(--rule-soft); } .ledger-table td { border: 0; padding: 4px 14px; } }

/* About */
.colophon { background: var(--sheet); border: 1px solid #D8CDB4; box-shadow: 0 30px 60px -36px rgba(60,40,10,.45); padding: 26px 28px; transform: rotate(-.8deg); font-size: 15px; }
.colophon h3 { font: italic 28px var(--serif); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.colophon dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; }
.colophon dt { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--green); padding-top: 4px; }
.colophon dd { margin: 0; color: var(--ink); }
.story p { font-size: 18px; color: #2E3A58; max-width: 36em; }
.story p:first-of-type::first-letter { font: 400 84px/.8 var(--serif); float: left; color: var(--red); margin: 6px 10px 0 0; }

/* Contact and support */
.ways { list-style: none; margin: 30px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.ways li { display: grid; grid-template-columns: 150px 1fr; gap: 6px 18px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.ways b { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--green); padding-top: 4px; }
.ways span { color: var(--ink-2); font-size: 15px; } .ways a { color: var(--ink); font-weight: 500; }
@media (max-width: 520px) { .ways li { grid-template-columns: 1fr; } }
.slip textarea { display: block; width: 100%; margin-top: 6px; min-height: 160px; font: 400 16px/32px var(--sans); color: var(--ink); border: 0; padding: 0 2px; resize: vertical;
  background: repeating-linear-gradient(180deg, transparent 0 31px, var(--ink-2) 31px 32px); background-attachment: local; }
.slip textarea:focus { outline: none; }
.tabs { display: grid; gap: 22px; margin-top: 8px; }
@media (min-width: 640px) { .tabs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tabs { grid-template-columns: repeat(3, 1fr); } }
.tab { position: relative; display: block; text-decoration: none; color: var(--ink); background: var(--sheet); border: 1px solid #D8CDB4; padding: 30px 22px 22px; box-shadow: 0 18px 36px -28px rgba(60,40,10,.5); transition: transform .2s; }
.tab::before { content: attr(data-tab); position: absolute; top: -1px; left: 18px; transform: translateY(-100%); padding: 5px 12px 4px; background: var(--tab, var(--green)); color: #FFF; font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; border-radius: 4px 4px 0 0; }
.tab:hover { transform: translateY(-4px); }
.tab h3 { font-size: 27px; margin-bottom: 8px; }
.tab p { margin: 0; font-size: 15px; color: var(--ink-2); }
.answers { display: grid; gap: 8px 64px; margin-top: 56px; }
@media (min-width: 1000px) { .answers { grid-template-columns: 1fr 1fr; } }
.answers h2 { font-size: 34px; margin: 28px 0 8px; padding-top: 18px; border-top: 2px solid var(--ink); }
.answers details { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.answers summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 14px; font-weight: 500; font-size: 16.5px; }
.answers summary::-webkit-details-marker { display: none; }
.answers summary::after { content: "+"; font: 500 18px var(--mono); color: var(--red); }
.answers details[open] summary::after { content: "–"; }
.answers p { margin: 10px 0 0; color: var(--ink-2); font-size: 15.5px; }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-top: 64px; padding: 26px 30px; border: 2px solid var(--ink); background: var(--sheet); }
.cta-band h2 { font-size: 36px; }
