
#hrsc-calc {
  --charcoal: #808183;
  --white: #ffffff;
  --amber: #e3a450;
  --blue: #2970b0;
  --blue-dark: #1d5a96;
  --blue-light: #eef4fb;
  --surface: #f7f8f9;
  --border: #e2e4e7;
  --text: #2d2e30;
  --text-muted: #808183;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  max-width: 820px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 40px rgba(41,112,176,0.12);
}
#hrsc-calc *, #hrsc-calc *::before, #hrsc-calc *::after { box-sizing: border-box; }
#hrsc-calc .calc-header {
  background: var(--blue); padding: 28px 36px;
  display: flex; align-items: center; gap: 16px;
}
#hrsc-calc .calc-header-icon {
  width: 44px; height: 44px; background: rgba(255,255,255,0.15);
  border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
#hrsc-calc .calc-header-icon svg { width: 22px; height: 22px; fill: white; }
#hrsc-calc .calc-header h2 {
  font-family: 'DM Serif Display', serif; font-size: 1.5rem; font-weight: 400;
  color: white; line-height: 1.2; margin: 0; padding: 0; border: none;
}
#hrsc-calc .calc-header p { font-size: 0.82rem; color: rgba(255,255,255,0.75); margin: 2px 0 0; padding: 0; }
#hrsc-calc .calc-tabs {
  display: flex; background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 36px; gap: 4px; margin: 0;
}
#hrsc-calc .calc-tab {
  padding: 14px 20px; font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
  cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all 0.2s; font-family: 'DM Sans', sans-serif;
  border-radius: 0; box-shadow: none;
}
#hrsc-calc .calc-tab:hover { color: var(--blue); background: none; }
#hrsc-calc .calc-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
#hrsc-calc .calc-body { padding: 32px 36px; }
#hrsc-calc .calc-section { display: none; }
#hrsc-calc .calc-section.active { display: block; }
#hrsc-calc .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
#hrsc-calc .field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
#hrsc-calc .field label {
  font-size: 0.8rem; font-weight: 500; color: var(--text-muted);
  letter-spacing: 0.03em; text-transform: uppercase; display: block; margin: 0;
}
#hrsc-calc .field-input-wrap { position: relative; }
#hrsc-calc .field-prefix, #hrsc-calc .field-suffix {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 0.88rem; font-weight: 500; color: var(--text-muted); pointer-events: none; margin: 0;
}
#hrsc-calc .field-prefix { left: 12px; }
#hrsc-calc .field-suffix { right: 12px; }
#hrsc-calc .field input, #hrsc-calc .field select {
  width: 100%; padding: 11px 14px; font-size: 0.92rem;
  font-family: 'DM Sans', sans-serif; border: 1.5px solid var(--border);
  border-radius: 8px; background: var(--white); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s; outline: none; margin: 0;
  box-shadow: none; -webkit-appearance: auto;
}
#hrsc-calc .field input:focus, #hrsc-calc .field select:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(41,112,176,0.1); outline: none;
}
#hrsc-calc .field input.has-prefix { padding-left: 28px; }
#hrsc-calc .field input.has-suffix { padding-right: 36px; }
#hrsc-calc .divider { height: 1px; background: var(--border); margin: 24px 0; }
#hrsc-calc .section-label {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--charcoal); margin-bottom: 14px;
}
#hrsc-calc .calc-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px;
  background: var(--blue); color: white; font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem; font-weight: 600; border: none; border-radius: 8px;
  cursor: pointer; transition: background 0.2s, transform 0.1s;
  margin-top: 8px; text-decoration: none; box-shadow: none;
}
#hrsc-calc .calc-btn:hover { background: var(--blue-dark); color: white; text-decoration: none; }
#hrsc-calc .calc-btn:active { transform: scale(0.98); }
#hrsc-calc .calc-btn-secondary {
  background: transparent; color: var(--blue); border: 1.5px solid var(--blue);
}
#hrsc-calc .calc-btn-secondary:hover { background: var(--blue-light); color: var(--blue); }
#hrsc-calc .btn-row { display: flex; gap: 12px; align-items: center; margin-top: 24px; }
#hrsc-calc .results-panel {
  background: var(--blue-light); border-radius: 12px; padding: 24px; margin-top: 28px; display: none;
}
#hrsc-calc .results-panel.visible { display: block; }
#hrsc-calc .results-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
#hrsc-calc .results-header h3 {
  font-family: 'DM Serif Display', serif; font-size: 1.15rem; font-weight: 400;
  color: var(--blue); margin: 0; padding: 0; border: none;
}
#hrsc-calc .results-badge {
  background: var(--blue); color: white; font-size: 0.72rem; font-weight: 600;
  padding: 4px 10px; border-radius: 20px; letter-spacing: 0.05em; text-transform: uppercase;
}
#hrsc-calc .results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
#hrsc-calc .result-card {
  background: white; border-radius: 10px; padding: 16px 18px;
  border: 1px solid rgba(41,112,176,0.12);
}
#hrsc-calc .result-card.highlight { background: var(--blue); border-color: transparent; }
#hrsc-calc .result-card.highlight .result-label { color: rgba(255,255,255,0.75); }
#hrsc-calc .result-card.highlight .result-value { color: white; }
#hrsc-calc .result-card.amber-highlight { background: var(--amber); border-color: transparent; }
#hrsc-calc .result-card.amber-highlight .result-label { color: rgba(255,255,255,0.8); }
#hrsc-calc .result-card.amber-highlight .result-value { color: white; }
#hrsc-calc .result-label {
  font-size: 0.75rem; font-weight: 500; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px;
}
#hrsc-calc .result-value { font-size: 1.35rem; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
#hrsc-calc .result-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }
#hrsc-calc .breakdown-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
#hrsc-calc .breakdown-table tr { border-bottom: 1px solid rgba(41,112,176,0.08); }
#hrsc-calc .breakdown-table tr:last-child { border-bottom: none; }
#hrsc-calc .breakdown-table td { padding: 9px 12px; color: var(--text); border: none; background: transparent; }
#hrsc-calc .breakdown-table td:last-child { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
#hrsc-calc .breakdown-table tr.deduction td { color: #c0392b; }
#hrsc-calc .breakdown-table tr.deduction td:first-child { color: var(--text-muted); }
#hrsc-calc .breakdown-table tr.total-row td { font-weight: 700; font-size: 0.92rem; color: var(--blue); padding-top: 12px; }
#hrsc-calc .breakdown-wrap {
  background: white; border-radius: 10px; border: 1px solid rgba(41,112,176,0.12);
  overflow: hidden; margin-top: 12px;
}
#hrsc-calc .disclaimer {
  font-size: 0.72rem; color: var(--text-muted); margin-top: 16px; line-height: 1.5;
  padding-top: 14px; border-top: 1px solid rgba(41,112,176,0.12);
}
#hrsc-calc .toggle-field {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface); border-radius: 8px; border: 1.5px solid var(--border);
}
#hrsc-calc .toggle-field span { font-size: 0.88rem; color: var(--text); flex: 1; }
#hrsc-calc .toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; margin: 0; }
#hrsc-calc .toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
#hrsc-calc .toggle-slider {
  position: absolute; inset: 0; background: var(--border);
  border-radius: 11px; cursor: pointer; transition: background 0.2s;
}
#hrsc-calc .toggle-slider::before {
  content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px;
  background: white; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
#hrsc-calc .toggle input:checked + .toggle-slider { background: var(--blue); }
#hrsc-calc .toggle input:checked + .toggle-slider::before { transform: translateX(18px); }
@media (max-width: 600px) {
  #hrsc-calc .calc-header { padding: 22px 20px; }
  #hrsc-calc .calc-tabs { padding: 0 20px; }
  #hrsc-calc .calc-body { padding: 24px 20px; }
  #hrsc-calc .form-grid { grid-template-columns: 1fr; }
  #hrsc-calc .results-grid { grid-template-columns: 1fr; }
}
