/* AesBook™ — site styles
 *
 * A light paper layout: ink type, hairline rules, one green accent.
 * Motion uses a single long ease-out; everything arrives once and settles.
 */

/* ---------------------------------------------------------------- fonts */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  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: "Archivo";
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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 Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---------------------------------------------------------------- tokens */

:root {
  --paper: #f3f0e9;
  --paper-2: #e9e5da;
  --card: #fbfaf6;
  --ink: #0f0f0e;
  --ink-2: #5e5a53;
  --ink-3: #8a867d;
  --ink-faint: rgba(15, 15, 14, 0.2);
  --line: rgba(15, 15, 14, 0.16);
  --line-strong: #0f0f0e;
  --accent: #1fae66;
  --accent-deep: #0c6e3f;      /* accent for small text: passes contrast on paper */
  --warn: #b3261e;             /* only for an error message */

  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --gutter: clamp(20px, 4vw, 58px);
  --gap: clamp(16px, 2vw, 28px);
  --hdr: 76px;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 12px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }

.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600;
  transition: top 0.4s var(--ease);
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1600px; margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------------------------------------------------------------- type */

.h-xl, .h-xxl, .h-lg { font-weight: 620; letter-spacing: -0.042em; text-wrap: balance; }
.h-xl { font-size: clamp(46px, 7.4vw, 108px); line-height: 0.92; }
.h-xxl { font-size: clamp(56px, 11.5vw, 190px); line-height: 0.9; letter-spacing: -0.05em; }
.h-lg { font-size: clamp(32px, 4.3vw, 62px); line-height: 0.98; letter-spacing: -0.038em; }

.lead { color: var(--ink-2); font-size: clamp(16.5px, 1.25vw, 18.5px); line-height: 1.55; max-width: 44ch; }

.tag { display: inline-flex; align-items: center; gap: 9px; font: 500 11.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.tag i { width: 7px; height: 7px; background: var(--accent); flex: none; }

/* ---------------------------------------------------------------- buttons and links */

.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 16px;
  height: 54px; padding-inline: 24px;
  background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: 16px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
  transition: color 0.45s var(--ease);
}
/* The accent rises from the bottom edge on hover. */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent);
  transform: scaleY(0); transform-origin: 50% 100%; transition: transform 0.55s var(--ease);
}
.btn:hover { color: var(--ink); }
.btn:hover::before { transform: scaleY(1); }
.btn:active { transform: scale(0.985); }
.btn--lg { height: clamp(58px, 5.4vw, 76px); padding-inline: clamp(24px, 2.4vw, 36px); font-size: clamp(17px, 1.6vw, 22px); }

.arw { width: 16px; height: 16px; overflow: hidden; flex: none; }
.arw svg { width: 16px; height: 16px; }
a:hover > .arw svg, button:hover > .arw svg { animation: arw-right 0.6s var(--ease); }
@keyframes arw-right {
  0% { transform: translateX(0); }
  45% { transform: translateX(110%); }
  45.01% { transform: translateX(-110%); }
  100% { transform: translateX(0); }
}

/* Text link with an underline that leaves to the right and returns from the left. */
.link { position: relative; display: inline-block; padding-block: 4px; font-weight: 600; text-decoration: none; }
.link::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: currentColor; transform-origin: 0 50%; }
.link:hover::after { animation: line-swap 0.75s var(--ease); }
@keyframes line-swap {
  0% { transform: scaleX(1); transform-origin: 100% 50%; }
  45% { transform: scaleX(0); transform-origin: 100% 50%; }
  45.01% { transform: scaleX(0); transform-origin: 0 50%; }
  100% { transform: scaleX(1); transform-origin: 0 50%; }
}

.sq {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: none; border: 1px solid var(--ink); cursor: pointer;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), opacity 0.3s ease;
}
.sq svg { width: 16px; height: 16px; }
.sq:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.sq:disabled { opacity: 0.28; cursor: default; }

/* ---------------------------------------------------------------- header */

