@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,400;0,500;0,600;0,700;0,800&display=swap");

:root {
  --paper: #f4f1ea;
  --paper-2: #ece7db;
  --paper-3: #e2dccb;
  --ink: #1a1a1a;
  --ink-2: #3a3a3a;
  --ink-3: #6e6e6e;
  --ink-4: #9c9790;
  --rule: #cfc8b7;
  --rule-strong: #1a1a1a;
  --accent: #d88060;
  --accent-strong: #c56442;

  --c-events: #6aa86e;
  --c-careers: #7aa8cd;
  --c-bounties: #d88060;
  --c-community: #a795c8;
  --c-programs: #d9a85a;

  --sh-1: 2px 2px 0 rgba(26,26,26,0.9);
  --sh-2: 3px 3px 0 rgba(26,26,26,0.85);
  --sh-3: 4px 4px 0 rgba(26,26,26,0.8);
  --sh-hover: 5px 5px 0 rgba(26,26,26,0.85);

  --mono: "Roboto Mono", "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --container: 1280px;
  --nav-height: auto;
  --radius: 0;
  --transition: 0.15s;

  /* Legacy aliases for sub-page backward compatibility */
  --bg: var(--paper);
  --bg-alt: var(--paper-2);
  --card: var(--paper);
  --card2: var(--paper-2);
  --yellow: var(--accent);
  --violet: var(--c-community);
  --green: var(--c-events);
  --orange: var(--c-programs);
  --cyan: var(--c-careers);
  --pink: var(--c-community);
  --blue: var(--c-careers);
  --teal: var(--c-events);
  --red: var(--accent-strong);
  --text: var(--ink);
  --text2: var(--ink-2);
  --muted: var(--ink-4);
  --shadow: var(--sh-1);
  --shadow-md: var(--sh-2);
  --shadow-lg: var(--sh-3);
  --shadow-xl: var(--sh-hover);
  --accent-light: rgba(216,128,96,0.12);
  --accent-bg: rgba(216,128,96,0.06);
  --success-light: rgba(106,168,110,0.12);
  --warning-light: rgba(217,168,90,0.12);
  --error-light: rgba(197,100,66,0.12);
  --text-secondary: var(--ink-2);
  --text-muted: var(--ink-4);
  --math: var(--c-careers);
  --math-light: rgba(122,168,205,0.12);
  --cs: var(--c-events);
  --cs-light: rgba(106,168,110,0.12);
  --english: var(--c-programs);
  --english-light: rgba(217,168,90,0.12);
  --ss: var(--c-community);
  --ss-light: rgba(167,149,200,0.12);
  --border: var(--rule);
  --error: var(--accent-strong);
  --success: var(--c-events);
  --warning: var(--c-programs);
  --radius-sm: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --green-light: rgba(106,168,110,0.12);
  --cyan-light: rgba(122,168,205,0.12);
  --rose: var(--c-community);
  --pink-light: rgba(167,149,200,0.12);
  --orange-light: rgba(217,168,90,0.12);
  --fire: var(--accent-strong);
  --bg-elevated: var(--paper-2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  background-image: radial-gradient(circle at 1px 1px, rgba(26,26,26,.055) 1px, transparent 0);
  background-size: 18px 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--paper); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  font-family: var(--mono);
}
h1 { font-size: clamp(1.8em, 4vw, 2.8em); }
h2 { font-size: clamp(1.3em, 3vw, 1.8em); }
h3 { font-size: clamp(1em, 2vw, 1.3em); }
h4 { font-size: 1em; }
p { margin-bottom: 1em; color: var(--ink-2); }
strong { font-weight: 700; color: var(--ink); }
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  padding: 2px 6px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

/* --- Dot indicator (px) --- */
.px {
  display: inline-block;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  vertical-align: 2px;
  flex-shrink: 0;
}
.px-6 { width: 6px; height: 6px; border-width: 1px; }
.px-10 { width: 10px; height: 10px; }
.px-12 { width: 12px; height: 12px; }
.px-events { background: var(--c-events); border-color: var(--c-events); }
.px-careers { background: var(--c-careers); border-color: var(--c-careers); }
.px-bounties { background: var(--c-bounties); border-color: var(--c-bounties); }
.px-community { background: var(--c-community); border-color: var(--c-community); }
.px-programs { background: var(--c-programs); border-color: var(--c-programs); }
.px-ink { background: var(--ink); border-color: var(--ink); }
.px-white { background: var(--paper); border-color: var(--paper); }
.px-accent { background: var(--accent); border-color: var(--accent); }

/* --- Label --- */
.cx-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cx-label-ink { color: var(--ink); }

/* --- Panel --- */
.cx-panel {
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-2);
  position: relative;
  background: var(--paper);
}
.cx-panel-ink { background: var(--ink); color: var(--paper); }
.cx-panel-paper2 { background: var(--paper-2); }

/* --- Corner dots --- */
.cx-corners .dot-tl,
.cx-corners .dot-tr,
.cx-corners .dot-bl,
.cx-corners .dot-br {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(255,255,255,0.7);
}
.cx-corners .dot-tl { top: 3px; left: 3px; }
.cx-corners .dot-tr { top: 3px; right: 3px; }
.cx-corners .dot-bl { bottom: 3px; left: 3px; }
.cx-corners .dot-br { bottom: 3px; right: 3px; }

/* Ghost button corner dots */
.cx-btn-ghost .dot-tl,
.cx-btn-ghost .dot-tr,
.cx-btn-ghost .dot-bl,
.cx-btn-ghost .dot-br {
  background: rgba(0,0,0,0.35);
}

/* --- Tag --- */
.cx-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
}
.cx-tag-accent { background: var(--accent); color: var(--paper); }
.cx-tag-ink { background: var(--ink); color: var(--paper); }
.cx-tag-events { background: var(--c-events); color: var(--paper); }
.cx-tag-careers { background: var(--c-careers); color: var(--paper); }
.cx-tag-bounties { background: var(--c-bounties); color: var(--paper); }
.cx-tag-community { background: var(--c-community); color: var(--paper); }
.cx-tag-programs { background: var(--c-programs); color: var(--paper); }

