/* Marvel Comics Database - Scoped CSS */
:root {
  --mcd-primary: #e11d48;
  --mcd-primary-hover: #be123c;
  --mcd-surface: #ffffff;
  --mcd-bg: #fff1f2;
  --mcd-text: #0f172a;
  --mcd-text-muted: #64748b;
  --mcd-border: #e2e8f0;
  --mcd-radius: 10px;
  --mcd-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --mcd-font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --mcd-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body.mcd-body {
  margin: 0;
  padding: 0;
  font-family: var(--mcd-font-sans);
  background-color: var(--mcd-bg);
  color: var(--mcd-text);
  line-height: 1.5;
}

.mcd-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.mcd-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mcd-brand {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.mcd-tagline {
  font-size: 0.85rem;
  color: #fecdd3;
}

/* Intro */
.mcd-intro-section {
  background: #ffffff;
  border-bottom: 1px solid var(--mcd-border);
  padding: 32px 0 24px;
  text-align: center;
}

.mcd-main-title {
  margin: 0 0 10px;
  font-size: 2.1rem;
  font-weight: 800;
  color: #881337;
  letter-spacing: -0.02em;
}

.mcd-main-subtitle {
  margin: 0 auto;
  max-width: 720px;
  font-size: 1.05rem;
  color: var(--mcd-text-muted);
}

/* Main */
.mcd-main {
  padding: 28px 0 48px;
}

/* Ad slots */
.mcd-ad-container {
  min-height: 280px;
  background-color: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--mcd-radius);
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Tabs */
.mcd-tabs-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--mcd-border);
  padding-bottom: 4px;
}

.mcd-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--mcd-text-muted);
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: all 0.15s ease;
}

.mcd-tab-btn:hover {
  color: var(--mcd-primary);
  background: #ffe4e6;
}

.mcd-tab-btn-active {
  color: var(--mcd-primary);
  border-bottom: 3px solid var(--mcd-primary);
  background: #ffffff;
}

.mcd-tab-panel {
  display: block;
}

.mcd-tab-panel[hidden] {
  display: none;
}

/* Cards */
.mcd-card {
  background: var(--mcd-surface);
  border: 1px solid var(--mcd-border);
  border-radius: var(--mcd-radius);
  padding: 24px;
  box-shadow: var(--mcd-shadow);
  margin-bottom: 24px;
}

.mcd-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.mcd-card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #881337;
}

/* Badges */
.mcd-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mcd-badge-primary {
  background: #ffe4e6;
  color: #e11d48;
}

.mcd-badge-neutral {
  background: #f1f5f9;
  color: #475569;
}

/* Presets & Chips */
.mcd-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
}

.mcd-presets-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mcd-text-muted);
}

.mcd-chip {
  background: #f1f5f9;
  border: 1px solid var(--mcd-border);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.85rem;
  cursor: pointer;
  color: #334155;
  transition: all 0.15s ease;
}

.mcd-chip:hover {
  background: #e2e8f0;
}

.mcd-chip-active {
  background: var(--mcd-primary);
  color: #ffffff;
  border-color: var(--mcd-primary);
}

/* Search Row */
.mcd-search-row {
  margin-bottom: 8px;
}

.mcd-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #334155;
}

.mcd-search-wrap {
  display: flex;
  gap: 10px;
}

.mcd-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  border: 1px solid var(--mcd-border);
  border-radius: 6px;
  outline: none;
}

.mcd-input:focus {
  border-color: var(--mcd-primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.2);
}

.mcd-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  border: 1px solid var(--mcd-border);
  border-radius: 6px;
  outline: none;
  background-color: #fff;
}

.mcd-select:focus {
  border-color: var(--mcd-primary);
}

.mcd-form-group {
  margin-bottom: 12px;
}

