/* Founder Equity Split Calculator — hero & tool widget */
.fesc-page {
  --fesc-navy: #061a31;
  --fesc-navy-2: #0b2947;
  --fesc-coral: #f45f58;
  --fesc-coral-dark: #d94a44;
  --fesc-ink: #10243a;
  --fesc-muted: #5c6f82;
  --fesc-line: #d9e2ea;
  --fesc-green: #16825c;
  --fesc-green-soft: #eaf7f1;
  --fesc-amber: #9e650f;
  --fesc-amber-soft: #fff7e8;
  --fesc-red: #bd3f39;
  --fesc-red-soft: #fff0ef;
  --fesc-shadow: 0 24px 70px rgba(4, 24, 46, 0.18);
}

.fesc-page .hero-tool {
  position: relative;
  min-height: calc(100svh - 58px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 8%, rgba(54, 107, 155, 0.36), transparent 32%),
    linear-gradient(135deg, var(--fesc-navy) 0%, #081f39 58%, #0b2d50 100%);
  color: #fff;
}

.fesc-page .grid-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.22;
  pointer-events: none;
  color: #fff;
}

.fesc-page .page-shell {
  width: 100%;
  max-width: 1850px;
  margin-inline: auto;
  padding-block: 24px 26px;
  padding-inline: clamp(24px, 5vw, 96px);
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(32px, 4vw, 62px);
  align-items: center;
}

.fesc-page .kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffaaa6;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.fesc-page .kicker:before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--fesc-coral);
}

.fesc-page .intro h1 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: -0.058em;
  font-weight: 800;
  text-align: left;
  word-spacing: normal;
}

.fesc-page .intro h1 span {
  color: #ff817a;
}

.fesc-page .intro-copy {
  max-width: 550px;
  margin: 18px 0 0;
  color: #c8d6e4;
  font-size: 0.92rem;
  line-height: 1.68;
}

.fesc-page .proof {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 18px;
  margin-top: 20px;
  color: #c6d5e3;
  font-size: 0.72rem;
  font-weight: 650;
}

.fesc-page .proof span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.fesc-page .proof svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #57dda1;
  stroke-width: 2.4;
}

.fesc-page .scope-note {
  margin-top: 22px;
  padding: 13px 15px;
  max-width: 555px;
  border-left: 3px solid var(--fesc-coral);
  background: rgba(255, 255, 255, 0.07);
  color: #bdccda;
  font-size: 0.68rem;
  line-height: 1.55;
}

.fesc-page .tool {
  min-width: 0;
  max-width: 100%;
  min-height: 670px;
  background: #fff;
  color: var(--fesc-ink);
  box-shadow: var(--fesc-shadow);
  border-top: 4px solid var(--fesc-coral);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.fesc-page .tool-head {
  padding: 14px 17px 12px;
  border-bottom: 1px solid var(--fesc-line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.fesc-page .tool-head small {
  display: block;
  color: var(--fesc-coral-dark);
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.fesc-page .tool-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.025em;
  color: var(--fesc-ink);
  text-align: left;
}

.fesc-page .live-badge {
  padding: 7px 9px;
  background: var(--fesc-green-soft);
  color: var(--fesc-green);
  font-size: 0.58rem;
  font-weight: 850;
  align-self: flex-start;
  white-space: nowrap;
}

.fesc-page .workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.66fr);
  min-height: 0;
}

.fesc-page .input-pane {
  padding: 15px 17px;
  border-right: 1px solid var(--fesc-line);
  min-width: 0;
  overflow: auto;
}

.fesc-page .section-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.fesc-page .section-label {
  color: var(--fesc-coral-dark);
  font-size: 0.55rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fesc-page .small-btn {
  border: 1px solid var(--fesc-line);
  background: #fff;
  min-height: 29px;
  padding: 0 9px;
  font-size: 0.52rem;
  font-weight: 800;
  cursor: pointer;
}

.fesc-page .weight-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.fesc-page .weight-card {
  padding: 7px;
  border: 1px solid var(--fesc-line);
  background: #f8fafb;
}

.fesc-page .weight-card label {
  display: block;
  min-height: 26px;
  color: var(--fesc-muted);
  font-size: 0.43rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.3;
}

.fesc-page .weight-card input {
  width: 100%;
  height: 29px;
  border: 1px solid var(--fesc-line);
  padding: 0 6px;
  font-size: 0.54rem;
  outline: none;
  border-radius: 0;
}

.fesc-page .founder-table {
  border: 1px solid var(--fesc-line);
  background: #fff;
  overflow: auto;
}

.fesc-page .founder-head,
.fesc-page .founder-row {
  display: grid;
  grid-template-columns: 1.1fr repeat(6, 0.58fr) 28px;
  gap: 5px;
  align-items: center;
  min-width: 820px;
}

.fesc-page .founder-head {
  padding: 7px;
  background: #f6f8fa;
  color: var(--fesc-muted);
  font-size: 0.42rem;
  font-weight: 850;
  text-transform: uppercase;
  text-align: center;
}

.fesc-page .founder-head span:first-child {
  text-align: left;
}

.fesc-page .founder-row {
  padding: 7px;
  border-top: 1px solid var(--fesc-line);
}

.fesc-page .founder-row input,
.fesc-page .founder-row select {
  width: 100%;
  height: 30px;
  border: 1px solid #d6dee6;
  padding: 0 6px;
  outline: none;
  font-size: 0.51rem;
  border-radius: 0;
}

.fesc-page .remove-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--fesc-line);
  background: #fff;
  color: var(--fesc-red);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
}

