/* Retained Follower Cost Calculator — calculatorscore.com */
/* Accent: teal #2f9e8f (audience track) / rose #e0507a (price climbing) */

#rfc-root {
  --rfc-accent: #2f9e8f;
  --rfc-accent-light: #5cc4b5;
  --rfc-price: #e0507a;
  --rfc-bg: #101418;
  --rfc-card: #171c21;
  --rfc-border: #2a3138;
  --rfc-text: #e8ebee;
  --rfc-muted: #9aa4ac;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  color: var(--rfc-text);
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background: var(--rfc-bg);
  border-radius: 16px;
}
#rfc-root * { box-sizing: border-box; }
#rfc-root .rfc-hidden { display: none !important; }

#rfc-root .rfc-home-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--rfc-muted) !important;
  text-decoration: none;
  font-size: 14px;
}
#rfc-root .rfc-home-link:hover { color: var(--rfc-accent-light) !important; }

#rfc-root h1 { font-size: 27px; line-height: 1.25; margin: 0 0 8px; font-weight: 700; }
#rfc-root .rfc-subhead { color: var(--rfc-muted); font-size: 15px; margin: 0 0 28px; line-height: 1.5; }

#rfc-root .rfc-section {
  background: var(--rfc-card);
  border: 1px solid var(--rfc-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
#rfc-root .rfc-section-label {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--rfc-muted); margin: 0 0 12px;
}

#rfc-root .rfc-field-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
#rfc-root .rfc-field-row:last-child { margin-bottom: 0; }
#rfc-root .rfc-field-label { flex: 1; font-size: 14px; color: var(--rfc-text); }
#rfc-root .rfc-field-prefix { font-size: 15px; color: var(--rfc-muted); }
#rfc-root .rfc-field-row input[type="number"] {
  width: 130px;
  background: var(--rfc-bg);
  border: 1px solid var(--rfc-border);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 15px;
  color: var(--rfc-text);
  font-family: inherit;
  text-align: right;
}
#rfc-root .rfc-field-row input[type="number"]:focus-visible {
  outline: 2px solid var(--rfc-accent-light);
  outline-offset: 1px;
}

#rfc-root .rfc-add-cost-btn {
  display: inline-block;
  font-size: 13.5px;
  color: var(--rfc-accent-light);
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}
#rfc-root .rfc-add-cost-btn:hover { text-decoration: underline; }

#rfc-root .rfc-total-line {
  display: flex; justify-content: space-between;
  font-size: 15px; font-weight: 700;
  border-top: 1px solid var(--rfc-border);
  margin-top: 14px; padding-top: 14px;
}

#rfc-root .rfc-big-input {
  width: 100%;
  background: var(--rfc-bg);
  border: 1px solid var(--rfc-border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 20px;
  color: var(--rfc-text);
  font-family: inherit;
}
#rfc-root .rfc-big-input:focus-visible { outline: 2px solid var(--rfc-accent-light); outline-offset: 1px; }

/* Pills */
#rfc-root .rfc-pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
#rfc-root .rfc-pill {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--rfc-border);
  background: transparent; color: var(--rfc-text); font-size: 14px;
  cursor: pointer; user-select: none; transition: background 0.15s ease, border-color 0.15s ease;
}
#rfc-root .rfc-pill-sm { padding: 7px 12px; font-size: 12.5px; }
#rfc-root .rfc-pill:hover { border-color: var(--rfc-accent-light); }
#rfc-root .rfc-pill:focus-visible { outline: 2px solid var(--rfc-accent-light); outline-offset: 2px; }
#rfc-root .rfc-pill-active { background: var(--rfc-accent); border-color: var(--rfc-accent); color: #fff; }

/* Slider */
#rfc-root .rfc-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
  border-radius: 999px; background: var(--rfc-border); outline: none; margin: 10px 0 4px;
}
#rfc-root .rfc-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--rfc-accent-light); cursor: pointer; border: 2px solid var(--rfc-bg);
}
#rfc-root .rfc-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--rfc-accent-light); cursor: pointer; border: 2px solid var(--rfc-bg);
}
#rfc-root .rfc-slider-label-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--rfc-muted); }
#rfc-root .rfc-slider-value { color: var(--rfc-accent-light); font-weight: 600; }

/* Calculate button */
#rfc-root .rfc-calculate-btn {
  display: block; width: 100%; text-align: center; padding: 15px; border-radius: 10px;
  background: var(--rfc-price); color: #1a0a10; font-weight: 700; font-size: 16px;
  cursor: pointer; user-select: none; border: none; margin-top: 4px;
}
#rfc-root .rfc-calculate-btn:hover { filter: brightness(1.08); }
#rfc-root .rfc-calculate-btn:focus-visible { outline: 2px solid var(--rfc-text); outline-offset: 2px; }

/* Results */
#rfc-results { margin-top: 8px; }
#rfc-results[data-stale="true"] { opacity: 0.4; filter: saturate(0.5); pointer-events: none; }

