/* Cloudflare comparison layer — additive to styles.css */
:root {
  --cf: #f48120;
  --cf-2: #faad3f;
  --cf-ink: #1a1a1a;
  --cf-paper: #fff7ec;
  --cf-line: #f48120;
}

/* Toggle button in header */
.cf-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-3);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
  border-radius: 999px;
  margin-right: 12px;
}
.cf-toggle:hover { border-color: var(--ink-3); color: var(--ink); }
.cf-toggle.on {
  background: var(--cf);
  border-color: var(--cf);
  color: #1a1a1a;
}
.cf-toggle .cf-mark {
  width: 22px; height: 14px;
  display: inline-block;
  background-color: var(--cf);
  -webkit-mask: url("cf-logo.svg") center / contain no-repeat;
          mask: url("cf-logo.svg") center / contain no-repeat;
  transition: background-color .15s, transform .25s;
}
.cf-toggle.on .cf-mark {
  background-color: #1a1a1a;
  transform: rotate(0);
}
.cf-toggle .cf-switch {
  width: 24px; height: 14px;
  border-radius: 7px;
  background: var(--ink-5);
  position: relative;
  transition: background .2s;
}
.cf-toggle .cf-switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ink);
  transition: left .2s, background .2s;
}
.cf-toggle.on .cf-switch { background: #1a1a1a; }
.cf-toggle.on .cf-switch::after { left: 12px; background: var(--cf); }

/* Cloudflare comparison overlay banner — sits above each section content when CF mode on */
.cf-overlay {
  position: relative;
  background: var(--cf-paper);
  color: var(--cf-ink);
  border: 1px solid var(--cf);
  border-left: 4px solid var(--cf);
  padding: 24px 28px 24px 28px;
  margin-bottom: 36px;
  font-family: 'Geist', system-ui, sans-serif;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 28px;
  align-items: start;
}
@keyframes cfDrop {
  from { transform: translateY(-8px); }
  to { transform: translateY(0); }
}
.cf-overlay .cf-tag {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cf);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}
.cf-overlay .cf-tag::before {
  content: "";
  display: inline-block;
  width: 26px; height: 16px;
  background-color: var(--cf);
  -webkit-mask: url("cf-logo.svg") center / contain no-repeat;
          mask: url("cf-logo.svg") center / contain no-repeat;
}
.cf-overlay .cf-body h4 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
  color: var(--cf-ink);
}
.cf-overlay .cf-body h4 em {
  font-style: italic;
  font-weight: 400;
  color: #b85a0c;
}
.cf-overlay .cf-body p {
  font-size: 14px;
  line-height: 1.55;
  color: #4a3a28;
  max-width: 60ch;
}
.cf-overlay .cf-body p strong {
  color: var(--cf-ink);
  font-weight: 600;
  background: rgba(244,129,32,0.18);
  padding: 0 3px;
}
.cf-overlay .cf-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 1px dashed rgba(244,129,32,0.4);
  padding-left: 24px;
  min-width: 140px;
}
.cf-overlay .cf-stats .row {
  font-family: 'Geist Mono', ui-monospace, monospace;
}
.cf-overlay .cf-stats .lbl {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8a6a3a;
  display: block;
  margin-bottom: 2px;
}
.cf-overlay .cf-stats .v {
  font-size: 18px;
  color: var(--cf-ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cf-overlay .cf-stats .v.good { color: #2a7a2a; }
.cf-overlay .cf-source {
  position: absolute;
  top: 8px; right: 14px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b85a0c;
  opacity: 0.7;
}

/* Hero CF mode — flip headline */
.cf-hero-flip {
  background: var(--cf-paper);
  color: var(--cf-ink);
  padding: 28px 32px;
  border: 1px solid var(--cf);
  margin-bottom: 32px;
  position: relative;
}
.cf-hero-flip .cf-tag {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cf);
  font-weight: 700;
  margin-bottom: 12px;
}
.cf-hero-flip h3 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 10px;
}
.cf-hero-flip h3 em {
  font-style: italic;
  font-weight: 400;
  color: #b85a0c;
}
.cf-hero-flip p {
  font-size: 14px;
  line-height: 1.6;
  color: #4a3a28;
}

/* Body global tint when CF mode is on */
body.cf-mode .topbar {
  border-bottom-color: rgba(244,129,32,0.4);
  box-shadow: 0 0 0 1px rgba(244,129,32,0.1) inset;
}
body.cf-mode .live-dot {
  background: var(--cf);
  box-shadow: 0 0 8px var(--cf);
}

/* Floating CF status bar at top, under header */
.cf-status-bar {
  background: linear-gradient(90deg, var(--cf) 0%, var(--cf-2) 100%);
  color: #1a1a1a;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px 16px;
  font-weight: 600;
  position: sticky;
  top: 56px;
  z-index: 25;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}
.cf-status-bar span:not(:last-child)::after {
  content: "·";
  margin-left: 24px;
  opacity: 0.5;
}

/* CF receipt variant */
.cf-receipt-flip {
  background: var(--cf-paper);
  color: var(--cf-ink);
  padding: 28px 32px;
  border: 1px solid var(--cf);
  margin-top: 24px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  position: relative;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}
.cf-receipt-flip .head {
  text-align: center;
  border-bottom: 1px dashed rgba(244,129,32,0.5);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.cf-receipt-flip .head .logo {
  font-size: 14px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--cf);
  margin-bottom: 4px;
}
.cf-receipt-flip .head .meta { font-size: 10px; color: #8a6a3a; }
.cf-receipt-flip .row {
  display: flex; justify-content: space-between;
  padding: 5px 0;
  font-size: 11px;
  border-bottom: 1px dotted rgba(244,129,32,0.3);
}
.cf-receipt-flip .total {
  margin-top: 12px; padding-top: 10px;
  border-top: 2px solid var(--cf);
  display: flex; justify-content: space-between;
  font-size: 16px; font-weight: 700;
}
.cf-receipt-flip .total .amt {
  font-size: 22px;
  color: #2a7a2a;
}
.cf-receipt-flip .stamp {
  position: absolute;
  bottom: 22px; right: -8px;
  border: 2px solid #2a7a2a;
  color: #2a7a2a;
  padding: 4px 10px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.15em;
  transform: rotate(-8deg);
  background: var(--cf-paper);
}

@media (max-width: 900px) {
  .cf-overlay {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .cf-overlay .cf-stats {
    border-left: 0;
    border-top: 1px dashed rgba(244,129,32,0.4);
    padding-left: 0;
    padding-top: 12px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
  }
  .cf-status-bar { font-size: 10px; gap: 12px; flex-wrap: wrap; }
}
