/* Daily Fiber & Micronutrient Benchmark Guide — content styles. Prefix: --fm- */

:root {
  --fm-surface: #ffffff;
  --fm-panel:   #faf8f7;
  --fm-line:    #ebe5e4;
  --fm-text:    #1f191a;
  --fm-muted:   #6e6263;
  --fm-brand:   #8c2f39;
  --fm-ok:      #1b7340;
  --fm-warn:    #b45309;
}

.fm-main {
  padding-block: 1.5rem 3rem;
}

.fm-wrap {
  max-width: 56rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.fm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.25fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 48rem) {
  .fm-grid {
    grid-template-columns: 1fr;
  }
}

.fm-panel {
  background: var(--fm-panel);
  border: 1px solid var(--fm-line);
  border-radius: 2px;
  padding: 1.25rem;
}

.fm-section-title {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fm-muted);
  margin: 0 0 1rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--fm-line);
}

.fm-section-title:not(:first-child) {
  margin-top: 1.5rem;
}

.fm-subhint {
  font-size: 0.8rem;
  color: var(--fm-muted);
  margin: -0.5rem 0 0.85rem 0;
  line-height: 1.4;
}

.fm-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

@media (max-width: 32rem) {
  .fm-row-2 {
    grid-template-columns: 1fr;
  }
}

.fm-field {
  margin-bottom: 0.85rem;
}

.fm-field label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--fm-text);
  margin-bottom: 0.35rem;
}

.fm-field input[type="number"],
.fm-field select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font-family: inherit;
  font-size: 0.925rem;
  color: var(--fm-text);
  background: var(--fm-surface);
  border: 1px solid var(--fm-line);
  border-radius: 2px;
  box-sizing: border-box;
}

.fm-field input[type="number"]:focus,
.fm-field select:focus {
  outline: none;
  border-color: var(--tf-accent);
}

.fm-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--fm-muted);
  margin-top: 0.25rem;
  line-height: 1.35;
}

.fm-food-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.fm-food-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: var(--fm-surface);
  border: 1px solid var(--fm-line);
  border-radius: 2px;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
}

.fm-food-item:hover {
  background: var(--tf-accent-wash);
}

.fm-food-check {
  margin-top: 0.2rem;
  accent-color: var(--tf-accent);
  cursor: pointer;
}

.fm-food-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fm-text);
}

.fm-food-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--fm-muted);
  margin-top: 0.15rem;
}

.fm-action-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.fm-btn-primary {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--tf-accent);
  color: #ffffff;
  border: none;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.fm-btn-primary:hover {
  background: var(--tf-accent-hover);
}

.fm-btn-ghost {
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--fm-muted);
  border: 1px solid var(--fm-line);
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.fm-btn-ghost:hover {
  color: var(--fm-text);
  background: var(--fm-panel);
}

/* Results section */
.fm-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fm-hero-card {
  background: var(--fm-surface);
  border: 1px solid var(--fm-line);
  border-radius: 2px;
  padding: 1.25rem;
  border-top: 3px solid var(--tf-accent);
}

.fm-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.fm-hero-label {
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fm-muted);
}

.fm-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  background: color-mix(in srgb, var(--tf-accent) 15%, transparent);
  color: var(--tf-accent);
  border: 1px solid color-mix(in srgb, var(--tf-accent) 30%, transparent);
}

.fm-hero-val {
  font-size: 2.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--fm-text);
  margin-bottom: 0.35rem;
}

.fm-hero-sub {
  font-size: 0.8rem;
  color: var(--fm-muted);
  margin-bottom: 1rem;
}

.fm-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.fm-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--fm-muted);
}

.fm-progress-header strong {
  color: var(--fm-text);
}

.fm-progress-track {
  width: 100%;
  height: 8px;
  background: var(--fm-panel);
  border: 1px solid var(--fm-line);
  border-radius: 2px;
  overflow: hidden;
}

.fm-progress-bar {
  height: 100%;
  background: var(--tf-accent);
  transition: width 0.2s ease;
}

.fm-nutrients-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 32rem) {
  .fm-nutrients-grid {
    grid-template-columns: 1fr;
  }
}

.fm-nut-card {
  background: var(--fm-surface);
  border: 1px solid var(--fm-line);
  border-radius: 2px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
}

.fm-nut-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.2rem;
}

.fm-nut-name {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--fm-text);
}

.fm-nut-target {
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--tf-accent);
}

.fm-nut-note {
  font-size: 0.7rem;
  color: var(--fm-muted);
  margin-bottom: 0.5rem;
}

.fm-nut-progress {
  width: 100%;
  height: 6px;
  background: var(--fm-panel);
  border: 1px solid var(--fm-line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.fm-nut-pbar {
  height: 100%;
  background: var(--tf-accent);
  transition: width 0.2s ease;
}

.fm-nut-status {
  font-size: 0.725rem;
  color: var(--fm-muted);
  font-variant-numeric: tabular-nums;
}

.fm-summary-card {
  background: var(--fm-panel);
  border: 1px solid var(--fm-line);
  border-radius: 2px;
  padding: 1rem;
}

.fm-card-title {
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fm-muted);
  margin: 0 0 0.65rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--fm-line);
}

.fm-spec-table {
  display: flex;
  flex-direction: column;
}

.fm-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.775rem;
  padding: 0.35rem 0;
  color: var(--fm-muted);
}

.fm-spec-row strong {
  font-weight: 600;
  color: var(--fm-text);
  font-variant-numeric: tabular-nums;
}

.fm-ad {
  overflow: hidden;
  min-height: 280px;
  margin: 2rem auto;
  text-align: center;
}

/* 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"] {
  --fm-surface: var(--tf-surface);
  --fm-panel: var(--tf-surface);
  --fm-line: var(--tf-surface);
  --fm-text: var(--tf-ink);
  --fm-muted: var(--tf-ink-soft);
  --fm-brand: #d48089;
  --fm-ok: #59cf8b;
  --fm-warn: #d9a57d;
}