/* --- Button --- */
.cx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-2);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  white-space: nowrap;
  text-decoration: none;
}
.cx-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
}
.cx-btn:active {
  transform: translate(1px, 1px);
  box-shadow: var(--sh-1);
}
.cx-btn-accent {
  background: var(--accent);
  color: var(--paper);
}
.cx-btn-ghost {
  background: var(--paper);
  color: var(--ink);
}
.cx-btn-sm {
  padding: 6px 12px;
  font-size: 11px;
}
.cx-btn-lg {
  padding: 14px 22px;
  font-size: 13px;
}
.cx-btn-block {
  display: flex;
  width: 100%;
}
.cx-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Sort select --- */
.cx-sort-select {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 10px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
}

/* --- Input --- */
.cx-input, .cx-select, .cx-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  box-shadow: var(--sh-1);
  transition: box-shadow 0.12s, transform 0.12s;
}
.cx-input:focus, .cx-select:focus, .cx-textarea:focus {
  outline: none;
  box-shadow: var(--sh-2);
  transform: translate(-1px, -1px);
}
.cx-input::placeholder { color: var(--ink-4); }

/* --- Chip --- */
.cx-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cx-chip {
  padding: 6px 11px;
  border: 1.5px solid var(--rule);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.12s;
}
.cx-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.cx-chip.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: var(--sh-1);
  transform: translate(-1px, -1px);
}

/* --- Highlight --- */
.cx-highlight {
  background: var(--accent);
  color: var(--paper);
  padding: 0 0.15em;
  box-shadow: 3px 3px 0 var(--ink);
  display: inline-block;
}
.cx-highlight-events { background: var(--c-events); }
.cx-highlight-careers { background: var(--c-careers); }
.cx-highlight-bounties { background: var(--c-bounties); }
.cx-highlight-community { background: var(--c-community); }
.cx-highlight-programs { background: var(--c-programs); }

/* --- Navigation --- */
.cx-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
}
.cx-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  padding: 14px 32px;
  max-width: var(--container);
  margin: 0 auto;
  align-items: center;
}
@media (max-width: 720px) {
  .cx-nav { padding: 14px 20px; }
}
.cx-brand {
  display: inline-flex;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 14px;
  text-transform: uppercase;
  font-family: var(--mono);
  color: var(--ink);
  align-items: center;
  text-decoration: none;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-1);
  padding: 8px 14px;
  position: relative;
  transition: all var(--transition);
}
.cx-brand:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.cx-brand:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}
.cx-brand .brand-dot-tl,
.cx-brand .brand-dot-br {
  position: absolute;
  width: 4px;
  height: 4px;
  pointer-events: none;
}
.cx-brand .brand-dot-tl {
  top: 3px;
  left: 3px;
  background: var(--accent);
}
.cx-brand .brand-dot-br {
  bottom: 3px;
  right: 3px;
  background: var(--c-events);
}
.cx-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}
.cx-brand-text .brand-main {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.cx-brand-text .brand-sub {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.cx-brand-brackets {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.cx-nav-links {
  display: flex;
  gap: 22px;
  justify-content: center;
}
.cx-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  position: relative;
  transition: color var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.cx-nav-link:hover,
.cx-nav-link.active {
  color: var(--ink);
}
.cx-nav-link.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  background: var(--ink);
}
.cx-nav-link .px { opacity: 0.5; }
.cx-nav-link:hover .px,
.cx-nav-link.active .px { opacity: 1; }
.cx-nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}
@media (max-width: 960px) {
  .cx-nav-links { display: none; }
  .cx-nav-cta { display: none; }
  .mobile-toggle { display: flex; }
  .cx-nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1.5px solid var(--ink);
    padding: 16px 20px;
    gap: 2px;
    box-shadow: var(--sh-3);
  }
}

/* --- Ticker --- */
.cx-ticker-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  border-bottom: 1.5px solid var(--ink);
  background: var(--paper-2);
  overflow: hidden;
}
.cx-ticker-label {
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cx-ticker-label .px {
  background: var(--accent);
  border-color: var(--paper);
}
.cx-ticker-track-wrap {
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  padding: 0 16px;
}
@keyframes cx-ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.cx-ticker-track {
  display: inline-block;
  animation: cx-ticker 70s linear infinite;
  padding-left: 100%;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.cx-ticker-track span { margin-right: 52px; }
.cx-ticker-track span .px { margin-right: 6px; vertical-align: 1px; }
.cx-ticker-track b { color: var(--ink); font-weight: 700; }

/* --- Section --- */
.cx-section {
  padding: 56px 0;
  border-top: 1.5px solid var(--ink);
  position: relative;
}
.cx-section-alt { background: var(--paper-2); }
.cx-section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: baseline;
  margin-bottom: 32px;
}
@media (max-width: 720px) {
  .cx-section-head { grid-template-columns: 1fr; gap: 10px; }
}
.cx-section-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  background: var(--paper);
  padding: 4px 10px;
  border: 1.5px solid var(--ink);
  white-space: nowrap;
}
.cx-section-num::before { content: "§ "; color: var(--ink-3); }
.cx-section-num,
.cx-section-title {
  font-family: var(--mono);
  color: var(--ink);
  text-transform: uppercase;
}
.cx-section-title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1;
  font-family: var(--mono);
  color: var(--ink);
  text-transform: uppercase;
}
.cx-section-title em {
  font-style: normal;
  color: var(--ink-3);
  font-weight: 600;
}
.cx-section-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- Page Head (hero) --- */
.cx-page-head {
  padding: 48px 0 44px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: end;
  border-bottom: 1.5px solid var(--ink);
}
@media (max-width: 960px) {
  .cx-page-head { grid-template-columns: 1fr; gap: 28px; }
}
.cx-page-head h1 {
  font-family: var(--mono);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 18px 0 0;
  text-transform: uppercase;
  color: var(--ink);
}
.cx-page-head h1 em {
  font-style: normal;
  color: var(--ink-3);
  font-weight: 600;
}
.cx-page-head p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 52ch;
  margin: 16px 0 0;
}

