.library-shell { color: #25322e; background: #fafaf8; min-height: 100vh; }
.library-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 23px max(24px, calc((100vw - 1080px) / 2)); background: #fff; border-bottom: 1px solid #e1e5de; }
.library-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #2f5643; font-size: 1.2rem; font-weight: 650; }
.library-brand svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.library-brand small { display: block; color: #67756b; font-size: .75rem; font-weight: 400; margin-top: 2px; }
.library-editor-link { color: #365847; font-size: .87rem; text-underline-offset: 4px; }
.library-main { max-width: 1080px; padding: 52px 24px 32px; }
.library-eyebrow { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #6a796f; margin: 0 0 10px; }
.library-main h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 600; letter-spacing: -.035em; margin: 0 0 12px; }
.library-main h1:focus { outline: none; }
.library-intro { color: #66736a; margin: 0 0 32px; max-width: 690px; font-size: .98rem; }
.library-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.library-card { display: flex; align-items: center; gap: 17px; min-height: 112px; box-sizing: border-box; padding: 24px; border: 1px solid #e0e5dd; border-radius: 8px; background: #fff; color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.library-card:hover { background: #f4f8f2; border-color: #a7bbaa; }
.library-card-icon { display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; background: #eff4eb; border-radius: 7px; color: #5b7755; }
.library-card-icon svg { width: 26px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.library-card-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.library-card-text strong { font-size: 1.02rem; font-weight: 600; }
.library-card-text > span { color: #6a766c; font-size: .8rem; line-height: 1.5; }
.library-card-text small { color: #7a867c; font-size: .73rem; }
.library-card-arrow { margin-left: auto; color: #6a8065; }
.library-note { margin: 25px 0 0; color: #758075; font-size: .84rem; }
.library-footer { border-top: 1px solid #e1e5de; margin: 0 auto; max-width: 1080px; padding: 21px 24px; text-align: left; }
.library-footer a, .library-source, .library-breadcrumb a { color: #49644e; text-underline-offset: 3px; }
.library-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: #718071; margin: -16px 0 36px; }
.category-path { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.category-path li { display: flex; align-items: center; gap: 9px; font-size: .85rem; padding: 9px 13px; border: 1px solid #dce4d8; border-radius: 5px; background: #f3f6ee; }
.category-path li span { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: #e2ebdc; color: #546c4b; font-size: .72rem; }
.category-empty-state { border: 1px dashed #cbd7c5; border-radius: 8px; padding: 54px 24px; text-align: center; background: #fff; }
.category-empty-state svg { width: 36px; height: 36px; fill: none; stroke: #8b9d7b; stroke-width: 1.25; stroke-linejoin: round; }
.category-empty-state h2 { font-size: 1.1rem; font-weight: 600; margin: 16px 0 8px; }
.category-empty-state p { color: #71806c; font-size: .9rem; margin: 0 auto; max-width: 510px; }
.library-source { display: inline-block; font-size: .85rem; margin: 25px 0 0; }
.library-back { display: inline-block; margin-bottom: 14px; color: #49644e; font-size: .85rem; text-underline-offset: 3px; }
.reading-mode .library-back { color: #a6debb; }
.library-load-error { padding: 16px 24px; color: #a22419; }
.library-status { color: #6a796f; margin: 0 0 24px; font-size: .9rem; }
.library-publications { display: grid; gap: 12px; }
.library-publication { display: flex; align-items: center; gap: 20px; padding: 24px; border: 1px solid #dce4d8; border-radius: 8px; background: #fff; color: inherit; text-decoration: none; }
.library-publication > span:first-child { display: flex; flex-direction: column; gap: 9px; min-width: 0; flex: 1; }
.library-publication strong { font-size: 1.1rem; font-weight: 600; overflow-wrap: anywhere; }
.library-publication small { color: #6a766c; font-size: .82rem; }
.library-publication:hover, .book-entry:hover { background: #f3f7ef; }
.book-sections { display: grid; gap: 30px; }
.book-section h2 { font-size: 1.12rem; font-weight: 600; margin: 0 0 12px; color: #4d684f; overflow-wrap: anywhere; }
.book-entries { padding: 0; margin: 0; list-style: none; border: 1px solid #dce4d8; border-radius: 8px; background: #fff; }
.book-entries li + li { border-top: 1px solid #e8ece5; }
.book-entry { display: grid; grid-template-columns: 125px minmax(0, 1fr) auto 16px; align-items: center; gap: 20px; padding: 19px 22px; color: inherit; text-decoration: none; }
.book-entry-type { color: #6a766c; font-size: .78rem; line-height: 1.5; text-transform: capitalize; }
.book-entry-title { font-size: .96rem; line-height: 1.5; overflow-wrap: anywhere; }
.library-shell a:focus-visible { outline: 2px solid #3d704c; outline-offset: 4px; }
.book-entry:focus-visible { outline-offset: -3px; }
.workflow-status { position: relative; display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.workflow-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid currentColor; border-radius: 7px; color: #626b73; background: #f0f2f3; }
.workflow-icon[data-state="running"] { color: #875409; background: #fff4d9; }
.workflow-icon[data-state="complete"] { color: #237145; background: #e9f6ed; }
.workflow-icon[data-state="failed"] { color: #b12b32; background: #fdecef; }
.workflow-icon[data-stage="overall"] { border-radius: 50%; margin-left: 3px; }
.workflow-symbol svg { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.workflow-mark { position: relative; align-self: flex-end; width: 0; height: 0; }
.workflow-mark svg { position: absolute; bottom: -3px; right: -4px; width: 13px; height: 13px; border-radius: 50%; background: #fff; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.workflow-tooltip { position: absolute; top: calc(100% + 8px); right: 0; z-index: 5; width: max-content; max-width: 190px; padding: 7px 10px; border-radius: 5px; background: #25322e; color: #fff; font-size: .75rem; font-weight: 400; line-height: 1.4; pointer-events: none; visibility: hidden; opacity: 0; }
.workflow-icon:hover .workflow-tooltip, .workflow-icon:focus .workflow-tooltip { visibility: visible; opacity: 1; }
.workflow-icon:focus-visible { outline: 2px solid #365847; outline-offset: 3px; }
.book-workflow-status { margin: 18px 0; }
.book-entries li:first-child .book-entry { border-radius: 7px 7px 0 0; }
.book-entries li:last-child .book-entry { border-radius: 0 0 7px 7px; }
@media (max-width: 650px) {
  .library-header { padding: 18px 20px; gap: 18px; align-items: flex-start; }
  .library-editor-link { font-size: .78rem; max-width: 120px; line-height: 1.5; text-align: right; }
  .library-main { padding: 32px 20px; }
  .library-categories { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .library-card { padding: 20px 18px; min-height: 108px; gap: 14px; }
  .library-footer { padding: 20px; }
  .library-breadcrumb { margin-top: 0; margin-bottom: 28px; }
  .category-empty-state { padding: 38px 20px; }
  .library-publication { padding: 22px 18px; flex-wrap: wrap; gap: 14px; }
  .library-publication > span:first-child { flex-basis: calc(100% - 32px); }
  .library-publication > .workflow-status { order: 1; }
  .book-entry { grid-template-columns: minmax(0, 1fr) 16px; gap: 4px 12px; padding: 16px 18px; }
  .book-entry-type { grid-column: 1; }
  .book-entry-title { grid-column: 1; }
  .book-entry > .workflow-status { grid-column: 1; margin-top: 10px; }
  .book-entry .library-card-arrow { grid-column: 2; grid-row: 1 / 3; }
}
@media (prefers-reduced-motion: reduce) { .library-card { transition: none; } }
