/* Landing page: a sheet of coupons printed on security paper.
   Wine note field, rose-paper bands, paper coupons with real notches, one copper security thread. */

@font-face {
  font-family: "Gloock";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/gloock-400-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Gloock";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/gloock-400-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;
}
@font-face {
  font-family: "Besley";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("assets/fonts/besley-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Besley";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("assets/fonts/besley-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 {
  /* Two inks, as on a banknote: ink A (wine) is the main field, ink B (rose paper) the second band, each with
     its own accent for actions and the security thread (copper on wine, dark copper on paper). */
  --ink-a: #3f1420;
  --ink-a-line: #5a2333;
  --ink-a-on: #f6efec;
  --ink-a-soft: #e2c7cd;
  --ink-a-dim: #b48892;
  --accent-a: #d08a5a;
  --accent-a-hover: #da9c71;
  --accent-a-ink: #2a0e07;
  --ink-b: #ede5e2;
  --ink-b-line: #d8c9c5;
  --ink-b-on: #3f1420;
  --ink-b-soft: #5e3540;
  --ink-b-dim: #8c6670;
  --accent-b: #8e3b2a;
  --accent-b-hover: #7a3123;
  --accent-b-ink: #fbf3ef;
  --night: #2a0c15;
  --on-night: #e2c7cd;
  --paper: #f8f5f3;
  --paper-shade: #efe8e6;
  --perf: #dacbcb;
  --ink: #3f1420;
  --ink-soft: #6e4a53;
  --accent-on-paper: #8e3b2a;
  --paper-edge: url("assets/waves-paper.svg");

  --field: var(--ink-a);
  --field-line: var(--ink-a-line);
  --on-field: var(--ink-a-on);
  --on-field-soft: var(--ink-a-soft);
  --on-field-dim: var(--ink-a-dim);
  --field-deep: var(--ink-b);
  --field-night: var(--night);
  --thread: var(--accent-a);
  --thread-hover: var(--accent-a-hover);
  --thread-ink: var(--accent-a-ink);

  /* Besley, a Clarendon, sets every word and figure as an old printed ticket would; Gloock sets the titles. */
  --serif: "Besley", Georgia, serif;
  --display: "Gloock", Georgia, serif;
  --figures: "Besley", Georgia, serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --notch: 11px;
  --r: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  accent-color: var(--thread);
  scrollbar-color: var(--accent-a) var(--night);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--field);
  color: var(--on-field);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  /* Neither face ships an italic and Gloock has one weight: no faked italic or bold, but small capitals may be drawn. */
  font-synthesis: small-caps;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
::selection { background: var(--accent-a); color: var(--accent-a-ink); }
:focus-visible { outline: 3px solid var(--thread); outline-offset: 3px; border-radius: 4px; }
a, button, summary, label, input[type="range"], input[type="radio"] { cursor: pointer; }
button:disabled { cursor: not-allowed; }
code, .fig { font-family: var(--figures); font-variant-numeric: proportional-nums; }
.fig { font-weight: 700; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 60;
  background: var(--thread); color: var(--thread-ink); padding: 10px 16px; border-radius: 999px;
  font-weight: 700; text-decoration: none; transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }

/* Launch states: the sealed page swaps in at launch and launch.js sets data-launch="live". */
.when-live { display: none !important; }
html[data-launch="live"] .when-live { display: inline-flex !important; }
html[data-launch="live"] span.when-live, html[data-launch="live"] code.when-live { display: inline !important; }
html[data-launch="live"] .until-live { display: none !important; }
html[data-launch="live"] .ca-value[data-ca] { display: none; }

/* Pills: the only rounded shape on the page; paper and plates stay square-cut. */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent;
  font: 700 16px/1 var(--serif); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.12s var(--ease);
}
.pill:active { transform: translateY(1px); }
.pill:disabled { opacity: 0.55; }
.pill-thread { background: var(--thread); color: var(--thread-ink); }
.pill-thread:hover { background: var(--thread-hover); }
.pill-line { border-color: var(--on-field-dim); color: var(--on-field); }
.pill-line:hover { border-color: var(--on-field); background: color-mix(in oklab, var(--on-field) 9%, transparent); }
.pill-paper { background: var(--paper); color: var(--ink); min-height: 44px; padding: 0 18px; font-size: 15px; }
.pill-paper:hover { background: #fff; }
.pill-ink { background: var(--ink); color: var(--paper); }
.pill-ink:hover { background: color-mix(in oklab, var(--ink) 82%, var(--paper)); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* The app pill in the bar prints in the bar's own text colour, so it reads on a light or a dark field. */
.pill.top-app { background: var(--on-field); color: var(--field); }
.pill.top-app:hover { background: color-mix(in oklab, var(--on-field) 86%, var(--field)); }

/* Header */
.top { position: sticky; top: 0; z-index: 40; background: var(--field); border-bottom: 1px solid var(--field-line); }
.top-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: 72px; display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-name { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: -0.01em; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--on-field-soft); text-decoration: none; font-size: 15px; font-weight: 500; transition: color 0.2s var(--ease); }
.nav a:hover { color: var(--on-field); }
.top-end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.x-link { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: var(--on-field-soft); transition: color 0.2s var(--ease), background-color 0.2s var(--ease); }
.x-link:hover { color: var(--on-field); background: color-mix(in oklab, var(--on-field) 9%, transparent); }
.menu { display: none; position: relative; }
.menu summary {
  list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1.5px solid var(--on-field-dim); border-radius: 999px; font-weight: 700; font-size: 15px;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { border-color: var(--thread); }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; padding: 8px;
  background: var(--paper); color: var(--ink); border-radius: var(--r);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.32);
  display: grid;
}
.menu-list a { padding: 12px 14px; border-radius: 4px; font-weight: 600; text-decoration: none; }
.menu-list a:hover { background: var(--paper-shade); }

/* Hero: copy, the security thread, then the coupon sheet. */
.hero {
  position: relative; max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(56px, 7vw, 104px);
  display: grid; grid-template-columns: minmax(0, 1.22fr) 12px minmax(0, 1fr); column-gap: clamp(28px, 3.6vw, 52px); align-items: center;
  overflow: hidden;
}
.hero-copy { position: relative; z-index: 2; }
.hero-title { font-family: var(--display); font-weight: 400; font-size: clamp(42px, 5.4vw, 82px); line-height: 1; letter-spacing: -0.01em; text-wrap: balance; }
.hero-line { margin-top: 28px; max-width: 34em; font-size: 19px; line-height: 1.55; color: var(--on-field-soft); }
.hero .actions { margin-top: 34px; }
.ca { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; }
.ca-label { font-size: 13px; font-weight: 500; color: var(--on-field-soft); }
.ca-value { color: var(--on-field); font-size: 14px; }
.ca-copy {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--on-field-dim); background: none; color: var(--on-field);
  font: 600 13px/1 var(--serif);
}
.ca-copy:hover { border-color: var(--on-field); }

