/* =========================================================================
   Intuitio — design tokens: "Daily Paper" (October 2026 redesign, shared
   with the apps - see the workspace's claude/technical-design.md and the
   design canvas). A morning edition: cream paper, ink, hairline rules,
   double rules between sections, one orange accent for the main action and
   for numbers, blue for "confirmed" (right answers, mutual matches).
   Older names are kept so existing rules keep working:
   --signal and --reward = the accent, --resonance = the confirmed blue.
   ========================================================================= */
:root {
  --bg: #F4EFE6;            /* paper */
  --bg-raised: #FBF8F2;
  --bg-card: #FBF8F2;
  --field-bg: #FBF8F2;
  --tint: #EBE4D8;          /* selected rows, crowd-split boxes */
  --tint-accent: #F7E3D7;
  --overlay: rgba(22, 19, 15, 0.55);
  --hairline: #D6CCBD;      /* rules */
  --ink: #16130F;
  --ink-dim: #3F3830;
  --ink-faint: #5E554A;

  --accent: #C2410C;
  --accent-dark: #9A3412;
  --correct: #1F4E9C;

  --signal: var(--accent);
  --signal-dim: #E4A585;
  --resonance: var(--correct);
  --resonance-dim: #9DB3D9;
  --reward: var(--accent);
  --reward-dim: #E4A585;

  --danger: #B42318;

  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-body: 'Public Sans', ui-sans-serif, system-ui, sans-serif;
  /* Small labels: letter-spaced caps in the body face, as in the app. */
  --font-mono: 'Public Sans', ui-sans-serif, system-ui, sans-serif;

  --radius-sm: 4px;
  --radius-md: 4px;
  --radius-lg: 4px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}


a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--ink-dim); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------------------------------------------------------------------- */
/* Layout shell */
/* ---------------------------------------------------------------------- */
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  border-bottom: 3px double var(--ink);
  margin-bottom: 28px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.topnav { display: flex; align-items: center; gap: 28px; }
.nav-link {
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--ink-dim);
  background: none;
  border: none;
  font-family: var(--font-body);
  cursor: pointer;
  padding: 0;
}
.nav-link:hover { color: var(--ink); }
.nav-link--cta {
  color: #fff;
  background: var(--accent);
  padding: 9px 18px;
  border-radius: 4px;
  font-weight: 700;
}
.nav-link--cta:hover { background: var(--accent-dark); color: #fff; }
.inline-form { display: inline; }

main { position: relative; z-index: 1; }

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding: 24px clamp(20px, 5vw, 64px) 60px;
  margin-top: 40px;
  border-top: 3px double var(--ink);
  font-size: 0.8rem;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}
.site-footer > span:first-child { font-weight: 700; color: var(--ink); letter-spacing: 0.04em; }

/* ---------------------------------------------------------------------- */
/* Messages */
/* ---------------------------------------------------------------------- */
.messages { max-width: 480px; margin: 0 auto 24px; padding: 0 20px; }
.message {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 10px;
  border: 1px solid var(--hairline);
}
.message--error { border-color: var(--danger); color: var(--danger); }
.message--success { border-color: var(--correct); color: var(--correct); }

