/* Documentation library and desktop-style file picker. */
.documentation-theme .welcome {
  display: grid; grid-template-columns: 292px minmax(0, 1fr); align-items: stretch;
  gap: 0; padding: 0; min-height: calc(100vh - 68px); overflow: visible;
}
.documentation-theme .welcome::before { display: none; }
.library-sidebar { display: flex; flex-direction: column; padding: 30px 18px 18px; border-right: 1px solid var(--line); background: var(--panel); min-width: 0; }
.library-sidebar > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.library-eyebrow { display: block; font-size: 9px; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
.documentation-theme .library-sidebar h2 { margin: 8px 0 0; font: 700 22px/1.1 Inter, system-ui, sans-serif; letter-spacing: -.04em; }
#libraryCount { display: inline-block; margin-left: 5px; padding: 3px 7px; border-radius: 6px; background: var(--paper); font: 600 11px/1.2 system-ui; color: var(--muted); vertical-align: middle; }
#refreshLibrary { border: 1px solid var(--line); border-radius: 8px; background: transparent; width: 30px; height: 30px; cursor: pointer; font-size: 18px; }
.file-search { display: block; margin: 0 !important; }
.file-search > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.file-search input { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: 12px/1.3 Inter,system-ui,sans-serif; }
.library-status { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 14px 0; }
.library-status:empty { display: none; }
.library-list { flex: 1; margin-top: 18px; overflow-y: auto; max-height: calc(100vh - 280px); min-height: 150px; }
.library-list details { margin: 6px 0; }
.library-list summary { padding: 10px 6px; font-size: 12px; font-weight: 650; cursor: pointer; overflow-wrap: anywhere; }
.library-folder-contents { margin-left: 9px; padding-left: 7px; border-left: 1px solid var(--line); }
.library-file { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 10px 6px; text-align: left; border-radius: 7px; cursor: pointer; min-width: 0; }
.library-file:hover, .library-file:focus-visible { background: var(--paper); }
.document-icon { display: inline-grid; place-items: center; flex: 0 0 28px; width: 28px; height: 32px; border: 1px solid #cbd7f4; background: #eef3ff; color: #36599c; border-radius: 5px; font: 800 8px/1 system-ui; }
.kind-html { background: #fff2e8; border-color: #efd3bd; color: #a05228; }
.kind-openapi { background: #e9f5f0; border-color: #b8ddcc; color: #247251; }
.file-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; min-width: 0; }
.library-sidebar > footer { border-top: 1px solid var(--line); padding: 18px 4px 0; font-size: 11px; color: var(--muted); }
.studio-start { width: 100%; max-width: 1080px; padding: clamp(36px,6vw,86px) clamp(24px,6vw,90px); margin: auto; }
.documentation-theme .studio-start h1 { max-width: 750px; font-size: clamp(34px,4.5vw,62px); line-height: 1.08; letter-spacing: -.055em; }
.documentation-theme .studio-start h1 em { font-style: normal; }
.studio-start .eyebrow { font-size: 10px; margin-bottom: 20px; letter-spacing: .16em; }
.studio-start .intro { max-width: 540px; font-size: 15px; line-height: 1.7; margin: 22px 0 30px; }
.documentation-theme .studio-start .open-card { padding: 0; border: 0; box-shadow: none; background: transparent; }
.studio-start .drop-zone { min-height: 115px; border-radius: 12px; background: var(--panel); padding: 20px; }
.studio-start .paste-markdown { margin-top: 12px; padding: 18px; border-radius: 10px; background: var(--panel); }
.studio-formats { font-size: 9px; letter-spacing: .1em; color: var(--muted); margin-top: 24px; }
.studio-formats span { padding: 0 9px; }
.library-guest { padding: 35px 4px; }
.library-guest > span { font-size: 30px; color: var(--muted); }
.library-guest h3 { font-size: 16px; line-height: 1.4; }
.library-guest p { color: var(--muted); font-size: 13px; line-height: 1.7; margin-bottom: 24px; }
.library-guest .button { display: inline-block; text-decoration: none; border-radius: 7px; font-size: 12px; }
#savedFilesDialog { width: min(980px, calc(100vw - 32px)); border-radius: 12px; box-shadow: 0 25px 90px #0005; border: 1px solid var(--line); }
#savedFilesDialog > header { padding: 14px 20px; }
#savedFilesDialog > header h2 { font-size: 16px; }
.file-explorer { display: grid; grid-template-columns: 210px minmax(0,1fr); min-height: 420px; height: min(540px,70vh); }
.explorer-sidebar { overflow-y: auto; padding: 22px 12px; border-right: 1px solid var(--line); background: var(--paper); }
.explorer-sidebar > span { padding: 0 12px 18px; }
.folder-location { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; overflow-wrap: anywhere; }
.folder-location[aria-current="location"], .folder-location:hover { background: var(--panel); color: var(--accent); }
.explorer-content { min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.explorer-toolbar { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.explorer-toolbar .file-search { max-width: 190px; }
#fileBreadcrumbs { font-size: 11px; display: flex; align-items: center; flex-wrap: wrap; min-width: 0; }
.breadcrumb-button { background: transparent; border: 0; font-size: 11px; padding: 5px 3px; cursor: pointer; overflow-wrap: anywhere; }
.explorer-content > .library-status { padding: 0 18px; }
#savedFilesList { display: block; flex: 1; overflow-y: auto; margin: 0; padding: 0 12px; }
.explorer-row { display: grid; grid-template-columns: 30px minmax(0,1fr) 115px 50px; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 11px 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.explorer-row:hover, .explorer-row:focus-visible { background: var(--paper); }
.folder-row { display: block; font-size: 13px; font-weight: 600; padding: 17px 10px; color: var(--accent); overflow-wrap: anywhere; }
.file-date, .file-size { font-size: 11px; color: var(--muted); }
.explorer-columns { position: sticky; top: 0; background: var(--panel); font-size: 10px; font-weight: 700; color: var(--muted); cursor: default; z-index: 1; }
.explorer-content > footer { padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
@media(max-width:900px) {
  .documentation-theme .welcome { grid-template-columns: 230px minmax(0,1fr); }
  .studio-start { padding: 35px 24px; }
  .studio-start .drop-zone { flex-wrap: wrap; }
  .studio-start .drop-zone .button { width: 100%; }
}
@media(max-width:640px) {
  .documentation-theme .welcome { display: flex; flex-direction: column; }
  .library-sidebar { padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .library-sidebar > header { margin-bottom: 12px; }
  .library-list { max-height: 230px; min-height: 0; }
  .library-sidebar > footer { display: none; }
  .library-guest { padding: 0; }
  .library-guest > span, .library-guest h3 { display: none; }
  .library-guest p { margin: 0 0 12px; }
  .file-explorer { grid-template-columns: 125px minmax(0,1fr); min-height: 330px; }
  .explorer-sidebar { padding: 16px 4px; }
  .explorer-toolbar { flex-direction: column; align-items: stretch; padding: 10px; }
  .explorer-toolbar .file-search { max-width: none; }
  .explorer-row { grid-template-columns: 26px minmax(0,1fr); gap: 7px; }
  .file-date, .file-size, .explorer-columns { display: none; }
  .studio-formats { line-height: 1.8; }
}