/* --- Stats --- */
.cx-page-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-2);
}
.cx-stat {
  padding: 18px;
  background: var(--paper);
}
.cx-stat:not(:last-child) {
  border-right: 1.5px solid var(--ink);
}
.cx-stat-num {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: block;
  line-height: 1;
  color: var(--ink);
}
.cx-stat-lbl {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* --- KV Grid --- */
.cx-kv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1.5px solid var(--ink);
  border-left: 1.5px solid var(--ink);
}
@media (max-width: 960px) {
  .cx-kv-grid { grid-template-columns: repeat(2, 1fr); }
}
.cx-kv {
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding: 14px 16px;
  background: var(--paper);
}
.cx-kv-num {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  display: block;
  line-height: 1;
  color: var(--ink);
  font-family: var(--mono);
}
.cx-kv-lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
}

/* --- Opportunity Grid --- */
.cx-opp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 20px;
}
@media (max-width: 960px) {
  .cx-opp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .cx-opp-grid { grid-template-columns: 1fr; }
}
.cx-opp {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-2);
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  height: 100%;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
}
.cx-opp:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--sh-hover);
}
.cx-opp-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.cx-opp-id {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
}
.cx-opp h3 {
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  line-height: 1.15;
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cx-opp p {
  font-size: 13px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cx-opp-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1.5px dashed var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  font-weight: 600;
}
.cx-opp-foot .arrow {
  transition: transform var(--transition);
}
.cx-opp:hover .arrow {
  transform: translateX(3px);
}

/* --- Map Frame --- */
.cx-map-frame {
  position: relative;
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-3);
  overflow: hidden;
  min-height: 420px;
}
.cx-map-frame .c-tl { position: absolute; top: -1.5px; left: -1.5px; width: 14px; height: 14px; background: var(--ink); z-index: 3; pointer-events: none; }
.cx-map-frame .c-tr { position: absolute; top: -1.5px; right: -1.5px; width: 14px; height: 14px; background: var(--c-events); z-index: 3; pointer-events: none; }
.cx-map-frame .c-bl { position: absolute; bottom: -1.5px; left: -1.5px; width: 14px; height: 14px; background: var(--c-bounties); z-index: 3; pointer-events: none; }
.cx-map-frame .c-br { position: absolute; bottom: -1.5px; right: -1.5px; width: 14px; height: 14px; background: var(--ink); z-index: 3; pointer-events: none; }
.cx-map-title {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--ink);
}
.cx-map-coord {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  background: var(--ink);
  color: var(--paper);
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cx-map-legend {
  position: absolute;
  bottom: 14px; left: 14px;
  z-index: 2;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--ink-2);
}
.cx-map-legend .leg-item { display: flex; align-items: center; gap: 5px; }
.cx-map-readout {
  position: absolute;
  bottom: 14px; right: 14px;
  z-index: 2;
  background: var(--ink);
  color: var(--paper);
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.5;
}

/* --- Divider --- */
.cx-divider-dashed {
  border: 0;
  border-top: 1.5px dashed var(--rule);
  margin: 0;
}

/* --- Footer --- */
.cx-footer {
  border-top: 1.5px solid var(--ink);
  background: var(--paper-2);
  padding: 48px 0 28px;
  margin-top: 72px;
}
.cx-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 960px) {
  .cx-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .cx-footer-grid { grid-template-columns: 1fr; }
}
.cx-footer h4 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cx-footer ul { list-style: none; margin: 0; padding: 0; }
.cx-footer li {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
}
.cx-footer a { color: var(--ink-2); transition: color var(--transition); }
.cx-footer a:hover { color: var(--accent-strong); }
.cx-footer-bottom {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Mark (2x2 grid) --- */
.cx-mark {
  width: 22px;
  height: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  border: 1.5px solid var(--ink);
  gap: 0;
  flex-shrink: 0;
}
.cx-mark div { background: var(--ink); }
.cx-mark-lg { width: 34px; height: 34px; }
.cx-mark-xl { width: 44px; height: 44px; }

/* --- Animations --- */
@keyframes pulse {
  50% { opacity: 0.5; }
}

/* =========================================
   Legacy tag classes for sub-page compatibility
   ========================================= */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1.5px solid var(--ink);
  line-height: 1;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
}
.tag-default { background: var(--paper-2); color: var(--ink-3); border-color: var(--rule); }
.tag-green { background: var(--c-events); color: var(--paper); border-color: var(--c-events); }
.tag-violet { background: var(--c-community); color: var(--paper); border-color: var(--c-community); }
.tag-amber { background: var(--c-programs); color: var(--paper); border-color: var(--c-programs); }
.tag-rose { background: var(--c-community); color: var(--paper); border-color: var(--c-community); }
.tag-blue { background: var(--c-careers); color: var(--paper); border-color: var(--c-careers); }
.tag-cyan { background: var(--c-careers); color: var(--paper); border-color: var(--c-careers); }
.tag-orange { background: var(--c-programs); color: var(--paper); border-color: var(--c-programs); }
.tag-red { background: var(--accent-strong); color: var(--paper); border-color: var(--accent-strong); }

/* =========================================
   BITS HD specific components
   ========================================= */

/* Info grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 640px) {
  .info-grid { grid-template-columns: 1fr; }
}
.info-box {
  padding: 24px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-2);
  position: relative;
}
.info-box .dot-tl { position: absolute; top: 3px; left: 3px; width: 3px; height: 3px; background: rgba(255,255,255,0.7); }
.info-box .dot-tr { position: absolute; top: 3px; right: 3px; width: 3px; height: 3px; background: rgba(255,255,255,0.7); }
.info-box .dot-bl { position: absolute; bottom: 3px; left: 3px; width: 3px; height: 3px; background: rgba(255,255,255,0.7); }
.info-box .dot-br { position: absolute; bottom: 3px; right: 3px; width: 3px; height: 3px; background: rgba(255,255,255,0.7); }
.info-box.cx-panel-ink .dot-tl,
.info-box.cx-panel-ink .dot-tr,
.info-box.cx-panel-ink .dot-bl,
.info-box.cx-panel-ink .dot-br { background: rgba(255,255,255,0.7); }
.info-box h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-box p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 0;
}
.info-box .hl {
  color: var(--accent-strong);
  font-weight: 700;
}

/* Countdown */
.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.countdown-item {
  padding: 18px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-2);
  text-align: center;
  min-width: 100px;
  transition: all var(--transition);
}
.countdown-item:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
}
.countdown-val {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.countdown-lbl {
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* Social grid */
.social-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.social-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-1);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all var(--transition);
  text-decoration: none;
  font-family: var(--mono);
}
.social-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
  color: var(--ink);
}
.social-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  border: 1.5px solid var(--ink);
}

