/* ── Tokens ───────────────────────────────────────────────── */
:root {
    --tb-primary:           #b6f0a1;
    --tb-primary-container: #6ebd5d;
    --tb-secondary:         #f8d57e;
    --tb-primary-rgb:           182, 240, 161;
    --tb-primary-container-rgb: 110, 189, 93;
    --tb-secondary-rgb:         248, 213, 126;
    --tb-surface:           #0e1010;
    --tb-surface-low:       #141818;
    --tb-surface-lowest:    #0a0d0d;
    --tb-text:              #e4ede4;
    --tb-text-muted:        #7a9a7a;
    --tb-nav-height:        3.5rem;
    --tb-on-surface:         #e4ede4;
    --tb-on-surface-variant: #7a9a7a;
    --tb-on-surface-dim:     #4a6a4a;
    --tb-f-display:          'Space Grotesk', system-ui, sans-serif;
    --tb-f-body:             'Inter', system-ui, sans-serif;
    --tb-f-mono:             'JetBrains Mono', monospace;
}

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 16px;
}

body {
    font-family: var(--tb-f-body);
    line-height: 1.65;
    color: var(--tb-text);
    background-color: var(--tb-surface);
    background-image:
        radial-gradient(ellipse 80% 55% at 18% 8%,  rgba(var(--tb-primary-container-rgb), 0.13) 0%, transparent 60%),
        radial-gradient(ellipse 55% 45% at 82% 85%, rgba(var(--tb-primary-rgb), 0.07) 0%, transparent 50%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--tb-f-display);
    color: var(--tb-text);
    line-height: 1.2;
}

a {
    color: var(--tb-secondary);
    text-decoration: none;
}

a:hover {
    color: var(--tb-primary);
}

/* ── Navbar ───────────────────────────────────────────────── */
.tb-nav {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1216px;
    z-index: 100;
    background: rgba(14, 16, 16, 0.6);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border-radius: 14px;
    padding: 14px 22px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.tb-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.tb-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--tb-f-display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--tb-on-surface);
    text-decoration: none;
}

.tb-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 6px;
    border: 1px solid rgba(var(--tb-primary-rgb), 0.28);
    border-radius: 5px;
    background: linear-gradient(135deg, rgba(var(--tb-primary-container-rgb), 0.12), rgba(var(--tb-primary-container-rgb), 0));
    font-family: var(--tb-f-mono);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--tb-primary);
    line-height: 1;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.tb-brand-mark::before {
    content: "<TB/>";
}

.tb-nav-menu {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.tb-nav-menu a {
    font-size: 13px;
    font-weight: 500;
    color: var(--tb-on-surface-variant);
    padding: 6px 4px;
    position: relative;
    transition: color 160ms ease;
    text-decoration: none;
}

.tb-nav-menu a:hover { color: var(--tb-on-surface); }
.tb-nav-menu a.is-active { color: var(--tb-on-surface); }

.tb-nav-menu a.is-active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 1.5px;
    background: linear-gradient(90deg, var(--tb-primary), var(--tb-primary-container));
    border-radius: 9999px;
}

.tb-nav-tail {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    font-size: 12px;
    color: var(--tb-on-surface-dim);
    font-family: var(--tb-f-mono);
}

/* ── Page wrapper ─────────────────────────────────────────── */
.tb-page-wrapper {
    flex: 1;
    padding-top: 96px;
    padding-bottom: 4rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.tb-foot { padding: 64px 0 24px; }

.tb-foot-container {
    width: calc(100% - 32px);
    max-width: 1216px;
    margin: 0 auto;
}

.tb-foot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    align-items: end;
}

.tb-foot-brand-name {
    font-family: var(--tb-f-display);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
    color: var(--tb-on-surface);
}

.tb-foot-slogan {
    margin-top: 8px;
    font-family: var(--tb-f-mono);
    font-size: 11px;
    color: var(--tb-on-surface-dim);
    letter-spacing: 0.04em;
}

.tb-foot-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    font-size: 12px;
}

.tb-foot-links a { color: var(--tb-on-surface-variant); text-decoration: none; transition: color 0.15s; }
.tb-foot-links a:hover { color: var(--tb-on-surface); }

.tb-foot-meta {
    text-align: right;
    font-family: var(--tb-f-mono);
    font-size: 11px;
    color: var(--tb-on-surface-dim);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 860px) {
    .tb-nav { grid-template-columns: 1fr 1fr; padding: 12px 16px; }
    .tb-nav-menu { display: none; }
    .tb-nav-tail .meta { display: none; }
    .tb-foot-grid { grid-template-columns: 1fr; gap: 16px; text-align: left; }
    .tb-foot-links { justify-content: flex-start; }
    .tb-foot-meta { text-align: left; }
}

