/* TOOL-0 — Shared Tool Integration Contract Check */
.ept-app .ept-tool-adapter-card,
.ept-app .ept-tool-integration {
  border: 1px solid var(--ept-border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.96));
  box-shadow: var(--ept-shadow-soft);
}

.ept-app .ept-tool-adapter-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.ept-app .ept-tool-adapter-card__header,
.ept-app .ept-tool-integration__header,
.ept-app .ept-tool-integration__toolbar,
.ept-app .ept-tool-adapter-card__row {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.ept-app .ept-tool-adapter-card__header h4,
.ept-app .ept-tool-integration__header h3 {
  margin: 4px 0 4px;
}

.ept-app .ept-tool-adapter-card__header p,
.ept-app .ept-tool-integration__header p,
.ept-app .ept-tool-adapter-card__row span {
  color: var(--ept-muted) !important;
  font-size: .86rem;
  margin: 0;
}

.ept-app .ept-tool-adapter-card__icon {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(37,99,235,.24);
  color: #fff !important;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .85rem;
  font-weight: 900;
  height: 46px;
  justify-content: center;
  letter-spacing: .04em;
  width: 46px;
}

.ept-app .ept-tool-adapter-card__settings {
  display: grid;
  gap: 10px;
}

.ept-app .ept-tool-adapter-card__setting {
  background: var(--ept-surface-soft);
  border: 1px solid var(--ept-border);
  border-radius: 16px;
  padding: 12px;
}

.ept-app .ept-tool-adapter-card__setting label {
  color: var(--ept-muted-strong) !important;
  display: block;
  font-size: .78rem;
  font-weight: 850;
  margin-bottom: 7px;
}

.ept-app .ept-tool-adapter-card__setting input,
.ept-app .ept-tool-adapter-card__setting select {
  width: 100%;
}

.ept-app .ept-tool-adapter-card__contract {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ept-app .ept-tool-adapter-card__contract div,
.ept-app .ept-tool-integration__rule,
.ept-app .ept-tool-integration__item {
  background: var(--ept-surface-soft);
  border: 1px solid var(--ept-border);
  border-radius: 16px;
  padding: 12px;
}

.ept-app .ept-tool-adapter-card__contract strong,
.ept-app .ept-tool-integration__rule strong,
.ept-app .ept-tool-integration__item strong {
  color: var(--ept-text) !important;
  display: block;
  font-size: .86rem;
  margin-bottom: 3px;
}

.ept-app .ept-tool-integration {
  padding: 18px;
}

.ept-app .ept-tool-integration__toolbar {
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0;
}

.ept-app .ept-tool-integration__scoreboard,
.ept-app .ept-tool-integration__rules,
.ept-app .ept-tool-integration__list {
  display: grid;
  gap: 10px;
}

.ept-app .ept-tool-integration__scoreboard {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.ept-app .ept-tool-integration__score {
  background: #fff;
  border: 1px solid var(--ept-border);
  border-radius: 18px;
  padding: 14px;
  text-align: center;
}

.ept-app .ept-tool-integration__score strong {
  color: var(--ept-primary) !important;
  display: block;
  font-size: 1.35rem;
}

.ept-app .ept-tool-integration__score span {
  color: var(--ept-muted) !important;
  display: block;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ept-app .ept-tool-integration__rules {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0;
}

.ept-app .ept-tool-integration__item {
  display: grid;
  gap: 4px;
  grid-template-columns: auto 1fr;
}

.ept-app .ept-tool-integration__mark {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  text-transform: uppercase;
  width: 48px;
}

.ept-app .ept-tool-integration__item.is-pass .ept-tool-integration__mark { background: var(--ept-success-bg); color: var(--ept-success-text) !important; }
.ept-app .ept-tool-integration__item.is-warn .ept-tool-integration__mark { background: var(--ept-warning-bg); color: var(--ept-warning-text) !important; }
.ept-app .ept-tool-integration__item.is-fail .ept-tool-integration__mark { background: var(--ept-error-bg); color: var(--ept-error-text) !important; }

.ept-app .ept-tool-integration__footer p {
  color: var(--ept-muted) !important;
  margin: 12px 0 0;
}

@media (max-width: 820px) {
  .ept-app .ept-tool-adapter-card__contract,
  .ept-app .ept-tool-integration__scoreboard,
  .ept-app .ept-tool-integration__rules {
    grid-template-columns: 1fr;
  }

  .ept-app .ept-tool-adapter-card__header,
  .ept-app .ept-tool-integration__header {
    flex-direction: column;
  }
}


/* START-3.1 — Shared Start Remaining Card Frame Cleanup.
 * Final production-start flattening only. Keeps the shared start upload
 * behaviour, validation feedback, drag/drop and keyboard access intact while
 * removing the remaining visible card/border frame from the idle start surface.
 */
.ept-bench.ept-mode-production[data-ept-context-type="tool"][data-ept-production-state="start"] .ept-shell {
  border-color: transparent !important;
  box-shadow: none !important;
}

.ept-bench.ept-mode-production[data-ept-context-type="tool"][data-ept-production-state="start"] .ept-production-flow,
.ept-bench.ept-mode-production[data-ept-context-type="tool"][data-ept-production-state="start"] .ept-flow-preview-grid,
.ept-bench.ept-mode-production[data-ept-context-type="tool"][data-ept-production-state="start"] .ept-flow-template--start.ept-start-final,
.ept-bench.ept-mode-production[data-ept-context-type="tool"][data-ept-production-state="start"] .ept-start-final .ept-flow-start {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.ept-bench.ept-mode-production[data-ept-context-type="tool"][data-ept-production-state="start"] .ept-start-final .ept-flow-start {
  background:
    radial-gradient(circle at 50% 18%, rgba(37, 99, 235, 0.09), transparent 31%),
    radial-gradient(circle at 50% 72%, rgba(34, 197, 94, 0.04), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,251,255,0.96) 100%) !important;
}

.ept-bench.ept-mode-production[data-ept-context-type="tool"][data-ept-production-state="start"] .ept-start-final .ept-flow-start::after {
  display: none !important;
  content: none !important;
}

.ept-bench.ept-mode-production[data-ept-context-type="tool"][data-ept-production-state="start"] .ept-start-final .ept-flow-start[data-ept-dropzone]:not(.is-dragover):not(.is-validating):not(.is-invalid):not(.is-ready):not(.is-warning):focus-visible {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13) !important;
}

.ept-bench.ept-mode-production[data-ept-context-type="tool"][data-ept-production-state="start"] .ept-start-final .ept-flow-start[data-ept-dropzone].is-dragover,
.ept-bench.ept-mode-production[data-ept-context-type="tool"][data-ept-production-state="start"] .ept-start-final .ept-flow-start[data-ept-dropzone].is-validating,
.ept-bench.ept-mode-production[data-ept-context-type="tool"][data-ept-production-state="start"] .ept-start-final .ept-flow-start[data-ept-dropzone].is-invalid,
.ept-bench.ept-mode-production[data-ept-context-type="tool"][data-ept-production-state="start"] .ept-start-final .ept-flow-start[data-ept-dropzone].is-ready,
.ept-bench.ept-mode-production[data-ept-context-type="tool"][data-ept-production-state="start"] .ept-start-final .ept-flow-start[data-ept-dropzone].is-warning {
  box-shadow: 0 18px 52px rgba(37, 99, 235, 0.08) !important;
}
