/* ════════════════════════════════════════════════════════════
   tools/retirement/style.css
   Theme: Earth — warm camel/brown · long-term, secure, grounded
   Primary: --e-brown-warm #B08968
   ════════════════════════════════════════════════════════════ */

body.tool-retirement { overflow-x: hidden; }
body.tool-retirement {
  --primary:       #B08968;
  --primary-dark:  #8E6E50;
  --primary-deep:  #5C4632;
  --primary-bg:    #FAF4EC;
  --primary-mid:   #F0E4D2;
  --primary-tint:  rgba(176, 137, 104, 0.12);
  --primary-soft:  #E8DECC;

  --page-bg:       #F8F4ED;
  --card-bg:       #FFFFFF;
  --card-soft:     #FBF7EF;

  --ink:           #2A2218;
  --text:          #3D3327;
  --muted:         #8A7A66;
  --faint:         #C2B49E;
  --hairline:      #E8DECC;
  --hairline-2:    #D5C5AB;

  --danger:        #B85040;
  --success:       #5F8B5A;

  --r-card:        16px;
  --r-input:       12px;
  --r-pill:        999px;
  --shadow-soft:   0 1px 2px rgba(60,40,20,.04), 0 12px 32px -20px rgba(60,40,20,.10);

  background: var(--page-bg);
  color: var(--text);
}

body.tool-retirement .container {
  max-width: 1100px;
  padding: 1.25rem 1.25rem 3rem;
}

/* ─── Back link ──────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 1.5rem;
  padding: 8px 16px;
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  transition: color .15s, border-color .15s;
}
.back-link:hover { color: var(--primary-dark); border-color: var(--primary); }

/* ─── HERO BANNER ─────────────────────────────────────────── */
.hero-banner {
  position: relative;
  background:
    linear-gradient(135deg, var(--primary-bg) 0%, #F5EBE0 100%);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 44px);
  margin-bottom: clamp(28px, 4vw, 40px);
  overflow: hidden;
}
.hero-banner::before {
  /* sun/horizon mark */
  content: "";
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(176,137,104,.18) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  z-index: 1;
}
.hero-icon {
  width: 72px;
  height: 72px;
  background: var(--primary);
  color: #fff;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px -8px rgba(176,137,104,.5);
}
.hero-body { flex: 1; min-width: 280px; }
.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
  letter-spacing: -.025em;
  line-height: 1.15;
}
.hero-platform {
  font-size: .55em;
  color: var(--primary-dark);
  background: var(--primary-tint);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  vertical-align: middle;
  font-weight: 600;
  margin-left: 6px;
}
.hero-tagline {
  font-size: 16px;
  color: var(--text);
  margin: 0 0 20px;
  line-height: 1.6;
}
.hero-tagline strong { color: var(--primary-deep); font-weight: 600; }
.hero-stats {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.hero-stats li {
  display: flex;
  flex-direction: column;
}
.hero-stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.hero-stat-lbl {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}

/* ─── 2-COLUMN LAYOUT ────────────────────────────────────── */
.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}
.calc-layout > * { min-width: 0; }
@media (max-width: 980px) {
  .calc-layout { grid-template-columns: 1fr; }
}

/* ─── FORM ───────────────────────────────────────────────── */
.calc-form {
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: clamp(20px, 3vw, 32px);
}
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: -.015em;
}
.page-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.55;
}

.form-card { display: flex; flex-direction: column; gap: 20px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.005em;
}
.lbl-hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
}
.field-input {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 14px;
  background: var(--card-soft);
  border: 1.5px solid var(--hairline);
  border-radius: var(--r-input);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field-input:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px var(--primary-tint);
}
.field-prefix, .field-suffix {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
}
.field-input input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.field-input input::placeholder { color: var(--faint); }

/* segmented preset chips for monthly savings */
.preset-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.preset-chip {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  background: #fff;
  color: var(--muted);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all .15s;
}
.preset-chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.preset-chip.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -.005em;
  cursor: pointer;
  margin-top: 8px;
  transition: background .15s, transform .05s, box-shadow .15s;
  box-shadow: 0 6px 18px -6px rgba(176,137,104,.5);
}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }

