/* Portal-only component rules (app.onchainagentintel.io).
 *
 * Task 1116: served from the apex next to style.css and referenced with the
 * same content-hash ?v= mechanism (asset_versions.py). Tokens, html/body,
 * a, .nav*, footer and .btn* live ONLY in style.css; this file may use the
 * shared tokens but must not redefine them. Element selectors are scoped to
 * main.container so the shared header/footer are never affected.
 */
main.container { padding-top: 40px; padding-bottom: 72px; max-width: 900px; }
:where(main.container) h1 { font-size: 1.75rem; letter-spacing: -0.02em; color: #fff;
     margin: 0 0 12px 0; }
:where(main.container) h2 { font-size: 1.15rem; color: #fff; margin: 20px 0 10px; }
:where(main.container) p { color: var(--text-dim); }
:where(main.container) code { background: #040b14; border: 1px solid var(--border);
       padding: 1px 6px; border-radius: 4px; font-size: 0.85em;
       color: var(--cyan); }
:where(main.container) pre { background: #040b14; border: 1px solid var(--border);
      border-radius: var(--radius); padding: 18px; overflow-x: auto;
      line-height: 1.65; font-size: 0.85rem; color: var(--text); }
:where(main.container) form { display: inline; }
/* Inherit font-family + font-size from the surrounding context, but let
   the shared `.btn` rule keep its own font-weight (600). The pre-1038
   shorthand `font: inherit` also clobbered the weight back to the body's
   400, which killed the "primary action" visual weight on every portal
   button. */
:where(main.container) button.btn { font-family: inherit; font-size: inherit; }

.muted   { color: var(--text-dim); font-size: 0.9rem; }
.subtle  { color: var(--text-faint); font-size: 0.85rem; }
.stack   { display: flex; flex-direction: column; gap: 10px; }
.row     { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow    { flex: 1; }

/* Signed-in status strip under h1 */
.status-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  color: var(--text-dim); margin-bottom: 22px;
}

/* Badges reuse the site color palette. */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 99px;
  font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid transparent;
}
.badge.on  { background: rgba(34,197,94,0.12); color: var(--green);
             border-color: rgba(34,197,94,0.3); }
.badge.off { background: rgba(239,68,68,0.10); color: var(--red);
             border-color: rgba(239,68,68,0.3); }
.badge.free {
  background: rgba(0,194,224,0.10); color: var(--cyan);
  border-color: rgba(0,194,224,0.25);
}

/* Data tables (account status). */
table.data { border-collapse: collapse; margin: 8px 0 16px; }
table.data th, table.data td {
  padding: 8px 18px 8px 0; text-align: left; font-size: 0.9rem;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
table.data th { color: var(--text-faint); font-weight: 600;
                text-transform: uppercase; letter-spacing: 0.06em;
                font-size: 0.72rem; }

/* Card rows for teaser fields. Match site .card token. */
.card-row {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; margin: 8px 0;
  color: var(--text);
}
.card-row.locked {
  background: rgba(255,255,255,0.02); border-style: dashed;
  color: var(--text-dim);
}
.card-row .k { color: var(--text-faint); text-transform: uppercase;
               letter-spacing: 0.06em; font-size: 0.7rem; display: block;
               margin-bottom: 3px; }
.card-row .v { color: var(--text); font-size: 0.95rem; }
.card-row.locked .lock { color: var(--cyan); font-weight: 600; }
.card-row.locked .note { display: block; color: var(--text-faint);
                         font-size: 0.8rem; margin-top: 4px; }

/* Panels used for the assess widget and the soft-wall upsell. */
.panel {
  background: linear-gradient(135deg, rgba(124,58,237,0.10), rgba(0,194,224,0.06));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius); padding: 22px 24px; margin: 22px 0;
}
.panel h2 { margin-top: 0; }
.panel .locked-note { color: var(--text-dim); font-size: 0.95rem; }
.assess { background: var(--surface); border: 1px solid var(--border);
          border-radius: var(--radius); padding: 20px 22px; margin: 22px 0; }
.assess h2 { margin-top: 0; }
.assess .chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.assess .chip {
  display: inline-block; padding: 8px 14px; border-radius: 99px;
  font-size: 0.82rem; text-decoration: none;
  background: var(--card); color: var(--text-dim);
  border: 1px solid var(--border);
}
.assess .chip:hover { color: var(--text); border-color: var(--border-hi); }
.assess .chip.active { background: rgba(0,194,224,0.12); color: var(--cyan);
                       border-color: rgba(0,194,224,0.35); }
