/* 4% Rule Calculator (UK) */

:root {
  --fprc4-ink: #0f172a;
  --fprc4-muted: #475569;
  --fprc4-navy: #0c2d48;
  --fprc4-gold: #d97706;
  --fprc4-teal: #0d9488;
  --fprc4-tight: #e11d48;
  --fprc4-workable: #d97706;
  --fprc4-funded: #0284c7;
  --fprc4-comfort: #059669;
}

.fprc4-root.fprc4-app.fprc4-four-pct-app,
#fprc4-root.fprc4-app.fprc4-four-pct-app {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 0;
  margin-bottom: 0;
  padding: 0 14px;
  box-sizing: border-box;
  overflow-x: hidden;
  clear: both;
  position: relative;
  font-size: 16px;
}

.entry-content > .fprc4-root.fprc4-app.fprc4-four-pct-app,
.entry-content > #fprc4-root.fprc4-app.fprc4-four-pct-app,
.wp-block-shortcode .fprc4-root.fprc4-app.fprc4-four-pct-app {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.fprc4-results-mount {
  scroll-margin-top: 88px;
  margin-top: 18px;
}

.fprc4-card--results {
  scroll-margin-top: 88px;
  margin-top: 18px;
}

.fprc4-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 18px 30px;
  border: 2px solid rgba(12, 45, 72, 0.16);
  border-radius: 22px;
  box-shadow: 0 22px 64px rgba(2, 6, 23, 0.1);
  background: #fff;
  color: var(--fprc4-ink);
}

.fprc4-hero {
  border: 1px solid rgba(13, 148, 136, 0.28);
  border-radius: 18px;
  padding: 22px;
  background: linear-gradient(135deg, #fff 0%, #ecfdf5 42%, #fef3c7 100%);
}

.fprc4-kicker {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fprc4-teal);
}

.fprc4-title {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3.6vw, 2.1rem);
  font-weight: 950;
  line-height: 1.2;
  color: var(--fprc4-navy);
}

.fprc4-hero-context {
  margin: 0 0 12px;
  color: var(--fprc4-ink);
  font-weight: 650;
  line-height: 1.55;
  font-size: 0.95rem;
  max-width: 62ch;
}

.fprc4-sub,
.fprc4-hero-note {
  margin: 0;
  color: var(--fprc4-muted);
  font-weight: 650;
  line-height: 1.55;
}

.fprc4-hero-note {
  margin-top: 12px;
  color: #0f766e;
  font-size: 0.88rem;
}

.fprc4-presets--top {
  margin-top: 16px;
  margin-bottom: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdfa 100%);
  border: 2px solid rgba(13, 148, 136, 0.2);
}

.fprc4-presets__title {
  margin: 0 0 4px;
  font-weight: 900;
  color: var(--fprc4-navy);
  font-size: 0.95rem;
}

.fprc4-presets__lead {
  margin: 0 0 10px;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.45;
  color: #64748b;
}

.fprc4-presets__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fprc4-preset-btn {
  border: 2px solid rgba(13, 148, 136, 0.35);
  background: #f0fdfa;
  color: #0f766e;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

.fprc4-preset-btn:hover {
  background: #ccfbf1;
}

.fprc4-card {
  margin-top: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  background: #fff;
}

.fprc4-card--step {
  border: 2px solid rgba(12, 45, 72, 0.12);
  border-left: 5px solid var(--fprc4-teal);
  background: linear-gradient(165deg, #f8fafc 0%, #fff 50%);
}

.fprc4-step-kicker {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fprc4-teal);
}

.fprc4-step-lead {
  margin: -8px 0 14px;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.5;
  color: var(--fprc4-muted);
}

.fprc4-h3 {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid rgba(12, 45, 72, 0.14);
  font-size: 1.2rem;
  font-weight: 950;
  color: var(--fprc4-navy);
}

.fprc4-mode-panel {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdfa 100%);
  border: 2px solid rgba(12, 45, 72, 0.14);
}

.fprc4-mode-panel__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 950;
  color: var(--fprc4-navy);
  line-height: 1.25;
}

.fprc4-mode-panel__lead {
  margin: 0 0 14px;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
  color: #64748b;
}

.fprc4-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

.fprc4-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-height: 132px;
  border: 3px solid rgba(13, 148, 136, 0.28);
  border-radius: 16px;
  padding: 16px 16px 18px;
  background: #fff;
  color: #0f766e;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.fprc4-mode-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.1);
}

