/* Pazirino — an airmail-correspondence system: pale postal paper, navy ink, and a
   genuine red/blue par-avion chevron used as a structural mark (edges, seals,
   postmarks), not a decorative gradient. Flat, hairline-bordered, mostly square
   corners — paper and ledgers, not floating SaaS cards. */

@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Regular.66a52b691738.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Medium.2f2b64f96920.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Bold.3ec9f8d137d5.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Black.d27c22cd97c3.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Lalezar"; src: url("../fonts/Lalezar-Regular.838e11f4b2b1.woff2") format("woff2"); font-weight: 400; font-display: swap; }
/* Markazi Text (Borna Izadpanah, OFL): a Naskh with a letter-writing voice, for
   display headings and the English letter specimen. Variable 400–700. */
@font-face { font-family: "Markazi Text"; src: url("../fonts/MarkaziText-VF.856faf18c273.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --paper: #e9eff7;
  --surface: #ffffff;
  --surface-2: #eef3fb;
  --ink: #16213d;
  --ink-2: #3c4a6b;
  --muted: #64729a;
  --line: #d3dceb;
  --line-strong: #b4c2da;
  --blue: #1f45a0;
  --blue-ink: #17367f;
  --blue-2: #0c2153;
  --night: #0c1a3d;
  --night-line: rgba(255, 255, 255, .14);
  --night-text: #c5d0e8;
  --stamp-1: #1f45a0;
  --stamp-2: #b8322b;
  --stamp-3: #13284f;
  --display: "Markazi Text", "Vazirmatn", serif;
  --blue-wash: #e7edf8;
  --red: #b6362c;
  --red-wash: #f7e7e4;
  --green: #1f7a52;
  --green-wash: #e6f4ec;
  --amber: #8a5f14;
  --amber-wash: #fcf2df;
  --serif: "Iowan Old Style", Charter, Georgia, "Noto Serif", "Times New Roman", serif;
  --sans: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(22, 33, 61, .06);
  --shadow-md: 0 8px 20px -10px rgba(22, 33, 61, .22);
  --shadow-lg: 0 18px 38px -16px rgba(22, 33, 61, .28);
  /* The genuine par-avion chevron: a structural mark (edges, seals, postmark
     rings), used sparingly — never as page-wide decoration. */
  --chevron: repeating-linear-gradient(-45deg, var(--red) 0 9px, var(--surface) 9px 12px, var(--blue) 12px 21px, var(--surface) 21px 24px);
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-ink); }
h1, h2, h3, h4 { line-height: 1.45; margin: 0 0 .5em; font-weight: 800; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); font-weight: 900; line-height: 1.35; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.ltr { direction: ltr; unicode-bidi: isolate; text-align: left; }
bdi { unicode-bidi: isolate; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.stack > * + * { margin-top: 1rem; }

.skip-link { position: absolute; inset-inline-start: 12px; top: -64px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius); text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- header ---------- */
.site-header { background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.3) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header::before { content: ""; display: block; height: 4px; background: var(--chevron); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: "Lalezar", var(--sans); font-size: 1.65rem; color: var(--ink); text-decoration: none; line-height: 1; }
.brand:hover { color: var(--blue); }
.brand-mark { width: 32px; height: 32px; flex: none; object-fit: contain; }
.nav { display: flex; gap: 2px; align-items: center; margin-inline-start: auto; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 7px 12px; border-radius: 6px; font-size: .95rem; font-weight: 500; transition: background-color .15s, color .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.nav a.credit-pill { background: var(--blue-wash); color: var(--blue-ink); font-weight: 700; }
.nav a.nav-cta { color: #fff; background: var(--blue); margin-inline-start: 6px; padding: 7px 16px; }
.nav a.nav-cta:hover { color: #fff; background: var(--blue-ink); }
.nav-sep { width: 1px; height: 22px; background: var(--line); margin-inline: 8px; }
.nav-form { display: inline; margin: 0; }
.nav-toggle { display: none; align-items: center; gap: 6px; margin-inline-start: auto; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; font: inherit; font-size: .95rem; color: var(--ink); cursor: pointer; }
@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); flex-direction: column; align-items: stretch; padding: 8px 20px 18px; }
  .nav.open { display: flex; }
  .nav a { padding: 11px 8px; }
  .nav-sep { width: auto; height: 1px; margin: 8px 0; }
  .nav a.nav-cta { margin: 6px 0 0; text-align: center; justify-content: center; padding: 11px 16px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.4;
  padding: 11px 20px; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(14, 28, 52, .06), 0 6px 16px -6px color-mix(in srgb, var(--blue) 55%, transparent); }
.btn-primary:hover { background: var(--blue-ink); color: #fff; box-shadow: 0 10px 20px -8px color-mix(in srgb, var(--blue) 55%, transparent); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-ink); background: var(--blue-wash); }
.btn-quiet { background: transparent; color: var(--blue); padding-inline: 8px; }
.btn-quiet:hover { background: var(--blue-wash); }
.btn-danger { background: var(--surface); color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, white); }
.btn-sm { padding: 6px 12px; font-size: .9rem; }
.btn-lg { padding: 14px 26px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; transform: none; box-shadow: none; }

/* ---------- forms ---------- */
.field { margin-bottom: 1.15rem; }
.field > label, .label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .97rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; line-height: 1.7;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 5rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
input[dir=ltr] { text-align: left; }
.help { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--red); font-size: .9rem; }
.field.has-error input, .field.has-error textarea { border-color: var(--red); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 14px 5px 12px; background: var(--surface); cursor: pointer; font-weight: 500; font-size: .95rem; margin: 0; user-select: none; transition: border-color .15s, background-color .15s, color .15s; }
.checks label:hover { border-color: var(--blue); }
.checks label:has(input:checked) { border-color: var(--blue); background: var(--blue-wash); color: var(--blue-ink); }
.checks input { accent-color: var(--blue); margin: 0; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
@media (max-width: 560px) { .form-card { padding: 20px 16px; } }

/* ---------- messages ---------- */
.messages { list-style: none; padding: 0; margin: 20px 0 0; }
.msg { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 8px; border: 1px solid; }
.msg-success { background: var(--green-wash); border-color: color-mix(in srgb, var(--green) 30%, white); color: #145c3c; }
.msg-error { background: var(--red-wash); border-color: color-mix(in srgb, var(--red) 30%, white); color: #99231e; }
.msg-warning { background: var(--amber-wash); border-color: color-mix(in srgb, var(--amber) 30%, white); color: #6f480a; }
.msg-info { background: var(--blue-wash); border-color: color-mix(in srgb, var(--blue) 25%, white); color: var(--blue-ink); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 700; line-height: 1.5; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge-funded { background: var(--green-wash); color: var(--green); border-color: transparent; }
.badge-early { background: var(--blue-wash); color: var(--blue-ink); border-color: transparent; }
.badge-inactive { background: var(--amber-wash); color: var(--amber); border-color: transparent; }
.badge-tier1 { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.badge-tier3 { background: var(--green-wash); color: var(--green); border-color: transparent; }
.badge-due { background: var(--red-wash); color: var(--red); border-color: transparent; }

/* ---------- the letter card ---------- */
.letter {
  position: relative; background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--line); padding: 28px 28px 24px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.letter::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--chevron); }
.letter-head { direction: ltr; text-align: left; font-size: .9rem; color: var(--muted); border-bottom: 1px dashed var(--line-strong); padding-bottom: 12px; margin-bottom: 16px; }
.letter-head div { display: flex; gap: 10px; }
.letter-head b { color: var(--ink-2); font-weight: 600; min-width: 58px; font-family: var(--sans); }
.letter-subject { color: var(--ink); font-weight: 600; }
.letter-body { direction: ltr; text-align: left; font-family: var(--serif); font-size: 1.04rem; line-height: 1.7; color: #1f2940; white-space: pre-wrap; }
.letter-body mark { background: none; color: inherit; border-bottom: 2px solid var(--blue); padding-bottom: 1px; }
textarea.letter-edit { direction: ltr; text-align: left; font-family: var(--serif); font-size: 1.02rem; line-height: 1.7; min-height: 22rem; border-style: dashed; }
input.letter-edit-subject { direction: ltr; text-align: left; font-weight: 600; }
.letter-head.has-stamp { padding-right: 64px; }
.stamp { position: absolute; top: 22px; right: 22px; font-size: .75rem; font-weight: 700; color: var(--blue-ink); border: 2px solid var(--blue-ink); border-radius: 6px; padding: 1px 8px; transform: rotate(-4deg); background: #fff; }
@media (max-width: 560px) { .letter { padding: 22px 16px 18px; } }

/* ---------- landing ----------
   One loud thing: the hero specimen, a real dossier sealed in an airmail
   envelope and cancelled with a postmark. Everything around it stays quiet. */
.page-home .wrap { max-width: 1240px; }
.lp-display, .lp-h2 { font-family: var(--display); font-weight: 700; color: var(--ink); text-wrap: balance; }
.lp-h2 { font-size: clamp(2.05rem, 3.4vw, 2.8rem); line-height: 1.32; margin: 0 0 .4em; }
.lp-section { padding-block: 88px; }
@media (max-width: 720px) { .lp-section { padding-block: 60px; } }

/* hero */
.lp-hero { padding-block: 56px 84px; scroll-margin-top: 70px; overflow-x: clip; }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr); gap: 60px; align-items: start; }
.lp-display { font-size: clamp(2.5rem, 4.1vw, 3.6rem); line-height: 1.28; margin: 8px 0 .35em; }
.lp-display .keep { display: inline-block; }
@media (min-width: 720px) { .lp-display .keep { display: block; } }
.lp-lead { font-size: 1.07rem; line-height: 1.95; color: var(--ink-2); max-width: 33em; margin: 0 0 28px; }

.lp-search { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px 18px; box-shadow: 0 1px 0 rgba(14, 26, 54, .03), 0 30px 60px -42px rgba(14, 26, 54, .5); }
.lp-search-label { display: block; font-weight: 700; margin-bottom: 8px; }
.lp-search textarea { font-size: 1.04rem; line-height: 1.8; padding: 11px 14px; min-height: 0; border-radius: 8px; background: #fbfcfe; }
.lp-examples { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 10px 0 18px; font-size: .86rem; color: var(--muted); }
.lp-examples button { font: inherit; color: var(--blue-ink); background: none; border: 0; border-bottom: 1px dashed currentColor; padding: 0; cursor: pointer; line-height: 1.6; }
.lp-examples button:hover { color: var(--blue); border-bottom-style: solid; }
.lp-countries { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.lp-countries legend { font-weight: 700; font-size: .92rem; margin-bottom: 8px; padding: 0; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-chips label { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 4px 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: .92rem; cursor: pointer; user-select: none; transition: border-color .15s, background-color .15s, color .15s; }
.lp-chips input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.lp-chips label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: background-color .15s, border-color .15s; }
.lp-chips label:hover { border-color: var(--blue); }
.lp-chips label:has(input:checked) { border-color: var(--blue); background: var(--blue-wash); color: var(--blue-ink); }
.lp-chips label:has(input:checked)::before { background: var(--blue); border-color: var(--blue); }
.lp-chips label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; }
.lp-more { margin-top: 10px; }
.lp-more summary { width: max-content; cursor: pointer; list-style: none; font-size: .88rem; color: var(--blue); }
.lp-more summary::-webkit-details-marker { display: none; }
.lp-more summary::after { content: " +"; }
.lp-more[open] summary::after { content: " −"; }
.lp-more .lp-chips { margin-top: 10px; }
.lp-search-foot { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; border-top: 1px dashed var(--line-strong); padding-top: 16px; }
.lp-search-foot p { margin: 0; flex: 1 1 13em; font-size: .86rem; color: var(--muted); line-height: 1.7; }

/* hero specimen: a real dossier in an airmail envelope */
.spec { margin: 6px 0 0; }
.spec-envelope { background: var(--chevron); padding: 7px; border-radius: 6px; box-shadow: 0 2px 5px rgba(14, 26, 54, .07), 0 44px 70px -44px rgba(14, 26, 54, .55); }
.spec-paper { position: relative; background: var(--surface); border-radius: 2px; padding: 22px 26px 16px; }
.spec-head { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.spec-rank { font-family: var(--display); font-weight: 700; font-size: 2.3rem; line-height: 1; color: var(--muted); padding-top: 2px; }
.spec-who p { margin: 0; }
.spec-name { font-weight: 800; font-size: 1.12rem; line-height: 1.5; }
.spec-inst { color: var(--ink-2); font-size: .92rem; }
.spec-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px !important; }
.spec-postage { width: 64px; margin-top: 2px; transform: rotate(4deg); filter: drop-shadow(0 1px 1.5px rgba(14, 26, 54, .25)); }
.spec-postage-face {
  --r: 3.5px; --s: 10px;
  display: grid; place-items: center; aspect-ratio: 5 / 6; padding: 8px;
  background: linear-gradient(var(--blue-wash), var(--blue-wash)) content-box, #fff;
  -webkit-mask: linear-gradient(#000 0 0) center / calc(100% - 2 * var(--r)) calc(100% - 2 * var(--r)) no-repeat, radial-gradient(circle, #0000 var(--r), #000 calc(var(--r) + .5px)) calc(var(--s) / -2) calc(var(--s) / -2) / var(--s) var(--s) round;
          mask: linear-gradient(#000 0 0) center / calc(100% - 2 * var(--r)) calc(100% - 2 * var(--r)) no-repeat, radial-gradient(circle, #0000 var(--r), #000 calc(var(--r) + .5px)) calc(var(--s) / -2) calc(var(--s) / -2) / var(--s) var(--s) round;
}
.spec-postage-face img { width: 34px; height: 34px; object-fit: contain; }
.spec-postmark { position: absolute; inset-inline-end: -16px; top: -6px; width: 188px; color: var(--red); opacity: .8; transform: rotate(-8deg); mix-blend-mode: multiply; pointer-events: none; }

.spec-letter { padding-top: 14px; }
.spec-meta { margin: 0 0 12px; display: grid; gap: 2px; font-size: .82rem; line-height: 1.7; color: var(--muted); }
.spec-meta div { display: flex; gap: 10px; align-items: baseline; }
.spec-meta dt { flex: none; width: 50px; }
.spec-meta dd { margin: 0; color: var(--ink-2); }
.spec-meta div:last-child dd { color: var(--ink); font-weight: 700; }
.spec-meta small { margin-left: 8px; font-size: .78rem; color: var(--green); }
.spec-body { border-top: 1px dashed var(--line-strong); padding-top: 14px; font-family: var(--display); font-size: 1.18rem; line-height: 1.5; color: #1b2541; }
.spec-body p { margin: 0 0 .65em; }
.spec-annotated { display: grid; grid-template-columns: minmax(0, 1fr) 8.6rem; gap: 18px; align-items: start; }
.spec-note { margin: 3px 0 0 !important; padding-left: 9px; border-left: 2px solid currentColor; font-family: var(--sans); font-size: .76rem; line-height: 1.75; font-weight: 500; color: var(--red); }
.spec-body mark { background: none; color: inherit; padding: 0; text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-skip-ink: none; }
.spec-body .mk-blue { text-decoration-color: var(--blue); }
.spec-body .mk-red { text-decoration-color: color-mix(in srgb, var(--red) 75%, transparent); text-decoration-thickness: 1.5px; }
.redact { display: inline-block; width: 3.6em; height: .78em; border-radius: 2px; background: var(--ink); opacity: .82; vertical-align: -.02em; }
.spec-meta .redact { width: 4.6em; }
.spec-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.spec-foot b { color: var(--green); font-weight: 900; }
.spec figcaption { margin-top: 14px; font-size: .84rem; color: var(--muted); text-align: center; }

/* the one orchestrated moment: the envelope settles, then the postmark lands */
@media (prefers-reduced-motion: no-preference) {
  .spec-envelope { animation: spec-in .7s cubic-bezier(.2, .7, .2, 1) both; }
  .spec-postmark { animation: postmark .45s cubic-bezier(.3, 1.4, .5, 1) .75s both; }
  @keyframes spec-in { from { opacity: 0; transform: translateY(14px); } }
  @keyframes postmark { from { opacity: 0; transform: rotate(-14deg) scale(1.35); } }
}

@media (max-width: 1080px) {
  .lp-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .lp-hero-text { max-width: 680px; }
  .spec { max-width: 640px; }
}
@media (max-width: 560px) {
  .lp-hero { padding-block: 32px 56px; }
  .lp-search { padding: 16px 14px 14px; }
  .lp-search-foot .btn { width: 100%; }
  .spec-paper { padding: 18px 16px 14px; }
  .spec-head { grid-template-columns: auto minmax(0, 1fr) 70px; }
  .spec-postage { display: none; }
  .spec-postmark { width: 144px; top: -6px; inset-inline-end: -70px; clip-path: inset(0 0 0 48%); }
  .spec-meta small { display: block; margin: 0; white-space: nowrap; }
  .spec-annotated { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .spec-note { margin: -4px 0 14px !important; padding-left: 0; padding-right: 9px; border-left: 0; border-right: 2px solid currentColor; }
  .spec-body { font-size: 1.1rem; }
}

/* how it works, on the night band */
.lp-how { background: var(--night); color: var(--night-text); padding-block: 92px; }
.lp-how .lp-h2 { color: #fff; max-width: 18em; margin-bottom: 48px; }
.lp-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; }
.lp-steps > li { counter-increment: step; display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; border-top: 1px solid var(--night-line); padding-top: 18px; }
.lp-steps > li::before { content: counter(step, persian); font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: #fff; margin-bottom: 14px; }
.lp-steps h3 { color: #fff; font-size: 1.08rem; margin-bottom: .4em; }
.lp-steps > li > p { font-size: .93rem; line-height: 1.85; margin: 0 0 20px; }
.lp-slip { margin: 0; background: #fff; color: var(--ink); border-radius: 6px; padding: 14px 16px; font-size: .9rem; line-height: 1.8; box-shadow: 0 18px 30px -22px rgba(0, 0, 0, .7); }
.lp-slip-input .caret { display: inline-block; width: 2px; height: 1.1em; margin-inline-start: 2px; vertical-align: -.2em; background: var(--blue); }
.lp-slip-queries { list-style: none; font-family: var(--display); font-size: 1.04rem; line-height: 1.45; }
.lp-slip-queries li { padding: 5px 0 5px 22px; position: relative; }
.lp-slip-queries li + li { border-top: 1px dashed var(--line); }
.lp-slip-queries li::before { content: ""; position: absolute; left: 0; top: .72em; width: 9px; height: 9px; border: 1.8px solid var(--muted); border-radius: 50%; }
.lp-slip-queries li::after { content: ""; position: absolute; left: 9px; top: 1.42em; width: 5px; height: 1.8px; background: var(--muted); transform: rotate(45deg); }
.lp-funnel { display: grid; gap: 8px; align-content: start; }
.lp-funnel div { position: relative; padding: 3px 10px; font-size: .86rem; z-index: 0; }
.lp-funnel div::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w); background: var(--blue-wash); border-inline-start: 3px solid var(--blue); border-radius: 2px; z-index: -1; }
.lp-funnel div:last-child::before { background: color-mix(in srgb, var(--blue) 18%, white); }
.lp-funnel b { font-weight: 900; color: var(--blue-ink); }
.lp-slip-send { display: grid; gap: 8px; justify-items: start; align-content: start; }
.lp-fake-btn { display: inline-block; background: var(--blue); color: #fff; font-weight: 700; font-size: .86rem; padding: 6px 14px; border-radius: var(--radius); }
.lp-status { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-sent { background: var(--blue); }
.dot-due { background: var(--red); }
.lp-how-more { margin: 40px 0 0; }
.lp-how-more a { color: #fff; }
@media (max-width: 1000px) { .lp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lp-steps > li:nth-child(n+3) { margin-top: 44px; } }
@media (max-width: 600px) { .lp-how { padding-block: 64px; } .lp-steps { grid-template-columns: minmax(0, 1fr); } .lp-steps > li:nth-child(n+2) { margin-top: 40px; } }

/* split: heading on the start side, content on the end side */
.lp-split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.lp-split-head p { color: var(--ink-2); font-size: 1.02rem; }
@media (min-width: 901px) { .lp-split-head { position: sticky; top: 110px; } }
@media (max-width: 900px) { .lp-split { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* signals: a legend of the exact badges used in the results */
.lp-legend { margin: 0; border-top: 1px solid var(--line-strong); }
.lp-legend > div { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.lp-legend dt { margin: 0; }
.lp-legend dd { margin: 0; color: var(--ink-2); font-size: .96rem; line-height: 1.85; }
.lp-rel { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--ink-2); font-weight: 700; }
.lp-rel .bar { width: 64px; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.lp-rel .bar span { display: block; height: 100%; background: var(--blue); }
@media (max-width: 600px) { .lp-legend > div { grid-template-columns: 1fr; gap: 6px; } }

/* comparison */
.lp-compare-sec { background: var(--surface); border-block: 1px solid var(--line); }
.lp-compare { width: 100%; min-width: 620px; border-collapse: collapse; margin-top: 12px; }
.lp-compare th, .lp-compare td { padding: 16px 18px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.lp-compare thead th { font-size: .92rem; color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--ink); padding-top: 0; }
.lp-compare thead th:last-child { color: var(--blue-ink); }
.lp-compare tbody th { width: 22%; font-weight: 500; color: var(--ink-2); }
.lp-compare td { width: 39%; color: var(--muted); }
.lp-compare td:last-child { color: var(--ink); font-weight: 700; background: color-mix(in srgb, var(--blue-wash) 55%, transparent); }
.lp-compare tbody tr:last-child > * { border-bottom: 0; }
@media (max-width: 640px) {
  .lp-compare { min-width: 0; }
  .lp-compare thead { display: none; }
  .lp-compare, .lp-compare tbody, .lp-compare tr, .lp-compare th, .lp-compare td { display: block; width: auto; }
  .lp-compare tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .lp-compare tbody tr:last-child { border-bottom: 0; }
  .lp-compare th, .lp-compare td, .lp-compare tbody th { border: 0; padding: 2px 0; width: auto; }
  .lp-compare tbody th { color: var(--ink); font-weight: 700; margin-bottom: 4px; }
  .lp-compare td { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 10px; background: none !important; }
  .lp-compare td::before { content: attr(data-label); font-size: .82rem; font-weight: 500; color: var(--muted); padding-top: 2px; }
}
.lp-footnote { margin: 16px 0 0; font-size: .84rem; color: var(--muted); }

/* pricing */
.lp-pricing-head { max-width: 40em; margin-bottom: 40px; }
.lp-pricing-head p { color: var(--ink-2); font-size: 1.02rem; }

/* ---------- pricing: three plain ledger cards; the featured one carries the airmail edge ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; max-width: 1040px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 28px 26px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.plan p { margin: 0; }
.plan.is-featured { border: 2px solid var(--blue); box-shadow: var(--shadow-lg); overflow: hidden; }
.plan.is-featured::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--chevron); }
.plan-ribbon { position: absolute; top: 16px; left: 16px; padding: 2px 12px; border-radius: 999px; background: var(--blue); color: #fff; font-size: .78rem; font-weight: 800; }
.plan-name { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.plan-tag { margin-top: 4px !important; font-size: .88rem; color: var(--muted); line-height: 1.7; min-height: 3.4em; }
.plan-qty { display: flex; align-items: baseline; gap: 8px; color: var(--ink-2); font-weight: 700; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.plan-qty b { font-family: var(--display); font-size: 3.6rem; line-height: 1; font-weight: 700; color: var(--ink); }
.plan.is-featured .plan-qty b { color: var(--blue); }
.plan-price { display: grid; gap: 4px; }
.plan-was { display: flex; align-items: center; gap: 10px; font-size: .95rem; color: var(--muted); }
.plan-was s { text-decoration-thickness: 1.5px; text-decoration-color: var(--red); }
.plan-off { padding: 1px 10px; border-radius: 999px; background: var(--red-wash); color: var(--red); font-size: .8rem; font-weight: 800; }
.plan-now { font-size: 1rem; font-weight: 700; color: var(--ink-2); }
.plan-now b { font-size: 1.9rem; font-weight: 900; color: var(--ink); letter-spacing: -.01em; }
.plan-per { font-size: .88rem; color: var(--green); font-weight: 600; }
.plan .btn { margin-top: auto; }
.plan-feat { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .92rem; color: var(--ink-2); }
.plan-feat li { position: relative; padding-inline-start: 26px; line-height: 1.7; }
.plan-feat li::before { content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%; background: var(--green-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%231f7a52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.pkgs-note { max-width: 46em; margin: 28px 0 0; font-size: .88rem; color: var(--muted); }
@media (max-width: 760px) {
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 420px; margin-inline: auto; gap: 18px; }
  .plan.is-featured { order: -1; }
  .plan-tag { min-height: 0; }
  .pkgs-note { text-align: center; margin-inline: auto; }
}

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq details:first-child { border-top: 1px solid var(--line-strong); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-2); font-weight: 400; font-size: 1.3rem; line-height: 1.4; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

/* closing envelope: the chevron on every edge */
.lp-final { padding-top: 24px; }
.lp-envelope { background: var(--chevron); padding: 9px; border-radius: 8px; }
.lp-envelope-inner { background: var(--surface); border-radius: 3px; padding: 56px 32px 60px; text-align: center; }
.lp-envelope-inner .lp-h2 { max-width: 16em; margin-inline: auto; }
.lp-envelope-inner p { color: var(--ink-2); font-size: 1.04rem; margin: 0 auto 26px; max-width: 32em; }
@media (max-width: 560px) { .lp-envelope-inner { padding: 40px 18px 44px; } }

/* CTA: a paper panel with a stamped edge, the same signature as .letter */
.cta-band {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px 40px;
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-band::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px; background: var(--chevron); }
.cta-band h2 { margin: 0 0 4px; }
.cta-band p { color: var(--ink-2); margin: 0; }

/* ---------- footer ---------- */
.site-footer { margin-top: 88px; padding: 48px 0 40px; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .92rem; }
.page-home .site-footer { margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-brand .brand { font-size: 1.45rem; margin-bottom: 12px; }
.footer-brand p { margin: 0 0 6px; max-width: 26em; line-height: 1.85; }
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-col h2 { font-family: var(--sans); font-size: .9rem; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--blue); }
.site-footer .brand { color: var(--ink); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

.table-scroll { overflow-x: auto; }

/* ---------- app ---------- */
.page { padding-block: 40px 24px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1, .page-title { font-family: var(--display); font-weight: 700; font-size: clamp(1.95rem, 3.2vw, 2.55rem); line-height: 1.3; margin: 0; text-wrap: balance; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 44em; }
.page-head .actions { flex: none; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; font-size: .86rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: var(--line-strong); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px 26px; box-shadow: 0 1px 2px rgba(14, 26, 54, .04); }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 1.08rem; font-weight: 800; margin-bottom: .75em; }
.panel h3 { font-size: 1rem; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }
@media (max-width: 560px) { .panel { padding: 18px 16px; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stats > div { padding: 20px 22px; border-inline-start: 1px solid var(--line); }
.stats > div:first-child { border-inline-start: 0; }
.stats .num { font-family: var(--display); font-size: 2.6rem; font-weight: 700; line-height: 1.1; color: var(--ink); }
.stats .num.is-due { color: var(--red); }
.stats .lbl { color: var(--muted); font-size: .9rem; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } .stats > div:nth-child(3) { border-inline-start: 0; } .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); } }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list-link { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; text-decoration: none; color: var(--ink); align-items: center; }
.list-link:hover .t { color: var(--blue); }
.list-link .t { font-weight: 700; }
.list-link .m { color: var(--muted); font-size: .88rem; }

/* progress: the bar fills with the airmail chevron */
.progress { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .6s ease; }
.working .progress > span { background: var(--chevron); background-size: 34px 34px; }
.working { text-align: center; padding: 44px 20px 36px; }
.working-stage { margin: 16px 0 0; font-weight: 700; font-size: 1.05rem; }
.working .progress { max-width: 440px; margin: 16px auto 10px; }
.working-note { color: var(--muted); font-size: .88rem; max-width: 34em; margin: 0 auto; }
.spinner { width: 46px; height: 46px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--blue-wash); border-top-color: var(--blue); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { to { background-position: 34px 0; } }
@media (prefers-reduced-motion: no-preference) { .working .progress > span { animation: slide 1.2s linear infinite; } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .progress > span { transition: none; } }

/* search form (logged-in) */
.search-card { max-width: 760px; }
.search-card textarea { font-size: 1.04rem; line-height: 1.85; }
.search-card .lp-chips { margin-top: 4px; }
.search-tip { margin: 6px 0 18px; padding: 12px 14px; border-radius: 8px; background: var(--surface-2); font-size: .9rem; color: var(--ink-2); }
.search-tip b { color: var(--ink); }

/* results */
.query-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 18px; font-size: .88rem; color: var(--muted); }
.query-line .q { font-family: var(--display); font-size: 1.02rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 10px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 6px; align-items: center; margin-bottom: 16px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.filters .lbl { color: var(--muted); font-size: .86rem; margin-inline: 6px 2px; }
.filters .lbl:first-child { margin-inline-start: 0; }
.chip { display: inline-block; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: .86rem; transition: border-color .15s, background-color .15s, color .15s; }
.chip:hover { border-color: var(--blue); color: var(--blue-ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.results-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); margin: 0 0 10px; }

.results { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.result { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); align-items: start; transition: background-color .15s; }
.result:last-child { border-bottom: 0; }
.result:hover { background: color-mix(in srgb, var(--surface-2) 60%, white); }
.result .rank { font-family: var(--display); font-weight: 700; font-size: 1.9rem; line-height: 1; color: var(--line-strong); padding-top: 2px; }
.result .name { font-weight: 800; font-size: 1.08rem; line-height: 1.5; }
.result .name a { color: var(--ink); text-decoration: none; }
.result .name a:hover { color: var(--blue); }
.result .name .masked { color: var(--ink); direction: ltr; unicode-bidi: isolate; }
.result .inst { color: var(--ink-2); font-size: .94rem; }
.result .why { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.result .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.result .act { text-align: end; min-width: 170px; display: grid; gap: 10px; justify-items: end; }
.relevance { display: flex; align-items: center; gap: 8px; justify-content: flex-end; font-size: .84rem; color: var(--ink-2); font-weight: 700; }
.relevance .bar { width: 72px; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.relevance .bar span { display: block; height: 100%; background: var(--blue); }
.result.is-unlocked { background: color-mix(in srgb, var(--blue-wash) 55%, white); box-shadow: inset -3px 0 0 var(--blue); }
.result .act form { margin: 0; }
@media (max-width: 680px) {
  .result { grid-template-columns: 32px minmax(0, 1fr); padding: 16px 14px; gap: 12px; }
  .result .rank { font-size: 1.5rem; }
  .result .act { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; min-width: 0; }
  .relevance { justify-content: flex-start; }
}
.results-note { margin-top: 14px; font-size: .84rem; color: var(--muted); }

/* signup prompt shown to anonymous visitors over the list */
.gate { display: flex; gap: 18px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; padding: 18px 22px; border-radius: 10px; color: #fff; background: var(--night); }
.gate p { margin: 0; color: var(--night-text); max-width: 46em; }
.gate strong { color: #fff; display: block; font-size: 1.05rem; margin-bottom: 2px; }
.gate .btn-primary { background: #fff; color: var(--ink); box-shadow: none; }
.gate .btn-primary:hover { background: var(--blue-wash); color: var(--ink); }

/* dossier */
.dossier-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: end; margin-bottom: 26px; }
.dossier-head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 3.4vw, 2.7rem); line-height: 1.25; margin: 0; direction: ltr; text-align: end; }
.dossier-head .inst { margin: 4px 0 0; color: var(--ink-2); font-size: 1.02rem; }
.dossier-head .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
@media (max-width: 720px) { .dossier-head { grid-template-columns: 1fr; } .dossier-head h1 { text-align: start; } }
.dossier-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 22px; align-items: start; }
.dossier-grid > div > * + * { margin-top: 18px; }
@media (max-width: 980px) { .dossier-grid { grid-template-columns: minmax(0, 1fr); } .dossier-letter { order: -1; } }
@media (min-width: 981px) { .dossier-letter { position: sticky; top: 92px; } }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 4px 0 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.facts div { padding: 12px 14px; border-inline-start: 1px solid var(--line); }
.facts div:first-child { border-inline-start: 0; }
.facts b { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 700; line-height: 1.1; color: var(--ink); }
.facts span { font-size: .8rem; color: var(--muted); }
.paper { padding: 14px 0; border-bottom: 1px solid var(--line); }
.paper:last-child { border-bottom: 0; padding-bottom: 0; }
.paper .pt { direction: ltr; text-align: left; font-family: var(--display); font-size: 1.16rem; line-height: 1.4; color: var(--ink); text-decoration: none; display: block; }
.paper .pt:hover { color: var(--blue); }
.paper .pm { direction: ltr; text-align: left; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.paper details { margin-top: 6px; }
.paper summary { cursor: pointer; color: var(--blue); font-size: .85rem; }
.paper .abs { direction: ltr; text-align: left; font-family: var(--display); font-size: 1.04rem; color: var(--ink-2); line-height: 1.55; margin-top: 6px; }
.email-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.email-box code { direction: ltr; unicode-bidi: isolate; font-size: 1.02rem; font-weight: 700; color: var(--ink); font-family: var(--sans); flex: 1; }
.source-note { margin: 8px 0 0; font-size: .84rem; color: var(--muted); }
.source-note b { color: var(--green); font-weight: 700; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grant { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.grant:last-child { border-bottom: 0; }
.grant .gt { direction: ltr; text-align: left; font-size: .95rem; }
.angles { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.angles li { padding: 10px 14px; border-radius: 8px; background: var(--surface-2); font-size: .94rem; line-height: 1.8; }
.letter-tools { margin-top: 14px; }
.letter-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; font-size: .86rem; color: var(--muted); }
.score { font-weight: 700; color: var(--green); }
.score.is-low { color: var(--amber); }

/* the letter: an airmail envelope, the same object as the home specimen */
.letter { position: relative; border: 7px solid transparent; border-radius: 8px; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--chevron) border-box; padding: 22px 26px 24px; box-shadow: 0 30px 50px -40px rgba(14, 26, 54, .5); }
.letter-head { direction: ltr; text-align: left; font-size: .86rem; color: var(--muted); border-bottom: 1px dashed var(--line-strong); padding-bottom: 12px; margin-bottom: 16px; display: grid; gap: 2px; }
.letter-head div { display: flex; gap: 10px; }
.letter-head b { color: var(--muted); font-weight: 500; min-width: 58px; font-family: var(--sans); }
.letter-head span { color: var(--ink-2); }
.letter-subject { color: var(--ink) !important; font-weight: 700; }
.letter-body { direction: ltr; text-align: left; font-family: var(--display); font-size: 1.2rem; line-height: 1.55; color: #1b2541; white-space: pre-wrap; }
.letter-body mark { background: none; color: inherit; text-decoration: underline 2px var(--blue); text-underline-offset: 4px; }
textarea.letter-edit { direction: ltr; text-align: left; font-family: var(--display); font-size: 1.15rem; line-height: 1.55; min-height: 24rem; }
input.letter-edit-subject { direction: ltr; text-align: left; font-weight: 600; }
.letter-head.has-stamp { padding-right: 64px; }
.stamp { position: absolute; top: 22px; right: 22px; font-size: .75rem; font-weight: 700; color: var(--blue-ink); border: 2px solid var(--blue-ink); border-radius: 6px; padding: 1px 8px; transform: rotate(-4deg); background: #fff; }
@media (max-width: 560px) { .letter { padding: 18px 14px 18px; border-width: 5px; } .letter-body { font-size: 1.1rem; } }

/* tracker / tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: start; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: .82rem; color: var(--muted); font-weight: 700; background: var(--surface-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 50%, white); }
.tbl select { padding: 5px 10px; font-size: .88rem; width: auto; border-radius: 6px; }
.tbl .who a { font-weight: 700; color: var(--ink); text-decoration: none; }
.tbl .who a:hover { color: var(--blue); }
.tbl code { font-family: var(--sans); }
.num-cell { font-weight: 700; font-variant-numeric: tabular-nums; }
.pos { color: var(--green); }
@media (max-width: 760px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .tbl td { border: 0; padding: 3px 0; }
  .tbl td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .82rem; }
}

.empty { text-align: center; padding: 52px 20px; color: var(--ink-2); }
.empty h2 { font-family: var(--display); font-size: 1.7rem; font-weight: 700; }
.empty p { max-width: 34em; margin-inline: auto; }
.empty-mark { width: 64px; height: 44px; margin: 0 auto 18px; border: 5px solid transparent; border-radius: 6px; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--chevron) border-box; }

/* auth: one card with an airmail edge, plus what you get */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 380px); gap: 56px; justify-content: center; align-items: center; padding-block: 56px 24px; }
.auth-wrap.solo { grid-template-columns: minmax(0, 460px); }
.auth { width: 100%; }
.auth h1 { font-family: var(--display); font-weight: 700; font-size: 2.3rem; line-height: 1.3; margin-bottom: .2em; }
.auth > p { color: var(--ink-2); }
.auth .form-card { position: relative; overflow: hidden; margin-top: 20px; padding-top: 32px; }
.auth .form-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--chevron); }
.auth-alt { margin-top: 18px; color: var(--ink-2); }
.auth-aside { padding: 28px 30px; border-radius: 10px; background: var(--night); color: var(--night-text); }
.auth-aside h2 { font-family: var(--display); color: #fff; font-size: 1.7rem; font-weight: 700; margin-bottom: .6em; }
.auth-aside ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-aside li { position: relative; padding-inline-start: 22px; line-height: 1.8; font-size: .95rem; }
.auth-aside li::before { content: ""; position: absolute; inset-inline-start: 0; top: .65em; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.auth-aside li b { color: #fff; }
.code-input { text-align: center; letter-spacing: .5em; font-size: 1.5rem !important; font-weight: 700; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; } .auth-aside { order: 2; } }

/* checkout */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 22px; align-items: start; }
@media (max-width: 820px) { .checkout-grid { grid-template-columns: minmax(0, 1fr); } }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; margin-top: 14px; border-top: 1px dashed var(--line-strong); font-weight: 700; }
.summary-total b { font-family: var(--display); font-size: 1.9rem; }
.pay-option + .pay-option { margin-top: 14px; }
.pay-option h3 { margin-bottom: .3em; }
.card-number { font-family: var(--sans); font-size: 1.35rem; font-weight: 900; direction: ltr; unicode-bidi: isolate; letter-spacing: .04em; }
.result-card { max-width: 620px; margin-inline: auto; text-align: center; padding: 44px 32px; }
.result-card h1 { font-family: var(--display); font-weight: 700; font-size: 2.1rem; }
.status-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-inline-end: 8px; }
.st-paid { color: var(--green); } .st-review { color: var(--amber); } .st-failed, .st-rejected { color: var(--red); } .st-pending { color: var(--muted); }

/* article */
.article { max-width: 720px; margin-inline: auto; font-size: 1.04rem; line-height: 2; }
.article h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.3; text-wrap: balance; }
.article h2 { font-family: var(--display); font-weight: 700; margin-top: 1.7em; font-size: 1.85rem; line-height: 1.35; }
.article h3 { margin-top: 1.4em; font-size: 1.12rem; }
.article .meta { color: var(--muted); font-size: .9rem; margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.article ul, .article ol { padding-inline-start: 1.4em; }
.article li { margin-bottom: .45em; }
.article blockquote { margin: 1.4em 0; padding: 6px 20px; border-inline-start: 4px solid var(--red); color: var(--ink-2); background: var(--surface); border-radius: 0 8px 8px 0; }
.article .letter { margin: 1.6em 0; line-height: 1.5; }
.article table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; line-height: 1.75; background: var(--surface); }
.article th, .article td { text-align: start; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.article th { background: var(--surface-2); }
.article .lead-answer { font-size: 1.12rem; color: var(--ink); padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--blue); border-radius: 8px; }
.article-cta { margin-top: 48px; }
.toc { margin: 0 0 28px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; }
.toc b { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; padding-inline-start: 1.3em; }
.toc li { margin-bottom: 2px; }
.related { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.related li { margin: 0 !important; border-bottom: 1px solid var(--line); }
.related a { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.7; }
.related a:hover { color: var(--blue); }
.article ol:not(.crumbs), .toc ol { list-style-type: persian; }
.related-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; }
.related-cols a { font-size: .95rem; }
@media (max-width: 720px) { .related-cols { grid-template-columns: minmax(0, 1fr); } }
.lp-guides { padding-top: 0; }

/* blog index */
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; padding: 22px 0; text-decoration: none; color: var(--ink); }
.post-list h3 { font-family: var(--display); font-weight: 700; font-size: 1.55rem; line-height: 1.4; margin: 0; transition: color .15s; }
.post-list a:hover h3 { color: var(--blue); }
.post-list p { grid-column: 1; margin: 0; color: var(--ink-2); font-size: .95rem; }
.post-list .pm { grid-row: 1 / span 2; grid-column: 2; align-self: start; color: var(--muted); font-size: .85rem; white-space: nowrap; padding-top: 8px; }
@media (max-width: 640px) { .post-list a { grid-template-columns: 1fr; } .post-list .pm { grid-row: auto; grid-column: 1; padding: 0; } }

.post-group + .post-group { margin-top: 44px; }
.post-group-title { font-size: .95rem; font-weight: 700; color: var(--blue); margin: 0 0 10px; letter-spacing: 0; }
.article .meta a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.article .meta a:hover { color: var(--blue); }

.prose-legal h2 { font-size: 1.45rem; margin-top: 1.5em; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.copy-ok { color: var(--green); font-size: .88rem; margin-inline-start: 6px; }
.notice { background: var(--amber-wash); border: 1px solid color-mix(in srgb, var(--amber) 22%, white); border-radius: 8px; padding: 12px 16px; color: #6f480a; }
.notice a { color: inherit; font-weight: 700; }

/* email check tool */
.score-dial { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.score-ring { --v: 0; --c: var(--green); width: 92px; height: 92px; border-radius: 50%; flex: none; display: grid; place-items: center; background: radial-gradient(closest-side, var(--surface) 78%, transparent 79%), conic-gradient(var(--c) calc(var(--v) * 1%), var(--line) 0); }
.score-ring b { font-family: var(--display); font-size: 2.2rem; font-weight: 700; color: var(--c); line-height: 1; }
.issue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.issue-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-size: .94rem; line-height: 1.8; }
.issue-list.good li { background: var(--green-wash); }
.sev { font-size: .74rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.sev-high { background: var(--red-wash); color: var(--red); }
.sev-medium { background: var(--amber-wash); color: var(--amber); }
.sev-low { background: var(--surface); color: var(--muted); }
.sev-good { background: #fff; color: var(--green); }

/* glossary of funders */
.funder-country { padding: 22px 0; border-bottom: 1px solid var(--line); }
.funder-country h2 { margin-top: 0 !important; }
.funder-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.funder-tags li { margin: 0 !important; direction: ltr; font-size: .86rem; line-height: 1.6; padding: 2px 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.article-cover { margin: 0 0 28px; }
.article-cover img, .article img { max-width: 100%; height: auto; border-radius: 10px; }
.article figure { margin: 1.4em 0; }
.article figcaption { font-size: .88rem; color: var(--muted); text-align: center; margin-top: 6px; }
.letter-body p { margin: 0 0 1em; }
.letter-body p:last-child { margin-bottom: 0; }

/* staff stats */
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 18px; }
.seg a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: .88rem; background: var(--surface); }
.seg a[aria-current] { background: var(--blue); border-color: var(--blue); color: #fff; }
.online-now { margin-inline-start: auto; font-size: .9rem; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.online-now i { width: 9px; height: 9px; border-radius: 50%; background: #2e9d57; box-shadow: 0 0 0 3px rgba(46, 157, 87, .2); }
.verdict { border-inline-start: 5px solid var(--amber); }
.verdict-good { border-inline-start-color: #2e9d57; }
.verdict-bad { border-inline-start-color: var(--red); }
.meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.meters span { display: block; font-size: .85rem; color: var(--muted); }
.meter { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--blue); }
.funnel .bar { height: 6px; background: var(--surface-2); border-radius: 999px; margin-top: 6px; overflow: hidden; }
.funnel .bar i { display: block; height: 100%; background: var(--blue); }
.depth { display: inline-block; min-width: 2.6em; font-size: .8rem; color: var(--muted); }
@media (max-width: 720px) { .meters { grid-template-columns: 1fr; } .online-now { margin-inline-start: 0; width: 100%; } }

/* support chat bubble (bottom right) */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 60; font-size: .95rem; }
.chat-fab { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-lg); transition: transform .15s; }
.chat-fab:hover { transform: scale(1.06); }
.chat-fab:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 40%, transparent); outline-offset: 3px; }
.chat-badge { position: absolute; top: -2px; left: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.chat-panel { position: absolute; right: 0; bottom: 72px; width: min(370px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 110px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.chat-panel[hidden], .chat-badge[hidden] { display: none; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--blue); color: #fff; }
.chat-head b { display: block; }
.chat-head span { font-size: .82rem; opacity: .85; }
.chat-close { border: 0; background: transparent; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.chat-body:empty { display: none; }
.chat-msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; line-height: 1.7; }
.chat-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg time { display: block; font-size: .72rem; opacity: .65; margin-top: 2px; }
.chat-msg.from-me { align-self: flex-start; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.from-staff { align-self: flex-end; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-note { margin: 0; font-size: .82rem; color: var(--muted); text-align: center; }
.chat-note.is-error { color: var(--red); }
.chat-start { display: grid; gap: 8px; padding: 14px 16px 16px; }
.chat-start[hidden], .chat-send[hidden] { display: none; }
.chat-start input, .chat-start textarea, .chat-send textarea { width: 100%; font: inherit; }
.chat-hint { margin: 0; font-size: .84rem; color: var(--ink-2); }
.chat-error { margin: 0; color: var(--red); font-size: .85rem; }
.chat-send { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-send textarea { resize: none; max-height: 120px; min-height: 42px; }
@media (max-width: 520px) { .chat { right: 14px; bottom: 14px; } .chat-fab { width: 54px; height: 54px; } }
@media print { .chat { display: none; } }