/* ---------------------------------------------------------------------- */
/* Landing */
/* ---------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  padding: 40px clamp(20px, 5vw, 64px) 100px;
  max-width: 1320px;
  margin: 0 auto;
}
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-bottom: 40px; }
}

.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  line-height: 1.03;
  max-width: 12ch;
}
.hero h1 em { color: var(--accent); font-style: italic; }

.hero-sub { font-size: 1.08rem; max-width: 46ch; margin-bottom: 2em; }


.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.96rem;
  padding: 13px 26px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.35s var(--ease), background 0.25s, border-color 0.25s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.how-it-works {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px clamp(20px, 5vw, 64px) 120px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 880px) { .how-it-works { grid-template-columns: 1fr; } }

.how-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 28px;
  background: var(--bg-card);
}
.how-num { display: block; font-family: var(--font-display); font-weight: 900; font-size: 2.4rem; line-height: 1; color: var(--accent); margin-bottom: 14px; }
.hero h1 { font-weight: 900; }
.hero-note { font-size: 0.85rem; color: var(--ink-faint); margin-top: 18px; }
.hero-sample {
  background: var(--bg-card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 22px;
  transform: rotate(-1.2deg);
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
}
.hero-sample-title { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; line-height: 1.2; color: var(--ink); margin: 8px 0 14px; }
.hero-sample .today-option { display: flex; align-items: center; justify-content: center; cursor: default; }
.hero-sample-note { font-size: 0.75rem; color: var(--ink-faint); margin: 12px 0 0; }
.landing-also h2 { margin-bottom: 28px; }
.landing-also-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; margin-bottom: 32px; }
@media (max-width: 880px) { .landing-also-grid { grid-template-columns: 1fr; } }
.how-card .tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 14px;
}
.how-card h3 { font-size: 1.2rem; margin-bottom: 0.4em; }
.how-card p { font-size: 0.93rem; margin: 0; }

.section-band {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 64px) 120px;
  text-align: center;
}
.section-band h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); max-width: 20ch; margin: 0 auto 16px; }
.section-band .hero-sub { margin: 0 auto 2em; text-align: center; }

/* ---------------------------------------------------------------------- */
/* Auth forms */
/* ---------------------------------------------------------------------- */
.auth-shell {
  max-width: 420px;
  margin: 60px auto 120px;
  padding: 0 20px;
}
.auth-card {
  border: 1px solid var(--hairline);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
}
.auth-card h1 { font-size: 1.8rem; }
.auth-card .hero-sub { font-size: 0.95rem; margin-bottom: 1.6em; }

/* Inline registration-time phone verification (2026-09-15) - see
   templates/register.html and the registration-OTP section of
   release-status-and-decisions.md. Boxed like a nested card within
   .auth-card, neutral border (this isn't a giveaway surface, so no gold
   accent) since it replaces the primary submit action while active. */
.register-otp-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.register-otp-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.register-otp-card p { font-size: 0.85rem; color: var(--ink-dim, var(--ink-faint)); margin: 0 0 16px; line-height: 1.5; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 0.98rem;
  font-family: var(--font-body);
}
.field input:focus { border-color: var(--signal); outline: none; }
.field-hint { font-size: 0.78rem; color: var(--ink-faint); margin-top: 6px; }
.field--checkbox { margin-bottom: 20px; }
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--ink-dim, var(--ink-faint));
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; }
.checkbox-row a { color: var(--signal); }

.auth-switch { text-align: center; margin-top: 22px; font-size: 0.88rem; color: var(--ink-faint); }
.auth-switch a { color: var(--signal); text-decoration: none; }

/* Store links on the registration page (2026-09-30) - for anyone who
   followed a shared "join me" link (see app/welcome.tsx / vault.tsx's
   share buttons in intuitio-mobile-prod) and would rather install the app
   than finish registering here on the web. Purely informational - it
   doesn't touch the registration flow itself. */
.auth-app-links {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  text-align: center;
}
.auth-app-links-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}
.auth-app-links-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.auth-app-link {
  display: inline-block;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 9px 16px;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.auth-app-link:hover { border-color: var(--signal); color: var(--signal); }

/* ---------------------------------------------------------------------- */
/* App shell (dashboard, picker, matches) */
/* ---------------------------------------------------------------------- */
.app-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px clamp(20px, 5vw, 64px) 100px;
}
.app-head { margin-bottom: 32px; padding-bottom: 14px; border-bottom: 3px double var(--ink); }
.app-head h1 { font-size: clamp(2.2rem, 5vw, 2.8rem); font-weight: 900; line-height: 1.02; margin-bottom: 0; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 44px; }

.stat-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  background: var(--bg-card);
}
.stat-card .stat-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; }
.stat-card .stat-value { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; margin-top: 6px; }
.stat-card .stat-value small { font-size: 1rem; color: var(--ink-faint); font-family: var(--font-mono); }

