.ccstlc-calculator {
  --ccstlc-bg: #f8fafc;
  --ccstlc-surface: #ffffff;
  --ccstlc-surface-soft: #f6fbfa;
  --ccstlc-text: #0f172a;
  --ccstlc-muted: #64748b;
  --ccstlc-border: #d9e5f0;
  --ccstlc-shadow: 0 26px 70px rgba(15, 23, 42, 0.10);
  --ccstlc-accent: #0f766e;
  --ccstlc-accent-dark: #115e59;
  --ccstlc-secondary: #1d4ed8;
  --ccstlc-good: #166534;
  --ccstlc-bad: #b91c1c;
  color: var(--ccstlc-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  width: 100%;
}

.ccstlc-calculator * {
  box-sizing: border-box;
}

.ccstlc-shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 28px;
  border-radius: 32px;
  border: 1px solid var(--ccstlc-border);
  background: linear-gradient(135deg, #eef6ff 0%, #f8fafc 42%, #ecfeff 100%);
  box-shadow: var(--ccstlc-shadow);
}

.ccstlc-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.ccstlc-heading-block,
.ccstlc-headline-card,
.ccstlc-section,
.ccstlc-chart-card,
.ccstlc-summary-card,
.ccstlc-note-card {
  background: var(--ccstlc-surface);
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 24px;
}

.ccstlc-heading-block {
  flex: 1 1 65%;
  padding: 28px;
}

.ccstlc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.10);
  color: var(--ccstlc-accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ccstlc-title {
  margin: 0;
  font-size: clamp(1.8rem, 2.7vw, 3rem);
  line-height: 1.08;
}

.ccstlc-description {
  margin: 14px 0 0;
  max-width: 880px;
  color: var(--ccstlc-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.ccstlc-headline-card {
  flex: 0 1 360px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.10), rgba(29, 78, 216, 0.07));
}

.ccstlc-headline-card span,
.ccstlc-summary-card span {
  color: var(--ccstlc-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ccstlc-headline-card strong,
.ccstlc-summary-card strong {
  margin-top: 10px;
  font-size: 1.15rem;
  line-height: 1.45;
}

.ccstlc-headline-card small,
.ccstlc-summary-card small,
.ccstlc-note-card p,
.ccstlc-field small,
.ccstlc-chart-note {
  color: var(--ccstlc-muted);
  line-height: 1.65;
}

.ccstlc-section {
  padding: 24px;
  margin-top: 20px;
}

.ccstlc-section-heading {
  margin-bottom: 18px;
}

.ccstlc-section-heading h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.ccstlc-section-heading p {
  margin: 0;
  color: var(--ccstlc-muted);
  line-height: 1.7;
}

.ccstlc-grid,
.ccstlc-summary-grid,
.ccstlc-notes-grid {
  display: grid;
  gap: 18px;
}

.ccstlc-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ccstlc-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ccstlc-notes-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ccstlc-field,
.ccstlc-summary-card,
.ccstlc-note-card {
  padding: 20px;
}

.ccstlc-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--ccstlc-surface-soft);
}

.ccstlc-field > span {
  font-weight: 700;
}

.ccstlc-input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--ccstlc-border);
  border-radius: 16px;
  background: #fff;
  color: var(--ccstlc-text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ccstlc-input:focus {
  outline: none;
  border-color: var(--ccstlc-accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

input[type="range"].ccstlc-input {
  min-height: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.ccstlc-inline-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ccstlc-inline-input .ccstlc-input {
  flex: 1 1 auto;
}

.ccstlc-inline-input span {
  font-weight: 700;
  color: var(--ccstlc-muted);
}

.ccstlc-assumption-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 4px solid var(--ccstlc-accent);
  border-radius: 18px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--ccstlc-text);
  line-height: 1.7;
}

.ccstlc-summary-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ccstlc-summary-card strong {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.ccstlc-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ccstlc-border);
  border-radius: 20px;
}

.ccstlc-compare-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: var(--ccstlc-surface);
}

.ccstlc-compare-table thead th {
  padding: 16px;
  background: #f1f7fb;
  color: var(--ccstlc-text);
  text-align: left;
  font-size: 0.94rem;
}

.ccstlc-compare-table th,
.ccstlc-compare-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--ccstlc-border);
  vertical-align: top;
}

.ccstlc-compare-table tbody tr:last-child th,
.ccstlc-compare-table tbody tr:last-child td {
  border-bottom: none;
}

.ccstlc-compare-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.75);
}

.ccstlc-chart-card {
  padding: 20px;
}

.ccstlc-chart-card canvas {
  width: 100%;
  max-width: 100%;
  height: 360px;
  display: block;
}

.ccstlc-chart-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: var(--ccstlc-muted);
  font-size: 0.95rem;
}

.ccstlc-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ccstlc-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.ccstlc-dot-net {
  background: var(--ccstlc-accent);
}

.ccstlc-dot-tax {
  background: var(--ccstlc-secondary);
}

.ccstlc-chart-note {
  margin: 12px 0 0;
}

.ccstlc-note-card h4 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.ccstlc-variance-positive {
  color: var(--ccstlc-good);
  font-weight: 700;
}

.ccstlc-variance-negative {
  color: var(--ccstlc-bad);
  font-weight: 700;
}

.ccstlc-variance-neutral {
  color: var(--ccstlc-muted);
  font-weight: 700;
}

@media (max-width: 1120px) {
  .ccstlc-header,
  .ccstlc-grid,
  .ccstlc-summary-grid,
  .ccstlc-notes-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ccstlc-header {
    display: grid;
  }

  .ccstlc-headline-card {
    flex: none;
  }
}

@media (max-width: 760px) {
  .ccstlc-shell {
    padding: 18px;
    border-radius: 24px;
  }

  .ccstlc-grid,
  .ccstlc-summary-grid,
  .ccstlc-notes-grid,
  .ccstlc-header {
    grid-template-columns: 1fr;
  }

  .ccstlc-heading-block,
  .ccstlc-headline-card,
  .ccstlc-field,
  .ccstlc-summary-card,
  .ccstlc-note-card,
  .ccstlc-section,
  .ccstlc-chart-card {
    padding: 18px;
    border-radius: 20px;
  }

  .ccstlc-chart-card canvas {
    height: 280px;
  }
}
