/* AgentVouch — shared stylesheet. Luxury dark editorial theme (user 27/11 13:20:
   "sang trọng và đẳng cấp", not cheap): Playfair Display for headlines,
   Inter for body/UI, one champagne accent, hairline borders, deep navy.
   Self-hosted fonts, no external requests. Real font weights throughout —
   no synthetic bold (the old single 500 file faked 700/800 = blurry). */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-700-italic.woff2") format("woff2");
  font-weight: 700; font-style: italic; font-display: swap;
}

:root {
  --bg: #0a0e1a; /* deep near-black navy */
  --bg-raised: #0e1424;
  --bg-card: #111a2e;
  --border: rgba(232, 226, 205, 0.12); /* warm hairline */
  --text: #edeff3;
  --text-dim: #a6afbe;
  --text-faint: #6e7686;
  --accent: #d6c08a; /* champagne — the one accent */
  --accent-dim: rgba(214, 192, 138, 0.45);
  --gold: #f0b90b; /* BNB gold — kept only where the brand demands it */
  --ok: #8ec9a7; /* muted sage — trust signals, no more loud green */
  --cream: #d6c08a;
  --warn: #e5534b;
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 50% 180px, rgba(214, 192, 138, 0.10), transparent 70%),
    radial-gradient(640px 340px at 88% 120px, rgba(142, 201, 167, 0.05), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  animation: glowDrift 14s ease-in-out infinite alternate;
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header / footer */
header.site { border-bottom: 1px solid var(--border); background: var(--bg-raised); }
.header-in { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 16px; flex-wrap: wrap; }
.brand { color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: 0.01em; display: inline-flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex: 0 0 auto;
}
nav a { color: var(--text-dim); margin-left: 18px; font-size: 14.5px; position: relative; }
nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
nav a:hover::after { transform: scaleX(1); }
nav a.active::after { display: none; }
nav a.active { color: var(--text); border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
footer.site { border-top: 1px solid var(--border); margin-top: 56px; padding: 28px 0 40px; color: var(--text-faint); font-size: 13.5px; }
footer.site p { margin: 6px 0; word-break: break-all; }
footer.site p:last-child { word-break: normal; }

main { padding-top: 48px; }

/* Typography */
h1 { font-family: var(--font-display); font-size: clamp(42px, 5.2vw, 60px); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 18px; font-weight: 700; }
h2 { font-family: var(--font-display); font-size: 26px; margin: 44px 0 12px; font-weight: 700; }
h2::before {
  content: ""; display: inline-block; width: 22px; height: 1px;
  background: var(--accent); margin-right: 12px; vertical-align: 6px;
}
h3 { font-family: var(--font-display); font-size: 19px; margin: 28px 0 8px; font-weight: 700; }
.lede { font-size: 17.5px; color: var(--text-dim); max-width: 620px; line-height: 1.7; }
.tagline { color: var(--accent); font-weight: 600; font-family: var(--font-sans); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; }

/* Italic champagne serif accent inside the headline — no gradient. */
.grad { font-family: var(--font-display); font-style: italic; color: var(--accent); }

/* Big faint attestation ring behind the hero frame only (absolute canvas). */
#bg-ring { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
main, footer.site { position: relative; z-index: 1; }
header.site { z-index: 2; }

/* Hero — CRED-style two-column: giant claim left, live reputation card right. */
.hero { position: relative; }
.hero-wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: start; padding-top: 12px; }
.hero-right { position: sticky; top: 24px; }

/* Live reputation card (the "score card" of the hero). */
.rep-card {
  background: linear-gradient(165deg, #141d33, #0d1322);
  border: 1px solid var(--border); border-radius: 14px; padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.rep-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-dim); font-size: 13px; }
.rep-model { color: var(--text-faint); font-size: 13px; }
.rep-main { display: flex; align-items: center; gap: 18px; margin: 18px 0 16px; }
.rep-logo { width: 96px; height: 96px; flex: 0 0 auto; border-radius: 14px; }
.rep-handle { font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.2; overflow-wrap: break-word; }
.rep-tier { margin-top: 8px; }
.tier-pill {
  display: inline-block; background: transparent; color: var(--ok); font-weight: 600;
  border: 1px solid rgba(142, 201, 167, 0.45);
  border-radius: 99px; padding: 3px 12px; font-size: 13px; letter-spacing: 0.02em;
}
.rep-big { margin-left: auto; text-align: right; }
.rep-big span:first-child { font-family: var(--font-sans); font-size: 48px; font-weight: 700; line-height: 1; color: var(--text); display: block; font-variant-numeric: tabular-nums; }
.rep-big-label { color: var(--text-dim); font-size: 12.5px; }
.rep-factors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rep-factor { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.rep-factor-label { color: var(--text-dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.rep-factor-value { font-family: var(--font-sans); font-weight: 600; font-size: 16px; margin-top: 4px; }
.rep-latest { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 13px; color: var(--text-dim); line-height: 1.7; }
.rep-cat { color: var(--accent); }

/* Category pills — one color dot per category, CRED chain-pill style. */
.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); background: transparent; border-radius: 99px;
  padding: 6px 12px; font-family: var(--mono); font-size: 12.5px; color: var(--text-dim);
}
.cat-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  background: var(--accent); color: #171204; font-weight: 600; border: 0; cursor: pointer;
  font-size: 15px; letter-spacing: 0.01em;
  box-shadow: 0 6px 24px rgba(214, 192, 138, 0.18);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(214, 192, 138, 0.24); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid rgba(237, 239, 243, 0.18); box-shadow: none; }
.btn.secondary:hover { border-color: var(--accent-dim); box-shadow: none; }
.btn.small { padding: 6px 12px; font-size: 13.5px; border-radius: 8px; }
.btn:disabled { opacity: 0.55; cursor: default; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 6px; }

/* Stat tiles + progress */
.stats { display: flex; gap: 16px; flex-wrap: wrap; margin: 28px 0 8px; }
.stat {
  background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; min-width: 0; flex: 1 1 0;
  transition: border-color .15s ease;
}
.stat:hover { border-color: var(--accent-dim); }
.stat .num { font-family: var(--font-sans); font-size: 32px; font-weight: 700; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat .label { color: var(--text-dim); font-size: 11.5px; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.09em; line-height: 1.5; }
.progress { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; margin-top: 14px; }
.progress .bar { height: 8px; background: var(--border); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.progress .bar > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width .9s ease; }
.progress .cap { color: var(--text-dim); font-size: 14px; }

/* Cards, tables */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); font-size: 15px; vertical-align: top; }
th { color: var(--text-dim); font-weight: 600; font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.06em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 13.5px; word-break: break-all; }
.dim { color: var(--text-dim); }
.small { font-size: 13.5px; }