/* ── Layout ───────────────────────────────────────────────── */
.tb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.tb-content-narrow {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Typography / Prose ───────────────────────────────────── */
.tb-prose {
    color: var(--tb-text);
    line-height: 1.75;
}

.tb-prose h1, .tb-prose h2, .tb-prose h3,
.tb-prose h4, .tb-prose h5, .tb-prose h6 {
    font-family: var(--tb-f-display);
    color: var(--tb-primary);
    margin-top: 1.75rem;
    margin-bottom: 0.6rem;
}

.tb-prose p { margin-bottom: 1rem; }

.tb-prose a {
    color: var(--tb-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tb-prose a:hover { color: var(--tb-primary); }

.tb-prose code {
    font-family: var(--tb-f-mono);
    background: var(--tb-surface-lowest);
    color: var(--tb-primary);
    padding: 0.1em 0.45em;
    border-radius: 4px;
    font-size: 0.86em;
}

.tb-prose pre {
    background: var(--tb-surface-lowest);
    border: 1px solid rgba(var(--tb-primary-rgb), 0.1);
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    margin-bottom: 1.25rem;
    font-family: var(--tb-f-mono);
}

.tb-prose pre code {
    background: none;
    padding: 0;
    font-size: 0.9em;
    color: var(--tb-text);
}

.tb-prose blockquote {
    border-left: 3px solid var(--tb-primary);
    padding-left: 1rem;
    color: var(--tb-text-muted);
    margin: 1rem 0;
    font-style: italic;
}

.tb-prose ul {
    list-style: disc outside;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.tb-prose ol {
    list-style: decimal outside;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.tb-prose ul ul    { list-style-type: circle; }
.tb-prose ul ul ul { list-style-type: square; }

.tb-prose li { margin-bottom: 0.2rem; }

.tb-prose li::marker {
    color: var(--tb-primary);
    font-weight: 600;
}

.tb-prose table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.9em;
}

.tb-prose th {
    background: var(--tb-surface-low);
    color: var(--tb-primary);
    font-family: var(--tb-f-display);
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(var(--tb-primary-rgb), 0.2);
}

.tb-prose td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: top;
}

/* ── Cards ────────────────────────────────────────────────── */
.tb-card {
    background: var(--tb-surface-low);
    border: 1px solid rgba(var(--tb-primary-rgb), 0.08);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.18s;
}

.tb-card:hover {
    border-color: rgba(var(--tb-primary-rgb), 0.22);
}

.tb-card-title {
    font-family: var(--tb-f-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--tb-text);
    margin-bottom: 0.5rem;
}

.tb-card-title a {
    color: var(--tb-text);
    text-decoration: none;
}

.tb-card-title a:hover { color: var(--tb-primary); }

.tb-card-abstract {
    font-size: 0.9rem;
    color: var(--tb-text-muted);
    margin-bottom: 0.75rem;
}

/* ── Chips / Tags ─────────────────────────────────────────── */
.tb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.tb-chip {
    font-family: var(--tb-f-mono);
    font-size: 0.72rem;
    background: rgba(var(--tb-primary-rgb), 0.07);
    color: var(--tb-primary);
    border: 1px solid rgba(var(--tb-primary-rgb), 0.18);
    border-radius: 4px;
    padding: 0.15rem 0.55rem;
    white-space: nowrap;
}

.tb-chip--dim {
    color: var(--tb-text-muted);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.09);
}

/* ── Difficulty pips ──────────────────────────────────────── */
.tb-pips {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    vertical-align: middle;
}

.tb-pip {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(var(--tb-primary-rgb), 0.15);
    border: 1px solid rgba(var(--tb-primary-rgb), 0.25);
}

.tb-pip--filled {
    background: var(--tb-primary);
    border-color: var(--tb-primary);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.tb-sidebar-box {
    background: var(--tb-surface-low);
    border: 1px solid rgba(var(--tb-primary-rgb), 0.08);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.tb-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--tb-f-display);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    border-radius: 7px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    line-height: 1.4;
}

.tb-btn-primary {
    background: var(--tb-primary);
    color: #0a0d0d;
}

.tb-btn-primary:hover {
    background: var(--tb-primary-container);
    color: #0a0d0d;
}

.tb-btn-primary.tb-btn-glow {
    background: linear-gradient(135deg, var(--tb-primary), var(--tb-primary-container));
}

.tb-btn-primary.tb-btn-glow:hover {
    background: linear-gradient(135deg, var(--tb-primary), var(--tb-primary-container));
    box-shadow: 0 0 0 1px rgba(var(--tb-primary-rgb), 0.18), 0 16px 48px -8px rgba(var(--tb-primary-container-rgb), 0.45);
    transform: translateY(-1px);
    color: #0a0d0d;
}

.tb-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--tb-text);
    border: 1px solid rgba(255, 255, 255, 0.11);
}