.hdr {
  position: fixed; inset-inline: 0; top: 0; z-index: 50; height: var(--hdr);
  transition: transform 0.7s var(--ease), background-color 0.4s ease, box-shadow 0.4s ease;
}
.hdr.is-solid { background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.hdr.is-away { transform: translateY(-101%); }
.hdr-in { height: 100%; max-width: 1600px; margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: clamp(20px, 3.4vw, 48px); }

.logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.logo-mark { transition: transform 0.6s var(--ease); }
.logo-l { fill: var(--accent); }
.logo-r { fill: var(--ink); }
.logo:hover .logo-mark { transform: rotate(-6deg) scale(1.04); }
.logo-word { font-weight: 720; font-stretch: 125%; font-size: 18.5px; letter-spacing: -0.03em; line-height: 1; }
.logo-word sup { font: 500 8px/1 var(--mono); vertical-align: top; margin-inline-start: 2px; position: relative; top: 1px; }

.hdr.has-menu { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }

.nav { display: flex; align-items: stretch; height: 100%; gap: clamp(2px, 0.8vw, 12px); }
.nav-item { display: flex; align-items: stretch; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 100%; padding: 0 9px;
  background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 560; font-size: 15.5px; letter-spacing: -0.01em; color: inherit; text-decoration: none; white-space: nowrap;
}
.nav-link::after { content: ""; position: absolute; inset-inline: 9px; bottom: calc(50% - 15px); height: 1px; background: currentColor; transform: scaleX(0); transform-origin: 100% 50%; transition: transform 0.5s var(--ease); }
.nav-link:hover::after, .nav-link.is-current::after, .nav-item.is-open .nav-link::after { transform: scaleX(1); transform-origin: 0 50%; }
.chev { transition: transform 0.5s var(--ease); }
.nav-item.is-open .chev { transform: rotate(180deg); }

/* Submenu: a full-width sheet that unrolls from under the header, listing the
   topics of one part of the book. */
.menu {
  position: absolute; inset-inline: 0; top: 100%;
  background: var(--paper); border-top: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line), 0 44px 60px -44px rgba(15, 15, 14, 0.3);
  clip-path: inset(0 0 100% 0); transition: clip-path 0.7s var(--ease);
}
.nav-item.is-open .menu { clip-path: inset(0 0 -90px 0); }
.menu-in { max-width: 1600px; margin-inline: auto; padding: clamp(26px, 3.2vw, 48px) var(--gutter) clamp(30px, 3.8vw, 56px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.menu-side { grid-column: 1 / span 3; display: flex; flex-direction: column; align-items: flex-start; }
.menu-title { font-weight: 620; font-size: clamp(30px, 3vw, 44px); letter-spacing: -0.04em; line-height: 1; }
.menu-lead { margin-top: 14px; color: var(--ink-2); font-size: 15px; line-height: 1.5; max-width: 30ch; }
.menu-side .link { margin-top: 22px; }
.menu-list { grid-column: 5 / span 8; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); align-content: start; }
.menu-list a { display: flex; align-items: baseline; gap: 18px; padding-block: 14px; border-top: 1px solid var(--line); text-decoration: none; }
.menu-list a .mono { color: var(--accent-deep); flex: none; }
.menu-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.menu-text b { font-weight: 620; font-size: 18px; letter-spacing: -0.022em; line-height: 1.15; transition: transform 0.55s var(--ease); }
.menu-text small { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.menu-list a:hover b { transform: translateX(7px); }
[dir="rtl"] .menu-list a:hover b { transform: translateX(-7px); }
.menu-list a[aria-current="page"] b { color: var(--accent-deep); }
/* Its rows arrive one after another, just behind the sheet. */
.menu-list li, .menu-side > * { opacity: 0; transform: translateY(14px); transition: opacity 0.3s ease, transform 0.3s ease; }
.nav-item.is-open .menu-list li, .nav-item.is-open .menu-side > * { opacity: 1; transform: none; transition: opacity 0.6s var(--ease), transform 0.8s var(--ease); transition-delay: 0.1s; }
.nav-item.is-open .menu-list li:nth-child(n + 3) { transition-delay: 0.14s; }
.nav-item.is-open .menu-list li:nth-child(n + 5) { transition-delay: 0.18s; }
.nav-item.is-open .menu-list li:nth-child(n + 7) { transition-delay: 0.22s; }

.scrim { position: fixed; inset: 0; z-index: 45; background: rgba(15, 15, 14, 0.2); opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
.scrim.is-on { opacity: 1; pointer-events: auto; }

.hdr-end { margin-inline-start: auto; display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.hdr-mail { color: var(--ink-2); text-decoration: none; text-transform: none; letter-spacing: 0.02em; font-size: 12px; transition: color 0.3s ease; }
.hdr-mail:hover { color: var(--ink); }

/* Partners: the way into the partners area. */
/* On hover three things happen together: ink sweeps across from the lock's
   side, the label rolls up to a fresh copy of itself, and the padlock opens. */
.pbtn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px; height: 44px; padding-inline: 17px 5px;
  background: var(--accent); color: var(--ink); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; text-decoration: none;
  transition: color 0.5s var(--ease), transform 0.35s var(--ease);
}
.pbtn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink);
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform 0.7s var(--ease);
}
.pbtn-ic {
  display: inline-grid; place-items: center; width: 34px; height: 34px; background: var(--ink); color: var(--paper);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
.lock-shackle { transform-origin: 11.5px 7px; transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }

.pbtn:hover, .pbtn:focus-visible, .pbtn[aria-current="page"] { color: var(--paper); }
.pbtn:hover::before, .pbtn:focus-visible::before, .pbtn[aria-current="page"]::before { transform: scaleX(1); }
.pbtn:hover .pbtn-ic, .pbtn:focus-visible .pbtn-ic, .pbtn[aria-current="page"] .pbtn-ic { background: var(--accent); color: var(--ink); }
.pbtn:hover .lock-shackle, .pbtn:focus-visible .lock-shackle { transform: translateY(-1px) rotate(13deg); }
.pbtn:active { transform: scale(0.96); }
[dir="rtl"] .pbtn::before { transform-origin: 0 50%; }

/* A label that rolls: the text leaves upward and an identical line follows it in. */
.roll { position: relative; display: block; overflow: hidden; height: 1.35em; line-height: 1.35; }
.roll > span { display: block; transition: transform 0.6s var(--ease); }
.roll::after {
  content: attr(data-text);
  content: attr(data-text) / "";   /* the copy is decoration: screen readers hear the label once */
  position: absolute; inset-inline-start: 0; top: 100%; white-space: nowrap; transition: transform 0.6s var(--ease);
}
a:hover > .roll > span, a:hover > .roll::after,
a:focus-visible > .roll > span, a:focus-visible > .roll::after,
button:hover > .roll > span, button:hover > .roll::after,
button:focus-visible > .roll > span, button:focus-visible > .roll::after { transform: translateY(-100%); }

.burger { display: none; position: relative; width: 44px; height: 44px; padding: 0; background: none; border: 1px solid var(--ink); cursor: pointer; }
.burger span { position: absolute; inset-inline: 12px; height: 1.5px; background: currentColor; transition: transform 0.5s var(--ease), top 0.5s var(--ease); }
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* Mobile menu: a paper sheet that drops from the header. */
.mnav {
  position: fixed; inset: 0; z-index: 40; padding: calc(var(--hdr) + 28px) var(--gutter) 32px;
  background: var(--paper); display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto;
  clip-path: inset(0 0 100% 0); transition: clip-path 0.8s var(--ease), display 0.8s allow-discrete;
}
.mnav.is-open { clip-path: inset(0 0 0 0); }
@starting-style { .mnav.is-open { clip-path: inset(0 0 100% 0); } }
.mnav-links { display: flex; flex-direction: column; }
.mnav-links > * { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.8s var(--ease); }
.mnav.is-open .mnav-links > * { opacity: 1; transform: none; }
.mnav.is-open .mnav-links > :nth-child(1) { transition-delay: 0.10s; }
.mnav.is-open .mnav-links > :nth-child(2) { transition-delay: 0.15s; }
.mnav.is-open .mnav-links > :nth-child(3) { transition-delay: 0.20s; }
.mnav.is-open .mnav-links > :nth-child(4) { transition-delay: 0.25s; }
.mnav.is-open .mnav-links > :nth-child(5) { transition-delay: 0.30s; }
.mnav.is-open .mnav-links > :nth-child(6) { transition-delay: 0.35s; }
.mnav-a, .macc-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  padding: 15px 0; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: start;
  font: inherit; font-weight: 620; font-size: clamp(27px, 7.4vw, 40px); letter-spacing: -0.035em; line-height: 1; color: inherit; text-decoration: none;
}
.mnav-partners { color: var(--accent-deep); }
/* Each part of the book opens in place to show its topics. */
.macc-btn i { position: relative; width: 18px; height: 18px; flex: none; }
.macc-btn i::before, .macc-btn i::after { content: ""; position: absolute; left: 0; top: 50%; width: 18px; height: 1.5px; margin-top: -0.75px; background: currentColor; transition: transform 0.6s var(--ease); }
.macc-btn i::after { transform: rotate(90deg); }
.macc.is-open .macc-btn i::after { transform: rotate(0deg); }
.macc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease); }
.macc-panel > div { min-height: 0; overflow: hidden; display: flex; flex-direction: column; visibility: hidden; transition: visibility 0.6s; }
.macc.is-open .macc-panel { grid-template-rows: 1fr; border-bottom: 1px solid var(--line); }
.macc.is-open .macc-panel > div { visibility: visible; }
.macc-panel a { padding: 9px 0; font-weight: 560; font-size: 17.5px; letter-spacing: -0.015em; color: var(--ink-2); text-decoration: none; }
.macc-panel a:first-child { padding-top: 16px; color: var(--ink); }
.macc-panel a:last-child { padding-bottom: 18px; }
.mnav-mail { margin-top: 32px; text-transform: none; font-size: 13px; color: var(--ink-2); text-decoration: none; }

/* ---------------------------------------------------------------- hero */

.hero { position: relative; min-height: 100svh; padding-top: calc(var(--hdr) + clamp(28px, 6vh, 72px)); padding-bottom: clamp(40px, 7vh, 84px); display: flex; align-items: flex-end; }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
.hero-copy { grid-column: 1 / span 7; }
.hero-copy .tag { margin-bottom: clamp(20px, 3vh, 34px); }
.hero-lead { margin-top: clamp(24px, 3.4vh, 40px); font-size: clamp(17px, 1.45vw, 21px); max-width: 40ch; color: var(--ink-2); }
.hero-cta { margin-top: clamp(26px, 3.6vh, 42px); display: flex; align-items: center; flex-wrap: wrap; gap: 18px 30px; }

