/**
 * AFROTOOLS — PAYE Calculator Shared Styles
 * Used by Nigeria, Kenya, Ghana, South Africa, Egypt, Tanzania PAYE tools
 * ═══════════════════════════════════════════════════════════
 */

/* ── FOUNDATION ── */
.tool-page { background: var(--color-bg, #FAFAF8); min-height: 100vh; }
*, *::before, *::after { font-family: var(--font-body, 'DM Sans', system-ui, sans-serif); }

/* ── HERO ── */
.tool-hero { background: var(--color-bg-dark, #0A1628); padding: 36px 0 32px; border-bottom: 1px solid rgba(0,122,255,0.1); }
.tool-hero .container { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em; color: rgba(255,255,255,0.35); margin-bottom: 12px; }
.breadcrumb a { color: rgba(255,255,255,0.35); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { color: rgba(255,255,255,0.15); }
.tool-hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.15; color: #fff; margin-bottom: 10px; letter-spacing: -0.02em; }
.tool-hero h1 em { color: var(--color-primary); font-style: normal; }
.tool-hero-sub { font-size: 0.9rem; font-weight: 400; color: rgba(255,255,255,0.55); line-height: 1.65; max-width: 460px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 4px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; }
.badge-gold   { background: rgba(245,166,35,0.15); color: #F5A623; border: 1px solid rgba(245,166,35,0.3); }
.badge-green  { background: rgba(0,122,255,0.15); color: var(--color-primary); border: 1px solid rgba(0,122,255,0.3); }
.badge-blue   { background: rgba(52,152,219,0.15); color: #7ec8e3; border: 1px solid rgba(52,152,219,0.3); }
.badge-grey   { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.45); border: 1px solid rgba(255,255,255,0.12); }
.hero-meta { font-size: 0.7rem; font-weight: 400; color: rgba(255,255,255,0.25); margin-top: 4px; }

/* ── REGIME TABS ── */
.regime-bar { background: #141c18; border-bottom: 1px solid rgba(255,255,255,0.07); }
.regime-bar .container { display: flex; }
.regime-tab { flex: 1; padding: 14px 20px; font-size: 0.8rem; font-weight: 700; border: none; background: transparent; cursor: pointer; color: rgba(255,255,255,0.35); border-bottom: 3px solid transparent; transition: all 0.18s; text-align: center; }
.regime-tab small { display: block; font-size: 0.65rem; font-weight: 400; margin-top: 2px; opacity: 0.65; }
.regime-tab:hover { color: rgba(255,255,255,0.65); }
.regime-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.regime-notice { background: rgba(52,152,219,0.08); border-bottom: 1px solid rgba(52,152,219,0.18); padding: 10px 0; display: none; }
.regime-notice.on { display: block; }
.regime-notice p { font-size: 0.78rem; font-weight: 400; color: rgba(255,255,255,0.5); }
.regime-notice strong { color: #7ec8e3; font-weight: 600; }

/* ── LAYOUT ── */
.tool-main { padding: 24px 0 60px; }
.tool-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }

/* ── CARD BASE ── */
.card { background: #ffffff; border: 1px solid #E2E8F0; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 8px rgba(0,0,0,0.05); }
.card-head { padding: 16px 22px; border-bottom: 1px solid #E2E8F0; display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #3D5A80; }
.card-sub   { font-size: 0.72rem; font-weight: 400; color: #8B9CB8; }
.card-body  { padding: 22px; }

/* ── FORM FIELDS ── */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.f-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.f-label-text { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; color: #2D3A5A; }
.f-hint { font-size: 0.72rem; font-weight: 400; color: #8B9CB8; }
.f-wrap { position: relative; display: flex; align-items: center; }
.f-prefix { position: absolute; left: 12px; font-size: 0.85rem; font-weight: 600; color: #8B9CB8; pointer-events: none; z-index: 1; }
.f-suffix { position: absolute; right: 12px; font-size: 0.75rem; font-weight: 600; color: #8B9CB8; pointer-events: none; }
.f-input {
  width: 100%; padding: 11px 13px 11px 36px;
  background: #F4F7FA; border: 1.5px solid #CBD5E1; border-radius: 7px;
  font-size: 1rem; font-weight: 600; color: #1E293B; outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  -moz-appearance: textfield;
}
.f-input::-webkit-outer-spin-button,
.f-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.f-input:focus { border-color: var(--color-primary); background: #fff; box-shadow: 0 0 0 3px rgba(0,122,255,0.1); }
.f-input.no-pfx { padding-left: 13px; }
.f-input.has-suffix { padding-right: 44px; }
.f-note { font-size: 0.7rem; font-weight: 400; color: #7ec8e3; margin-top: 5px; line-height: 1.5; }

/* ── QUICK PRESETS ── */
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.preset-btn {
  padding: 6px 12px; border-radius: 5px; font-size: 0.7rem; font-weight: 700;
  background: #F0F5FF; border: 1.5px solid #CBD5E1; color: #3D5A80;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.preset-btn:hover { border-color: var(--color-primary); background: #E8EFF8; }
.preset-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ── CALC MODE TOGGLE ── */
.mode-toggle { display: flex; gap: 4px; background: #F0F5FF; padding: 3px; border-radius: 7px; margin-bottom: 16px; }
.mode-btn { flex: 1; padding: 8px 12px; font-size: 0.72rem; font-weight: 700; border: none; background: transparent; border-radius: 5px; cursor: pointer; color: #8B9CB8; transition: all 0.15s; text-align: center; }
.mode-btn.on { background: #fff; color: var(--color-primary); box-shadow: 0 1px 5px rgba(0,0,0,0.09); }

/* ── TOGGLES (DEDUCTIONS) ── */
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tog {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px;
  background: #F4F7FA; border: 1.5px solid #CBD5E1; border-radius: 7px;
  cursor: pointer; transition: all 0.15s; user-select: none;
}
.tog:hover { border-color: var(--color-primary); }
.tog.on { border-color: var(--color-primary); background: #EFF6FF; }
.tog-box { width: 17px; height: 17px; flex-shrink: 0; border: 2px solid #B0C4DE; border-radius: 4px; background: #fff; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.tog.on .tog-box { background: var(--color-primary); border-color: var(--color-primary); }
.tog-box svg { display: none; }
.tog.on .tog-box svg { display: block; }
.tog-label { font-size: 0.72rem; font-weight: 700; color: #2D3A5A; line-height: 1.3; }
.tog-rate { font-size: 0.65rem; font-weight: 500; color: #8B9CB8; }

/* ── SLIDER ── */
.slider-wrap { margin: 0 0 16px; }
.slider-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.slider-label { font-size: 0.75rem; font-weight: 700; color: #2D3A5A; }
.slider-val { font-size: 0.9rem; font-weight: 800; color: var(--color-primary); }
input[type=range] {
  -webkit-appearance: none; width: 100%; height: 5px;
  background: #CBD5E1; border-radius: 3px; outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  background: var(--color-primary); border-radius: 50%; border: 2.5px solid #fff;
  box-shadow: 0 1px 6px rgba(0,122,255,0.35); cursor: pointer;
}
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; background: var(--color-primary); border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 6px rgba(0,122,255,0.35); cursor: pointer; }
input[type=range]::-moz-range-track { height: 5px; border-radius: 3px; background: transparent; border: none; }

/* ── CALC BUTTON ── */
.calc-btn {
  width: 100%; padding: 14px; background: var(--color-primary); color: #fff;
  border: none; border-radius: 7px; font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.03em; cursor: pointer; transition: all 0.18s; margin-top: 6px;
}
.calc-btn:hover { background: #2563EB; transform: translateY(-1px); box-shadow: 0 5px 18px rgba(0,122,255,0.28); }
.calc-btn:active { transform: translateY(0); }

/* ── RESULTS ── */
.results-card { display: none; margin-top: 18px; }
.results-card.on { display: block; }
.res-hero { background: var(--color-bg-dark, #0A1628); padding: 24px; text-align: center; border-radius: 10px 10px 0 0; }
.res-hero-label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 6px; }
.res-hero-amount { font-size: clamp(2.2rem, 4.5vw, 3rem); font-weight: 800; color: var(--color-primary); letter-spacing: -0.02em; line-height: 1; }
.res-hero-period { font-size: 0.78rem; font-weight: 400; color: rgba(255,255,255,0.35); margin-top: 5px; }
.res-hero-gross  { font-size: 0.75rem; font-weight: 400; color: rgba(255,255,255,0.28); margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); }

/* ── PERIOD TOGGLE ── */
.period-row { display: flex; gap: 4px; background: #F0F5FF; padding: 4px; border-radius: 7px; margin-bottom: 16px; }
.per-btn { flex: 1; padding: 8px; font-size: 0.72rem; font-weight: 700; border: none; background: transparent; border-radius: 5px; cursor: pointer; color: #8B9CB8; transition: all 0.15s; }
.per-btn.on { background: #fff; color: var(--color-primary); box-shadow: 0 1px 5px rgba(0,0,0,0.09); }

/* ── RESULT ROWS ── */
.res-body { padding: 20px 22px; }
.res-section { margin-bottom: 16px; }
.res-section-title { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #8B9CB8; margin-bottom: 8px; padding-bottom: 7px; border-bottom: 1px solid #E2E8F0; }
.res-row { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; font-size: 0.85rem; font-weight: 400; }
.res-row + .res-row { border-top: 1px solid #F1F5F9; }
.res-row-lbl { color: #3D5A80; font-weight: 400; }
.res-row-val { font-weight: 700; color: #1E293B; font-variant-numeric: tabular-nums; }
.red  { color: #c0392b !important; }
.grn  { color: var(--color-primary) !important; }
.muted{ color: #8B9CB8 !important; }
.res-row.total { border-top: 2px solid #CBD5E1 !important; margin-top: 4px; padding-top: 10px; }
.res-row.total .res-row-lbl { font-weight: 700; color: #1E293B; }
.res-row.total .res-row-val { font-size: 1.05rem; font-weight: 800; }

/* ── RATE BARS ── */
.rate-bar-wrap { margin: 14px 0; }
.rate-bar-hdr { display: flex; justify-content: space-between; margin-bottom: 7px; }
.rate-bar-lbl { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #3D5A80; }
.rate-bar-pct { font-size: 0.9rem; font-weight: 800; color: #1E293B; }
.rate-track { height: 7px; background: #E2E8F0; border-radius: 4px; overflow: hidden; }
.rate-fill  { height: 100%; border-radius: 4px; transition: width 0.6s cubic-bezier(0.34,1.56,0.64,1); width: 0; }
.rate-fill.brand { background: var(--color-primary); }
.rate-fill.amber { background: #F5A623; }

/* ── EFFECTIVE + MARGINAL RATE ── */
.rates-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.rate-card { background: #F4F7FA; border-radius: 8px; padding: 12px 14px; text-align: center; }
.rate-card-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8B9CB8; margin-bottom: 4px; }
.rate-card-value { font-size: 1.4rem; font-weight: 800; color: var(--color-primary); }
.rate-card-desc { font-size: 0.68rem; color: #8B9CB8; margin-top: 2px; }

/* ── EXEMPT NOTICE ── */
.exempt-box { background: rgba(0,122,255,0.08); border: 1px solid rgba(0,122,255,0.25); border-radius: 6px; padding: 10px 13px; font-size: 0.78rem; font-weight: 500; color: #1E40AF; line-height: 1.5; }

/* ── COMPARE STRIP ── */
.compare-strip { background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: 7px; padding: 11px 14px; font-size: 0.78rem; font-weight: 400; color: #1E40AF; line-height: 1.55; display: none; margin-top: 10px; }
.compare-strip.on { display: block; }
.compare-strip strong { font-weight: 700; }

/* ── WHAT CHANGED ── */
.delta-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: 7px; padding: 12px 14px; font-size: 0.8rem; color: #92400e; line-height: 1.6; display: none; margin-top: 10px; }
.delta-box.on { display: block; }
.delta-box.better { background: #EFF6FF; border-color: #93C5FD; color: #1E40AF; }
.delta-box.worse { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* ── CHART SECTION ── */
.chart-section { padding: 0 22px 22px; }
.chart-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.chart-tab { padding: 8px 16px; font-size: 0.72rem; font-weight: 600; border: 1.5px solid #E2E8F0; background: transparent; border-radius: 6px; cursor: pointer; color: #64748B; transition: all 0.18s; }
.chart-tab:hover { color: #1E293B; border-color: #CBD5E1; background: #F8FAFC; }
.chart-tab.on { background: var(--color-primary, #007AFF); border-color: var(--color-primary, #007AFF); color: #fff; box-shadow: 0 2px 8px rgba(0,122,255,0.2); }
.chart-canvas-wrap { position: relative; height: 240px; }

/* ── EMPLOYER COST ── */
.employer-card { display: none; margin-top: 12px; }
.employer-card.on { display: block; }
.employer-cost-total { font-size: 1.1rem; font-weight: 800; color: var(--color-primary); text-align: center; padding: 8px 0; }

/* ── ACTION BUTTONS ── */
.action-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 0 22px 22px; }
.act-btn { padding: 10px; font-size: 0.72rem; font-weight: 700; border-radius: 6px; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid #CBD5E1; background: #F4F7FA; color: #3D5A80; }
.act-btn:hover { background: #E8EFF8; border-color: var(--color-primary); }
.act-btn.act-pdf { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }
.act-btn.act-pdf:hover { background: #DBEAFE; border-color: var(--color-primary); }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 16px; }

/* ── AI CARD ── */
.ai-card { background: #ffffff; border-radius: 10px; border: 1px solid #E2E8F0; border-top: 3px solid #007AFF; overflow: hidden; box-shadow: 0 1px 8px rgba(0,0,0,0.05); }
.ai-head { padding: 14px 18px; background: #ffffff; border-bottom: 1px solid #E2E8F0; display: flex; align-items: center; gap: 9px; }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: #007AFF; animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }
.ai-head-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: #0f172a; }
.ai-head-by { font-size: 0.65rem; font-weight: 400; color: #64748b; margin-left: auto; }
.ai-body { padding: 16px 18px; background: #ffffff; }
.ai-status { font-size: 0.8rem; font-weight: 400; color: #64748b; line-height: 1.65; margin-bottom: 12px; }
.ai-response { font-size: 0.82rem; font-weight: 400; color: #0f172a; line-height: 1.7; display: none; }
.ai-response.on { display: block; }
.ai-response.typing::after { content: '\25CB'; animation: blink 1s infinite; color: #007AFF; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.ai-btn { width: 100%; padding: 11px; background: #007AFF; border: none; border-radius: 6px; color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; transition: all 0.18s; margin-top: 12px; }
.ai-btn:hover { background: #0062d6; }
.ai-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ai-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ai-suggest-btn { padding: 5px 10px; font-size: 0.68rem; font-weight: 600; background: transparent; border: 1px solid #CBD5E1; border-radius: 20px; color: #64748b; cursor: pointer; transition: all 0.15s; }
.ai-suggest-btn:hover { background: #F1F5F9; border-color: #007AFF; color: #007AFF; }
.ai-chat { display: none; margin-top: 12px; border-top: 1px solid #E2E8F0; padding-top: 12px; }
.ai-chat.on { display: block; }
.chat-msgs { max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 9px; scrollbar-width: thin; scrollbar-color: #CBD5E1 transparent; }
.msg { font-size: 0.78rem; font-weight: 400; line-height: 1.6; padding: 8px 11px; border-radius: 6px; }
.msg.u { background: #007AFF; color: #fff; align-self: flex-end; max-width: 85%; }
.msg.a { background: #F1F5F9; color: #1e293b; align-self: flex-start; max-width: 95%; }
.chat-row { display: flex; gap: 6px; }
.chat-in { flex: 1; padding: 8px 11px; background: #F8FAFD; border: 1px solid #E2E8F0; border-radius: 5px; font-size: 0.78rem; font-weight: 400; color: #1e293b; outline: none; }
.chat-in::placeholder { color: #94a3b8; }
.chat-in:focus { border-color: #007AFF; }
.chat-send { padding: 8px 13px; background: #007AFF; border: none; border-radius: 5px; color: #fff; cursor: pointer; font-weight: 700; }

/* ── BANDS CARD ── */
.bands-card .card-head { cursor: pointer; user-select: none; }
.tog-arrow { font-size: 0.8rem; color: #8B9CB8; transition: transform 0.2s; }
.tog-arrow.open { transform: rotate(180deg); }
.bands-body { display: none; padding: 14px 18px; }
.bands-body.open { display: block; }
.band-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.8rem; }
.band-row + .band-row { border-top: 1px solid #F1F5F9; }
.band-range { color: #3D5A80; font-weight: 400; }
.band-rate  { font-weight: 700; color: var(--color-primary); }
.band-zero  { color: #8B9CB8; }
.band-note  { font-size: 0.7rem; font-weight: 400; color: #8B9CB8; margin-top: 10px; line-height: 1.55; }

/* ── BAND WATERFALL ── */
.waterfall-bar { display: flex; height: 24px; border-radius: 4px; overflow: hidden; margin: 12px 0; }
.waterfall-seg { display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 700; color: #fff; min-width: 2px; transition: width 0.5s ease; }

/* ── COLLAPSIBLE BAND TABLE ── */
.band-detail-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; margin: 8px 0; }
.band-detail-table th { text-align: left; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8B9CB8; padding: 4px 6px; border-bottom: 1.5px solid #E2E8F0; }
.band-detail-table td { padding: 5px 6px; border-bottom: 1px solid #F1F5F9; font-variant-numeric: tabular-nums; }
.band-detail-table td:first-child { color: #3D5A80; }
.band-detail-table td:last-child { text-align: right; font-weight: 600; }
.band-detail-table .cum { color: #8B9CB8; }

/* ── DISCLAIMER ── */
.disclaimer { font-size: 0.71rem; font-weight: 400; color: #8B9CB8; line-height: 1.6; padding: 13px 16px; background: #F4F7FA; border: 1px solid #D1D9E6; border-radius: 8px; }
.disclaimer strong { font-weight: 600; color: #3D5A80; }

/* ── COLLAPSIBLE LEGAL / REFERENCE SECTIONS ── */
.legal-basis, .band-reference { margin-top: 24px; border: 1px solid var(--color-border, #E2E8F0); border-radius: 12px; overflow: hidden; }
.legal-basis summary, .band-reference summary { padding: 14px 20px; font-weight: 600; cursor: pointer; background: var(--color-bg-subtle, #F1F5F9); font-size: 0.82rem; color: #3D5A80; list-style: none; display: flex; align-items: center; gap: 8px; transition: background 0.15s; }
.legal-basis summary:hover, .band-reference summary:hover { background: #E8EFF8; }
.legal-basis summary::-webkit-details-marker, .band-reference summary::-webkit-details-marker { display: none; }
.legal-basis summary::after, .band-reference summary::after { content: '+'; margin-left: auto; font-size: 1.1rem; font-weight: 700; color: #94A3B8; transition: transform 0.2s; }
.legal-basis[open] summary::after, .band-reference[open] summary::after { content: '-'; }
.legal-content, .band-reference table { padding: 16px 20px; font-size: 0.78rem; color: var(--color-text-secondary, #64748B); line-height: 1.7; }
.legal-content ul { padding-left: 18px; margin: 6px 0; }
.legal-content li { margin-bottom: 4px; }

/* ── INFO BANNER (for update notices) ── */
.info-banner { background: rgba(0,122,255,0.06); border: 1px solid rgba(0,122,255,0.15); border-radius: 10px; padding: 12px 18px; font-size: 0.8rem; color: #1E40AF; line-height: 1.6; margin-bottom: 16px; }
.info-banner strong { font-weight: 700; }
.info-banner a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.info-banner a:hover { text-decoration: underline; }

/* ── FAQ ── */
.faq-sec { padding: 52px 0; background: #fff; border-top: 1px solid #E2E8F0; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.faq-item { padding: 18px 20px; background: #F4F7FA; border: 1px solid #D1D9E6; border-radius: 8px; }
.faq-q { font-size: 0.85rem; font-weight: 700; color: #1E293B; margin-bottom: 7px; line-height: 1.4; }
.faq-a { font-size: 0.82rem; font-weight: 400; color: #3D5A80; line-height: 1.7; }

/* ── SECTION LABELS ── */
.eyebrow { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-primary); margin-bottom: 6px; }
.sec-title { font-size: clamp(1.3rem, 2.5vw, 1.7rem); font-weight: 800; color: #1E293B; letter-spacing: -0.02em; }

/* ── CONDITIONAL FIELDS ── */
.cond-field { display: none; }
.cond-field.on { display: block; }

/* ── SKELETON LOADING ── */
.skeleton { background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%); background-size: 200% 100%; animation: skeleton-shine 1.5s ease-in-out infinite; border-radius: 6px; }
@keyframes skeleton-shine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── PRINT ── */
@media print {
  .tool-hero, .regime-bar, .regime-notice, .sidebar, .action-row, .chart-section,
  .faq-sec, .compare-strip, .delta-box, afro-navbar, afro-footer, .calc-btn,
  .slider-wrap, .presets, .mode-toggle, .ai-card, .employer-card { display: none !important; }
  .tool-grid { grid-template-columns: 1fr !important; }
  .results-card { display: block !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
  body { background: #fff !important; }
}

/* ── DARK MODE ── */
@media (prefers-color-scheme: dark) {
  .tool-page { background: #0B1120; }
  .card { background: #131D2E; border-color: #1E2D40; }
  .card-head { border-color: #1E2D40; }
  .card-title { color: #8B9CB8; }
  .f-label-text { color: #A8B8D0; }
  .f-input { background: #111D30; border-color: #1E2D40; color: #E2E8F0; }
  .f-input:focus { background: #1E293B; }
  .tog { background: #111D30; border-color: #1E2D40; }
  .tog.on { background: #111D30; border-color: var(--color-primary); }
  .tog-label { color: #A8B8D0; }
  .res-body { background: #131D2E; }
  .res-row-lbl { color: #8B9CB8; }
  .res-row-val { color: #E2E8F0; }
  .res-section-title { color: #5A6F8A; border-color: #1E2D40; }
  .res-row + .res-row { border-color: #1E2D40; }
  .faq-sec { background: #0B1120; border-color: #1E2D40; }
  .faq-item { background: #131D2E; border-color: #1E2D40; }
  .faq-q { color: #E2E8F0; }
  .faq-a { color: #8B9CB8; }
  .disclaimer { background: #111D30; border-color: #1E2D40; color: #5A6F8A; }
  .rate-card { background: #111D30; }
  .period-row { background: #111D30; }
  .per-btn { color: #5A6F8A; }
  .per-btn.on { background: #1E293B; color: var(--color-primary); }
  .preset-btn { background: #111D30; border-color: #1E2D40; color: #8B9CB8; }
  .compare-strip { background: #111D30; border-color: #1E2D40; color: #8B9CB8; }
  .band-row { border-color: #1E2D40 !important; }
  .band-range { color: #8B9CB8; }
  /* AI card dark overrides */
  .ai-card { background: #131D2E; border-color: #1E2D40; border-top-color: #007AFF; }
  .ai-head { background: #131D2E; border-color: #1E2D40; }
  .ai-head-title { color: #E2E8F0; }
  .ai-head-by { color: #8B9CB8; }
  .ai-body { background: #131D2E; }
  .ai-status { color: #8B9CB8; }
  .ai-response { color: #c9d1d9; }
  .ai-suggest-btn { border-color: #1E2D40; color: #8B9CB8; }
  .ai-suggest-btn:hover { background: #1E293B; border-color: #007AFF; color: #007AFF; }
  .ai-chat { border-color: #1E2D40; }
  .msg.a { background: #1E293B; color: #c9d1d9; }
  .chat-in { background: #111D30; border-color: #1E2D40; color: #E2E8F0; }
  .chat-in::placeholder { color: #5A6F8A; }
}

/* ── RESPONSIVE ── */
@media (max-width: 880px) {
  .tool-grid { grid-template-columns: 1fr; }
  .faq-grid  { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .toggles { grid-template-columns: 1fr 1fr; }
  .card-body { padding: 16px; }
  .res-body  { padding: 16px; }
  .action-row { grid-template-columns: 1fr 1fr; }
  .rates-grid { grid-template-columns: 1fr; }
}
