/* HyperUI component adaptations, MIT © Mark Mead.
 * Source: reference/hyperui/manifest.json; license: reference/hyperui/LICENSE.
 * Sidebar / vertical-menu, pill tabs, inputs, buttons, media cards and empty states.
 * Utility declarations are translated into reusable local component selectors.
 */
.hyperui-app {
  --hui-bg: #fafafa;
  --hui-paper: #fff;
  --hui-subtle: #f5f5f5;
  --hui-border: #e5e5e5;
  --hui-ink: #181818;
  --hui-muted: #666;
  --hui-faint: #8a8a8a;
  --hui-brand: #5755c6;
  --hui-focus: #5755c6;
  --hui-focus-shadow: 0 0 0 3px rgb(24 24 24 / .1), 0 3px 12px rgb(24 24 24 / .12);
  --hui-radius: 8px;
  --bg: var(--hui-bg);
  --paper: var(--hui-paper);
  --ink: var(--hui-ink);
  --muted: var(--hui-muted);
  --quiet: var(--hui-faint);
  --line: var(--hui-border);
  --orange: var(--hui-ink);
  --radius: var(--hui-radius);
  --gutter: 24px;
  margin: 0;
  background: var(--hui-bg);
  color: var(--hui-ink);
  font-family: StudioInter, Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
.hyperui-app :is(button, input, textarea, select) { font-family: inherit; }
.hyperui-app :is(button, a) { transition: color .15s, background-color .15s, border-color .15s; }
.hyperui-app button:active { transform: none; }
.hyperui-app :is(button, a, input, textarea, select, summary):focus-visible {
  outline: 2px solid #666;
  outline-offset: 2px;
  box-shadow: none;
}
.hyperui-app .footer-tools [data-action="favorite"]:focus-visible,
.hyperui-app .reference-upload-button:focus-visible,
.hyperui-app .brand-guidelines-source a:focus-visible {
  outline: 2px solid #666;
  outline-offset: 2px;
  box-shadow: none;
}
.hyperui-app :is(button, input, select, textarea):disabled { opacity: .45; cursor: not-allowed; }
.hyperui-app :is(button, a)[aria-busy="true"] { cursor: progress; }
.hyperui-app :is(.orange-button, .new-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid var(--hui-ink);
  border-radius: var(--hui-radius);
  background: var(--hui-ink);
  color: #fff;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
}
.hyperui-app :is(.orange-button, .new-button):hover:not(:disabled) { background: #333; border-color: #333; color: #fff; }
.hyperui-app :is(.orange-button, .new-button) svg { width: 16px; height: 16px; }
.hyperui-app .quiet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--hui-border);
  border-radius: var(--hui-radius);
  background: var(--hui-paper);
  color: var(--hui-ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  box-shadow: none;
}
.hyperui-app .quiet-button:hover:not(:disabled) { background: var(--hui-subtle); border-color: #d4d4d4; }
.hyperui-app :is(.round-button, .icon-button) {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 8px;
  border: 1px solid var(--hui-border);
  border-radius: var(--hui-radius);
  background: var(--hui-paper);
  color: var(--hui-muted);
}
.hyperui-app :is(.round-button, .icon-button):hover:not(:disabled) { background: var(--hui-subtle); color: var(--hui-ink); }
.hyperui-app :is(.round-button, .icon-button) svg { width: 18px; height: 18px; }
.hyperui-app .field-group :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select) {
  width: 100%;
  border: 1px solid #d4d4d4;
  border-radius: var(--hui-radius);
  padding: 10px 12px;
  background: #fff;
  color: var(--hui-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  box-shadow: none;
}
.hyperui-app .field-group :is(input, textarea)::placeholder { color: var(--hui-faint); opacity: 1; }
.hyperui-app :is(input:where(:not([type]), [type="text"], [type="search"], [type="email"], [type="password"], [type="number"], [type="url"], [type="tel"]), textarea, select:not(.content-filter-more):not(.more-types)):focus {
  outline: none;
  box-shadow: var(--hui-focus-shadow);
}
.hyperui-app :is(.field-group > label, .field-label, .copy-label > label) {
  color: #404040;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.5;
}
.hyperui-app .field-hint { color: var(--hui-muted); font-size: 12px; line-height: 1.75; }

/* Keep the existing workbench layout. HyperUI styling only. */
.hyperui-app .rail-brand { color: var(--hui-muted); }
.hyperui-app .rail-tools .active { color: var(--hui-ink); }
.hyperui-app .top-nav .nav-item { color: var(--hui-muted); }
.hyperui-app .top-nav .nav-item.active { color: var(--hui-ink); }
.hyperui-app .nav-item.active::before { background: var(--hui-ink); }
.hyperui-app .search-wrap { border-color: var(--hui-border); }
.hyperui-app .search-wrap input { color: var(--hui-ink); }
.hyperui-app .search-wrap input::placeholder { color: #a3a3a3; }
.hyperui-app .filter { border: 1px solid transparent; border-radius: 999px; background: #f0f0f0; color: var(--hui-muted); font-weight: 500; }
.hyperui-app .filter:hover { background: #e8e8e8; color: var(--hui-ink); }
.hyperui-app .filter:focus-visible { outline: 2px solid #666; outline-offset: 2px; box-shadow: none; }
.hyperui-app .filter.active { color: #fff; background: var(--hui-ink); box-shadow: none; }
.hyperui-app .filter-dot { background: currentColor; border-color: #fff; }
.hyperui-app .filter-count { color: var(--hui-faint); }
.hyperui-app .filter.active .filter-count { color: #fff; }
.hyperui-app .filter-end { color: var(--hui-muted); }
.hyperui-app .filter > svg { flex: none; width: 16px; height: 16px; stroke-width: 1.7; }
.hyperui-app .filter-select { position: relative; display: inline-flex; align-items: center; }
.hyperui-app .filter-select-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: flex; color: var(--hui-muted); pointer-events: none; }
.hyperui-app .filter-select-icon svg { width: 16px; height: 16px; stroke-width: 1.7; }
.hyperui-app .filter-select.active .filter-select-icon { color: #fff; }
.hyperui-app .content-filters .content-filter-more { padding-left: 36px; }
.hyperui-app .tile-surface { border: 1px solid var(--hui-border); border-radius: var(--hui-radius); }
.hyperui-app .tile:hover .tile-surface { border-color: #c8c8c8; box-shadow: none; transform: none; }
.hyperui-app .tile-caption { color: var(--hui-muted); }
.hyperui-app .tile-favorite { border: 1px solid #e5e5e5; border-radius: 6px; background: #fffffff0; color: var(--hui-muted); box-shadow: none; }
.hyperui-app .tile-favorite.saved { color: var(--hui-brand); }
.hyperui-app .tile-favorite:hover { background: #fff; color: var(--hui-ink); }
.hyperui-app .tile-overlay { box-shadow: none; }
.hyperui-app .compose-card { border: 1px solid var(--hui-border); border-radius: var(--hui-radius); }
.hyperui-app .compose-card .eyebrow { color: var(--hui-faint); }
.hyperui-app .compose-card textarea { color: var(--hui-ink); }
.hyperui-app .compose-actions small { color: var(--hui-muted); }
.hyperui-app .compose-actions button { border-radius: 6px; background: var(--hui-ink); }
.hyperui-app .empty-state { color: var(--hui-muted); }
.hyperui-app .empty-state .empty-brand { background: #f0f0f0; border: 1px solid #e5e5e5; box-shadow: none; color: var(--hui-muted); }
.hyperui-app .empty-state h1 { color: var(--hui-ink); }
.hyperui-app .empty-state p { color: var(--hui-muted); }
.hyperui-app .toast { border: 1px solid var(--hui-border); border-radius: var(--hui-radius); color: var(--hui-ink); box-shadow: 0 8px 28px #00000014; }
.hyperui-app .local-file-notice { color: var(--hui-ink); }
/* Button interaction feedback uses color/borders; shadows belong to text entry. */
.hyperui-app :is(button, a, summary, [role="button"]),
.hyperui-app :is(button, a, summary, [role="button"]):is(:hover, :active, :focus) { box-shadow: none; }
.hyperui-app .content-filter-more:is(:focus, :focus-visible) { box-shadow: none; }
.hyperui-app .field-group select.more-types { box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .hyperui-app *, .hyperui-app *::before, .hyperui-app *::after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .hyperui-app :is(button, a, input, textarea, select, summary):focus-visible,
  .hyperui-app .footer-tools [data-action="favorite"]:focus-visible,
  .hyperui-app .reference-upload-button:focus-visible,
  .hyperui-app .brand-guidelines-source a:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
    box-shadow: none;
  }
}
