
/* Layout: "trading terminal" — dark-first. Home = firm board (cards with code + key facts).
   Firm view = sticky firm bar, plan tabs, size ticks, key-number tape, three rule columns, firm-wide rules. */
:root {
  --bg: #050706;
  --surface: #0c100e;
  --raise: #121815;
  --line: #1c2420;
  --ink: #f4f6f5;
  --muted: #a3aaa6;
  --accent: #2fcf75;          /* FundedRulebook green, from the logo */
  --accent-ink: #03140a;
  --accent-soft: rgba(47, 207, 117, 0.12);
  --up: #2fcf75;
  --down: #ef5b5b;
  --warn: #f2b233;
  --warn-soft: rgba(242, 178, 51, 0.08);
  --font-display: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f5f4; --surface: #ffffff; --raise: #f7f9f8; --line: #dde3e0; --ink: #0b0f0d; --muted: #59625d;
    --accent: #11904d; --accent-ink: #ffffff; --accent-soft: rgba(17, 144, 77, 0.10);
    --up: #11904d; --down: #c43c3c; --warn: #9a6200; --warn-soft: rgba(185, 119, 0, 0.08);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3f5f4; --surface: #ffffff; --raise: #f7f9f8; --line: #dde3e0; --ink: #0b0f0d; --muted: #59625d;
  --accent: #11904d; --accent-ink: #ffffff; --accent-soft: rgba(17, 144, 77, 0.10);
  --up: #11904d; --down: #c43c3c; --warn: #9a6200; --warn-soft: rgba(185, 119, 0, 0.08);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.55; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); }
a { color: var(--accent); text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* top bar */
.bar { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
.bar .wrap { display: flex; align-items: center; gap: 14px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 26px; height: 26px; display: grid; place-items: center; border: 1.5px solid var(--accent); border-radius: 5px; color: var(--accent); font-family: var(--font-mono); font-weight: 600; font-size: 12px; }
.brand b { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.brand b span { color: var(--accent); }
.brand svg { width: 38px; height: 30px; flex: none; }
.bar .spacer { flex: 1; }
.bar .asof { font-size: 12px; color: var(--muted); }
.tick { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--up); margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 20%, transparent); }

/* home */
.hero { padding-block: 44px 26px; display: grid; gap: 14px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(34px, 5.4vw, 58px); line-height: 1.04; font-weight: 700; letter-spacing: -0.015em; margin: 0; letter-spacing: 0.005em; text-wrap: balance; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 0; color: var(--muted); max-width: 62ch; font-size: 16px; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-block: 6px 18px; }
.search { flex: 1 1 260px; max-width: 420px; font: inherit; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.pill[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding-block: 4px 40px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; cursor: pointer; transition: border-color 0.15s, transform 0.15s; text-align: left; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
@media (prefers-reduced-motion: no-preference) { .card:hover { transform: translateY(-2px); } }
.card .top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card h2 { font-family: var(--font-display); font-weight: 600; font-size: 21px; margin: 0; line-height: 1.05; }
.card .host { font-size: 12px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts > div { padding: 10px 0; min-width: 0; }
.facts > div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.facts .k { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-family: var(--font-mono); }
.facts .v { font-family: var(--font-mono); font-size: 16px; font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-family: var(--font-mono); font-size: 11px; padding: 3px 8px; border-radius: 4px; background: var(--raise); border: 1px solid var(--line); color: var(--muted); letter-spacing: 0.04em; }
.code { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px dashed color-mix(in srgb, var(--accent) 60%, var(--line)); background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; }
.code .lbl { font-size: 11px; color: var(--muted); font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.code .val { font-family: var(--font-mono); font-weight: 600; font-size: 15px; color: var(--accent); }
.code.soon { border-color: var(--line); background: transparent; }
.code.soon .val { color: var(--muted); font-weight: 500; font-size: 13px; }
.copy { border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* firm view */
.crumbs { padding-block: 22px 6px; font-size: 13px; }
.crumbs button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; }
.crumbs button:hover { color: var(--ink); }
.firmhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: end; padding-block: 6px 18px; border-bottom: 1px solid var(--line); }
.firmhead h1 { font-family: var(--font-display); font-size: clamp(30px, 4.6vw, 48px); line-height: 1.05; letter-spacing: -0.015em; margin: 0; font-weight: 700; }
.firmhead .meta { color: var(--muted); font-size: 14px; margin-top: 6px; }
.firmhead .code { min-width: 260px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding-block: 16px 4px; scrollbar-width: thin; }
.tab { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 8px 14px; cursor: pointer; font-size: 14px; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; padding-block: 10px 4px; align-items: center; }
.sizes .eyebrow { margin-right: 6px; }
.size { font-family: var(--font-mono); border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.size[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.plansum { margin: 16px 0 0; max-width: 78ch; color: var(--ink); }
.price { margin-top: 6px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.tape { margin-top: 18px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.tape > div { padding: 14px 16px; min-width: 0; }
.tape > div + div { border-left: 1px solid var(--line); }
.tape .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tape .v { font-family: var(--font-mono); font-size: 16px; font-weight: 600; margin-top: 6px; line-height: 1.3; overflow-wrap: break-word; text-wrap: balance; }
.tape .v.dd { color: var(--down); }
.tape .v.up { color: var(--up); }

.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; align-items: start; }
.col { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.col header { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 10px; }
.col header .n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.col header h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin: 0; }
.col dl { margin: 0; padding: 4px 16px 10px; }
.col .row { padding-block: 10px; border-top: 1px solid var(--line); }
.col .row:first-child { border-top: 0; }
.col dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.col dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 14.5px; }
.col dd.none { color: var(--muted); font-style: italic; }
.col .empty { padding: 16px; color: var(--muted); margin: 0; }

.heads { margin-top: 26px; border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line)); background: var(--warn-soft); border-radius: 10px; }
.heads summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; gap: 10px; align-items: center; }
.heads summary::-webkit-details-marker { display: none; }
.heads summary .cnt { font-family: var(--font-mono); font-size: 12px; color: var(--warn); border: 1px solid currentColor; border-radius: 4px; padding: 1px 6px; }
.heads summary::after { content: "+"; margin-left: auto; font-family: var(--font-mono); color: var(--muted); }
.heads[open] summary::after { content: "−"; }
.heads ul { margin: 0; padding: 0 16px 16px 34px; display: grid; gap: 10px; }
.heads li { overflow-wrap: anywhere; font-size: 14px; }

.general { margin-top: 34px; }
.general h2 { font-family: var(--font-display); font-size: 24px; margin: 0; font-weight: 700; }
.general .sub { color: var(--muted); margin: 4px 0 14px; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.rules li { padding-block: 14px; border-top: 1px solid var(--line); min-width: 0; }
.rules .t { font-weight: 600; }
.rules .r { margin: 3px 0 4px; overflow-wrap: anywhere; font-size: 14.5px; }
.src { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.src a { color: var(--muted); }
.srcs { margin-top: 28px; font-size: 13px; }
.srcs ul { padding-left: 18px; overflow-wrap: anywhere; }
mark { background: var(--accent-soft); color: inherit; border-radius: 2px; }

footer { border-top: 1px solid var(--line); margin-top: 40px; }
footer .wrap { padding-block: 22px 40px; color: var(--muted); font-size: 13px; display: grid; gap: 8px; max-width: 1120px; }

@media (max-width: 900px) {
  .tape { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tape > div:nth-child(4) { border-left: 0; }
  .tape > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .rules { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .firmhead { grid-template-columns: minmax(0, 1fr); }
  .firmhead .code { min-width: 0; }
  .tape { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tape > div:nth-child(n) { border-left: 0; border-top: 1px solid var(--line); }
  .tape > div:nth-child(even) { border-left: 1px solid var(--line); }
  .tape > div:nth-child(-n+2) { border-top: 0; }
  .bar .asof { display: none; }
  .board { grid-template-columns: minmax(0, 1fr); }
}

.ident { display: flex; align-items: center; gap: 12px; min-width: 0; }
.code .pub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.code .lbl { overflow-wrap: anywhere; }
.mono-badge { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--raise); border: 1px solid var(--line); color: var(--accent); font-family: var(--font-mono); font-weight: 600; font-size: 13px; letter-spacing: 0.02em; }
.mono-badge.lg { width: 60px; height: 60px; border-radius: 12px; font-size: 17px; }
.mono-badge img { width: 100%; height: 100%; object-fit: contain; padding: 6px; border-radius: inherit; }
.card .top { align-items: center; }
.ident .nm { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ident .nm .host { overflow-wrap: anywhere; }
.firmhead .ident { align-items: center; gap: 16px; }

.navlinks { display: flex; gap: 16px; font-size: 14px; }
.navlinks a { color: var(--muted); text-decoration: none; }
.navlinks a:hover { color: var(--ink); }
.card { position: relative; }
.card h2 a.stretch { color: inherit; text-decoration: none; }
.card h2 a.stretch::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.card .code { position: relative; z-index: 1; }
.card:focus-within { border-color: var(--accent); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.ov { margin-top: 34px; }
.ov h2, .prose h2 { font-family: var(--font-display); font-size: 24px; margin: 0; font-weight: 700; }
.ov .sub { color: var(--muted); margin: 4px 0 14px; }
.ov h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin: 22px 0 4px; }
.ov p.s { margin: 0 0 10px; color: var(--muted); max-width: 80ch; font-size: 14.5px; }
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table.t { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 13.5px; }
table.t th, table.t td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
table.t td.sz { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
.prose { max-width: 70ch; padding-block: 34px 10px; }
.prose p, .prose li { color: var(--ink); }
.prose h1 { font-family: var(--font-display); font-size: clamp(34px, 5vw, 52px); margin: 0 0 12px; line-height: 1.05; }
.explorer-h { font-family: var(--font-display); font-size: 24px; margin: 34px 0 0; font-weight: 700; }
@media (max-width: 620px) { .navlinks { display: none; } }