.thread {
  position: relative; z-index: 3; align-self: stretch; margin: calc(-1 * clamp(48px, 7vw, 96px)) 0 calc(-1 * clamp(56px, 7vw, 104px));
  background: var(--thread) url("assets/thread.svg") center top / 12px auto repeat-y; overflow: hidden;
}

.sheet { position: relative; z-index: 1; display: grid; gap: 14px; }
.sheet-cap { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--on-field-soft); max-width: 46ch; text-wrap: balance; }
.coupons { display: grid; }
.coupon {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px;
  padding: 22px 30px; min-height: 112px; background: var(--paper); color: var(--ink); border-radius: var(--r);
  -webkit-mask:
    radial-gradient(circle at left center, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) left / 51% 100% no-repeat,
    radial-gradient(circle at right center, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle at left center, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) left / 51% 100% no-repeat,
    radial-gradient(circle at right center, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) right / 51% 100% no-repeat;
}
.coupon + .coupon { background-image: linear-gradient(90deg, var(--perf) 0 5px, transparent 5px); background-size: 9px 1.5px; background-repeat: repeat-x; background-position: 0 0; }
.coupon-name { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.coupon-meta { margin-top: 4px; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--ink-soft); }
.serial { font-family: var(--figures); font-size: 12px; font-weight: 700; letter-spacing: 0.03em; font-variant-numeric: proportional-nums; color: var(--accent-on-paper); margin-right: 4px; }
.coupon-value { text-align: right; display: grid; justify-items: end; }
.coupon-value .fig { font-size: 30px; line-height: 1.1; color: var(--ink); }
.coupon-value .unit { font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.coupon-live { min-height: 128px; }
.coupon-live .coupon-value .fig { font-size: 38px; }
.coupon-paid { background-color: var(--paper-shade); }

@media (prefers-reduced-motion: no-preference) {
  .coupon { animation: issue 0.95s var(--ease) both; }
  .coupon:nth-child(2) { animation-delay: 0.09s; }
  .coupon:nth-child(3) { animation-delay: 0.18s; }
}
@keyframes issue {
  from { transform: translateX(-56px); clip-path: inset(0 0 0 0 round var(--r)); filter: blur(2px); }
  to { transform: none; clip-path: inset(0 0 0 0 round var(--r)); filter: none; }
}

/* Bands printed in ink B take ink B's text roles. */
.note-band, .band-traders, .band-risks {
  --on-field: var(--ink-b-on); --on-field-soft: var(--ink-b-soft); --on-field-dim: var(--ink-b-dim); --field-line: var(--ink-b-line);
  --thread: var(--accent-b); --thread-hover: var(--accent-b-hover); --thread-ink: var(--accent-b-ink);
  color: var(--on-field);
}
.foot { --on-field: var(--on-night); }

/* On paper the accent prints in its dark form, so buttons, rules and focus rings keep their contrast. */
.band-paper, .band-rules, .note, .calc, .book, .plate {
  --thread: var(--accent-on-paper); --thread-hover: color-mix(in oklab, var(--accent-on-paper) 84%, #000); --thread-ink: var(--paper);
}
.note .chest { --thread: var(--accent-a); --thread-hover: var(--accent-a-hover); --thread-ink: var(--accent-a-ink); }

/* Bands */
.band { padding: clamp(72px, 9vw, 128px) var(--gutter); }
.band > * { max-width: var(--wrap); margin-left: auto; margin-right: auto; }
.band h2 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 4vw, 54px); line-height: 1.02; letter-spacing: -0.01em; text-wrap: balance; max-width: 18em; }
.band h3 { font-weight: 800; font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; }
.band-head { display: grid; gap: 22px; margin-bottom: clamp(36px, 5vw, 60px); }
.lede { font-size: 19px; line-height: 1.55; max-width: 40em; color: var(--on-field-soft); }
.band-paper .lede, .band-rules .lede { color: var(--ink-soft); }