.assess .verdict { color: #fff; font-weight: 700; margin: 10px 0 6px; }
.assess ul { margin: 6px 0 0 22px; color: var(--text-dim); }
.assess ul li { margin: 4px 0; }

/* Welcome hero for ?sub=ok. */
.welcome-hero {
  text-align: center; padding: 44px 24px 28px;
  background: linear-gradient(135deg, rgba(34,197,94,0.10), rgba(0,194,224,0.06));
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 14px; margin-bottom: 28px;
}
.welcome-hero h1 { font-size: 2rem; margin-bottom: 12px; }
.welcome-hero .sub { color: var(--text-dim); font-size: 1rem;
                     max-width: 560px; margin: 0 auto; }
.welcome-grid {
  display: grid; gap: 14px; margin: 20px 0 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.welcome-cta {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; text-decoration: none;
  display: block; color: var(--text); transition: border-color 0.15s;
}
.welcome-cta:hover { border-color: var(--cyan); color: var(--text); }
.welcome-cta h3 { color: #fff; font-size: 0.98rem; font-weight: 700;
                  margin: 0 0 6px; }
.welcome-cta p  { color: var(--text-dim); font-size: 0.85rem; margin: 0; }

/* Sign-in card (hero on login). */
.signin-hero {
  text-align: center; padding: 48px 20px 36px;
  background: linear-gradient(135deg, rgba(124,58,237,0.10), rgba(0,194,224,0.06));
  border: 1px solid rgba(124,58,237,0.28);
  border-radius: 14px; margin-top: 24px;
}
.signin-hero h1 { font-size: 1.85rem; margin-bottom: 10px; }
.signin-hero p  { max-width: 520px; margin: 0 auto 20px; color: var(--text-dim); }

/* 0898ad: Stacked sign-in method rows. Four equal, full-width buttons
   (Ethereum / GitHub / Google) and an email magic-link form, all
   capped at the same width so they line up as a single column at any
   viewport (incl. 390px — the container padding leaves ≈ 350px of
   usable width, inside this 360px cap). */
.signin-methods {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 360px; margin: 0 auto;
}
.signin-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; box-sizing: border-box;
  padding: 12px 16px; border-radius: 10px;
  font-family: inherit; font-size: 0.95rem; font-weight: 600;
  text-align: left; text-decoration: none; cursor: pointer;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border-hi);
  transition: border-color 0.15s, background 0.15s;
}
.signin-row:hover { border-color: var(--cyan); color: var(--text); }
.signin-row:focus-visible {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0,194,224,0.45);
}
.signin-row .icon {
  flex: 0 0 20px; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}
.signin-row .icon svg { width: 20px; height: 20px; }
.signin-row .label { flex: 1 1 auto; }
.signin-divider {
  display: flex; align-items: center; gap: 10px;
  max-width: 360px; margin: 16px auto;
  color: var(--text-faint);
  font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.signin-divider::before,
.signin-divider::after {
  content: ""; flex: 1 1 auto; height: 1px; background: var(--border);
}
.signin-email {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 360px; margin: 0 auto;
}
.signin-email input[type=email] {
  width: 100%; box-sizing: border-box;
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border-hi);
  background: rgba(255,255,255,0.03); color: var(--text);
  font-family: inherit; font-size: 0.95rem;
}
.signin-email input[type=email]::placeholder { color: var(--text-faint); }
.signin-email input[type=email]:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0,194,224,0.45);
}
.signin-fine {
  max-width: 480px; margin: 10px auto 0;
  color: var(--text-faint); font-size: 0.85rem;
}
.signin-fine:first-of-type { margin-top: 18px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* 0898ao2: Side-by-side pricing cards (Pro + Pay Per Call). Equal
   weight, same card component, same heading hierarchy. Stacked on
   narrow viewports so there is no horizontal scroll at ≤390px. */
.pricing-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 10px;
}
@media (min-width: 720px) {
  .pricing-cards { grid-template-columns: 1fr 1fr; }
}
.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 24px 22px;
  display: flex;
  flex-direction: column;
}
.pricing-card h1 { margin: 0 0 10px; font-size: 1.75rem; }
.pricing-card h2 { margin: 18px 0 10px; }
.pricing-card h3 { color: #fff; font-size: 1.05rem;
                   margin: 18px 0 8px; }
.pricing-card ul,
.pricing-card ol { margin: 6px 0; padding-left: 22px; }
.pricing-card ul li,
.pricing-card ol li { margin: 4px 0; color: var(--text-dim); }

/* 0967: Secondary buy row BELOW the primary Pro CTA — "just want the
   report?" / "just want the data?". Stacks on narrow (≤720px) so the
   Report button sits above the Dataset button; sits side-by-side on
   wider viewports. Buttons are .btn-ghost so Pro stays visually
   dominant. */
.pricing-secondary-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 20px;
}
@media (min-width: 720px) {
  .pricing-secondary-row { grid-template-columns: 1fr 1fr; }
}
.pricing-secondary-cta {
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}


