/* OrderTill public website. docs/39 is the look: the tokens below are the only place a colour
   literal may appear (docs/39 §8 rule 5), enforced by scripts/check-site.mjs, which reads the block
   between the two marker comments. Names and values are the customer portal's (globals.css). Light on
   bare :root, dark under prefers-color-scheme (docs/39 §7). The site has no script, so there is no
   data-theme attribute and no theme control: the page follows the device.

   Teal is spent on two things only: the local-sync links in the diagram and the calls to action (plus
   the bowl of the mark and the focus ring, which docs/39 fixes). Body links are ink, underlined. */

/* tokens:start */
:root {
  color-scheme: light dark;

  --canvas: #f6f4ef;
  --surface: #ffffff;
  --line: #d4d1cb;
  --line-strong: #17191c;
  --ink: #17191c;
  --ink-2: #5a5f66;
  --ink-3: #6b7078;
  --focus: #0f766e;

  --accent: #0f766e;
  --accent-hover: #0b5852;
  --on-accent: #ffffff;
  --accent-soft: #ddf0ec;
  --warn: #8a4b00;
  --warn-soft: #fff6e9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #15181c;
    --surface: #1f2429;
    --line: #343a41;
    --line-strong: #f3f2ee;
    --ink: #f3f2ee;
    --ink-2: #a3abb5;
    --ink-3: #8c949e;
    --focus: #2dd4bf;

    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --on-accent: #0b1f1c;
    --accent-soft: #133b37;
    --warn: #f2c14e;
    --warn-soft: #3a2e10;
  }
}
/* tokens:end */

/* --- Type: IBM Plex Sans, self-hosted (docs/39 §3). OFL; licences beside the files. ------------- */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-400-normal.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 Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-500-normal.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 Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext carries the rupee sign (U+20B9), so a bill's amounts stay in Plex. */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-ext-400-normal.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: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-ext-500-normal.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: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-ext-600-normal.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;
}

/* The companion face for the bill's local item name; fetched only when Devanagari is on the page. */
@font-face {
  font-family: 'IBM Plex Sans Devanagari';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-devanagari-devanagari-400-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF;
}

/* --- Base ------------------------------------------------------------------------------------- */

:root {
  font-family:
    'IBM Plex Sans', 'IBM Plex Sans Devanagari', 'Segoe UI', 'Noto Sans Devanagari', system-ui,
    sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}

h3 {
  font-size: 18px;
}

a {
  color: var(--ink);
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.num {
  font-variant-numeric: tabular-nums;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  z-index: 1;
}

.skip:focus {
  top: 8px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 16px;
}

/* --- Header and footer ------------------------------------------------------------------------ */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

/* The Steam Bowl (docs/39 §5): steam in the text colour, bowl in the accent; 22 px in the topbar. */
.mark {
  flex-shrink: 0;
}

.mark-steam {
  fill: currentColor;
}

.mark-bowl {
  fill: var(--accent);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px 16px;
}

.topnav a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 4px;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 15px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
}

/* --- Buttons (docs/39 §5: accent fill, on-accent text, radius 6; 44 px here for touch) ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* --- Page structure: sections are rows of the ledger, separated by rules ----------------------- */

main {
  flex: 1;
  width: 100%;
}

.band {
  padding-block: 48px;
  border-top: 1px solid var(--line);
}

.band:first-child {
  border-top: 0;
}

.band-surface {
  background: var(--surface);
}

.band-head {
  display: grid;
  gap: 12px;
  max-width: 44rem;
  margin-bottom: 32px;
}

.band-head h2 {
  font-size: 26px;
  letter-spacing: -0.01em;
}

.measure {
  max-width: 38rem;
}

.quiet {
  color: var(--ink-2);
}

/* --- Hero ------------------------------------------------------------------------------------- */

.hero {
  display: grid;
  gap: 40px;
  padding-block: 40px 48px;
}

.hero-copy {
  display: grid;
  gap: 20px;
  align-content: start;
}

.hero h1 {
  font-size: 34px;
  letter-spacing: -0.02em;
  line-height: 1.12;
  max-width: 14em;
}

