/* ==========================================================================
   VERDICT — INNER PAGES
   Loaded after polish.css on every page except the home page. It carries the
   home page's design language (dotted field, display headings, rounded cards,
   pills, soft shadows) into about, faq, methodology, limitations, glossary,
   api, contribute, fund, case and dossier.

   Structure on the document pages:
     main.page > header.page-hero  +  .doc-layout > nav.doc-sidebar + article.doc-content > section.doc-section
   ========================================================================== */

:root {
  --r-card: 16px;
  --r-panel: 22px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --code-bg: #17181b;
  --code-line: #2b2d32;
  --code-text: #e8e9eb;
  --code-muted: #9aa0a8;
}

[hidden] { display: none !important; }

/* ---------- Canvas: the quiet dotted field behind every page hero ---------- */

.page { position: relative; isolation: isolate; padding-bottom: clamp(64px, 8vw, 104px); }
.page::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -120px 0 auto 0;
  height: 520px;
  pointer-events: none;
  background:
    radial-gradient(50% 60% at 85% 6%, rgba(51, 65, 85, 0.12), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(21, 21, 21, 0.1) 1px, transparent 1.3px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%), linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 100%), linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

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

.page-hero { padding: clamp(14px, 3vw, 44px) 0 clamp(26px, 4vw, 48px); }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  padding: 6px 14px 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(51, 65, 85, 0.45);
  animation: page-pulse 2.6s ease-out infinite;
}
.page-hero h1 {
  max-width: 22ch;
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.032em;
}
.page-dek {
  max-width: 60ch;
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-secondary);
}
.page-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.page-meta span {
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
}

/* Filter box (FAQ, glossary) */
.page-filter { position: relative; max-width: 520px; margin-top: 28px; }
.page-filter input {
  width: 100%;
  height: 54px;
  padding: 0 46px 0 48px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 32px -16px rgba(20, 21, 22, 0.22), 0 2px 6px rgba(20, 21, 22, 0.04);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.page-filter input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.page-filter input::placeholder { color: var(--ink-faint); }
.page-filter input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(51, 65, 85, 0.14), 0 14px 36px -16px rgba(20, 21, 22, 0.26); }
.page-filter::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 27px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5' fill='none' stroke='%23676767' stroke-width='1.8'/%3E%3Cpath d='M13 13l4.5 4.5' stroke='%23676767' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  pointer-events: none;
}
.page-filter-count { margin: 10px 4px 0; font-size: 0.85rem; color: var(--ink-muted); min-height: 1.3em; }
.page-empty {
  margin: 8px 0 0;
  padding: 28px;
  text-align: center;
  color: var(--ink-secondary);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-card);
}

/* ---------- Two-column document layout ---------- */