.fprc4-mode-btn:focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.35);
  outline-offset: 2px;
}

.fprc4-mode-btn__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.fprc4-mode-btn__emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  font-size: 1.35rem;
  line-height: 1;
  background: rgba(13, 148, 136, 0.1);
}

.fprc4-mode-btn__badge {
  min-height: 1.5rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: transparent;
  background: transparent;
}

.fprc4-mode-btn__label {
  font-size: clamp(1rem, 2.4vw, 1.12rem);
  font-weight: 950;
  color: var(--fprc4-navy);
  line-height: 1.25;
}

.fprc4-mode-btn__desc {
  font-size: 0.86rem;
  font-weight: 650;
  color: #64748b;
  line-height: 1.45;
}

.fprc4-mode-btn--spend {
  border-color: rgba(13, 148, 136, 0.35);
}

.fprc4-mode-btn--spend.fprc4-mode-btn--active {
  border-color: var(--fprc4-teal);
  background: linear-gradient(145deg, #ecfdf5 0%, #f0fdfa 55%, #fff 100%);
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.18);
}

.fprc4-mode-btn--spend.fprc4-mode-btn--active .fprc4-mode-btn__emoji {
  background: rgba(13, 148, 136, 0.18);
}

.fprc4-mode-btn--spend.fprc4-mode-btn--active .fprc4-mode-btn__badge {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.14);
}

.fprc4-mode-btn--pot {
  border-color: rgba(12, 45, 72, 0.22);
}

.fprc4-mode-btn--pot .fprc4-mode-btn__emoji {
  background: rgba(12, 45, 72, 0.08);
}

.fprc4-mode-btn--pot.fprc4-mode-btn--active {
  border-color: var(--fprc4-navy);
  background: linear-gradient(145deg, #eff6ff 0%, #f8fafc 55%, #fff 100%);
  box-shadow: 0 12px 28px rgba(12, 45, 72, 0.16);
}

.fprc4-mode-btn--pot.fprc4-mode-btn--active .fprc4-mode-btn__emoji {
  background: rgba(12, 45, 72, 0.12);
}

.fprc4-mode-btn--pot.fprc4-mode-btn--active .fprc4-mode-btn__badge {
  color: var(--fprc4-navy);
  background: rgba(12, 45, 72, 0.1);
}

.fprc4-field--hidden {
  display: none !important;
}

.fprc4-label--inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.fprc4-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.fprc4-toggle-row__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}

.fprc4-toggle-row__text {
  flex: 1;
  min-width: 0;
}

.fprc4-toggle-row__title {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.3;
}

.fprc4-toggle-row__hint {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 650;
  color: #64748b;
  line-height: 1.4;
}

.fprc4-check {
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--fprc4-teal);
  cursor: pointer;
}

.fprc4-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fprc4-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fprc4-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1e293b;
}

.fprc4-input {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fprc4-ink);
  background: #fff;
  font-family: inherit;
}

.fprc4-input:focus {
  outline: none;
  border-color: var(--fprc4-teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.fprc4-hint {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 650;
  color: #64748b;
  line-height: 1.45;
}

.fprc4-results-footer {
  display: block;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 3px solid rgba(12, 45, 72, 0.14);
}

.fprc4-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}

.fprc4-panel--table {
  border-left: 5px solid var(--fprc4-teal);
}

.fprc4-panel--tips {
  border-left: 5px solid var(--fprc4-gold);
}

.fprc4-root.fprc4-app.fprc4-four-pct-app .fprc4-results-footer,
.fprc4-root.fprc4-app.fprc4-four-pct-app .fprc4-export,
.fprc4-root.fprc4-app.fprc4-four-pct-app .fprc4-panel,
.fprc4-root.fprc4-app.fprc4-four-pct-app .fprc4-next-tool {
  display: block;
  visibility: visible;
}

@keyframes fprc4-confetti-fall {
  0% { transform: translate3d(0, -10%, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translate3d(12px, 220%, 0) rotate(18deg); opacity: 0; }
}

.fprc4-celebration {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 22px;
  border-radius: 20px;
  border: 2px solid rgba(12, 45, 72, 0.14);
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
}

.fprc4-celebration--info {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 55%, #fff 100%);
  border-color: rgba(100, 116, 139, 0.28);
}

.fprc4-celebration--comfortable {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 55%, #fff 100%);
  border-color: rgba(5, 150, 105, 0.35);
}

.fprc4-celebration--funded {
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 55%, #fff 100%);
  border-color: rgba(2, 132, 199, 0.35);
}

.fprc4-celebration--workable {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 55%, #fff 100%);
  border-color: rgba(217, 119, 6, 0.35);
}

.fprc4-celebration--tight {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 55%, #fff 100%);
  border-color: rgba(225, 29, 72, 0.32);
}

.fprc4-celebration__rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.fprc4-celebration__drop {
  position: absolute;
  top: -15%;
  font-size: clamp(0.95rem, 2.2vw, 1.3rem);
  animation: fprc4-confetti-fall linear infinite;
  opacity: 0.85;
}

.fprc4-celebration__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  align-items: center;
  gap: 24px 36px;
}

.fprc4-celebration__gifCell {
  width: 100%;
  max-width: 300px;
  justify-self: center;
}

.fprc4-celebration__gif {
  display: block;
  width: 100%;
  max-width: 300px;
  border-radius: 18px;
  border: 2px solid rgba(12, 45, 72, 0.12);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.16);
  aspect-ratio: 1;
  object-fit: cover;
  background: #fff;
}

