/* Emerald Paradise Experience System 1.0.0 — portable, framework-neutral. */
:root {
  --ep-emerald: #08684a;
  --ep-emerald-deep: #043b2b;
  --ep-emerald-light: #8cdbb3;
  --ep-charcoal: #101b17;
  --ep-ivory: #faf6ed;
  --ep-gold: #b99c59;
  --ep-ink: #163b2c;
  --ep-muted: #52685b;
  --ep-danger: #a73232;
  --ep-radius: 18px;
  --ep-space: 8px;
  --ep-touch: 44px;
  --ep-fast: 150ms;
  --ep-duration: 240ms;
  --ep-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ep-shadow: 0 16px 42px #043b2b12, 0 2px 8px #043b2b08;
}
.ep-experience {
  min-width: 0;
  accent-color: var(--ep-emerald);
}
.ep-experience *,
.ep-experience *::before,
.ep-experience *::after {
  box-sizing: border-box;
}
.ep-experience :where(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--ep-emerald);
  outline-offset: 3px;
}
.ep-experience :where(button, select, summary, input:not([type="checkbox"])) {
  min-height: var(--ep-touch);
}
.ep-experience :where(button, summary) {
  min-width: var(--ep-touch);
}
.ep-experience :where(button, a, summary) {
  transition:
    color var(--ep-fast),
    background-color var(--ep-fast),
    transform var(--ep-fast) var(--ep-ease);
  -webkit-tap-highlight-color: #08684a22;
}
.ep-experience button:not(:disabled):active {
  transform: scale(0.975);
}
.ep-experience button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.ep-workbench {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(125deg, var(--ep-emerald-deep), var(--ep-emerald) 70%, #0b8058);
  color: var(--ep-ivory);
  border: 1px solid #faf6ed1c;
  border-radius: var(--ep-radius);
  padding: clamp(20px, 4vw, 36px);
  box-shadow: var(--ep-shadow);
}
.ep-workbench::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 260px;
  height: 260px;
  right: -70px;
  top: -120px;
  border: 1px solid #faf6ed22;
  border-radius: 50%;
  box-shadow:
    0 0 0 24px #faf6ed05,
    0 0 0 48px #faf6ed06,
    0 0 0 72px #faf6ed04;
  pointer-events: none;
}
.ep-workbench-label {
  color: #c3efd6;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ep-workbench h2 {
  font-size: clamp(24px, 3.5vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 10px 0;
  font-weight: 650;
}
.ep-workbench p {
  max-width: 64ch;
  color: #f0f5ed;
  line-height: 1.6;
  font-size: 14px;
  margin: 0;
}
.ep-workbench-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.ep-workbench-actions :where(a, button) {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  color: var(--ep-ivory);
  border: 1px solid #faf6ed44;
  background: #faf6ed0a;
  border-radius: 11px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.ep-workbench-actions :where(a, button):hover {
  background: #faf6ed20;
}
.ep-workbench-actions :where(a, button):focus-visible {
  outline-color: var(--ep-ivory);
}
.ep-workbench-actions :first-child {
  background: var(--ep-ivory);
  color: var(--ep-emerald-deep);
}
.ep-pillar-rhythm {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 24px;
  color: #c3efd6;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.ep-pillar-rhythm span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ep-pillar-rhythm span::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--ep-gold);
  transform: rotate(45deg);
}
.ep-activity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #08684a0a;
  border: 1px solid #08684a20;
}
.ep-activity-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ep-emerald);
  flex-shrink: 0;
}
.ep-activity[data-busy="true"] .ep-activity-light {
  animation: ep-activity-pulse 1.4s ease-in-out infinite;
}
.ep-activity small {
  color: var(--ep-muted);
  display: block;
  margin-top: 3px;
}
.ep-activity strong {
  font-size: 13px;
  font-weight: 600;
}
.ep-diagnostics {
  border: 1px solid #08684a24;
  border-radius: 13px;
  padding: 0 16px;
  min-width: 0;
}
.ep-diagnostics summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
}
.ep-diagnostics summary::before {
  content: "+";
  color: var(--ep-emerald);
  font-size: 18px;
}
.ep-diagnostics[open] summary::before {
  content: "−";
}
.ep-diagnostics-body {
  padding: 4px 0 16px;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.ep-state {
  padding: 26px;
  border: 1px dashed #08684a40;
  border-radius: var(--ep-radius);
}
.ep-state h3 {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
}
.ep-state p {
  font-size: 14px;
  line-height: 1.6;
}
.ep-ai-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.ep-ai-history {
  position: sticky;
  top: 90px;
  max-height: calc(100dvh - 130px);
  overflow-y: auto;
  border: 1px solid #08684a24;
  border-radius: var(--ep-radius);
  padding: 14px;
  background: var(--ep-ivory);
}
.ep-ai-history,
.ep-ai-conversation,
.ep-ai-composer {
  color: var(--ep-ink);
}
.ep-ai-history input {
  width: 100%;
  border: 1px solid #08684a30;
  padding: 10px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 14px;
  background: white;
}
.ep-ai-thread {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  text-align: left;
  font-size: 13px;
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.ep-ai-thread[aria-current="true"] {
  background: #08684a12;
  color: var(--ep-emerald-deep);
  border-left: 3px solid var(--ep-emerald);
}
.ep-ai-thread small {
  display: block;
  color: var(--ep-muted);
  margin-top: 4px;
}
.ep-ai-conversation {
  min-width: 0;
  border: 1px solid #08684a24;
  border-radius: var(--ep-radius);
  background: #fffdf8;
  overflow: hidden;
}
.ep-ai-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #08684a18;
}
.ep-ai-topbar h2 {
  font-size: 16px;
  font-weight: 650;
}
.ep-ai-messages {
  min-height: 280px;
  max-height: 64dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
  scroll-behavior: smooth;
}
.ep-ai-message {
  min-width: 0;
  margin-bottom: 24px;
  overflow-wrap: anywhere;
}
.ep-ai-message[data-role="user"] {
  background: #08684a09;
  border: 1px solid #08684a20;
  padding: 16px 20px;
  border-radius: 16px 16px 4px 16px;
  margin-left: clamp(0px, 5vw, 48px);
}
.ep-ai-author {
  color: var(--ep-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.ep-ai-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.ep-ai-message-actions button {
  font-size: 12px;
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 44px;
  color: var(--ep-emerald-deep);
}
.ep-ai-message-actions button:hover {
  background: #08684a0c;
}
.ep-ai-composer {
  border-top: 1px solid #08684a22;
  padding: 16px 20px;
  background: var(--ep-ivory);
}
.ep-ai-composer textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  resize: vertical;
  font-size: 16px;
  border: 1px solid #08684a38;
  background: #fffdf8;
  border-radius: 12px;
  padding: 14px;
  color: var(--ep-ink);
}
.ep-ai-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.ep-ai-controls select {
  min-width: 0;
  max-width: 100%;
  font-size: 14px;
  color: var(--ep-ink);
  background: #fffdf8;
  border: 1px solid #08684a30;
  padding: 8px 10px;
  border-radius: 9px;
}
.ep-ai-submit {
  margin-left: auto;
  background: var(--ep-emerald);
  color: var(--ep-ivory);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}
.ep-ai-policy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--ep-muted);
  line-height: 1.5;
  margin: 10px 0;
}
.ep-ai-policy input {
  min-width: 20px;
  height: 20px;
}
.ep-ai-error {
  border: 1px solid #a7323238;
  color: #812525;
  background: #fff0ed;
  padding: 14px;
  border-radius: 10px;
  font-size: 13px;
}
.ep-rich-text {
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.ep-rich-text p {
  margin: 0 0 12px;
  white-space: pre-wrap;
}
.ep-rich-text h3,
.ep-rich-text h4 {
  font-weight: 650;
  line-height: 1.4;
  margin: 18px 0 10px;
}
.ep-rich-text h3 {
  font-size: 19px;
}
.ep-rich-text h4 {
  font-size: 16px;
}
.ep-rich-text ul,
.ep-rich-text ol {
  padding-left: 22px;
  margin-bottom: 14px;
}
.ep-rich-text ul {
  list-style: disc;
}
.ep-rich-text ol {
  list-style: decimal;
}
.ep-rich-text pre {
  background: var(--ep-charcoal);
  color: var(--ep-ivory);
  overflow-x: auto;
  max-width: 100%;
  border-radius: 12px;
  padding: 16px;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre;
}
.ep-rich-text code {
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.ep-rich-text p code {
  background: #08684a0c;
  padding: 2px 5px;
  border-radius: 4px;
}
.ep-rich-text a {
  color: var(--ep-emerald);
  text-decoration: underline;
}
.ep-agent-roster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}
.ep-agent-card {
  padding: 20px;
  min-width: 0;
  text-align: left;
  border-radius: var(--ep-radius);
  border: 1px solid #08684a30;
  background: var(--card, #fffdf8);
}
.ep-agent-card:hover {
  border-color: var(--ep-emerald);
  box-shadow: var(--ep-shadow);
}
.ep-agent-card .ep-activity {
  margin-top: 18px;
  padding: 12px;
}
.ep-experience-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.ep-experience-progress span {
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #08684a30;
}
.ep-experience-progress span[data-complete="true"] {
  color: var(--ep-emerald-deep);
  background: #08684a12;
}
.ep-agent-seat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid #08684a30;
  border-radius: 15px;
  background: #fffdf8;
  text-align: left;
  min-width: 0;
}
.ep-agent-seat:hover {
  border-color: var(--ep-emerald);
  box-shadow: var(--ep-shadow);
}
.ep-agent-seat small {
  display: block;
  font-size: 12px;
  color: var(--ep-muted);
  margin-top: 4px;
}
.ep-agent-initial {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--ep-ivory);
  background: var(--ep-emerald);
  font-weight: 650;
}
.ep-inline-dialog {
  border: 1px solid #08684a30;
  padding: 18px;
  border-radius: 15px;
  background: var(--ep-ivory);
  margin-bottom: 16px;
}
.ep-inline-dialog input {
  border: 1px solid #08684a30;
  padding: 10px;
  border-radius: 8px;
  width: 100%;
  background: white;
}
@keyframes ep-activity-pulse {
  50% {
    box-shadow: 0 0 0 6px #08684a14;
    opacity: 0.65;
  }
}
@media (max-width: 767px) {
  .ep-ai-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .ep-ai-history {
    position: static;
    max-height: 240px;
  }
  .ep-ai-messages {
    padding: 16px;
    max-height: 54dvh;
  }
  .ep-ai-composer,
  .ep-ai-topbar {
    padding: 14px;
  }
  .ep-ai-message[data-role="user"] {
    padding: 12px 14px;
    margin-left: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ep-experience *,
  .ep-experience *::before,
  .ep-experience *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
