* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
:root {
    --black: #000000; --gray-900: #111111; --gray-700: #374151;
    --gray-600: #4b5563; --gray-500: #6b7280; --gray-400: #9ca3af;
    --gray-300: #d1d5db; --gray-200: #e5e7eb; --gray-100: #f3f4f6;
    --gray-50: #f9fafb; --white: #ffffff;
    --font-sans: 'IBM Plex Sans', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}
html, body { height: 100%; }
body {
    font-family: var(--font-sans); background: var(--white);
    color: var(--black); display: flex; flex-direction: column; min-height: 100vh;
}
.stats-bar {
    display: flex; justify-content: center; gap: 3rem;
    padding: 0.75rem 2rem; border-bottom: 1px solid var(--gray-200);
    font-size: 0.8rem; color: var(--gray-500);
}
.stat { display: flex; align-items: center; gap: 0.4rem; }
.stat-value { font-family: var(--font-mono); font-weight: 400; color: var(--black); }
.stat-link {
    display: flex; align-items: center; gap: 0.4rem;
    text-decoration: none; color: inherit; padding: 0.25rem 0.5rem;
    border-radius: 4px; transition: background 0.15s;
}
.stat-link:hover { background: var(--gray-100); }
.stat-link:hover .stat-value { text-decoration: underline; }
.main {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; padding: 2rem; padding-top: 10vh;
}
.logo-section { text-align: center; margin-bottom: 2rem; }
.logo {
    display: flex; align-items: baseline; justify-content: center;
    gap: 0.25rem; margin-bottom: 0.5rem; user-select: none;
}
.logo a {
    display: flex; align-items: baseline; gap: 0.25rem;
    text-decoration: none; color: inherit;
}
.logo-text { font-size: 3.92rem; font-weight: 400; letter-spacing: -0.03em; }
.logo-mark {
    font-family: var(--font-mono); font-size: 2.42rem; color: #16a34a;
    animation: tau-spin 10s linear infinite; display: inline-block;
}
@keyframes tau-spin { from { transform: rotateY(0deg); } to { transform: rotateY(-360deg); } }
.logo-mascot { height: 1.76rem; image-rendering: pixelated; margin-bottom: 0.29rem; }
.logo-text-img { height: 4.13rem; image-rendering: pixelated; }
.logo-mark-img { height: 1.83rem; margin-left: -0.6rem; margin-bottom: 0.29rem; animation: tau-spin 10s linear infinite; }
.acronym {
    font-size: 0.75rem; font-family: var(--font-mono);
    letter-spacing: 0.02em; color: var(--gray-400); margin-bottom: 0.75rem;
}
.tagline { margin-top: 0; font-size: 0.85rem; color: var(--gray-500); line-height: 1.6; }
.tagline strong { color: var(--black); font-weight: 400; }
.positioning {
    margin-top: 0.75rem; font-size: 0.8rem; color: var(--gray-500);
    font-style: italic; letter-spacing: 0.01em;
}
.back-link {
    font-family: var(--font-mono); font-size: 0.7rem; color: var(--gray-300);
    text-decoration: none; position: absolute; top: 4rem; left: 2rem;
    transition: color 0.15s;
}
.back-link:hover { color: var(--gray-500); }
.pulse {
    display: inline-block; width: 6px; height: 6px; background: #16a34a;
    border-radius: 50%; margin-right: 0.25rem;
    animation: pulse-anim 10s ease-in-out infinite;
    vertical-align: middle;
}
@keyframes pulse-anim {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px 2px rgba(22,163,74,0.6); }
    50% { opacity: 0.2; box-shadow: none; }
}
.network-section {
    max-width: 900px; width: 100%; margin-bottom: 3rem;
    border-top: 1px solid var(--gray-200); padding-top: 2rem;
}
.section-title {
    font-size: 0.75rem; font-family: var(--font-mono); text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--gray-700); font-weight: 600; text-align: center;
    margin-bottom: 1.5rem;
}
.network-summary {
    display: flex; justify-content: center; gap: 3rem;
    margin-bottom: 2rem; flex-wrap: wrap;
}
.summary-item { text-align: center; }
.summary-label {
    font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--gray-400); margin-bottom: 0.15rem;
}
.summary-value {
    font-family: var(--font-mono); font-size: 0.75rem; color: var(--black);
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.node-table {
    width: 100%; border-collapse: collapse; font-size: 0.78rem;
}
.node-table th {
    font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--gray-500); font-weight: 500;
    padding: 0.5rem 0.6rem; text-align: left; border-bottom: 1px solid var(--gray-200);
}
.node-table td {
    font-family: var(--font-mono); padding: 0.55rem 0.6rem;
    border-bottom: 1px solid var(--gray-100); color: var(--black);
    white-space: nowrap;
}
.node-table tr:hover td { background: var(--gray-50); }
.status-dot {
    display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    margin-right: 0.3rem; vertical-align: middle;
}
.status-ok { background: #22c55e; }
.status-behind { background: #f59e0b; }
.status-down { background: #ef4444; }
.status-text { font-size: 0.7rem; }
.hash-cell {
    color: var(--gray-400); font-size: 0.7rem; max-width: 120px;
    overflow: hidden; text-overflow: ellipsis;
}
.chain-ok { color: #16a34a; font-size: 0.85rem; }
.chain-gap { color: #f59e0b; }
.chain-err { color: #ef4444; font-size: 0.85rem; }
.sub-title {
    font-size: 0.7rem; font-family: var(--font-mono); text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--gray-700); font-weight: 600; margin: 1.5rem 0 0.75rem;
}
.refresh-info {
    font-size: 0.65rem; color: var(--gray-300); font-family: var(--font-mono);
    text-align: center; margin-top: 0.5rem;
}
/* Alert banners for consensus health */
.alert-banner {
    max-width: 900px; width: 100%; padding: 0.75rem 1rem; margin-bottom: 1rem;
    border-radius: 6px; font-family: var(--font-mono); font-size: 0.75rem;
    text-align: center;
}
.alert-critical {
    background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b;
}
.alert-warning {
    background: #fffbeb; border: 1px solid #fcd34d; color: #92400e;
}
.alert-info {
    background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af;
}
/* Row highlighting for forked/split nodes */
.row-fork td { background: #fef2f2 !important; }
.row-genesis-split td { background: #fef2f2 !important; border-left: 3px solid #ef4444; }
.row-behind td { background: #fffbeb !important; }
/* Sortable table headers */
.node-table th.sortable {
    cursor: pointer; user-select: none; position: relative;
    transition: color 0.15s;
}
.node-table th.sortable:hover { color: var(--black); }
.node-table th.sortable .sort-arrow {
    font-size: 0.55rem; margin-left: 0.2rem; opacity: 0.3;
}
.node-table th.sortable.sort-active .sort-arrow { opacity: 1; color: #16a34a; }
/* Pagination controls */
.bonds-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 0.75rem; margin-top: 0.5rem; font-family: var(--font-mono);
    font-size: 0.65rem; color: var(--gray-400); font-weight: 600;
}
.bonds-pagination button {
    font-family: var(--font-mono); font-size: 0.65rem;
    background: none; border: 1px solid var(--gray-200);
    color: var(--gray-500); font-weight: 600; padding: 0.25rem 0.6rem;
    border-radius: 4px; cursor: pointer; transition: all 0.15s;
}
.bonds-pagination button:hover:not(:disabled) {
    border-color: var(--gray-400); color: var(--black);
}
.bonds-pagination button:disabled {
    opacity: 0.3; cursor: default;
}
footer {
    padding: 1.5rem 2rem; border-top: 1px solid var(--gray-200);
    font-size: 0.8rem; color: var(--gray-400); text-align: center;
}
footer a { color: var(--gray-500); text-decoration: none; margin: 0 0.5rem; }
footer .quote { font-style: italic; }
footer a:hover { color: var(--black); }
footer p { margin-bottom: 0; }
footer p:last-child { margin-top: 0.5rem; }
@media (max-width: 700px) {
    .stats-bar { gap: 0.8rem; font-size: 0.65rem; flex-wrap: wrap; padding: 0.5rem 1rem; }
    .main { padding: 1rem; padding-top: 4vh; }
    .logo-text { font-size: 3.92rem; }
    .logo-mark { font-size: 2.42rem; }
    .logo-mascot { height: 1.5rem; margin-bottom: 0.15rem; }
    .logo-text-img { height: 2.76rem; }
    .logo-mark-img { height: 1.19rem; margin-left: -0.5rem; margin-bottom: 0.25rem; -webkit-animation: tau-spin 10s linear infinite; animation: tau-spin 10s linear infinite; }
    .acronym { font-size: 0.6rem; }
    .back-link { top: 3rem; left: 0.75rem; font-size: 0.6rem; }
    .network-section { margin-bottom: 2rem; padding-top: 1.5rem; }
    .network-summary { gap: 0.6rem 1.2rem; }
    .summary-label { font-size: 0.55rem; }
    .summary-value { font-size: 0.65rem; }
    .section-title { font-size: 0.65rem; }
    .sub-title { font-size: 0.6rem; margin: 1rem 0 0.5rem; }
    .node-table { font-size: 0.6rem; }
    .node-table th { font-size: 0.5rem; padding: 0.35rem 0.3rem; }
    .node-table td { padding: 0.4rem 0.3rem; }
    .hash-cell { display: none; }
    .node-table th:nth-child(4),
    .node-table td:nth-child(4) { display: none; }
    .node-table th:nth-child(6),
    .node-table td:nth-child(6) { display: none; }
    .refresh-info { font-size: 0.55rem; }
    footer { font-size: 0.65rem; padding: 1rem; }
    .alert-banner { font-size: 0.65rem; padding: 0.5rem 0.75rem; }
}
@media (max-width: 420px) {
    .stats-bar { gap: 0.5rem; font-size: 0.6rem; }
    .logo-text { font-size: 3.92rem; }
    .logo-mark { font-size: 2.42rem; }
    .node-table { font-size: 0.55rem; }
    .node-table th { font-size: 0.45rem; padding: 0.3rem 0.2rem; }
    .node-table td { padding: 0.35rem 0.2rem; }
    .node-table th:nth-child(2),
    .node-table td:nth-child(2) { display: none; }
    .network-summary { gap: 0.4rem 0.8rem; }
    .summary-value { font-size: 0.6rem; }
}
