/* ===== SOURCE PAGE THEME (copied from akcalc.online index.html) ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #10b981;
  --secondary-dk: #059669;
  --bg: #f9fafb;
  --card: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
  --max-w: 960px;
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; width: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ===== CUSTOM STYLES FOR EXIT TAX CALCULATOR (from Prompt 2A) ===== */
/* RESET & BASE already above */


h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
  margin: 16px 0 8px 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 32px 0 16px 0;
  line-height: 1.3;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1e293b;
  margin: 20px 0 8px 0;
  line-height: 1.3;
}

p {
  font-size: 0.95rem;
  color: #334155;
  margin-bottom: 12px;
  line-height: 1.7;
}

a {
  color: #2563eb;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.calculator-intro {
  background: #eff6ff;
  border-left: 4px solid #2563eb;
  padding: 16px 20px;
  border-radius: 6px;
  margin: 16px 0 24px 0;
}
.calculator-intro p {
  margin-bottom: 4px;
  font-size: 0.92rem;
}
.calculator-intro strong {
  color: #1e40af;
}

.section-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 24px 22px;
  margin: 24px 0 32px 0;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}
.section-box h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
  font-size: 1.15rem;
}
.section-box h2 .step-badge {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 10px;
  border-radius: 20px;
  margin-right: 8px;
  vertical-align: middle;
}
.section-box .sub-label {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 12px;
  display: block;
}

.test-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #e2e8f0;
}
.test-item:last-child {
  border-bottom: none;
}
.test-item input[type="checkbox"],
.test-item input[type="radio"] {
  margin-top: 3px;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #2563eb;
}
.test-item label {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  display: block;
}
.test-item .test-detail {
  font-size: 0.88rem;
  color: #64748b;
  display: block;
  margin-top: 6px;
  line-height: 1.5;
  font-weight: 400;
}

.field-input {
  display: block;
  width: 100%;
  max-width: 380px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1.05rem;
  font-family: inherit;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.field-input:hover {
  border-color: #94a3b8;
}
.field-input:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.field-input::placeholder {
  color: #94a3b8;
}
.field-input-group {
  position: relative;
  margin-top: 6px;
  max-width: 380px;
}
.field-input-group .field-input {
  margin-top: 0;
  max-width: none;
  padding-left: 30px;
  padding-right: 58px;
}
.field-input-group .field-prefix,
.field-input-group .field-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}
.field-input-group .field-prefix {
  left: 12px;
  font-size: 0.95rem;
}
.field-input-group .field-suffix {
  right: 12px;
  font-size: 0.9rem;
}

.covered-result {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  display: none;
}
.covered-result.show {
  display: block;
}
.covered-result.yes {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.covered-result.no {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.asset-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0 16px 0;
}
.asset-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.asset-table th {
  background: #f1f5f9;
  text-align: left;
  padding: 10px 8px;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.asset-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.asset-table select,
.asset-table input {
  width: 100%;
  padding: 6px 4px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.85rem;
  background: #fff;
  font-family: inherit;
  min-width: 60px;
}
.asset-table select:focus,
.asset-table input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
.asset-table .gain-display {
  font-weight: 600;
  color: #0f172a;
  background: #f8fafc;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  min-width: 60px;
  text-align: right;
}
.asset-table .gain-display.positive {
  color: #16a34a;
}
.asset-table .gain-display.negative {
  color: #dc2626;
}
.asset-table .remove-btn {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.asset-table .remove-btn:hover {
  background: #fecaca;
}
.asset-table .asset-type-select {
  min-width: 120px;
}

.add-row-btn {
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  color: #1e293b;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 6px;
  width: 100%;
  text-align: center;
  transition: background 0.15s;
}
.add-row-btn:hover {
  background: #e2e8f0;
}

.calc-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin: 16px 0 8px 0;
  width: 100%;
  transition: background 0.15s, transform 0.1s;
}
.calc-btn:hover {
  background: #1d4ed8;
}
.calc-btn:active {
  transform: scale(0.98);
}

.results-panel {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 18px 16px;
  margin: 16px 0 0 0;
  display: none;
  border: 2px solid #e2e8f0;
}
.results-panel.show {
  display: block;
}
.results-panel .result-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.92rem;
}
.results-panel .result-row:last-child {
  border-bottom: none;
}
.results-panel .result-label {
  color: #475569;
}
.results-panel .result-value {
  font-weight: 600;
  color: #0f172a;
}
.results-panel .result-value.total-tax {
  font-size: 1.2rem;
  color: #dc2626;
}
.results-panel .result-value.excluded {
  color: #16a34a;
}
.results-panel .result-divider {
  border-top: 2px solid #cbd5e1;
  margin: 8px 0;
}

.special-note {
  background: #fefce8;
  border-left: 4px solid #eab308;
  padding: 12px 16px;
  border-radius: 4px;
  margin: 12px 0;
  font-size: 0.88rem;
}
.special-note strong {
  color: #854d0e;
}

.trust-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 6px 0 18px 0;
  font-size: 0.8rem;
  color: #475569;
}
.trust-badge span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.trust-badge .icon {
  font-size: 1rem;
}