.hero-art { grid-column: 9 / span 4; position: relative; aspect-ratio: 10 / 13; align-self: center; }
.sheet {
  position: absolute; padding: 16px 18px 18px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15, 15, 14, 0.04), 0 24px 48px -28px rgba(15, 15, 14, 0.35);
}
.sheet--a { top: 0; inset-inline-start: 10%; width: 82%; }
.sheet--b { top: 33%; inset-inline-start: 18%; width: 82%; }
.sheet--c { top: 62%; inset-inline-start: 0; width: 76%; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--ink); }
.sheet-head b { color: var(--accent-deep); font-weight: 500; margin-inline-end: 6px; }
.sheet-count { color: var(--ink-3); }
.chip { font: 500 10.5px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 7px; background: var(--ink); color: var(--paper); }
.sheet-rows > div, .sheet-sums > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-block: 8px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.sheet-rows > div:last-child, .sheet-sums > div:last-child { border-bottom: 0; padding-bottom: 0; }
.sheet-rows dt, .sheet-sums dt { color: var(--ink-3); }
.sheet-rows dd, .sheet-sums dd { font-weight: 560; text-align: end; }
.sheet-rows dd.mono, .sheet-sums dd.mono { font-weight: 500; font-size: 12px; letter-spacing: 0.02em; }
.sheet-list li { display: flex; align-items: center; gap: 10px; padding-block: 8px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.sheet-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.sheet-list span { flex: 1; min-width: 0; font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-list em { font: 400 10.5px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); flex: none; }
.dot--warn { background: var(--accent); }

/* Six months, two columns each: income in ink, expenses in the accent. */
.bars { display: flex; align-items: flex-end; gap: 2px; height: 72px; margin-block: 14px 10px; border-bottom: 1px solid var(--ink); }
.bars span { flex: 1; height: var(--h); background: var(--ink); transform-origin: 50% 100%; }
.bars span.alt { background: var(--accent); margin-inline-end: 9px; }
.bars span.alt:last-child { margin-inline-end: 0; }

/* The sheets drift very slightly, each at its own pace. */
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
.sheet--a { animation: drift 9s ease-in-out infinite; }
.sheet--b { animation: drift 11s ease-in-out -3s infinite; }
.sheet--c { animation: drift 10s ease-in-out -6s infinite; }

/* ---------------------------------------------------------------- marquee */

.mq { overflow: hidden; border-block: 1px solid var(--line); padding-block: 20px; }
.mq-track { display: flex; width: max-content; }
.mq.is-live .mq-track { animation: mq 44s linear infinite; }
.mq:hover .mq-track { animation-play-state: paused; }
.mq-set { display: flex; align-items: center; flex: none; }
.mq span { padding-inline: clamp(18px, 2.2vw, 34px); font-weight: 660; font-stretch: 112%; font-size: clamp(17px, 1.75vw, 24px); letter-spacing: -0.012em; text-transform: uppercase; white-space: nowrap; }
.mq i { width: 8px; height: 8px; background: var(--accent); flex: none; }
@keyframes mq { to { transform: translateX(-50%); } }
[dir="rtl"] .mq.is-live .mq-track { animation-direction: reverse; }

/* ---------------------------------------------------------------- sections */

.sec { padding-block: clamp(84px, 11.5vw, 172px); }
.sec--card { background: var(--card); }
.sec--tint { background: var(--paper-2); }

.sec-head { align-items: start; row-gap: 20px; margin-bottom: clamp(44px, 6vw, 92px); }
.sec-head .tag { grid-column: 1 / span 3; margin-top: 0.9em; }
.sec-head .h-lg { grid-column: 4 / span 8; max-width: 17ch; }

/* Statement */
.statement-text { grid-column: 4 / span 9; font-weight: 600; font-size: clamp(27px, 3.75vw, 54px); line-height: 1.07; letter-spacing: -0.035em; text-wrap: pretty; }
.figs { grid-column: 4 / span 9; margin-top: clamp(56px, 8vw, 128px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 36px; }
.figs li { position: relative; padding-top: 20px; display: flex; flex-direction: column; }
.figs li::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px; background: var(--ink); }
.fig-n { font-weight: 700; font-stretch: 118%; font-size: clamp(60px, 7.4vw, 108px); line-height: 0.92; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin-bottom: 22px; }
.figs strong { font-weight: 640; font-size: 16.5px; }
.figs li > span:last-child { color: var(--ink-2); font-size: 15.5px; max-width: 26ch; }

/* Information */
.info-grid { align-items: start; row-gap: 56px; }
.nlist { grid-column: 1 / span 7; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.nrow { position: relative; }
.nrow a { display: flex; align-items: center; gap: 22px; padding-block: 20px; text-decoration: none; }
.nrow .t { flex: 1; }
.nrow .arw { opacity: 0; transform: translateX(-8px); transition: opacity 0.4s ease, transform 0.6s var(--ease); }
.nrow a:hover .arw, .nrow a:focus-visible .arw { opacity: 1; transform: none; }
.sec-foot { margin-top: clamp(32px, 4vw, 56px); }

/* ---------------------------------------------------------------- photographs */
/* Real photographs, cropped wide (see assets/img/photos/CREDITS.txt). A band runs
   the width of the page; a smaller one sits beside text. */
.shot { margin: 0; }
.shot-in { position: relative; overflow: hidden; background: var(--paper-2); }
.shot--wide .shot-in { aspect-ratio: 21 / 9; }
.shot--side .shot-in { aspect-ratio: 4 / 3; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { display: flex; align-items: center; gap: 9px; margin-top: 14px; color: var(--ink-2); }
.shot figcaption i { width: 7px; height: 7px; flex: none; background: var(--accent); }
.pshot { padding-bottom: clamp(56px, 8vw, 112px); }
.statement-shot { grid-column: 1 / -1; margin-top: clamp(64px, 8vw, 120px); }
.acc-side .shot { margin-top: clamp(28px, 3.4vw, 48px); }
.nrow::before, .srow::before, .plist li::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px; background: var(--line); transform-origin: 0 50%; }
.nrow .n, .srow .n, .plist .n { color: var(--accent-deep); flex: none; }
.nrow .t { font-weight: 600; font-size: clamp(19px, 1.65vw, 23px); letter-spacing: -0.025em; transition: transform 0.6s var(--ease); }
.nrow:hover .t { transform: translateX(8px); }
[dir="rtl"] .nrow:hover .t { transform: translateX(-8px); }

.formart { grid-column: 9 / span 4; padding: 20px 22px 24px; background: var(--paper); border: 1px solid var(--line); }
.formart-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); margin-bottom: 6px; }
.formart-head span:last-child { color: var(--accent-deep); }
.formart-field { padding-top: 14px; }
.formart-field label { display: block; font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.formart-field p { position: relative; height: 40px; display: flex; align-items: center; padding-inline: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 560; font-size: 14.5px; overflow: hidden; }
.formart-field p .mono { font-size: 12.5px; letter-spacing: 0.02em; }

/* Records rail */
.rail-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; margin-top: calc(clamp(44px, 6vw, 92px) * -0.45); margin-bottom: clamp(32px, 4vw, 56px); padding-inline-start: calc((100% + var(--gap)) / 12 * 3); }
.rail-nav { display: flex; gap: 8px; }
.rail {
  display: flex; gap: var(--gap); overflow-x: auto; overscroll-behavior-x: contain;
  padding-inline: max(var(--gutter), calc((100vw - 1600px) / 2 + var(--gutter)));
  scroll-padding-inline: max(var(--gutter), calc((100vw - 1600px) / 2 + var(--gutter)));
  scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
.rail.is-drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.rail.is-drag .rcard { pointer-events: none; }
.rcard { flex: 0 0 clamp(248px, 25.5vw, 372px); scroll-snap-align: start; display: block; color: inherit; text-decoration: none; -webkit-user-drag: none; }
.rcard-art { position: relative; aspect-ratio: 4 / 5; display: grid; place-items: center; background: var(--paper-2); overflow: hidden; margin-bottom: 20px; }
.rcard-art svg { width: 44%; color: var(--ink); transition: transform 0.9s var(--ease); }
.rcard-art::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: 50% 100%; transition: transform 0.7s var(--ease); z-index: 0; }
.rcard-art > * { position: relative; z-index: 1; }
.rcard:hover .rcard-art::after { transform: scaleY(1); }
.rcard:hover .rcard-art svg { transform: scale(1.08) rotate(-3deg); }
.rcard-tag { position: absolute !important; top: 0; inset-inline-start: 0; padding: 11px 13px; background: var(--paper); color: var(--ink); }
.rcard-tag b { color: var(--accent-deep); font-weight: 500; margin-inline-end: 8px; }
.rcard h3 { font-weight: 640; font-size: clamp(20px, 1.7vw, 24px); letter-spacing: -0.028em; line-height: 1.1; }
.rcard p { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; max-width: 32ch; }
.rail-bar { position: relative; height: 1px; background: var(--line); margin-top: clamp(36px, 4.4vw, 60px); }
.rail-bar i { position: absolute; top: -1px; inset-inline-start: 0; height: 3px; width: 30%; background: var(--ink); transition: transform 0.25s linear; }
.rail-foot { margin-top: 18px; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 14px 32px; }
.rail-note { color: var(--ink-2); }

