/* Valmy design system: tokens, type, shared components.
   Same visual language as the valmy.trade waitlist pages (landing-preview). */

@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/geist-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/geist-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/geist-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/geist-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/geist-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/geist-mono-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/geist-mono-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Doto'; font-style: normal; font-weight: 900; font-display: swap; src: url(/assets/fonts/doto-latin-900-normal.woff2) format('woff2'); }

:root {
  color-scheme: dark;
  /* surfaces, darkest to lightest */
  --bg: #0C0D0F;
  --bg-alt: #0E1013;
  --inset: #0F1114;
  --surface: #111317;
  --surface-2: #131519;
  --surface-3: #1A1D22;
  --surface-4: #23272E;
  /* lines */
  --line: #1B1E23;
  --line-2: #1F2328;
  --border: #262A31;
  --border-2: #2E333B;
  --border-3: #3A3F48;
  /* text */
  --text: #EDEEF0;
  --text-2: #DADDE1;
  --text-3: #C9CDD3;
  --muted: #A8AEB7;
  --muted-2: #8E949E;
  --muted-3: #7D838E;
  /* brand */
  --accent: #C8F560;            /* crypto + Valmy */
  --accent-ink: #0C0D0F;
  --accent-wash: rgba(200, 245, 96, 0.10);
  --accent-line: rgba(200, 245, 96, 0.32);
  --stocks: #FFB547;            /* stocks market accent */
  --neg: #FF7B72;               /* losses, destructive */
  --neg-wash: rgba(255, 123, 114, 0.10);
  --warn: #FFB547;
  --info: #7DB2FF;
  /* categorical chart slots, validated for the dark surface (allocation, multi-series) */
  --cat-1: #86AD35; --cat-2: #338CED; --cat-3: #E76624; --cat-4: #9887EF;
  /* type */
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --pixel: 'Doto', 'Geist Mono', monospace;
  --r-sm: 5px; --r: 8px; --r-lg: 12px;
  --shadow-pop: 0 20px 40px -12px rgba(0, 0, 0, 0.7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
svg.ic { width: 16px; height: 16px; flex: none; }
a { color: var(--text-3); text-decoration: none; }
a:hover { color: #FFFFFF; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
input::placeholder, textarea::placeholder { color: var(--muted-3); }
.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; }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--accent); }
.neg { color: var(--neg); }
.muted { color: var(--muted-2); }

/* ---------- Logo ---------- */
@keyframes v-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes v-pulse { 0% { box-shadow: 0 0 0 0 rgba(200,245,96,.55); } 100% { box-shadow: 0 0 0 9px rgba(200,245,96,0); } }
.logo { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-weight: 600; font-size: 21px; letter-spacing: -0.03em; color: var(--text); line-height: 1; }
.logo:hover { color: var(--text); }
.logo-caret { display: inline-block; width: 10px; height: 19px; background: var(--accent); animation: v-caret 1.1s steps(1) infinite; }
.logo-sm { font-size: 17px; }
.logo-sm .logo-caret { width: 8px; height: 15px; }