#rfc-root .rfc-price-block { display: flex; flex-direction: column; align-items: center; }
#rfc-root .rfc-price-caption { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rfc-muted); margin-top: 2px; }
#rfc-root .rfc-headline-delta-pct { font-size: 12.5px; color: var(--rfc-muted); margin-top: 2px; }
#rfc-root .rfc-no-retained-note { font-size: 13px; color: var(--rfc-price); margin-top: 6px; }
#rfc-root .rfc-organic-anchor { font-size: 12px; color: var(--rfc-muted); margin-top: 10px; font-style: italic; }
#rfc-root .rfc-quality-model-tag { font-size: 10.5px; text-transform: none; letter-spacing: 0; font-style: italic; color: var(--rfc-muted); }
#rfc-root .rfc-solver-unreachable { color: var(--rfc-muted); border-color: var(--rfc-border); }

#rfc-root .rfc-headline { text-align: center; padding: 6px 0 18px; }
#rfc-root .rfc-headline-label { font-size: 13px; color: var(--rfc-muted); text-transform: uppercase; letter-spacing: 0.05em; }
#rfc-root .rfc-price-ladder { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin: 8px 0 4px; flex-wrap: wrap; }
#rfc-root #rfc-headline-gross-cpf { font-size: 20px; color: var(--rfc-muted); text-decoration: line-through; }
#rfc-root .rfc-price-arrow { color: var(--rfc-muted); font-size: 18px; }
#rfc-root #rfc-headline-retained-cpf { font-size: 42px; font-weight: 700; color: var(--rfc-price); }
#rfc-root .rfc-headline-delta { font-size: 14px; color: var(--rfc-text); margin-top: 2px; }
#rfc-root .rfc-churn-used-note { font-size: 12.5px; color: var(--rfc-muted); margin-top: 6px; }

/* Follower Reality Strip */
#rfc-root .rfc-strip-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--rfc-text); margin-bottom: 6px; }
#rfc-root .rfc-strip-track {
  display: flex; width: 100%; height: 28px; border-radius: 6px; overflow: hidden;
  background: var(--rfc-bg); border: 1px solid var(--rfc-border);
}
#rfc-root .rfc-strip-segment { height: 100%; transition: width 0.2s ease; }
#rfc-root #rfc-strip-retained-segment { background: var(--rfc-accent); }
#rfc-root #rfc-strip-disappeared-segment { background: var(--rfc-border); opacity: 0.6; }
#rfc-root .rfc-strip-legend { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--rfc-muted); margin-top: 6px; }
#rfc-root .rfc-strip-legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }

/* Quality-adjusted secondary card */
#rfc-root .rfc-quality-card {
  background: var(--rfc-bg); border: 1px solid var(--rfc-border); border-radius: 8px;
  padding: 14px; margin-top: 14px;
}
#rfc-root .rfc-quality-card-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rfc-muted); margin-bottom: 6px; }
#rfc-root .rfc-quality-card-value { font-size: 24px; font-weight: 700; color: var(--rfc-accent-light); }
#rfc-root .rfc-quality-card-sub { font-size: 12.5px; color: var(--rfc-muted); margin-top: 4px; }

/* Toggle */
#rfc-root .rfc-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--rfc-border); cursor: pointer; user-select: none; font-size: 13.5px; color: var(--rfc-muted);
}
#rfc-root .rfc-toggle-active { border-color: var(--rfc-accent-light); color: var(--rfc-text); }
#rfc-root .rfc-toggle:focus-visible { outline: 2px solid var(--rfc-accent-light); outline-offset: 2px; }

/* Solver */
#rfc-root .rfc-solver-output {
  background: var(--rfc-bg); border: 1px solid var(--rfc-border); border-radius: 8px;
  padding: 14px; font-size: 14.5px; line-height: 1.5; margin-top: 12px; color: var(--rfc-text);
}

/* Reset */
#rfc-root .rfc-reset-btn {
  display: inline-block; margin-top: 6px; padding: 10px 18px; border-radius: 8px;
  border: 1px solid var(--rfc-border); background: transparent; color: var(--rfc-muted);
  font-size: 14px; cursor: pointer; user-select: none;
}
#rfc-root .rfc-reset-btn:hover { color: var(--rfc-text); border-color: var(--rfc-accent-light); }
#rfc-root .rfc-reset-btn:focus-visible { outline: 2px solid var(--rfc-accent-light); outline-offset: 2px; }

/* Article */
#rfc-root .rfc-article { margin-top: 32px; }
#rfc-root .rfc-article h2 { font-size: 19px; margin: 28px 0 10px; color: var(--rfc-text); }
#rfc-root .rfc-article p { font-size: 15px; line-height: 1.7; color: #cdd3d8; margin: 0 0 14px; }
#rfc-root .rfc-article .rfc-note {
  font-size: 13px; color: var(--rfc-muted); border-top: 1px solid var(--rfc-border);
  padding-top: 16px; margin-top: 24px; line-height: 1.6;
}

@media (max-width: 480px) {
  #rfc-root { padding: 20px 14px 36px; }
  #rfc-root h1 { font-size: 22px; }
  #rfc-root #rfc-headline-retained-cpf { font-size: 32px; }
  #rfc-root .rfc-field-row input[type="number"] { width: 110px; }
}
@media (max-width: 360px) {
  #rfc-root #rfc-headline-retained-cpf { font-size: 28px; }
  #rfc-root #rfc-headline-gross-cpf { font-size: 17px; }
}
