/*
 * Wellslip marketing site.
 *
 * Parts of this stylesheet are adapted from the Stowe marketing site
 * (docs/styles.css and docs/index.html):
 *   https://github.com/Conkay1/Stowe
 *
 * That code is copyright (c) 2026 Connor Kay and licensed under the MIT
 * License. The notice below covers the adapted portion. The Wellslip copy,
 * the neutral palette, the dark theme, and the product pictures are not
 * part of Stowe.
 *
 * MIT License
 *
 * Copyright (c) 2026 Connor Kay
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

/* Tokens. Neutral grays only: every value has equal R, G, and B.
 * The structure follows the phone's capture palette (DESIGN.md). */
:root {
  color-scheme: light dark;

  --ground: #f1f1f1;
  --paper: #fcfcfc;
  --ink: #1a1a1a;
  --ink-soft: #595959;
  --ink-faint: #6b6b6b;
  --line: rgba(0, 0, 0, 0.12);
  --line-strong: rgba(0, 0, 0, 0.24);
  --tint: rgba(0, 0, 0, 0.035);
  --tint-strong: rgba(0, 0, 0, 0.07);
  --focus: rgba(0, 0, 0, 0.6);
  --selection: rgba(0, 0, 0, 0.13);

  /* The one solid action. */
  --press: #1a1a1a;
  --press-ink: #fcfcfc;
  --press-hover: #3a3a3a;

  /* Thermal paper for the sample receipt. */
  --slip: #fdfdfd;
  --slip-ink: #262626;
  --slip-soft: #6b6b6b;
  --slip-shadow: rgba(0, 0, 0, 0.16);

  --lift: 0 1px 2px rgba(0, 0, 0, 0.06), 0 28px 56px -28px rgba(0, 0, 0, 0.34);
  --lift-soft: 0 1px 2px rgba(0, 0, 0, 0.05), 0 18px 40px -24px rgba(0, 0, 0, 0.22);

  /* The app's own dark paint, used wherever the phone app is pictured. */
  --bezel: #0b0b0b;
  --screen: #141414;
  --screen-ink: #e8e8e8;
  --screen-soft: #a1a1a1;
  --screen-line: rgba(232, 232, 232, 0.14);
  --screen-tint: rgba(232, 232, 232, 0.06);
  --screen-tint-strong: rgba(232, 232, 232, 0.11);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --wide: 76rem;

  /* The torn edge of the mark, as mask tiles. */
  --teeth: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 0 0 / 24px 100%;
  --torn:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 14px 51% repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 51% repeat-x;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #141414;
    --paper: #1b1b1b;
    --ink: #e8e8e8;
    --ink-soft: #a1a1a1;
    --ink-faint: #8c8c8c;
    --line: rgba(232, 232, 232, 0.14);
    --line-strong: rgba(232, 232, 232, 0.28);
    --tint: rgba(232, 232, 232, 0.06);
    --tint-strong: rgba(232, 232, 232, 0.11);
    --focus: rgba(232, 232, 232, 0.6);
    --selection: rgba(232, 232, 232, 0.22);

    --press: #e8e8e8;
    --press-ink: #141414;
    --press-hover: #f8f8f8;

    --slip: #d4d4d4;
    --slip-ink: #1c1c1c;
    --slip-soft: #555555;
    --slip-shadow: rgba(0, 0, 0, 0.35);

    --lift: 0 0 0 1px rgba(232, 232, 232, 0.12);
    --lift-soft: 0 0 0 1px rgba(232, 232, 232, 0.04);
    --bezel: #050505;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  scrollbar-color: var(--line-strong) var(--ground);
  background: var(--ground);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--ink);
  accent-color: var(--ink);
}

main { flex: 1 0 auto; }
svg { display: block; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p, li, dd, figcaption, summary { text-wrap: pretty; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

::selection { background: var(--selection); color: var(--ink); }

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

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--tint-strong);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.skip {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--press);
  color: var(--press-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus-visible { transform: none; }

.wrap {
  width: min(100% - 48px, var(--wide));
  margin-inline: auto;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The mark */
.mark { width: 30px; height: 30px; flex: 0 0 auto; }
.m-bg { fill: var(--ink); }
.m-ink { fill: var(--paper); }
.m-line { fill: none; stroke: var(--ink); stroke-width: 1.35; stroke-linecap: round; }

/* Top of the page: a sheet of paper that ends in the mark's torn edge */
.sheet {
  position: relative;
  z-index: 1;
  background: var(--paper);
}
.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
  -webkit-mask: var(--teeth);
  mask: var(--teeth);
  pointer-events: none;
}
.sheet::before { background: var(--line-strong); transform: translateY(1px); }
.sheet::after { background: var(--paper); }

.bar { background: var(--paper); }
.bar-inner {
  display: flex;
  align-items: center;
  gap: 8px 28px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--tint); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--tint-strong); }