/* Accounting */
.acc-grid { align-items: start; row-gap: 48px; }
.acc-side { grid-column: 1 / span 4; position: sticky; top: calc(var(--hdr) + 40px); }
.acc-side--shot { position: static; }   /* with a photograph it is too tall to pin */
.acc-side .tag { margin-bottom: 26px; }
.acc-side .lead { margin-top: 26px; max-width: 34ch; }
.slist { grid-column: 6 / span 7; }
.acc-all { margin-top: 26px; }
.srow { position: relative; }
.srow-in { display: grid; grid-template-columns: 52px minmax(0, 1.05fr) minmax(0, 1fr); column-gap: 20px; align-items: center; padding-block: clamp(22px, 2.3vw, 32px); color: inherit; text-decoration: none; }
a.srow-in { grid-template-columns: 52px minmax(0, 1.05fr) minmax(0, 1fr) 16px; }
.srow:last-child::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: var(--line); }
.srow-t { font-weight: 620; font-size: clamp(20px, 1.8vw, 25px); letter-spacing: -0.028em; line-height: 1.1; transition: transform 0.6s var(--ease); }
.srow p { color: var(--ink-2); font-size: 15.5px; line-height: 1.45; }
.srow-in:hover .srow-t { transform: translateX(8px); }
[dir="rtl"] .srow-in:hover .srow-t { transform: translateX(-8px); }
/* On a part's own page the list is the page, so its rows are larger. */
.slist--wide { grid-column: 1 / -1; }
.slist--wide a.srow-in { grid-template-columns: 72px minmax(0, 0.9fr) minmax(0, 1.1fr) 16px; padding-block: clamp(26px, 3vw, 44px); }
.slist--wide .srow-t { font-size: clamp(25px, 2.9vw, 42px); letter-spacing: -0.036em; line-height: 1; }
.slist--wide .srow p { font-size: clamp(15.5px, 1.2vw, 17.5px); max-width: 44ch; }

/* How it works */
.how-grid { align-items: start; row-gap: 56px; }
.ledger { grid-column: 1 / span 5; }
.ledger-sheet { background: var(--paper-2); padding: clamp(20px, 2.6vw, 38px); aspect-ratio: 4 / 5; display: flex; flex-direction: column; }
.ledger-head { display: flex; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.ledger-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; column-gap: 16px; flex: 1; border-bottom: 1px solid var(--line); }
.ledger-row span { color: var(--ink-2); }
.ledger-row i { height: 7px; width: var(--w); background: var(--ink); opacity: 0.16; transform-origin: 0 50%; }
.ledger-row b, .ledger-total b { font-weight: 500; font-size: 12.5px; letter-spacing: 0.02em; }
.ledger-row b.out { color: var(--accent-deep); }
.ledger-total { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; border-top: 1px solid var(--ink); margin-top: -1px; }
.ledger-total b { font-size: 15px; }
.ledger figcaption { display: flex; justify-content: space-between; margin-top: 14px; color: var(--ink-2); }

.how-main { grid-column: 7 / span 6; }
.how-main .tag { margin-bottom: 26px; }
.how-main .h-lg { max-width: 12ch; }
.plist { margin-top: clamp(40px, 5vw, 76px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.plist li { position: relative; padding-block: 24px clamp(30px, 3.4vw, 46px); }
.plist li::before { background: var(--ink); }
.plist .n { display: block; margin-bottom: 26px; }
.plist h3 { font-weight: 640; font-size: clamp(19px, 1.6vw, 22.5px); letter-spacing: -0.026em; line-height: 1.15; margin-bottom: 10px; }
.plist p { color: var(--ink-2); font-size: 15.5px; max-width: 30ch; }

/* Questions */
.faq-grid { align-items: start; row-gap: 44px; }
.faq-side { grid-column: 1 / span 4; position: sticky; top: calc(var(--hdr) + 40px); }
.faq-side .tag { margin-bottom: 26px; }
.faq-side .lead { margin-top: 24px; max-width: 30ch; }
.faq { grid-column: 6 / span 7; border-top: 1px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; padding: clamp(20px, 2.2vw, 28px) 0; background: none; border: 0; cursor: pointer; text-align: start; font-weight: 620; font-size: clamp(18.5px, 1.65vw, 23px); letter-spacing: -0.026em; line-height: 1.2; }
.faq-ic { position: relative; width: 28px; height: 28px; flex: none; border: 1px solid var(--ink); transition: background-color 0.45s var(--ease), border-color 0.45s var(--ease), transform 0.6s var(--ease); }
.faq-ic::before, .faq-ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -0.75px 0 0 -6px; background: var(--ink); transition: transform 0.6s var(--ease); }
.faq-ic::after { transform: rotate(90deg); }
.faq-q:hover .faq-ic { transform: rotate(90deg); }
.faq-item.is-open .faq-ic { background: var(--accent); border-color: var(--accent); }
.faq-item.is-open .faq-ic::after { transform: rotate(0deg); }
.faq-item.is-open .faq-q:hover .faq-ic { transform: none; }
.faq-a p { color: var(--ink-2); max-width: 56ch; padding-bottom: clamp(22px, 2.4vw, 32px); }
/* Collapsing is animated with a one-row grid, so any answer length works. */
.js .faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.7s var(--ease); }
.js .faq-a > div { min-height: 0; overflow: hidden; opacity: 0; transition: opacity 0.5s ease, visibility 0.7s; visibility: hidden; }
.js .faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.js .faq-item.is-open .faq-a > div { opacity: 1; visibility: visible; }