/* The note: a paper face with a guilloché edge, holding the money flow. */
.note-band { background: var(--field-deep); padding: clamp(64px, 8vw, 112px) var(--gutter); }
.note {
  max-width: var(--wrap); margin: 0 auto; background: var(--paper); color: var(--ink); border-radius: var(--r);
  padding: clamp(28px, 4vw, 56px); padding-top: clamp(64px, 7vw, 92px);
  background-image: var(--paper-edge); background-repeat: no-repeat; background-size: 100% 64px; background-position: 0 0;
}
.note-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; margin-bottom: 36px; }
.note-title { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 2.8vw, 38px); letter-spacing: -0.01em; line-height: 1.1; }
.note-state { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.flow-in, .flow-out { display: grid; gap: 16px; position: relative; }
.flow-in::after, .flow-out::before {
  content: ""; position: absolute; top: 50%; width: 30px; height: 2px; background: var(--thread);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.flow-in::after { right: -37px; }
.flow-out::before { left: -37px; }
.stub { padding: 18px 20px; border: 1.5px dashed var(--perf); border-radius: var(--r); background: var(--paper); }
.stub-name { font-weight: 800; font-size: 17px; line-height: 1.3; }
.stub-note { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.stub-rate { margin-top: 12px; font-size: 14px; font-weight: 500; color: var(--ink); }
.stub-rate .fig { font-size: 18px; }
.stub-thread { border: 2px solid var(--thread); }
.chest {
  /* A field-coloured panel inside an ink B band prints in ink A again. */
  --on-field: var(--ink-a-on); --on-field-soft: var(--ink-a-soft); --on-field-dim: var(--ink-a-dim);
  --thread: var(--accent-a); --thread-hover: var(--accent-a-hover); --thread-ink: var(--accent-a-ink);
  position: relative; background: var(--field); color: var(--on-field); border-radius: var(--r); padding: 22px; display: grid; gap: 12px; overflow: hidden;
}
.chest-name { margin: -22px -22px 4px; padding: 12px 22px; font-weight: 700; font-size: 15px; color: var(--on-field); background-image: linear-gradient(90deg, var(--on-field-dim) 0 5px, transparent 5px); background-size: 9px 1.5px; background-repeat: repeat-x; background-position: left bottom; }
.fund { background: var(--paper); color: var(--ink); border-radius: 4px; padding: 14px 16px; border: 2px solid transparent; }
.fund-com { border-color: var(--thread); }
.fund-name { font-weight: 800; font-size: 17px; }
.fund-note { font-size: 14px; color: var(--ink-soft); }
.chest-loop { display: grid; gap: 8px; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--on-field-soft); }
.loop-k { display: inline-block; min-width: 3.4em; font-weight: 700; font-size: 13px; color: var(--thread); }

/* Fund and the coupon calculator */
.band-fund { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: start; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; }
.band-fund > * { max-width: none; margin: 0; }
.fund-copy { display: grid; gap: 20px; }
.fund-copy p:not(.lede) { color: var(--on-field-soft); max-width: 36em; }
.calc {
  background: var(--paper); color: var(--ink); border-radius: var(--r); padding: 30px 32px 26px; display: grid; gap: 18px;
  -webkit-mask:
    radial-gradient(circle at left 62%, transparent 13px, #000 13.5px) left / 51% 100% no-repeat,
    radial-gradient(circle at right 62%, transparent 13px, #000 13.5px) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle at left 62%, transparent 13px, #000 13.5px) left / 51% 100% no-repeat,
    radial-gradient(circle at right 62%, transparent 13px, #000 13.5px) right / 51% 100% no-repeat;
}
.calc-title { font-size: 22px !important; }
.calc-size { display: flex; align-items: baseline; justify-content: space-between; font-weight: 600; }
.calc-size-value .fig { font-size: 30px; }
.calc-range { width: 100%; height: 28px; background: none; -webkit-appearance: none; appearance: none; --fill: 40%; }
.calc-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--thread) var(--fill), var(--paper-shade) var(--fill)); }
.calc-range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--paper-shade); }
.calc-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--thread); }
.calc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--ink); border: 3px solid var(--paper); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28); }
.calc-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 3px solid var(--paper); }
.calc-scale { display: flex; justify-content: space-between; font-family: var(--figures); font-size: 12px; color: var(--ink-soft); margin-top: -10px; }
.calc-line { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.calc-line legend { float: left; margin-right: 6px; font-weight: 600; font-size: 15px; }
.calc-line label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--perf); border-radius: 999px; font-size: 15px; font-weight: 600; }
.calc-line label:has(input:checked) { border-color: var(--ink); background: var(--paper-shade); }
.calc-line input { width: 16px; height: 16px; margin: 0; }
.calc-out { position: relative; display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; margin-top: 8px; padding-top: 22px; background-image: linear-gradient(90deg, var(--perf) 0 5px, transparent 5px); background-size: 9px 1.5px; background-repeat: repeat-x; }
.calc-out::after { content: ""; position: absolute; left: 50%; top: 22px; bottom: 0; border-left: 1.5px dashed var(--perf); }
.calc-stub { display: grid; gap: 6px; align-content: start; }
.calc-stub dt { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.calc-stub dd { display: grid; gap: 6px; }
.calc-stub .fig { font-size: 30px; line-height: 1.1; }
.calc-fund .fig { color: var(--accent-on-paper); }
.calc-why { font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
.calc-note { font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
@media (prefers-reduced-motion: no-preference) {
  .calc.is-stamped .calc-stub .fig { animation: stamp 0.5s var(--ease); }
}
@keyframes stamp { from { opacity: 0.35; transform: scale(1.06); filter: blur(1px); } to { opacity: 1; transform: none; filter: none; } }
.calc-stub output { transform-origin: left center; display: inline-block; }

/* Traders: the payout path as one coupon strip. */
.band-traders { background: var(--field-deep); }
.path {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--paper); color: var(--ink); border-radius: var(--r);
  -webkit-mask:
    radial-gradient(circle at left center, transparent 13px, #000 13.5px) left / 51% 100% no-repeat,
    radial-gradient(circle at right center, transparent 13px, #000 13.5px) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle at left center, transparent 13px, #000 13.5px) left / 51% 100% no-repeat,
    radial-gradient(circle at right center, transparent 13px, #000 13.5px) right / 51% 100% no-repeat;
}
.path li { padding: 26px 24px 28px; display: grid; gap: 8px; align-content: start; }
.path li + li { background-image: linear-gradient(180deg, var(--perf) 0 5px, transparent 5px); background-size: 1.5px 9px; background-repeat: repeat-y; }
.path li:first-child { padding-left: 32px; }
.path li:last-child { padding-right: 32px; background-color: var(--paper-shade); }
.path li { grid-template-rows: auto 1fr auto; }
.path-when { margin-top: 6px; padding-top: 12px; border-top: 1.5px dashed var(--perf); font-size: 13px; font-weight: 600; color: var(--ink); text-align: right; }
.path-when .fig { font-size: 13px; }
.path h3 { font-size: 18px; }
.path p:not(.path-when) { font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.traders-low { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 72px); margin-top: clamp(40px, 5vw, 64px); align-items: start; }
.notes { display: grid; gap: 18px; }
.notes li { position: relative; padding-left: 26px; color: var(--on-field-soft); max-width: 38em; }
.notes li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 12px; height: 2px; background: var(--thread); }
.ledger { border: 1.5px solid var(--field-line); border-radius: var(--r); padding: 22px 24px; }
.ledger-cap { display: flex; justify-content: space-between; gap: 16px; font-weight: 700; margin-bottom: 10px; }
.ledger-state { font-size: 13px; font-weight: 500; color: var(--on-field-soft); }
.ledger-rows div { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; font-size: 15px; }
.ledger-rows dt { color: var(--on-field); }
.ledger-rows dd { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--on-field-soft); }
.ledger-rows div::after { content: none; }
.ledger-rows dt::after { content: ""; display: inline-block; }

/* Deposit band: paper. */
.band-paper { background: var(--paper) var(--paper-edge) no-repeat 0 0 / 100% 96px; color: var(--ink); }
.funds-table { width: 100%; border-collapse: collapse; font-size: 16px; table-layout: fixed; }
.funds-table th, .funds-table td { text-align: left; vertical-align: top; padding: 18px 20px 18px 0; border-bottom: 1.5px dashed var(--perf); }
.funds-table thead th { font-weight: 850; font-size: 22px; letter-spacing: -0.015em; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.funds-table thead td { border-bottom: 2px solid var(--ink); }
.funds-table thead th:nth-child(2) { color: var(--ink); }
.funds-table thead td, .funds-table tbody th { width: 20%; }
.funds-table thead th { width: 40%; }
.funds-table tbody th { font-weight: 700; font-size: 15px; color: var(--ink-soft); padding-top: 19px; }
.funds-table td { line-height: 1.5; }
.funds-note { margin-top: 18px; font-size: 15px; color: var(--ink-soft); }
.loss { margin-top: clamp(48px, 6vw, 80px); display: grid; gap: 18px; }
.loss-title { font-weight: 800; font-size: 20px; }
.loss-bar { display: grid; grid-template-columns: 0.42fr 0.58fr; min-height: 120px; border-radius: var(--r); overflow: hidden; }
.loss-com { position: relative; background: var(--thread); color: var(--thread-ink); padding: 18px 20px; }
.loss-dep { background: var(--field); color: var(--on-field); padding: 18px 20px; }
.loss-name { font-weight: 800; }
.loss-note { font-size: 14px; }
.loss-dep .loss-note { color: var(--on-field-soft); }
.loss-bite { position: absolute; right: 14px; top: 14px; padding: 6px 10px; border: 1.5px dashed var(--thread-ink); border-radius: 4px; font-size: 13px; font-weight: 600; }
.loss-text { max-width: 44em; color: var(--ink-soft); }

/* Credit band */
.band-credit { background: var(--field); }
.track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--on-field); }
.track li { padding: 22px 22px 0 0; display: grid; gap: 8px; align-content: start; position: relative; }
.track li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--thread); }
.track p { color: var(--on-field-soft); font-size: 15px; line-height: 1.5; }
.credit-low { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); margin-top: clamp(48px, 6vw, 80px); }
.credit-block { display: grid; gap: 14px; align-content: start; }
.credit-block p { color: var(--on-field-soft); }
.ticks { display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 24px; color: var(--on-field-soft); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 12px; height: 2px; background: var(--thread); }
.book {
  margin-top: clamp(48px, 6vw, 80px); background: var(--paper); color: var(--ink); border-radius: var(--r); padding: 30px 40px; display: grid; gap: 12px;
  -webkit-mask:
    radial-gradient(circle at left center, transparent 13px, #000 13.5px) left / 51% 100% no-repeat,
    radial-gradient(circle at right center, transparent 13px, #000 13.5px) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle at left center, transparent 13px, #000 13.5px) left / 51% 100% no-repeat,
    radial-gradient(circle at right center, transparent 13px, #000 13.5px) right / 51% 100% no-repeat;
}
.book p { max-width: 62em; color: var(--ink-soft); }
.book-fee { font-size: 15px; }

/* Rules: the conditions printed on the back of the note. */
.band-rules {
  background: var(--paper); color: var(--ink);
  background-image: var(--paper-edge); background-repeat: no-repeat; background-size: 100% 96px; background-position: 0 0;
}
.rules { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: clamp(32px, 4vw, 56px); }
.rules li { padding: 26px 0 28px; border-top: 1.5px dashed var(--perf); display: grid; gap: 10px; align-content: start; }
.rules h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
/* The figure each promise rests on, struck as a rubber stamp: small capitals inside a double rule. */
.seal { font-weight: 700; font-size: 14px; padding: 3px 9px; border: 3px double var(--ink); border-radius: 4px; white-space: nowrap; font-variant-caps: all-small-caps; letter-spacing: 0.02em; }
.rules p { color: var(--ink-soft); }

/* The plate band and its serial plate */
/* The plate is paper inside a wine band, so its outline controls print in ink. */
.plate { --on-field: var(--ink); --on-field-soft: var(--ink-soft); --on-field-dim: var(--ink-soft); }
.band-coin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: center; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; }
.band-coin > * { max-width: none; margin: 0; }
.coin-copy { display: grid; gap: 22px; }
.plate {
  background: var(--paper); color: var(--ink); border-radius: var(--r); padding: 76px 32px 30px; display: grid; gap: 14px;
  background-image: var(--paper-edge); background-repeat: no-repeat; background-size: 100% 56px;
}
.plate-label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.plate-value code { font-size: clamp(15px, 1.7vw, 19px); overflow-wrap: anywhere; }
.plate .actions { margin-top: 6px; }
.plate-note { font-size: 14px; color: var(--ink-soft); }

/* Risks */
.band-risks { background: var(--field-deep); }
.band-risks h2 { max-width: var(--wrap); margin-bottom: clamp(28px, 4vw, 44px); }
.risks { display: grid; grid-template-columns: 1fr 1fr; gap: 22px clamp(32px, 5vw, 72px); }
.risks li { color: var(--on-field-soft); padding-top: 18px; border-top: 1px solid var(--field-line); }
.risks b { color: var(--on-field); font-weight: 700; }

/* Close */
.close {
  position: relative; overflow: hidden; text-align: center; padding: clamp(88px, 11vw, 160px) var(--gutter);
  display: grid; justify-items: center; gap: 20px;
}
.close h2 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4.4vw, 60px); letter-spacing: -0.01em; line-height: 1; }
.close p { color: var(--on-field-soft); max-width: 34em; }
.close .actions { justify-content: center; margin-top: 8px; }

