/* Daftar site: a ledger page. Readex Pro for everything,
   IBM Plex Mono only where something is printed on a receipt. */

@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/plexmono-400.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; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("./fonts/plexmono-600.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; }
@font-face { font-family: "Readex Pro"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("./fonts/readex-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Readex Pro"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("./fonts/readex-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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: "Readex Pro"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("./fonts/readex-latin.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; }

:root {
  --paper: #eaf0dd;
  --rule: #d3e0c2;
  --rule-strong: #a9c193;
  --margin: #d2412f;
  --margin-soft: rgba(210, 65, 47, 0.55);
  --ink: #1e2620;
  --ink-soft: #46544b;
  --pen: #2440a8;
  --pen-dark: #1a3187;
  --thermal: #fafaf6;
  --print: #262626;
  --print-soft: #5f5f5f;
  --cover: #1f3a2e;
  --cover-deep: #172d23;
  --foil: #c8a451;
  --foil-soft: #e6d39c;

  --f-body: "Readex Pro", -apple-system, "Segoe UI", Tahoma, sans-serif;
  --f-mono: "IBM Plex Mono", "Readex Pro", ui-monospace, Menlo, Consolas, monospace;

  --line: 28px;
  --mx: 104px;
  --start: 136px;
  --end: 40px;
  --wide: 1320px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: var(--line);
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(to bottom, transparent calc(var(--line) - 1px), var(--rule) 0);
  background-size: 100% var(--line);
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { line-height: 30px; }

a { color: var(--pen); }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--ink-soft); }
.small, .fine { font-size: 14px; }
.fine { color: var(--ink-soft); margin: 8px 0 0; }
.center { text-align: center; }
.note { max-width: 70ch; color: var(--ink-soft); font-size: 15px; margin: 16px 0; }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 4px;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(36px, 4.3vw, 56px); line-height: 1.08; margin: 0 0 22px; }
h2 { font-size: clamp(27px, 3.1vw, 38px); line-height: 1.15; margin: 0 0 10px; }
[dir="rtl"] :is(h1, h2, h3) { letter-spacing: 0; }
[dir="rtl"] h1 { line-height: 1.35; }
[dir="rtl"] h2 { line-height: 1.4; }

/* page frame: the red double margin line */
main { max-width: var(--wide); margin: 0 auto; position: relative; overflow-x: clip; }
main::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  inset-inline-start: var(--mx); width: 5px;
  border-inline: 1px solid var(--margin-soft);
  pointer-events: none;
}
.hero, .ledger, .page-hero { padding-inline: var(--start) var(--end); }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 10px max(20px, calc((100vw - var(--wide)) / 2 + 20px));
  background: var(--paper);
  border-bottom: 3px double var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 21px; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
.brand-text small { font-size: 12px; line-height: 16px; color: var(--ink-soft); }
.top-links { display: flex; gap: 22px; }
.top-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.top-links a:hover { color: var(--pen); }
.top-links a[aria-current="page"] { text-decoration: underline wavy var(--margin) 1.5px; text-underline-offset: 7px; }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; }
.seg a { display: block; padding: 6px 12px; font: 600 14px/20px var(--f-body); color: var(--ink); text-decoration: none; }
.seg a.on { background: var(--ink); color: var(--paper); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 16px/20px var(--f-body);
  padding: 11px 18px; border: 1.5px solid var(--ink); border-radius: 4px;
  background: transparent; color: var(--ink); text-decoration: none; cursor: pointer;
}
.btn:hover { background: rgba(30, 38, 32, 0.07); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pen); border-color: var(--pen); color: #fff; }
.btn-primary:hover { background: var(--pen-dark); border-color: var(--pen-dark); }
.btn-big { padding: 14px 22px; font-size: 17px; }
.btn-ghost { border-color: transparent; }
.btn-foil { border-color: var(--foil); color: var(--foil); }
.btn-foil:hover { background: rgba(200, 164, 81, 0.12); }

