:root {
  --rnmc-primary: #0284c7;
  --rnmc-primary-hover: #0369a1;
  --rnmc-bg-card: #ffffff;
  --rnmc-border: #e2e8f0;
  --rnmc-text: #1e293b;
  --rnmc-muted: #64748b;
  --rnmc-success: #16a34a;
  --rnmc-hero-bg: #f8fafc;
}

.rnmc-main {
  padding: 1.5rem 1rem 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--rnmc-text);
  font-family: inherit;
}

.rnmc-wrap {
  width: 100%;
}

.rnmc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .rnmc-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.rnmc-card {
  background: var(--rnmc-bg-card);
  border: 1px solid var(--rnmc-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.rnmc-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rnmc-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--rnmc-text);
}

.rnmc-sub-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--rnmc-text);
}

.rnmc-head-btns {
  display: flex;
  gap: 0.5rem;
}

/* Tabs */
.rnmc-tabs {
  display: flex;
  border-bottom: 1px solid var(--rnmc-border);
  margin-bottom: 1.25rem;
  gap: 0.5rem;
}

.rnmc-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rnmc-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.rnmc-tab-active {
  color: var(--rnmc-primary);
  border-bottom-color: var(--rnmc-primary);
}

.rnmc-view-active {
  display: block;
}

.rnmc-view-hidden {
  display: none;
}

.rnmc-form-group {
  margin-bottom: 1.25rem;
}

.rnmc-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--rnmc-text);
}

.rnmc-input,
.rnmc-select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--rnmc-border);
  border-radius: 6px;
  background: transparent;
  color: var(--rnmc-text);
  font-family: inherit;
  font-size: 0.95rem;
}

.rnmc-input:focus,
.rnmc-select:focus {
  outline: none;
  border-color: var(--rnmc-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.rnmc-hint {
  font-size: 0.8rem;
  color: var(--rnmc-muted);
  margin: 0.35rem 0 0 0;
}

.rnmc-presets-section {
  border-top: 1px solid var(--rnmc-border);
  padding-top: 1rem;
}

.rnmc-presets-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--rnmc-muted);
  margin-bottom: 0.5rem;
}

.rnmc-preset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rnmc-pill {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--rnmc-border);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rnmc-text);
  cursor: pointer;
  transition: background 0.15s;
}

.rnmc-pill:hover {
  background: var(--rnmc-border);
}

/* Hero Box */
.rnmc-hero-box {
  background: var(--rnmc-hero-bg);
  border: 1px solid var(--rnmc-border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
}

.rnmc-hero-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--rnmc-muted);
  margin-bottom: 0.25rem;
}

.rnmc-hero-val {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--rnmc-primary);
  line-height: 1.2;
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.rnmc-hero-sub {
  font-size: 0.85rem;
  color: var(--rnmc-text);
  font-weight: 500;
}

/* Breakdown */
.rnmc-breakdown-box {
  border: 1px solid var(--rnmc-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.rnmc-breakdown-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rnmc-token {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--rnmc-border);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  font-family: monospace;
}

/* Reference Grid */
.rnmc-ref-box {
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid var(--rnmc-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.rnmc-ref-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  font-size: 0.85rem;
}

@media (min-width: 576px) {
  .rnmc-ref-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

.rnmc-ref-item {
  background: var(--rnmc-bg-card);
  border: 1px solid var(--rnmc-border);
  border-radius: 4px;
  padding: 0.35rem 0.45rem;
  text-align: center;
}

/* Action Buttons */
.rnmc-btn-ghost {
  background: transparent;
  color: var(--rnmc-text);
  border: 1px solid var(--rnmc-border);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.rnmc-btn-ghost:hover {
  background: var(--rnmc-border);
}

.rnmc-btn-action {
  background: var(--rnmc-primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}

.rnmc-btn-action:hover {
  background: var(--rnmc-primary-hover);
}

.rnmc-action-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rnmc-status-msg {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rnmc-success);
}
/* 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"] {
  --rnmc-primary: #81bcda;
  --rnmc-primary-hover: #69aed4;
  --rnmc-bg-card: var(--tf-surface);
  --rnmc-border: var(--tf-surface);
  --rnmc-text: var(--tf-ink);
  --rnmc-muted: var(--tf-ink-faint);
  --rnmc-success: #7ad89d;
  --rnmc-hero-bg: var(--tf-surface);
}