.fprc4-celebration__emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  font-size: clamp(3.5rem, 10vw, 5rem);
  border-radius: 18px;
  border: 2px solid rgba(12, 45, 72, 0.1);
  background: rgba(255, 255, 255, 0.75);
}

.fprc4-celebration__badge {
  margin: 0 0 8px;
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fprc4-navy);
}

.fprc4-celebration__title {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 950;
  line-height: 1.25;
  color: var(--fprc4-navy);
}

.fprc4-celebration__tone,
.fprc4-celebration__meta {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.55;
  color: var(--fprc4-muted);
}

.fprc4-celebration__meta {
  margin-top: 8px;
  color: #0f766e;
  font-size: 0.86rem;
}

.fprc4-insight {
  margin-bottom: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 2px solid rgba(12, 45, 72, 0.12);
  background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
}

.fprc4-insight--info { border-left: 5px solid #64748b; }
.fprc4-insight--comfortable { border-left: 5px solid var(--fprc4-comfort); }
.fprc4-insight--funded { border-left: 5px solid var(--fprc4-funded); }
.fprc4-insight--workable { border-left: 5px solid var(--fprc4-workable); }
.fprc4-insight--tight { border-left: 5px solid var(--fprc4-tight); }

.fprc4-insight__kicker {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fprc4-teal);
}

.fprc4-insight__title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 950;
  color: var(--fprc4-navy);
}

.fprc4-insight__figure {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 950;
  color: var(--fprc4-navy);
}

.fprc4-insight__unit {
  margin: 0 0 8px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #64748b;
}

.fprc4-insight__detail {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.5;
  color: var(--fprc4-muted);
}

.fprc4-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.fprc4-stats--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.fprc4-stats--solo {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}