/* form bits */
.input {
  font: 600 16px/24px var(--f-mono); color: inherit;
  background: transparent; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0;
  padding: 4px 2px; width: 110px;
}
.input:focus { outline: none; border-bottom-color: var(--pen); box-shadow: 0 2px 0 var(--pen); }
select.input {
  width: auto; cursor: pointer; appearance: none; -webkit-appearance: none;
  padding-inline-end: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%231e2620' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 4px center;
}
[dir="rtl"] select.input { background-position: left 4px center; }
.pick {
  font: 600 13px/18px var(--f-body); color: var(--ink);
  background: transparent; border: 1.5px solid var(--ink); border-radius: 4px;
  padding: 4px 10px; cursor: pointer;
}
.pick:hover { color: var(--pen); border-color: var(--pen); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  column-gap: 48px; padding-block: 52px 36px; align-items: center;
}
.hero h1 { max-width: 16ch; }
.lede { font-size: 19px; line-height: 30px; max-width: 52ch; margin: 0 0 26px; color: var(--ink-soft); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* hero scene: the real sale screen on a laptop, its receipt printing beside it */
.scene { position: relative; padding-bottom: 64px; }
.laptop { position: relative; padding: 12px 12px 16px; background: #1b1f1d; border-radius: 14px 14px 4px 4px; }
.laptop::after {
  content: ""; position: absolute; inset-inline: -5%; bottom: -14px; height: 14px;
  background: linear-gradient(#d3d8cf, #9aa39a); border-radius: 2px 2px 14px 14px;
}
.laptop .shot { margin: 0; }
.laptop .shot-frame { border: 0; border-radius: 3px; }
.scene-print { position: absolute; inset-inline-start: -28px; bottom: 0; width: 236px; }
.scene-print .printer { height: 22px; }
.receipt.hero-rcpt { font-size: 11px; line-height: 16px; padding: 12px 12px calc(var(--tooth) + 10px); }
.hero-rcpt .receipt-head { padding-bottom: 6px; margin-bottom: 6px; }
.hero-rcpt .receipt-head strong { font-size: 13px; }
.hero-rcpt .receipt-head span { font-size: 11px; }
.hero-rcpt .bl { padding: 2px 0; }
.hero-rcpt .bl.total { padding-top: 8px; margin-top: 4px; }
.hero-rcpt .bl.total > span { font-size: 14px; }
.hero-rcpt .bl.total b { font-size: 18px; }
.hero-rcpt .bl.lbp { color: var(--print-soft); padding-top: 0; }
.hero-rcpt .bl.lbp i { border: 0; }
.hero-rcpt .paid-stamp { top: 42%; inset-inline-end: 14px; font-size: 17px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-rcpt { animation: feed-in 1.9s steps(18) 0.5s both; }
  .hero-rcpt .bl { animation: ink 0.2s steps(2) both; animation-delay: calc(0.7s + var(--i) * 0.22s); }
  .hero-rcpt .paid-stamp { animation: stamp 0.28s cubic-bezier(.2, 1.6, .4, 1) 2.55s both; }
}
@keyframes feed-in { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes ink { from { opacity: 0; } to { opacity: 1; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-11deg) scale(1.5); } to { opacity: 0.85; transform: rotate(-11deg) scale(1); } }

/* screenshots of the real app */
.shot { margin: 28px 0 0; }
.shot-frame { border: 1.5px solid var(--ink); border-radius: 6px; overflow: hidden; background: #f4f6f7; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 10px; font-size: 15px; color: var(--ink-soft); max-width: 72ch; }

/* the counter: keys + printer */
.counter-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 40px; align-items: start; max-width: 900px; }
.counter-demo .keys { order: -1; }
.keys { display: grid; gap: 14px; align-content: start; }
.till-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.till-btn {
  display: flex; flex-direction: column; gap: 2px; text-align: start; cursor: pointer;
  font: 600 14px/18px var(--f-body); color: var(--ink);
  background: #f6f7f1; border: 1px solid #8e9a88; border-bottom-width: 4px; border-radius: 6px;
  padding: 9px 10px 7px;
}
.till-btn:hover { background: #fff; }
.till-btn:active { border-bottom-width: 1px; transform: translateY(3px); }
.till-btn span { font: 600 12.5px/16px var(--f-mono); color: var(--pen); }
.rate-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.rate-row .input { width: 96px; }
.disc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.disc-row .fine { margin: 0; }
.disc { display: flex; align-items: center; gap: 6px; }
.disc-input { width: 80px; text-align: end; }
.disc-mode { font: 600 14px/20px var(--f-mono); width: 32px; height: 30px; border: 1.5px solid var(--ink); border-radius: 4px; background: transparent; cursor: pointer; }
.receipt-actions { display: flex; gap: 8px; }
.receipt-actions .btn-primary { flex: 1; }
.modal { width: min(360px, calc(100vw - 32px)); padding: 20px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--thermal); color: var(--ink); }
.modal::backdrop { background: rgba(30, 38, 32, 0.45); }
.modal p { margin: 0 0 14px; }
.modal .input { width: 100%; margin-bottom: 18px; }
.modal [hidden] { display: none; }
.till-status { margin: 0; min-height: var(--line); font-size: 15px; color: var(--pen); }

.slot { position: relative; }
.printer {
  position: relative; z-index: 2; height: 26px;
  background: #2a302c; border-radius: 8px 8px 3px 3px;
  box-shadow: inset 0 -7px 0 #161a18;
}
.printer::after { content: ""; position: absolute; inset-inline: 16px; bottom: 5px; height: 3px; border-radius: 2px; background: #030504; }
.feed { margin: -9px 12px 0; clip-path: inset(0 -40px -80px -40px); filter: drop-shadow(0 8px 9px rgba(31, 58, 46, 0.2)); }
.receipt-wrap { filter: drop-shadow(0 8px 9px rgba(31, 58, 46, 0.18)); }

/* thermal receipt */
.receipt {
  --tooth: 12px;
  position: relative; width: 100%;
  background: var(--thermal); color: var(--print);
  font: 13.5px/21px var(--f-mono);
  padding: 18px 18px calc(var(--tooth) + 18px);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tooth) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tooth) 100%;
}
.receipt.feed-out { animation: feed 0.7s steps(14) both; }
@keyframes feed { from { transform: translateY(-70%); } to { transform: none; } }
.receipt-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px dashed var(--print); }
.receipt-head strong { font: 700 17px/1 var(--f-mono); letter-spacing: 0.14em; }
.receipt-head span { color: var(--print-soft); font-size: 12.5px; }
.rcpt-meta { margin: 0 0 8px; font-size: 12.5px; color: var(--print-soft); }
.cart-lines { min-height: 42px; }
.cart-row { display: flex; align-items: baseline; gap: 8px; padding: 2px 0; }
.cart-row .grow { flex: 1; min-width: 0; }
.qty { display: inline-flex; gap: 3px; }
.qty button { width: 22px; height: 22px; padding: 0; font: 600 13px/1 var(--f-mono); color: var(--print); background: transparent; border: 1px solid #b5b5b0; border-radius: 3px; cursor: pointer; }
.receipt.paid .qty { display: none; }
.cart-empty { color: var(--print-soft); padding: 8px 0; }
.totals { border-top: 1px dashed var(--print); margin-top: 8px; padding-top: 10px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.total-row strong { font: 700 28px/1 var(--f-mono); letter-spacing: -0.02em; }
.total-row.secondary { color: var(--print-soft); }
.frozen-note { margin-top: 8px; padding: 6px 8px; border: 1px dashed var(--print); font-size: 12px; line-height: 17px; }
.paid-stamp {
  position: absolute; inset-inline-end: 16px; top: 38%;
  font: 700 22px/1 var(--f-mono); letter-spacing: 0.04em; color: var(--margin);
  border: 3px solid var(--margin); border-radius: 6px; padding: 4px 10px 2px;
  transform: rotate(-11deg); opacity: 0.85; mix-blend-mode: multiply;
}
.barcode {
  height: 38px; margin-top: 16px; opacity: 0.9;
  background: repeating-linear-gradient(90deg, var(--print) 0 2px, #0000 2px 4px, var(--print) 4px 5px, #0000 5px 8px, var(--print) 8px 11px, #0000 11px 12px, var(--print) 12px 13px, #0000 13px 17px);
}
.bl { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; }
.bl[hidden] { display: none; }
.bl > span { max-width: 62%; }
.bl i { flex: 1; min-width: 12px; border-bottom: 1px dotted var(--print); transform: translateY(-4px); }
.bl b { font-weight: 600; text-align: end; }
.bl.total { border-top: 1px dashed var(--print); margin-top: 6px; padding-top: 12px; }
.bl.total > span { font: 600 17px/1 var(--f-body); }
.bl.total b { font: 700 26px/1 var(--f-mono); letter-spacing: -0.02em; }

/* ---------- ledger sections ---------- */
.ledger { padding-block: 72px 0; }
.ledger-head { margin-bottom: 22px; }
.ledger-head p { margin: 0; max-width: 64ch; color: var(--ink-soft); }
.table-scroll { overflow-x: auto; }

.journal, .match-table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.journal { min-width: 540px; }
.journal th, .match-table th {
  font: 600 13px/20px var(--f-body); color: var(--ink-soft); text-align: start;
  padding: 4px 12px; border-bottom: 2px solid var(--ink);
}
.journal td, .match-table td { padding: 0 12px; height: 42px; border-bottom: 1px solid var(--rule-strong); }
.journal th:nth-child(1), .journal th:nth-child(2) { width: 88px; }
.journal .amt { text-align: end; width: 130px; border-inline-start: 1px solid var(--margin-soft); font-family: var(--f-mono); }
.journal td.cr { padding-inline-start: 44px; }
.journal .empty td { color: var(--ink-soft); }
.journal tr.new td { animation: inked 1.6s ease-out; }
@keyframes inked { from { background: rgba(36, 64, 168, 0.16); } to { background: transparent; } }

.ledger-table { border-top: 2px solid var(--ink); }
.lrow { display: grid; grid-template-columns: minmax(0, 1fr) 150px; border-bottom: 1px solid var(--rule-strong); position: relative; }
.lrow > span:first-child { padding-block: 13px; padding-inline-end: 18px; }
.lrow strong { font-weight: 600; }
.lrow .tag.num { font: 600 16px/1 var(--f-mono); }
.lrow .tag {
  display: flex; align-items: center; padding: 10px 14px;
  border-inline-start: 1px solid var(--margin-soft);
  font: 600 15px/1.3 var(--f-body); color: var(--pen);
}
.tag.warn, .tag.soon { color: var(--margin); }
.soon:not(.tag) { display: inline-block; margin-inline-start: 6px; padding: 0 6px; border: 1.5px solid currentColor; border-radius: 3px; font-size: 13px; line-height: 20px; font-weight: 600; color: var(--margin); vertical-align: 2px; }
.lrow.circled > span { padding-block: 22px; }
.pen-circle { position: absolute; top: -4px; inset-inline-start: -18px; width: calc(100% + 30px); height: calc(100% + 8px); pointer-events: none; overflow: visible; }
.pen-circle path { fill: none; stroke: var(--margin); stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* sequences hang their number or time in the margin */
.day, .steps, .steps-v { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.day li, .steps li, .steps-v li { position: relative; padding: 14px 0; border-bottom: 1px solid var(--rule-strong); }
.hang, .steps li > strong {
  position: absolute; top: 14px;
  inset-inline-start: calc(-1 * var(--start));
  width: calc(var(--mx) - 16px); text-align: end;
  font: 600 22px/1.2 var(--f-mono); color: var(--pen);
}
[dir="rtl"] .hang { direction: rtl; }
.day strong, .steps b, .steps-v b { display: block; font-weight: 600; font-size: 18px; }
.day p { margin: 2px 0 0; max-width: 68ch; color: var(--ink-soft); }
.steps li > div, .steps-v li > div { display: grid; }
.steps span, .steps-v span:not(.hang) { color: var(--ink-soft); }

.chain {
  list-style: none; margin: 0 0 24px; padding: 0; counter-reset: c;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule-strong);
}
.chain li { counter-increment: c; padding: 14px 16px 16px; display: grid; gap: 2px; }
.chain li + li { border-inline-start: 1px solid var(--rule-strong); }
.chain li::before { content: counter(c); font: 600 20px/1.2 var(--f-mono); color: var(--pen); }
.chain strong { font-size: 21px; font-weight: 600; }
.chain span { color: var(--ink-soft); font-size: 15px; }

.money-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule-strong); }
.money-card { padding: 16px 18px; display: grid; gap: 4px; }
.money-card + .money-card { border-inline-start: 1px solid var(--margin-soft); }
.money-card strong { font-size: 24px; line-height: 1.2; font-weight: 600; }
.money-card span { color: var(--ink-soft); }

.contents { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.contents a { display: flex; align-items: baseline; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule-strong); color: inherit; text-decoration: none; }
.c-t { font-size: 21px; line-height: 1.2; font-weight: 600; white-space: nowrap; }
.contents i { flex: 1; min-width: 24px; border-bottom: 2px dotted var(--ink-soft); transform: translateY(-6px); }
.c-d { color: var(--ink-soft); max-width: 56ch; text-align: end; text-wrap: pretty; }
.contents a:hover .c-t { color: var(--pen); text-decoration: underline wavy var(--margin) 1.5px; text-underline-offset: 6px; }

.tease { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 56px; align-items: center; }
.tease p { max-width: 52ch; color: var(--ink-soft); margin: 0 0 22px; }

/* index tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 8px 6px; }
.tabs a {
  padding: 10px 16px 8px; color: var(--ink); text-decoration: none; font-weight: 600;
  background: var(--tab, #efd58a);
  border: 1.5px solid var(--ink); border-bottom-width: 3px; border-radius: 10px 10px 0 0;
}
.tabs a:nth-child(4n + 2) { --tab: #bcd5ee; }
.tabs a:nth-child(4n + 3) { --tab: #f2bbaa; }
.tabs a:nth-child(4n + 4) { --tab: #c3dda4; }
.tabs a:hover { transform: translateY(-2px); }
.tabs a.all { background: var(--ink); color: var(--paper); }

/* FAQ and guides */
details { border-bottom: 1px solid var(--rule-strong); }
section > details:first-of-type, .group-h + details { border-top: 2px solid var(--ink); }
summary { list-style: none; cursor: pointer; display: flex; gap: 14px; align-items: baseline; padding: 14px 0; font-weight: 600; font-size: 18px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; flex: none; width: 16px; font: 500 24px/1 var(--f-body); color: var(--pen); }
details[open] > summary::before { content: "−"; }
details > p, details > ol { margin: 0 0 18px; margin-inline-start: 30px; max-width: 70ch; }
details > p { color: var(--ink-soft); }

.closing-in { border-top: 4px double var(--ink); padding-top: 28px; display: flex; justify-content: space-between; align-items: end; gap: 28px; flex-wrap: wrap; }
.closing-in p { margin: 0; max-width: 56ch; color: var(--ink-soft); }

/* logo wall: placeholders disappear once one real logo is in */
.logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule-strong); }
.logos li { display: grid; place-items: center; min-height: 104px; padding: 16px; }
.logos li + li { border-inline-start: 1px solid var(--rule-strong); }
.logos img { max-width: 100%; max-height: 56px; width: auto; height: auto; filter: grayscale(1); mix-blend-mode: multiply; opacity: 0.8; transition: filter 0.2s, opacity 0.2s; }
.logos li:hover img, .logos a:focus-visible img { filter: none; opacity: 1; }
.logos:has(img) .logo-slot { display: none; }
.logo-slot span { width: 100%; padding: 14px 8px; text-align: center; font-size: 14px; color: var(--ink-soft); border: 1.5px dashed var(--rule-strong); border-radius: 4px; }
#customers .fine a { color: var(--pen); }

/* storefronts: the shutter rolls up when the shop scrolls into view */
.fronts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.fronts .storefront { display: grid; gap: 4px; color: inherit; text-decoration: none; }
.fronts .storefront-art { margin-bottom: 8px; }
.fronts strong { font-size: 19px; font-weight: 600; }
.fronts span { font-size: 15px; line-height: 22px; color: var(--ink-soft); }
.fronts .storefront:hover strong { color: var(--pen); text-decoration: underline wavy var(--margin) 1.5px; text-underline-offset: 6px; }
.storefront-art { display: block; width: 100%; height: auto; border-radius: 3px; font-family: var(--f-body); }
.storefront .shutter { transform-box: fill-box; transform: translateY(-100%); }
.storefront:not(.shut) .shutter { transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1) calc(var(--n, 0) * 140ms + 150ms); }
.storefront.shut .shutter { transform: none; }