/* Call to action */
.cta { padding-block: clamp(96px, 13vw, 200px) clamp(72px, 9vw, 140px); }
.cta .tag { margin-bottom: clamp(24px, 3vw, 44px); }
.cta-row { margin-top: clamp(36px, 5vw, 72px); padding-top: clamp(26px, 3vw, 40px); border-top: 1px solid var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 28px 40px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- footer */

.ftr { background: var(--paper-2); padding-block: clamp(56px, 6vw, 88px) 28px; }
.ftr-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 40px; padding-bottom: clamp(48px, 6vw, 88px); }
.ftr-brand p { margin-top: 20px; color: var(--ink-2); max-width: 26ch; }
.ftr-col { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; font-size: 15.5px; }
.ftr-col h2 { font-weight: 500; color: var(--ink-3); margin-bottom: 8px; }
.ftr-col h2 a { font-weight: 500; }
.ftr-col a { position: relative; font-weight: 560; text-decoration: none; }
.ftr-col a::after { content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: 100% 50%; transition: transform 0.5s var(--ease); }
.ftr-col a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.ftr-bot { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--line); color: var(--ink-2); }
.ftr-bot a { text-decoration: none; transition: color 0.3s ease; }
.ftr-bot a:hover { color: var(--ink); }
.langs { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.langs a[aria-current="true"] { color: var(--ink); }

/* ---------------------------------------------------------------- inner pages */

.phero { padding-top: calc(var(--hdr) + clamp(56px, 11vh, 132px)); padding-bottom: clamp(56px, 8vw, 112px); }
.phero .tag { margin-bottom: clamp(22px, 3vh, 36px); }
.phero .h-xl { font-size: clamp(42px, 6.3vw, 94px); max-width: 17ch; }
.phero-row .mono b { color: var(--accent-deep); font-weight: 500; margin-inline-end: 8px; }

.crumbs { display: flex; align-items: center; gap: 10px; margin-bottom: clamp(22px, 3vh, 36px); color: var(--ink-2); }
.crumbs a { color: var(--ink); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 3px; transition: color 0.3s ease; }
.crumbs a:hover { color: var(--accent-deep); }

/* Why it matters: the statement, with its label beside it. */
.why .why-tag { grid-column: 1 / span 3; margin-top: 0.9em; }

/* Previous / next: walk the whole book, topic by topic. */
.pn { border-top: 1px solid var(--line); background: var(--card); }
.pn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pn-a { display: flex; flex-direction: column; gap: 14px; padding-block: clamp(30px, 4vw, 60px); text-decoration: none; min-width: 0; }
.pn-a .mono { color: var(--ink-2); }
.pn-a strong { font-weight: 620; font-size: clamp(22px, 3vw, 44px); letter-spacing: -0.036em; line-height: 1.02; transition: transform 0.6s var(--ease); overflow-wrap: anywhere; }
.pn-next { align-items: flex-end; text-align: end; padding-inline-start: var(--gap); border-inline-start: 1px solid var(--line); }
.pn-a:hover strong { transform: translateX(-8px); }
.pn-next:hover strong { transform: translateX(8px); }

/* Contact */
.phero-row--cta { align-items: center; }
.phero-row--cta .btn { grid-column: 8 / span 5; justify-self: end; }
.crow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 36px; }
.crow li { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 20px; border-top: 1px solid var(--ink); }
.crow .mono { color: var(--ink-2); }
.crow .link { font-size: clamp(19px, 1.9vw, 26px); letter-spacing: -0.025em; }

/* ---------------------------------------------------------------- partners area: one screen */
/* The whole page fits the window: title on one side, access on the other,
   a single line at the foot. Nothing to scroll. */

.one-screen { height: 100svh; overflow: hidden; }
.pone { height: 100svh; padding-top: var(--hdr); display: grid; grid-template-rows: minmax(0, 1fr) auto; }
/* Title and sign-in card sit side by side, centred in the height that is left
   between the header and the foot line, so there is no dead band under the header. */
.pone-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; min-height: 0; padding-block: clamp(14px, 3vh, 40px); }
.pone-copy { grid-column: 1 / span 6; }
.pone-copy .tag { margin-bottom: clamp(14px, 2.6vh, 30px); }
.pone-copy .h-xl { font-size: clamp(40px, min(7vw, 13vh), 112px); }
.pone-copy .lead { margin-top: clamp(14px, 2.8vh, 32px); font-size: clamp(16.5px, 1.45vw, 21px); max-width: 34ch; color: var(--ink); }
.pone-checks { margin-top: clamp(18px, 4vh, 48px); max-width: 460px; }
.pone-checks li { display: flex; align-items: baseline; gap: 14px; padding-block: clamp(9px, 1.5vh, 14px); border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15.5px; }
.pone-checks li:last-child { border-bottom: 1px solid var(--line); }
.pone-checks svg { width: 14px; height: 14px; flex: none; position: relative; top: 2px; color: var(--accent-deep); }
.pone-side { grid-column: 8 / span 5; padding-inline-end: 12px; padding-bottom: 12px; }
.pone-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 28px; padding-block: 18px; border-top: 1px solid var(--line); color: var(--ink-2); }
.pone-foot-links { display: flex; align-items: center; gap: 22px; }
.pone-foot a { color: var(--ink); text-decoration: none; transition: color 0.3s ease; }
.pone-foot a:hover { color: var(--accent-deep); }
/* Only a window too short to hold it is allowed to scroll. */
@media (max-height: 560px), (max-width: 860px) and (max-height: 680px) {
  .one-screen { height: auto; overflow: visible; }
  .pone { height: auto; min-height: 100svh; }
}
.phero-row { margin-top: clamp(32px, 5vw, 64px); padding-top: clamp(24px, 3vw, 36px); border-top: 1px solid var(--ink); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 24px; }
.phero-row .lead { grid-column: 1 / span 6; max-width: 46ch; font-size: clamp(17px, 1.45vw, 21px); }
.phero-row .mono { grid-column: 9 / span 4; color: var(--ink-2); align-self: start; line-height: 1.7; }

/* The sign-in card: a title bar, six boxes for the code, one wide button.
   A block of the accent colour stands just behind it, offset down and across. */
