/* Tex Chain explorer: TexOne's tokens (light and dark), Poppins, sharp text */
@font-face { font-family: "Poppins"; src: url("/assets/fonts/Poppins-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/Poppins-Medium.ttf") format("truetype"); font-weight: 500 700; font-display: swap; }

:root { --glow: rgba(202, 24, 74, .35); --lane: rgba(110, 110, 115, .16); --lane-on: var(--accent); }
:root[data-theme="dark"] { --desk: #0F0F12; --bg: #16161A; --card: #1D1D22; --border: #2C2C33; --glow: rgba(225, 101, 134, .35); --lane: rgba(152, 152, 157, .13); }

* { box-sizing: border-box; }
html { font-synthesis: none; }
body { margin: 0; background: var(--desk); color: var(--text); font: 400 15px/1.6 var(--font-ui); }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 500; margin: 0; }
.sub { color: var(--sub); }
.small { font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* one top band, sticky, full width (never a second bar) */
.bar { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--border); }
.bar-in { max-width: 1240px; margin: 0 auto; padding: 0 16px; height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { font-size: 20px; font-weight: 500; letter-spacing: -.2px; }
.brand span { color: var(--accent); }
.menu { display: flex; gap: 22px; font-size: 14px; color: var(--sub); }
.menu a:hover { color: var(--text); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.status { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-size: 12.5px; color: var(--sub); box-shadow: 0 8px 24px -14px rgba(0,0,0,.5); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(212,147,0,.18); }

/* the page head: centred, the lanes moving slowly behind, blurred */
.head { position: relative; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--border); }
.head-lanes { position: absolute; inset: 0; width: 100%; height: 100%; filter: blur(1.5px); opacity: .9; }
.head-in { position: relative; max-width: 760px; margin: 0 auto; padding: 72px 16px 64px; text-align: center; }
.head h1 { font-size: 40px; line-height: 1.15; letter-spacing: -.5px; }
.head-in > p { color: var(--sub); margin: 12px 0 28px; }
.find { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 20px; border-radius: 999px; border: 1px solid var(--border); background: var(--field); box-shadow: 0 10px 30px -16px rgba(0,0,0,.55); }
.find:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.find input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 400 15px var(--font-ui); height: 38px; }
.find .btn { border-radius: 999px; padding: 8px 22px; box-shadow: 0 6px 18px -8px var(--glow); }
.find-note { margin: 14px 0 0; font-size: 13.5px; color: var(--sub); }

main { max-width: 1240px; margin: 0 auto; padding: 28px 16px 64px; }

/* the chain now: even boxes, numbers first */
.stats { display: grid; grid-template-columns: 1.7fr 1.3fr repeat(3, 1fr); gap: 12px; }
.stat { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat .label { font-size: 12.5px; color: var(--sub); }
.stat .value { font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .value small { font-size: 14px; color: var(--sub); font-weight: 400; }
.stat .value.small { font-size: 17px; }
.stat .hint { font-size: 12px; color: var(--sub); }
.stat.wide .value { font-size: 30px; color: var(--text); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.panel { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.panel h2 { font-size: 16px; }

/* tables: the portal's style */
.rows { width: 100%; border-collapse: collapse; font-size: 14px; }
.rows th { text-align: left; font-weight: 400; color: var(--sub); font-size: 12.5px; padding: 10px 10px; border-bottom: 1px solid var(--border); }
.rows td { padding: 12px 10px; border-bottom: 1px solid var(--border); }
.rows tr:last-child td { border-bottom: 0; }
.rows .empty td { color: var(--sub); text-align: center; padding: 28px 10px; }
.rows.big td { padding: 14px 10px; }
.key { font: 400 13px ui-monospace, "JetBrains Mono", monospace; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.key.copied { color: var(--success); background: var(--success-soft); }

.section { margin-top: 56px; }
.section h2 { font-size: 24px; }
.lead { color: var(--sub); max-width: 760px; margin: 8px 0 20px; }

/* lanes: the 65,536 addresses, the active ones lit */
.lanes-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; }
#lane-grid { width: 100%; height: 420px; display: block; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; flex-direction: column; padding: 14px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); }
.steps li b { font-weight: 500; font-size: 18px; }
.steps li span { font-size: 13px; color: var(--sub); }
.steps li.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* the map: density only */
.map-wrap { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
#map { width: 100%; aspect-ratio: 2.08 / 1; display: block; }
#map path { fill: rgba(152, 152, 157, .22); stroke: var(--bg); stroke-width: .5; }
.map-key { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--sub); margin-top: 8px; }
.map-key i { width: 120px; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--accent-soft), var(--accent)); }
.map-note { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); margin: 0; padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); color: var(--sub); font-size: 13px; }

