/* ================================================================
   Reforma Tributária — simulador da transição para CBS e IBS.
   Formulário à esquerda, resultado vivo à direita, com a mesma
   linguagem visual de Cálculos e Acompanhamentos.
   ================================================================ */

.rf-wrap,
.rf-toast {
  --rf-ok: #1f8a5b;
  --rf-warn: #a8701a;
  --rf-bad: #b4442f;
  --rf-info: #1d7486;
  --rf-gold: var(--accent-strong);
  --rf-serif: var(--font-editorial);
  --rf-r: 12px;
  --rf-ease: cubic-bezier(.2, .8, .3, 1);
}
[data-theme="dark"] .rf-wrap,
[data-theme="dark"] .rf-toast {
  --rf-ok: #5fd49a;
  --rf-warn: #e3b460;
  --rf-bad: #f08a74;
  --rf-info: #6cc4d8;
}
.rf-wrap { min-width: 0; }

.rf-page { width: 100%; max-width: 1440px; margin: 0 auto; padding: 28px 36px 64px; }

.rf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.rf-eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--gold-line); }

/* Cabeçalho */
.rf-head { padding-bottom: 24px; animation: rfUp .4s ease-out both; }
.rf-title { margin: 12px 0 8px; font-family: var(--rf-serif); font-size: 2.4rem; font-weight: 300; line-height: 1.08; letter-spacing: -.015em; color: var(--ink); }
.rf-lead { margin: 0; max-width: 680px; color: var(--muted); font-size: .92rem; line-height: 1.6; }

/* Layout */
.rf-calc { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 22px; align-items: start; }

.rf-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--rf-r);
  background: var(--surface);
}
.rf-form-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rf-form-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--font-display); font-size: .8rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.rf-form-head h3 i { color: var(--rf-gold); }

.rf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted);
  font-size: .78rem;
  cursor: pointer;
}
.rf-link:hover { color: var(--ink); background: var(--bg-sunken); }

.rf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.rf-form [hidden] { display: none !important; }

/* Etapas do formulário: uma aberta por vez, as fechadas mostram o resumo do que foi preenchido */
.rf-step { border: 1px solid var(--hairline); border-radius: 10px; background: var(--bg-sunken); transition: border-color .15s; }
.rf-step.is-open { border-color: var(--border); background: transparent; }
.rf-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.rf-step-num { flex-shrink: 0; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--gold-line); border-radius: 50%; color: var(--rf-gold); font-family: var(--font-mono); font-size: .72rem; font-weight: 600; }
.rf-step.is-open .rf-step-num { background: var(--rf-gold); color: var(--on-accent); border-color: var(--rf-gold); }
.rf-step-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-family: var(--font-display); font-size: .78rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.rf-step-title small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-body); font-size: .76rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.rf-step-title small:empty, .rf-step.is-open .rf-step-title small { display: none; }
.rf-step-head > i { color: var(--muted); font-size: .75rem; transition: transform .2s; }
.rf-step.is-open .rf-step-head > i { transform: rotate(180deg); }
.rf-step-head:hover > i, .rf-step-head:hover .rf-step-title small { color: var(--ink); }
.rf-step-head:focus-visible { outline: 2px solid var(--gold-line); outline-offset: -2px; border-radius: 10px; }
.rf-step-body { display: none; flex-direction: column; gap: 14px; padding: 4px 12px 14px; }
.rf-step.is-open .rf-step-body { display: flex; }
.rf-step-next {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}
.rf-step-next:hover { background: color-mix(in srgb, var(--rf-gold) 22%, transparent); }
.rf-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; color: var(--ink); font-size: .8rem; line-height: 1.45; cursor: pointer; }
.rf-check input { width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; accent-color: var(--rf-gold); }
.rf-mix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rf-mix .rf-label { font-size: .76rem; font-weight: 500; }
.rf-mix-rest { color: var(--ink); }
.rf-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--ink); }
.rf-label em { font-style: normal; font-weight: 400; color: var(--muted-soft); font-size: .74rem; }
.rf-hint { color: var(--muted); font-size: .74rem; line-height: 1.45; }
.rf-hint:empty { display: none; }
.rf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.rf-input {
  display: flex;
  align-items: center;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-sunken);
  transition: border-color .15s, box-shadow .15s;
}
.rf-input:focus-within { border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.rf-input em { padding: 0 10px; color: var(--muted); font-style: normal; font-size: .8rem; font-weight: 600; }
.rf-input.is-money em { padding-right: 0; }
.rf-input input,
.rf-input select {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .9rem;
}
.rf-input.is-money input,
.rf-input.is-pct input { font-family: var(--font-mono); font-size: .88rem; }
.rf-input.is-money input { padding-left: 8px; }
.rf-input.is-pct input { text-align: right; padding-right: 0; }
.rf-input input::placeholder { color: var(--muted-soft); }
.rf-input.is-select { position: relative; }
.rf-input.is-select select { appearance: none; padding-right: 32px; cursor: pointer; text-overflow: ellipsis; }
.rf-input.is-select::after { content: "\F282"; position: absolute; right: 12px; font-family: "bootstrap-icons"; font-size: .7rem; color: var(--muted); pointer-events: none; }
.rf-input select option { background: var(--bg-elev); color: var(--ink); }

.rf-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-sunken); }
.rf-seg label { margin: 0; cursor: pointer; }
.rf-seg input { position: absolute; opacity: 0; pointer-events: none; }
.rf-seg span { display: block; padding: 7px 8px; border-radius: 6px; text-align: center; font-size: .82rem; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.rf-seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--gold-line); }
.rf-seg input:focus-visible + span { outline: 2px solid var(--gold-line); }

