/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --dark: #0C0A18;
  --dark-secondary: #1E1A30;
  --dark-alt: #151225;
  --dark-def: #13102A;
  --accent: #E86A2D;
  --accent-dim: #C4883D;
  --muted: #3D3658;
  --text: #FFFFFF;
  --text-muted: #7A7490;
  --text-body: #B0ACC0;
  --border: #2A2640;
  --radius: 2px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* === Hero === */
.hero {
  padding: 40px 0 36px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 50% at 0% 50%, rgba(232, 106, 45, 0.04) 0%, transparent 70%),
    var(--dark);
}

.hero-layout {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 300px;
}

.hero-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(232, 106, 45, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(232, 106, 45, 0); }
}

.hero-sep {
  color: var(--muted);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.035em;
  line-height: 1.0;
  margin: 0;
}

.hero-right {
  max-width: 320px;
  flex-shrink: 0;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--dark);
}
.btn-primary:hover {
  background: #f07a3d;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-secondary:hover {
  background: rgba(232, 106, 45, 0.1);
  text-decoration: none;
}

/* === Status bar === */
.status-bar {
  background: var(--dark-def);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.status-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-wrap: wrap;
}

.status-bar-inner a {
  color: var(--accent);
  font-weight: 600;
}

.status-sep {
  color: var(--muted);
  font-size: 0.5rem;
}

/* === Tab bar === */
.grid-section {
  padding: 32px 0 20px;
}

.grid-section > .container {
  max-width: 100%;
  padding: 0 24px;
}

@media (min-width: 1600px) {
  .grid-section > .container {
    padding: 0 40px;
  }
}

@media (min-width: 1920px) {
  .grid-section > .container {
    padding: 0 60px;
  }
}

.tab-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
}

.tab {
  background: var(--dark-secondary);
  border: 1px solid var(--border);
  border-bottom: none;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 8px 16px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.15s;
  border-radius: 2px 2px 0 0;
}

.tab:hover {
  color: var(--text);
  background: var(--dark-alt);
}

.tab.active {
  color: var(--accent);
  background: var(--dark);
  border-color: var(--accent);
  border-bottom: 2px solid var(--dark);
  margin-bottom: -1px;
}

.tab-badge {
  font-size: 0.62rem;
  color: var(--muted);
  margin-left: 6px;
}

/* === Grid === */
.grid-wrapper { position: relative; }
.grid-wrapper.hidden { display: none; }

.grid-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.protocol-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 1200px;
}

.glance-grid { min-width: 700px; }

/* Sticky first column */
.sticky-col {
  position: sticky;
  left: 0;
  z-index: 10;
  background: inherit;
}

/* Category row */
.category-row th {
  background: var(--dark-def);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border: 1px solid var(--border);
  text-align: center;
}

.category-row .sticky-col { background: var(--dark-def); }

/* Header row */
.header-row th {
  background: var(--dark);
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 10px 8px;
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
  line-height: 1.3;
}

.header-row .sticky-col {
  text-align: left;
  padding-left: 16px;
  background: var(--dark);
  min-width: 180px;
}