/* "Daily Spark" content strip - replaces the cash giveaway banner
   (disabled 2026-10-06 after an App Store rejection over the giveaway's
   contact-collection; see the project doc). Populated by main.js's
   loadDailySpark(), which cycles locally through an already-fetched
   batch from GET /api/content/feed/ - the fade is pure CSS so switching
   cards can never stutter regardless of how slow the self-hosted model
   behind that endpoint is. The sponsor slot (when configured) rotates in
   as just another card rather than its own separate panel. */

.panel-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; }
@media (max-width: 880px) { .panel-grid { grid-template-columns: 1fr; } }

.panel {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--bg-card);
}
.panel h2 { font-size: 1.3rem; margin-bottom: 4px; }
.panel .panel-sub { font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 20px; }

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.92rem;
}
.list-row:last-child { border-bottom: none; }
.list-row .name { font-weight: 500; }
.list-row .sub { color: var(--ink-faint); font-size: 0.8rem; font-family: var(--font-mono); }

.pill {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--hairline);
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pill--live { color: var(--signal); border-color: var(--signal-dim); }
.pill--match { color: var(--resonance); border-color: var(--resonance-dim); }
.pill--entangled { color: var(--reward); border-color: var(--reward-dim); }
.pill--harmonic { color: var(--signal); border-color: var(--signal-dim); }
.pill--danger { color: var(--danger); border-color: var(--danger); }

.empty-state {
  padding: 30px 10px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.9rem;
}


/* Phone number input: country code select + national number, used on
   register, login, and add-contact */
.phone-row { display: flex; gap: 8px; }
.phone-row select {
  flex: 0 0 128px;
  min-width: 0;
  max-width: 128px;
  background: var(--field-bg);
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 13px 10px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235E554A' stroke-width='1.4' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 26px;
}
.phone-row select:focus { border-color: var(--signal); outline: none; }
.phone-row input {
  flex: 1 1 0%;
  min-width: 0;
  background: var(--field-bg);
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 0.98rem;
  font-family: var(--font-body);
}
.phone-row input:focus { border-color: var(--signal); outline: none; }

/* Add contact form */
.contact-add { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.contact-add select {
  flex: 0 0 90px;
  min-width: 0;
  max-width: 90px;
  background: var(--field-bg);
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 11px 8px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235E554A' stroke-width='1.4' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 22px;
}
.contact-add select:focus { border-color: var(--signal); outline: none; }
.contact-add input {
  flex: 1 1 0%;
  min-width: 0;
  background: var(--field-bg);
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font-body);
}
.contact-add input:focus { border-color: var(--signal); outline: none; }

/* ---------------------------------------------------------------------- */
/* Emotion picker */
/* ---------------------------------------------------------------------- */
.picker-shell { max-width: 720px; }
.picker-intro { margin: -12px 0 28px; }


.emotion-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 26px; }
@media (max-width: 480px) { .emotion-grid { grid-template-columns: 1fr; } }

.emotion-btn {
  text-align: left;
  border: 1px solid var(--hairline);
  background: var(--bg-card);
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.25s, transform 0.25s var(--ease), background 0.25s;
}
.emotion-btn:hover { transform: translateY(-2px); border-color: var(--signal-dim); }
.emotion-btn.is-selected { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.emotion-btn.is-selected .desc { color: var(--hairline); }
.emotion-btn .label { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.emotion-btn .desc { display: block; font-size: 0.78rem; color: var(--ink-faint); margin-top: 3px; }

.contact-select { width: 100%; background: var(--field-bg); border: 1px solid var(--hairline); color: var(--ink); border-radius: var(--radius-sm); padding: 13px 14px; font-family: var(--font-body); font-size: 0.96rem; margin-bottom: 20px; }
.contact-select:focus { border-color: var(--signal); outline: none; }
.contact-select:disabled { opacity: 0.5; cursor: not-allowed; }

.contact-picker { position: relative; margin-bottom: 20px; }
.contact-picker .contact-select { margin-bottom: 0; }
.contact-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(22, 19, 15, 0.14);
  z-index: 30;
}
.contact-results.is-open { display: block; }
.contact-result {
  padding: 11px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--hairline);
}
.contact-result:last-child { border-bottom: none; }
.contact-result:hover, .contact-result.is-active { background: var(--tint); }
.contact-result .sub { font-size: 0.76rem; color: var(--ink-faint); font-family: var(--font-mono); margin-top: 2px; }
.contact-result--empty { color: var(--ink-faint); cursor: default; }
.contact-result--empty:hover { background: none; }