/* 1038 — the Q3 report page's CTA row. Both forms share one flex row so
   the subscribe + buy-report buttons sit next to each other with a
   consistent gap instead of touching. Buttons here get a slightly
   taller padding so the primary CTA reads as a target, not a tag. */
.report-cta-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin: 18px 0 6px;
}
.report-cta-row form { margin: 0; }
.report-cta-row .btn { padding: 12px 22px; }
.report-cta-row .btn[disabled] {
  opacity: 0.55; cursor: not-allowed;
}
@media (max-width: 600px) {
  .report-cta-row form,
  .report-cta-row .btn { width: 100%; justify-content: center; }
}

/* Portal-local nav variant: signed-in email + sign-out on the right. */
.portal-nav-right { display: flex; gap: 14px; align-items: center;
                    font-size: 0.85rem; color: var(--text-dim); }
.portal-nav-right .email { color: var(--text); text-decoration: none; }
.portal-nav-right .email:hover,
.portal-nav-right .email.active { text-decoration: underline; }

/* Paid leaderboard table. Mirrors marketing site .price-table token so the
   visual language stays consistent — same border, same header treatment. */
main.container.wide { max-width: 1140px; }
table.leaderboard { width: 100%; border-collapse: collapse; margin: 16px 0;
                    background: var(--card); border: 1px solid var(--border);
                    border-radius: var(--radius); overflow: hidden; }
table.leaderboard th, table.leaderboard td {
  padding: 10px 14px; text-align: left; font-size: 0.88rem;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
table.leaderboard th { color: var(--text-faint); font-weight: 600;
                       text-transform: uppercase; letter-spacing: 0.06em;
                       font-size: 0.7rem; background: var(--surface); }
table.leaderboard tr:last-child td { border-bottom: 0; }
table.leaderboard td.num  { text-align: right; font-variant-numeric: tabular-nums; }
table.leaderboard td.rank { color: var(--text-faint); width: 40px; }
table.leaderboard td.locked { color: var(--text-faint); font-style: italic; }
table.leaderboard td a.row-cta {
  color: var(--cyan); text-decoration: none; font-size: 0.85rem;
}
table.leaderboard td a.row-cta:hover { text-decoration: underline; }
table.leaderboard td.chain { text-transform: uppercase; letter-spacing: 0.05em;
                             font-size: 0.72rem; color: var(--text-dim); }
.bucket-pill { display: inline-block; padding: 2px 8px; border-radius: 99px;
               font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase;
               border: 1px solid transparent; white-space: nowrap; }
.bucket-transact { background: rgba(34,197,94,0.12); color: var(--green);
                   border-color: rgba(34,197,94,0.3); }
.bucket-promising { background: rgba(245,158,11,0.12); color: var(--amber);
                    border-color: rgba(245,158,11,0.3); }
.bucket-not-ready { background: rgba(239,68,68,0.10); color: var(--red);
                    border-color: rgba(239,68,68,0.3); }
.bucket-unrated { background: rgba(77,106,135,0.15); color: var(--text-faint);
                  border-color: rgba(77,106,135,0.3); }

/* Trust dots — one per subscore (Live / Payable / Reputable / Active).
   Green = high, amber = medium, gray = missing/low. */
.trust-dots { display: inline-flex; gap: 4px; align-items: center; }
.trust-dot  { width: 9px; height: 9px; border-radius: 99px; display: inline-block; }
.trust-hi   { background: var(--green); }
.trust-md   { background: var(--amber); }
.trust-lo   { background: rgba(255,255,255,0.15); border: 1px solid var(--border); }
.trust-dots .lbl { color: var(--text-faint); font-size: 0.7rem;
                   letter-spacing: 0.05em; text-transform: uppercase; margin-left: 6px; }

/* Reputation cell. Score alone reads as a magic float; pair with an
   effective-clients count so the reader can weigh confidence. */
.rep-cell { display: flex; flex-direction: column; gap: 2px; }
.rep-cell .rep-score { color: var(--text); font-weight: 600; }
.rep-cell .rep-meta  { color: var(--text-faint); font-size: 0.72rem; }
.rep-cell.none { color: var(--text-faint); font-style: italic; font-size: 0.82rem; }

/* Graph container. The vis.js library sizes itself; we constrain height. */
#portal-graph { height: 640px; background: var(--surface);
                border: 1px solid var(--border); border-radius: var(--radius);
                margin: 8px 0 16px; }
.graph-legend-portal { display: flex; gap: 18px; flex-wrap: wrap;
                       color: var(--text-dim); font-size: 0.82rem;
                       margin-top: 6px; align-items: center; }
.graph-legend-portal .dot {
  width: 10px; height: 10px; border-radius: 99px; display: inline-block;
  margin-right: 5px; vertical-align: middle;
}

