.tbx-home {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.tbx-home-header {
  margin-bottom: 36px;
}
.tbx-home-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.tbx-home-title {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 10px;
}
.tbx-home-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}
.tbx-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-stable);
  box-shadow: 0 0 6px var(--status-stable);
  flex: none;
}

.tbx-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}
.tbx-legend-item { display: flex; align-items: center; gap: 6px; }

.tbx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.tbx-card {
  display: flex;
  gap: 12px;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  color: var(--text-primary);
  transition: border-color .15s ease;
}
.tbx-card:hover {
  border-color: var(--border-strong);
}

/* Stretched-link pattern: this covers the whole card body as the primary
   click target, while the info-icon link sits above it (higher z-index)
   so it stays independently clickable — avoids nesting <a> inside <a>. */
.tbx-card-stretch {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.tbx-card-stretch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tbx-card-strip {
  flex: none;
  width: 4px;
  border-radius: 3px;
  align-self: stretch;
}
.tbx-card-strip[data-status="stable"] { background: var(--status-stable); box-shadow: 0 0 6px var(--status-stable); }
.tbx-card-strip[data-status="wip"] { background: var(--status-wip); box-shadow: 0 0 6px var(--status-wip); }
.tbx-card-strip[data-status="concept"] { background: var(--status-concept); box-shadow: 0 0 6px var(--status-concept); }

.tbx-card-body { flex: 1; min-width: 0; position: relative; }

.tbx-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.tbx-card-icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.tbx-card-icon svg { width: 16px; height: 16px; }

.tbx-card-title {
  font-weight: 600;
  font-size: 14px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tbx-card-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tbx-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.tbx-card-route {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tbx-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.tbx-card-info-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: var(--text-muted);
}
.tbx-card-info-link:hover { color: var(--accent); }
.tbx-card-info-link svg { width: 14px; height: 14px; }

.tbx-home-footer {
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.tbx-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

/* view-toggle hook for phase 1.5 — no JS wires this up yet */
.tbx-grid[data-view="list"] {
  grid-template-columns: 1fr;
}

/* ---------- back link (client pages) ---------- */
.tbx-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 14px;
}
.tbx-back-link:hover { color: var(--text-secondary); }

/* ---------- hero panel ---------- */
.tbx-hero {
  position: relative;
  margin-bottom: 32px;
  padding: 30px 28px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(139, 124, 246, .16), transparent 55%),
    radial-gradient(120% 160% at 100% 0%, rgba(34, 211, 238, .12), transparent 55%),
    var(--panel);
  overflow: hidden;
}
.tbx-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, black, transparent 75%);
  mask-image: radial-gradient(120% 100% at 50% 0%, black, transparent 75%);
  pointer-events: none;
}
.tbx-hero-inner { position: relative; z-index: 1; }

.tbx-hero-title {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 6px 0 14px;
}
.tbx-hero-title-base { color: var(--text-primary); }
.tbx-hero-dot { color: var(--accent); }
.tbx-hero-client {
  color: var(--accent-2);
  animation: tbx-glow 3.4s ease-in-out infinite;
}
@keyframes tbx-glow {
  0%, 100% { text-shadow: 0 0 0 rgba(34, 211, 238, 0); }
  50% { text-shadow: 0 0 16px rgba(34, 211, 238, .6); }
}
@media (prefers-reduced-motion: reduce) {
  .tbx-hero-client { animation: none; }
}

/* ---------- client-code search bar ---------- */
.tbx-search {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  max-width: 360px;
}
.tbx-search-input {
  flex: 1;
  min-width: 0;
  background: var(--panel-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 13px;
}
.tbx-search-input::placeholder { color: var(--text-muted); }
.tbx-search-input:focus { outline: none; border-color: var(--accent); }
.tbx-search-btn {
  border: 1px solid var(--border-strong);
  background: var(--accent);
  color: #14101f;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 0 18px;
  font-size: 13px;
  cursor: pointer;
}
.tbx-search-btn:hover { filter: brightness(1.08); }
.tbx-search-hint {
  min-height: 15px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}
@keyframes tbx-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}
.tbx-search-shake { animation: tbx-shake .4s; border-color: var(--status-concept); }

/* ---------- secret bar (bottom of home page) ---------- */
.tbx-secret {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
.tbx-secret-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: .3;
  transition: opacity .25s ease;
}
.tbx-secret-wrap:focus-within { opacity: 1; }
.tbx-secret-input {
  width: 150px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 4px 2px;
  font-size: 11px;
  text-align: center;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.tbx-secret-input:focus { outline: none; border-bottom-color: var(--border-strong); }
.tbx-secret-input::placeholder { color: var(--text-muted); }
.tbx-secret-btn {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1;
  opacity: .4;
  cursor: not-allowed;
  transition: opacity .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.tbx-secret-btn:disabled { pointer-events: none; }
.tbx-secret-btn.tbx-secret-unlocked {
  opacity: 1;
  cursor: pointer;
  color: var(--status-stable);
  border-color: var(--status-stable);
  box-shadow: 0 0 10px rgba(62, 207, 142, .4);
}
@keyframes tbx-blink {
  0%, 100% { border-bottom-color: var(--border); }
  25%, 75% { border-bottom-color: var(--status-concept); }
  50% { border-bottom-color: transparent; }
}
.tbx-secret-blink { animation: tbx-blink .7s steps(1) 2; }
.tbx-secret-fade { transition: opacity .5s ease; opacity: 0; }