.fesc-page .settings {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--fesc-line);
  background: #f8fafb;
}

.fesc-page .field label {
  display: block;
  margin-bottom: 4px;
  color: var(--fesc-muted);
  font-size: 0.46rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fesc-page .field input,
.fesc-page .field select {
  width: 100%;
  height: 33px;
  border: 1px solid var(--fesc-line);
  background: #fff;
  padding: 0 7px;
  font-size: 0.54rem;
  outline: none;
  border-radius: 0;
}

.fesc-page .chart-box {
  margin-top: 10px;
  padding: 9px;
  border: 1px solid var(--fesc-line);
  background: #fff;
}

.fesc-page .chart-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.fesc-page .chart-head strong {
  font-size: 0.6rem;
  color: var(--fesc-ink);
}

.fesc-page .chart-head span {
  font-size: 0.48rem;
  color: var(--fesc-muted);
}

.fesc-page .chart {
  width: 100%;
  height: 135px;
  display: block;
  background: #fbfcfd;
}

.fesc-page .result-pane {
  padding: 15px;
  background: #f7f9fb;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fesc-page .result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.fesc-page .result-head h3 {
  margin: 0;
  font-size: 0.75rem;
  color: var(--fesc-ink);
}

.fesc-page .health-chip {
  padding: 5px 7px;
  font-size: 0.47rem;
  font-weight: 850;
  text-transform: uppercase;
}

.fesc-page .health-chip.good {
  background: var(--fesc-green-soft);
  color: var(--fesc-green);
}

.fesc-page .health-chip.warn {
  background: var(--fesc-amber-soft);
  color: var(--fesc-amber);
}

.fesc-page .health-chip.bad {
  background: var(--fesc-red-soft);
  color: var(--fesc-red);
}

.fesc-page .summary-card {
  margin-top: 9px;
  padding: 15px;
  background: var(--fesc-navy-2);
  color: #fff;
}

.fesc-page .summary-card small {
  display: block;
  color: #b9c9d7;
  font-size: 0.52rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.fesc-page .summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.045em;
}

.fesc-page .summary-card p {
  margin: 7px 0 0;
  color: #c7d4df;
  font-size: 0.52rem;
  line-height: 1.4;
}

.fesc-page .split-box {
  margin-top: 8px;
  padding: 9px;
  border: 1px solid var(--fesc-line);
  background: #fff;
}

.fesc-page .split-box h4 {
  margin: 0 0 6px;
  font-size: 0.59rem;
  color: var(--fesc-ink);
}

.fesc-page .split-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding-block: 6px 6px;
  padding-inline: clamp(24px, 5vw, 96px);
  border-top: 1px solid #edf0f3;
  font-size: 0.54rem;
}