.lead {
  font-size: 18px;
  max-width: 36rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.cta-alt {
  color: var(--ink-2);
}

/* The bill: the till's output drawn in HTML so it is real, readable text. Paper has no rounded
   corners; the torn foot is a decorative SVG. Dashed rules are what a thermal printer prints. */
.bill {
  width: 100%;
  max-width: 340px;
  justify-self: start;
}

.bill-paper {
  display: grid;
  gap: 12px;
  padding: 20px 20px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  font-size: 14px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.bill-title {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.bill-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-2);
}

.bill-rule {
  border-top: 1px dashed var(--line-strong);
}

.bill table {
  width: 100%;
  border-collapse: collapse;
}

.bill th,
.bill td {
  padding: 3px 0;
  text-align: left;
  font-weight: 400;
  vertical-align: top;
}

.bill thead th {
  color: var(--ink-2);
  padding-bottom: 6px;
}

.bill .r {
  text-align: right;
}

.bill .qty {
  width: 3em;
}

.bill .local {
  display: block;
  color: var(--ink-2);
  font-size: 13px;
}

.bill-total th,
.bill-total td {
  border-top: 1.5px solid var(--line-strong);
  padding-top: 8px;
  font-size: 17px;
  font-weight: 600;
}

.bill-paid {
  display: flex;
  justify-content: space-between;
  color: var(--ink-2);
}

.tear {
  display: block;
  width: 100%;
  height: 10px;
}

.tear-fill {
  fill: var(--surface);
}

.tear-edge {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.bill figcaption {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 14px;
}

/* --- Local sync: the page's one bold element --------------------------------------------------- */

.sync-grid {
  display: grid;
  gap: 32px;
}

.sync-head h2 {
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram .diagram-wide {
  display: none;
}

.d-net {
  fill: var(--canvas);
  stroke: var(--line);
}

.d-node {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.d-detail {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.d-local {
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
}

.d-relay-box {
  fill: var(--surface);
  stroke: var(--ink-2);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
}

.d-relay {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 2.5;
  stroke-dasharray: 0.5 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.d-name {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.d-sub {
  fill: var(--ink-2);
  font-size: 13px;
}

.d-key {
  fill: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.points {
  list-style: none;
  padding: 0;
  display: grid;
}

.points li {
  display: grid;
  gap: 6px;
  align-content: start;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}

.points li:first-child {
  border-top: 1.5px solid var(--line-strong);
}

.points p {
  color: var(--ink-2);
}

.cloud {
  display: grid;
  gap: 6px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 44rem;
}

.cloud p {
  color: var(--ink-2);
}

/* --- Ledger rows (features) and the flow of a bill ---------------------------------------------- */

.ledger {
  list-style: none;
  padding: 0;
  border-top: 1.5px solid var(--line-strong);
}

.ledger li {
  display: grid;
  gap: 4px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}

.ledger p {
  color: var(--ink-2);
  max-width: 40rem;
}

.flow {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  border-top: 1.5px solid var(--line-strong);
}

.flow li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 2px 12px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}

.flow li::before {
  content: counter(step);
  grid-row: span 2;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.flow p {
  color: var(--ink-2);
}

/* --- Records and contact ------------------------------------------------------------------------ */

.stack {
  display: grid;
  gap: 16px;
  max-width: 40rem;
}

.contact h2 {
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.contact .stack {
  gap: 20px;
}

/* --- Legal pages: a comfortable reading measure ------------------------------------------------- */

.page {
  padding-block: 32px 48px;
}

.prose {
  display: grid;
  gap: 16px;
  max-width: 68ch;
}

.prose-head {
  display: grid;
  gap: 4px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--line-strong);
}

.prose h1 {
  font-size: 32px;
  letter-spacing: -0.02em;
}

.prose h2 {
  margin-top: 16px;
  font-size: 21px;
}

.prose ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.prose strong {
  font-weight: 600;
}

.effective {
  color: var(--ink-2);
  font-size: 15px;
}

/* The one verbatim line the reCAPTCHA contract fixes, set as a quotation rather than paraphrase.
   docs/39 §5's notice shape: surface, line, a 4 px accent left rule. */
.quoted {
  margin: 0;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
}

.not-found {
  display: grid;
  gap: 12px;
  max-width: 560px;
}

.not-found h1 {
  font-size: 32px;
  letter-spacing: -0.02em;
}

/* --- Wider screens ------------------------------------------------------------------------------ */

@media (min-width: 720px) {
  :root {
    font-size: 18px;
  }

  .wrap {
    padding-inline: 32px;
  }

  .band {
    padding-block: 72px;
  }

  .hero {
    padding-block: 64px 72px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .band-head h2 {
    font-size: 32px;
  }

  .sync-head h2,
  .contact h2 {
    font-size: 40px;
  }

  .diagram .diagram-wide {
    display: block;
  }

  .diagram .diagram-tall {
    display: none;
  }

  .ledger li {
    grid-template-columns: 15rem 1fr;
    gap: 24px;
    align-items: baseline;
  }

  .prose h1,
  .not-found h1 {
    font-size: 40px;
  }
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 64px;
    align-items: start;
  }

  .hero h1 {
    font-size: 56px;
  }

  .diagram {
    max-width: 960px;
  }

  .sync-grid {
    gap: 40px;
  }

  .points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1.5px solid var(--line-strong);
  }

  .points li,
  .points li:first-child {
    border-top: 0;
    padding: 16px 24px 0 0;
  }

  .points li + li {
    padding-left: 24px;
    border-left: 1px solid var(--line);
  }

  .flow {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
  }

  .flow li {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    gap: 6px;
    padding: 16px 20px 20px 0;
    border-bottom: 0;
  }

  .flow li + li {
    padding-left: 20px;
    border-left: 1px solid var(--line);
  }

  .flow li::before {
    grid-row: auto;
  }
}
