/* dental.tracebase.jp top page — tactical board (scoped) */

body.tb-gotham-home {
  overflow-x: hidden;
}

body.tb-gotham-home::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 3px,
    rgba(0, 212, 255, 0.05) 3px,
    rgba(0, 212, 255, 0.05) 4px
  );
}

@keyframes tb-scan-sweep {
  0% {
    transform: translate3d(0, -100%, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translate3d(0, 100vh, 0);
    opacity: 0;
  }
}

body.tb-gotham-home::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: min(180px, 28vh);
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 212, 255, 0.04),
    transparent
  );
  animation: tb-scan-sweep 11s ease-in-out infinite;
  opacity: 0.35;
}

.tb-app {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* —— Site header —— */
.tb-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 10px clamp(14px, 4vw, 36px);
  background: rgba(22, 27, 34, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gotham-line);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.06);
}

.tb-brand {
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.tb-brand__mark {
  font-family: var(--gotham-font-mono);
  font-weight: 700;
  font-size: clamp(1rem, 2.8vw, 1.35rem);
  letter-spacing: 0.06em;
  color: var(--gotham-cyber);
  text-shadow: 0 0 14px var(--gotham-glow-cyan);
}

.tb-brand__suffix {
  font-family: var(--gotham-font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gotham-text-dim);
  text-transform: uppercase;
}

.tb-top-nav-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tb-top-nav-cards > li {
  margin: 0;
}

/* —— Tactical cards (shared) —— */
body.tb-gotham-home .tactical-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 14px;
  min-height: 0;
  background: var(--gotham-surface);
  border: 1px solid var(--gotham-line);
  border-radius: 2px;
  text-decoration: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.14s ease;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}

body.tb-gotham-home a.tactical-card:hover,
body.tb-gotham-home a.tactical-card:focus-visible,
body.tb-gotham-home button.tactical-card:hover,
body.tb-gotham-home button.tactical-card:focus-visible {
  border-color: var(--gotham-cyber);
  box-shadow:
    0 0 20px rgba(0, 212, 255, 0.35),
    0 0 48px rgba(0, 212, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
  outline: none;
}

body.tb-gotham-home button.tactical-card:focus-visible,
body.tb-gotham-home a.tactical-card:focus-visible {
  outline: 1px solid var(--gotham-cyber);
  outline-offset: 2px;
}

body.tb-gotham-home .tactical-card--compact {
  min-width: 0;
  width: auto;
  min-height: 64px;
  padding: 8px 12px;
}

@media (min-width: 480px) {
  body.tb-gotham-home .tactical-card--compact {
    min-width: 118px;
    max-width: 160px;
  }
}

body.tb-gotham-home .tactical-card--featured {
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow:
    0 0 0 1px rgba(0, 212, 255, 0.12),
    0 4px 24px rgba(0, 0, 0, 0.35);
}

body.tb-gotham-home .tactical-card--featured:hover,
body.tb-gotham-home .tactical-card--featured:focus-visible {
  border-color: var(--gotham-lime);
  box-shadow:
    0 0 24px rgba(57, 255, 20, 0.25),
    0 0 40px rgba(0, 212, 255, 0.2),
    inset 0 0 20px rgba(57, 255, 20, 0.04);
}

body.tb-gotham-home .tactical-card__id {
  font-family: var(--gotham-font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--gotham-cyber);
  text-transform: uppercase;
}

body.tb-gotham-home .tactical-card__title {
  font-family: var(--gotham-font-jp);
  font-weight: 700;
  font-size: 14px;
  color: var(--gotham-text);
  line-height: 1.35;
}

body.tb-gotham-home .tactical-card__meta {
  font-family: var(--gotham-font-mono);
  font-size: 10px;
  color: var(--gotham-text-dim);
  letter-spacing: 0.04em;
}

body.tb-gotham-home .tactical-card__cta {
  margin-top: 4px;
  font-family: var(--gotham-font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gotham-lime);
  text-transform: uppercase;
}

/* —— Main —— */
.tb-main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 36px) clamp(14px, 4vw, 32px) 120px;
  box-sizing: border-box;
}