.send-status { margin-top: 16px; font-size: 0.88rem; min-height: 1.4em; }
.send-status.is-error { color: var(--danger); }
.send-status.is-ok { color: var(--correct); }

/* ---------------------------------------------------------------------- */
/* Matches */
/* ---------------------------------------------------------------------- */
.match-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  background: var(--bg-card);
  margin-bottom: 14px;
}
.match-card .who { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin-top: 2px; }
.match-card .match-card-badges { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.match-card .match-card-subnote { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); }
.match-card .emotions { display: flex; align-items: center; gap: 18px; margin-top: 8px; font-size: 0.85rem; color: var(--ink-dim); }
.match-card .emotions span { display: flex; flex-direction: column; gap: 2px; }
.match-card .emotions b { color: var(--resonance); font-weight: 500; }
.match-card .emotions small { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-faint); }
.match-card .emotions .match-arrow {
  display: block;
  font-size: 1.3rem;
  color: var(--signal);
  line-height: 1;
  cursor: default;
}
.match-card .when { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); text-align: right; line-height: 1.6; }
.match-card .match-card-nudge { margin-top: 12px; font-size: 0.85rem; color: var(--reward); }

/* Match reveal overlay */
.match-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 19, 15, 0.97);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}
.match-overlay.is-visible { opacity: 1; pointer-events: auto; }
.match-overlay-inner { text-align: center; max-width: 420px; padding: 20px; }
/* The match pop-up is a dark "Special edition" page, as in the app. */
.match-overlay-kicker { display: block; padding: 8px 0; margin-bottom: 18px; border-top: 3px double var(--bg); border-bottom: 1px solid #5E554A; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #F4A27A; }
.match-overlay h2 { font-size: clamp(3rem, 9vw, 4.4rem); font-weight: 900; line-height: 0.95; color: var(--bg); }
.match-overlay p { color: #D6CCBD; font-family: var(--font-display); font-style: italic; font-size: 1.15rem; }
.match-overlay .btn--ghost { border-color: var(--bg); color: var(--bg); }
.match-overlay .btn--ghost:hover { background: var(--bg); color: var(--ink); }
.match-overlay .btn { margin: 8px 6px 0; }

/* ---------------------------------------------------------------------- */
/* AI-curated post-match exchange (mirrors the mobile app's exchange
   screen - see static/js/main.js's initExchange) */
/* ---------------------------------------------------------------------- */
.app-shell--narrow { max-width: 640px; }
.exchange-back {
  display: inline-block;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 24px;
}
.exchange-back:hover { color: var(--ink); }

.exchange-locked-card {
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 24px;
}
.exchange-locked-card h2 { font-size: 1.3rem; color: var(--bg); margin: 0 0 6px; }
.exchange-locked-card p { color: #D6CCBD; margin: 0; line-height: 1.5; }

.exchange-history { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.exchange-history-row {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  max-width: 85%;
}
.exchange-history-row--mine { align-self: flex-end; border-color: var(--signal-dim); }
.exchange-history-row--theirs { align-self: flex-start; }
.exchange-history-meta { font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-faint); margin-bottom: 3px; }
.exchange-history-label { color: var(--ink); font-size: 0.95rem; }

.exchange-options-section { margin-top: 12px; }
.exchange-options-heading { color: var(--ink-dim); font-size: 0.85rem; margin: 0 0 12px; }
.exchange-options-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.exchange-option-chip {
  border: 1px solid var(--hairline);
  background: var(--bg-card);
  color: var(--ink);
  border-radius: 4px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s var(--ease), opacity 0.15s var(--ease);
}
.exchange-option-chip:hover:not(:disabled) { background: var(--tint); }
.exchange-option-chip:disabled { opacity: 0.55; cursor: default; }
.exchange-option-chip--activity { border-color: var(--resonance-dim); }
.exchange-option-chip--agree { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.exchange-option-chip--agree:hover:not(:disabled) { background: var(--accent-dark); opacity: 1; }

.exchange-show-more {
  display: inline-block;
  margin-top: 14px;
  background: none;
  border: none;
  color: var(--signal);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
}

.exchange-waiting { color: var(--ink-faint); font-style: italic; font-size: 0.9rem; margin-top: 10px; }
.exchange-fallback { color: var(--ink-faint); font-size: 0.8rem; margin-top: 28px; line-height: 1.5; }
.exchange-turn-count { color: var(--ink-faint); font-size: 0.7rem; text-align: right; margin-top: 24px; }

.match-card-exchange-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--signal);
  font-size: 0.85rem;
  text-decoration: none;
}
.match-card-exchange-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------- */
/* Welcome / signup-number reveal */
/* ---------------------------------------------------------------------- */
.welcome-shell {
  max-width: 560px;
  margin: 50px auto 100px;
  padding: 0 20px;
}
.welcome-card {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
}
.welcome-card h1 { font-size: clamp(2.6rem, 8vw, 3.6rem); font-weight: 900; line-height: 0.98; color: var(--bg); margin-bottom: 24px; }
.welcome-kicker {
  display: block;
  padding: 8px 0;
  margin-bottom: 24px;
  border-top: 3px double var(--bg);
  border-bottom: 1px solid #5E554A;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #F4A27A;
}
.welcome-member { padding: 16px 0; border-top: 1px solid #5E554A; border-bottom: 1px solid #5E554A; }
.welcome-member .eyebrow { color: #B9AFA2; }
.welcome-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3.4rem;
  line-height: 1.1;
  color: #F4A27A;
  letter-spacing: -0.02em;
}
.welcome-copy { font-size: 0.95rem; margin: 4px 0 0; color: #D6CCBD; }
.welcome-pitch { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; line-height: 1.4; color: #D6CCBD; margin: 22px 0 0; }
.welcome-card .invite-box { border-top-color: #5E554A; }
.welcome-card .invite-label { color: #B9AFA2; }
.welcome-card .invite-row input { background: #2A2622; border-color: #5E554A; color: var(--bg); }
.welcome-card .btn--ghost { border-color: var(--bg); color: var(--bg); }
.welcome-card .btn--ghost:hover { background: var(--bg); color: var(--ink); }
.welcome-card .copy-status { color: #F4A27A; }
.welcome-cta { margin-top: 28px; }

.invite-box {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  text-align: left;
}
.invite-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.invite-row { display: flex; gap: 10px; }
.invite-row input {
  flex: 1;
  min-width: 0;
  background: var(--field-bg);
  border: 1px solid var(--hairline);
  color: var(--ink-dim);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.copy-status { font-size: 0.82rem; color: var(--reward); margin-top: 10px; min-height: 1.3em; }

/* ---------------------------------------------------------------------- */
/* Support / FAQ */
/* ---------------------------------------------------------------------- */
.support-hero { padding-bottom: 8px; }
.support-hero h2 { margin: 0 auto 14px; }
.support-legal { padding-top: 8px; }
.legal-address {
  max-width: 340px;
  margin: 0 auto;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--ink-faint);
}
.legal-address strong {
  display: block;
  color: var(--ink);
  font-family: inherit;
  margin-bottom: 4px;
}
.faq-section { max-width: 720px; margin: 0 auto; padding: 20px clamp(20px, 5vw, 64px) 60px; position: relative; z-index: 1; }
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 4px 22px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--ink-faint);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease);
}
.faq-item[open] summary::after { content: "–"; color: var(--signal); }
.faq-item p { padding-bottom: 20px; margin: -6px 0 0; font-size: 0.94rem; }
.support-contact { padding-top: 8px; }
.footer-link { color: var(--ink-faint); text-decoration: none; }

/* ---------------------------------------------------------------------- */
/* Intuitio Developers (ID) marketplace - directory + own dashboard */
/* ---------------------------------------------------------------------- */
.app-subhead { color: var(--ink-dim); font-size: 0.95rem; max-width: 60ch; margin-top: 8px; line-height: 1.5; }
.app-head--tight { margin-bottom: 18px; }
.app-head--tight h2 { font-size: 1.3rem; margin: 0; }

.id-directory-toolbar { margin-bottom: 18px; }
.id-search-input {
  width: 100%;
  max-width: 420px;
  background: var(--field-bg);
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.id-dashboard-link {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--signal);
  font-size: 0.85rem;
  text-decoration: none;
}
.id-dashboard-link:hover { text-decoration: underline; }

/* Shown instead of .id-dashboard-link once the viewer already has an ID
   profile. Colors match the existing .pill--match/.pill--harmonic used
   for this same active/pending distinction on id_dashboard.html: ember
   (--resonance) for active/live, violet (--signal) for lapsed/pending -
   kept consistent rather than introducing a third color for the same
   status. */
.app-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.app-head-row .app-head { margin-bottom: 0; flex: 1 1 320px; }

.id-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.id-badge:hover { transform: translateY(-1px); }

.id-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.id-badge--live {
  border: 1px solid var(--resonance-dim);
  background: var(--tint-accent);
  color: var(--resonance);
}
.id-badge--live:hover { border-color: var(--resonance); }
.id-badge--live .id-badge-dot {
  background: var(--resonance);
  box-shadow: 0 0 0 3px var(--tint-accent);
}

.id-badge--lapsed {
  border: 1px solid var(--signal-dim);
  background: var(--tint);
  color: var(--signal);
}
.id-badge--lapsed:hover { border-color: var(--signal); }
.id-badge--lapsed .id-badge-dot {
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--tint);
}

.id-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  background: var(--bg-card);
  margin-bottom: 14px;
}
.id-card-name { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.id-card-skill { color: var(--ink-dim); font-size: 0.9rem; margin: 8px 0 16px; line-height: 1.5; }

.id-inquiry-modal {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.id-inquiry-modal[hidden] {
  display: none;
}
.id-inquiry-modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
}
.id-inquiry-modal-card h2 { font-size: 1.15rem; margin: 0 0 16px; }
.id-inquiry-textarea {
  width: 100%;
  min-height: 110px;
  background: var(--field-bg);
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  resize: vertical;
}
.id-inquiry-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.id-profile-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.id-profile-textarea {
  width: 100%;
  min-height: 130px;
  background: var(--field-bg);
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}
.id-profile-status { font-size: 0.88rem; color: var(--ink-dim); }

.id-payment-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 16px 0 40px;
}
.id-payment-note { color: var(--ink-dim); font-size: 0.9rem; margin-bottom: 14px; }

.id-inquiry-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.id-inquiry-card-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.id-inquiry-card-phone { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); }
.id-inquiry-card-message { color: var(--ink-dim); font-size: 0.9rem; margin: 0; line-height: 1.5; }
.footer-link:hover { color: var(--signal); }

/* =========================================================================
   Today (Daily Predictions) - templates/today.html, today_history.html.
   As in the app: your chosen answer is solid ink, numbers and the
   intuition score use the orange accent, right answers the confirmed blue.
   ========================================================================= */
.page-today .dim { color: var(--ink-faint); }
.stat-value--reward { color: var(--reward); }
.today-stat-row--four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .today-stat-row--four { grid-template-columns: repeat(2, 1fr); } }

.today-next-lock { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-dim); margin: 28px 0 14px; }
.today-next-lock span { color: var(--reward); }
.today-events { display: flex; flex-direction: column; gap: 18px; }
.today-event { scroll-margin-top: 90px; }
.today-kicker { display: flex; align-items: baseline; gap: 12px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.today-num { font-family: var(--font-display); font-weight: 900; font-size: 2rem; color: var(--accent); letter-spacing: 0; }
.today-title { font-family: var(--font-display); font-size: 1.5rem !important; font-weight: 700; line-height: 1.25; margin: 8px 0 12px !important; }
.today-details { margin-bottom: 16px; color: var(--ink-dim); font-size: 0.9rem; }
.today-details summary { cursor: pointer; color: var(--ink-faint); font-family: var(--font-mono); font-size: 0.75rem; }
.today-details p { margin: 8px 0 0; line-height: 1.5; }

.today-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.today-option {
  min-height: 52px; padding: 10px 14px; border-radius: var(--radius-md);
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font: 700 1rem var(--font-body); cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.today-option:hover:not(:disabled) { background: var(--tint); }
.today-option--other { grid-column: 1 / -1; min-height: 44px; font-weight: 500; }
.today-option.is-mine { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.today-option:disabled { cursor: default; opacity: 0.55; }
.today-option.is-mine:disabled { opacity: 1; }

.today-crowd { margin-top: 18px; padding: 16px; border-radius: var(--radius-md); background: var(--tint); }
.today-crowd-head { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); margin-bottom: 10px; }
.today-crowd-row { display: grid; grid-template-columns: minmax(0, 9rem) 1fr 3rem; gap: 10px; align-items: center; font-size: 0.85rem; margin-top: 6px; }
.today-crowd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-crowd-bar { height: 10px; border-radius: 0; background: var(--hairline); overflow: hidden; }
.today-crowd-bar span { display: block; height: 100%; background: #7A7064; border-radius: 0; }
.today-crowd-row.is-mine .today-crowd-bar span { background: var(--accent); }
.today-crowd-pct { text-align: right; font-family: var(--font-mono); color: var(--ink-dim); }

.today-note { margin: 16px 0 0; }
.today-note input { width: 100%; }
.today-hint, .today-mynote { margin: 12px 0 0; font-size: 0.85rem; }
.today-footnote { font-size: 0.85rem; margin: 14px 0 32px; }

.today-results { margin-top: 18px; }
.today-results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.today-pill--correct { color: var(--correct); border-color: var(--correct); }
.today-pill--wrong { color: var(--ink-dim); }
.today-pill--void, .today-pill--pending, .today-pill--not_played { color: var(--ink-faint); }

.today-also { margin-top: 36px; }
.today-also-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

.today-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.today-cell { display: inline-flex; align-items: center; justify-content: center; aspect-ratio: 1; min-width: 14px; border-radius: 3px; font: 700 0.75rem var(--font-mono); color: #fff; }
.today-cell--r0 { background: #E6DED1; color: var(--ink); }
.today-cell--r1 { background: #F2B58F; color: var(--ink); }
.today-cell--r2 { background: #DE7A45; }
.today-cell--r3 { background: var(--accent); }
.today-cell--missed { background: transparent; border: 1.5px dashed #B9AFA2; }
.today-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 0.78rem; }
.today-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.today-legend .today-cell { width: 14px; height: 14px; }

/* Small screens. The top menu (now with Today) no longer fits beside the
   wordmark on a phone: it moves to its own row and scrolls sideways. */
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; row-gap: 12px; }
  .topnav { width: 100%; gap: 20px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav .nav-link { white-space: nowrap; }

  /* Stats stay on one row (as in the app), and the crowd bars get a
     full-width line of their own. */
  .stat-row { gap: 10px; margin-bottom: 28px; }
  .stat-row:not(.today-stat-row--four) { grid-template-columns: repeat(3, 1fr); }
  .stat-card { padding: 12px; }
  .stat-card .stat-label { font-size: 0.6rem; letter-spacing: 0.04em; line-height: 1.3; display: block; }
  .stat-card .stat-value { font-size: 1.6rem; }
  .today-crowd-row { grid-template-columns: 1fr 3rem; row-gap: 4px; }
  .today-crowd-bar { grid-column: 1 / -1; grid-row: 2; }
}

/* --- Read me (prototype) - templates/read_*.html ------------------------- */
.read-lede { margin: 10px 0 0; color: var(--ink-dim); max-width: 52ch; }
.read-card { margin-bottom: 18px; }
.read-kicker { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
.read-question { font-family: var(--font-display); font-size: 1.6rem !important; font-weight: 700; line-height: 1.22; margin: 10px 0 18px !important; }
.read-prompt { font-weight: 700; margin: 6px 0 10px; }
.read-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.read-option { min-height: 56px; }
.read-mine { font-size: 1.05rem; margin: 0 0 6px; }
.read-share { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.read-share h3 { margin: 0 0 4px; }
.read-share-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 12px; }
.read-link { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1.5px solid var(--hairline); border-radius: var(--radius-md); background: var(--field-bg); font: 0.9rem var(--font-mono); color: var(--ink-dim); }
.read-list { list-style: none; padding: 0; margin: 10px 0 0; }
.read-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--hairline); flex-wrap: wrap; }
.read-row:first-child { border-top: none; }
.read-row--past { flex-direction: column; align-items: flex-start; gap: 2px; }
.read-name { font-weight: 700; }
.read-said { color: var(--ink-faint); font-size: 0.9rem; flex: 1 1 auto; }
.read-mark { width: 26px; height: 26px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; border: 1.5px solid currentColor; flex-shrink: 0; }
.read-mark.is-right { color: var(--correct); }
.read-mark.is-wrong { color: var(--accent); }
.read-rank { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; color: var(--accent); width: 26px; }
.read-hide { background: none; border: none; color: var(--ink-faint); font-size: 0.8rem; text-decoration: underline; cursor: pointer; padding: 4px; }
.read-empty { font-family: var(--font-display); font-style: italic; color: var(--ink-dim); margin: 6px 0 0; }
.read-verdict { font-family: var(--font-display); font-size: 2rem !important; font-weight: 900; margin: 10px 0 8px !important; }
.read-reveal.is-right .read-verdict { color: var(--correct); }
.read-reveal.is-wrong .read-verdict { color: var(--accent); }
.read-tally { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--hairline); color: var(--ink-dim); }
.read-cta { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.read-cta h2 { color: var(--bg); font-family: var(--font-display); font-size: 1.6rem !important; }
.read-cta p { color: #D9D2C5; }
.read-cta .field-hint, .read-cta a:not(.btn) { color: #D9D2C5; }
.read-cta-alt { text-align: center; margin-top: 10px; }
.read-headline { font-size: 1.1rem; }
.read-headline strong { font-family: var(--font-display); font-size: 2.4rem; color: var(--accent); margin-right: 6px; }
.read-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.read-table th, .read-table td { text-align: left; padding: 8px 0; border-top: 1px solid var(--hairline); font-size: 0.92rem; }
.read-table th { font-weight: 500; color: var(--ink-faint); width: 55%; }
@media (max-width: 480px) { .read-options { grid-template-columns: 1fr; } }

/* Spark ticker (Today, Vault and Read me pages) - the app's sideways-scrolling strip; see main.js initSparkTicker. */
.spark-ticker { display: flex; align-items: stretch; height: 44px; background: var(--ink); color: var(--bg); border-radius: var(--radius-sm, 4px); overflow: hidden; margin-bottom: 22px; }
.spark-ticker[hidden] { display: none; }
.spark-ticker-badge { flex-shrink: 0; display: flex; align-items: center; gap: 5px; padding: 0 12px; background: var(--accent); color: #fff; font: 700 0.7rem var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; }
.spark-ticker-window { flex: 1; overflow: hidden; display: flex; align-items: center; }
.spark-ticker-track { display: flex; width: max-content; }
.spark-ticker-track.is-moving { animation: spark-ticker-move linear infinite; }
.spark-ticker:hover .spark-ticker-track { animation-play-state: paused; }
.spark-ticker-row { display: flex; }
.spark-ticker-item { display: flex; align-items: center; gap: 8px; padding-left: 16px; white-space: nowrap; font-size: 0.9rem; }
.spark-ticker-kind { font-weight: 700; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: #F4A27A; }
.spark-ticker-item--link { color: inherit; text-decoration: underline; text-decoration-color: #7A7064; text-underline-offset: 3px; }
.spark-ticker-diamond { width: 6px; height: 6px; margin-left: 8px; background: var(--ink-faint); transform: rotate(45deg); }
@keyframes spark-ticker-move { from { transform: translateX(0); } to { transform: translateX(var(--ticker-distance)); } }
