:root {
  color-scheme: light;
  --ink: #0a2a66;
  --muted: rgba(10, 42, 102, 0.68);
  --line: rgba(64, 116, 158, 0.3);
  --surface: rgba(255, 255, 255, 0.86);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: transparent;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rf2 {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 28px;
}

.rf2-header { text-align: center; }
.rf2-eyebrow, .rf2-step {
  color: #7e52a4;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rf2-header h1 {
  margin: 4px 0 5px;
  color: #7e52a4;
  font-size: clamp(1.12rem, 2vw, 1.52rem);
  letter-spacing: -0.025em;
}

.rf2-header p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.rf2-pipeline { position: relative; margin-top: 14px; }
.rf2-connectors { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.rf2-connector {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 5 8;
  animation: rf2-flow 4.5s linear infinite;
}

.rf2-card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(10, 42, 102, 0.09);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(10, 42, 102, 0.065);
  backdrop-filter: blur(14px);
}

.rf2-source {
  display: grid;
  place-items: center;
  width: 270px;
  min-height: 76px;
  margin: 0 auto;
  padding: 12px 18px;
  border-radius: 24px;
  text-align: center;
}

.rf2-source h2, .rf2-method h2, .rf2-outcome h2 { margin: 2px 0 3px; }
.rf2-source h2 { font-size: 1rem; }
.rf2-source p, .rf2-method p, .rf2-outcome p { margin: 0; color: var(--muted); }
.rf2-source p { font-size: 0.7rem; }

.rf2-method-label { margin: 15px auto 8px; text-align: center; }
.rf2-method-label span { color: #7e52a4; font-size: 0.64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.rf2-method-label strong { display: block; margin-top: 2px; font-size: 0.72rem; color: var(--muted); }

.rf2-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rf2-method {
  min-height: 218px;
  padding: 14px 16px 13px;
  border-radius: 24px;
  outline: none;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.rf2-method:hover, .rf2-method:focus-visible { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(10,42,102,.11); }
.rf2-method--tree { --accent: #259b85; --soft: rgba(37,155,133,.12); }
.rf2-method--match { --accent: #2ea9e8; --soft: rgba(46,169,232,.11); }
.rf2-method--translate { --accent: #7e52a4; --soft: rgba(126,82,164,.12); }
.rf2-method:hover, .rf2-method:focus-visible { border-color: color-mix(in srgb, var(--accent) 38%, transparent); }
.rf2-method-tag { display: inline-flex; padding: 3px 8px; border-radius: 999px; color: var(--accent); background: var(--soft); font-size: .62rem; font-weight: 800; }
.rf2-method h2 { color: var(--accent); font-size: .98rem; }
.rf2-method p { min-height: 31px; font-size: .68rem; line-height: 1.35; }
.rf2-metric { margin-top: 9px; padding: 7px 8px; border-radius: 10px; background: var(--soft); color: var(--muted); font-size: .64rem; text-align: center; }
.rf2-metric strong { color: var(--accent); }

.rf2-icon { display: block; width: 100%; height: 62px; margin-bottom: 7px; overflow: visible; }
.rf2-tree-hierarchy .edge { fill: none; stroke: rgba(37,155,133,.52); stroke-width: 1.8; stroke-linecap: round; opacity: 0; animation: rf2-edge-build 5.6s ease-in-out infinite; }
.rf2-tree-hierarchy .e2 { animation-delay: .2s; }.rf2-tree-hierarchy .e3 { animation-delay: .35s; }.rf2-tree-hierarchy .e4 { animation-delay: .55s; }.rf2-tree-hierarchy .e5 { animation-delay: .7s; }.rf2-tree-hierarchy .e6 { animation-delay: .85s; }.rf2-tree-hierarchy .e7 { animation-delay: 1s; }
.rf2-tree-hierarchy .node { opacity: 0; animation: rf2-node-build 6.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.rf2-tree-hierarchy .node circle { fill: #fff; stroke: #259b85; stroke-width: 2; filter: drop-shadow(0 0 4px rgba(37,155,133,.22)); }
.rf2-tree-hierarchy .root { animation-delay: 0s; }.rf2-tree-hierarchy .n1 { animation-delay: .45s; }.rf2-tree-hierarchy .n2 { animation-delay: .75s; }.rf2-tree-hierarchy .n3 { animation-delay: 1s; }.rf2-tree-hierarchy .n4 { animation-delay: 1.2s; }.rf2-tree-hierarchy .n5 { animation-delay: 1.4s; }.rf2-tree-hierarchy .n6 { animation-delay: 1.6s; }
.rf2-tree-hierarchy .n7 { animation-delay: 1.8s; }
.rf2-tree-hierarchy .leaf circle { fill: #9bd9c8; stroke: #167967; stroke-width: 1.5; }

.rf2-road-network path { fill: none; stroke: rgba(93,118,149,.2); stroke-width: 2.2; stroke-linecap: round; }
.rf2-selected-route { fill: none; stroke: #073b7a; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100; filter: drop-shadow(0 0 4px rgba(46,169,232,.3)); animation: rf2-route 5s ease-in-out infinite; }
.rf2-gps-points circle { fill: #75c8f0; stroke: #073b7a; stroke-width: 1.7; filter: drop-shadow(0 0 3px rgba(46,169,232,.25)); }
.rf2-match-links path { stroke: rgba(46,169,232,.58); stroke-width: 1.4; stroke-dasharray: 2 3; animation: rf2-fade 2.8s ease-in-out infinite; }

.rf2-translate-icon { display: flex; align-items: center; justify-content: center; gap: 8px; }
.rf2-translate-icon .zone { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 11px; color: #7e52a4; background: rgba(126,82,164,.12); font-size: .65rem; font-weight: 900; }
.rf2-translate-icon i { display: block; height: 2px; background: rgba(126,82,164,.42); }.rf2-translate-icon .link { width: 24px; border-top: 2px dashed #7e52a4; background: none; animation: rf2-fade 2.5s ease-in-out infinite; }.rf2-translate-icon .network { width: 52px; height: 28px; border-radius: 9px; background: repeating-linear-gradient(35deg, transparent 0 7px, rgba(126,82,164,.32) 8px 9px); }

.rf2-outcomes { display: grid; grid-template-columns: 1fr; gap: 10px; width: min(520px, 100%); margin: 20px auto 0; }
.rf2-outcome { min-height: 78px; padding: 10px 16px; border-radius: 22px; border-top: 3px solid #319baf; }
.rf2-outcome--planning { border-top-color: #d29a4a; }
.rf2-outcome { text-align: center; }
.rf2-outcome-heading { display: grid; justify-items: center; gap: 7px; }
.rf2-outcome h2 { font-size: .9rem; }.rf2-outcome p { max-width: 410px; font-size: .64rem; line-height: 1.35; }
.rf2-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.rf2-pills span { padding: 3px 7px; border-radius: 999px; background: rgba(49,155,175,.1); color: #287f8f; font-size: .58rem; font-weight: 800; }
.rf2-outcome--planning .rf2-pills span { color: #9a6a28; background: rgba(210,154,74,.12); }

@keyframes rf2-flow { to { stroke-dashoffset: -52; } }
@keyframes rf2-draw { 0%,100% { stroke-dashoffset: 110; opacity: .3; } 45%,75% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes rf2-pulse { 50% { transform: scale(1.32); } }
@keyframes rf2-fade { 50% { opacity: .35; } }
@keyframes rf2-tree-grow { 0%,12%,100% { stroke-dashoffset: 100; opacity: .25; } 48%,88% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes rf2-route { 0%,12%,100% { stroke-dashoffset: 100; opacity: .35; } 50%,88% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes rf2-node-build { 0%,20%,100% { opacity: 0; transform: scale(.55); } 31%,84% { opacity: 1; transform: scale(1); } }
@keyframes rf2-edge-build { 0%,28%,100% { opacity: 0; } 39%,84% { opacity: 1; } }

@media (max-width: 760px) {
  .rf2 { width: min(100% - 20px, 620px); }
  .rf2-header p { display: none; }
  .rf2-methods { grid-template-columns: 1fr; }
  .rf2-method { min-height: 0; }
  .rf2-outcomes { grid-template-columns: 1fr; }
  .rf2-connectors { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
