/* FancyCards design system. One stylesheet for the shell every page shares: tokens, type, buttons, the nav and its
   account menu, forms, the info + login modals and the footer. Pages add only what is theirs, inline.

   The look: warm paper, ink type, one serif with some character for headings (Fraunces) and a plain humanist sans
   for everything else (Instrument Sans). The logo's magenta and marigold are used sparingly, as marks, never as
   washes. Each occasion brings its own colour (its tile, its hero), and the cards themselves carry the rest.
   Page JS and the engine's data-* mounts are untouched by any of this: restyle freely, rename nothing. */

/* The fonts are served from this domain (spec 14), not Google's: its stylesheet blocked the first paint and cost two
   more connections. Latin subset only, the files Google serves for it; licence in /fonts/OFL.txt. A page that paints
   them first preloads them (index.html). */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/fraunces-latin.woff2) format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 400 500; font-display: swap; src: url(/fonts/fraunces-italic-latin.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/instrument-sans-latin.woff2) format('woff2'); }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 500 600; font-display: swap; src: url(/fonts/caveat-latin.woff2) format('woff2'); }

:root {
  --paper: #F8F3EB;
  --paper-2: #F0E8DB;
  --card: #FFFFFF;
  --ink: #211A16;
  --ink-2: #4A403A;
  --muted: #6F645C;
  --line: #E4DACD;
  --line-2: #D3C5B2;
  --magenta: #A81F62;
  --marigold: #E39A12;
  --marigold-soft: #FBE7B5;
  --danger: #B3261E;

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  --font-hand: 'Caveat', 'Segoe Script', cursive;

  --r: 16px;
  --r-sm: 10px;
  --shadow-1: 0 1px 2px rgba(33, 26, 22, .06), 0 10px 26px -14px rgba(33, 26, 22, .22);
  --shadow-2: 0 2px 4px rgba(33, 26, 22, .06), 0 28px 50px -26px rgba(33, 26, 22, .4);
  --nav-h: 68px;

  /* the member modal the engine injects dresses itself from these */
  --auth-modal-bg: var(--paper);
  --auth-modal-text: var(--ink);
  --auth-backdrop: rgba(33, 26, 22, .55);
  --auth-radius: var(--r);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--marigold-soft); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -.022em; color: var(--ink); font-variation-settings: 'SOFT' 50; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.2vw, 48px); }
h2 em, h1 em { font-style: italic; font-weight: 400; color: var(--magenta); }
p { margin: 0; }
.eyebrow { display: block; font: 600 12px/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--magenta); }
.lede { font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 32em; }