/* Resources grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 640px) {
  .resources-grid { grid-template-columns: 1fr; }
}
.resource-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-1);
  text-decoration: none;
  color: var(--ink-2);
  transition: all var(--transition);
}
.resource-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
  color: var(--ink);
}
.resource-card .r-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid var(--ink);
  flex-shrink: 0;
  font-family: var(--mono);
}
.resource-card .r-info .r-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--mono);
}
.resource-card .r-info .r-desc {
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--mono);
}

/* Table */
.table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--ink);
  background: var(--paper);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--mono);
}
th {
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
}
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--paper-2); }
td strong { color: var(--ink); }

/* Leaderboard */
.lb-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.lb-tab {
  padding: 8px 18px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--sh-1);
  font-family: var(--mono);
}
.lb-tab:hover {
  background: var(--paper-2);
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
}
.lb-tab.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.lb-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 32px;
}
.lb-podium-card {
  text-align: center;
  padding: 24px 20px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  transition: all var(--transition);
  min-width: 160px;
  box-shadow: var(--sh-2);
  font-family: var(--mono);
}
.lb-podium-card:hover { transform: translate(-1px, -1px); box-shadow: var(--sh-hover); }
.lb-podium-1 { order: 2; border-color: var(--ink); background: var(--paper); }
.lb-podium-2 { order: 1; }
.lb-podium-3 { order: 3; }
.lb-podium-rank {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.lb-podium-1 .lb-podium-rank { color: var(--ink); }
.lb-podium-2 .lb-podium-rank { color: var(--ink-3); }
.lb-podium-3 .lb-podium-rank { color: var(--c-programs); }
.lb-podium-name { font-weight: 700; font-size: 13px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.lb-podium-score { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.lb-podium-1 .lb-podium-score { color: var(--ink); }
.lb-podium-accuracy { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
@media (max-width: 768px) {
  .lb-podium { flex-direction: column; align-items: center; }
  .lb-podium-card { order: unset !important; width: 100%; max-width: 280px; }
}

.lb-table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--ink);
  background: var(--paper);
}
.lb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--mono);
}
.lb-table thead th {
  padding: 12px 16px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--paper);
  text-align: left;
  border-bottom: 1.5px solid var(--ink);
  background: var(--ink);
}
.lb-table thead th:first-child { text-align: center; width: 50px; }
.lb-table tbody tr { transition: background var(--transition); }
.lb-table tbody tr:hover { background: var(--paper-2); }
.lb-table tbody tr td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
.lb-table tbody tr:last-child td { border-bottom: none; }
.lb-table tbody tr td:first-child { text-align: center; }
.lb-rank {
  font-weight: 700;
  font-size: 12px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
}
.lb-rank-1 { background: var(--ink); color: var(--paper); }
.lb-rank-2 { background: var(--paper-2); color: var(--ink-2); }
.lb-rank-3 { background: var(--c-programs); color: var(--paper); }
.lb-rank-other { background: var(--paper); color: var(--ink-3); }
.lb-player-name { font-weight: 700; color: var(--ink); display: block; }
.lb-player-email { font-size: 11px; color: var(--ink-4); }
.lb-score { font-weight: 800; font-size: 15px; color: var(--ink); letter-spacing: -0.01em; }
.lb-accuracy-bar { display: flex; align-items: center; gap: 8px; }
.lb-accuracy-track {
  width: 60px;
  height: 5px;
  background: var(--paper-3);
  overflow: hidden;
}
.lb-accuracy-fill { height: 100%; background: var(--ink); }
.lb-accuracy-text { font-weight: 700; font-size: 11px; }
.lb-pill {
  display: inline-block;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  border: 1.5px solid var(--ink);
}
.lb-pill-correct { background: var(--c-events); color: var(--paper); }
.lb-pill-wrong { background: var(--accent-strong); color: var(--paper); }
.lb-pill-skipped { background: var(--paper-2); color: var(--ink-3); }
.lb-time { font-size: 12px; color: var(--ink-2); }
.lb-crown { display: inline-block; margin-right: 4px; }
.lb-player-email { display: none; }
@media (max-width: 768px) {
  .lb-accuracy-track { width: 40px; }
}

/* Schedule card */
.schedule-card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-2);
  padding: 24px;
  position: relative;
  transition: all var(--transition);
}
.schedule-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
}
.schedule-card-status {
  position: absolute;
  top: 16px;
  right: 16px;
}
.status-live { background: var(--c-events); color: var(--paper); border: 1.5px solid var(--c-events); }
.status-upcoming { background: var(--c-careers); color: var(--paper); border: 1.5px solid var(--c-careers); }
.status-completed { background: var(--paper-2); color: var(--ink-3); border: 1.5px solid var(--rule); }

/* Coming badge */
.coming-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent);
  color: var(--paper);
  border: 1.5px solid var(--accent);
  font-family: var(--mono);
}

/* Dot helper */
.cdot {
  display: inline-block;
  width: 6px;
  height: 6px;
  vertical-align: 2px;
  flex-shrink: 0;
  border: 1.5px solid var(--ink);
}
.cdot-sm { width: 5px; height: 5px; border-width: 1px; }
.dot-events { background: var(--c-events); border-color: var(--c-events); }
.dot-careers { background: var(--c-careers); border-color: var(--c-careers); }
.dot-bounties { background: var(--c-bounties); border-color: var(--c-bounties); }
.dot-community { background: var(--c-community); border-color: var(--c-community); }
.dot-programs { background: var(--c-programs); border-color: var(--c-programs); }
.dot-ink { background: var(--ink); border-color: var(--ink); }
.dot-accent { background: var(--accent); border-color: var(--accent); }
.dot-violet { background: var(--c-community); border-color: var(--c-community); }
.dot-orange { background: var(--c-programs); border-color: var(--c-programs); }
.dot-green { background: var(--c-events); border-color: var(--c-events); }
.dot-blue { background: var(--c-careers); border-color: var(--c-careers); }

