/* ════════════════════════════════════════════════════════
   Retirement Income Calculator v5.0
   PWR Retirement Group color palette
   Navy #1a2d5a · Gold #c4912a · White #ffffff
   ════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Nunito+Sans:opsz,wght@6..12,300;6..12,400;6..12,600;6..12,700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.ric {
  /* ── PWR color tokens ── */
  --navy: #1a2d5a;
  --navy-dark: #111e40;
  --navy-mid: #22396e;
  --gold: #c4912a;
  --gold-light: #f8f1e4;
  --gold-muted: #d4a845;
  --white: #ffffff;
  --bg: #f5f7fb;
  --bg2: #eef1f8;
  --border: #dde3ef;
  --text: #1c2b45;
  --muted: #6a7b96;
  --radius: 8px;
  --radius-lg: 12px;
  --sh-sm: 0 1px 5px rgba(26, 45, 90, .09);
  --sh-md: 0 4px 22px rgba(26, 45, 90, .13);

  /* font-family: 'Nunito Sans', -apple-system, sans-serif; */
  /* font-size: 14px; */
  color: var(--text);
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  max-width: 1060px;
  margin: 0 auto 2.5rem;
  box-shadow: 0 6px 40px rgba(26, 45, 90, .16), 0 0 0 1px var(--border);
}

/* ═══ HEADER ═══ */
.ric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 30px;
  background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-mid) 100%);
  position: relative;
  overflow: hidden;
}

.ric-header::before {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 145, 42, .12) 0%, transparent 70%);
  pointer-events: none;
}

.ric-header-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
}

.ric-header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 5px;
}

.ric-header-sub {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .6);
  font-weight: 300;
  line-height: 1.45;
  max-width: 370px;
}

/* Hero result */
.ric-hero-box {
  flex-shrink: 0;
  text-align: right;
  background: rgba(255, 255, 255, .05);
  border: 1.5px solid rgba(196, 145, 42, .4);
  border-radius: 10px;
  padding: 15px 22px;
  position: relative;
  z-index: 1;
  min-width: 190px;
}

.ric-hero-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--gold-muted);
  line-height: 1.6;
  margin-bottom: 5px;
}

.ric-hero-label span {
  display: block;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
  font-size: 9.5px;
  color: rgba(196, 145, 42, .65);
}

.ric-hero-val {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--gold-muted);
  line-height: 1;
  letter-spacing: -.02em;
}

/* ═══ REQUIRED BAR ═══ */
.ric-required-bar {
  background: var(--white);
  text-align: right;
  padding: 5px 24px;
  font-size: 11.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.ric-ast {
  color: var(--gold);
  font-weight: 700;
}

/* ═══ BODY LAYOUT ═══ */
.ric-body {
  /* display: grid;
  grid-template-columns: 360px 1fr; */
}

@media (max-width: 800px) {
  .ric-body {
    grid-template-columns: 1fr;
  }

  .ric-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ric-hero-box {
    min-width: unset;
    width: 100%;
    text-align: left;
  }
}

/* ═══ FORM (LEFT) ═══ */
.ric-form {
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Group */
.ric-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ric-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--navy);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold-light);
}

.ric-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

/* Grids */
.ric-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ric-grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

@media (max-width: 420px) {

  .ric-grid2,
  .ric-grid3 {
    grid-template-columns: 1fr 1fr;
  }
}

.ric-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ric-field-span {
  grid-column: span 1;
}

.ric-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .025em;
  line-height: 1.3;
}

/* Input boxes */
.ric-input {
  display: flex;
  align-items: stretch;
  height: 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.ric-input:focus-within {
  border-color: var(--navy);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26, 45, 90, .07);
}

.ric-input.pre span,
.ric-input.suf span {
  display: flex;
  align-items: center;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  background: var(--gold-light);
  flex-shrink: 0;
  user-select: none;
  border-right: 1.5px solid var(--border);
}

.ric-input.suf span {
  border-right: none;
  border-left: 1.5px solid var(--border);
}

.ric-input input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text) !important;
  padding: 17px 9px !important;
}

/* Toggle switches */
.ric-switch-row {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius);
  transition: background .12s;
  user-select: none;
}

.ric-switch-row:hover {
  background: var(--bg);
}

.ric-sw {
  flex-shrink: 0;
  position: relative;
  display: inline-block;
}

.ric-sw input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ric-sw-track {
  display: block;
  width: 38px;
  height: 21px;
  border-radius: 11px;
  background: var(--border);
  border: 1.5px solid #ccd3e4;
  transition: background .2s, border-color .2s;
  position: relative;
}

.ric-sw-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
  transition: transform .2s;
}

.ric-sw input:checked+.ric-sw-track {
  background: var(--navy);
  border-color: var(--navy);
}

.ric-sw input:checked+.ric-sw-track .ric-sw-thumb {
  transform: translateX(17px);
}

.ric-sw-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
  transition: color .15s;
}

.ric-sw input:checked~.ric-sw-label {
  color: var(--text);
  font-weight: 600;
}

/* ═══ RESULTS (RIGHT) ═══ */
.ric-results {
  background: var(--bg);
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Summary cards */
.ric-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ric-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 15px 17px;
  box-shadow: var(--sh-sm);
}

.ric-card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 7px;
}

.ric-card-val {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -.01em;
}

/* Accordion panels */
.ric-panel {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}

.ric-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  background: var(--navy);
  cursor: pointer;
  user-select: none;
  transition: background .15s;
  gap: 10px;
}

.ric-panel-head:hover {
  background: var(--navy-dark);
}

.ric-panel-head>span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--white);
  flex: 1;
}

.ric-caret {
  width: 14px;
  height: 8px;
  color: var(--gold-muted);
  flex-shrink: 0;
  transition: transform .22s ease;
}

.ric-caret.flipped {
  transform: rotate(180deg);
}

.ric-panel-body {
  padding: 16px 14px 12px;
}

.ric-chart-box {
  position: relative;
  width: 100%;
}

.ric-chart-box canvas {
  max-height: 300px;
  width: 100% !important;
}

/* Disclaimer */
.ric-disclaimer {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 400;
}