/* Category list */
.cat-list { list-style: none; padding: 0; margin: 10px 0; }
.cat-list li { padding: 10px 0; border-bottom: 1px solid var(--border); transition: background .15s ease, padding-left .15s ease; border-radius: 8px; }
.cat-list li:hover { background: rgba(214, 192, 138, 0.05); padding-left: 10px; }
.cat-list li:last-child { border-bottom: 0; }
.cat-name { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: 0.03em; }
.cat-line { display: block; margin-top: 2px; }

/* Prompt / code blocks */
pre.prompt, pre.code {
  background: #0d1117; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.6; color: #d6dde6;
}
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.block-head h2, .block-head h3 { margin: 0; }

/* Safety / notice boxes */
.safety {
  border: 1px solid var(--warn); background: rgba(229, 83, 75, 0.08);
  border-radius: var(--radius); padding: 16px 20px; margin: 22px 0;
}
.safety strong { color: var(--warn); }
.notice {
  border: 1px solid var(--accent-dim); background: rgba(214, 192, 138, 0.06);
  border-radius: var(--radius); padding: 14px 18px; margin: 18px 0;
}
.empty { color: var(--text-faint); border: 1px dashed var(--border); border-radius: var(--radius); padding: 22px; text-align: center; margin: 14px 0; }

/* Forms */
label.field { display: block; margin: 16px 0 6px; font-weight: 600; font-size: 15px; }
input[type="text"], input[type="url"], select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg-raised); color: var(--text); font-size: 15.5px; font-family: inherit;
}
input.mono, textarea.mono { font-family: var(--mono); font-size: 13.5px; }
.error { color: var(--warn); font-size: 14px; min-height: 20px; margin-top: 6px; }
.hint { color: var(--text-faint); font-size: 13.5px; margin-top: 4px; }

/* Activity feed */
.feed { list-style: none; padding: 0; margin: 8px 0; }
.feed li { padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.feed li:last-child { border-bottom: 0; }
.feed .meta { color: var(--text-faint); font-size: 13px; }
.pill {
  display: inline-block; font-family: var(--mono); font-size: 11.5px; color: var(--accent);
  border: 1px solid var(--accent-dim); border-radius: 99px; padding: 1px 8px; margin-left: 8px; vertical-align: 1px;
}
.pill.revoked { color: var(--text-dim); border-color: var(--border); }

/* Profile — the credential card */
.profile-card {
  background: linear-gradient(165deg, #141d33, #0d1322);
  border: 1px solid var(--border); border-radius: 14px; padding: 28px; margin: 20px 0;
}
.profile-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.avatar {
  width: 84px; height: 84px; border-radius: 20px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: #10131a;
}
.profile-handle { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1.15; word-break: break-all; }
.profile-handle .suffix { color: var(--accent); }
.profile-sub { color: var(--text-dim); font-size: 14.5px; margin-top: 4px; }
.profile-actions { margin-left: auto; }

.checklist { list-style: none; padding: 0; margin: 10px 0; }
.checklist li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before { content: "□"; position: absolute; left: 2px; color: var(--accent); }

/* Badge tiers */
.tier-row { display: flex; align-items: center; gap: 16px; padding: 14px 10px; border-bottom: 1px solid var(--border); border-radius: 10px; transition: background .15s ease; }
.tier-row:hover { background: rgba(214, 192, 138, 0.05); }
.tier-row:last-child { border-bottom: 0; }
.tier-logo { width: 64px; height: 64px; flex: 0 0 auto; border-radius: 16px; }
.tier-name { font-weight: 600; font-size: 17px; color: var(--ok); }
.tier-cond { color: var(--text-dim); font-size: 14.5px; margin-top: 2px; }
.tier-ring { margin-left: auto; text-align: right; font-family: var(--mono); font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.tier-result { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.tier-result .tier-logo { width: 96px; height: 96px; }

/* Live pulse dot — marks a live on-chain count. */
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); margin-right: 7px; vertical-align: 1px;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(142, 201, 167, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(142, 201, 167, 0); }
}

/* Motion — entrance + slow glow drift. Disabled for reduced-motion users. */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim { animation: fadeUp .6s ease both; animation-delay: var(--d, 0s); }
@keyframes glowDrift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 34px 14px, -26px 10px, 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .anim, .live-dot { animation: none; }
  body { animation: none; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-right { position: static; }
}

@media (max-width: 640px) {
  h1 { font-size: 34px; }
  .profile-handle { font-size: 24px; }
  .profile-actions { margin-left: 0; }
  nav a { margin-left: 12px; }
}