/* Highlight */
.highlight {
  background: var(--accent);
  color: var(--paper);
  padding: 0 0.15em;
  box-shadow: 3px 3px 0 var(--ink);
  display: inline-block;
  font-weight: 700;
}

/* Comparison table cell colors */
td.y { color: var(--c-events); font-weight: 700; }
td.n { color: var(--accent-strong); font-weight: 700; }
td.pp { color: var(--c-programs); font-weight: 700; }
td.tn { color: var(--ink); }

/* Tips list */
.tips-list { list-style: none; margin-top: 12px; }
.tips-list li {
  padding: 16px 0 16px 28px;
  position: relative;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
  transition: all var(--transition);
  font-family: var(--mono);
}
.tips-list li:last-child { border-bottom: none; }
.tips-list li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 22px;
  width: 8px;
  height: 8px;
  background: var(--accent);
}
.tips-list li strong { color: var(--ink); }

/* Topic card */
.topic-card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-2);
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  transition: all var(--transition);
}
.topic-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
}
.topic-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.topic-card-name {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
}
.study-list { margin-top: 4px; }
.study-item {
  padding: 14px 0 14px 22px;
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.study-item:last-child { border-bottom: none; }
.study-item::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 20px;
  width: 6px;
  height: 6px;
  background: var(--accent);
}
.study-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.study-item-name {
  font-weight: 700;
  color: var(--ink);
  font-size: 14px;
  font-family: var(--mono);
}
.study-item-freq {
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
}
.freq-must { background: rgba(197,100,66,0.12); color: var(--accent-strong); }
.freq-important { background: rgba(217,168,90,0.12); color: var(--c-programs); }
.freq-good { background: var(--paper-2); color: var(--ink-3); }
.study-item-what {
  color: var(--ink-2);
  font-size: 14px;
  margin-bottom: 4px;
}
.study-item-example {
  color: var(--ink-3);
  font-size: 13px;
  font-style: italic;
  padding: 10px 14px;
  margin-top: 6px;
  background: var(--paper-2);
  border-left: 3px solid var(--accent);
}

/* Alert */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
}
.alert-icon { font-size: 1.2em; flex-shrink: 0; margin-top: 2px; }
.alert strong { color: var(--ink); }
.alert-warn { background: rgba(217,168,90,0.08); color: var(--c-programs); }
.alert-info { background: rgba(122,168,205,0.08); color: var(--c-careers); }
.alert-success { background: rgba(106,168,110,0.08); color: var(--c-events); }
.alert-danger { background: rgba(197,100,66,0.08); color: var(--accent-strong); }

/* Section banner */
.section-banner {
  padding: 24px 28px;
  margin: 40px 0 20px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--sh-2);
}
.section-banner h2 {
  font-size: 1.1em;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-banner h2 .num {
  opacity: 0.5;
  font-size: 0.8em;
}
.section-banner p {
  color: var(--ink-2);
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 0;
}

/* Priority */
.priority {
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
}
.priority-p1 { background: rgba(197,100,66,0.12); color: var(--accent-strong); }
.priority-p2 { background: rgba(217,168,90,0.12); color: var(--c-programs); }
.priority-p3 { background: var(--paper-2); color: var(--ink-3); }

/* Marking row */
.marking-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 24px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-2);
}
.mark-item { text-align: center; }
.mark-item.correct .mark-val { color: var(--c-events); }
.mark-item.wrong .mark-val { color: var(--accent-strong); }
.mark-item.skip .mark-val { color: var(--ink-3); }
.mark-val {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.mark-val.correct { color: var(--c-events); }
.mark-val.wrong { color: var(--accent-strong); }
.mark-val.skip { color: var(--ink-3); }
.mark-lbl { font-size: 12px; color: var(--ink-2); margin-top: 4px; }

/* Exam cards */
.exam-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.exam-card {
  padding: 24px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--sh-2);
  transition: all var(--transition);
}
.exam-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
}
.exam-card-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  font-family: var(--mono);
}
.exam-card-label.t1 { color: var(--c-events); }
.exam-card-label.t2 { color: var(--c-careers); }
.exam-card-label.ss { color: var(--c-community); }
.exam-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.exam-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.exam-card-stat {
  text-align: center;
  padding: 10px 8px;
  background: var(--paper-2);
  border: 1.5px solid var(--rule);
}
.exam-card-stat .val {
  font-size: 1.3em;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.exam-card-stat .lbl {
  font-size: 9px;
  color: var(--ink-4);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--mono);
}
.exam-card-subjects {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
.exam-card-who {
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

/* Plan grid */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.plan-card {
  padding: 28px 24px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-2);
  transition: all var(--transition);
}
.plan-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
}
.plan-card h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}
.plan-card ol {
  padding-left: 20px;
  list-style: decimal;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 2.2;
}
.plan-card ol li { transition: color var(--transition); }
.plan-card ol li:hover { color: var(--ink); }

