/* Rates-first demo. Screen layout lives here; print overrides follow preview.css. */

.rf-page { padding-bottom: 88px; }
.brand-name { margin: 0; font-weight: 700; color: var(--navy); }
.intro { padding: 8px 0 0; }
.intro h1 { margin: 8px 0 2px; font-size: 1.35rem; line-height: 1.2; }
.trust { margin: 0 0 8px; color: var(--muted); font-size: 0.92rem; }
.as-of { margin: 0 0 8px; color: var(--muted); font-size: 0.85rem; }
.rf-toolbar { margin-top: 0; gap: 8px; }
.rf-toolbar.rf-split {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
}
.rf-bar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.rf-bar-filters .chips { flex: 1 1 auto; }
.rf-bar-filters .sort-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}
.rf-bar-filters .sort-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.rf-bar-filters .sort-field select { width: auto; max-width: 100%; }
.rf-bar-actions { justify-content: space-between; flex-wrap: nowrap; }
.rf-bar-actions .toolbar-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: auto;
}
.rf-split #contact-btn { margin-left: auto; flex: 0 0 auto; }
.rf-print-proposal { width: 100%; margin-top: 8px; }
.rf-market {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}
.rf-market p { margin: 0; flex: 1 1 16rem; }
.rf-market .btn { min-height: 36px; }
.rf-state-light { margin-bottom: 8px; }
.rf-state-light legend { font-weight: 600; font-size: 0.92rem; color: var(--muted); margin-bottom: 6px; }
.rf-state-light .mode-btn { min-height: 32px; padding: 0 10px; font-size: 0.88rem; }
.rf-reach { margin: 0; }
.lead form .rf-reach { grid-column: 1 / -1; }
.rf-subhead { margin: 0; font-size: 0.95rem; }
.rf-counts { margin-top: 8px; }
.rf-page .results-grid { display: block; }
#customize-panel { display: none; margin: 8px 0 10px; }
body.is-customizing #customize-panel { display: block; }
.rf-customize .mix-panel { margin-top: 0; padding: 10px 12px; }
.rf-link {
  background: none;
  border: 0;
  padding: 0 2px;
  min-height: 32px;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.rf-mix-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 6px; }
.rf-pay h3, .rf-contrib h3 { margin: 8px 0 6px; font-size: 0.95rem; }
.rf-customize .hint { margin: 4px 0; font-size: 0.84rem; }
.rf-customize input[type="number"],
.rf-customize input[type="text"] { min-height: 36px; }
.rf-customize .mode-btn, .rf-customize .preset, .rf-customize .btn { min-height: 36px; }
.state-bubbles { border: 0; margin: 0 0 12px; padding: 0; }
.state-bubbles legend { font-weight: 700; margin-bottom: 8px; }
.skeleton .sk-line, .skeleton .sk-block {
  display: block;
  background: #e4ebf3;
  border-radius: 8px;
}
.skeleton .sk-line { height: 18px; width: 55%; margin-bottom: 10px; }
.skeleton .sk-block { height: 72px; }
.tier-table.is-rates-only { margin-top: 8px; }
.my-plans { margin: 8px 0; }
.lead { margin-top: 16px; scroll-margin-top: 12px; }
.lead-head h2 { margin: 0 0 4px; font-size: 1.25rem; }
#lead-next { margin: 0 0 12px; }
.lead form { display: grid; gap: 12px; }
.lead form .state-bubbles,
.lead form #lead-error,
.lead form .btn { grid-column: 1 / -1; }
.lead-plan-list { margin: 8px 0; padding-left: 18px; }
.disclaimer summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: -4px -6px;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}
.disclaimer summary::-webkit-details-marker { display: none; }
.disclaimer summary::marker { content: ''; }
.disclaimer summary::before {
  content: '▸';
  display: inline-block;
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.15s ease;
}
.disclaimer[open] > summary::before { transform: rotate(90deg); }
.disclaimer summary::after {
  content: 'Show';
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.disclaimer[open] > summary::after { content: 'Hide'; }
.disclaimer summary:hover { background: var(--wash); }
#customize-panel input[type="range"] {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 6px 0 0;
}

@media (max-width: 1023px) {
  #customize-panel .mix-grid { grid-template-columns: 1fr 1fr; }
  #customize-panel #contrib-body { display: block; }
  .rf-sticky-cta {
    position: fixed;
    z-index: 40;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    border-radius: 0;
    border-top: 1px solid var(--line);
    min-height: 40px;
    padding: 6px 12px;
    font-size: 0.92rem;
    box-shadow: none;
  }
  body.rf-page:has(.rf-sticky-cta) { padding-bottom: 132px; }
}

@media (max-width: 859px) {
  .intro .trust, .intro .as-of { display: block !important; }
  .intro h1 { font-size: 1.12rem; margin: 6px 0 2px; }
  .trust { font-size: 0.84rem; margin-bottom: 6px; }
  .header-inner { min-height: 40px; padding: 4px 0; }
  .rf-toolbar { gap: 6px; }
  .rf-toolbar .chip,
  .rf-toolbar .btn,
  .rf-toolbar select {
    min-height: 36px;
    font-size: 0.82rem;
    padding: 0 10px;
  }
  .toolbar-actions .btn { width: auto; }
  .results-actions-buttons, .results-actions .btn { width: auto; }
  .section-title { margin: 8px 0 6px; font-size: 1rem; }
  .plan-card { padding: 10px; }
  .sort-field select { max-width: none; }
  .sort-field { display: flex; align-items: center; gap: 8px; }
  .sort-field label { display: flex; align-items: center; gap: 8px; margin: 0; }
  .rf-toolbar .chip, .rf-toolbar .btn { white-space: nowrap; }
  #print-all-btn { font-size: 0.75rem; padding: 0 8px; }
}

