.ctc-app {
  --ctc-bg: #f5fbf3;
  --ctc-bg-2: #eef8ec;
  --ctc-panel: #ffffff;
  --ctc-panel-soft: #f7fcf6;
  --ctc-text: #25382d;
  --ctc-muted: #6c806f;
  --ctc-line: #d7ead8;
  --ctc-green-3: #a7d8ac;
  --ctc-green-5: #4f9f64;
  --ctc-green-6: #2f7d47;
  --ctc-shadow: 0 22px 55px rgba(70, 118, 78, .14);
  --ctc-chart-scale: 1;
  --ctc-text-scale: 1;
  --ctc-padding-scale: 1;
  --ctc-gap-scale: 1;
  --ctc-radius-scale: 1;

  color: var(--ctc-text);
  background:
    radial-gradient(circle at 16% 6%, rgba(199, 235, 199, .72), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(231, 245, 215, .86), transparent 24%),
    linear-gradient(180deg, var(--ctc-bg) 0%, var(--ctc-bg-2) 100%);
  border-radius: calc(28px * var(--ctc-radius-scale));
  padding: calc(28px * var(--ctc-padding-scale));
  overflow: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  width: min(1500px, calc(100vw - 48px));
  max-width: min(1500px, calc(100vw - 48px));
  margin-left: 50%;
  transform: translateX(-50%);
  font-size: calc(16px * var(--ctc-text-scale));
}

.ctc-app * {
  box-sizing: border-box;
}

.ctc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: calc(24px * var(--ctc-gap-scale));
  align-items: end;
  margin-bottom: calc(18px * var(--ctc-gap-scale));
}

.ctc-eyebrow {
  color: var(--ctc-green-6);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78em;
  font-weight: 900;
  margin: 0 0 10px;
}

.ctc-app h2,
.ctc-app h3,
.ctc-app p {
  margin-top: 0;
}

.ctc-app h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: .98;
  margin-bottom: 18px;
  color: #20342a;
}

.ctc-app h3 {
  font-size: 1.28em;
  margin-bottom: 6px;
}

.ctc-lead {
  color: var(--ctc-muted);
  max-width: 920px;
  font-size: 1.04em;
  line-height: 1.7;
  margin-bottom: 0;
}

.ctc-panel,
.ctc-hero-card {
  border: 1px solid var(--ctc-line);
  background: linear-gradient(180deg, var(--ctc-panel) 0%, var(--ctc-panel-soft) 100%);
  border-radius: calc(24px * var(--ctc-radius-scale));
  box-shadow: var(--ctc-shadow);
}

.ctc-hero-card {
  padding: calc(24px * var(--ctc-padding-scale));
  display: grid;
  gap: 8px;
}

.ctc-hero-card span {
  font-size: 3em;
  font-weight: 950;
  color: var(--ctc-green-6);
}

.ctc-hero-card strong {
  font-size: 2em;
  color: var(--ctc-green-5);
}

.ctc-app small,
.ctc-muted {
  color: var(--ctc-muted);
}

.ctc-panel {
  padding: calc(22px * var(--ctc-padding-scale));
  margin-bottom: calc(18px * var(--ctc-gap-scale));
}

.ctc-status-panel p {
  margin: 6px 0 0;
  color: var(--ctc-muted);
  line-height: 1.5;
}

.ctc-design-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(247,252,246,.92));
}

.ctc-design-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.ctc-design-controls label {
  background: rgba(255,255,255,.74);
  border: 1px solid var(--ctc-line);
  border-radius: calc(16px * var(--ctc-radius-scale));
  padding: 12px;
}

.ctc-design-controls span {
  display: block;
  font-weight: 900;
  margin-bottom: 8px;
}

.ctc-design-controls input[type="range"] {
  width: 100%;
  accent-color: var(--ctc-green-5);
}

.ctc-design-controls output {
  display: inline-block;
  margin-top: 4px;
  color: var(--ctc-muted);
  font-weight: 800;
}

.ctc-soft-button {
  max-width: 210px;
}