.doc-layout {
  display: grid;
  grid-template-columns: minmax(220px, 268px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  margin: 0 auto;
  align-items: start;
}

.doc-sidebar {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  padding: 18px 14px 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-panel);
  box-shadow: 0 24px 56px -34px rgba(20, 21, 22, 0.35), 0 2px 6px rgba(20, 21, 22, 0.03);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  scrollbar-width: thin;
}
.doc-nav-title {
  margin: 0 8px 10px;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 0;
}
.doc-toc-links { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 0.92rem; }
.doc-toc-links a {
  display: block;
  padding: 8px 12px;
  line-height: 1.35;
  color: var(--ink-secondary);
  text-decoration: none;
  border: 0;
  border-radius: 10px;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.doc-toc-links a:hover { color: var(--ink); background: var(--bg-subtle); }
.doc-toc-links a.active {
  font-weight: 600;
  color: var(--ink);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.doc-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 2vw, 22px);
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.doc-section {
  margin: 0;
  padding: clamp(22px, 3.2vw, 42px);
  scroll-margin-top: 96px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-card);
}
.doc-section:last-child { margin-bottom: 0; padding-bottom: clamp(22px, 3.2vw, 42px); border-bottom: 1px solid var(--border-subtle); }
.doc-section h2 {
  margin: 0 0 16px;
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.doc-section h3 { margin: 26px 0 10px; font-size: 1.3rem; font-weight: 600; }
.doc-section h4 { margin: 18px 0 6px; font-size: 1.05rem; }
.doc-section p { max-width: 74ch; margin: 0 0 16px; font-size: 1.04rem; line-height: 1.7; color: var(--ink-secondary); }
.doc-section p:last-child { margin-bottom: 0; }
.doc-section ul, .doc-section ol { max-width: 74ch; padding-left: 1.25em; color: var(--ink-secondary); }
.doc-section li { margin: 6px 0; line-height: 1.65; }
.doc-section li::marker { color: var(--accent); font-weight: 600; }
.doc-section a { color: var(--accent); text-decoration-color: var(--accent-border); }
.doc-section a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
.doc-section code { padding: 1px 6px; font-size: 0.88em; color: var(--ink); background: var(--bg-subtle); border-radius: 6px; }

/* Callouts */
.callout-principle,
.callout-warning {
  margin: 22px 0;
  padding: 16px 20px;
  font-size: 0.97rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
}
.callout-warning { background: #fbf4e2; border-color: #ead9a6; border-left-color: #c79a2e; }
.doc-section .card,
.doc-section .card[style] {
  padding: 18px 20px !important;
  background: var(--surface-alt) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 14px !important;
}

/* Status pills used inside the documents */
.state-badge,
.identity-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  border-radius: 999px;
}

/* ---------- FAQ ---------- */

.faq-block { display: grid; gap: 12px; counter-reset: faq; }
.faq-card {
  position: relative;
  padding: 20px 24px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.faq-card:hover { border-color: var(--border); box-shadow: 0 14px 34px -22px rgba(20, 21, 22, 0.3); transform: translateY(-1px); }
.faq-q,
.doc-section .faq-q {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}
.faq-q::before {
  counter-increment: faq;
  content: counter(faq, decimal-leading-zero);
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--accent);
}
.faq-a { margin: 0 0 0 28px; max-width: 70ch; font-size: 1rem; line-height: 1.65; color: var(--ink-secondary); }
.doc-section .faq-a { margin: 0 0 0 28px; font-size: 1rem; }

/* ---------- Glossary ---------- */

.glossary-list { display: grid; }
.glossary-row {
  display: grid;
  grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
  gap: 8px 28px;
  padding: 18px 16px;
  margin: 0 -16px;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 14px;
  transition: background-color 0.15s ease;
}
.glossary-row:last-child { border-bottom: 0; }
.glossary-row:hover { background: var(--surface-alt); }
.glossary-term {
  align-self: start;
  justify-self: start;
  padding: 4px 11px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 9px;
  overflow-wrap: anywhere;
}
.glossary-def { margin: 0; font-size: 1rem; line-height: 1.65; color: var(--ink-secondary); }

/* ---------- API reference ---------- */

.code-block,
pre.code-block {
  position: relative;
  margin: 16px 0;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--code-text);
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: 14px;
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.55);
  overflow-x: auto;
  white-space: normal;
}
.code-block pre {
  margin: 0;
  padding: 0;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
}
.code-block code { padding: 0; font-size: inherit; color: inherit; background: none; overflow-wrap: normal; }
.code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--code-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--code-line);
  border-radius: 8px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.code-block:hover .code-copy,
.code-copy:focus-visible { opacity: 1; }
.code-copy:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
@media (hover: none) { .code-copy { opacity: 1; } }