.tb-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.11);
    color: var(--tb-text);
}

.tb-nav-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ── Hero ─────────────────────────────────────────────────── */
.tb-hero {
    padding: 4rem 1.5rem 3rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.tb-hero-title {
    font-family: var(--tb-f-display);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    color: var(--tb-text);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.tb-hero-subtitle {
    font-size: 1.05rem;
    color: var(--tb-text-muted);
    max-width: 560px;
    margin: 0 auto;
}

/* ── Section title ────────────────────────────────────────── */
.tb-section-title {
    font-family: var(--tb-f-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--tb-text);
    margin-bottom: 1.25rem;
}

/* ── Answer form ──────────────────────────────────────────── */
.tb-answer-input {
    flex: 1;
    background: var(--tb-surface-lowest);
    border: 1px solid rgba(var(--tb-primary-rgb), 0.18);
    border-radius: 7px;
    padding: 0.55rem 0.9rem;
    color: var(--tb-text);
    font-family: var(--tb-f-mono);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s;
    min-width: 0;
}

.tb-answer-input:focus {
    border-color: var(--tb-primary);
}

.tb-answer-input.tb-answer-disabled,
.tb-answer-input:disabled {
    opacity: 0.55;
    color: var(--tb-on-surface-variant);
    cursor: not-allowed;
}

.field.has-addons .control:not(:last-child) .tb-answer-input {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.field.has-addons .control:not(:first-child) .tb-btn {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

/* ── Notifications ────────────────────────────────────────── */
.tb-notification {
    border-radius: 7px;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.88rem;
}

.tb-notification--error {
    background: rgba(248, 113, 113, 0.07);
    border: 1px solid rgba(248, 113, 113, 0.22);
    color: #f87171;
}

/* ── Hint boxes ───────────────────────────────────────────── */
.tb-hint-box {
    margin-bottom: 0.6rem;
}

.tb-hint-row {
    background: var(--tb-surface-low);
    border: 1px solid rgba(var(--tb-secondary-rgb), 0.15);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.15s;
}

.tb-hint-row:hover {
    background: rgba(var(--tb-secondary-rgb), 0.05);
}

/* ── Progress list ────────────────────────────────────────── */
.tb-progress-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.83rem;
}

.tb-progress-list li {
    padding: 0.28rem 0 0.28rem 0.7rem;
    color: var(--tb-text-muted);
    border-left: 2px solid rgba(var(--tb-primary-rgb), 0.12);
    margin-bottom: 0.1rem;
}

.tb-progress-list li.tb-progress-current {
    color: var(--tb-primary);
    border-left-color: var(--tb-primary);
    font-weight: 500;
}

.tb-progress-list li .tb-stage-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.4rem;
    flex-shrink: 0;
}

.tb-stage-icon--solved {
    color: var(--tb-primary);
}

.tb-stage-icon--visited {
    color: var(--tb-on-surface-dim, var(--tb-text-muted));
    opacity: 0.7;
}

.tb-stage-locked {
    filter: blur(2px);
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
}

.tb-stage-locked a {
    cursor: default;
}

.tb-stage-title-redacted,
.tb-stage-eta-redacted {
    font-family: var(--tb-f-mono);
    letter-spacing: 0.08em;
    color: var(--tb-on-surface-dim);
}

/* ── Campaign progress bar ────────────────────────────────── */
.tb-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--tb-surface-lowest);
    border-radius: 3px;
    overflow: hidden;
}

.tb-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tb-primary), var(--tb-primary-container));
    width: 0%;
    transition: width 200ms ease;
}