/* Actions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.16s var(--ease),
    border-color 0.16s var(--ease),
    color 0.16s var(--ease),
    transform 0.12s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-press { background: var(--press); color: var(--press-ink); }
.btn-press:hover { background: var(--press-hover); }
.btn-line { background: var(--tint); border-color: var(--line); color: var(--ink); }
.btn-line:hover { background: var(--tint-strong); border-color: var(--line-strong); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 15px; }

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

/* "Coming soon" is a state, not a control */
.soon {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.facts li {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--tint-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.facts li.soon {
  background: transparent;
  color: var(--ink-soft);
}

/* Opening */
.opening {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 56px 64px;
  padding-block: 32px 88px;
}

.opening h1 {
  font-size: clamp(2.75rem, 1.2rem + 4.6vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.opening h1 span { display: block; color: var(--ink-soft); }

.lede {
  max-width: 34rem;
  margin-top: 28px;
  color: var(--ink-soft);
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.5;
}

.opening .actions { margin-top: 36px; }
.action-note { color: var(--ink-soft); font-size: 14px; line-height: 1.4; }

.later {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 34rem;
}
.later li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.later a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration-color: var(--line-strong);
}
.later a:hover { text-decoration-color: currentColor; }

/* The phone, drawn in the app's own paint */
.device {
  display: grid;
  justify-items: center;
  gap: 16px;
}
.device figcaption {
  max-width: 19rem;
  color: var(--ink-faint);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.phone {
  width: 336px;
  max-width: 100%;
  padding: 10px;
  border-radius: 50px;
  background: var(--bezel);
  box-shadow: var(--lift);
}

.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  padding: 50px 16px 16px;
  border-radius: 40px;
  background: var(--screen);
  color: var(--screen-ink);
  font-size: 13px;
  line-height: 1.4;
}
.screen::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 92px;
  height: 26px;
  margin-left: -46px;
  border-radius: 13px;
  background: #000000;
}

.app-head { display: flex; flex-direction: column; gap: 3px; }
.app-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.app-eyebrow {
  color: var(--screen-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.app-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.app-links {
  display: flex;
  gap: 14px;
  padding-bottom: 3px;
  color: #d6d6d6;
  font-size: 14px;
}
.app-lede { color: var(--screen-soft); font-size: 13px; }

.app-total {
  padding: 14px 14px 12px;
  border: 1px solid var(--screen-line);
  border-radius: 18px;
  background: var(--screen-tint);
}
.app-label {
  color: var(--screen-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.app-total-value {
  margin-top: 6px;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.app-note { margin-top: 6px; color: var(--screen-soft); font-size: 12px; }

.app-split {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--screen-line);
}
.app-split p { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app-split strong {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.app-filters { display: flex; gap: 6px; overflow: hidden; }
.app-filters span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--screen-line);
  border-radius: 999px;
  color: var(--screen-soft);
  font-size: 11.5px;
}
.app-filters .on { background: var(--screen-tint-strong); color: var(--screen-ink); }

.app-rows { display: flex; flex-direction: column; gap: 8px; }
.app-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid var(--screen-line);
  border-radius: 16px;
  background: rgba(232, 232, 232, 0.035);
}

.thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--screen-tint-strong);
  color: var(--screen-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
/* A photographed slip: paper, a few printed lines, a slight angle. */
.thumb-photo::before {
  content: "";
  width: 24px;
  height: 34px;
  border-radius: 1px;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.32) 0 1px, transparent 1px 5px) 5px 7px / 14px 18px no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)) 5px 28px / 14px 1.5px no-repeat,
    #cfcfcf;
  transform: rotate(-7deg);
}
.thumb-tilt::before { transform: rotate(5deg); }

.row-copy { display: flex; flex-direction: column; min-width: 0; }
.row-merchant,
.row-date,
.row-meta {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.row-merchant { font-size: 13.5px; font-weight: 600; }
.row-date,
.row-meta {
  color: var(--screen-soft);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.row-amount { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.chip-claim { background: rgba(232, 232, 232, 0.17); color: #ececec; }
.chip-claimed { background: rgba(232, 232, 232, 0.08); color: #c6c6c6; }
.chip-paid { box-shadow: inset 0 0 0 1px var(--screen-line); color: var(--screen-soft); }

.app-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--screen-line);
  border-radius: 14px;
  background: var(--screen-tint-strong);
  font-size: 14px;
  font-weight: 600;
}

/* Sections */
.section { padding-block: 112px; }
.sheet + .section { padding-top: 124px; }
.rule { border-top: 1px solid var(--line); }

.head-big {
  font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.subhead {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.intro {
  max-width: 36rem;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 18px;
}
.section-head { max-width: 46rem; margin-bottom: 56px; }

/* The ledger: three products, compared line by line */
.ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}
.ledger-col {
  display: grid;
  grid-row: span 7;
  grid-template-rows: subgrid;
  padding-inline: 24px;
  border-left: 1px solid var(--line);
}
.ledger-col:first-child { padding-left: 0; border-left: 0; }
.ledger-col:last-child { padding-right: 0; }
.ledger-col h3 {
  padding: 20px 0 18px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.ledger-col h3 a { text-decoration: none; }
.ledger-col h3 a:hover { text-decoration: underline; text-decoration-color: var(--line-strong); }
.ledger-col dl {
  display: grid;
  grid-row: span 6;
  grid-template-rows: subgrid;
}
.ledger-col dl > div { padding: 14px 0 16px; border-top: 1px solid var(--line); }
.ledger-col dt {
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ledger-col dd { margin-top: 4px; font-size: 16px; line-height: 1.45; }
.ledger-col dd .soon { margin-top: 2px; }
.ledger-col dd a { font-weight: 600; text-decoration-color: var(--line-strong); }
.ledger-col dd a:hover { text-decoration-color: currentColor; }

/* Product sections */
.product {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: 56px 72px;
}
.product-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.product-flip .product-copy { order: 2; }

.subhead + .facts { margin-top: 24px; }
.points { display: grid; gap: 22px; margin-top: 36px; }
.points h3 { font-size: 18px; letter-spacing: -0.01em; line-height: 1.3; }
.points p { margin-top: 4px; color: var(--ink-soft); font-size: 16px; }
.product .actions { margin-top: 36px; }

.product-art { position: sticky; top: 32px; }
.art-note {
  margin-top: 16px;
  color: var(--ink-faint);
  font-size: 13px;
  line-height: 1.5;
}

/* Local: the data folder, as a desktop window */
.window {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--lift-soft);
}
.window-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--tint);
}
.lights { display: flex; gap: 7px; }
.lights span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--tint-strong);
  box-shadow: inset 0 0 0 1px var(--line);
}
.window-title { color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.window-path {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.window-path .icon { width: 16px; height: 16px; }
.tree { padding: 8px 0; }
.entry {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
}
.tree ul .entry { padding-left: 50px; }
.entry .icon { color: var(--ink-soft); }
.entry-name { font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
.entry-kind { color: var(--ink-faint); font-size: 13px; text-align: right; }
.entry-plain { color: var(--ink-soft); font-size: 14px; }
.window-foot {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--tint);
  color: var(--ink-soft);
  font-size: 14px;
}

/* Capture: a paper receipt, and the fields the app asks you to check */
.check {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  align-items: center;
}
.receipt-hold {
  position: relative;
  z-index: 1;
  margin-right: -36px;
  filter: drop-shadow(0 14px 18px var(--slip-shadow));
}
.receipt {
  padding: 30px 22px 32px;
  background: var(--slip);
  color: var(--slip-ink);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  transform: rotate(-2.5deg);
  -webkit-mask: var(--torn);
  mask: var(--torn);
}
.r-head { font-weight: 700; letter-spacing: 0.04em; text-align: center; }
.r-center { color: var(--slip-soft); text-align: center; }
.r-rule { height: 0; margin: 10px 0; border-top: 1px dashed currentColor; opacity: 0.45; }
.r-line { display: flex; justify-content: space-between; gap: 12px; }
.r-total { font-weight: 700; }
.r-end { margin-top: 14px; }

.app-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 18px 54px;
  border-radius: 18px;
  background: var(--screen);
  color: var(--screen-ink);
  box-shadow: var(--lift);
  font-size: 13px;
  line-height: 1.4;
}
.app-editor-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 32px;
}
.app-editor-bar span:first-child { color: #d6d6d6; font-size: 14px; }
.app-editor-bar strong { font-size: 14px; font-weight: 600; }
.app-fields { display: flex; flex-direction: column; gap: 10px; }
.app-fields div { display: flex; flex-direction: column; gap: 5px; }
.app-fields dt { color: var(--screen-soft); font-size: 12px; }
.app-fields dd {
  padding: 8px 11px;
  border: 1px solid var(--screen-line);
  border-radius: 12px;
  background: var(--screen-tint);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.app-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--screen-line);
  font-size: 14px;
  font-weight: 600;
}
.switch {
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: rgba(232, 232, 232, 0.5);
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--screen);
}
.app-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.app-status span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--screen-line);
  border-radius: 12px;
  color: var(--screen-soft);
  font-size: 12px;
}
.app-status .on {
  border-color: rgba(232, 232, 232, 0.28);
  background: var(--screen-tint-strong);
  color: var(--screen-ink);
}
.app-fine { color: var(--screen-soft); font-size: 12px; }

