/* Creator center: the author's script list. Tokens come from shell.css. */

.creator {
  max-width: 960px;
  padding: clamp(28px, 4vw, 48px) clamp(20px, 4vw, 48px) 80px;
}

.creator h1 {
  margin: 0;
  color: var(--studio-ink-strong);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

/* ---------- no access ---------- */

.creator-denied { max-width: 560px; }

.creator-denied p {
  margin: 12px 0 0;
  color: var(--studio-ink-muted);
}

.denied-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* ---------- script list ---------- */

.drafts-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.drafts-count {
  color: var(--studio-ink-faint);
  font-size: 13px;
}

.creator-status { margin: 0; color: var(--studio-ink-muted); }
.creator-status:empty { display: none; }
.creator-status.is-error { color: var(--studio-accent); }

.draft-table {
  width: 100%;
  border-collapse: collapse;
}

.draft-table th,
.draft-table td {
  padding: 14px 12px;
  text-align: left;
  vertical-align: baseline;
  border-bottom: 1px solid var(--studio-rule);
}

.draft-table thead th {
  padding-top: 0;
  padding-bottom: 8px;
  color: var(--studio-ink-faint);
  font-size: 12px;
  font-weight: 400;
  border-bottom-color: var(--studio-rule-strong);
}

.draft-table th:first-child,
.draft-table td:first-child { padding-left: 0; }

.draft-table th:last-child,
.draft-table td:last-child { padding-right: 0; text-align: right; }

/* The whole row opens the script; the title link carries the name for screen readers. */
.draft-row { position: relative; }

.draft-row:hover { background: var(--studio-hover); }

.draft-row th { font-weight: 400; }

.draft-link {
  color: var(--studio-ink-strong);
  font: 600 17px/1.4 var(--studio-display);
  text-decoration: none;
}

.draft-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.draft-row:hover .draft-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.draft-link:focus-visible { outline: none; }
.draft-link:focus-visible::after { outline: 2px solid var(--studio-accent); outline-offset: -2px; }

.draft-key {
  display: block;
  margin-top: 2px;
  color: var(--studio-ink-faint);
  font: 12px/1.4 var(--studio-mono);
}

.draft-permission,
.draft-updated {
  color: var(--studio-ink-muted);
  font-size: 13px;
  white-space: nowrap;
}

.draft-permission.is-read { color: var(--studio-ochre); }

.draft-empty {
  padding: 32px 0;
  border-top: 1px solid var(--studio-rule-strong);
  border-bottom: 1px solid var(--studio-rule);
  color: var(--studio-ink-muted);
}

.draft-empty p { margin: 0; }

.creator-hint {
  margin: 28px 0 0;
  color: var(--studio-ink-faint);
  font-size: 13px;
}

.creator-hint a {
  color: var(--studio-ink-muted);
  text-underline-offset: 3px;
}

.creator-hint a:hover { color: var(--studio-accent); }

@media (max-width: 640px) {
  .draft-table thead { display: none; }
  .draft-table tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 0; border-bottom: 1px solid var(--studio-rule); }
  .draft-table th,
  .draft-table td { padding: 0; border: 0; }
  .draft-row th { grid-column: 1 / -1; margin-bottom: 4px; }
  .draft-table td:last-child { text-align: right; }
}