.api-endpoint-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 8px;
}
.auth-badge { margin-left: 6px; padding: 2px 8px; font-size: 0.68rem; color: #855a15; background: #f8efd7; border-radius: 999px; }
.get-badge { color: #1e5638; background: #e2f0e7; }
.post-badge { color: #1b4965; background: #e6eef5; }

.code-param-table {
  width: 100%;
  margin: 16px 0;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 0.92rem;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}
.code-param-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border-subtle);
}
.code-param-table td { padding: 12px 16px; vertical-align: top; color: var(--ink-secondary); border-bottom: 1px solid var(--border-subtle); }
.code-param-table tr:last-child td { border-bottom: 0; }

/* ---------- Motion ---------- */

.js-reveal .reveal { opacity: 0; transform: translateY(14px); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }

@keyframes page-pulse {
  0% { box-shadow: 0 0 0 0 rgba(51, 65, 85, 0.45); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(51, 65, 85, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-dot { animation: none; }
  .js-reveal .reveal, .js-reveal .reveal.is-in { opacity: 1; transform: none; transition: none; }
  .faq-card { transition: none; }
  .faq-card:hover { transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 14px 12px;
  }
  .doc-toc-links { flex-direction: row; flex-wrap: nowrap; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .doc-toc-links::-webkit-scrollbar { display: none; }
  .doc-toc-links li { flex: 0 0 auto; }
  .doc-toc-links a { white-space: nowrap; background: var(--bg-subtle); }
  .doc-toc-links a.active { box-shadow: none; background: var(--ink); color: #fff; }
}
@media (max-width: 700px) {
  .doc-section [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .code-param-table th, .code-param-table td { min-width: 128px; }
  .glossary-row { grid-template-columns: minmax(0, 1fr); margin: 0 -10px; padding: 14px 10px; }
  .faq-a, .doc-section .faq-a { margin-left: 0; }
  .doc-section { padding: 20px 18px; border-radius: 18px; }
}
@media print {
  .page::before, .doc-sidebar, .page-filter, .code-copy { display: none !important; }
  .doc-section, .faq-card { box-shadow: none; break-inside: avoid; }
}

/* ==========================================================================
   Submit page (contribute.html)
   ========================================================================== */

.contribute-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}
.form-container {
  padding: clamp(22px, 3.6vw, 40px);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-card);
}
.notice-box {
  margin: 0 0 26px;
  padding: 15px 18px;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--ink-secondary);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
}
.notice-box strong { color: var(--ink); }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field-group { display: grid; gap: 7px; margin-bottom: 20px; min-width: 0; }
.field-label {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.field-input,
.field-select,
.field-textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.field-input::placeholder,
.field-textarea::placeholder { color: var(--ink-faint); }
.field-input:hover, .field-select:hover, .field-textarea:hover { border-color: #c4c4c0; }
.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(51, 65, 85, 0.13);
}
.field-textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.field-textarea[data-compact] { min-height: 84px; font-size: 0.93rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.captcha-slot { margin-bottom: 20px; }
.submit-btn { width: 100%; justify-content: center; padding: 15px 20px; font-size: 1rem; border-radius: 12px; }

.submission-result {
  display: none;
  margin-top: 24px;
}
.submission-result pre {
  margin: 12px 0 0;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

/* Guidance column */
.contribute-aside { display: grid; gap: 14px; position: sticky; top: 92px; }
.qualify-card,
.fund-link-card {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.qualify-card h2,
.fund-link-card h2 { margin: 0 0 10px; font-family: var(--font-sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.qualify-card.yes { border-top: 3px solid #6aa684; }
.qualify-card.yes h2 { color: #1e5638; }
.qualify-card.no { border-top: 3px solid #b3b6bc; }
.qualify-card.no h2 { color: var(--ink-secondary); }
.qualify-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 0.93rem; line-height: 1.45; color: var(--ink-secondary); }
.qualify-card li { position: relative; padding-left: 22px; }
.qualify-card.yes li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; color: #2b7a4b; }
.qualify-card.no li::before { content: "✕"; position: absolute; left: 0; font-weight: 700; color: #8a8e95; }
.fund-link-card { background: linear-gradient(135deg, #ffffff, #f2f3f5); }
.fund-link-card h2 { color: var(--accent); }
.fund-link-card p { margin: 0 0 14px; font-size: 0.93rem; line-height: 1.55; color: var(--ink-secondary); }

@media (max-width: 900px) {
  .contribute-layout { grid-template-columns: minmax(0, 1fr); }
  .contribute-aside { position: static; }
}
@media (max-width: 640px) {
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .form-container { padding: 20px 16px; border-radius: 18px; }
}

/* ==========================================================================
   Fund page (fund.html)
   ========================================================================== */

.fund-container { max-width: none; margin: 0 auto; padding: 0; }
.fund-hero { margin: 0; padding: clamp(14px, 3vw, 44px) 0 clamp(22px, 3vw, 38px); border: 0; }
.fund-hero-title {
  max-width: 18ch;
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.032em;
  text-transform: none;
}
.fund-hero-dek { max-width: 60ch; margin: 0; font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.55; }

.payment-main-card {
  padding: clamp(20px, 3.4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-card);
}
.pay-station-heading { margin: 0 0 22px; font-size: clamp(1.5rem, 2.4vw, 1.9rem); letter-spacing: -0.015em; }
.payment-control-group { margin-bottom: 26px; }
.payment-group-label {
  margin-bottom: 12px;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.preset-pill-btn {
  padding: 15px 12px;
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border-radius: 14px;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s var(--ease), box-shadow 0.15s ease;
}
.preset-pill-btn:hover { background: var(--surface); border-color: var(--ink); transform: translateY(-1px); box-shadow: 0 10px 22px -14px rgba(20, 21, 22, 0.35); }
.preset-pill-btn.active { color: #fff; background: var(--ink); border-color: var(--ink); box-shadow: 0 10px 24px -12px rgba(20, 21, 22, 0.5); }
.custom-amount-wrapper { border-radius: 14px; }
.custom-input-field { border-radius: 10px; }

.route-pill-btn {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s var(--ease);
}
.route-pill-btn:hover { background: var(--surface); border-color: var(--ink-muted); transform: translateY(-1px); }
.route-pill-btn.active {
  border: 1px solid var(--ink);
  box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.14), 0 14px 28px -18px rgba(20, 21, 22, 0.4);
}
.route-pill-token { font-family: var(--font-sans); font-size: 1rem; font-weight: 700; }
.route-pill-badge {
  padding: 2px 8px;
  font-family: var(--font-sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 999px;
}
.route-pill-net { font-size: 0.82rem; }

.live-payment-box {
  margin-top: 30px;
  padding: clamp(14px, 2.6vw, 26px);
  background: var(--surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
}
.payment-summary-strip { gap: 12px 28px; }
.summary-label { font-family: var(--font-sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.summary-val { font-family: var(--font-sans); font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.summary-val-mono { font-size: 0.9rem; }
.network-warning-banner {
  border: 1px solid #ead9a6;
  border-left: 4px solid #c79a2e;
  border-radius: 14px;
  background: #fbf4e2;
}
.qr-container { border-radius: 18px; }
.address-box { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.btn-copy-address,
.btn-open-wallet,
.btn-explorer,
.btn-verify-payment {
  padding: 9px 14px;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 10px;
}
.btn-open-wallet, .btn-explorer { border: 1px solid var(--border); }
.btn-open-wallet:hover, .btn-explorer:hover { border-color: var(--ink); }
.payment-status-tracker { border-radius: 14px; border-color: var(--border-subtle); }

/* Lower sections: labels and headings */
.section-label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-heading { font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 600; letter-spacing: -0.02em; }
.editorial-policy-section, .funding-disclosure-banner { border-radius: var(--r-card); }
.funding-disclosure-banner { border: 1px solid var(--border-subtle); border-left: 4px solid var(--accent); background: var(--surface); }
.funding-disclosure-badge { display: inline-flex; padding: 4px 10px; font-family: var(--font-sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; color: var(--accent); background: var(--accent-soft); border-radius: 999px; }

/* The lower fund sections carry inline square boxes: round them to match */
.fund-container [style*="var(--radius-xs)"],
.fund-container [style*="var(--radius-sm)"] { border-radius: 14px !important; }
.fund-container [style*="border-left: 5px solid"] { border-radius: 14px !important; border-color: var(--border) !important; border-left-color: var(--accent) !important; }
.disclosure-showcase { padding: clamp(20px, 3vw, 32px); background: var(--surface-alt); border: 1px solid var(--border-subtle); border-radius: var(--r-panel); }
.editorial-policy-section { border-top-color: var(--border-subtle) !important; }
.fund-container pre { padding: 4px 0; }

@media (max-width: 640px) {
  .payment-control-group > div[style*="justify-content: space-between"] { flex-wrap: wrap; gap: 4px 12px; }
}

/* ==========================================================================
   FUND FLOW: waiting → recorded → optional request → request sent.
   Each step rises in when it appears; the tick draws itself.
   ========================================================================== */

@keyframes vf-rise { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
@keyframes vf-draw { from { stroke-dashoffset: 24; } }
@keyframes vf-ring { from { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.35); } to { box-shadow: 0 0 0 14px rgba(22, 163, 74, 0); } }
@keyframes vf-ripple { from { transform: scale(1); opacity: 0.55; } to { transform: scale(2.6); opacity: 0; } }

/* Waiting state */
.payment-status-tracker { padding: 20px 22px; background: var(--surface); box-shadow: var(--shadow-card); }
.status-pulse-row { gap: 10px; margin-bottom: 8px; }
.pulse-dot { position: relative; flex: 0 0 auto; animation: none; background: #d97706; }
.pulse-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #d97706; animation: vf-ripple 1.8s ease-out infinite; }
.status-heading { font-size: 0.98rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.status-subtext { font-size: 0.9rem; line-height: 1.55; }
#manual-txhash-input { max-width: 460px; }
.btn-verify-payment {
  padding: 11px 18px !important;
  color: #fff !important;
  background: var(--ink) !important;
  border: 1px solid var(--ink) !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 2px rgba(20, 21, 22, 0.14), 0 8px 18px -10px rgba(30, 41, 59, 0.6);
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-verify-payment:hover { background: var(--accent) !important; border-color: var(--accent) !important; transform: translateY(-1px); }

/* Recorded state */
.confirmed-badge-row { gap: 12px; margin-bottom: 10px; }
.check-icon,
.confirmed-badge-row .check-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  color: #fff;
  background: #16a34a;
  border-radius: 50%;
  box-shadow: 0 6px 16px -6px rgba(22, 163, 74, 0.7);
}
.check-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 0; }
.confirmed-title { font: 600 1.3rem/1.2 var(--font-serif); letter-spacing: -0.01em; color: var(--ink); }
.confirmed-dek { font-size: 0.93rem; line-height: 1.6; margin-bottom: 18px; }
.confirmed-actions-row { gap: 10px; }

/* Optional request card */
.optional-request-card {
  margin-top: 28px;
  padding: clamp(22px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-panel);
  box-shadow: 0 30px 70px -48px rgba(20, 21, 22, 0.45), var(--shadow-card);
  animation: none;
}
.optional-request-card .form-control {
  padding: 11px 13px;
  background: var(--surface);
  border-radius: 12px !important;
  box-shadow: inset 0 1px 2px rgba(20, 21, 22, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.optional-request-card .form-control:hover { border-color: var(--ink-faint); }
.optional-request-card .form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(51, 65, 85, 0.14); }
.optional-request-card .form-control[readonly] { background: var(--surface-alt); border-style: dashed; }
.optional-request-card .form-group[style*="background"] { border-radius: 14px !important; border-color: var(--border-subtle) !important; }
.agreements-box { border-color: var(--border-subtle); border-radius: 14px; background: var(--surface-alt); }
.agreement-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }

/* Request sent */
#optional-request-result { margin-top: 22px; }
.flow-success {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: clamp(18px, 3vw, 26px);
  background: linear-gradient(180deg, #f1f8f3, #fbfdfb);
  border: 1px solid #cfe4d7;
  border-radius: 18px;
}
.flow-success-body { min-width: 0; }
.flow-success-kicker { margin-bottom: 6px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #1e5e3a; overflow-wrap: anywhere; }
.flow-success-kicker code { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.flow-success-title { margin: 0 0 8px; font-size: 1.25rem; }
.flow-success-text { margin: 0 0 14px; font-size: 0.92rem; line-height: 1.6; color: var(--ink-secondary); }

@media (prefers-reduced-motion: no-preference) {
  #status-confirmed,
  .optional-request-card,
  .flow-success { animation: vf-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both; }
  #status-confirmed .check-icon,
  .flow-success .check-icon { animation: vf-ring 0.9s 0.25s ease-out both; }
  #status-confirmed .check-icon svg,
  .flow-success .check-icon svg { animation: vf-draw 0.5s 0.2s cubic-bezier(0.65, 0, 0.35, 1) both; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-dot::after { animation: none; display: none; }
}
@media (max-width: 540px) {
  .flow-success { flex-direction: column; }
  .confirmed-actions-row .btn { flex: 1 1 100%; }
}

/* Submission problems: same shape as the success card, in slate */
.flow-alert {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: clamp(18px, 3vw, 26px);
  background: linear-gradient(180deg, #f2f4f8, #fbfbfd);
  border: 1px solid var(--accent-border);
  border-radius: 18px;
}
.alert-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  font: 800 1.1rem/1 var(--font-sans);
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
}
.flow-success pre { max-width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .flow-alert { animation: vf-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .flow-alert .alert-icon { animation: vf-shake 0.45s 0.15s ease both; }
}
@keyframes vf-shake { 20% { transform: translateX(-3px); } 40% { transform: translateX(3px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }
@media (max-width: 540px) { .flow-alert { flex-direction: column; } }

/* ---------- Fund page: larger contributions ---------- */
.patron-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px 22px;
  align-items: center;
  margin-top: 22px;
  padding: clamp(18px, 3vw, 26px);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(148, 163, 184, 0.16), transparent 55%),
    var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}
.patron-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 14px;
}
.patron-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.patron-kicker { display: block; margin-bottom: 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.patron-title { margin: 0 0 6px; font-size: clamp(1.15rem, 2vw, 1.35rem); }
.patron-text { margin: 0; max-width: 62ch; font-size: 0.93rem; line-height: 1.6; color: var(--ink-secondary); }
.patron-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.patron-copy { font-family: var(--font-mono) !important; font-size: 0.8rem !important; font-weight: 500 !important; }
@media (max-width: 860px) {
  .patron-card { grid-template-columns: auto minmax(0, 1fr); }
  .patron-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .patron-card { grid-template-columns: minmax(0, 1fr); }
  .patron-actions .btn { flex: 1 1 100%; }
  .patron-copy { overflow-wrap: anywhere; }
}