.tb-stage-status {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.tb-stage-status .tb-stage-icon {
    margin-right: 0;
}

/* ── Display typography ───────────────────────────────────── */
.tb-display-lg {
    font-family: var(--tb-f-display);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0;
    color: var(--tb-on-surface);
}

.tb-gradient {
    background: linear-gradient(135deg, var(--tb-primary) 0%, var(--tb-primary-container) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tb-body-lg {
    font-family: var(--tb-f-body);
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--tb-on-surface-variant);
}

p.tb-eyebrow {
    font-family: var(--tb-f-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tb-on-surface-variant);
    margin: 0 0 16px 0;
    line-height: 1;
}

.tb-label {
    font-family: var(--tb-f-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tb-on-surface-dim);
}

.tb-mono {
    font-family: var(--tb-f-mono);
}

.tb-hint-countdown {
    font-size: 11px;
    color: var(--tb-on-surface-dim);
}

/* ── Recessed panel ───────────────────────────────────────── */
.tb-recessed {
    background: var(--tb-surface-lowest);
    border-radius: 10px;
    padding: 14px;
}

/* ── Secondary chip colour variant ───────────────────────── */
.tb-chip--secondary {
    background: rgba(var(--tb-secondary-rgb), 0.10);
    color: var(--tb-secondary);
    border-color: rgba(var(--tb-secondary-rgb), 0.25);
}

/* ── Blocks ───────────────────────────────────────────────── */
.tb-block {
    margin-bottom: 3rem;
}

/* ── Cards (featured + available grids) ───────────────────── */
.tb-card--featured,
.tb-card--available {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin-bottom: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.tb-card--featured:hover,
.tb-card--available:hover {
    border-color: rgba(var(--tb-primary-rgb), 0.3);
}

.tb-card--featured .tb-card-title,
.tb-card--available .tb-card-title {
    margin-bottom: 0;
    color: var(--tb-text);
}

.tb-card--featured:hover .tb-card-title,
.tb-card--available:hover .tb-card-title {
    color: var(--tb-primary);
}

.tb-card--available .tb-card-abstract {
    margin-bottom: 0;
}

.tb-card-thumb {
    width: 100%;
    background-color: var(--tb-surface-lowest);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.tb-card-thumb--16x9 {
    aspect-ratio: 16 / 9;
}

.tb-card-thumb--placeholder {
    background-image: linear-gradient(135deg, var(--tb-primary) 0%, var(--tb-primary-container) 100%);
}

.tb-card-body {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.tb-card-meta {
    margin-top: auto;
}

.tb-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tb-clamp-2 > * {
    display: inline;
}

.tb-block--featured .columns,
.tb-block--available .columns {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.tb-block--featured .column,
.tb-block--available .column {
    padding: 0.5rem;
    display: flex;
}

/* ── Ribbons ──────────────────────────────────────────────── */
.tb-ribbon {
    position: absolute;
    top: 22px;
    right: -56px;
    width: 200px;
    transform: rotate(45deg);
    transform-origin: center;
    text-align: center;
    font-family: var(--tb-f-mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.3rem 0;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
}

.tb-ribbon--completed {
    background: linear-gradient(135deg, var(--tb-primary), var(--tb-primary-container));
    color: #0a0d0d;
}

.tb-ribbon--in-progress {
    background: var(--tb-secondary);
    color: #1a1a0a;
}

/* ── Completed list (recessed rows) ───────────────────────── */
.tb-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tb-recessed-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--tb-surface-lowest);
    border: 1px solid rgba(var(--tb-primary-rgb), 0.08);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    color: var(--tb-text-muted);
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.tb-recessed-row:hover {
    border-color: rgba(var(--tb-primary-rgb), 0.22);
    color: var(--tb-text);
}

.tb-recessed-row-icon {
    color: var(--tb-primary);
    flex-shrink: 0;
}

.tb-recessed-row-title {
    flex: 0 1 auto;
    font-family: var(--tb-f-display);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--tb-text);
}

.tb-recessed-row-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex: 1;
    justify-content: flex-end;
    margin-left: auto;
}

.tb-recessed-row-arrow {
    color: var(--tb-text-muted);
    font-family: var(--tb-f-mono);
    flex-shrink: 0;
}

.tb-recessed-row:hover .tb-recessed-row-arrow {
    color: var(--tb-primary);
}

/* ── Label modifiers ──────────────────────────────────────── */
.tb-label--xs      { font-size: 9.5px; margin-bottom: 2px; }
.tb-label--mb      { margin-bottom: 8px; }
.tb-label--mb-sm   { margin-bottom: 6px; }
.tb-label--mb-lg   { margin-bottom: 14px; }
.tb-label--primary   { color: var(--tb-primary); }
.tb-label--secondary { color: var(--tb-secondary); }

/* ── Shared helpers ───────────────────────────────────────── */
.tb-prose--justify { text-align: justify; }
.tb-section        { margin-bottom: 3rem; }
.tb-btn--block     { width: 100%; justify-content: center; }
.tb-fallback-text  { color: var(--tb-on-surface-variant); }

/* ── Meta grid / values (campaign + stage) ────────────────── */
.tb-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    align-items: start;
    margin-bottom: 1.5rem;
}

.tb-meta-value {
    font-family: var(--tb-f-mono);
    font-size: 13px;
    color: var(--tb-on-surface);
    margin: 0;
}

/* ── Sidebar section label (icon + text) ──────────────────── */
.tb-sidebar-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.tb-icon-accent {
    color: var(--tb-primary);
    display: flex;
}

/* ── Campaign hero ────────────────────────────────────────── */
.tb-campaign-hero { padding-top: 2rem; padding-bottom: 2rem; }

.tb-chip-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.tb-campaign-title {
    text-transform: uppercase;
    max-width: 14ch;
    margin-bottom: 1.5rem;
}

.tb-card--abstract { margin-bottom: 1rem; }

/* ── Campaign media panel ─────────────────────────────────── */
.tb-media-panel {
    background: var(--tb-surface-low);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(var(--tb-primary-rgb), 0.08);
}

.tb-media-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.tb-media-placeholder {
    aspect-ratio: 4 / 3;
    background: var(--tb-surface-lowest);
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.tb-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 75%);
    mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 75%);
}

.tb-diamond {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--tb-primary), var(--tb-primary-container));
    display: grid;
    place-items: center;
    font-size: 36px;
    color: rgba(0, 0, 0, 0.55);
    font-family: var(--tb-f-display);
    font-weight: 700;
}