/* the two states of the engine, and the small reveal on scroll */
html.is-out .only-in { display: none !important; }
html.is-in .only-out { display: none !important; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal-instant { transition: none !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .reveal { opacity: 1; transform: none; transition: none; } }

/* ===== buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 26px; border: 1.5px solid transparent; border-radius: 999px; font: 600 16px/1 var(--font-body); letter-spacing: .005em; cursor: pointer; white-space: nowrap; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #3B2F28; }
.btn-secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: rgba(33, 26, 22, .06); }
.btn-accent { background: var(--magenta); color: #fff; }
.btn-accent:hover { background: #8E1853; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }

/* ===== nav ===== */
.nav { position: sticky; top: 0; z-index: 60; background: rgba(248, 243, 235, .92); -webkit-backdrop-filter: saturate(1.5) blur(12px); backdrop-filter: saturate(1.5) blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1160px; margin: 0 auto; padding: 0 28px; height: var(--nav-h); display: flex; align-items: center; gap: 36px; }
.nav-logo { flex: none; }
.nav-logo img { height: 38px; width: auto; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font: 500 15px/1 var(--font-body); color: var(--ink-2); white-space: nowrap; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-login { font: 600 15px/1 var(--font-body); color: var(--ink); white-space: nowrap; cursor: pointer; }
.nav-login:hover { color: var(--magenta); }
/* a member's way to the card that was sent to them: in the bar itself, not only inside the avatar menu */
.nav-mycard { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 1.5px solid var(--line-2); border-radius: 999px; font: 600 15px/1 var(--font-body); color: var(--ink); white-space: nowrap; transition: border-color .2s, background .2s; }
.nav-mycard:hover { border-color: var(--ink); background: #fff; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; flex: none; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s ease, opacity .25s ease; }
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
/* the phone menu: a full-screen dark sheet (operator 2026-10-20) with its own logo and close button, big links, and the two
   actions at the foot. The bar's backdrop-filter would trap a fixed child inside the bar, so it is off while the sheet is open,
   and the page behind does not scroll. */
.mobile-panel { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  background-color: var(--ink); background-image: radial-gradient(120% 60% at 100% 0%, rgba(168, 31, 98, .28), transparent 60%), radial-gradient(90% 50% at 0% 100%, rgba(227, 154, 18, .18), transparent 60%);
  color: var(--paper); padding-bottom: env(safe-area-inset-bottom); opacity: 0; visibility: hidden; transform: translateY(-12px); transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .25, 1), visibility 0s linear .3s; }
.mobile-panel.open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .25, 1), visibility 0s; }
/* html.menu-open is set by the menu's own script, never :has(), which an older Android browser lacks (QA 2026-10-27, Vivo) */
html.menu-open { overflow: hidden; }
html.menu-open .nav { -webkit-backdrop-filter: none; backdrop-filter: none; }
.mp-head { flex: none; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid rgba(248, 243, 235, .1); }
.mp-head img { height: 38px; width: auto; }
.mp-close { position: relative; width: 44px; height: 44px; border: 1px solid rgba(248, 243, 235, .22); border-radius: 50%; background: rgba(248, 243, 235, .06); cursor: pointer; }
.mp-close span { position: absolute; left: 13px; right: 13px; top: 21px; height: 2px; border-radius: 2px; background: var(--paper); transform: rotate(45deg); }
.mp-close span + span { transform: rotate(-45deg); }
.mp-close:hover { background: rgba(248, 243, 235, .14); }
.mp-eyebrow { margin: 30px 24px 6px; font: 600 12px/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--marigold); }
.mobile-panel > a:not(.btn) { display: flex; align-items: center; justify-content: space-between; margin: 0 24px; padding: 17px 0; font: 500 28px/1.15 var(--font-display); letter-spacing: -.01em; color: var(--paper); border-bottom: 1px solid rgba(248, 243, 235, .1); }
.mobile-panel > a:not(.btn)::after { content: ""; width: 9px; height: 9px; margin-right: 4px; border: solid rgba(248, 243, 235, .45); border-width: 2px 2px 0 0; transform: rotate(45deg); flex: none; }
.mobile-panel > a:not(.btn):hover, .mobile-panel > a:not(.btn):active { color: #fff; }
.mobile-panel > a[href="/cards"] { color: var(--marigold-soft); }
.mp-foot { margin-top: auto; display: grid; gap: 12px; padding: 28px 24px 30px; }
.mp-foot .btn { width: 100%; min-height: 54px; font-size: 17px; }
.mp-foot .mp-login { background: transparent; border-color: rgba(248, 243, 235, .4); color: var(--paper); }
.mp-foot .mp-login:hover { background: rgba(248, 243, 235, .08); }
@media (prefers-reduced-motion: reduce) { .mobile-panel, .mobile-panel.open { transform: none; transition: none; } }
@media (min-width: 861px) { .mobile-panel { display: none; } }
@media (max-width: 860px) {
  .nav-inner { gap: 12px; padding: 0 20px; }
  .nav-links, .nav-cta .nav-mycard, .nav-cta #navSend { display: none; }
  .nav-right { gap: 4px; }
  .nav-cta { gap: 0; }
  .nav-toggle { display: block; }
  /* signed out, Log in stays one tap away, beside the menu button (QA 2026-10-28); .only-out hides it once signed in */
  .nav-cta .nav-login { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 14px; }
}

/* the category sub-nav: an occasion one tap away, from anywhere */
.subnav { border-top: 1px solid var(--line); }
.subnav-in { max-width: 1160px; margin: 0 auto; padding: 0 20px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.subnav-in::-webkit-scrollbar { display: none; }
.subnav a { position: relative; flex: none; padding: 12px 12px 11px; font: 500 14px/1.2 var(--font-body); color: var(--ink-2); border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.subnav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.subnav .sub-now { display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 50%; background: var(--magenta); vertical-align: 3px; }
@media (min-width: 861px) { .subnav-in { padding: 0 28px; margin-left: auto; margin-right: auto; } }

/* the Notifications bell in the header, beside the avatar. Home: a button that opens a dropdown the ENGINE fills
   ([data-notifications-mount], one per page); /notifications: a plain link. The engine paints the unread count into every
   [data-acct-unread] and shows it only when there is one. */
.nbell { position: relative; display: flex; align-items: center; }
.nbell-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: 2px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; transition: background .15s, color .15s; }
.nbell-btn svg { width: 22px; height: 22px; }
.nbell-btn:hover, .nbell.open .nbell-btn { color: var(--magenta); background: var(--paper-2); }
.nbell-btn [data-acct-unread]:not([hidden]) { position: absolute; top: 1px; right: -4px; display: block; box-sizing: border-box; min-width: 20px; height: 20px; margin: 0; padding: 0 5px; border: 2px solid var(--paper); border-radius: 999px; background: var(--magenta); color: #fff; font: 700 11px/16px var(--font-body); text-align: center; animation: bell-badge 2.4s ease-out 1; }
@keyframes bell-badge { 0% { box-shadow: 0 0 0 0 rgba(168, 31, 98, .5); } 70%, 100% { box-shadow: 0 0 0 9px rgba(168, 31, 98, 0); } }
.nbell-menu { display: none; position: absolute; top: calc(100% + 8px); right: -8px; width: 380px; max-width: calc(100vw - 32px); overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); z-index: 80; text-align: left; transform-origin: 85% 0; }
.nbell.open .nbell-menu { display: block; animation: nbell-in .24s cubic-bezier(.2, .8, .2, 1); }
@keyframes nbell-in { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: none; } }
.nbell-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); font-size: 16px; }
.nbell-mark { padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--magenta); font: 600 13px/1 var(--font-body); cursor: pointer; }
.nbell-mark:hover { background: var(--paper-2); }
.nbell-mark[hidden], .nbell-more[hidden], .nbell-empty[hidden] { display: none; }
.nbell-list { max-height: min(56vh, 380px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.nbell-list[data-notifications-state="loading"] { min-height: 72px; background: linear-gradient(90deg, transparent, rgba(240, 232, 219, .7), transparent) 0 0 / 200% 100%; animation: nbell-shimmer 1.2s linear infinite; }
@keyframes nbell-shimmer { to { background-position: -200% 0; } }
.nbell-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); text-decoration: none; transition: background .15s; }
.nbell-row:hover { background: var(--paper-2); }
.nbell-dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: transparent; }
.nbell-row[data-notification-state="unread"] .nbell-dot { background: var(--magenta); }
.nbell-row[data-notification-state="unread"] { color: var(--ink); font-weight: 600; }
.nbell-txt { display: grid; gap: 3px; min-width: 0; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.nbell-txt [data-notification-date] { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.nbell-empty, .nbell-err { margin: 0; padding: 26px 16px; font-size: 14.5px; color: var(--muted); text-align: center; }
.nbell-err { display: none; }
.nbell-list[data-notifications-state="error"] ~ .nbell-err { display: block; }
.nbell-more { display: block; width: 100%; padding: 12px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink-2); font: 500 14px/1 var(--font-body); cursor: pointer; }
.nbell-more:hover { background: var(--paper-2); }
.nbell-all { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px; background: var(--paper-2); color: var(--magenta); font: 600 14.5px/1 var(--font-body); text-decoration: none; }
.nbell-all:hover { text-decoration: underline; }
.nbell-all [data-acct-unread] { display: none !important; }
@media (max-width: 860px) { .nbell { position: static; } .nbell-menu { left: 16px; right: 16px; top: calc(100% + 6px); width: auto; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .nbell.open .nbell-menu, .nbell-list[data-notifications-state="loading"], .nbell-btn [data-acct-unread]:not([hidden]) { animation: none; } }

/* the signed-in account: an avatar that opens a small menu */
.acct { position: relative; display: flex; align-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; font: 600 15px/1 var(--font-body); flex: none; }
.acct-btn { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px; border: 0; background: none; cursor: pointer; color: var(--ink); }
.acct-btn:hover .avatar, .acct.open .avatar { box-shadow: 0 0 0 3px rgba(168, 31, 98, .22); }
.acct-caret { flex: none; transition: transform .2s; }
.acct.open .acct-caret { transform: rotate(180deg); }
.acct-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 244px; max-width: calc(100vw - 32px); padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-2); z-index: 80; text-align: left; }
.acct.open .acct-menu { display: block; }
.acct-who { margin: 0 0 6px; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.4; color: var(--muted); }
.acct-email { display: block; margin-top: 2px; font-size: 16px; font-weight: 600; color: var(--ink); word-break: break-all; }
.acct-menu a, .acct-menu button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; cursor: pointer; font: 500 16px/1 var(--font-body); text-align: left; color: var(--ink); }
.acct-menu a:hover, .acct-menu button:hover { background: var(--paper-2); }
.acct-menu .acct-out { color: var(--danger); }
.acct-menu .acct-out:hover { background: #FBECEA; }
@media (max-width: 860px) { .acct { position: static; } .acct-menu { right: 16px; top: calc(100% + 6px); width: min(280px, calc(100vw - 32px)); } }

/* ===== forms ===== */
.inp { width: 100%; min-height: 52px; padding: 0 16px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: #fff; color: var(--ink); font: 400 17px/1.4 var(--font-body); outline: none; transition: border-color .2s, box-shadow .2s; }
textarea.inp { padding: 14px 16px; min-height: 120px; resize: vertical; }
.inp:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(33, 26, 22, .1); }
.inp[aria-invalid="true"], .inp.err { border-color: var(--danger); }
label { font: 600 14px/1.3 var(--font-body); color: var(--ink); }

/* ===== modals: about / privacy / terms / log in =====
   A card that slides up and settles (a bottom sheet on a phone), over a backdrop that fades and blurs. Nothing inside scrolls
   sideways or shows a scrollbar: the body scrolls in place, hidden, with a soft fade at the foot while there is more.
   JS adds .open (displayed) and then .show (the slide), and removes them in the other order. */
html.modal-open, html.modal-open body { overflow: hidden; }
.modal-overlay { position: fixed; inset: 0; z-index: 500; display: none; align-items: center; justify-content: center; padding: 20px; overflow: hidden; background: rgba(33, 26, 22, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); transition: background .35s ease, -webkit-backdrop-filter .35s ease, backdrop-filter .35s ease; }
.modal-overlay.open { display: flex; }
.modal-overlay.show { background: rgba(33, 26, 22, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.info-modal { position: relative; width: 100%; max-width: 640px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; overflow: hidden; background: var(--paper); border-radius: 28px; box-shadow: 0 2px 4px rgba(33, 26, 22, .08), 0 40px 90px -20px rgba(33, 26, 22, .55); opacity: 0; transform: translateY(44px) scale(.96); transition: transform .55s cubic-bezier(.2, .9, .25, 1.12), opacity .3s ease; }
.modal-overlay.show .info-modal { opacity: 1; transform: none; }
.info-modal::before { content: ""; position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--magenta), var(--marigold)); }
.info-modal[data-more="true"]::after { content: ""; position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(to top, var(--paper), rgba(248, 243, 235, 0)); pointer-events: none; }
.info-modal-body { flex: 1 1 auto; min-height: 0; padding: 48px 40px 36px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none; }
.info-modal-body::-webkit-scrollbar { display: none; }
.info-modal-close { position: absolute; top: 16px; right: 16px; z-index: 4; width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; transition: transform .3s ease, background .2s ease; }
.info-modal-close:hover { background: var(--paper-2); transform: rotate(90deg); }
.info-modal-tag { display: block; margin-bottom: 12px; font: 600 12px/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--magenta); }
.info-modal-h2 { font-family: var(--font-display); font-weight: 500; font-size: 32px; line-height: 1.1; letter-spacing: -.022em; color: var(--ink); margin-bottom: 6px; }
.info-modal-sub { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.info-modal-divider { height: 1px; background: var(--line); margin-bottom: 22px; }
.info-modal-body h3 { font: 600 16px/1.3 var(--font-body); letter-spacing: 0; color: var(--ink); margin: 24px 0 8px; }
.info-modal-body p, .info-modal-body li { font-size: 15.5px; color: var(--ink-2); line-height: 1.65; overflow-wrap: anywhere; }
.info-modal-body p + p { margin-top: 12px; }
.info-modal-body ul { margin: 0; padding-left: 20px; }
.info-modal-footer { margin-top: 26px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
/* what is inside rises into place one after another once the card has landed */
.modal-overlay.show .info-modal-body > *, .modal-overlay.show [data-login-fields] > * { animation: modal-rise .55s cubic-bezier(.2, .8, .25, 1) both; }
.modal-overlay.show .info-modal-body > :nth-child(1), .modal-overlay.show [data-login-fields] > :nth-child(1) { animation-delay: .14s; }
.modal-overlay.show .info-modal-body > :nth-child(2), .modal-overlay.show [data-login-fields] > :nth-child(2) { animation-delay: .2s; }
.modal-overlay.show .info-modal-body > :nth-child(3), .modal-overlay.show [data-login-fields] > :nth-child(3) { animation-delay: .26s; }
.modal-overlay.show .info-modal-body > :nth-child(4), .modal-overlay.show [data-login-fields] > :nth-child(4) { animation-delay: .32s; }
.modal-overlay.show .info-modal-body > :nth-child(5), .modal-overlay.show [data-login-fields] > :nth-child(5) { animation-delay: .38s; }
.modal-overlay.show .info-modal-body > :nth-child(n+6), .modal-overlay.show [data-login-fields] > :nth-child(n+6) { animation-delay: .44s; }
@keyframes modal-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .info-modal { max-width: none; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 28px 28px 0 0; transform: translateY(100%); opacity: 1; transition: transform .5s cubic-bezier(.2, .9, .25, 1); }
  .info-modal::before { top: 10px; left: 50%; right: auto; width: 44px; height: 5px; margin-left: -22px; border-radius: 5px; background: var(--line-2); }
  .info-modal-body { padding: 44px 22px calc(28px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .info-modal, .info-modal-close { transition-duration: .01ms !important; }
  .modal-overlay.show .info-modal-body > *, .modal-overlay.show [data-login-fields] > * { animation: none; }
}

.login-modal { max-width: 460px; --auth-error: var(--danger); --auth-accent: var(--magenta); --auth-border: var(--line-2); --auth-radius: var(--r-sm); }
.login-modal .info-modal-body { padding: 52px 36px 36px; }
.login-modal .login-intro { font-size: 16px; color: var(--ink-2); line-height: 1.65; margin: 0 0 22px; }
.login-modal .login-field { margin-bottom: 18px; }
.login-modal .login-field label { display: block; margin-bottom: 8px; }
.login-modal .login-field input { width: 100%; min-height: 52px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); padding: 0 16px; font: 400 17px/1.4 var(--font-body); background: #fff; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s; }
.login-modal .login-field input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(33, 26, 22, .1); }
.login-modal .login-field input.err { border-color: var(--danger); }
.login-modal .btn { width: 100%; }
.login-modal .login-note { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 14px 0 0; }
.login-modal .login-note a { color: var(--magenta); font-weight: 600; text-decoration: underline; }
.login-modal .login-sent-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--marigold-soft); color: var(--ink); display: none; align-items: center; justify-content: center; margin: 0 auto 16px; }
#loginForm[data-login-state="received"] .login-sent-ico { display: flex; animation: modal-pop .55s cubic-bezier(.2, .9, .25, 1.3) both; }
@keyframes modal-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.login-modal .login-msg { font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.login-modal .login-msg[data-state="received"] { text-align: center; }
.login-modal .login-msg h3 { font-family: var(--font-display); font-weight: 500; font-size: 28px; letter-spacing: -.02em; color: var(--ink); margin: 0 0 8px; }
.login-modal .login-msg p { margin: 10px 0 0; }
.login-modal .login-msg a { color: var(--magenta); font-weight: 600; text-decoration: underline; }
.login-modal .login-msg [data-login-sent-to] { display: inline-block; max-width: 100%; color: var(--ink); word-break: break-word; }
.login-modal .login-msg [data-login-resend-status] { font-size: 14px; font-weight: 600; color: var(--danger); }
.login-modal .login-msg [data-login-resend-status][data-state="received"] { color: var(--ink); }
.login-modal .login-msg [data-login-resend-status]:empty { display: none; }
.login-modal .login-msg .btn { background: var(--ink); color: var(--paper); }
.login-modal #loginTrial.attn { box-shadow: 0 0 0 3px rgba(168, 31, 98, .4); }
.login-trial { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 22px 0 0; padding: 14px 16px; border-radius: var(--r-sm); background: var(--marigold-soft); }
.login-trial-t { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.login-trial-t b { font-size: 16px; line-height: 1.25; color: var(--ink); }
.login-trial-t span { font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.login-modal .login-trial .btn { width: auto; flex: none; min-height: 42px; padding: 0 18px; font-size: 15px; }
@media (max-width: 420px) { .login-trial { flex-direction: column; align-items: stretch; text-align: center; } .login-trial-t { text-align: center; } .login-modal .login-trial .btn { width: 100%; } }
/* the home page's login modal in two steps (operator 2026-10-20): "join" (what a membership gives, then "Already a member?")
   and "signin" (the engine's form); the modal's data-view says which one shows */
.login-modal[data-view="join"] .signin-step, .login-modal[data-view="signin"] .join-step { display: none; }
.login-modal .join-features { margin: 0 0 24px; padding: 0; border-top: 0; }
.login-modal .join-fine { margin: 10px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.join-member { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 26px -36px -36px; padding: 22px 36px 26px; background: var(--paper-2); border-top: 1px solid var(--line); }
.join-member-t { display: flex; flex-direction: column; gap: 2px; }
.join-member-t b { font-size: 17px; line-height: 1.25; color: var(--ink); }
.join-member-t span { font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.login-modal .join-member .btn { width: auto; flex: none; min-height: 44px; padding: 0 24px; font-size: 15px; }
.login-back { display: inline-flex; align-items: center; gap: 6px; margin: -28px 0 16px; padding: 6px 0; border: 0; background: none; font: 600 14px/1 var(--font-body); color: var(--ink-2); cursor: pointer; }
.login-back svg { width: 16px; height: 16px; }
.login-back:hover { color: var(--ink); }
@media (max-width: 420px) { .join-member { flex-direction: column; align-items: stretch; text-align: center; } .login-modal .join-member .btn { width: 100%; } }

/* ===== footer ===== */
.site-footer { background: var(--ink); color: #D9CFC3; padding: 72px 0 36px; }
.footer-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.footer-brand img { height: 54px; width: auto; }
.footer-brand p { margin-top: 14px; max-width: 24em; font-family: var(--font-display); font-size: 22px; line-height: 1.25; color: #F8F3EB; font-weight: 400; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 30px; max-width: 520px; }
.footer-nav a { font: 500 15px/1.3 var(--font-body); color: #D9CFC3; }
.footer-nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-legal { padding-top: 28px; display: grid; gap: 10px; max-width: 880px; }
.footer-legal p { font-size: 13px; line-height: 1.6; color: #A99E92; }
.footer-fine { margin-top: 24px; font-size: 13px; color: #A99E92; }