.access { position: relative; isolation: isolate; background: var(--card); border: 1px solid var(--line); }
.access::before { content: ""; position: absolute; inset: 12px -12px -12px 12px; z-index: -1; background: var(--accent); }
.access::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--card); }
.access-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px clamp(18px, 2.5vw, 38px); background: var(--paper-2); border-bottom: 1px solid var(--line); color: var(--ink-2); }
.access-bar span:first-child { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.access-bar svg { color: var(--accent-deep); }
.access-main { padding: clamp(18px, 3.6vh, 40px) clamp(18px, 2.5vw, 38px) clamp(18px, 3.2vh, 36px); }
.access h2 { font-weight: 620; font-size: clamp(24px, 2.7vw, 39px); letter-spacing: -0.042em; line-height: 1.02; }
.access-sub { margin-top: 10px; color: var(--ink-2); font-size: 15.5px; }

.code { display: flex; align-items: center; gap: clamp(6px, 0.7vw, 10px); margin-top: clamp(16px, 3.6vh, 38px); }
.code-box {
  flex: 1; min-width: 0; height: clamp(54px, 9vh, 84px); padding: 0; border: 1px solid var(--ink); border-radius: 0;
  background: var(--card); color: var(--ink); text-align: center; caret-color: var(--accent-deep); outline: none;
  font: 600 clamp(24px, 2.4vw, 34px)/1 var(--sans); font-variant-numeric: tabular-nums;
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.45s var(--ease);
}
.code-box:hover { background: var(--paper); }
.code-box:focus { border-color: var(--accent-deep); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
.code-box.is-set { background: var(--paper); animation: digit-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes digit-in { from { transform: scale(0.9); } }
.code-dash { width: 14px; height: 2px; flex: none; margin-inline: 3px; background: var(--ink); }

/* While the code is being checked a line runs under the boxes. */
.code { position: relative; }
.code::after { content: ""; position: absolute; inset-inline: 0; bottom: -9px; height: 2px; background: var(--accent-deep); transform: scaleX(0); transform-origin: 0 50%; }
.access.is-busy .code::after { animation: checking 1.1s var(--ease) infinite; }
@keyframes checking {
  0% { transform: scaleX(0); transform-origin: 0 50%; }
  55% { transform: scaleX(1); transform-origin: 0 50%; }
  55.01% { transform: scaleX(1); transform-origin: 100% 50%; }
  100% { transform: scaleX(0); transform-origin: 100% 50%; }
}
/* A code that is not recognised: the boxes shake their heads once. */
.access.is-wrong .code { animation: refuse 0.55s var(--ease); }
.access.is-wrong .code-box { border-color: var(--warn); }
@keyframes refuse { 15% { transform: translateX(-8px); } 35% { transform: translateX(7px); } 55% { transform: translateX(-5px); } 75% { transform: translateX(3px); } }
.access-status { min-height: 1.45em; margin-top: clamp(12px, 2vh, 18px); font-size: 14.5px; line-height: 1.45; color: var(--warn); }
.access.is-busy .access-status { color: var(--ink-2); }
/* Without the script the server sends people back to #invalid, which shows this line. */
.access-fallback { display: none; }
.access-fallback:target { display: block; }
.js .access-fallback:target { display: none; }
.access-note { margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }

/* Sign in: the same gesture as the Partners button, at full width. */
.access-submit {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; width: 100%; height: clamp(52px, 7vh, 60px);
  margin-top: clamp(4px, 1vh, 10px); padding-inline: 22px 7px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--ink); font: inherit; font-weight: 600; font-size: 16.5px; letter-spacing: -0.012em;
  transition: color 0.5s var(--ease), transform 0.35s var(--ease), opacity 0.3s ease;
}
.access-submit::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleX(0); transform-origin: 100% 50%; transition: transform 0.75s var(--ease); }
.access-submit-ic { display: grid; place-items: center; width: clamp(38px, 5.2vh, 46px); height: clamp(38px, 5.2vh, 46px); background: var(--ink); color: var(--paper); transition: background-color 0.5s var(--ease), color 0.5s var(--ease); }
.access-submit:hover, .access-submit:focus-visible { color: var(--paper); }
.access-submit:hover::before, .access-submit:focus-visible::before { transform: scaleX(1); }
.access-submit:hover .access-submit-ic, .access-submit:focus-visible .access-submit-ic { background: var(--accent); color: var(--ink); }
.access-submit:hover .arw svg, .access-submit:focus-visible .arw svg { animation: arw-right 0.6s var(--ease); }
.access-submit:active { transform: scale(0.985); }
.access.is-busy .access-submit { pointer-events: none; opacity: 0.6; }
[dir="rtl"] .access-submit::before { transform-origin: 0 50%; }

.access-foot { padding: 15px clamp(18px, 2.5vw, 38px); border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14.5px; }
.access-foot a, .report-help a { color: var(--ink); font-weight: 560; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: color 0.3s ease; }
.access-foot a:hover, .report-help a:hover { color: var(--accent-deep); }
.access-submit-ic > svg { width: 16px; height: 16px; }

/* The signed-in page: the same single screen, with the documents where the code was. */
.pone-out { margin-top: clamp(18px, 4vh, 44px); }
.pone-out button { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 4px 0; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: 15.5px; }
.pone-out button svg { color: var(--accent-deep); }
.pone-out button::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: currentColor; transform-origin: 0 50%; }
.pone-out button:hover::after, .pone-out button:focus-visible::after { animation: line-swap 0.75s var(--ease); }
.pone-out button:hover .lock-shackle, .pone-out button:focus-visible .lock-shackle { transform: translateY(-1px) rotate(13deg); }
.doc { padding: clamp(18px, 3.6vh, 40px) clamp(18px, 2.5vw, 38px) clamp(18px, 3.2vh, 36px); }
.doc + .doc { border-top: 1px solid var(--line); }
.doc-head { display: flex; align-items: flex-start; gap: clamp(14px, 1.6vw, 22px); }
/* A sheet of paper with its corner folded, carrying the kind of file. */
.doc-ic { flex: none; display: grid; place-items: end start; width: 54px; height: 68px; padding: 8px; background: var(--ink); color: var(--paper); clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%); }
.doc-meta { margin-top: 12px; color: var(--ink-2); }
.doc .access-submit { margin-top: clamp(18px, 3.4vh, 32px); text-decoration: none; }
.access-submit:hover .arw--down svg, .access-submit:focus-visible .arw--down svg { animation: arw-down 0.6s var(--ease); }
@keyframes arw-down {
  0% { transform: translateY(0); }
  45% { transform: translateY(110%); }
  45.01% { transform: translateY(-110%); }
  100% { transform: translateY(0); }
}

/* "Something seem off?" — a quiet line at the foot of the page. Its flag waves
   on hover and the underline of "Report it" leaves and comes back. */
.pone-report { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.pone-report svg { flex: none; overflow: visible; color: var(--accent-deep); }
.pone-report-q { color: var(--ink-2); transition: color 0.3s ease; }
.pone-report-a { position: relative; padding-block: 3px; }
.pone-report-a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: currentColor; transform-origin: 0 50%; }
.pone-report:hover .pone-report-q, .pone-report:focus-visible .pone-report-q { color: var(--ink); }
.pone-report:hover .pone-report-a::after, .pone-report:focus-visible .pone-report-a::after { animation: line-swap 0.75s var(--ease); }
.flag-cloth { transform-box: fill-box; transform-origin: 0 50%; }
.pone-report:hover .flag-cloth, .pone-report:focus-visible .flag-cloth,
.report[open] .access-bar .flag-cloth { animation: flag-wave 0.9s var(--ease); }
.report[open] .access-bar .flag-cloth { animation-delay: 0.35s; }
@keyframes flag-wave { 25% { transform: skewY(-13deg) scaleX(0.84); } 55% { transform: skewY(8deg) scaleX(1.05); } 80% { transform: skewY(-3deg); } }

/* The report window. It is built like the sign-in card — title bar, body, one
   wide button, the accent block behind — and rises in over a dimmed page. */
.report {
  width: min(580px, calc(100vw - 28px)); max-width: none; max-height: none; margin: auto; padding: 0 12px 12px 0;
  border: 0; background: none; color: var(--ink); overflow: visible;
}
.report::backdrop { background: rgba(15, 15, 14, 0.58); }
.report-card { position: relative; isolation: isolate; display: flex; flex-direction: column; max-height: calc(100svh - 44px); background: var(--card); }
.report-card::before { content: ""; position: absolute; inset: 12px -12px -12px 12px; z-index: -1; background: var(--accent); }
.report-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--card); }
.report .access-bar { flex: none; }
.report-x {
  display: grid; place-items: center; width: 36px; height: 36px; margin-block: -9px; margin-inline-end: -10px; padding: 0;
  border: 0; background: none; color: var(--ink); cursor: pointer;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}
