.ds-library {
  --ds-accent: var(--site-accent, #2563eb);
  --ds-surface: var(--background-color-1, #fff);
  --ds-muted: var(--text-color-4, #697583);
  color: var(--text-color-2, #263546);
}
.ds-library *, .ds-library *::before, .ds-library *::after { box-sizing: border-box; }
.ds-library [hidden] { display: none !important; }
.ds-library .ds-hero {
  padding: 32px;
  border: 1px solid var(--border-color, #e3e9ef);
  border-radius: 18px;
  background: linear-gradient(115deg, rgba(8,126,170,.10), rgba(8,126,170,.02));
}
.ds-library .ds-eyebrow { color: var(--ds-accent); font-size: 11px; font-weight: 700; letter-spacing: 2px; }
.ds-library .ds-hero h1 { margin: 10px 0 12px; padding: 0; border: 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.4; }
.ds-library .ds-hero p { margin: 0; color: var(--ds-muted); font-size: 14px; }
.ds-library .ds-summary { display: flex; gap: 12px 24px; flex-wrap: wrap; margin-top: 24px; font-size: 12px; color: var(--ds-muted); }
.ds-library .ds-summary strong { color: var(--text-color-2); font-size: 19px; margin-right: 4px; }
.ds-library .ds-controls { margin: 26px 0; }
.ds-library .ds-search { display: block; font-size: 12px; color: var(--ds-muted); }
.ds-library .ds-search > span { display: block; margin-bottom: 8px; }
.ds-library .ds-search input { display: block; width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--border-color, #dbe3ea); border-radius: 10px; color: inherit; background: var(--ds-surface); font: inherit; font-size: 14px; }
.ds-library .ds-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ds-library .ds-filters button { border: 1px solid var(--border-color, #dbe3ea); background: var(--ds-surface); color: var(--ds-muted); border-radius: 20px; padding: 7px 14px; font: inherit; font-size: 12px; cursor: pointer; }
.ds-library .ds-filters button.is-active { background: var(--ds-accent); border-color: var(--ds-accent); color: #fff; }
.ds-library input:focus-visible, .ds-library button:focus-visible, .ds-library a:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 3px; }
.ds-library .ds-list-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 26px 0 16px; }
.ds-library .ds-list-heading h2 { font-size: 17px; margin: 0; padding: 0; border: 0; }
.ds-library .ds-list-heading > span { color: var(--ds-muted); font-size: 12px; }
.ds-library .ds-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.ds-library .ds-folder { min-width: 0; border: 1px solid var(--border-color, #e3e9ef); border-radius: 12px; background: var(--ds-surface); overflow: hidden; }
.ds-library .ds-folder[open] { grid-column: 1 / -1; }
.ds-library .ds-folder summary { display: flex; align-items: center; gap: 16px; padding: 22px; cursor: pointer; list-style: none; }
.ds-library .ds-folder summary::-webkit-details-marker { display: none; }
.ds-library .ds-folder summary:hover { background: rgba(37,99,235,.04); }
.ds-library .ds-folder summary:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: -3px; }
.ds-library .ds-folder-icon { position: relative; display: block; flex: 0 0 38px; height: 28px; border-radius: 3px 5px 5px 5px; background: #efb94d; margin-top: 5px; }
.ds-library .ds-folder-icon::before { content: ''; position: absolute; top: -6px; width: 17px; height: 8px; border-radius: 4px 4px 0 0; background: #efb94d; }
.ds-library .ds-folder-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ds-library .ds-folder-info strong { font-size: 17px; overflow-wrap: anywhere; }
.ds-library .ds-folder-info > span { font-size: 12px; color: var(--ds-muted); }
.ds-library .ds-folder-chevron { margin-left: auto; font-size: 24px; color: var(--ds-muted); }
.ds-library .ds-folder[open] .ds-folder-chevron { transform: rotate(90deg); }
.ds-library .ds-files { border-top: 1px solid var(--border-color, #e3e9ef); padding: 0 22px; }
.ds-library .ds-file { display: flex; align-items: center; gap: 14px; padding: 20px 0; }
.ds-library .ds-file + .ds-file { border-top: 1px solid var(--border-color, #e3e9ef); }
.ds-library .ds-file-icon { display: inline-flex; flex: 0 0 36px; align-items: center; justify-content: center; height: 44px; border: 1px solid rgba(37,99,235,.22); border-radius: 5px 12px 5px 5px; background: rgba(37,99,235,.06); color: var(--ds-accent); font-size: 10px; font-weight: 700; }
.ds-library .ds-file-info { flex: 1; min-width: 0; }
.ds-library .ds-file h3 { margin: 0 0 10px; padding: 0; border: 0; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.ds-library .ds-metadata { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--ds-muted); }
.ds-library .ds-metadata > span { padding: 2px 7px; border-radius: 5px; background: var(--background-color-2, #f4f6f8); }
.ds-library .ds-metadata .ds-preliminary { color: #b47719; background: rgba(204,148,33,.12); }
.ds-library .ds-file-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ds-library a.ds-download, .ds-library .ds-copy { padding: 7px 10px; font: inherit; font-size: 12px; line-height: 1.5; border: 1px solid var(--border-color, #e3e9ef); border-radius: 7px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.ds-library a.ds-download { color: #fff; background: var(--ds-accent); border-color: var(--ds-accent); }
.ds-library .ds-copy { background: transparent; color: var(--ds-accent); }
.ds-library .ds-copy:hover { background: rgba(37,99,235,.06); }
.ds-library .ds-copy:disabled { cursor: wait; opacity: .7; }
.ds-library .ds-unavailable, .ds-library .ds-notice { color: var(--ds-muted); font-size: 13px; }
.ds-library .ds-empty { padding: 48px 20px; text-align: center; color: var(--ds-muted); font-size: 14px; background: var(--background-color-2, #f4f6f8); border-radius: 12px; }
.ds-library .ds-footer { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border-color, #e3e9ef); color: var(--ds-muted); font-size: 12px; }
.ds-library .ds-footer p { margin: 0 0 10px; }
.ds-library .ds-footer > div { display: flex; flex-wrap: wrap; gap: 12px 24px; }
@media (max-width: 600px) {
  .ds-library .ds-hero { padding: 22px 18px; }
  .ds-library .ds-summary { gap: 10px 16px; }
  .ds-library .ds-summary > span:last-child { width: 100%; }
  .ds-library .ds-grid { grid-template-columns: 1fr; }
  .ds-library .ds-folder summary { padding: 20px 16px; }
  .ds-library .ds-files { padding: 0 16px; }
  .ds-library .ds-file { flex-wrap: wrap; gap: 12px; }
  .ds-library .ds-file-actions { width: 100%; padding-left: 48px; }
}