/* Definition row */
.def-row th, .def-row td {
  background: var(--dark-def);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-style: italic;
  font-weight: 400;
  padding: 6px 8px;
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.def-row .sticky-col { background: var(--dark-def); }

/* Data rows */
.protocol-grid tbody tr { transition: background 0.15s; }

.protocol-grid tbody td {
  padding: 12px 10px;
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.protocol-grid tbody .protocol-name {
  text-align: left;
  padding-left: 16px;
  font-weight: 600;
  white-space: nowrap;
  min-width: 180px;
}

/* Alternating rows */
.protocol-grid tbody tr:nth-child(odd) td { background: var(--dark-alt); }
.protocol-grid tbody tr:nth-child(even) td { background: var(--dark-secondary); }
.protocol-grid tbody tr:nth-child(odd) .sticky-col { background: var(--dark-alt); }
.protocol-grid tbody tr:nth-child(even) .sticky-col { background: var(--dark-secondary); }

/* Highlighted row (STRK20s) */
.protocol-grid tbody tr.highlight td {
  background: var(--accent) !important;
  color: var(--dark);
}
.protocol-grid tbody tr.highlight .protocol-name { color: var(--dark); }
.protocol-grid tbody tr.highlight .tick-full { color: var(--dark); }
.protocol-grid tbody tr.highlight .tick-partial { color: #6B4420; }
.protocol-grid tbody tr.highlight .tick-dash { color: #8B5E3C; }

/* Tick styling */
.tick-full {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
}

.tick-partial {
  color: var(--accent-dim);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: help;
}

.tick-partial sup {
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: 2px;
  vertical-align: super;
  color: var(--text-muted);
}

.tick-dash {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Hover on rows (not highlighted) */
.protocol-grid tbody tr:not(.highlight):hover td {
  background: rgba(232, 106, 45, 0.06);
}

/* Legend */
.legend {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  flex-wrap: wrap;
}

.legend-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* === Share bar === */
.share-bar {
  display: flex;
  gap: 10px;
  padding: 12px 0 4px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
}

.download-btn {
  background: var(--dark-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.download-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
  text-decoration: none;
}

.twitter-btn {
  background: var(--dark-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.twitter-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
  text-decoration: none;
}

/* === Screen-reader / crawler only === */
.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;
}

/* === Footnotes & Definitions === */
.footnotes-section, .definitions-section {
  padding: 12px 0;
}

details {
  background: var(--dark-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

summary {
  padding: 14px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  user-select: none;
}

summary:hover { color: var(--accent); }

.footnote-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.footnotes-list {
  padding: 0 20px 20px;
}

.footnotes-list h4 {
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 8px;
  margin-top: 12px;
}

.footnote-item {
  font-size: 0.82rem;
  color: var(--text-body);
  padding: 4px 0;
  line-height: 1.5;
}

.footnote-item sup {
  color: var(--accent-dim);
  font-weight: 600;
  margin-right: 6px;
}

/* Definitions */
#definitions-list {
  padding: 0 20px 20px;
}

.def-category {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 20px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.def-category:first-child {
  margin-top: 8px;
  border-top: none;
  padding-top: 0;
}

.def-entry {
  margin-bottom: 12px;
}

.def-entry strong {
  color: var(--text);
  font-size: 0.85rem;
}

.def-entry p {
  color: var(--text-body);
  font-size: 0.82rem;
  line-height: 1.6;
  margin-top: 2px;
}

/* === How to contribute === */
.how-to-contribute {
  padding: 40px 0;
}

.how-to-contribute h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.contribute-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.contribute-list a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.12s;
}

.contribute-list a:last-child { border-bottom: none; }

.contribute-list a:hover {
  background: rgba(232, 106, 45, 0.04);
  text-decoration: none;
}

.cl-cmd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 180px;
  flex-shrink: 0;
}

.cl-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* === What is STRK20 === */
.what-is-strk20 {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.strk20-section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.what-is-strk20 h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0;
  flex-shrink: 0;
}

.strk20-lede {
  color: var(--text-body);
  font-size: 0.88rem;
  line-height: 1.5;
}

.strk20-defs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.strk20-def {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.strk20-def dt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 3px;
}

.strk20-def dd {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.strk20-honest {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 10px 16px;
  border-left: 2px solid var(--accent);
}

.strk20-honest-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 8px;
}

/* === Build with STRK20 === */
.build-strk20 {
  padding: 40px 0 36px;
  border-top: 1px solid var(--border);
}

.build-header {
  margin-bottom: 20px;
}

.build-header h2 {
  font-size: 1.4rem;
  margin-bottom: 0;
  letter-spacing: -0.02em;
}

/* STRK20 builder block */
.strk20-builder-block {
  background: var(--dark-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.strk20-builder-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.strk20-builder-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(232, 106, 45, 0.1);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.strk20-builder-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.strk20-meta-sep {
  color: var(--muted);
}

/* Bloomberg status row */
.strk20-status-row {
  display: flex;
  gap: 2px;
  margin-bottom: 14px;
}

.strk20-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  border-radius: 2px;
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-green {
  background: #00C853;
  box-shadow: 0 0 6px rgba(0, 200, 83, 0.5);
  animation: blink-green 1.5s ease-in-out infinite;
}

@keyframes blink-green {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(0, 200, 83, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 2px rgba(0, 200, 83, 0.2); }
}

.status-amber {
  background: #FFB300;
  box-shadow: 0 0 6px rgba(255, 179, 0, 0.4);
  animation: blink-amber 1s ease-in-out infinite;
}

@keyframes blink-amber {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-label {
  color: var(--text-muted);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.strk20-status-live .status-value {
  color: #00C853;
}

.strk20-status-upcoming .status-value {
  color: #FFB300;
  font-variant-numeric: tabular-nums;
}

.strk20-builder-resources {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.strk20-builder-resources a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-body);
  transition: color 0.15s;
  white-space: nowrap;
}

.strk20-builder-resources a:hover {
  color: var(--accent);
  text-decoration: none;
}

.strk20-builder-resources a::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  margin-right: 8px;
  vertical-align: middle;
}

.build-intro strong {
  color: var(--text);
}

.build-intro code {
  background: var(--dark-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Builder path cards */
.builder-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.builder-card {
  background: var(--dark-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}

.builder-card:hover {
  border-color: var(--accent);
}

.builder-card-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.builder-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--text);
}

.builder-who {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.builder-what {
  color: var(--text-body);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.builder-what code {
  background: rgba(232, 106, 45, 0.1);
  color: var(--accent);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.88em;
}

.builder-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.builder-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.15s;
}

.builder-links a:hover {
  color: #f07a3d;
}

.builder-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: var(--accent);
  color: var(--dark) !important;
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 600 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  width: fit-content;
  transition: background 0.15s;
}

.builder-cta-btn:hover {
  background: #f07a3d;
  text-decoration: none !important;
}

.cta-row-top {
  margin-bottom: 24px;
}

.cta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.cta-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--dark-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none;
}

.cta-card:hover {
  border-color: var(--accent);
  background: rgba(255, 165, 80, 0.04);
  text-decoration: none;
}

.cta-label {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
}

.cta-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  flex: 1;
}

.cta-arrow {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  margin-left: auto;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
}

.cta-card:hover .cta-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* === Footer === */
footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

footer p {
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-align: center;
}

.footer-note {
  margin-top: 4px;
  font-size: 0.62rem !important;
}

/* === Tooltip === */
.tooltip {
  position: fixed;
  display: none;
  background: var(--dark-secondary);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--text-body);
  max-width: 360px;
  line-height: 1.5;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.tooltip.visible { display: block; }

/* === Responsive === */
@media (max-width: 768px) {
  .hero { padding: 28px 0 24px; }
  .hero-layout { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-right { max-width: 100%; }
  .hero h1 { font-size: 2rem; }
  .container { padding: 0 16px; }
  .tab { padding: 8px 14px; font-size: 0.85rem; }
  .contribute-grid { grid-template-columns: 1fr; }
}
