/* /microbes — language-tuned typography + 3D motion surfaces.
 * Scoped under body.microbes. Prefix new classes with mc-. */

/* ---------- language-optimized type ---------- */
body.microbes {
  --mc-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --mc-depth: 28px;
  --mc-ease: cubic-bezier(.22, 1, .36, 1);
  --mc-font-display: "Segoe UI", system-ui, sans-serif;
  --mc-font-body: "Segoe UI", system-ui, sans-serif;
  --mc-tracking: -0.01em;
  --mc-leading: 1.55;
  --mc-title-leading: 1.2;
  --mc-hero-from: #022c22;
  --mc-hero-mid: #059669;
  --mc-hero-to: #34d399;
}

html[lang^="ko"] body.microbes {
  --mc-font-display: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --mc-font-body: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --mc-tracking: -0.02em;
  --mc-leading: 1.7;
  --mc-title-leading: 1.35;
}
html[lang^="ja"] body.microbes {
  --mc-font-display: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --mc-font-body: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --mc-tracking: 0.02em;
  --mc-leading: 1.75;
  --mc-title-leading: 1.4;
}
html[lang^="zh"] body.microbes {
  --mc-font-display: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mc-font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mc-tracking: 0.01em;
  --mc-leading: 1.7;
  --mc-title-leading: 1.35;
}
html[lang="ru"] body.microbes {
  --mc-font-display: "Segoe UI", "PT Sans", "Helvetica Neue", Arial, sans-serif;
  --mc-font-body: "Segoe UI", "PT Sans", Arial, sans-serif;
  --mc-tracking: 0;
  --mc-leading: 1.6;
}
html[lang="de"] body.microbes,
html[lang="es"] body.microbes,
html[lang="fr"] body.microbes,
html[lang="pt-BR"] body.microbes,
html[lang="pt"] body.microbes {
  --mc-font-display: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mc-tracking: -0.015em;
  --mc-leading: 1.58;
}

html[lang^="ko"] body.microbes,
html[lang^="ja"] body.microbes {
  --mc-hero-from: #022c22;
  --mc-hero-mid: #047857;
  --mc-hero-to: #6ee7b7;
}
html[lang^="zh"] body.microbes {
  --mc-hero-from: #022c22;
  --mc-hero-mid: #059669;
  --mc-hero-to: #a78bfa;
}
html[lang="de"] body.microbes,
html[lang="ru"] body.microbes {
  --mc-hero-from: #022c22;
  --mc-hero-mid: #065f46;
  --mc-hero-to: #34d399;
}

body.microbes,
body.microbes .lede,
body.microbes .sub,
body.microbes p,
body.microbes .section-intro {
  font-family: var(--mc-font-body);
  letter-spacing: var(--mc-tracking);
  line-height: var(--mc-leading);
}
body.microbes h1,
body.microbes h2,
body.microbes h3,
body.microbes .kicker {
  font-family: var(--mc-font-display);
  line-height: var(--mc-title-leading);
  letter-spacing: var(--mc-tracking);
}

html[lang^="ko"] body.microbes,
html[lang^="ja"] body.microbes,
html[lang^="zh"] body.microbes {
  font-size: 1.02rem;
}
html[lang^="ko"] body.microbes h1,
html[lang^="ja"] body.microbes h1,
html[lang^="zh"] body.microbes h1 {
  word-break: keep-all;
  text-wrap: balance;
}