.rf-range { width: 100%; accent-color: var(--rf-gold); }
.rf-range-val { font-family: var(--font-mono); font-size: .76rem; font-weight: 500; color: var(--rf-gold); }

.rf-adv { border-top: 1px solid var(--hairline); padding-top: 12px; }
.rf-adv summary { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; font-weight: 600; cursor: pointer; list-style: none; }
.rf-adv summary::-webkit-details-marker { display: none; }
.rf-adv summary::after { content: "\F282"; margin-left: auto; font-family: "bootstrap-icons"; font-size: .7rem; transition: transform .2s; }
.rf-adv[open] summary::after { transform: rotate(180deg); }
.rf-adv summary:hover { color: var(--ink); }
.rf-adv[open] { display: flex; flex-direction: column; gap: 12px; }

/* Entenda em 30 segundos */
.rf-intro { margin-bottom: 22px; border: 1px solid var(--hairline); border-radius: var(--rf-r); background: var(--surface); animation: rfUp .45s ease-out both; }
.rf-intro > summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; color: var(--ink); font-size: .88rem; font-weight: 600; cursor: pointer; list-style: none; }
.rf-intro > summary::-webkit-details-marker { display: none; }
.rf-intro > summary i { color: var(--rf-gold); }
.rf-intro > summary::after { content: "\F282"; margin-left: auto; font-family: "bootstrap-icons"; font-size: .7rem; color: var(--muted); transition: transform .2s; }
.rf-intro[open] > summary::after { transform: rotate(180deg); }
.rf-intro-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; padding: 0 18px 18px; }