/* Vault: the same receipt, readable on the device and sealed on the server */
.vault-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
  gap: 32px 72px;
  margin-bottom: 56px;
}
.vault-head .intro { margin-top: 0; }

.sealed {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.15fr);
  align-items: stretch;
}
.side {
  padding: 22px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.side-device { background: var(--paper); box-shadow: var(--lift-soft); }
.side-server { background: var(--tint); border-style: dashed; border-color: var(--line-strong); }
.side h3 { font-size: 15px; letter-spacing: -0.005em; }
.side h3 span { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 13px; font-weight: 400; }

.readable { margin-top: 18px; }
.readable div {
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.readable dt { color: var(--ink-soft); font-size: 14px; }
.readable dd { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.readable dd.with-thumb { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.mini-slip {
  width: 22px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 1px;
  background:
    repeating-linear-gradient(to bottom, var(--line-strong) 0 1px, transparent 1px 5px) 4px 6px / 14px 16px no-repeat,
    var(--tint-strong);
  box-shadow: inset 0 0 0 1px var(--line);
  transform: rotate(-4deg);
}

.seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 128px;
  padding: 0 12px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}
.seal-ring {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
}
.seal .arrow { width: 28px; height: 20px; }

.record { margin-top: 18px; font-family: var(--mono); font-size: 13px; }
.record div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 12px;
  padding: 6px 0;
  border-top: 1px dashed var(--line);
}
.record dt { color: var(--ink-soft); }
.record dd { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.cipher {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tint-strong);
  font-family: var(--mono);
}
.cipher dt { color: var(--ink-soft); font-size: 12px; }
.cipher dd {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.sealed-note {
  max-width: 46rem;
  margin-top: 16px;
  color: var(--ink-faint);
  font-size: 13px;
}

.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 48px;
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.columns h3 { font-size: 18px; letter-spacing: -0.01em; line-height: 1.3; }
.columns p { margin-top: 6px; color: var(--ink-soft); font-size: 16px; }

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 40px;
  color: var(--ink-soft);
  font-size: 15px;
}
.status-line a { color: var(--ink); text-decoration-color: var(--line-strong); }
.status-line a:hover { text-decoration-color: currentColor; }

/* Questions */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 40px 72px;
}
.faq-side { position: sticky; top: 32px; align-self: start; }
.faq-side .intro { font-size: 17px; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 11px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 11px no-repeat;
  transition: background-size 0.2s var(--ease), background-color 0.16s var(--ease);
}
.faq summary:hover::after { background-color: var(--tint-strong); }
.faq details[open] summary::after { background-size: 11px 1.5px, 1.5px 0; }
.faq details > p {
  max-width: 40rem;
  padding-bottom: 20px;
  color: var(--ink-soft);
  font-size: 16px;
}
.faq details > p:not(:last-child) { padding-bottom: 12px; }
.faq a, .notice a { text-decoration-color: var(--line-strong); }
.faq a:hover, .notice a:hover { text-decoration-color: currentColor; }

.notice {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--tint);
  color: var(--ink-soft);
  font-size: 15px;
}
.notice .icon { margin-top: 2px; color: var(--ink); }
.notice strong { color: var(--ink); font-weight: 600; }