/* ---------- home atmosphere ---------- */
body.microbes .jhome-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 480px at 12% -12%, color-mix(in srgb, var(--mc-hero-to) 35%, transparent), transparent 58%),
    radial-gradient(900px 420px at 92% 8%, color-mix(in srgb, #7c3aed 18%, transparent), transparent 55%),
    linear-gradient(165deg, var(--mc-hero-from) 0%, var(--mc-hero-mid) 48%, var(--mc-hero-to) 100%);
  color: #ecfdf5;
}
body.microbes .jhome-hero .lede,
body.microbes .jhome-hero .crumbs a,
body.microbes .jhome-hero .kicker { color: #a7f3d0; }
body.microbes .jhome-hero h1 { color: #fff; text-wrap: balance; }
body.microbes .jhome-hero .jh-stats b { color: #fff; }

body.microbes .topic-card .jc-meter i,
body.microbes .jc-meter i {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

/* ---------- 3D stage (home) ---------- */
.mc-stage-wrap {
  perspective: 1200px;
  margin: 1.25rem 0 0.25rem;
}
.mc-stage {
  --mc-tilt-x: 0deg;
  --mc-tilt-y: 0deg;
  position: relative;
  min-height: 176px;
  transform-style: preserve-3d;
  transform: rotateX(var(--mc-tilt-x)) rotateY(var(--mc-tilt-y));
  transition: transform .45s var(--mc-ease);
  border-radius: 22px;
  background:
    radial-gradient(60% 80% at 50% 120%, rgba(52, 211, 153, .32), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .14);
  overflow: hidden;
}
.mc-stage-floor {
  position: absolute;
  inset: auto 8% 10% 8%;
  height: 44%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(52, 211, 153, .38), transparent 70%);
  filter: blur(2px);
  transform: rotateX(68deg) translateZ(-40px);
  pointer-events: none;
}
.mc-orb {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 66px;
  height: 66px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--card-accent, #059669) 22%, rgba(255, 255, 255, .12));
  border: 1px solid color-mix(in srgb, var(--card-accent, #059669) 45%, rgba(255, 255, 255, .25));
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .28);
  backdrop-filter: blur(8px);
  transform-style: preserve-3d;
  will-change: transform;
}
.mc-orb-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 800;
  color: #fff;
  background: var(--card-accent, #059669);
  letter-spacing: -.02em;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .4);
}
.mc-orb b {
  position: absolute;
  bottom: -1.35rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  color: rgba(236, 253, 245, .92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.mc-orb:nth-child(2) { left: 12%; top: 26%; }
.mc-orb:nth-child(3) { left: 34%; top: 16%; }
.mc-orb:nth-child(4) { left: 56%; top: 20%; }
.mc-orb:nth-child(5) { left: 76%; top: 28%; }
.mc-stage.is-still .mc-orb { transform: none !important; }

.mc-path {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.15rem;
}
.mc-path a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #ecfdf5;
  font-size: .86rem;
  font-weight: 650;
  text-decoration: none;
  transition: transform .25s var(--mc-ease), background .25s ease, box-shadow .25s ease;
}
.mc-path a:hover,
.mc-path a.is-hot {
  background: rgba(255, 255, 255, .22);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .55);
}

html[lang^="ko"] .mc-orb b,
html[lang^="ja"] .mc-orb b,
html[lang^="zh"] .mc-orb b {
  font-size: .62rem;
  letter-spacing: 0;
}

/* ---------- deep-tilt shine ---------- */
body.microbes [data-tilt-deep] {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform .35s var(--mc-ease), box-shadow .35s ease;
  position: relative;
}
body.microbes [data-tilt-deep]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 40%),
    rgba(255, 255, 255, calc(var(--shine, 0) * .35)), transparent 55%);
  opacity: 0;
  transition: opacity .3s ease;
}
body.microbes [data-tilt-deep]:hover::after { opacity: 1; }
body.microbes [data-tilt-deep]:hover {
  box-shadow: 0 22px 48px -20px rgba(15, 23, 42, .45), 0 2px 8px rgba(15, 23, 42, .08);
}

body.microbes .topic-card,
body.microbes .field-card,
body.microbes .pillar-card,
body.microbes .sec-card,
body.microbes .mc-fam-card {
  transform-style: preserve-3d;
}

/* ---------- family cards ---------- */
body.microbes .mc-fam-card {
  border-top: 3px solid var(--card-accent, var(--accent, #059669));
}

/* ---------- scale figure ---------- */
body.microbes .mc-scale {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  background: #f0fdf4;
}
body.microbes .mc-scale-frame {
  margin: 0 0 1.25rem;
  padding: 0.4rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #ecfdf5, #fff);
  border: 1px solid #d1fae5;
  box-shadow: 0 18px 40px -30px rgba(6, 78, 59, .28);
}
body.microbes .mc-scale-dot.is-dim { opacity: .28; }
body.microbes .mc-scale-dot.is-hot circle {
  stroke-width: 2.4;
  filter: drop-shadow(0 0 6px rgba(5, 150, 105, .45));
}
body.microbes .mc-scale-slider {
  margin: 0 0 1.35rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #f0fdf4;
  border: 1px solid #d1fae5;
}
body.microbes .mc-slider-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  margin-bottom: .45rem;
}
body.microbes .mc-scale-slider input[type="range"] {
  width: 100%;
  accent-color: #059669;
}
body.microbes .mc-slider-unit { margin: .4rem 0 0; }

/* ---------- disclaimer ---------- */
.mc-disclaimer {
  margin: 0 0 1.5rem;
  padding: .9rem 1.05rem;
  border-left: 3px solid var(--accent, #059669);
  background: var(--mc-soft, rgba(5, 150, 105, .08));
  border-radius: 0 10px 10px 0;
  font-size: .9rem;
  color: var(--muted, #64748b);
}
.mc-disclaimer p { margin: 0; }
html[lang^="ko"] .mc-disclaimer,
html[lang^="ja"] .mc-disclaimer {
  font-size: .88rem;
  line-height: 1.75;
}

/* ---------- kind badge ---------- */
.mc-kind {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent, #059669);
  margin-bottom: .35rem;
  padding: .12rem .5rem;
  border-radius: 999px;
  background: var(--mc-soft);
}
html[lang^="ko"] .mc-kind,
html[lang^="ja"] .mc-kind,
html[lang^="zh"] .mc-kind {
  text-transform: none;
  letter-spacing: 0;
  font-size: .78rem;
}

/* ---------- myth vs reality ---------- */
.mc-myth-grid {
  display: grid;
  gap: 1rem;
}
.mc-myth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}
.mc-myth,
.mc-real {
  padding: 1.05rem 1.15rem 1.15rem;
}
.mc-myth { background: #fef2f2; }
.mc-real { background: #ecfdf5; }
.mc-myth span,
.mc-real span {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .4rem;
  opacity: .8;
}
.mc-myth h3 { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.mc-real p { margin: 0; line-height: 1.55; }

/* ---------- VS ---------- */
.mc-vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0 1.5rem;
}
.mc-vs-col { text-align: center; }
.mc-vs-mid {
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted, #64748b);
}
.mc-vs-scores {
  display: grid;
  gap: .65rem;
}
.mc-vs-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto 1fr 3rem;
  gap: .5rem;
  align-items: center;
}
.mc-vs-row .bar { background: var(--track, #e2e8f0); border-radius: 999px; height: 10px; overflow: hidden; }
.mc-vs-row .fill { height: 100%; border-radius: 999px; background: var(--accent, #059669); width: 0; }

/* ---------- mark badges ---------- */
body.microbes .mc-ico {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 11px;
  font-size: .95rem;
  font-weight: 800;
  color: #fff;
  background: var(--card-accent, var(--accent));
  letter-spacing: -.02em;
  line-height: 1;
  flex-shrink: 0;
}
body.microbes .mc-ico-sm {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  font-size: .78rem;
}

body.microbes .map {
  border-radius: 18px;
  padding: 22px 20px 16px;
  background: linear-gradient(180deg, #fbfcfd, #fff);
  box-shadow: 0 16px 36px -28px rgba(15, 23, 42, .28);
}

body.microbes .hero .pills { gap: 8px; }
body.microbes .hero a.pill {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .45);
  color: #f8fffc;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}
body.microbes .hero a.pill:hover {
  background: rgba(255, 255, 255, .28);
  color: #fff;
  text-decoration: none;
}
body.microbes .hero a.pill.active {
  background: var(--accent, #059669);
  border-color: transparent;
  color: #fff;
  text-shadow: none;
}

[data-mc-depth] { will-change: transform; }

@media (max-width: 700px) {
  .mc-orb { width: 52px; height: 52px; border-radius: 14px; }
  .mc-stage { min-height: 148px; }
  .mc-myth-row,
  .mc-vs { grid-template-columns: 1fr; }
  .mc-vs-mid { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  body.microbes [data-tilt-deep],
  .mc-path a,
  .mc-stage {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  .mc-stage { transform: none !important; }
}


/* ---------- local lens (per-language country notes) ---------- */
body.microbes .mc-locale {
  margin: 1.75rem 0;
  padding: 1.25rem 1.35rem 1.4rem;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
body.microbes .mc-locale .kicker { display: inline-block; margin-bottom: 0.35rem; }
body.microbes .mc-locale-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.85rem;
  margin: 0.85rem 0 0.5rem;
}
body.microbes .mc-locale-card {
  background: color-mix(in srgb, #fff 72%, var(--mc-soft));
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 12%, transparent);
}
body.microbes .mc-locale-card h3 { margin: 0 0 0.35rem; font-size: 1.02rem; }
body.microbes .mc-locale-card p { margin: 0; }
body.microbes .mc-locale-go { margin: 0.6rem 0 0; }
body.microbes .mc-locale-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
body.microbes .mc-locale-meta ul { margin: 0.35rem 0 0; padding-left: 1.1rem; }
html[lang^="ko"] body.microbes .mc-locale h2,
html[lang^="ja"] body.microbes .mc-locale h2,
html[lang^="zh"] body.microbes .mc-locale h2 { word-break: keep-all; }

/* --- UX OSS: topic filters --- */
body.microbes .mc-filter {
  margin: 0 0 1.1rem; padding: 1rem 1.1rem; border-radius: 14px;
  background: color-mix(in srgb, var(--accent, #059669) 6%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent, #059669) 18%, #e2e8f0);
}
body.microbes .mc-filter input[type="search"] {
  width: min(420px, 100%); padding: .55rem .75rem; border-radius: 10px; border: 1px solid #cbd5e1;
}
body.microbes .mc-filter-fams, body.microbes .mc-filter-bands {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: .65rem; align-items: center;
}
body.microbes .mc-band-lab { font-size: .8rem; font-weight: 700; color: #64748b; margin-inline: .35rem 0; }
body.microbes .mc-filter-empty { color: #64748b; margin: .6rem 0 0; }
body.microbes mark { background: #bbf7d0; color: inherit; padding: 0 .1em; border-radius: 2px; }
body.microbes .tippy-box[data-theme~='microbes'] { background: #065f46; color: #ecfdf5; }
body.microbes .tippy-box[data-theme~='microbes'] .tippy-arrow { color: #065f46; }

/* --- scale tips --- */
body.microbes .mc-scale-tips {
  margin: 1rem 0 1.4rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

/* --- P1 encounter trees --- */
body.microbes .mc-encounter-trees {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
body.microbes .mc-tree-disclaimer {
  border-left: 3px solid #c2410c;
  padding-left: .75rem;
  color: #9a3412;
}
body.microbes .mc-tree { margin: .65rem 0; background: #fff; border-radius: 12px; padding: .65rem .85rem; border: 1px solid #ffedd5; }
body.microbes .mc-tree summary { font-weight: 700; cursor: pointer; }
body.microbes .mc-tree-branch h4 { margin: 0 0 .35rem; font-size: 1rem; }

/* --- P2 scale worksheet + literacy checks --- */
body.microbes .mc-enc-pick,
body.microbes .mc-scale-ws,
body.microbes .mc-myth-check {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid #a7f3d0;
  background: #f0fdf4;
}
body.microbes .mc-myth-check { background: #fff7ed; border-color: #fed7aa; }
body.microbes .mc-ws-disclaimer,
body.microbes .mc-myth-disclaimer {
  border-left: 3px solid #c2410c;
  padding-left: .75rem;
  color: #9a3412;
}
body.microbes .mc-ws-rows { list-style: none; margin: .85rem 0 0; padding: 0; display: grid; gap: .55rem; }
body.microbes .mc-ws-row {
  display: grid;
  grid-template-columns: minmax(7rem, 12rem) 5.5rem 1fr;
  gap: .55rem;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: .45rem .65rem;
  border: 1px solid #d1fae5;
}
body.microbes .mc-ws-name { font-weight: 650; }
body.microbes .mc-ws-note {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: .35rem .55rem;
}
body.microbes .mc-myth-check-card {
  background: #fff;
  border-radius: 12px;
  padding: .65rem .85rem;
  margin: .55rem 0;
  border: 1px solid #ffedd5;
}
body.microbes .mc-myth-check-card summary { cursor: pointer; font-weight: 650; }
body.microbes .mc-myth-kicker { color: #9a3412; font-size: .8rem; letter-spacing: .02em; }
@media (max-width: 720px) {
  body.microbes .mc-ws-row { grid-template-columns: 1fr; }
}
@media print {
  body.mc-printing-ws .site-header,
  body.mc-printing-ws .site-footer,
  body.mc-printing-ws .ad-unit,
  body.mc-printing-ws .mc-scale-slider,
  body.mc-printing-ws .mc-encounter-trees,
  body.mc-printing-ws .mc-myth-check { display: none !important; }
  body.mc-printing-ws .mc-scale-ws { border: none; }
}

/* P3: scope banner + magnitude duel */
body.microbes .mc-scope-banner {
  margin: .75rem 0 1rem;
  padding: .75rem .9rem;
  border-left: 3px solid var(--accent, #0d9488);
  background: color-mix(in srgb, var(--accent, #0d9488) 8%, transparent);
}
body.microbes .mc-scope-banner strong { display: block; margin-bottom: .25rem; }
body.microbes .mc-scope-banner p { margin: 0; }
body.microbes .mc-duel { margin: 1.25rem 0 1.5rem; }
body.microbes .mc-duel-picks {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: .75rem 0;
}
body.microbes .mc-duel-picks label { display: grid; gap: .35rem; font-weight: 600; }
body.microbes .mc-duel-picks select { font: inherit; padding: .4rem .5rem; }
body.microbes .mc-duel-out { font-weight: 650; min-height: 1.4em; }

/* Signature: visual-diff — log-scale drama + organism silhouettes */
body.microbes .mc-scale-frame {
  padding: .55rem;
  border-radius: 20px;
  background:
    radial-gradient(80% 60% at 10% 0%, rgba(124, 58, 237, .12), transparent 50%),
    radial-gradient(70% 50% at 90% 10%, rgba(37, 99, 235, .12), transparent 45%),
    linear-gradient(180deg, #ecfdf5, #fff);
  border: 1px solid #a7f3d0;
  box-shadow: 0 28px 50px -34px rgba(6, 78, 59, .45);
}
body.microbes .mc-scale {
  background: transparent;
}
body.microbes .mc-scale-dot .mc-sil {
  transition: filter .25s var(--mc-ease), opacity .25s var(--mc-ease), transform .25s var(--mc-ease);
  transform-box: fill-box;
  transform-origin: center;
}
body.microbes .mc-scale-dot .mc-sil-stroke {
  transition: opacity .25s var(--mc-ease);
}
body.microbes .mc-scale-dot.is-dim {
  opacity: .22;
  filter: grayscale(.4);
}
body.microbes .mc-scale-dot.is-hot .mc-sil,
body.microbes .mc-scale-dot.is-hot circle.mc-sil,
body.microbes .mc-scale-dot.is-hot ellipse.mc-sil,
body.microbes .mc-scale-dot.is-hot path.mc-sil,
body.microbes .mc-scale-dot.is-hot polygon.mc-sil {
  filter: drop-shadow(0 0 10px rgba(5, 150, 105, .55));
  stroke-width: 2.2;
  transform: scale(1.08);
}
body.microbes .mc-scale-dot.is-hot circle {
  stroke-width: 2.4;
  filter: drop-shadow(0 0 6px rgba(5, 150, 105, .45));
}
body.microbes .mc-scale-slider {
  background: linear-gradient(90deg, #f5f3ff, #ecfdf5 45%, #eff6ff);
  border-color: #a7f3d0;
}
@media (prefers-reduced-motion: reduce) {
  body.microbes .mc-scale-dot .mc-sil,
  body.microbes .mc-scale-dot.is-hot .mc-sil {
    transform: none !important;
    transition: none !important;
  }
}
/* ===========================================================================
 * Hub visual polish — glance / explore contrast + scannability (2026-09-17)
 * Distinctive biotic violet hub shell. App-scoped only.
 * =========================================================================== */
body.microbes {
  --hub-pack-bg: #ffffff;
  --hub-pack-border: rgba(17, 24, 39, .12);
  --hub-pack-ink: #111827;
  --hub-muted: #4b5563;
  --hub-accent: #7c3aed;
}
body.microbes .tl-viz-shell.is-home {
  margin: 0 0 2rem;
  padding: 1rem 1.15rem 1.2rem;
  border: 1px solid color-mix(in srgb, var(--hub-accent) 22%, var(--hub-pack-border));
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--hub-accent) 9%, #fff), #fff 42%), #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 10px 28px -18px rgba(17, 24, 39, .22);
}
body.microbes .tl-viz-kicker,
body.microbes .tl-viz-cap { color: #374151 !important; letter-spacing: .08em; }
body.microbes .tl-viz-hint { color: #4b5563 !important; }
body.microbes .tl-viz-dens label { color: #111827; border-color: rgba(17, 24, 39, .14); font-weight: 700; }
body.microbes .tl-viz-dens input:checked + label { background: #111827; color: #fff; border-color: #111827; }
body.microbes .tl-viz-packs { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)) !important; gap: 10px !important; }
body.microbes .tl-viz-pack {
  background: var(--hub-pack-bg) !important;
  border: 1px solid var(--hub-pack-border) !important;
  color: var(--hub-pack-ink) !important;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .05);
  min-height: 52px;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  white-space: nowrap;
  font-weight: 700 !important;
  gap: 8px !important;
}
body.microbes .tl-viz-pack .tl-ico { color: var(--hub-accent) !important; flex: 0 0 auto; }
body.microbes .tl-viz-pack .tl-dot { flex: 0 0 auto; }
body.microbes .tl-viz-pack > span:not(.tl-dot):not(.tl-preview-pop) { overflow: hidden; text-overflow: ellipsis; }
body.microbes .tl-viz-pack:hover,
body.microbes .tl-viz-pack.is-on {
  border-color: color-mix(in srgb, var(--hub-accent) 55%, #cbd5e1) !important;
  background: #fff !important;
  box-shadow: 0 4px 16px rgba(17, 24, 39, .09);
  transform: translateY(-1px);
  text-decoration: none;
}
body.microbes .tl-viz-shell:has(input[value="compact"]:checked) .tl-viz-packs { gap: 6px !important; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)) !important; }
body.microbes .tl-viz-shell:has(input[value="compact"]:checked) .tl-viz-pack { min-height: 40px; padding: 8px 10px !important; font-size: .78rem !important; border-radius: 10px !important; }
body.microbes .tl-start-row,
body.microbes .tl-popular-row,
body.microbes .tl-related-in-row { gap: 14px !important; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important; }
body.microbes .tl-start-card,
body.microbes .tl-popular-card,
body.microbes .tl-related-in-card,
body.microbes a.tl-glance-card {
  background: #fff !important;
  border: 1px solid rgba(17, 24, 39, .1) !important;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 10px 28px -18px rgba(17, 24, 39, .2);
  min-height: 6.5rem;
  padding: 16px 18px !important;
  border-radius: 14px !important;
  border-top: 3px solid color-mix(in srgb, var(--hub-accent) 70%, transparent);
}
body.microbes .tl-start-card:hover,
body.microbes .tl-popular-card:hover,
body.microbes .tl-related-in-card:hover,
body.microbes a.tl-glance-card:hover {
  border-color: color-mix(in srgb, var(--hub-accent) 45%, #cbd5e1) !important;
  box-shadow: 0 6px 22px rgba(17, 24, 39, .1);
  transform: translateY(-2px);
  text-decoration: none;
}
body.microbes .tl-start-card strong,
body.microbes .tl-popular-card strong,
body.microbes .tl-related-in-card strong { color: #111827 !important; }
body.microbes .tl-start-card span:not(.tl-start-k),
body.microbes .tl-popular-card span:not(.tl-dot),
body.microbes .tl-related-in-card span,
body.microbes .tl-start-here .hint,
body.microbes .mc-duel-out,
body.microbes .mc-scope-banner,
body.microbes .mc-scope-banner p { color: #374151 !important; }
body.microbes .mc-slider-label { color: #064e3b !important; }
body.microbes .tl-start-k { color: #4b5563 !important; font-weight: 700; }
body.microbes .ppl-boundary,
body.microbes .ppl-p1-norank,
body.microbes .tl-opt10-norank,
body.microbes .rh-disclaimer {
  color: #1f2937;
  border-color: color-mix(in srgb, var(--hub-accent) 28%, #e2e8f0);
  background: color-mix(in srgb, var(--hub-accent) 8%, #fff);
}
@media (max-width: 720px) {
  body.microbes .tl-viz-pack { white-space: normal; }
  body.microbes .tl-viz-packs { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)) !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.microbes .tl-viz-pack:hover,
  body.microbes .tl-start-card:hover,
  body.microbes .tl-popular-card:hover,
  body.microbes .tl-related-in-card:hover,
  body.microbes a.tl-glance-card:hover { transform: none; }
}

/* P4-POLISH-2026-09-18 */
body.microbes .mc-scale-frame,body.microbes .mc-scale{overflow:visible}
body.microbes .mc-scale{max-width:100%;height:auto}
body.microbes .mc-duel-out,body.microbes .mc-scope-banner,body.microbes .mc-scope-banner p{color:#111827}
body.microbes .mc-scale-slider,body.microbes .mc-slider-label{color:#064e3b}
body.microbes .tl-viz-pack{white-space:normal!important;height:auto!important;align-items:center}
body.microbes .tl-viz-pack>span:not(.tl-dot):not(.tl-preview-pop){display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal!important;line-height:1.25;text-overflow:unset!important}
body.microbes .p3-tool,body.microbes .p3-card,body.microbes .p3-out{color:#111827}
body.microbes .p3-card{background:#fff}
body.microbes .p3-form label,body.microbes .p3-checks label{color:#1f2937}

/* P5-POLISH-2026-09-19 */
body.microbes .mc-scale-hub-card h3,body.microbes .topic-card h3{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;line-height:1.25;color:#064e3b}
body.microbes .mc-scale-hub-card .sub,body.microbes .topic-card .sub{color:#14532d}

/* MOBILE-390 */
@media (max-width: 480px) {
  html:has(body.microbes),
  body.microbes { overflow-x: clip; }
  html body.microbes .wrap,
  html body.microbes main { max-width: 100%; min-width: 0; overflow-wrap: break-word; }
  html body.microbes svg,
  html body.microbes img { max-width: 100%; height: auto; }
  html body.microbes .mc-scale-frame,
  html body.microbes .mc-scale { width: 100%; max-width: 100%; overflow: hidden; }
  html body.microbes .grid,
  html body.microbes .grid.wide,
  html body.microbes .tl-explore-grid,
  html body.microbes .tl-popular-row,
  html body.microbes .tl-start-row,
  html body.microbes .tl-related-in-row,
  html body.microbes .facts,
  html body.microbes .stats,
  html body.microbes .tl-glance,
  html body.microbes .related,
  html body.microbes .mc-myth-row,
  html body.microbes .mc-vs { grid-template-columns: 1fr; }
  html body.microbes .pills,
  html body.microbes .tl-sec-jump-row,
  html body.microbes .tl-sec-scroller ol,
  html body.microbes .tl-x3-skip-row,
  html body.microbes .spills,
  html body.microbes .jtoc { flex-wrap: wrap; max-width: 100%; min-width: 0; }
  html body.microbes .tl-sec-scroller {
    overflow: visible; mask-image: none; -webkit-mask-image: none; max-width: 100%; min-width: 0;
  }
  html body.microbes .pill,
  html body.microbes .tl-sec-jump-chip,
  html body.microbes .tl-explore-chip,
  html body.microbes .jtoc a,
  html body.microbes [class$="-chip"] {
    white-space: normal; overflow: visible; text-overflow: unset; max-width: 100%; height: auto;
    -webkit-line-clamp: unset;
  }
  html body.microbes .tl-heat-score,
  html body.microbes .tl-viz-hbar { grid-template-columns: minmax(0, 1fr) minmax(4rem, 1.2fr) auto; max-width: 100%; }
  html body.microbes .tl-heat-score-lab,
  html body.microbes .tl-viz-hbar-lab { white-space: normal; min-width: 0; overflow-wrap: anywhere; }
}