.rf-road { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.rf-road::before { content: ""; position: absolute; left: 12px; right: 12px; top: 13px; height: 2px; background: linear-gradient(90deg, var(--muted-soft), var(--rf-gold)); opacity: .5; }
.rf-road li { position: relative; display: flex; flex-direction: column; gap: 4px; padding-top: 34px; }
.rf-road li::before { content: ""; position: absolute; top: 7px; left: 4px; width: 14px; height: 14px; border: 2px solid var(--rf-gold); border-radius: 50%; background: var(--surface); }
.rf-road li:last-child::before { background: var(--rf-gold); }
.rf-road-ano { font-family: var(--font-mono); font-size: .72rem; font-weight: 600; color: var(--rf-gold); }
.rf-road b { font-size: .86rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.rf-road small { color: var(--muted); font-size: .76rem; line-height: 1.45; }

.rf-key { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--gold-line); border-radius: 10px; background: var(--accent-soft); }
.rf-key p { margin: 0; color: var(--ink); font-size: .82rem; line-height: 1.55; }
.rf-key ul { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rf-key li { display: flex; gap: 8px; color: var(--ink); font-size: .8rem; line-height: 1.45; }
.rf-key li i { font-size: .95rem; line-height: 1.3; }
.rf-key li.is-ok i { color: var(--rf-ok); }
.rf-key li.is-up i { color: var(--rf-bad); }

/* Exemplos */
.rf-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px; border: 1px dashed var(--border); border-radius: 10px; }
.rf-quick span { width: 100%; color: var(--muted); font-size: .74rem; }
.rf-quick button,
.rf-examples button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  color: var(--ink);
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.rf-quick button:hover,
.rf-examples button:hover { border-color: var(--gold-line); background: var(--accent-soft); }
.rf-examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.rf-examples button i { color: var(--rf-gold); }

/* Resultado */
.rf-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--rf-r);
  background:
    radial-gradient(700px 240px at 90% -60px, rgba(207, 203, 150, .08), rgba(207, 203, 150, 0) 70%),
    var(--surface);
}
.rf-result.is-sticky { position: sticky; top: 16px; }

.rf-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 20px; text-align: center; }
.rf-empty > i { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px; border: 1px solid var(--gold-line); border-radius: 14px; background: var(--accent-soft); color: var(--rf-gold); font-size: 1.4rem; }
.rf-empty h3 { margin: 0; font-family: var(--rf-serif); font-size: 1.4rem; font-weight: 400; color: var(--ink); }
.rf-empty p { margin: 0; max-width: 380px; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.rf-empty .rf-empty-ex { margin-top: 10px; color: var(--ink); font-weight: 600; }

/* Destaque do resultado */
.rf-hero {
  --tom: var(--rf-gold);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--tom) 40%, transparent);
  border-radius: var(--rf-r);
  background: color-mix(in srgb, var(--tom) 9%, transparent);
  animation: rfUp .3s ease-out both;
}
.rf-hero.is-up { --tom: var(--rf-bad); }
.rf-hero.is-down { --tom: var(--rf-ok); }
.rf-hero-num { display: flex; align-items: baseline; gap: 10px; font-family: var(--rf-serif); font-size: 3rem; font-weight: 300; line-height: 1; letter-spacing: -.02em; color: var(--tom); font-variant-numeric: tabular-nums; }
.rf-hero-num.is-text { font-size: 2.3rem; font-style: italic; }
.rf-hero-num small { font-family: var(--font-body); font-size: .85rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.rf-hero-txt { margin: 0; color: var(--ink); font-size: .92rem; line-height: 1.55; }

/* Hoje x 2033 */
.rf-compare { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 10px; }
.rf-cmp { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--hairline); border-radius: var(--rf-r); background: var(--bg-sunken); }
.rf-cmp.is-new { border-color: var(--gold-line); background: color-mix(in srgb, var(--accent-soft) 70%, var(--bg-sunken)); }
.rf-cmp-tag { align-self: flex-start; padding: 2px 8px; border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rf-cmp.is-new .rf-cmp-tag { border-color: transparent; background: var(--rf-gold); color: var(--on-accent); }
.rf-cmp > b { margin-top: 4px; font-family: var(--rf-serif); font-size: 1.7rem; font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
.rf-cmp > small { color: var(--muted); font-size: .74rem; }
.rf-cmp ul { display: flex; flex-direction: column; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--hairline); list-style: none; }
.rf-cmp li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: .78rem; color: var(--ink); }
.rf-cmp li em { font-family: var(--font-mono); font-size: .76rem; font-style: normal; }
.rf-cmp-arrow { display: grid; place-items: center; color: var(--rf-gold); font-size: 1.3rem; }