/* Footer */
.foot {
  padding-block: 40px 56px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
}
.foot-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px 48px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 22px;
}
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  text-decoration: none;
}
.foot-links a:hover,
.foot-links a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.foot-meta {
  grid-column: 1 / -1;
  max-width: 46rem;
  color: var(--ink-faint);
  font-size: 13px;
}
.foot-meta a { color: var(--ink-soft); }
.foot-meta a:hover { color: var(--ink); }

/* Privacy draft */
.page-head { padding-block: 40px 72px; }
.page-head h1 {
  font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}
.updated {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.draft {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 6px 22px;
  max-width: 46rem;
  margin-top: 32px;
  padding: 20px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--tint);
}
.stamp {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: rotate(-4deg);
}
.draft-title { font-weight: 600; }
.draft p:last-child { color: var(--ink-soft); font-size: 16px; }

.doc {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 42rem);
  gap: 48px 88px;
  padding-block: 96px 112px;
}
.toc { position: sticky; top: 32px; align-self: start; }
.toc h2 { margin-bottom: 10px; color: var(--ink-faint); font-size: 13px; font-weight: 600; }
.toc ol { border-left: 1px solid var(--line); }
.toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-left: 14px;
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}
.toc a:hover { color: var(--ink); }

.prose { overflow-wrap: break-word; }
.prose > * + * { margin-top: 14px; }
.prose h2 {
  margin-top: 56px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.prose h2 + * { margin-top: 12px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose .lede-doc { color: var(--ink); font-size: 20px; line-height: 1.5; }
.prose ul { padding-left: 1.2em; list-style: disc; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--ink-faint); }
.prose a { color: var(--ink); text-decoration-color: var(--line-strong); }
.prose a:hover { text-decoration-color: currentColor; }

/* Not found: one blank slip */
.lost {
  display: grid;
  place-items: center;
  padding-block: 72px 112px;
}
.lost-slip {
  width: min(100%, 30rem);
  padding: 48px 36px;
  background: var(--paper);
  text-align: center;
  -webkit-mask: var(--torn);
  mask: var(--torn);
}
.lost-hold { width: min(100%, 30rem); filter: drop-shadow(0 18px 24px var(--slip-shadow)); }
.lost-slip .mark { width: 44px; height: 44px; margin: 0 auto 28px; }
.lost-slip h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.lost-slip p { margin-top: 14px; color: var(--ink-soft); }
.lost-slip .lost-total {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}
.lost-slip .actions { justify-content: center; margin-top: 28px; }

/* Responsive */
@media (max-width: 1080px) {
  .opening { gap: 48px 40px; }
  .product, .product-flip { gap: 48px; }
}

@media (max-width: 960px) {
  .opening { grid-template-columns: minmax(0, 1fr); padding-bottom: 72px; }
  .device { justify-self: center; }

  .product,
  .product-flip { grid-template-columns: minmax(0, 1fr); }
  .product-flip .product-copy { order: 0; }
  .product-art { position: static; }

  .vault-head { grid-template-columns: minmax(0, 1fr); }
  .sealed { grid-template-columns: minmax(0, 1fr); }
  .seal { flex-direction: row; width: auto; padding: 14px 0; }
  .seal .arrow { transform: rotate(90deg); }

  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-side { position: static; }

  .doc { grid-template-columns: minmax(0, 1fr); padding-top: 72px; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 0 4px; border-left: 0; }
  .toc a { min-height: 44px; padding: 0 12px 0 0; }
}

@media (max-width: 820px) {
  .ledger { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .ledger-col {
    display: block;
    grid-row: auto;
    padding: 0;
    border-left: 0;
    border-top: 1px solid var(--ink);
  }
  .ledger-col + .ledger-col { margin-top: 40px; }
  .ledger-col dl { display: block; }
  .ledger-col dl > div {
    display: grid;
    grid-template-columns: minmax(0, 8rem) minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
  }
  .ledger-col dt { padding-top: 3px; }
  .ledger-col dd { margin-top: 0; }
  .ledger-col dd .soon { white-space: normal; }

  .columns { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 56px; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .section { padding-block: 72px; }
  .sheet + .section { padding-top: 84px; }

  .bar-inner { flex-wrap: wrap; padding-block: 10px 6px; }
  .bar-inner .btn-small { margin-left: auto; }
  .nav { order: 3; width: 100%; margin-left: 0; }

  .opening { padding-top: 16px; }
  .opening .actions .btn { width: 100%; }

  .check { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .receipt-hold { width: 82%; margin: 0 0 -28px; }
  .app-sheet { width: 100%; padding: 46px 16px 16px; }

  .readable div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .record div { grid-template-columns: 4.5rem minmax(0, 1fr); }

  .foot-inner { grid-template-columns: minmax(0, 1fr); }
  .foot-links { justify-content: flex-start; }

  .draft { grid-template-columns: minmax(0, 1fr); }
  .stamp { grid-row: auto; justify-self: start; margin-bottom: 8px; }

  .lost-slip { padding: 44px 24px; }
}

@media (max-width: 380px) {
  .nav a { padding: 0 9px; font-size: 14px; }
  .brand { font-size: 18px; }
}

/* Below the phone's own width, shrink the whole picture rather than reflow it. */
@media (max-width: 367px) {
  .phone { zoom: 0.85; }
}

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