.fesc-page .split-row:first-of-type {
  border-top: 0;
}

.fesc-page .split-row span {
  color: var(--fesc-muted);
}

.fesc-page .split-row strong {
  text-align: right;
  min-width: 52px;
  color: var(--fesc-ink);
}

.fesc-page .metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
}

.fesc-page .metric {
  padding: 9px;
  border: 1px solid var(--fesc-line);
  background: #fff;
}

.fesc-page .metric small {
  display: block;
  color: var(--fesc-muted);
  font-size: 0.45rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fesc-page .metric strong {
  display: block;
  margin-top: 3px;
  font-size: 0.7rem;
  color: var(--fesc-ink);
}

.fesc-page .metric em {
  display: block;
  margin-top: 2px;
  color: var(--fesc-muted);
  font-size: 0.43rem;
  font-style: normal;
}

.fesc-page .insight {
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #eed5a8;
  background: var(--fesc-amber-soft);
  color: #76500f;
  font-size: 0.51rem;
  line-height: 1.42;
}

.fesc-page .insight.good {
  border-color: #c6e6d7;
  background: var(--fesc-green-soft);
  color: #126347;
}

.fesc-page .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: auto;
  padding-top: 9px;
}

.fesc-page .actions button,
.fesc-page .actions a {
  min-height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--fesc-line);
  background: #fff;
  color: var(--fesc-ink);
  text-decoration: none;
  font-size: 0.55rem;
  font-weight: 800;
  cursor: pointer;
}

.fesc-page .actions a {
  grid-column: 1 / -1;
  background: var(--fesc-coral);
  border-color: var(--fesc-coral);
  color: #fff;
}

.fesc-page .actions a:hover {
  background: var(--fesc-coral-dark);
  color: #fff;
}

.fesc-page .tool-foot {
  padding: 9px 17px;
  border-top: 1px solid var(--fesc-line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--fesc-muted);
  font-size: 0.5rem;
}

.fesc-page .tool-foot strong {
  color: var(--fesc-ink);
}

@media (max-width: 1140px) {
  .fesc-page .hero-tool {
    min-height: auto;
  }

  .fesc-page .page-shell {
    grid-template-columns: 1fr;
    padding-block: 42px;
    padding-inline: clamp(24px, 5vw, 96px);
  }

  .fesc-page .intro h1,
  .fesc-page .intro-copy {
    max-width: 860px;
  }
}

@media (max-width: 800px) {
  .fesc-page .page-shell {
    padding-inline: clamp(16px, 4vw, 24px);
    padding-block: 25px;
    gap: 26px;
  }

  .fesc-page .intro h1 {
    font-size: 2.3rem;
  }

  .fesc-page .scope-note {
    display: none;
  }

  .fesc-page .tool {
    min-height: 980px;
  }

  .fesc-page .workspace {
    grid-template-columns: 1fr;
  }

  .fesc-page .input-pane {
    border-right: 0;
    border-bottom: 1px solid var(--fesc-line);
  }

  .fesc-page .weight-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .fesc-page .settings {
    grid-template-columns: 1fr 1fr;
  }

  .fesc-page .result-pane {
    min-height: 410px;
  }
}

@media (max-width: 500px) {
  .fesc-page .intro h1 {
    font-size: 2rem;
  }

  .fesc-page .tool-head,
  .fesc-page .input-pane {
    padding-left: 13px;
    padding-right: 13px;
  }

  .fesc-page .live-badge {
    display: none;
  }

  .fesc-page .weight-grid,
  .fesc-page .settings {
    grid-template-columns: 1fr 1fr;
  }

  .fesc-page .actions {
    grid-template-columns: 1fr;
  }

  .fesc-page .actions a {
    grid-column: auto;
  }

  .fesc-page .tool-foot {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fesc-page * {
    animation: none !important;
    transition: none !important;
  }
}