/* Test banner */
.test-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 24px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-2);
  border-left: 4px solid var(--accent);
}
.test-banner h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}
.test-banner.green { border-left-color: var(--c-events); }
.test-banner.green h2 { color: var(--c-events); }
.test-banner.purple { border-left-color: var(--c-careers); }
.test-banner.purple h2 { color: var(--c-careers); }
.test-banner.orange { border-left-color: var(--c-programs); }
.test-banner.orange h2 { color: var(--c-programs); }
.test-content {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-top: none;
  padding: 28px;
  margin-bottom: 16px;
}
.note-box {
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.7;
  border: 1.5px solid var(--ink);
  background: rgba(217,168,90,0.08);
  color: var(--c-programs);
  font-family: var(--mono);
}
.note-box strong { color: var(--c-programs); }
.subject-block {
  border-left: 3px solid var(--accent);
  margin-bottom: 20px;
  padding-left: 20px;
}
.subject-block.cs { border-left-color: var(--c-careers); }
.subject-block.math { border-left-color: var(--c-events); }
.subject-block.english { border-left-color: var(--c-programs); }
.subject-block.ss { border-left-color: var(--c-community); }
.subject-block h3 {
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.subject-block.cs h3 { color: var(--c-careers); }
.subject-block.math h3 { color: var(--c-events); }
.subject-block.english h3 { color: var(--c-programs); }
.subject-block.ss h3 { color: var(--c-community); }
.syllabus-text { margin-bottom: 10px; }
.syllabus-text p { margin-bottom: 12px; font-size: 14px; }
.syllabus-text .heading { color: var(--ink); font-weight: 700; }
.ref-box {
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--paper-2);
  border: 1.5px solid var(--rule);
  border-left: 3px solid var(--accent);
}
.ref-box .ref-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
  font-family: var(--mono);
}
.ref-box p {
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 4px;
  line-height: 1.55;
}

/* Dates grid */
.dates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.date-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-1);
  transition: all var(--transition);
}
.date-item:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
}
.date-item .event {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--mono);
}
.date-item .date {
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  font-family: var(--mono);
}
.date-item.highlight {
  border-color: var(--accent);
  background: rgba(216,128,96,0.04);
}
.section-divider {
  height: 1.5px;
  margin: 40px 0;
  background: var(--ink);
}

/* Comparison header */
.comparison-header {
  text-align: center;
  padding: 40px 24px;
  margin-bottom: 32px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-3);
  position: relative;
}
.comparison-header .dot-tl,
.comparison-header .dot-tr,
.comparison-header .dot-bl,
.comparison-header .dot-br {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent);
}
.comparison-header .dot-tl { top: 4px; left: 4px; }
.comparison-header .dot-tr { top: 4px; right: 4px; }
.comparison-header .dot-bl { bottom: 4px; left: 4px; }
.comparison-header .dot-br { bottom: 4px; right: 4px; }
.comparison-header h1 {
  font-size: clamp(1.6em, 4vw, 2.4em);
  margin-bottom: 12px;
  color: var(--ink);
}
.comparison-header .sub {
  color: var(--ink-2);
  font-size: 14px;
  max-width: 700px;
  margin: 0 auto 20px;
}

/* Legend */
.legend {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--mono);
}
.legend-dot {
  width: 8px;
  height: 8px;
}
.legend-dot.exclusive { background: var(--accent-strong); }
.legend-dot.common { background: var(--c-careers); }
.legend-dot.partial { background: var(--c-programs); }

/* =========================================
   Legacy nav & footer (injected by shared.js)
   ========================================= */

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
}
.nav {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 24px;
  padding: 14px 32px;
  max-width: var(--container);
  margin: 0 auto;
  align-items: center;
}
@media (max-width: 720px) {
  .nav { padding: 14px 20px; }
}
.nav-brand {
  display: flex;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 15px;
  text-transform: uppercase;
  font-family: var(--mono);
  color: var(--ink);
  align-items: center;
  text-decoration: none;
}
.nav-brand.cx-brand-card {
  display: inline-flex;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 14px;
  text-transform: uppercase;
  font-family: var(--mono);
  color: var(--ink);
  align-items: center;
  text-decoration: none;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-1);
  padding: 8px 14px;
  position: relative;
  transition: all var(--transition);
}
.nav-brand.cx-brand-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.nav-brand.cx-brand-card:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}
.logo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border: 1.5px solid var(--ink);
}
.nav-links {
  display: flex;
  gap: 20px;
  justify-content: center;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  position: relative;
  transition: color var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active {
  color: var(--ink);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  background: var(--ink);
}
.nav-cta-wrap {
  display: flex;
  align-items: center;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-1);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.nav-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
}

/* Legacy footer */
.footer {
  border-top: 1.5px solid var(--ink);
  background: var(--paper-2);
  padding: 48px 0 28px;
  margin-top: 72px;
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer h4 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 12px;
}
.footer a { color: var(--ink-2); transition: color var(--transition); text-decoration: none; }
.footer a:hover { color: var(--accent-strong); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  gap: 16px;
  flex-wrap: wrap;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .footer-grid { padding: 0 20px; }
  .footer-bottom { padding: 0 20px; }
}

/* =========================================
   Legacy component classes for sub-pages
   ========================================= */

/* Page header */
.page-header {
  margin-bottom: 32px;
}
.page-header h1 {
  font-size: clamp(1.8em, 4vw, 2.8em);
  margin: 12px 0 8px;
}
.page-header p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* Back link */
.back-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color var(--transition);
  font-family: var(--mono);
}
.back-link:hover { color: var(--ink); }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
}
.badge-live {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}
.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--paper);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

/* Card */
.card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-1);
  padding: 20px;
  transition: all var(--transition);
}
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.card-link:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
}
.card-id {
  font-family: var(--mono);
  font-size: 2em;
  font-weight: 900;
  opacity: 0.15;
  line-height: 1;
  margin-bottom: 8px;
}
.card-grid {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}
.card-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Hero */
.hero {
  margin-bottom: 32px;
}
.hero h1 {
  font-size: clamp(2em, 5vw, 3.2em);
  margin: 16px 0 12px;
}
.hero-sub {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 60ch;
  margin: 0 auto 16px;
}
.hero-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Exam grid (important_topics_analysis) */
.exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.exam-card {
  padding: 24px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--sh-2);
  transition: all var(--transition);
}
.exam-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
}
.exam-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  font-family: var(--mono);
  color: var(--ink-3);
}
.exam-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.exam-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.exam-stat {
  text-align: center;
  padding: 10px 8px;
  background: var(--paper-2);
  border: 1.5px solid var(--rule);
}
.exam-stat .val {
  font-size: 1.3em;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.exam-stat .lbl {
  font-size: 9px;
  color: var(--ink-4);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--mono);
}
.exam-subjects {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
.exam-who {
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

/* Topic head & tags */
.topic-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.topic-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-hover);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 10px;
}