.fprc4-stats--trio {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.fprc4-stats--quad {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.fprc4-stat {
  padding: 16px;
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 6px 20px rgba(2, 6, 23, 0.05);
}

.fprc4-stat--neutral {
  border-color: #e2e8f0;
  background: linear-gradient(165deg, #f8fafc 0%, #fff 100%);
}

.fprc4-stat--target {
  border-color: rgba(12, 45, 72, 0.22);
  border-left: 5px solid var(--fprc4-navy);
  background: linear-gradient(145deg, #eff6ff 0%, #f8fafc 48%, #fff 100%);
  box-shadow: 0 10px 28px rgba(12, 45, 72, 0.1);
}

.fprc4-stat--target .fprc4-stat__label {
  color: #0c4a6e;
}

.fprc4-stat--target .fprc4-stat__value {
  color: var(--fprc4-navy);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
}

.fprc4-stat--sp {
  border-color: rgba(79, 70, 229, 0.24);
  border-left: 5px solid #4f46e5;
  background: linear-gradient(145deg, #eef2ff 0%, #f5f3ff 48%, #fff 100%);
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.1);
}

.fprc4-stat--sp .fprc4-stat__label {
  color: #4338ca;
}

.fprc4-stat--sp .fprc4-stat__value {
  color: #312e81;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
}

.fprc4-stat--projection {
  border-color: rgba(217, 119, 6, 0.28);
  border-left: 5px solid var(--fprc4-gold);
  background: linear-gradient(145deg, #fffbeb 0%, #fff7ed 48%, #fff 100%);
}

.fprc4-stat--projection .fprc4-stat__label {
  color: #b45309;
}

.fprc4-stat--good {
  border-color: rgba(5, 150, 105, 0.35);
  border-left: 5px solid var(--fprc4-comfort);
  background: linear-gradient(165deg, #ecfdf5 0%, #fff 100%);
}

.fprc4-stat--warn {
  border-color: rgba(225, 29, 72, 0.3);
  border-left: 5px solid var(--fprc4-tight);
  background: linear-gradient(165deg, #fff1f2 0%, #fff 100%);
}

.fprc4-stat__emoji {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.fprc4-stat__label {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 850;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fprc4-stat__value {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 950;
  color: var(--fprc4-navy);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.fprc4-stat__sub {
  margin: 6px 0 0;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.4;
  color: #64748b;
}

.fprc4-callout {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.5;
  color: #334155;
}

.fprc4-callout--teal {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  border: 2px solid rgba(13, 148, 136, 0.28);
}

.fprc4-callout--bridge {
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
  border: 2px solid rgba(2, 132, 199, 0.28);
}

.fprc4-callout--sp-returns {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 2px solid rgba(5, 150, 105, 0.28);
}

.fprc4-callout--sp-returns .fprc4-callout__title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #065f46;
}

.fprc4-callout--sp-returns .fprc4-callout__lead {
  margin: 0 0 10px;
}

.fprc4-callout--sp-returns .fprc4-callout__caveat {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(5, 150, 105, 0.2);
  color: #475569;
  font-weight: 700;
}

.fprc4-callout--sp-returns p {
  margin: 0 0 8px;
}

.fprc4-callout--sp-returns p:last-child {
  margin-bottom: 0;
}

.fprc4-callout--growth {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid rgba(217, 119, 6, 0.28);
}

.fprc4-callout--growth .fprc4-callout__title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #92400e;
}

.fprc4-callout--growth .fprc4-callout__lead {
  margin: 0 0 10px;
}

.fprc4-callout--growth .fprc4-callout__caveat {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(217, 119, 6, 0.2);
  color: #475569;
  font-weight: 700;
}

.fprc4-callout--growth p {
  margin: 0 0 8px;
}

.fprc4-callout--growth p:last-child {
  margin-bottom: 0;
}

.fprc4-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.fprc4-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.fprc4-table th,
.fprc4-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: right;
  white-space: nowrap;
}

.fprc4-table th:first-child,
.fprc4-table td:first-child,
.fprc4-table th:nth-child(2),
.fprc4-table td:nth-child(2) {
  text-align: left;
}

.fprc4-table th {
  font-weight: 900;
  color: #334155;
  background: #f8fafc;
}

.fprc4-table__row--active {
  background: #ecfdf5;
  font-weight: 800;
}

.fprc4-export {
  margin-top: 22px;
  padding: 22px 20px 24px;
  border-radius: 16px;
  border: 2px solid rgba(8, 49, 65, 0.28);
  background: linear-gradient(135deg, #fff 0%, #ecfeff 100%);
  text-align: center;
  box-shadow: 0 12px 32px rgba(8, 49, 65, 0.1);
}

.fprc4-export-title {
  margin: 0 0 8px;
  color: var(--fprc4-navy);
  font-size: clamp(1.25rem, 3.25vw, 1.58rem);
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.fprc4-export-sub {
  margin: 0 auto 16px;
  max-width: 36rem;
  color: #64748b;
  font-weight: 650;
  font-size: 0.92rem;
  line-height: 1.5;
}

.fprc4-export-btn {
  width: 100%;
  max-width: 420px;
  padding: 17px 18px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 950;
  font-family: inherit;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #0e7490 0%, var(--fprc4-navy) 55%, #062a38 100%);
  box-shadow: 0 6px 0 #062a38, 0 16px 34px rgba(8, 49, 65, 0.32);
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.fprc4-export-btn:hover {
  filter: brightness(1.04);
}

.fprc4-export-btn:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #062a38, 0 8px 20px rgba(8, 49, 65, 0.26);
}

.fprc4-export-btn:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 3px;
}

.fprc4-snapshot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) {
  .fprc4-snapshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.fprc4-snapshot-item {
  border: 2px solid #e2e8f0;
  border-top: 3px solid var(--fprc4-teal);
  background: #fff;
  border-radius: 12px;
  padding: 12px 12px 14px;
  box-shadow: 0 4px 12px rgba(8, 49, 65, 0.05);
}

.fprc4-snapshot-item:nth-child(1) { border-top-color: var(--fprc4-navy); }
.fprc4-snapshot-item:nth-child(2) { border-top-color: #0369a1; }
.fprc4-snapshot-item:nth-child(3) { border-top-color: #d97706; }

.fprc4-snapshot-key {
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 4px;
}

.fprc4-snapshot-val {
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  font-weight: 950;
  color: var(--fprc4-navy);
  font-variant-numeric: tabular-nums;
}

.fprc4-snapshot-title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fprc4-teal);
  text-align: left;
}

.fprc4-tips {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.55;
  color: var(--fprc4-muted);
}

.fprc4-tips li + li {
  margin-top: 8px;
}

.fprc4-next-tool {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 100%);
  border: 2px solid rgba(13, 148, 136, 0.28);
}

.fprc4-next-tool__title {
  margin: 0 0 6px;
  font-weight: 900;
  color: var(--fprc4-navy);
}

.fprc4-next-tool__text {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.5;
  color: #475569;
}

.fprc4-next-tool__link {
  display: inline-flex;
  font-weight: 850;
  color: #0f766e;
  text-decoration: none;
}

.fprc4-next-tool__link:hover {
  text-decoration: underline;
}

body.fprc4-modal-open {
  overflow: hidden;
}

.fprc4-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
  overflow-y: auto;
}

.fprc4-modal {
  width: 100%;
  max-width: 520px;
  max-height: min(92vh, calc(100dvh - 32px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  border: 3px solid var(--fprc4-navy);
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.35);
  box-sizing: border-box;
}

.fprc4-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 22px;
  background: linear-gradient(135deg, var(--fprc4-navy), #0a4a5f);
  color: #fff;
}

.fprc4-modal-header-text {
  min-width: 0;
  flex: 1;
}

.fprc4-modal-header h3 {
  margin: 0;
  font-size: clamp(1.15rem, 4vw, 1.45rem);
  font-weight: 950;
  color: #fff;
  line-height: 1.25;
}

.fprc4-modal-header-sub {
  margin: 10px 0 0;
  font-size: 0.875rem;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.45;
}

.fprc4-modal-close {
  flex-shrink: 0;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.fprc4-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.fprc4-modal-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.fprc4-modal-body .fprc4-snapshot-grid {
  margin: 0 0 16px;
}

.fprc4-modal-lead {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 650;
  color: #334155;
  line-height: 1.5;
}

.fprc4-modal-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--fprc4-navy);
}

.fprc4-modal-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 2px solid rgba(8, 49, 65, 0.2);
  border-radius: 10px;
  box-sizing: border-box;
  font-size: max(16px, 1rem);
  font-family: inherit;
}

.fprc4-modal-input:focus {
  outline: none;
  border-color: var(--fprc4-teal);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.15);
}

.fprc4-modal-error {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f2;
  color: #be123c;
  font-size: 0.88rem;
  font-weight: 700;
}

.fprc4-modal-success {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 800;
  text-align: center;
}

.fprc4-modal-trust {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.45;
  color: #64748b;
}

.fprc4-modal-footer {
  display: flex;
  gap: 10px;
  padding: 0 22px 22px;
}

.fprc4-modal-submit {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #0e7490 0%, var(--fprc4-navy) 100%);
}

.fprc4-modal-submit:hover:not(:disabled) {
  filter: brightness(1.05);
}

.fprc4-modal-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.fprc4-modal-secondary {
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  background: #fff;
  color: #475569;
}

.fprc4-modal-secondary:hover {
  background: #f8fafc;
}

@media (max-width: 900px) {
  .fprc4-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fprc4-celebration__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .fprc4-grid {
    grid-template-columns: 1fr;
  }

  .fprc4-mode {
    grid-template-columns: 1fr;
  }

  .fprc4-mode-btn {
    min-height: 0;
  }

  .fprc4-stats {
    grid-template-columns: 1fr;
  }

  .fprc4-modal-snapshot {
    grid-template-columns: 1fr;
  }
}