/* the dollar moves: shelf tags follow, the paid receipt does not */
.rate-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: 20px 40px; align-items: start; margin-bottom: 36px; }
.rate-ctl { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-weight: 600; }
.rate-picks { display: flex; gap: 6px; }
.rate-picks .pick { font: 600 15px/20px var(--f-mono); padding: 6px 12px; }
.pick[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 16px; background: #d9c9a3; border-bottom: 8px solid #b59f70; border-radius: 3px; }
.shelf-tag { display: grid; gap: 2px; padding: 12px 14px 10px; background: #fff; border-inline-start: 5px solid var(--margin); color: var(--print); }
.st-name { font-size: 14px; line-height: 20px; }
.st-usd { font: 700 28px/1.15 var(--f-mono); letter-spacing: -0.02em; }
.st-lbp { display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline; font: 600 14px/22px var(--f-mono); }
.st-lbp .was { position: relative; color: var(--print-soft); text-decoration: none; }
.st-lbp .was:empty { display: none; }
.st-lbp .was::after { content: ""; position: absolute; inset-inline: -3px; top: 50%; height: 2px; background: var(--margin); transform: rotate(-6deg); }
.shelf-tag.moved .was::after { animation: strike 0.3s ease-out both; }
@keyframes strike { from { transform: rotate(-6deg) scaleX(0); } to { transform: rotate(-6deg) scaleX(1); } }
.frozen .bl.lbp { color: var(--print-soft); padding-top: 0; }
.frozen .bl.lbp i { border: 0; }
.frozen-line { margin: 12px 0 0; padding-top: 8px; border-top: 1px dashed var(--print); font-size: 12.5px; line-height: 18px; }

/* ---------- sub pages ---------- */
.page-hero { padding-block: 44px 0; }
.page-hero h1 { max-width: 20ch; }
.page-hero .lede { max-width: 62ch; }

/* download */
.dl-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 48px; }
.dl-card { display: grid; gap: 18px; justify-items: start; align-content: start; }
.dl-card .receipt-wrap { width: 100%; }
.match { display: none; }
.dl-card.mine .match {
  display: block; width: fit-content; margin: 2px 0 10px;
  font: 700 15px/1 var(--f-mono); letter-spacing: 0.02em; color: var(--margin);
  border: 2px solid var(--margin); border-radius: 4px; padding: 4px 8px 2px; transform: rotate(-3deg);
}
.slip .bl b { max-width: 60%; }

/* price */
.bill-wrap { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 64px; align-items: start; }
.bill-col { display: grid; gap: 18px; }
.bill-cta { display: grid; gap: 8px; }
.chk { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--pen); }
.bill .input { font-size: 14px; padding-block: 0; }
.bill-notes dl { margin: 0; border-top: 2px solid var(--ink); }
.bill-notes dt { font-weight: 600; font-size: 19px; padding-top: 14px; }
.bill-notes dd { margin: 6px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--rule-strong); color: var(--ink-soft); max-width: 60ch; }