.tb-media-action { padding: 1.25rem; }

.tb-campaign-progress { display: none; margin-bottom: 14px; }

.tb-sidebar-box--mt { margin-top: 1rem; }

/* ── Roadmap ──────────────────────────────────────────────── */
.tb-roadmap-intro {
    font-size: 14px;
    color: var(--tb-on-surface-variant);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.tb-roadmap-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tb-roadmap-row {
    text-decoration: none;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 18px 22px;
    background: var(--tb-surface-low);
    border-radius: 10px;
    transition: background 200ms;
}

.tb-roadmap-stage-label {
    margin-bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tb-stage-title {
    font-family: var(--tb-f-display);
    font-weight: 600;
    font-size: 15.5px;
    letter-spacing: -0.01em;
    color: var(--tb-on-surface);
}

.tb-roadmap-row-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding-right: 4px;
}

.tb-stage-difficulty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tb-roadmap-meta-text,
.tb-stage-eta {
    font-size: 11px;
    font-family: var(--tb-f-mono);
    color: var(--tb-on-surface-dim);
}

.tb-stage-eta { margin: 0; }

/* ── Reward / sealed message card ─────────────────────────── */
.tb-reward-card {
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.tb-reward-card--mt { margin-top: 16px; }

.tb-flex-1 { flex: 1; }

/* ── Stage breadcrumb ─────────────────────────────────────── */
.tb-breadcrumb {
    padding-top: 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tb-breadcrumb a { color: var(--tb-on-surface-variant); }
.tb-breadcrumb-sep { opacity: 0.4; }
.tb-breadcrumb-current { color: var(--tb-on-surface); }

/* ── Stage meta row ───────────────────────────────────────── */
.tb-stage-meta-row {
    display: flex;
    gap: 32px;
    align-items: center;
    margin-top: 22px;
    flex-wrap: wrap;
}

.tb-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tb-primary), var(--tb-primary-container));
    display: grid;
    place-items: center;
    font-family: var(--tb-f-display);
    font-size: 13px;
    color: rgba(0, 0, 0, 0.65);
    font-weight: 700;
    flex-shrink: 0;
}

.tb-meta-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--tb-on-surface-dim);
    flex-shrink: 0;
}

.tb-difficulty-value {
    font-size: 13px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ── Stage body sections ──────────────────────────────────── */
.tb-card--content { margin-top: 32px; }

.tb-files { margin-top: 18px; }

.tb-file-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 8px;
}

.tb-answer-section { margin-top: 40px; }
.tb-answer-form { margin: 0; }

.tb-completion-box { display: none; margin-top: 28px; }

.tb-card--cleared {
    background: linear-gradient(135deg, rgba(var(--tb-primary-rgb), 0.10), rgba(var(--tb-primary-rgb), 0.05));
}

.tb-btn--next { margin-top: 12px; display: inline-flex; }

/* ── Stage sidebar ────────────────────────────────────────── */
.tb-stage-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 96px;
}

.tb-hint-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tb-hint-label { font-size: 13px; color: var(--tb-on-surface); }

.tb-hint-status {
    display: flex;
    align-items: center;
    color: var(--tb-on-surface-dim);
}

.tb-hint-content { display: none; margin-top: 8px; }

.tb-hint-text {
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--tb-on-surface-variant);
    margin: 0;
}

.tb-progress-link { color: inherit; text-decoration: none; }