.foot { background: var(--field-night); padding: 32px var(--gutter); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 14px; color: var(--on-night); }
.foot-links { display: flex; gap: 20px; }
.foot-links a { color: var(--on-field); }

/* Narrower screens */
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu { display: block; }
  .rules { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow-in, .flow-out { grid-template-columns: 1fr 1fr; }
  .flow-in::after, .flow-out::before { top: auto; left: 50%; width: 2px; height: 18px; }
  .flow-in::after { bottom: -23px; right: auto; }
  .flow-out::before { top: -23px; }
  .path { grid-template-columns: 1fr; -webkit-mask: none; mask: none; }
  .path li + li { background-image: linear-gradient(90deg, var(--perf) 0 5px, transparent 5px); background-size: 9px 1.5px; background-repeat: repeat-x; }
  .path li, .path li:first-child, .path li:last-child { padding: 22px 24px; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; row-gap: 22px; padding-bottom: 64px; }
  /* On one column the sheet follows the primary action, so the first coupon lands above the fold;
     the secondary action and the contract strip come after it. */
  .hero-copy, .hero .actions { display: contents; }
  .hero-title { order: 1; }
  .hero-line { order: 2; margin-top: 0; }
  .hero .pill-thread { order: 3; }
  .thread { order: 4; }
  .sheet { order: 5; }
  .hero .pill-line { order: 6; }
  .ca { order: 7; margin-top: 0; }
  .hero-line-more { display: none; }
  .hero-title, .hero-line, .hero .pill, .ca { position: relative; z-index: 2; }
  .thread { margin: 0 calc(-1 * var(--gutter)); height: 12px; align-self: auto; z-index: 3; background-image: url("assets/thread-h.svg"); background-size: auto 12px; background-repeat: repeat-x; background-position: left center; }
  .band-fund, .band-coin, .traders-low, .credit-low { grid-template-columns: 1fr; }
  .track { grid-template-columns: 1fr 1fr; row-gap: 28px; border-top: 0; }
  .track li { border-top: 2px solid var(--on-field); }
  .rules, .risks { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top-in { height: 64px; gap: 12px; }
  .brand-name { font-size: 21px; }
  .top-end { gap: 6px; }
  .menu summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .menu summary { padding: 0 11px; }
  .x-link { display: none; }
  .top-app { min-height: 40px; padding: 0 16px; font-size: 14px; }
  .hero { padding-top: 28px; }
  .hero-line, .lede { font-size: 17px; }
  .hero .actions .pill, .close .actions .pill { flex: 1 1 100%; }
  .coupon { padding: 16px 24px; gap: 12px; min-height: 92px; }
  .coupon-live { min-height: 104px; }
  .hero { row-gap: 18px; padding-bottom: 48px; }
  .coupon-value .fig { font-size: 24px; }
  .coupon-live .coupon-value .fig { font-size: 30px; }
  .flow-in, .flow-out { grid-template-columns: 1fr; }
  .calc { padding: 24px 22px; }
  .calc-out { grid-template-columns: 1fr; row-gap: 18px; }
  .calc-out::after { display: none; }
  .calc-stub + .calc-stub { padding-top: 18px; border-top: 1.5px dashed var(--perf); }
  .track { grid-template-columns: 1fr; }
  /* Each row restacks as its label over the two funds, each cell named. */
  .funds-table, .funds-table tbody, .funds-table tr, .funds-table th, .funds-table td { display: block; width: auto; }
  .funds-table thead { display: none; }
  .funds-table tr { padding: 14px 0; border-bottom: 1.5px dashed var(--perf); }
  .funds-table tbody th, .funds-table td { padding: 4px 0; border: 0; }
  .funds-table tbody th { color: var(--ink); padding-bottom: 6px; }
  .funds-table td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
  .funds-table td + td { margin-top: 8px; }
  .funds-table thead td, .funds-table tbody th, .funds-table thead th { width: auto; }
  .loss-bar { grid-template-columns: 1fr; }
  .loss-bite { position: static; display: inline-block; margin-bottom: 8px; }
  .book { padding: 26px 28px; }
  .plate { padding: 70px 22px 24px; }
}

/* Engraved plates. Every field prints on a Higgsfield guilloché plate (brand/higgsfield, briefs W1 to W3): wine for
   the note field, rose for the second-ink bands, cream for paper. Each plate is mirrored top to bottom, so it repeats
   down the page with no seam. */
:root {
  --plate-wine: url("assets/plate-wine.webp");
  --plate-rose: url("assets/plate-rose.webp");
  --plate-paper: url("assets/plate-paper.webp");
}
body { background: var(--ink-a) var(--plate-wine) center top / 100% auto repeat-y; }
.band-credit { background: none; }
.note-band, .band-traders, .band-risks { background: var(--ink-b) var(--plate-rose) center top / 100% auto repeat-y; }
.band-paper, .band-rules {
  background-color: var(--paper);
  background-image: var(--paper-edge), var(--plate-paper);
  background-size: 100% 96px, 100% auto;
  background-repeat: no-repeat, repeat-y;
  background-position: 0 0, center top;
}
.coupon, .note, .calc, .book, .stub, .fund { background-image: var(--plate-paper); background-size: 1200px auto; background-position: center; }
.note { background-image: var(--paper-edge), var(--plate-paper); background-size: 100% 64px, 1200px auto; background-repeat: no-repeat, repeat; background-position: 0 0, center; }
.coupon + .coupon {
  background-image: linear-gradient(90deg, var(--perf) 0 5px, transparent 5px), var(--plate-paper);
  background-size: 9px 1.5px, 1200px auto;
  background-repeat: repeat-x, repeat;
  background-position: 0 0, center;
}
.coupon-paid { background-blend-mode: multiply; }
.chest { background-image: var(--plate-wine); background-size: 900px auto; background-position: center; }

/* The engraved frame of a printed note: a fine double rule inside the hero and the closing band. */
.hero::after, .close::after {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  inset: clamp(10px, 1.4vw, 18px);
  border: 1px solid color-mix(in oklab, var(--accent-a) 46%, transparent);
  outline: 1px solid color-mix(in oklab, var(--accent-a) 24%, transparent); outline-offset: -6px;
  border-radius: 3px;
}
