/* ============================================================
   OnlineConvers — Modern Tool & Calculator Design System
   Matches: online-convers.vercel.app aesthetic
   ============================================================ */

/* ── 1. LAYOUT & SHELL ─────────────────────────────────────── */
.cat-shell,
.calc-shell,
.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  width: 100%;
}

.cat-breadcrumb,
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding: 0;
  list-style: none;
}

.cat-breadcrumb a,
.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.cat-breadcrumb a:hover,
.breadcrumbs a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.cat-breadcrumb .bc-sep,
.breadcrumbs-separator {
  color: var(--border-strong);
  user-select: none;
}

.cat-breadcrumb .bc-cur {
  color: var(--text-primary);
  font-weight: 600;
}

.cat-body-modern,
.calc-content-wrap {
  width: 100%;
  min-width: 0;
}

/* ── 2. CALCULATOR GRID (2-COLUMN INTERACTIVE ENGINE) ──────── */
.calculator-grid,
.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 40px;
}

@media (min-width: 860px) {
  .calculator-grid,
  .calc-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 28px;
  }
}

/* ── 3. CARDS & PANELS ─────────────────────────────────────── */
.card,
.input-panel,
.calculator-card,
.results-card,
.cat-section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease;
}

.panel-header {
  margin-bottom: 20px;
}

.panel-header h1,
.input-panel h1,
.calculator-card h1 {
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 8px;
}

.panel-header p,
.input-panel p,
.calculator-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}

.math-badge,
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
  background: var(--bg-tint);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

/* ── 4. FORM GROUPS & INPUT CONTROLS ───────────────────────── */
.input-group,
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  position: relative;
}

.group-label,
.form-label,
label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calc-input,
.form-input,
input[type="number"],
input[type="text"],
select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.calc-input:focus,
.form-input:focus,
input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 124, 250, 0.2);
}

.input-unit {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

.input-hint,
.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* ── 5. ACTION BUTTONS ─────────────────────────────────────── */
.calc-btn-primary,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  background: var(--brand);
  color: #ffffff !important;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 24px;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 2px 4px rgba(36, 59, 143, 0.2);
}

.calc-btn-primary:hover,
.btn-primary:hover {
  background: var(--brand-hover);
}

.calc-btn-primary:active,
.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary,
.calc-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 20px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover,
.calc-btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

/* ── 6. STICKY RESULT PANEL & OUTPUT CONTAINER ─────────────── */
.result-sticky-wrap,
.output-container {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-panel,
.card.result-panel,
.net-pay-card {
  background: var(--result-bg) !important;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.net-pay-header h3,
.result-title,
#res-header {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 8px;
}

.net-pay-amount-wrapper,
.result-value-wrap {
  margin: 12px 0 16px;
}

.net-pay-amount-wrapper .amount,
.result-value,
#result-value {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  color: var(--brand);
  line-height: 1.15;
  display: block;
}

.net-pay-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 0;
}

.pay-breakdown,
#result-breakdown {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.pay-breakdown li,
#result-breakdown li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}

.pay-breakdown li:last-child,
#result-breakdown li:last-child {
  border-bottom: none;
}

.pay-breakdown li strong,
#result-breakdown li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.result-error,
#result-error {
  background: #fee2e2;
  border: 1px solid #f87171;
  color: #991b1b;
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
}

/* Paystub Step Breakdown */
.paystub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.paystub-header .stub-co h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.paystub-header .stub-co p {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.stub-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text-secondary);
  font-size: 14px;
}

.stub-row.header-row {
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.stub-row span {
  flex: 1;
}

.stub-row span.align-right,
.stub-row span:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--text-primary);
}

.paystub-totals {
  border-top: 1px solid var(--border-strong);
  margin-top: 14px;
  padding-top: 12px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  color: var(--text-primary);
}

.total-row strong {
  font-size: 18px;
  color: var(--brand);
}

/* ── 7. FORMULA & METHODOLOGY ──────────────────────────────── */
.formula-card {
  margin-top: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.formula-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.formula-expression,
.formula-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0;
}

/* ── 8. RICH EDITORIAL & SEO CONTENT ───────────────────────── */
.rich-content-container,
.tool-content-section {
  margin-top: 48px;
}

.intro-lead-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.intro-lead-card p {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.section-separator {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.content-section {
  margin-bottom: 40px;
}

.content-section h2 {
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.content-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.content-section p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 16px;
}

.example-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(11, 16, 32, 0.04);
}

.example-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.step-list {
  padding-left: 20px;
  margin: 12px 0 16px;
}

.step-list li {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.reference-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.reference-table th,
.reference-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.reference-table th {
  background: var(--bg-tint);
  color: var(--brand);
  font-weight: 700;
}

.reference-table tr:nth-child(even) td {
  background: var(--bg-subtle);
}

.reference-table tr:last-child td {
  border-bottom: none;
}

/* ── 9. CONTENT INFO (ci-*) SECTIONS ──────────────────────── */
.calc-info-wrap {
  margin-top: 40px;
}

.ci-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(11, 16, 32, 0.04);
}

.ci-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.ci-icon {
  font-size: 22px;
  line-height: 1;
}

.ci-steps {
  padding-left: 20px;
  margin: 12px 0;
}

.ci-steps li {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.ci-formula-box {
  background: var(--bg-subtle);
  border-left: 4px solid var(--brand);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-left-color: var(--brand);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 12px 0;
}

.ci-formula-expr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 6px;
}

.ci-formula-note {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.ci-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .ci-two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.ci-two-col .ci-section {
  margin-bottom: 0;
}

.ci-list {
  padding-left: 20px;
  margin: 12px 0;
}

.ci-list li {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.ci-examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.ci-example-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.ci-example-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.ci-example-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

.ci-benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.ci-benefit-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.ci-benefit-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.ci-benefit-card .b-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.ci-benefit-card .b-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.ci-benefit-card .b-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.ci-tips-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ci-tips-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  background: var(--bg-subtle);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.tip-icon {
  font-size: 16px;
  line-height: 1.4;
  flex-shrink: 0;
}

/* FAQ Items */
.ci-faq-list,
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.ci-faq-item,
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: 0 1px 3px rgba(11, 16, 32, 0.04);
}

.ci-faq-q,
.faq-question {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.ci-faq-a,
.faq-answer {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ── 10. CATEGORY HUB PAGES ─────────────────────────────────── */
.cat-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding: 32px;
  background: linear-gradient(135deg, var(--bg-subtle) 0%, var(--bg-tint) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.cat-header-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: var(--surface) !important;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

.cat-header-text h1 {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.cat-header-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.cat-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.cat-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.cat-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.cat-feature-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.cat-feature-text span {
  font-size: 12px;
  color: var(--text-muted);
}

.cat-section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
}

.cat-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.cat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(11, 16, 32, 0.04);
}

.cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(36, 59, 143, 0.12);
}

.cat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 12px;
}

.cat-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.cat-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}

.cat-card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  margin-top: auto;
}

.reviewed-box,
.author-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 40px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── 11. STATIC & EDITORIAL PAGES ──────────────────────────── */
.static-page-header {
  text-align: center;
  margin-bottom: 48px;
}

.static-page-header h1 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  margin-bottom: 12px;
}

.static-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 600px) {
  .contact-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}