/* Subtitle */
.subtitle {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 4px;
  margin-bottom: 16px;
}

/* Arrow */
.arrow {
  transition: transform var(--transition);
}
.card-link:hover .arrow {
  transform: translateX(3px);
}

/* Topic card tags (plural) */
.topic-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}

/* Priority standalone (not inside topic-card) */
.priority-p1 {
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  background: rgba(197,100,66,0.12);
  color: var(--accent-strong);
}
.priority-p2 {
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  background: rgba(217,168,90,0.12);
  color: var(--c-programs);
}
.priority-p3 {
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  background: var(--paper-2);
  color: var(--ink-3);
}

/* Grid background */
.grid-bg { display: none !important; }

/* Stats grid (leaderboard) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.stat-item {
  text-align: center;
  padding: 16px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--sh-1);
}
.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-top: 4px;
  font-family: var(--mono);
}

/* Pills */
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  display: inline-block;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  font-family: var(--mono);
}

/* Info card */
.info-card {
  padding: 22px;
  background: var(--paper-2);
  border-left: 4px solid var(--accent);
}
.info-card.cyan { border-left-color: var(--c-careers); }
.info-card.orange { border-left-color: var(--c-programs); }
.info-card h4 {
  color: var(--ink);
  margin-bottom: 10px;
  font-size: 14px;
}
.info-card p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 0;
}
.info-card .highlight-amount { color: var(--c-events); font-weight: 800; }
.info-card .note { margin-top: 10px; font-size: 13px; color: var(--ink-4); }
.info-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}
@media(max-width:700px) { .info-grid-2 { grid-template-columns: 1fr; } }

/* Legacy nav responsive (shared.js injected) */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-cta-wrap { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1.5px solid var(--ink);
    padding: 16px 20px;
    gap: 2px;
    box-shadow: var(--sh-3);
  }
  .nav-links.open .nav-link {
    padding: 12px 10px;
    width: 100%;
  }
}

/* Mock section */
.mock-section { margin-bottom: 48px; }

/* Syllabus topic items */
.section-block {
  margin-bottom: 24px;
}
.section-block h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.intro {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.7;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.topic-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
}
.topic-item:last-child { border-bottom: none; }
.topic-item .num {
  font-weight: 700;
  color: var(--accent);
  font-size: 12px;
  flex-shrink: 0;
}
.topic-item .title {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.topic-desc {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.7;
  padding: 4px 0 12px 24px;
}


/* ============================================================
   v2 polish: unique color per card / per section / per stat
   ============================================================ */

/* --- Per-card accent top stripe on .cx-opp --- */
.cx-opp { overflow: hidden; --card-c: var(--ink); }
.cx-opp::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--card-c);
  transition: height var(--transition);
}
.cx-opp:hover::before { height: 6px; }