/* the falling scale */
.chart-wrap { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.chart-head h3 { font-size: 15px; }
#scale { width: 100%; height: 280px; display: block; }
#scale .area { fill: var(--accent); opacity: .16; }
#scale .line { fill: none; stroke: var(--accent); stroke-width: 2; }
#scale .grid { stroke: var(--border); stroke-width: 1; }
#scale text { fill: var(--sub); font: 400 11.5px var(--font-ui); }
#scale .cross { stroke: var(--sub); stroke-width: 1; stroke-dasharray: 3 3; }
#scale .dot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.tip { position: absolute; pointer-events: none; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; box-shadow: 0 10px 30px -14px rgba(0,0,0,.5); white-space: nowrap; }
.tip b { font-weight: 500; }

.rules { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rules li { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; color: var(--sub); }
.rules b { color: var(--text); font-weight: 500; }

/* the footer: one full-width line, copyright at the far right */
.foot { border-top: 1px solid var(--border); background: var(--bg); }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 18px 16px; display: flex; justify-content: space-between; font-size: 13px; color: var(--sub); }

@media (max-width: 980px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat.wide { grid-column: 1 / -1; }
  .grid2, .lanes-wrap, .rules { grid-template-columns: 1fr; }
  .menu { display: none; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .head h1 { font-size: 30px; }
  .status { display: none; }
  .rows th:nth-child(4), .rows td:nth-child(4) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .head-lanes { display: none; } }

/* ---- pages, light first (founder, 2026-12-04: white is the default) ---- */
.menu a[aria-current="page"] { color: var(--text); font-weight: 500; }
.head.small .head-in { padding: 48px 16px 40px; }
.head.small h1 { font-size: 32px; }
.head.small .head-in > p { margin-bottom: 0; }

/* sections rise in as the page is scrolled */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* links to the other pages: plain, typographic */
.next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.next a { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; transition: border-color .2s; }
.next a:hover { border-color: var(--accent); }
.next b { font-weight: 500; }
.next span { color: var(--sub); font-size: 13.5px; }

/* a TID, read */
.tid-card { max-width: 760px; margin: 24px auto 0; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 18px 22px; text-align: left; box-shadow: 0 12px 30px -20px rgba(0,0,0,.35); }
.tid-card.bad { border-color: var(--accent); }
.tid-card h3 { font-size: 16px; margin-bottom: 4px; }
.tid-card p { margin: 0; color: var(--sub); }
.tid-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tid-text { font: 500 17px ui-monospace, "JetBrains Mono", monospace; letter-spacing: .5px; }
.tid-card dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.tid-card dt { color: var(--sub); }
.tid-card dd { margin: 0; }
.types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.types div { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; display: flex; justify-content: space-between; font-size: 14px; }
.types code { font: 500 13px ui-monospace, monospace; color: var(--accent); }

.stats.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .next, .types { grid-template-columns: 1fr 1fr; } .stats.three { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .next, .types { grid-template-columns: 1fr; } .tid-card dl { grid-template-columns: 1fr; } }