/* Filter controls — reused by /app/graph and /app/leaderboard (task 0106).
   Compact horizontal layout; wraps on narrow screens without hiding fields. */
.graph-filters, .leaderboard-filters {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end;
  padding: 12px 14px; margin: 6px 0 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.graph-filters label, .leaderboard-filters label {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 0.78rem; color: var(--text-dim); min-width: 140px;
}
.graph-filters label.inline-check, .leaderboard-filters label.inline-check {
  flex-direction: row; align-items: center; gap: 6px; min-width: 0;
  color: var(--text-dim); font-size: 0.82rem; padding-top: 12px;
}
.graph-filters select, .graph-filters input[type=text],
.leaderboard-filters select {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 6px 8px; font-size: 0.85rem; min-width: 140px;
}
.btn-compact { padding: 6px 14px; font-size: 0.84rem; }

/* Pagination — under the paid leaderboard table (task 0106). */
.leaderboard-pagination {
  display: flex; gap: 12px; align-items: center; justify-content: center;
  margin: 14px 0 6px; color: var(--text-dim); font-size: 0.85rem;
}
.leaderboard-pagination .page-btn {
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-dim); text-decoration: none; background: var(--surface);
}
.leaderboard-pagination .page-btn:hover { color: var(--text); }
.leaderboard-pagination .page-btn.disabled {
  opacity: 0.45; pointer-events: none;
}
.leaderboard-pagination .page-status { color: var(--text-faint); }
@media (max-width: 640px) {
  .graph-filters label, .leaderboard-filters label { min-width: 100%; }
}

/* 2026-Q3 report (task 0510). Styling matches the docs surface — dense
   prose with distinct section boundaries, paywall prompt visually
   separated, "free-only transition" asides flagged as editorial notes. */
article.report-2026-q3 h2 { margin: 24px 0 8px; }
article.report-2026-q3 h3 { color: var(--text); font-size: 1.05rem;
                            margin: 22px 0 8px; }
article.report-2026-q3 h4 { color: var(--text); font-size: 0.95rem;
                            margin: 16px 0 6px; }
article.report-2026-q3 section { border-top: 1px solid var(--border);
                                 padding: 6px 0 12px; }
article.report-2026-q3 section:first-of-type { border-top: 0; }
article.report-2026-q3 p, article.report-2026-q3 li { font-size: 0.94rem; }
article.report-2026-q3 ul, article.report-2026-q3 ol {
  padding-left: 22px; color: var(--text-dim);
}
article.report-2026-q3 code { font-size: 0.82em; }
article.report-2026-q3 table.report-table {
  width: 100%; border-collapse: collapse; margin: 12px 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; font-size: 0.85rem;
}
article.report-2026-q3 table.report-table th,
article.report-2026-q3 table.report-table td {
  padding: 8px 12px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border);
}
article.report-2026-q3 table.report-table th {
  color: var(--text-faint); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 0.7rem; background: var(--surface);
}
article.report-2026-q3 hr {
  border: 0; border-top: 1px dashed var(--border); margin: 22px 0;
}
aside.report-free-transition {
  background: var(--card); border-left: 3px solid var(--amber);
  padding: 8px 14px; margin: 14px 0; border-radius: 4px;
}
aside.report-free-transition p {
  margin: 0; font-size: 0.85rem; color: var(--text-faint); font-style: italic;
}
aside.report-paywall-prompt {
  background: linear-gradient(135deg, rgba(124,58,237,0.10), rgba(0,194,224,0.06));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius); padding: 22px 24px; margin: 28px 0;
}
aside.report-paywall-prompt h2 { margin-top: 0; color: #fff; }
aside.report-paywall-prompt p { color: var(--text-dim); font-size: 0.94rem; }

/* Docs layout — simpler than the marketing site's two-column split. */
.docs-section { border-top: 1px solid var(--border); padding: 22px 0 6px;
                scroll-margin-top: 20px; }
.docs-section:first-of-type { border-top: 0; }
.docs-section h2 { margin-top: 0; }
.docs-section h3 { color: var(--text); font-size: 0.95rem;
                   margin: 16px 0 6px; }
.docs-section p, .docs-section li { font-size: 0.92rem; }
.method-badge { display: inline-block; padding: 2px 8px; border-radius: 4px;
                background: rgba(0,194,224,0.1); color: var(--cyan);
                font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
                margin-right: 6px; text-transform: uppercase; }
.docs-toc { background: var(--card); border: 1px solid var(--border);
            border-radius: var(--radius); padding: 14px 20px; margin: 8px 0 22px; }
.docs-toc ul { columns: 2; column-gap: 22px; margin: 0; padding-left: 18px; }
.docs-toc li { padding: 2px 0; color: var(--text-dim); font-size: 0.88rem; }
@media (max-width: 640px) { .docs-toc ul { columns: 1; } }