@media (min-width: 1024px) {
  .rf-page .results-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
    column-gap: 16px;
    align-items: start;
    margin-top: 8px;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .rf-page .quote-main { grid-column: 1; grid-row: 1; min-width: 0; }
  #customize-panel {
    display: block;
    grid-column: 2;
    grid-row: 1;
    position: static;
    top: auto;
    height: auto;
    max-height: none;
    min-height: auto;
    overflow: visible;
    margin: 0;
    min-width: 0;
  }
  #customize-panel * {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
  }
  #customize-panel .mix-panel,
  #customize-panel .rf-customize-rows,
  #customize-panel .rf-mix-block,
  #customize-panel .rf-pay,
  #customize-panel .rf-contrib,
  #customize-panel #contrib-body,
  #customize-panel #percent-fields,
  #customize-panel #flat-fields,
  #customize-panel .contrib-line,
  #customize-panel .presets,
  #customize-panel .mode-switch {
    position: static;
    top: auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  #customize-btn,
  .rf-sticky-cta { display: none; }
  .rf-customize-rows { display: block; }
  #customize-panel .mix-grid { grid-template-columns: 1fr 1fr; }
  #customize-panel #contrib-body,
  #customize-panel #percent-fields,
  #customize-panel #flat-fields { display: block; }
  #customize-panel #percent-fields[hidden],
  #customize-panel #flat-fields[hidden] { display: none; }
}

@media (max-width: 430px) {
  .rf-page .header-inner { min-height: 32px; padding: 1px 0; }
  .rf-page .header-phone { min-height: 28px; padding: 2px 8px; font-size: 0.75rem; }
  .rf-page .brand-name { font-size: 0.92rem; }
  .rf-page .intro {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 8px;
    row-gap: 1px;
    padding: 2px 0 0;
  }
  .rf-page .intro h1 {
    flex: 1 0 100%;
    font-size: 1rem;
    line-height: 1.15;
    margin: 1px 0;
  }
  .rf-page .intro .trust,
  .rf-page .intro .as-of {
    display: inline-block !important;
    width: auto;
    max-width: 100%;
    margin: 0;
    font-size: 0.68rem;
    line-height: 1.25;
    white-space: nowrap;
  }
  .rf-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
  }
  .rf-toolbar.rf-split {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
  }
  .rf-toolbar .chips { flex: 1 1 auto; gap: 4px; }
  .rf-toolbar .sort-field { flex: 1 1 100%; min-width: 0; gap: 4px; }
  .rf-toolbar .sort-field select { width: 100%; max-width: 100%; }
  .rf-split .rf-bar-filters .sort-field { flex: 1 1 auto; width: auto; }
  .rf-split .rf-bar-filters .sort-field select { width: auto; max-width: min(100%, 11.5rem); }
  .rf-toolbar .toolbar-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    width: 100%;
  }
  .rf-split .rf-bar-actions { gap: 4px; flex-wrap: wrap; }
  .rf-split .rf-bar-actions .toolbar-actions {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    gap: 4px;
  }
  .rf-toolbar .chip,
  .rf-toolbar .btn,
  .rf-toolbar select {
    min-height: 28px;
    font-size: 0.72rem;
    padding: 0 6px;
  }
  .rf-toolbar .toolbar-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 2px 4px;
    font-size: 0.68rem;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
  }
  .rf-split .rf-bar-actions .toolbar-actions .btn,
  .rf-split .rf-bar-actions #contact-btn {
    flex: 0 1 auto;
    width: auto;
    white-space: nowrap;
  }
  #print-all-btn { font-size: 0.68rem; padding: 2px 4px; }
  .rf-page .intro .rf-trust {
    display: block !important;
    width: 100%;
    max-width: 100%;
    margin: 0;
    white-space: normal;
    line-height: 1.25;
  }
  .section-title { margin: 4px 0 2px; font-size: 0.92rem; }
  .plan-card { padding: 6px 8px; }
  .plan-head { gap: 6px; }
  .plan-card h3,
  .plan-head h3 { font-size: 0.98rem; margin: 0; line-height: 1.15; }
  .carrier { font-size: 0.68rem; letter-spacing: 0.04em; }
  .network { margin: 0 0 2px; font-size: 0.75rem; line-height: 1.2; }
  .badge { padding: 1px 6px; font-size: 0.68rem; line-height: 1.2; }
  .plan-card .save-toggle { min-height: 28px; padding: 0 8px; font-size: 0.72rem; }
  .tier-table,
  .tier-table.is-rates-only { margin-top: 4px; }
  .tier-table caption { padding-bottom: 0; font-size: 0.65rem; }
  .tier-table th,
  .tier-table td { padding: 2px 2px; font-size: 0.8rem; line-height: 1.2; }
}

@media (min-width: 1024px) {
  .rf-sticky-cta { display: none !important; }
}

@media print {
  @page {
    size: landscape;
    size: letter landscape;
  }
  .rf-sticky-cta { display: none !important; }
  .print-table th,
  .print-table td { line-height: 1.02; padding-top: 0; padding-bottom: 0; }
  .print-disclaimer { margin-top: 1px; }
  .print-disclaimer p { margin: 0 0 1px; }
  .print-close {
    margin: 3px 0 0;
    padding: 2px 6px 1px;
    border: 0.8pt solid #163e73;
    background: #f3f6fb;
    color: #122033;
    font-size: 8pt;
    line-height: 1.15;
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-close p { margin: 0; }
  .print-close .print-close-lead { font-weight: 700; }
}