/* Opções do Simples */
.rf-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rf-opt { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--hairline); border-radius: var(--rf-r); background: var(--bg-sunken); }
.rf-opt.is-rec { border-color: var(--gold-line); background: color-mix(in srgb, var(--accent-soft) 70%, var(--bg-sunken)); box-shadow: 0 0 0 1px var(--gold-line); }
.rf-opt h5 { margin: 0; padding-right: 80px; font-size: .9rem; font-weight: 700; color: var(--ink); }
.rf-opt > p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.rf-opt-badge { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--rf-gold); color: var(--on-accent); font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rf-opt-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-top: 8px; border-top: 1px solid var(--hairline); font-size: .8rem; color: var(--muted); }
.rf-opt-row b { font-family: var(--rf-serif); font-size: 1.3rem; font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
.rf-opt-row b small { margin-left: 2px; font-family: var(--font-body); font-size: .7rem; color: var(--muted); }
.rf-opt-extra { margin: 0 !important; padding-top: 6px; border-top: 1px dashed var(--hairline); color: var(--muted) !important; font-size: .74rem !important; }

/* Blocos */
.rf-block { display: flex; flex-direction: column; gap: 10px; }
.rf-block-title { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--font-display); font-size: .74rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.rf-block-title i { color: var(--rf-gold); }

/* Gráfico */
.rf-chart { margin: 0; padding: 14px 12px 10px; border: 1px solid var(--hairline); border-radius: var(--rf-r); background: var(--bg-sunken); }
.rf-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.rf-ch-old { fill: color-mix(in srgb, var(--ink) 28%, transparent); }
.rf-ch-new { fill: var(--rf-gold); }
.rf-ch-ref { stroke: var(--rf-bad); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .8; }
.rf-ch-val { fill: var(--ink); font-family: var(--font-body); font-size: 12px; font-weight: 600; paint-order: stroke; stroke: var(--bg-sunken); stroke-width: 5px; stroke-linejoin: round; }
.rf-ch-ano { fill: var(--muted); font-family: var(--font-body); font-size: 12px; font-weight: 600; }
.rf-ch-ano.is-hi { fill: var(--rf-gold); font-weight: 700; }
.rf-chart figcaption { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 8px; color: var(--muted); font-size: .74rem; }
.rf-chart figcaption span { display: inline-flex; align-items: center; gap: 6px; }
.rf-ch-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.rf-ch-dot.rf-ch-old { background: color-mix(in srgb, var(--ink) 28%, transparent); }
.rf-ch-dot.rf-ch-new { background: var(--rf-gold); }
.rf-ch-dot.rf-ch-ref { height: 0; border-top: 2px dashed var(--rf-bad); border-radius: 0; }

/* O que dizer ao cliente */
.rf-insights { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rf-insights li {
  --tom: var(--rf-info);
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--tom) 30%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--tom) 7%, transparent);
  color: var(--ink);
  font-size: .84rem;
  line-height: 1.5;
}
.rf-insights li > i { color: var(--tom); font-size: 1rem; line-height: 1.35; }
.rf-insights li b { font-weight: 700; }
.rf-insights .is-ok { --tom: var(--rf-ok); }
.rf-insights .is-warn { --tom: var(--rf-warn); }
.rf-insights .is-bad { --tom: var(--rf-bad); }