/* ─── RESULT COLUMN ──────────────────────────────────────── */
.calc-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.calc-form { min-width: 0; }
.result-empty {
  background: var(--card-bg);
  border: 1px dashed var(--hairline-2);
  border-radius: var(--r-card);
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-icon { font-size: 40px; margin-bottom: 12px; }

/* Status big-card */
.status-card {
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: clamp(20px, 3vw, 32px);
  position: relative;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}
.status-card.is-ok {
  background: linear-gradient(135deg, #F2F5E9 0%, #E8EFD8 100%);
  border-color: #C8D3A8;
}
.status-card.is-short {
  background: linear-gradient(135deg, #FCEEE6 0%, #F7DBC8 100%);
  border-color: #E8C3A0;
}
.status-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.status-headline {
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  letter-spacing: -.015em;
}
.status-amount {
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.status-amount .currency {
  font-size: .55em;
  font-weight: 500;
  color: var(--muted);
  margin-right: 4px;
}
.status-amount.is-positive { color: var(--success); }
.status-amount.is-negative { color: var(--danger); }
.status-sub {
  font-size: 14px;
  color: var(--text);
  margin: 8px 0 0;
  line-height: 1.5;
}
.status-sub strong { color: var(--primary-deep); font-weight: 600; }

/* Progress bar */
.progress-track {
  margin-top: 18px;
  height: 12px;
  background: rgba(255,255,255,.6);
  border-radius: var(--r-pill);
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: inherit;
  transition: width .6s cubic-bezier(.2,.7,.2,1);
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

/* Breakdown card */
.detail-card {
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: clamp(20px, 3vw, 28px);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.detail-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px;
  letter-spacing: -.005em;
}
.detail-title svg { color: var(--primary); }
.breakdown {
  display: flex;
  flex-direction: column;
}
.break-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--hairline);
  min-width: 0;
}
.break-row:last-child { border-bottom: 0; }
.break-label { color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.break-value {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}
.break-row-subtotal {
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--primary-bg);
  border-radius: 10px;
  border-bottom: 0;
}
.break-row-subtotal .break-value { color: var(--primary-deep); }
.break-row-final {
  border-top: 2px solid var(--primary);
  border-bottom: 0;
  margin-top: 8px;
  padding-top: 14px;
}
.break-row-final .break-label { color: var(--ink); font-weight: 600; font-size: 15px; }
.break-row-final .break-value { color: var(--ink); font-size: 17px; font-weight: 700; }

/* Suggestion callout */
.suggestion-callout {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--primary-bg);
  border: 1px solid var(--primary-soft);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.suggestion-icon { font-size: 22px; flex-shrink: 0; line-height: 1; }
.suggestion-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  margin: 0;
}
.suggestion-text strong { color: var(--primary-deep); font-weight: 700; }

/* Copy action */
.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px;
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all .15s;
}
.action-btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.action-btn.is-success { background: var(--success); color: #fff; border-color: var(--success); }

/* ─── INFO ACCORDION + FAQ ───────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: clamp(40px, 5vw, 64px);
}
@media (max-width: 980px) { .info-grid { grid-template-columns: 1fr; gap: 24px; } }
.info-accordion-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  letter-spacing: -.005em;
  display: inline-block;
}

.info-acc {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
}
.info-acc summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 28px 18px 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  transition: color .15s;
}
.info-acc summary::-webkit-details-marker { display: none; }
.info-acc summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--muted);
  transition: transform .2s, color .2s;
}
.info-acc[open] summary { color: var(--primary-deep); font-weight: 600; }
.info-acc[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--primary); }
.info-acc-body {
  padding: 0 4px 20px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}
.info-acc-body p { margin: 0 0 12px; }
.info-acc-body p:last-child { margin-bottom: 0; }
.info-acc-body strong { color: var(--primary-deep); font-weight: 700; }

.rate-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rate-list li {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  align-items: baseline;
  font-size: 14px;
}
.rate-pct {
  flex-shrink: 0;
  min-width: 80px;
  padding: 3px 10px;
  background: var(--primary-bg);
  color: var(--primary-deep);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.formula {
  background: var(--primary-bg);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 8px 0 12px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.formula-row { font-variant-numeric: tabular-nums; }
.formula-row strong { color: var(--primary-deep); }

.glossary { margin: 0; }
.glossary dt {
  font-weight: 700;
  color: var(--ink);
  font-size: 14px;
  margin-top: 14px;
  padding-bottom: 4px;
}
.glossary dt:first-child { margin-top: 0; }
.glossary dd {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
}
.glossary dd strong { color: var(--primary-deep); }

.related-tools {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.related-tools a {
  color: var(--primary-deep);
  text-decoration: none;
  font-weight: 600;
}
.related-tools a:hover { text-decoration: underline; }

.faq-grid {
  display: flex;
  flex-direction: column;
}

.info-note {
  font-size: 13px;
  color: var(--muted);
  background: var(--card-soft);
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin: 10px 0 0;
}

/* ─── Responsive tweaks ──────────────────────────────────── */
@media (max-width: 560px) {
  .hero-stats { gap: 20px; }
  .hero-stat-num { font-size: 20px; }
  .info-grid { gap: 20px; }
}