.ctc-controls {
  display: grid;
  grid-template-columns: 135px 135px minmax(280px, 1fr) 140px;
  gap: calc(16px * var(--ctc-gap-scale));
  align-items: end;
}

.ctc-app label {
  display: block;
  font-weight: 900;
  margin-bottom: 8px;
}

.ctc-app select,
.ctc-app button {
  width: 100%;
  border: 1px solid var(--ctc-line);
  border-radius: calc(14px * var(--ctc-radius-scale));
  padding: 12px 13px;
  background: #fff;
  color: var(--ctc-text);
  font: inherit;
  min-height: 46px;
}

.ctc-app select {
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: menulist;
}

.ctc-app select:focus,
.ctc-app button:focus {
  outline: 3px solid rgba(120, 191, 136, .28);
  outline-offset: 2px;
}

.ctc-year-selectors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.ctc-app button {
  cursor: pointer;
  font-weight: 900;
  background: linear-gradient(135deg, #dff3df, #bfe6c4);
  color: #264332;
  border-color: #c7e5c9;
  box-shadow: 0 10px 22px rgba(91, 150, 101, .12);
}

.ctc-app button:hover {
  transform: translateY(-1px);
}

.ctc-main-button {
  background: linear-gradient(135deg, #a7d8ac, #dff3df) !important;
}

.ctc-grid-primary,
.ctc-grid-secondary {
  display: grid;
  gap: calc(18px * var(--ctc-gap-scale));
}

.ctc-grid-primary {
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, .8fr);
}

.ctc-grid-secondary {
  grid-template-columns: 1fr 1fr;
}

.ctc-big,
.ctc-summary-panel {
  min-height: calc(500px * var(--ctc-chart-scale));
}

.ctc-section-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 14px;
}

.ctc-section-title.ctc-compact {
  margin-bottom: 12px;
}

.ctc-section-title p {
  color: var(--ctc-muted);
  margin: 4px 0 0;
}

.ctc-chart {
  width: 100%;
  height: calc(430px * var(--ctc-chart-scale));
  min-height: 260px;
  overflow: hidden;
}

.ctc-chart-medium {
  height: calc(345px * var(--ctc-chart-scale));
}

.ctc-stats {
  display: grid;
  gap: 14px;
}

.ctc-stats div,
.ctc-card {
  background: rgba(255,255,255,.78);
  border: 1px solid var(--ctc-line);
  border-radius: calc(18px * var(--ctc-radius-scale));
  padding: calc(16px * var(--ctc-padding-scale));
}

.ctc-stats span {
  display: block;
  font-size: 1.42em;
  font-weight: 950;
  margin-bottom: 4px;
}

.ctc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.ctc-card .ctc-year {
  font-size: 1.45em;
  font-weight: 950;
}

.ctc-card .ctc-value {
  font-size: 2em;
  font-weight: 950;
  margin: 8px 0 4px;
}

.ctc-card .ctc-bar {
  height: 10px;
  border-radius: 99px;
  background: #e9f5e8;
  overflow: hidden;
}

.ctc-card .ctc-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
}

.ctc-card .ctc-delta {
  margin-top: 10px;
  font-size: .9em;
  color: var(--ctc-muted);
}

.ctc-stripes {
  height: 88px;
  border-radius: calc(16px * var(--ctc-radius-scale));
  overflow: hidden;
  display: flex;
  border: 1px solid var(--ctc-line);
}

.ctc-stripe {
  flex: 1 1 auto;
  min-width: 2px;
}

.ctc-info p {
  color: var(--ctc-muted);
  line-height: 1.65;
}

.ctc-error {
  padding: 16px;
  border-radius: 16px;
  background: #fbfff6;
  border: 1px solid #c7e5c9;
  color: #58775d;
}

@media (max-width: 960px) {
  .ctc-app {
    padding: 18px;
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
  }

  .ctc-hero,
  .ctc-controls,
  .ctc-grid-primary,
  .ctc-grid-secondary {
    grid-template-columns: 1fr;
  }

  .ctc-section-title {
    display: block;
  }

  .ctc-soft-button {
    max-width: none;
    margin-top: 10px;
  }
}