.key-figures {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 12px 0 16px 0;
}
.key-figures .fig-item {
  background: #f1f5f9;
  padding: 10px 12px;
  border-radius: 6px;
  text-align: center;
}
.key-figures .fig-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  display: block;
}
.key-figures .fig-label {
  font-size: 0.75rem;
  color: #64748b;
}

/* FAQ Accordion (Prompt 7) */
.faq-container {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  margin: 12px 0 24px 0;
}
.faq-item {
  border-bottom: 1px solid #e2e8f0;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 14px 18px;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  line-height: 1.4;
  transition: background 0.15s;
}
.faq-question:hover {
  background: #f8fafc;
}
.faq-icon {
  font-size: 1.1rem;
  color: #94a3b8;
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-answer {
  display: none;
  padding: 0 18px 16px 18px;
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.7;
}
.faq-answer p {
  margin: 0;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  h1 {
    font-size: 1.4rem;
  }
  h2 {
    font-size: 1.1rem;
  }
  .section-box {
    padding: 14px 12px;
    margin: 12px 0 20px 0;
  }
  .asset-table {
    min-width: 360px;
    font-size: 0.8rem;
  }
  .asset-table select,
  .asset-table input {
    font-size: 0.75rem;
    padding: 4px 2px;
    min-width: 40px;
  }
  .asset-table .asset-type-select {
    min-width: 80px;
  }
  .asset-table th,
  .asset-table td {
    padding: 6px 4px;
  }
  .key-figures {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }
  .key-figures .fig-number {
    font-size: 1rem;
  }
  .test-item {
    padding: 8px 0;
  }
  .test-item label {
    font-size: 0.85rem;
  }
  .covered-result {
    font-size: 0.85rem;
    padding: 10px 12px;
  }
  .results-panel .result-row {
    font-size: 0.82rem;
  }
  .results-panel .result-value.total-tax {
    font-size: 1rem;
  }
  .trust-badge {
    font-size: 0.7rem;
    gap: 6px 12px;
    padding: 8px 12px;
  }
  .calc-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 400px) {
  .key-figures {
    grid-template-columns: 1fr;
  }
  .asset-table {
    min-width: 300px;
    font-size: 0.72rem;
  }
  .asset-table .asset-type-select {
    min-width: 60px;
  }
  .asset-table select,
  .asset-table input {
    font-size: 0.68rem;
    padding: 2px 2px;
  }
  .section-box {
    padding: 10px 8px;
  }
  .test-item {
    gap: 8px;
  }
  .test-item input[type="checkbox"],
  .test-item input[type="radio"] {
    width: 44px;
    height: 44px;
  }
}

.hidden-init {
  display: none !important;
}
.text-center {
  text-align: center;
}
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }

/* Site footer (override to match source) */
.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 2px solid #e2e8f0;
  font-size: 0.78rem;
  color: #94a3b8;
}
.site-footer a {
  color: #64748b;
}
.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 8px 0 12px 0;
}
.site-footer .disclaimer {
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: 6px;
  color: #991b1b;
  font-size: 0.75rem;
  margin: 12px 0;
}

/* Additional trust badge grid (Prompt 8) */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 12px 0 20px 0;
}
.trust-grid .trust-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  text-align: center;
}
.trust-grid .trust-item .icon-big {
  font-size: 1.8rem;
  margin-bottom: 4px;
}
.trust-grid .trust-item .trust-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #1e293b;
}
.trust-grid .trust-item .trust-desc {
  font-size: 0.8rem;
  color: #64748b;
}
@media (max-width: 600px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Tool meta blocks (Sources / Disclaimer) ===== */
.tool-meta-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 820px;
  margin: 28px 0;
  padding: 18px 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  font-size: 15px;
  line-height: 1.65;
  color: #374151;
}
.tool-meta-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 20px;
  line-height: 1;
}
.tool-meta-block strong { color: #111827; }
.tool-sources-block {
  background: linear-gradient(135deg, #eff6ff, #f5f9ff);
  border-left: 4px solid #2563eb;
}
.tool-sources-block .tool-meta-icon {
  background: #dbeafe;
  color: #2563eb;
}
.tool-disclaimer-block {
  background: linear-gradient(135deg, #fffbeb, #fffdf5);
  border-left: 4px solid #f59e0b;
}
.tool-disclaimer-block .tool-meta-icon {
  background: #fef3c7;
  color: #d97706;
}
@media (max-width: 600px) {
  .tool-meta-block { flex-direction: row; padding: 14px 14px; gap: 10px; font-size: 14px; }
  .tool-meta-icon { width: 34px; height: 34px; font-size: 17px; }
}