/* Buttons */
.mcd-btn {
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mcd-btn-primary {
  background: var(--mcd-primary);
  color: #ffffff;
}

.mcd-btn-primary:hover {
  background: var(--mcd-primary-hover);
}

.mcd-btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.mcd-btn-secondary:hover {
  background: #cbd5e1;
}

.mcd-btn-xs {
  background: #f1f5f9;
  border: 1px solid var(--mcd-border);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  color: #334155;
}

.mcd-btn-xs:hover {
  background: #e2e8f0;
}

.mcd-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* Hero Card */
.mcd-hero-card {
  background: #1e1b4b;
  color: #ffffff;
  border-radius: var(--mcd-radius);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.mcd-hero-main {
  flex: 1;
  min-width: 280px;
}

.mcd-hero-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.mcd-alignment-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}

.mcd-align-hero { background: #0284c7; color: #ffffff; }
.mcd-align-villain { background: #dc2626; color: #ffffff; }
.mcd-align-antihero { background: #7c3aed; color: #ffffff; }

.mcd-hero-creators {
  font-size: 0.8rem;
  color: #cbd5e1;
}

.mcd-hero-name {
  margin: 4px 0;
  font-size: 2rem;
  font-weight: 900;
  color: #ffffff;
}

.mcd-hero-real {
  font-size: 0.95rem;
  color: #f43f5e;
  margin: 0 0 12px;
}

.mcd-hero-bio {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.mcd-hero-affiliations {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mcd-affil-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
}

.mcd-affil-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mcd-tag {
  background: rgba(255, 255, 255, 0.15);
  padding: 3px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  color: #ffffff;
}

.mcd-hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 18px 20px;
  border-radius: 8px;
  min-width: 240px;
}

.mcd-dossier-box {
  display: flex;
  flex-direction: column;
}

.mcd-dossier-label {
  font-size: 0.75rem;
  color: #f43f5e;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.mcd-dossier-val {
  font-size: 0.9rem;
  color: #ffffff;
}

/* Section Heading */
.mcd-section-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #881337;
  margin: 28px 0 16px;
}

/* Power Grid */
.mcd-power-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.mcd-stat-card {
  background: #ffffff;
  border: 1px solid var(--mcd-border);
  border-radius: var(--mcd-radius);
  padding: 16px;
  box-shadow: var(--mcd-shadow);
}

.mcd-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.mcd-stat-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.mcd-stat-num {
  font-size: 0.85rem;
  color: var(--mcd-primary);
}

.mcd-stat-meter {
  height: 8px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.mcd-stat-bar {
  height: 100%;
  border-radius: 9999px;
  background: var(--mcd-primary);
}

.mcd-bar-1 { width: 14%; background: #64748b; }
.mcd-bar-2 { width: 28%; background: #3b82f6; }
.mcd-bar-3 { width: 43%; background: #10b981; }
.mcd-bar-4 { width: 57%; background: #eab308; }
.mcd-bar-5 { width: 71%; background: #f97316; }
.mcd-bar-6 { width: 85%; background: #ef4444; }
.mcd-bar-7 { width: 100%; background: #8b5cf6; }

.mcd-stat-desc {
  margin: 0;
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.4;
}

/* Arcs Grid */
.mcd-arcs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.mcd-arc-card {
  background: #ffffff;
  border: 1px solid var(--mcd-border);
  border-radius: var(--mcd-radius);
  padding: 18px;
  box-shadow: var(--mcd-shadow);
}

.mcd-arc-year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--mcd-primary);
  background: #ffe4e6;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.mcd-arc-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.mcd-arc-desc {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.45;
}

/* Battle Arena */
.mcd-battle-selectors {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.mcd-battle-selectors .mcd-form-group {
  flex: 1;
  min-width: 240px;
}

.mcd-battle-vs {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--mcd-primary);
}

.mcd-table-wrap {
  background: #ffffff;
  border: 1px solid var(--mcd-border);
  border-radius: var(--mcd-radius);
  overflow-x: auto;
  box-shadow: var(--mcd-shadow);
  margin-bottom: 20px;
}

.mcd-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.85rem;
}

.mcd-table th, .mcd-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.mcd-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.mcd-winner-1 { font-weight: 700; color: #0284c7; }
.mcd-winner-2 { font-weight: 700; color: #dc2626; }
.mcd-winner-tie { color: #64748b; }

.mcd-battle-verdict {
  background: #f8fafc;
  border: 1px solid var(--mcd-border);
  border-radius: var(--mcd-radius);
  padding: 18px;
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.5;
}

.mcd-key-status {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--mcd-text-muted);
}

.mcd-text-muted {
  font-size: 0.9rem;
  color: var(--mcd-text-muted);
  line-height: 1.5;
}

/* Disclaimer */
.mcd-disclaimer {
  background: #f8fafc;
  border-top: 1px solid var(--mcd-border);
  padding: 16px 0;
  font-size: 0.8rem;
  color: #64748b;
}

.mcd-disclaimer-text {
  margin: 0;
}

/* Guide Section */
.mcd-guide-section {
  background: #ffffff;
  padding: 40px 0;
  border-top: 1px solid var(--mcd-border);
}

.mcd-section-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #881337;
  margin: 0 0 12px;
}

.mcd-guide-intro {
  font-size: 0.95rem;
  color: #475569;
  max-width: 800px;
  margin: 0 0 24px;
}

.mcd-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.mcd-guide-card {
  border: 1px solid var(--mcd-border);
  border-radius: var(--mcd-radius);
  padding: 18px;
  background: #fff1f2;
}

.mcd-guide-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #881337;
}

.mcd-guide-card p {
  margin: 0;
  font-size: 0.85rem;
  color: #334155;
}

/* FAQ */
.mcd-faq-section {
  padding: 32px 0;
  background: #ffffff;
  border-top: 1px solid var(--mcd-border);
}

.mcd-faq-item {
  margin-bottom: 18px;
}

.mcd-faq-q {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: #0f172a;
}

.mcd-faq-a {
  font-size: 0.85rem;
  color: #475569;
  margin: 0;
}

.mcd-footer p {
  margin: 0;
}

.mcd-consent-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.mcd-hero-portrait-col {
  flex-shrink: 0;
}

.mcd-hero-portrait-wrap {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: #0f172a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mcd-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mcd-hero-fallback-badge {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mcd-hero-fallback-badge svg {
  width: 100%;
  height: 100%;
}
/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --mcd-primary: #da8194;
  --mcd-primary-hover: #da8196;
  --mcd-surface: var(--tf-surface);
  --mcd-bg: var(--tf-surface);
  --mcd-text: var(--tf-ink);
  --mcd-text-muted: var(--tf-ink-faint);
  --mcd-border: var(--tf-surface);
}