/* ---------- Labels, tags, pills ---------- */
.kicker { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-3); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 7px; border: 1px solid var(--border-2); border-radius: 4px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tag-accent { border-color: var(--accent-line); color: var(--accent); }
.tag-stocks { border-color: rgba(255,181,71,.35); color: var(--stocks); }
.tag-neg { border-color: rgba(255,123,114,.35); color: var(--neg); }
.tag-paper { border-color: rgba(125,178,255,.35); color: var(--info); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-3); flex: none; display: inline-block; }
.dot-on { background: var(--accent); }
.dot-pulse { background: var(--accent); animation: v-pulse 1.8s ease-out infinite; }
.dot-warn { background: var(--warn); }
.dot-neg { background: var(--neg); }
.dot-stocks { background: var(--stocks); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border: 1px solid #2A2E35; border-radius: 999px; background: #121418; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: #B9BEC6; }
.state { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11px; color: var(--muted-3); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 36px; padding: 0 14px; border-radius: 7px; border: 1px solid transparent; font-family: var(--sans); font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 -2px 0 rgba(0,0,0,0.22), 0 10px 30px -12px rgba(200,245,96,.45); }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.06); }
.btn-light { background: var(--text); color: var(--accent-ink); box-shadow: inset 0 -2px 0 rgba(0,0,0,0.22); }
.btn-light:hover { color: var(--accent-ink); background: #FFFFFF; }
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--text-2); }
.btn-ghost:hover { background: #15181C; color: #FFFFFF; }
.btn-quiet { background: transparent; color: var(--muted); padding: 0 10px; }
.btn-quiet:hover { color: var(--text); background: #15181C; }
.btn-danger { background: transparent; border-color: rgba(255,123,114,.45); color: var(--neg); }
.btn-danger:hover { background: var(--neg-wash); color: #FF9A93; }
.btn-danger-solid { background: var(--neg); color: #1A0B0A; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.22); }
.btn-lg { height: 48px; padding: 0 18px 0 20px; font-size: 15px; border-radius: 8px; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: none; }
.kbd { font-family: var(--mono); font-size: 11px; line-height: 1; padding: 4px 6px; border-radius: 4px; background: rgba(12,13,15,0.10); border: 1px solid rgba(12,13,15,0.28); }
.kbd-dark { background: var(--surface-3); border-color: var(--border-2); color: var(--muted); }

.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted-2); }
.icon-btn:hover { color: var(--text); background: #15181C; border-color: var(--border); }
.icon-btn svg { width: 18px; height: 18px; }

.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #23272E; border: 1px solid var(--border-2); font-size: 12.5px; font-weight: 600; color: var(--text-2); }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.inset { background: var(--inset); border: 1px solid #22262C; border-radius: var(--r); }
.receipt { padding: 11px 12px; border: 1px solid #22262C; border-radius: var(--r); background: var(--inset); font-family: var(--mono); font-size: 11.5px; line-height: 1.4; color: var(--text-3); }
.dotgrid { background-image: radial-gradient(rgba(237,238,240,0.11) 1px, transparent 1.4px); background-size: 24px 24px; }
/* corner-bracket frame used around featured product visuals */
.frame { position: relative; padding: 10px; }
.frame::before, .frame::after, .frame > .frame-b::before, .frame > .frame-b::after { content: ""; position: absolute; width: 16px; height: 16px; border-color: var(--border-3); border-style: solid; pointer-events: none; }
.frame::before { top: 0; left: 0; border-width: 1px 0 0 1px; }
.frame::after { top: 0; right: 0; border-width: 1px 1px 0 0; }
.frame > .frame-b::before { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.frame > .frame-b::after { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

/* ---------- Pixel marks (5×5 grids drawn with box-shadow, like the agent icons) ---------- */
.px { flex: none; position: relative; width: 30px; height: 30px; border-radius: 7px; background: #1A1D22; border: 1px solid #2A2E35; }
.px > i { position: absolute; left: -3px; top: -3px; width: 4px; height: 4px; }
.px-sm { width: 24px; height: 24px; border-radius: 6px; }
.px-sm > i { transform: scale(.78); transform-origin: 0 0; left: -2.25px; top: -2.25px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span, .field > label { font-size: 13px; font-weight: 500; color: var(--text-3); }
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 14px; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r); color: var(--text); font-size: 15px; outline: none; }
.textarea { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238E949E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); }
.input-mono { font-family: var(--mono); font-size: 14px; }
.hint { font-family: var(--mono); font-size: 11.5px; color: var(--muted-3); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-3); cursor: pointer; }
.check input { margin: 3px 0 0; accent-color: var(--accent); width: 15px; height: 15px; }

/* ---------- Segmented control ---------- */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; }
.seg > a, .seg > button { padding: 6px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted-2); display: inline-flex; align-items: center; gap: 7px; line-height: 1.2; }
.seg > a:hover, .seg > button:hover { color: var(--text); }
.seg > [aria-current="page"], .seg > [aria-pressed="true"], .seg > [aria-selected="true"] { background: var(--surface-4); color: var(--text); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-3); padding: 0 12px 9px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); color: var(--text-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table td.num, .table td .num { font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.table tbody tr:hover td { background: rgba(255,255,255,0.015); }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }

/* ---------- Disclosure (FAQ) ---------- */
.faq { border-bottom: 1px solid var(--line-2); }
.faq details { border-top: 1px solid var(--line-2); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 20px 0; font-size: 17px; font-weight: 500; color: var(--text-2); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover, .faq details[open] summary { color: #FFFFFF; }
.faq summary .q { flex: 1; }
.faq .plus { color: var(--accent); font-family: var(--mono); font-size: 20px; line-height: 1; transition: transform .15s; }
.faq details[open] .plus { transform: rotate(45deg); }
.faq .a { padding: 0 48px 22px 0; color: var(--muted); font-size: 15.5px; line-height: 1.65; max-width: 720px; }
.faq .a p { margin: 0 0 10px; }

/* ---------- Tooltip used by charts ---------- */
.v-tip { position: absolute; z-index: 20; pointer-events: none; min-width: 120px; padding: 8px 10px; background: var(--surface-3); border: 1px solid #343941; border-radius: 8px; box-shadow: var(--shadow-pop); font-size: 12px; }
.v-tip .t-date { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; color: var(--muted-3); margin-bottom: 5px; text-transform: uppercase; }
.v-tip .t-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.v-tip .t-key { width: 10px; height: 2px; border-radius: 1px; flex: none; }
.v-tip .t-val { font-family: var(--mono); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.v-tip .t-name { color: var(--muted-2); }

/* ---------- Shared data components (app + site) ---------- */
.body { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); }
.err { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid rgba(255,123,114,.35); border-radius: 8px; background: var(--neg-wash); color: #FFB3AD; font-size: 13.5px; }
.kv { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px 18px; }
.kv > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kv dt, .kv .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-3); }
.kv dd, .kv .v { margin: 0; font-family: var(--mono); font-size: 13.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.diff { font-family: var(--mono); font-size: 12.5px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.diff div { padding: 7px 12px; color: var(--muted-2); white-space: pre-wrap; }
.diff .del { color: #8E949E; background: rgba(255,123,114,.04); }
.diff .del::before { content: "−  "; color: var(--neg); }
.diff .add { background: rgba(200,245,96,.06); color: var(--accent); border-top: 1px solid var(--line-2); }
.diff .add::before { content: "+  "; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.legend i.line { height: 2px; border-radius: 1px; width: 14px; }
.legend em { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--muted-3); }
.rule { display: grid; grid-template-columns: 54px 1fr; gap: 6px 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.rule + .rule { margin-top: 8px; }
.rule .w { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-3); padding-top: 3px; }
.rule .w.then { color: var(--accent); }
.rule p { margin: 0; font-size: 14px; color: var(--text-2); }
.rule code { font-family: var(--mono); font-size: 12.5px; padding: 1px 6px; border-radius: 4px; background: var(--surface-3); border: 1px solid var(--border); color: var(--text); }
.rule-n { grid-column: 1 / -1; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-3); padding-bottom: 6px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