.tb-hero {
  margin-bottom: clamp(24px, 5vw, 40px);
  text-align: center;
}

.tb-hero__eyebrow {
  font-family: var(--gotham-font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--gotham-cyber);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.25);
  margin: 0 0 10px;
}

.tb-hero__title {
  font-family: var(--gotham-font-jp);
  font-weight: 700;
  font-size: clamp(1.15rem, 3.8vw, 1.65rem);
  letter-spacing: 0.03em;
  color: var(--gotham-text);
  margin: 0 0 14px;
  line-height: 1.55;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.12);
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
}

.tb-hero__sub {
  margin: 0 auto;
  max-width: 32em;
  padding: 0;
  font-family: var(--gotham-font-jp);
  font-size: clamp(12px, 2.4vw, 14px);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.75;
  color: var(--gotham-text-dim);
}

.tb-section-heading {
  font-family: var(--gotham-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gotham-cyber);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tb-section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gotham-line), transparent);
}

/* Mission board grid */
.tb-mission-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tb-mission-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .tb-mission-grid--subs {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tb-mission-grid > li {
  margin: 0;
  min-width: 0;
}

body.tb-gotham-home .tb-stat-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}

@media (min-width: 520px) {
  body.tb-gotham-home .tb-stat-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

body.tb-gotham-home .tb-stat-cell {
  padding: 8px 10px;
  background: rgba(10, 12, 16, 0.55);
  border: 1px solid var(--gotham-line);
  border-radius: 2px;
}

body.tb-gotham-home .tb-stat-cell__label {
  display: block;
  font-family: var(--gotham-font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--gotham-cyber);
  margin-bottom: 4px;
  text-transform: uppercase;
}

body.tb-gotham-home .tb-stat-cell__value {
  font-family: var(--gotham-font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--gotham-lime);
  text-shadow: 0 0 8px var(--gotham-glow-lime);
}

body.tb-gotham-home .tb-stat-cell--dim .tb-stat-cell__value {
  color: var(--gotham-text-dim);
  text-shadow: none;
}

.tb-quote {
  text-align: center;
  margin-top: clamp(28px, 6vw, 48px);
  font-family: var(--gotham-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gotham-text-dim);
  font-style: normal;
}

/* —— Floating operator —— */
.tb-operator {
  position: fixed;
  right: clamp(12px, 3vw, 28px);
  bottom: clamp(12px, 3vw, 28px);
  z-index: 50;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  max-width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.tb-operator-holo {
  margin: 0;
  pointer-events: auto;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.tb-operator-holo:focus-visible {
  outline: 2px solid var(--gotham-cyber);
  outline-offset: 4px;
  border-radius: 4px;
}

.tb-operator-holo__img {
  display: block;
  width: clamp(72px, 18vw, 104px);
  height: auto;
  filter: drop-shadow(0 0 10px #00d4ff88) saturate(1.08) contrast(1.05);
  opacity: 0.95;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.tb-operator-holo:hover .tb-operator-holo__img,
.tb-operator-holo:focus-visible .tb-operator-holo__img {
  transform: scale(1.05);
  filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.65)) saturate(1.1) contrast(1.05);
}

.tb-operator-console {
  flex: 1;
  min-width: 200px;
  pointer-events: none;
  background: var(--gotham-surface);
  border: 1px solid var(--gotham-line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tb-operator-console__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-bottom: 1px solid var(--gotham-line);
  background: rgba(0, 212, 255, 0.04);
}

.tb-operator-console__dot {
  width: 6px;
  height: 6px;
  background: var(--gotham-lime);
  box-shadow: 0 0 8px var(--gotham-lime);
  flex-shrink: 0;
}

.tb-operator-console__title {
  font-family: var(--gotham-font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gotham-cyber);
}

.tb-operator-console__body {
  margin: 0;
  padding: 10px 12px 12px;
  font-family: var(--gotham-font-jp);
  font-size: 12px;
  line-height: 1.65;
  color: var(--gotham-text);
}

@media (max-width: 480px) {
  .tb-operator {
    flex-direction: column-reverse;
    align-items: flex-end;
  }

  .tb-operator-console {
    max-width: 100%;
  }
}