/* Como chegamos e tabela */
.rf-how,
.rf-table-wrap { gap: 0; border: 1px solid var(--hairline); border-radius: var(--rf-r); background: var(--bg-sunken); }
.rf-how > summary,
.rf-table-wrap > summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; color: var(--ink); font-size: .84rem; font-weight: 600; cursor: pointer; list-style: none; }
.rf-how > summary::-webkit-details-marker,
.rf-table-wrap > summary::-webkit-details-marker { display: none; }
.rf-how > summary i,
.rf-table-wrap > summary i { color: var(--rf-gold); }
.rf-how > summary span { color: var(--muted); font-size: .74rem; font-weight: 400; }
.rf-how > summary::after,
.rf-table-wrap > summary::after { content: "\F282"; margin-left: auto; font-family: "bootstrap-icons"; font-size: .7rem; color: var(--muted); transition: transform .2s; }
.rf-how[open] > summary::after,
.rf-table-wrap[open] > summary::after { transform: rotate(180deg); }
.rf-how-body { display: flex; flex-direction: column; gap: 14px; padding: 4px 14px 14px; }
.rf-steps-group h5 { margin: 0 0 6px; font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--rf-gold); }
.rf-steps { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: 10px; background: var(--surface); }
.rf-steps li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--hairline); }
.rf-steps li:first-child { border-top: 0; }
.rf-step-lbl { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--ink); font-size: .8rem; font-weight: 600; }
.rf-step-lbl small { color: var(--muted); font-family: var(--font-mono); font-size: .7rem; font-weight: 400; line-height: 1.45; }
.rf-steps li > b { font-family: var(--font-mono); font-size: .82rem; font-weight: 500; color: var(--ink); white-space: nowrap; }
.rf-steps li.is-minus > b { color: var(--rf-ok); }
.rf-steps li.is-total { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.rf-steps li.is-total > b { font-weight: 700; color: var(--rf-gold); }
.rf-steps li.is-total.is-up > b { color: var(--rf-bad); }
.rf-steps li.is-total.is-down > b { color: var(--rf-ok); }
.rf-how-note { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }

.rf-table-scroll { overflow-x: auto; padding: 0 14px 14px; }
.rf-table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.rf-table th,
.rf-table td { padding: 8px 10px; border-top: 1px solid var(--hairline); text-align: right; white-space: nowrap; color: var(--ink); }
.rf-table thead th { border-top: 0; color: var(--muted); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.rf-table th:first-child,
.rf-table td:last-child { text-align: left; }
.rf-table td { font-family: var(--font-mono); }
.rf-table td:last-child { white-space: normal; min-width: 220px; font-family: var(--font-body); }
.rf-table td:last-child small { color: var(--muted); font-size: .72rem; }
.rf-table .is-up { color: var(--rf-bad); }
.rf-table .is-down { color: var(--rf-ok); }

.rf-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.rf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.rf-btn:hover { border-color: var(--border-strong); background: var(--bg-sunken); }
.rf-btn.is-primary { border-color: transparent; background: var(--brand-charcoal); color: var(--brand-paper); }
.rf-btn.is-primary:hover { background: color-mix(in srgb, var(--brand-charcoal) 85%, var(--brand-gold)); }
[data-theme="dark"] .rf-btn.is-primary { background: var(--brand-cream); color: var(--brand-ink); }
[data-theme="dark"] .rf-btn.is-primary:hover { background: var(--brand-paper); }

.rf-disclaimer { display: flex; gap: 8px; max-width: 860px; margin: 22px 0 0; color: var(--muted-soft); font-size: .76rem; line-height: 1.55; }
.rf-disclaimer i { color: var(--muted); }

.rf-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  padding: 9px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  font-size: 12.5px;
  font-weight: 600;
  transform: translateX(-50%);
  box-shadow: var(--shadow-lg);
  animation: rfToast .25s ease-out both;
}

@keyframes rfUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rfToast { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 1280px) {
  .rf-intro-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .rf-calc { grid-template-columns: minmax(0, 1fr); }
  .rf-result.is-sticky { position: static; }
}
@media (max-width: 640px) {
  .rf-page { padding: 20px 16px 48px; }
  .rf-title { font-size: 1.8rem; }
  .rf-result { padding: 16px; }
  .rf-road { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .rf-road::before { display: none; }
  .rf-compare { grid-template-columns: minmax(0, 1fr); }
  .rf-cmp-arrow { transform: rotate(90deg); }
  .rf-opts { grid-template-columns: minmax(0, 1fr); }
  .rf-hero-num { font-size: 2.3rem; }
  .rf-steps li { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .rf-head, .rf-intro, .rf-hero, .rf-toast { animation: none !important; }
}

@media print {
  .sidebar, .topbar, .mnav, .rf-form, .rf-intro, .rf-actions, .rf-toast, #taxTourHelpBtn, .mon-bell, .rf-lead { display: none !important; }
  .page-wrapper { margin: 0 !important; padding: 0 !important; }
  .rf-page { padding: 0; max-width: none; }
  .rf-calc { display: block; }
  .rf-result { border: 0; padding: 0; background: none; }
  .rf-chart, .rf-steps li, .rf-insights li, .rf-opt, .rf-cmp { break-inside: avoid; }
}
