/* Creator model tools use the shared search toolbar; only creator-specific
   fields and source sections need additional layout rules. */
.author-search-toolbar.public-toolbar { margin-top: 0; }
.author-search-toolbar .public-toolbar-summary h2 { overflow-wrap: anywhere; }
.author-model-range { display: block; font-size: .82rem; }
.author-search-field { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-weight: 900; }
.author-search-field input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: #121a22; color: var(--text); padding: 9px 10px; font: inherit; }
.author-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.author-filter-actions button { display: inline-flex; align-items: center; gap: 7px; }
.author-share-status:empty { display: none; }
.author-share-status { flex-basis: 100%; color: var(--muted); font-size: .85rem; }
.author-source-section + .author-source-section { margin-top: 28px; }
.author-source-section > header { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.author-source-section h4 { margin: 0; font-size: 1.15rem; }
.author-source-section > header > span { color: var(--muted); font-size: .85rem; }
.author-search-pagination { padding-right: 0; }
.author-search-toolbar :is(button, input, select, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 760px) {
  .author-search-toolbar.public-toolbar { grid-template-columns: minmax(0, 1fr); }
  .author-search-toolbar .public-sort-control { min-width: 0; }
  .author-search-toolbar .public-sort-control select { min-width: 0; flex: 1; }
  .author-search-pagination.public-pagination { justify-content: center; gap: 8px; }
}
/* ============================================================
   Creators page overhaul
   Left-aligned index profile: identity + one action + models,
   secondary panels demoted to a quiet column and disclosures.
   ============================================================ */

/* --- Hero search hint and directory note --- */
.author-search-hint { margin: var(--space-3) 0 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.55; }
.author-directory-note { display: grid; gap: var(--space-3); }
.author-directory-note p { margin: 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.6; }
.author-directory-note strong { color: var(--text); }

/* --- Creator directory cards: quieter, one accent, hairline meta --- */
.author-card { border: 1px solid var(--line); border-radius: var(--edge); background: var(--panel); padding: 1rem; gap: .85rem; }
.author-card:hover { transform: none; border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); box-shadow: none; background: var(--panel-2); }
.author-card-image { border-radius: var(--edge); border-color: var(--line); }
.author-card-title span { color: var(--muted); font-weight: 700; font-size: .72rem; }
.author-card-title .verified-author-icon { color: var(--accent); }
.author-card-meta { border-top-color: var(--line); }
.author-card-meta .author-card-match { color: var(--muted); }

/* --- Profile: identity block --- */
.author-profile-panel { border: 1px solid var(--line); border-radius: var(--edge); background: var(--panel); background-image: none; }
.author-profile-header { align-items: start; padding: clamp(1.1rem, 2.5vw, 1.75rem); gap: var(--space-5); border-bottom: 1px solid var(--line); }
.author-profile-identity { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--space-5); align-items: start; min-width: 0; }
.author-profile-intro { min-width: 0; display: grid; gap: .35rem; }
.author-profile-avatar { width: 88px; height: 88px; border: 1px solid var(--line); border-radius: var(--edge); background: var(--panel-2); font-size: 2rem; }
.author-verified-state { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .08em; text-transform: uppercase; }
.author-verified-state.verified { color: color-mix(in srgb, var(--accent) 80%, var(--text)); }
.author-verified-state.verified i { color: var(--accent); }
.author-profile-name { margin: 0; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.02; overflow-wrap: anywhere; }
.author-profile-summary { margin: 0; color: var(--muted); font-size: var(--text-md); }
.author-profile-bio { margin: .35rem 0 0; color: var(--text); line-height: 1.6; max-width: 68ch; }
.author-owner-line { margin-top: .35rem !important; font-weight: 700; }
.author-owner-line i { color: var(--accent); }

/* --- Profile: action row (one shared box metric) --- */
.author-profile-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.author-action {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--edge);
  background: transparent; color: var(--text);
  font: inherit; font-size: var(--text-sm); font-weight: 700; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.author-action:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--accent); }
.author-action.primary { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); color: var(--accent); }
.author-action strong { font-family: var(--font-mono); font-weight: 600; color: inherit; }
.author-action.danger { border-color: color-mix(in srgb, #f87171 45%, var(--line)); color: #fca5a5; }
.author-like-button.active, .author-follow-button.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.author-more { position: relative; }
.author-more > summary { list-style: none; }
.author-more > summary::-webkit-details-marker { display: none; }
.author-more[open] > summary { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--accent); }
.author-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: grid; min-width: 220px; padding: var(--space-2); border: 1px solid var(--line); border-radius: var(--edge); background: var(--panel); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.author-more-menu .author-action { border: 0; justify-content: flex-start; width: 100%; }
.author-more-menu .author-action:hover { background: var(--panel-2); }

/* --- Profile: figures ledger --- */
.author-profile-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--line); }
.author-profile-figures > div { min-width: 0; padding: var(--space-4) clamp(1rem, 2.5vw, 1.75rem); border-right: 1px solid var(--line); }
.author-profile-figures > div:last-child { border-right: 0; }
.author-profile-figures dt { margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .1em; text-transform: uppercase; }
.author-profile-figures dd { margin: var(--space-2) 0 0; color: var(--text); font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; }

