/* Explore: the public gallery. The rail, toolbar, cards and empty state are the workspace's;
   this file adds only the visible AI disclosure, the model line and the two closed disclosures
   that hold a prompt or the full text of a written work. */

.explore {
  --ws-max: 1180px;
}

.explore .ws-lead {
  max-width: 72ch;
}

/* The page-level note covers the whole gallery; each card repeats the badge on itself. Titles
   and prompts may be written by the owner, so the note says exactly what is AI-generated. */
.ex-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  margin-top: var(--s4);
  padding: var(--s3) var(--s4);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--accent-dim);
  border-radius: var(--r-card);
  color: var(--secondary);
  font-size: 13.5px;
  line-height: 1.7;
}

.ex-notice > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Every card says, visibly and without interaction, that the work is AI-generated. */
.ex-ai-badge {
  position: absolute;
  z-index: 2;
  top: var(--s2);
  right: var(--s2);
  padding: 2px var(--s2);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ex-ai-badge--inline {
  position: static;
  flex: none;
}

.ex-card .ws-body {
  gap: var(--s2);
  padding-bottom: var(--s4);
}

/* Kind, model and publication time wrap as separate facts rather than one long sentence. */
.ex-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 2px var(--s3);
}

.ex-fact {
  overflow-wrap: anywhere;
}

.ex-model {
  color: var(--secondary);
  font-weight: 600;
}

/* Markers stay visible: a closed summary is the only affordance for the hidden text. */
.ex-disclosure {
  margin-top: var(--s1);
  border-top: 1px solid var(--line);
}

.ex-summary {
  min-height: 44px;
  padding: var(--s2) 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  list-style-position: inside;
  cursor: pointer;
}

.ex-summary:hover {
  color: var(--text);
}

.ex-disclosure[open] .ex-summary {
  color: var(--text);
}

.ex-prompt-text,
.ex-fulltext-body {
  margin: 0 0 var(--s2);
  padding: var(--s3);
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ex-fulltext-body {
  color: var(--text);
  font-size: 14px;
  line-height: 1.85;
}

.ex-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s3);
}

.ex-error p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ex-retry {
  flex: none;
}

.ex-foot {
  margin-top: var(--s8);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 560px) {
  .ex-facts {
    gap: 2px var(--s2);
  }

  .ex-notice {
    padding: var(--s3);
  }
}