.report-x svg { color: inherit; transition: transform 0.6s var(--ease); }
.report-x:hover { background: var(--ink); color: var(--paper); }
.report-x:hover svg { transform: rotate(90deg); }
.report-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: clamp(18px, 3.4vh, 34px) clamp(18px, 4vw, 34px) clamp(18px, 3.2vh, 30px); }
.report h2 { font-weight: 620; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.042em; line-height: 1.02; }
.report h2:focus { outline: none; }

/* What it is about: four tiles, one choice. */
.kinds { min-width: 0; margin: clamp(16px, 2.8vh, 26px) 0 0; padding: 0; border: 0; }
.kinds legend, .report-field .mono { display: block; padding: 0; margin-bottom: 10px; color: var(--ink-2); }
.kinds-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kind { position: relative; display: block; }
.kind input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.kind-face {
  display: flex; align-items: center; gap: 11px; height: 100%; min-height: 50px; padding: 9px 13px;
  border: 1px solid var(--line); background: var(--card); font-size: 14.5px; line-height: 1.25;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.kind-face i { width: 10px; height: 10px; flex: none; border: 1px solid var(--ink); transition: background-color 0.3s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.kind:hover .kind-face { background: var(--paper); }
.kind input:checked + .kind-face { border-color: var(--ink); background: var(--paper); }
.kind input:checked + .kind-face i { background: var(--accent); transform: rotate(90deg) scale(1.15); }
.kind input:focus-visible + .kind-face { outline: 2px solid var(--accent-deep); outline-offset: 2px; }

.report-field { display: block; margin-top: clamp(14px, 2.4vh, 22px); }
.report-field textarea {
  display: block; width: 100%; min-height: 84px; padding: 12px 13px; border: 1px solid var(--ink); border-radius: 0;
  background: var(--card); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.45; resize: none; outline: none; caret-color: var(--accent-deep);
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.45s var(--ease);
}
.report-field textarea::placeholder { color: var(--ink-2); opacity: 1; }
.report-field textarea:focus { border-color: var(--accent-deep); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
.report-warn { display: flex; align-items: center; gap: 9px; margin-top: 12px; color: var(--ink-2); font-size: 14px; }
.report-warn i { flex: none; color: var(--accent-deep); }
.report .access-status { margin-top: 10px; }
.report-card.is-busy .access-status { color: var(--ink-2); }
.report-card.is-busy .access-submit { pointer-events: none; opacity: 0.6; }
.report .is-wrong { animation: refuse 0.55s var(--ease); }
.report textarea.is-wrong, .report .is-wrong .kind-face { border-color: var(--warn); }

/* After sending: a tick that draws itself, and what to do next. */
.report-tick { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 22px; background: var(--accent); color: var(--ink); }
.report-tick svg { width: 22px; height: 22px; }
.report-tick path { stroke-dasharray: 17; animation: tick 0.7s var(--ease) 0.35s backwards; }
@keyframes tick { from { stroke-dashoffset: 17; } }
.report-help { margin-top: 14px; color: var(--ink-2); font-size: 14.5px; }
.report-done .access-submit { margin-top: clamp(18px, 3vh, 28px); }

/* In: the page dims, the card rises, the accent block slides out from behind
   it and the contents follow one after another. Out: a short fade. */
.report[open] { animation: report-in 0.75s var(--ease) both; }
.report[open]::backdrop { animation: report-veil 0.5s ease both; }
.report[open] .report-card::before { animation: report-block 0.9s var(--ease) 0.15s both; }
.report[open] .report-body > * { animation: report-rise 0.8s var(--ease) both; animation-delay: calc(0.14s + var(--i, 0) * 0.055s); }
.report.is-closing { animation: report-out 0.3s ease both; }
.report.is-closing::backdrop { animation: report-veil-out 0.3s ease both; }
@keyframes report-in { from { opacity: 0; transform: translateY(26px) scale(0.975); } }
@keyframes report-out { to { opacity: 0; transform: translateY(14px) scale(0.985); } }
@keyframes report-veil { from { opacity: 0; } }
@keyframes report-veil-out { to { opacity: 0; } }
@keyframes report-block { from { transform: translate(-12px, -12px); } }
@keyframes report-rise { from { opacity: 0; transform: translateY(14px); } }

/* Not found */
.nf { min-height: 100svh; display: flex; align-items: center; padding-block: calc(var(--hdr) + 40px) 80px; }
.nf .tag { margin-bottom: 28px; }
.nf .lead { margin-top: 28px; }
.nf .btn { margin-top: 32px; }

/* ---------------------------------------------------------------- motion */
/* Entrances apply only while the script is running (.js); without it the page
   is simply all there. Each element arrives once, when it scrolls into view. */

.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 1.15s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Headlines rise line by line from behind a mask. */
.js [data-lines]:not(.is-split) { visibility: hidden; }
.line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.line > span { display: block; }
.js .line > span { transform: translateY(112%); transition: transform 1.15s var(--ease); transition-delay: calc(var(--d, 0s) + var(--i, 0) * 0.085s); }
.js .is-in .line > span { transform: none; }

/* Hairlines draw across as their row arrives. */
.js .nrow::before, .js .srow::before, .js .plist li::before, .js .figs li::before { transform: scaleX(0); transition: transform 1.3s var(--ease); transition-delay: var(--d, 0s); }
.js .figs li::before { transform-origin: 0 50%; }
.js .nrow.is-in::before, .js .srow.is-in::before, .js .plist li.is-in::before, .js .figs li.is-in::before { transform: scaleX(1); }
[dir="rtl"] .nrow::before, [dir="rtl"] .srow::before, [dir="rtl"] .plist li::before, [dir="rtl"] .figs li::before { transform-origin: 100% 50%; }

/* The statement darkens word by word as it is read down the page. */
.js [data-words] .w { color: var(--ink-faint); transition: color 0.6s ease; }
.js [data-words] .w.on { color: var(--ink); }

/* Header drops in once the page is ready. */
.js .hdr { transform: translateY(-101%); }
.js.is-ready .hdr:not(.is-away) { transform: none; }

/* Hero illustration: the bars grow once their sheet has arrived. */
.js .bars span { transform: scaleY(0); transition: transform 1.1s var(--ease); transition-delay: calc(0.9s + var(--n, 0) * 0.04s); }
.js .sheet.is-in .bars span { transform: none; }

/* The form fills in, field after field. */
.js .formart-field p span { clip-path: inset(0 100% 0 0); transition: clip-path 0.9s var(--ease); transition-delay: calc(0.25s + var(--i) * 0.22s); }
.js .formart-field p::after { content: ""; position: absolute; inset-inline-start: 12px; top: 11px; bottom: 11px; width: 1.5px; background: var(--accent); opacity: 0; }
.js .formart.is-in .formart-field p span { clip-path: inset(0 0 0 0); }
.js .formart.is-in .formart-field p::after { animation: caret 0.9s var(--ease) calc(0.25s + var(--i) * 0.22s) both; }
@keyframes caret { 0% { opacity: 1; transform: translateX(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(160px); } }
.js[dir="rtl"] .formart:not(.is-in) .formart-field p span { clip-path: inset(0 0 0 100%); }

/* The ledger writes itself, row by row. */
.js .ledger-row, .js .ledger-total { opacity: 0; transform: translateY(10px); transition: opacity 0.7s var(--ease), transform 0.9s var(--ease); transition-delay: calc(0.15s + var(--i) * 0.09s); }
.js .ledger-row i { transform: scaleX(0); transition: transform 1.1s var(--ease); transition-delay: calc(0.3s + var(--i) * 0.09s); }
.js .ledger.is-in .ledger-row, .js .ledger.is-in .ledger-total { opacity: 1; transform: none; }
.js .ledger.is-in .ledger-row i { transform: scaleX(1); }

/* A photograph opens like a blind, top to bottom, while the picture inside
   settles from slightly large to its true size; its caption follows. */
.js .shot .shot-in { clip-path: inset(0 0 100% 0); transition: clip-path 1.5s var(--ease); }
.js .shot img { transform: scale(1.14); transition: transform 2.2s var(--ease); }
.js .shot figcaption { opacity: 0; transition: opacity 0.9s ease 0.55s; }
.js .shot.is-in .shot-in { clip-path: inset(0 0 0 0); }
.js .shot.is-in img { transform: none; }
.js .shot.is-in figcaption { opacity: 1; }

/* Moving between pages: the old one fades, the new one rises in. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out 0.35s ease both; }
::view-transition-new(root) { animation: page-in 0.7s var(--ease) both; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(18px); } }

/* Anyone who asks for less motion gets a still page with everything in place. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after, .report::backdrop { animation: none !important; transition: none !important; }
  .js [data-reveal], .js .line > span, .js .hdr, .js .bars span, .js .ledger-row, .js .ledger-total, .js .ledger-row i { opacity: 1 !important; transform: none !important; }
  .js .nrow::before, .js .srow::before, .js .plist li::before, .js .figs li::before { transform: none !important; }
  .js .formart-field p span, .js .shot .shot-in { clip-path: none !important; }
  .js .shot img { transform: none !important; }
  .js .shot figcaption { opacity: 1 !important; }
  .js [data-words] .w { color: var(--ink) !important; }
  @view-transition { navigation: none; }
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .hdr-mail { display: none; }
  .hero-copy { grid-column: 1 / span 8; }
  .hero-art { grid-column: 9 / span 4; }
  .statement-text, .figs { grid-column: 2 / span 11; }
  .nlist { grid-column: 1 / span 12; }
  .formart { grid-column: 1 / span 6; }
  .acc-side { grid-column: 1 / span 5; }
  .slist { grid-column: 6 / span 7; }
  .srow-in { grid-template-columns: 40px minmax(0, 1fr); row-gap: 6px; }
  a.srow-in, .slist--wide a.srow-in { grid-template-columns: 40px minmax(0, 1fr) 16px; row-gap: 6px; }
  .srow p { grid-column: 2; }
  .srow-in .arw { grid-column: 3; grid-row: 1; }
  .menu-side { grid-column: 1 / span 4; }
  .menu-list { grid-column: 6 / span 7; }
  .ftr-top { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ftr-brand { grid-column: 1 / -1; }
  .pone-copy { grid-column: 1 / span 6; }
  .pone-side { grid-column: 7 / span 6; }
}

@media (max-width: 860px) {
  :root { --hdr: 64px; }
  .nav { display: none; }
  .burger { display: block; }
  .pbtn { height: 40px; padding-inline: 13px 4px; gap: 9px; font-size: 14.5px; }
  .pbtn-ic { width: 32px; height: 32px; }

  .hero { min-height: 0; padding-top: calc(var(--hdr) + 44px); padding-bottom: 56px; }
  .hero-grid { row-gap: 56px; }
  .hero-copy { grid-column: 1 / -1; }
  .hero-art { grid-column: 1 / -1; aspect-ratio: 10 / 13.5; max-width: 420px; width: 100%; margin-inline: auto; }

  .sec-head .tag, .sec-head .h-lg { grid-column: 1 / -1; }
  .sec-head .tag { margin-top: 0; }
  .statement-text, .figs { grid-column: 1 / -1; }
  .figs { grid-template-columns: minmax(0, 1fr); }
  .fig-n { margin-bottom: 14px; }
  .nlist { grid-template-columns: minmax(0, 1fr); }
  .formart { grid-column: 1 / -1; }
  .rail-top { padding-inline-start: 0; margin-top: -8px; }
  .rail-nav { display: none; }
  .rcard { flex-basis: min(72vw, 320px); }
  .acc-side, .faq-side { grid-column: 1 / -1; position: static; }
  .slist, .faq { grid-column: 1 / -1; }
  .ledger { grid-column: 1 / -1; max-width: 480px; }
  .how-main { grid-column: 1 / -1; }
  .plist { grid-template-columns: minmax(0, 1fr); }
  .ftr-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phero-row .lead, .phero-row .mono, .phero-row--cta .btn { grid-column: 1 / -1; }
  .phero-row--cta .btn { justify-self: start; }
  .why .why-tag, .why .statement-text { grid-column: 1 / -1; }
  .why .why-tag { margin: 0 0 24px; }
  .crow { grid-template-columns: minmax(0, 1fr); }
  .scrim { display: none; }

  /* Partners on a phone: the same single screen, stacked. */
  .pone-grid { grid-template-columns: minmax(0, 1fr); align-content: center; align-items: start; row-gap: clamp(18px, 3.4vh, 30px); padding-block: 16px; }
  .pone-copy, .pone-side { grid-column: 1 / -1; }
  .pone-copy .tag { margin-bottom: 12px; }
  .pone-copy .h-xl { font-size: clamp(38px, min(12vw, 7vh), 64px); }
  .pone-copy .lead { margin-top: 12px; font-size: 16.5px; max-width: 32ch; }
  .pone-checks { display: none; }
  .pone-side { padding-inline-end: 9px; padding-bottom: 9px; }
  .access::before { inset: 9px -9px -9px 9px; }
  .access-bar span:last-child { display: none; }
  .access-sub { font-size: 15px; }
  .access-foot { font-size: 14px; }
  /* The report line takes a row of its own above the last line. */
  .pone-foot { flex-wrap: wrap; row-gap: 6px; padding-block: 11px; }
  .pone-report { order: -1; flex: 0 0 100%; }
  .report { padding: 0 9px 9px 0; }
  .report-card::before { inset: 9px -9px -9px 9px; }
}

/* A short phone: everything draws in a little so the screen still holds it all. */
@media (max-width: 860px) and (max-height: 800px) {
  .pone-grid { row-gap: 16px; padding-block: 10px; }
  .pone-copy .lead { margin-top: 10px; font-size: 15.5px; }
  .access-main { padding-block: 18px 16px; }
  .code { margin-top: 16px; }
  .code-box { height: 56px; }
  .access-foot { padding-block: 12px; }
}

@media (max-width: 520px) {
  body { font-size: 16.5px; }
  .logo-word { font-size: 16px; }
  .logo-mark { width: 28px; height: 20px; }
  .hdr-in { gap: 12px; }
  .hdr-end { gap: 8px; }
  .btn { height: 52px; }
  .hero-cta { gap: 16px 24px; }
  .cta-row .btn--lg, .phero-row--cta .btn { width: 100%; justify-content: space-between; }
  .pn-a strong { font-size: 20px; }
  .sheet { padding: 13px 14px 15px; }
  .shot--wide .shot-in { aspect-ratio: 3 / 2; }
  .kinds-grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .kind-face { min-height: 44px; }
}