/* Each card a unique hue (set via --card-c) — all pass WCAG AA 4.5:1 on #f4f1ea */
.cx-opp.opp-syllabus    { --card-c: #9b5c45; } /* peach */
.cx-opp.opp-comparison  { --card-c: #58755a; } /* sage */
.cx-opp.opp-topics      { --card-c: #506e87; } /* sky */
.cx-opp.opp-youtube     { --card-c: #c4302b; } /* crimson */
.cx-opp.opp-mock        { --card-c: #866837; } /* mustard */
.cx-opp.opp-mock2       { --card-c: #74688b; } /* lilac */
.cx-opp.opp-qotd25      { --card-c: #427472; } /* teal */
.cx-opp.opp-math        { --card-c: #5c6d92; } /* indigo */
.cx-opp.opp-english     { --card-c: #826380; } /* plum */
.cx-opp.opp-cs          { --card-c: #726f41; } /* olive */
.cx-opp.opp-ss          { --card-c: #8d5f6e; } /* rose */
.cx-opp.opp-qotd        { --card-c: #945f4c; } /* coral */
.cx-opp.opp-strategy    { --card-c: #9e5c3f; } /* rust */
.cx-opp.opp-examday     { --card-c: #47784c; } /* forest */

/* Tint the title, icon dot, and underline using card color */
.cx-opp h3 { color: var(--card-c); }
.cx-opp .cx-opp-id { color: var(--card-c); font-weight: 700; }
.cx-opp .cx-opp-id .px {
  background: var(--card-c) !important;
  border-color: var(--card-c) !important;
}
.cx-opp .cx-opp-foot { border-top-color: color-mix(in srgb, var(--card-c) 35%, var(--rule)); }
.cx-opp .cx-opp-foot .arrow { color: var(--card-c); }

/* Body text and foot label use the exact card color */
.cx-opp p { color: var(--ink-2); }
.cx-opp .cx-opp-foot { color: var(--card-c); }

/* Subtle hover gradient using the card's own color */
.cx-opp:hover {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--card-c) 8%, var(--paper)) 0%,
    var(--paper) 70%);
  border-color: var(--card-c);
}

/* --- Coming-soon cards: visually distinct (muted, dashed, no lift) --- */
.cx-opp:has(.coming-badge) {
  border-style: dashed;
  border-color: var(--rule, #c8c1b1);
  box-shadow: none;
  cursor: default;
}
.cx-opp:has(.coming-badge)::before { opacity: 0.45; }
.cx-opp:has(.coming-badge) h3,
.cx-opp:has(.coming-badge) p,
.cx-opp:has(.coming-badge) .cx-opp-foot { opacity: 0.65; }
.cx-opp:has(.coming-badge):hover {
  transform: none;
  box-shadow: none;
  background: var(--paper) !important;
}
.cx-opp:has(.coming-badge):hover::before { height: 4px; }

/* Recolor the coming-badge: muted ink chip, not bright accent */
.coming-badge {
  background: var(--paper-2) !important;
  color: var(--ink-3) !important;
  border: 1.5px dashed var(--ink-3) !important;
  letter-spacing: 0.1em !important;
}

/* --- Section badge: one accent per section --- */
.cx-section-num.sn-1 { background: rgba(216,128,96,0.18);  color: #9b5c45; border-color: #9b5c45; }
.cx-section-num.sn-2 { background: rgba(106,168,110,0.18); color: #3d6640; border-color: #3d6640; }
.cx-section-num.sn-3 { background: rgba(122,168,205,0.18); color: #506e87; border-color: #506e87; }
.cx-section-num.sn-4 { background: rgba(167,149,200,0.18); color: #5d4f7a; border-color: #5d4f7a; }
.cx-section-num.sn-1::before,
.cx-section-num.sn-2::before,
.cx-section-num.sn-3::before,
.cx-section-num.sn-4::before { color: inherit; opacity: 0.6; }

/* --- Info-box: left color stripe per category (use ib-* modifier) --- */
.info-box.ib-events    { border-left: 5px solid var(--c-events); }
.info-box.ib-careers   { border-left: 5px solid var(--c-careers); }
.info-box.ib-bounties  { border-left: 5px solid var(--c-bounties); }
.info-box.ib-community { border-left: 5px solid var(--c-community); }
.info-box.ib-accent    { border-left: 5px solid var(--accent); }

/* --- Hero side-panel: each stat number a different color --- */
.sp-stats .sp-stat:nth-child(1) .sp-stat-num { color: #3d6640; }
.sp-stats .sp-stat:nth-child(2) .sp-stat-num { color: #506e87; }
.sp-stats .sp-stat:nth-child(3) .sp-stat-num { color: #9b5c45; }

/* --- Top-of-page stats: colored numbers per stat --- */
.cx-page-stats .cx-stat:nth-child(1) .cx-stat-num { color: #506e87; }
.cx-page-stats .cx-stat:nth-child(2) .cx-stat-num { color: #9b5c45; }
.cx-page-stats .cx-stat:nth-child(3) .cx-stat-num { color: #3d6640; }

/* --- Countdown items: rotate colors --- */
.countdown-grid .countdown-item:nth-child(1) .countdown-val { color: #9b5c45; }
.countdown-grid .countdown-item:nth-child(2) .countdown-val { color: #3d6640; }
.countdown-grid .countdown-item:nth-child(3) .countdown-val { color: #506e87; }
.countdown-grid .countdown-item:nth-child(4) .countdown-val { color: #5d4f7a; }

/* --- Stronger hover lift on interactive surfaces --- */
.resource-card,
.social-card { transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.resource-card:hover,
.social-card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }

/* --- Buttons: subtle press depth --- */
.cx-btn { transition: transform var(--transition), box-shadow var(--transition), background var(--transition); }
.cx-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.cx-btn:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--ink); }

/* --- Section divider strip per section number color --- */
.cx-section-num.sn-1 ~ .cx-section-title em { color: #9b5c45; }
.cx-section-num.sn-2 ~ .cx-section-title em { color: #3d6640; }
.cx-section-num.sn-3 ~ .cx-section-title em { color: #506e87; }
.cx-section-num.sn-4 ~ .cx-section-title em { color: #5d4f7a; }


/* ============================================================
   Responsive + Readability polish
   ============================================================ */

/* Ensure minimum touch targets on mobile */
@media (max-width: 768px) {
  .cx-btn { min-height: 48px; padding: 14px 24px; font-size: 13px; }
  .cx-nav-link { padding: 12px 8px; }
  .social-card { min-height: 48px; padding: 14px 16px; }
  .resource-card { padding: 16px; }
}

/* Better card readability: bump body text and foot label */
.cx-opp p { font-size: 13.5px; line-height: 1.6; }
.cx-opp .cx-opp-foot { font-size: 11px; padding-top: 14px; }
.cx-opp h3 { font-size: 17px; line-height: 1.2; }

/* Info-box readability */
.info-box p { font-size: 13.5px; line-height: 1.65; }
.info-box h3 { font-size: 12px; }

/* Stats readability */
.cx-stat-num { font-size: 28px; }
.cx-stat-lbl { font-size: 11px; margin-top: 6px; }

/* Ticker readability */
.cx-ticker-track { font-size: 13px; }
.cx-ticker-label { font-size: 12px; padding: 14px 20px; }

/* Section title readability */
.cx-section-title { font-size: clamp(26px, 3.2vw, 36px); }
.cx-section-meta { font-size: 12px; }

/* Mobile: full-width cards */
@media (max-width: 640px) {
  .cx-opp-grid { grid-template-columns: 1fr !important; gap: 16px; }
  .cx-opp { min-height: auto; padding: 20px 18px 16px; }
  .cx-opp h3 { font-size: 16px; -webkit-line-clamp: unset; }
  .cx-opp p { -webkit-line-clamp: unset; font-size: 13px; }
  .cx-page-stats { grid-template-columns: 1fr; }
  .cx-stat { padding: 16px; border-right: none !important; border-bottom: 1.5px solid var(--ink); }
  .cx-stat:last-child { border-bottom: none; }
  .info-grid { grid-template-columns: 1fr !important; }
  .social-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .resources-grid { grid-template-columns: 1fr; }
  .countdown-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .countdown-val { font-size: 28px; }
  .home-cta { flex-direction: column; }
  .home-cta .cx-btn { width: 100%; text-align: center; }
  .cx-section-head { grid-template-columns: 1fr !important; gap: 8px; }
  .cx-section-title { font-size: 22px; }
  .cx-ticker-strip { margin: 0 -20px 20px !important; }
}

/* Tablet: 2-col cards */
@media (min-width: 641px) and (max-width: 960px) {
  .cx-opp-grid { grid-template-columns: repeat(2, 1fr); }
  .cx-opp h3 { font-size: 16px; }
  .social-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Large screens: more breathing room */
@media (min-width: 1200px) {
  .cx-opp { padding: 28px 26px 22px; }
  .cx-opp h3 { font-size: 18px; }
  .cx-opp p { font-size: 14px; }
}

/* Smooth scroll and focus visibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Better link underlines in info-boxes and footer */
.info-box a, .home-footer a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Prevent layout shift on ticker */
.cx-ticker-strip { min-height: 44px; }
