/* Things we could solve
   ========================================================================== */

.twcs .twcs-hero { padding-bottom: 2.5rem; }
.twcs .twcs-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.75rem 2.25rem;
  align-items: center;
  max-width: none;
}
.twcs .twcs-hero-copy { max-width: 44rem; }
.twcs .twcs-hero .lede { max-width: 40rem; }
.twcs .twcs-art { margin: 0; max-width: 100%; }
.twcs .twcs-art img { width: 100%; height: auto; display: block; }
.twcs .twcs-hero-art { max-width: 28rem; justify-self: end; width: 100%; }
.twcs .twcs-approach-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1.5rem 2rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.twcs .twcs-approach-split .twcs-intro { margin-bottom: 0; max-width: none; }
.twcs .twcs-approach-art { max-width: 26rem; justify-self: end; width: 100%; }
.twcs .twcs-intro { max-width: 44rem; margin-bottom: 1.5rem; }
.twcs .twcs-intro-wide { max-width: 52rem; }
.twcs .twcs-sub {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.15rem;
  color: var(--purple-deep);
}
.twcs .twcs-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.2rem;
}
.twcs .twcs-list li { margin: 0.35rem 0; }
.twcs .twcs-note {
  margin: 1.5rem 0 0;
  max-width: 48rem;
  font-size: 0.98rem;
  color: var(--mid);
}
.twcs .twcs-compact {
  margin: 1.5rem 0 0;
  max-width: 44rem;
  font-size: 0.98rem;
  color: #374151;
}
.twcs-alt { background: #f3f0ff; }
.twcs-alt .twcs-card,
.twcs-alt .twcs-process { background: var(--white); }

.twcs-problem-grid,
.twcs-process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.twcs-card,
.twcs-process {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}
.twcs-card h3,
.twcs-process h3 {
  margin: 0 0 0.45rem;
  font-size: 1.12rem;
  line-height: 1.3;
}
.twcs-card p,
.twcs-process p {
  margin: 0;
  color: #374151;
  font-size: 1rem;
}

.twcs-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  counter-reset: twcs-step;
}
.twcs-steps > li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem 1.25rem 1.2rem 3.4rem;
  position: relative;
  counter-increment: twcs-step;
}
.twcs-steps > li::before {
  content: counter(twcs-step);
  position: absolute;
  left: 1rem;
  top: 1.15rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--lavender);
  color: var(--purple-deep);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.twcs-steps h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.twcs-steps p { margin: 0; color: #374151; font-size: 1rem; }

.twcs-close {
  background: #111827;
  color: #E5E7EB;
}
.twcs-close h2 { color: #fff; margin-top: 0; }
.twcs-close p { max-width: 40rem; }
.twcs-btn-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}
.twcs-btn-light:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* Demo shells */
.twcs-demo { margin-top: 1.75rem; }
.twcs-demo-banner {
  background: var(--lavender);
  border: 1px solid color-mix(in srgb, var(--purple) 22%, transparent);
  border-radius: 12px 12px 0 0;
  padding: 0.75rem 1rem;
}
.twcs-demo-banner p { margin: 0; font-size: 0.92rem; color: var(--purple-deep); }
.twcs-demo-shell {
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
}
.twcs-demo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}
.twcs-demo-app { margin: 0; font-weight: 700; font-size: 1.05rem; }
.twcs-demo-meta { margin: 0.15rem 0 0; font-size: 0.9rem; color: var(--mid); }
.twcs-demo-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.twcs-btn-sm {
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem;
  border-radius: 999px;
}
.twcs-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #fcfcff;
}
.twcs-stage {
  background: var(--offwhite);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  text-align: left;
}
.twcs-stage strong { display: block; font-size: 0.85rem; color: var(--mid); font-weight: 600; }
.twcs-stage span { font-size: 1.25rem; font-weight: 700; color: var(--charcoal); }
.twcs-demo-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr);
  min-height: 22rem;
}
.twcs-demo-list-pane {
  border-right: 1px solid var(--line);
  background: #fafafa;
  min-width: 0;
}
.twcs-demo-h {
  margin: 0;
  padding: 0.75rem 1rem 0.4rem;
  font-size: 0.95rem;
  color: var(--mid);
  font-weight: 650;
}
.twcs-cand-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.75rem;
  max-height: 28rem;
  overflow: auto;
}
.twcs-cand-list li { margin: 0; }
.twcs-cand-btn {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-left: 3px solid transparent;
}
.twcs-cand-btn:hover { background: #f3f0ff; }
.twcs-cand-btn.is-active {
  background: #efe9fe;
  border-left-color: var(--purple);
}
.twcs-cand-btn .twcs-cand-name { display: block; font-weight: 650; }
.twcs-cand-btn .twcs-cand-meta { display: block; font-size: 0.88rem; color: var(--mid); margin-top: 0.15rem; }
.twcs-demo-detail-pane {
  padding: 1rem 1.15rem 1.25rem;
  min-width: 0;
}
.twcs-demo-empty { margin: 1rem 0; color: var(--mid); }
.twcs-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin: 0.75rem 0 1rem;
}
.twcs-detail-grid .twcs-field { margin: 0; }
.twcs-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.92rem;
}
.twcs-field span { color: var(--mid); font-weight: 600; }
.twcs-field input,
.twcs-field select,
.twcs-field textarea {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--white);
  color: var(--charcoal);
  width: 100%;
}
.twcs-field textarea { min-height: 5.5rem; resize: vertical; }
.twcs-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--lavender);
  color: var(--purple-deep);
  font-size: 0.82rem;
  font-weight: 650;
}
.twcs-feedback {
  margin-top: 0.75rem;
  padding: 0.85rem 0.95rem;
  background: var(--offwhite);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.twcs-feedback h4 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.twcs-feedback p { margin: 0; font-size: 0.95rem; color: #374151; }
.twcs-db-search { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.twcs-report {
  border-top: 1px solid var(--line);
  padding: 1rem;
  background: #fcfcff;
}
.twcs-report table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
}
.twcs-report th,
.twcs-report td {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--line);
}
.twcs-report th { color: var(--mid); font-weight: 650; }
.twcs-status-msg {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--purple-deep);
}

@media (max-width: 900px) {
  .twcs .twcs-hero-grid,
  .twcs .twcs-approach-split {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .twcs .twcs-hero-art,
  .twcs .twcs-approach-art {
    max-width: 22rem;
    justify-self: start;
  }
  .twcs-problem-grid,
  .twcs-process-grid,
  .twcs-steps { grid-template-columns: 1fr; }
  .twcs-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .twcs-demo-layout { grid-template-columns: 1fr; }
  .twcs-demo-list-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .twcs-cand-list { max-height: 14rem; }
  .twcs-detail-grid { grid-template-columns: 1fr; }
  .twcs-demo-actions { width: 100%; }
}

@media (max-width: 560px) {
  .twcs-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