.chat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 56px; align-items: center; }
.chat p { color: var(--ink-soft); max-width: 52ch; }
.phone {
  display: grid; gap: 8px; padding: 18px 12px;
  background: #ece5dd; border: 9px solid var(--ink); border-radius: 30px;
  font-size: 14px; line-height: 20px;
}
.phone .bubble { background: #fff; border-radius: 8px; padding: 8px 10px; max-width: 88%; justify-self: start; }
.phone .bubble.me { background: #d9fdd3; justify-self: end; }
.phone code { font: 12px/18px var(--f-mono); word-break: break-all; }

/* docs */
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 90px; display: grid; gap: 14px; font-size: 14.5px; line-height: 20px; }
.tab-group { display: grid; gap: 4px; }
.toc a { color: var(--ink-soft); text-decoration: none; padding-inline-start: 14px; }
.toc a:hover { color: var(--pen); }
.toc a.tab, .group-h {
  background: var(--tab); color: var(--ink); font-weight: 600;
  border: 1.5px solid var(--ink); border-inline-start: 0;
  border-start-end-radius: 10px; border-end-end-radius: 10px;
  padding: 7px 14px;
}
.group-h { display: inline-block; margin: 48px 0 0; font-size: 22px; line-height: 1.2; border-inline-start: 1.5px solid var(--ink); border-radius: 10px 10px 0 0; padding: 8px 16px 6px; }
.guides > .group-h:first-child { margin-top: 0; }
.g-install { --tab: #efd58a; }
.g-sell { --tab: #bcd5ee; }
.g-setup { --tab: #d9c6ea; }
.g-licence { --tab: #f2bbaa; }
.g-safe { --tab: #c3dda4; }
.g-data { --tab: #e1e3d6; }
.guides details { scroll-margin-top: 90px; }
.guide-intro { color: var(--ink-soft); }
.guides ol { padding: 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.guides ol li::marker { font-weight: 600; color: var(--pen); }
.data-table { margin-top: 0; }
.data-table .lrow { grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 10px 0; }
.data-table .lrow > * { padding: 0; }
.data-table code { font: 12.5px/18px var(--f-mono); word-break: break-all; direction: ltr; unicode-bidi: isolate; }

/* full till page */
.counter { max-width: var(--wide); padding: 28px var(--end) 0 var(--start); display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 44px; align-items: start; }
.catalog-tools { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.catalog-tools .input { flex: 1; min-width: 180px; font-family: var(--f-body); }
.cat-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.till-grid.full { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 18px; }
.counter .receipt { filter: none; }
.counter .receipt-actions { margin-top: 14px; }
.split { border-top: 1px dashed var(--print); margin-top: 12px; padding-top: 10px; display: grid; gap: 6px; }
.split label { display: grid; gap: 2px; font-size: 13px; }
.split input[type="range"] { width: 100%; accent-color: var(--pen); }

/* buying page */
.stages { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 0; }
.stages .btn { flex: 1; min-width: 130px; }
.card.ledger-table { padding: 18px 0 0 !important; overflow-x: auto; }
.match-table .input { width: 90px; }
.flag { font-size: 16px; font-weight: 600; }
.flag.ok { color: var(--pen); }
.flag.bad { color: var(--margin); }
.cheque {
  max-width: 680px; display: grid; gap: 12px; padding: 22px 26px;
  color: #1b2f45; border: 1px solid #9fb3c2;
  background: #e8eff4 repeating-linear-gradient(135deg, rgba(36, 64, 168, 0.05) 0 2px, transparent 2px 7px);
}
.cheque .num[style] { font-family: var(--f-mono); font-weight: 600; font-size: 26px !important; line-height: 1.2; }
.cheque .sig { justify-self: end; min-width: 200px; text-align: center; font: 300 28px/1.5 var(--f-body); color: var(--pen); border-top: 1px solid #9fb3c2; transform: rotate(-3deg); }

/* shops page */
/* "+ more": bilingual shop signs in the storefront palette */
.more-shops { margin-top: 28px; padding-top: 18px; border-top: 1.5px dashed var(--rule-strong); display: grid; gap: 14px; }
.more-mark { margin: 0; display: flex; align-items: baseline; gap: 4px; font-size: 30px; line-height: 1; font-weight: 600; color: var(--pen); }
.more-mark .plus { color: var(--margin); font-size: 42px; }
.signs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1180px) { .signs { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.sign { display: grid; justify-items: center; align-content: center; gap: 4px; padding: 8px 10px 9px; background: var(--sign); color: #fff; border-radius: 3px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2); text-decoration: none; letter-spacing: 0; }
.sign b { font: 600 18px/1.25 var(--f-body); }
.sign span { font: 500 9.5px/1 var(--f-body); letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.85; }
@media (prefers-reduced-motion: no-preference) {
  a.sign { transition: transform 0.2s; }
  a.sign:hover, a.sign:focus-visible { transform: rotate(-2deg); }
}
.more-ask { margin: 0; }
.fits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; border-top: 2px solid var(--ink); }
.fits li { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 18px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--rule-strong); scroll-margin-top: 90px; }
.fits h3 { margin: 2px 0 0; }
.fits p { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 26px; }
#more .note { margin-top: 18px; }

/* privacy and terms */
.policy { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; }
.policy-aside { grid-column: 2; grid-row: 1; position: sticky; top: 24px; }
.policy-body { grid-column: 1; grid-row: 1; max-width: 70ch; }
.policy-body section { scroll-margin-top: 90px; }
.policy-body section + section { margin-top: 40px; }
.policy-body h2 { font-size: 26px; margin-bottom: 8px; }
.policy-body p { margin: 0 0 14px; }
.policy-link { font-weight: 500; }
.policy-aside .bl.total b { font-size: 20px; }
.terms-body { max-width: 72ch; }
.terms li { scroll-margin-top: 90px; }
.terms h2 { font-size: 21px; margin: 0 0 6px; }
.terms p { margin: 0 0 8px; color: var(--ink-soft); }
.terms-body > .policy-link { margin-top: 28px; }
.faq-more { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 20px; }

.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 40px; }
.story { scroll-margin-top: 90px; }
.story .storefront { display: block; margin-bottom: 14px; }
.story-top { margin-bottom: 12px; }
.story-top h2 { margin: 0; }
.story-top .muted { margin: 0; }
.story .note { margin: 12px 0 0; }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.timeline li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule-strong); font-size: 15.5px; line-height: 24px; }
.timeline .num { font: 600 15px/24px var(--f-mono); color: var(--pen); }

/* ---------- footer: the ledger's cloth cover ---------- */
.cover {
  margin-top: 104px; color: var(--foil-soft);
  background-color: var(--cover);
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 0 2px, transparent 2px 5px);
  border-top: 10px solid var(--cover-deep);
}
.cover-in {
  max-width: var(--wide); margin: 0 auto; padding: 56px var(--end) 32px var(--start);
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px;
}
.cover-in > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cover strong { font-size: 17px; line-height: 1.3; font-weight: 600; color: var(--foil); }
.cover a:not(.btn) { color: var(--foil-soft); text-decoration: none; font-size: 15px; }
.cover a:not(.btn):hover { color: #fff; text-decoration: underline; }
.foil {
  font: 700 84px/1.25 var(--f-body); color: var(--foil);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2), 0 -1px 0 rgba(0, 0, 0, 0.45);
}
.cover-title p { margin: 0 0 12px; max-width: 34ch; font-size: 15px; }
.cover-line {
  max-width: var(--wide); margin: 0 auto; padding: 16px var(--end) 26px var(--start);
  border-top: 1px solid rgba(200, 164, 81, 0.3);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; opacity: 0.85;
}

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  :root { --mx: 10px; --start: 28px; --end: 16px; }
  .topbar { flex-wrap: wrap; gap: 10px 14px; padding-inline: 16px; }
  .brand-text small { display: none; }
  .top-links { order: 3; width: 100%; gap: 18px; overflow-x: auto; padding-bottom: 4px; }
  .top-actions .btn { padding: 8px 12px; }
  .hero, .counter-demo, .tease, .bill-wrap, .chat, .docs-layout, .dl-cards, .story-grid, .money-grid, .chain, .counter, .rate-demo { grid-template-columns: minmax(0, 1fr); }
  .counter-demo .keys { order: 0; }
  .hero { padding-top: 28px; row-gap: 32px; }
  .hero-cta .btn { white-space: normal; text-align: center; }
  .scene { padding-bottom: 150px; }
  .scene-print { inset-inline-start: 4px; width: 236px; }
  .receipt.hero-rcpt { font-size: 10px; line-height: 14px; padding-bottom: calc(var(--tooth) + 34px); }
  .hero-rcpt .paid-stamp { top: auto; bottom: calc(var(--tooth) + 6px); inset-inline: 14px auto; font-size: 14px; }
  .laptop { padding: 7px 7px 10px; border-radius: 9px 9px 3px 3px; }
  .laptop::after { inset-inline: -8px; bottom: -10px; height: 10px; }
  .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .logos li:nth-child(3n + 1) { border-inline-start: 0; }
  .logos li:nth-child(n + 4) { border-top: 1px solid var(--rule-strong); }
  .fronts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .fits, .policy { grid-template-columns: minmax(0, 1fr); }
  .signs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fits li { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .policy { gap: 32px; }
  .policy-aside { grid-column: auto; grid-row: auto; position: static; max-width: 320px; }
  .policy-body { grid-column: auto; grid-row: auto; }
  .shelf { gap: 10px; padding: 12px; }
  .shelf-tag { align-content: end; }
  .rate-demo .receipt-wrap { max-width: 300px; }
  .counter { padding-inline: var(--start) var(--end); }
  .hang, .steps li > strong { position: static; display: block; width: auto; text-align: start; font-size: 18px; margin-bottom: 4px; }
  .lrow { grid-template-columns: minmax(0, 1fr) 104px; }
  .lrow .tag { font-size: 16px; padding-inline: 10px 0; }
  .chain li + li, .money-card + .money-card { border-inline-start: 0; border-top: 1px solid var(--rule-strong); }
  .contents a { flex-wrap: wrap; gap: 4px; }
  .contents i { display: none; }
  .c-d { text-align: start; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .toc a:not(.tab) { display: none; }
  .toc a.tab { border-inline-start: 1.5px solid var(--ink); border-radius: 10px 10px 0 0; }
  .data-table .lrow { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cover-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cover-title { grid-column: 1 / -1; }
  .foil { font-size: 72px; }
  .ledger { padding-top: 52px; }
  .cover { margin-top: 64px; }
  .top-links a { padding-block: 6px; }
  .pick { padding: 7px 12px; }
  .cover a:not(.btn) { padding-block: 4px; }
  .hero-cta .btn { flex: 1 1 auto; }
  #stage-body .row .btn { flex: 1 1 100%; }
  .dl-card { justify-items: stretch; }
  .slip .bl b { max-width: 72%; }
  .cheque { padding: 18px; }
  .hero-rcpt .bl:not(.total) > span { max-width: none; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bill select.input { font-size: 16px; padding-block: 6px; }
  .tabs a { font-size: 15px; padding: 8px 12px 6px; }
  .fits .sign { padding-inline: 6px; }
  .fits .sign b { font-size: 16px; white-space: nowrap; }
  .logos li { padding: 10px; min-height: 88px; }

  .journal { min-width: 0; font-size: 14px; }
  .journal th, .journal td { padding-inline: 6px; }
  .journal tr > :nth-child(2) { display: none; }
  .journal th:nth-child(1) { width: 56px; }
  .journal .amt { width: 72px; }
  .journal td.cr { padding-inline-start: 20px; }

  .match-table, .match-table thead, .match-table tbody { display: block; }
  .match-table tr { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); align-items: center; border-bottom: 1px solid var(--rule-strong); }
  .match-table thead tr { border-bottom: 2px solid var(--ink); }
  .match-table th, .match-table td { height: auto; padding: 8px 6px; border: 0; }
  .match-table th:nth-child(5) { display: none; }
  .match-table td:nth-child(5) { grid-column: 2 / -1; padding-top: 0; }
  .match-table .input { width: 100%; }

  .data-table .lrow:first-child { display: none; }
  .data-table code::before { display: block; font: 600 12px/18px var(--f-body); color: var(--ink-soft); }
  .data-table code:nth-of-type(1)::before { content: "Windows"; }
  .data-table code:nth-of-type(2)::before { content: "macOS"; }
}

@media print {
  .topbar, .hero-cta, .receipt-actions, .rate-row, .disc-row, .cover { display: none; }
  body { background: #fff; }
}

@media (prefers-reduced-motion: no-preference) {
  main { animation: page-in 0.45s cubic-bezier(.2, .7, .3, 1) both; }
}
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.wa-float { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 60; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
.wa-float svg { width: 30px; height: 30px; }
.wa-float:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .wa-float { transition: transform 0.2s; }
  .wa-float:hover { transform: scale(1.08); }
}
@media (max-width: 600px) { .wa-float { inset-inline-end: 16px; bottom: 16px; width: 52px; height: 52px; } }
@media print { .wa-float { display: none; } }