/* --- Profile: two columns, models first --- */
/* Main column on the left (wide), side panel on the right (narrow). The
   explicit grid-column placement in styles.css assumed the opposite column
   order, so reset it here or the models column gets squeezed into 340px. */
.author-profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 0; }
.author-profile-main-column { grid-column: auto; grid-row: auto; }
.author-profile-side { grid-column: auto; grid-row: auto; }
.author-profile-main-column { min-width: 0; display: grid; align-content: start; border-right: 1px solid var(--line); }
.author-profile-side { min-width: 0; display: grid; align-content: start; gap: var(--space-4); padding: var(--space-5) var(--space-4); background: color-mix(in srgb, var(--bg) 40%, transparent); }
.author-side-section { padding: 0; border: 0; }
.author-profile-side .author-source-list { display: grid; gap: var(--space-3); }
.author-section-title { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-3); color: var(--text); font-size: 1.02rem; }
.author-section-title i { color: var(--accent); }

/* --- Profile: quiet disclosures --- */
.author-disclosure { border-top: 1px solid var(--line); padding-top: var(--space-3); }
.author-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); cursor: pointer; list-style: none; color: var(--text); font-weight: 700; }
.author-disclosure > summary::-webkit-details-marker { display: none; }
.author-disclosure > summary i { color: var(--muted); transition: transform 150ms ease; }
.author-disclosure[open] > summary i { transform: rotate(180deg); }
.author-disclosure > *:not(summary) { margin-top: var(--space-3); }

/* --- Profile: side panels adopt hairline rows, not cards --- */
.author-profile-side .author-side-card { border: 0; border-radius: 0; background: transparent; padding: 0; }
.author-verification-note { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: var(--space-3); padding: 0; border: 0; background: transparent; }
.author-verification-note > i { width: 34px; height: 34px; border-radius: var(--edge); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.author-verification-note.verified > i { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.author-profile-side .author-claim-panel { grid-template-columns: 1fr; border: 0; border-radius: 0; background: transparent; padding: 0; }
.author-meshscout-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.author-meshscout-stat-grid span { border: 1px solid var(--line); border-radius: var(--edge); background: transparent; }

/* --- Profile: model section becomes the page body --- */
.author-profile-main-column [data-author-model-section] { padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1rem, 2.5vw, 1.75rem) var(--space-6); border-bottom: 1px solid var(--line); }
.author-profile-main-column .author-profile-section { padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1rem, 2.5vw, 1.75rem); border-bottom: 1px solid var(--line); }
.author-model-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--space-4); }
.author-model-card { border: 1px solid var(--line); border-radius: var(--edge); background: var(--panel); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .author-profile-layout { grid-template-columns: 1fr; }
  .author-profile-main-column { border-right: 0; border-bottom: 1px solid var(--line); }
  .author-profile-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .author-profile-figures > div:nth-child(2) { border-right: 0; }
  .author-profile-figures > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .author-profile-header { display: grid; }
  .author-profile-identity { grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-4); }
  .author-profile-avatar { width: 64px; height: 64px; font-size: 1.5rem; }
  .author-profile-actions { justify-content: flex-start; }
  .author-action { flex: 1 1 auto; justify-content: center; }
  .author-more { flex: 1 1 100%; }
  .author-more-menu { position: static; width: 100%; box-shadow: none; }
}

/* --- Action row: defeat the legacy button metrics so every control matches --- */
.author-profile-actions button.author-action,
.author-profile-actions a.author-action {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--edge);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1;
}
.author-profile-actions button.author-action:hover,
.author-profile-actions a.author-action:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--accent); background: transparent; }
.author-profile-actions button.author-action.primary { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); color: var(--accent); }
.author-profile-actions button.author-action.danger { border-color: color-mix(in srgb, #f87171 45%, var(--line)); color: #fca5a5; background: transparent; }
.author-profile-actions button.author-like-button.active,
.author-profile-actions button.author-follow-button.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.author-follow-button.active { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)) !important; color: var(--accent) !important; background: color-mix(in srgb, var(--accent) 14%, transparent) !important; }
.author-profile-actions .author-more-menu button.author-action { border: 0; justify-content: flex-start; width: 100%; }
.author-profile-actions .author-more-menu button.author-action:hover { background: var(--panel-2); }
