/* library.css · styles for library.js (the Creative tab). Every class is ds-lib-prefixed; phone rules live at the end of this file.
   Soft pass (Oct 2): posters on the inner-card corner with a hairline, cards that lift, soft tracks for the filters and switches,
   tinted tiles instead of dashed and bordered boxes, one selectable pattern for the import picks. */

.ds-lib-ic { width: 18px; height: 18px; flex: none; display: block; }
.ds-ph-cta .ds-btn .ds-lib-ic { width: 18px; height: 18px; margin-left: -2px; }
.ds-ph-cta .ds-btn.is-on:not(.ds-primary) { background: var(--ds-wash); border-color: var(--ds-blue); color: var(--ds-blue); }
.ds-ph-cta .ds-btn.ds-primary.is-on { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .32); }

/* ---------- the grid ---------- */
/* the kind filter: a soft track, the picked kind a white key on it (only colour and fill change, so nothing beside it moves) */
html[data-skin] .ds-lib-kinds { gap: 2px; padding: 4px; margin-bottom: 24px; background: var(--ds-tint); border: 0; border-radius: calc(var(--ds-r-key) + 4px); }
html[data-skin] .ds-lib-kinds .ds-lane { border-radius: var(--ds-r-key); color: var(--ds-muted); transition: background-color .2s, color .2s, box-shadow .2s; }
html[data-skin] .ds-lib-kinds .ds-lane:hover { color: var(--ds-ink); background: #EBF0F8; }
html[data-skin] .ds-lib-kinds .ds-lane[aria-selected="true"] { background: var(--ds-paper); color: var(--ds-ink); box-shadow: 0 1px 2px rgba(23, 40, 62, .08), 0 3px 10px -5px rgba(23, 40, 62, .22); }
.ds-lib-c { margin-left: 7px; font-family: var(--ds-m); font-size: var(--ds-fs-1); font-weight: 500; color: var(--ds-label); font-variant-numeric: tabular-nums; }
.ds-lane[aria-selected="true"] .ds-lib-c { color: var(--ds-blue); }
.ds-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 32px 22px; }
.ds-lib-card { position: relative; min-width: 0; }
/* the poster is the card: inner-card corners, a hairline, and a lift when it is about to open */
.ds-lib-media { position: relative; border-radius: var(--ds-r-inner); transition: transform .22s cubic-bezier(.22, .61, .36, 1), box-shadow .22s cubic-bezier(.22, .61, .36, 1); }
.ds-lib-pv { position: relative; display: block; border-radius: var(--ds-r-inner); text-decoration: none; outline-offset: 3px; }
html[data-skin] .ds-lib-pv .ds-ath { border-radius: var(--ds-r-inner); box-shadow: inset 0 0 0 1px rgba(23, 40, 62, .07); }
.ds-lib-card:not(.is-preview):hover .ds-lib-media, .ds-lib-card:not(.is-preview):focus-within .ds-lib-media { transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(23, 40, 62, .30); }
.ds-lib-card.is-open .ds-lib-media { box-shadow: 0 0 0 2px var(--ds-paper), 0 0 0 3.5px var(--ds-blue), 0 14px 30px -16px rgba(23, 40, 62, .30); }
.ds-ath.ds-lib-own { background-size: cover !important; background-position: center !important; }
.ds-lib-yt { position: absolute; z-index: 2; top: 8px; right: 8px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(10, 11, 14, .55); color: #FFFFFF; }
.ds-lib-yt .ds-lib-ic { width: 16px; height: 16px; }
.ds-lib-acts { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; gap: 6px; padding: 34px 10px 10px; border-radius: 0 0 var(--ds-r-inner) var(--ds-r-inner); background: linear-gradient(180deg, rgba(6, 13, 28, 0), rgba(6, 13, 28, .74)); opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .2s ease, transform .24s var(--ds-ease); }
.ds-lib-card:hover .ds-lib-acts, .ds-lib-card:focus-within .ds-lib-acts { opacity: 1; transform: none; }
.ds-lib-card:hover .ds-lib-acts .ds-btn, .ds-lib-card:focus-within .ds-lib-acts .ds-btn { pointer-events: auto; }
.ds-lib-acts .ds-btn { height: 32px; padding: 0 12px; gap: 6px; font-size: var(--ds-fs-3); white-space: nowrap; }
.ds-lib-acts .ds-btn:not(.ds-primary) { background: rgba(255, 255, 255, .94); border-color: transparent; color: #111318; }
.ds-lib-acts .ds-btn .ds-lib-ic { width: 15px; height: 15px; }

.ds-lib-body { padding-top: 12px; min-width: 0; }
.ds-lib-k { display: flex; align-items: center; min-width: 0; font-size: var(--ds-fs-2); font-weight: 650; color: var(--ds-blue); white-space: nowrap; }
.ds-lib-k > span:first-child { flex: none; }
.ds-lib-from { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ds-muted); font-weight: 600; }
.ds-lib-from::before { content: '·'; margin: 0 7px; color: var(--ds-label); }
.ds-lib-body h3 { margin-top: 4px; font-size: var(--ds-fs-5); font-weight: 650; line-height: 1.3; letter-spacing: -.015em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty; }
.ds-lib-body h3 a { color: inherit; text-decoration: none; }
.ds-lib-body h3 a:hover { color: var(--ds-blue); }
.ds-lib-facts { display: flex; margin-top: 4px; font-size: var(--ds-fs-3); color: var(--ds-ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; overflow: hidden; }
.ds-lib-facts span + span::before { content: '·'; margin: 0 7px; color: var(--ds-label); }
.ds-lib-src { display: flex; align-items: center; gap: 5px; margin-top: 2px; min-width: 0; font-size: var(--ds-fs-2); color: var(--ds-muted); }
.ds-lib-src span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-lib-src .ds-lib-ic { width: 14px; height: 14px; color: var(--ds-label); }
.ds-lib-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ds-line-soft); font-size: var(--ds-fs-2); white-space: nowrap; }
.ds-lib-lock { display: inline-flex; align-items: center; gap: 5px; color: var(--ds-ink-soft); font-weight: 600; }
.ds-lib-lock .ds-lib-ic { width: 14px; height: 14px; color: var(--ds-label); }
.ds-lib-n { margin-left: auto; color: var(--ds-ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.ds-lib-n.none { color: var(--ds-label); font-weight: 500; }

/* the beat: what was just added or imported rises in, and a cobalt ring passes once around its poster */
@keyframes ds-lib-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ds-lib-ring { 0% { box-shadow: 0 0 0 2px var(--ds-paper), 0 0 0 2px rgba(36, 93, 200, 0); } 30% { box-shadow: 0 0 0 2px var(--ds-paper), 0 0 0 4.5px rgba(36, 93, 200, .85); } 100% { box-shadow: 0 0 0 2px var(--ds-paper), 0 0 0 4.5px rgba(36, 93, 200, 0); } }
@keyframes ds-lib-land { from { opacity: .15; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes ds-lib-scan { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes ds-lib-pop { from { transform: scale(.6); } to { transform: none; } }
.ds-lib-card.is-new { animation: ds-lib-in .55s var(--ds-ease) both; }
.ds-lib-card.is-new .ds-lib-pv { animation: ds-lib-ring 1.6s ease-out .3s both; }
.ds-ath.ds-lib-landed { animation: ds-lib-land .6s var(--ds-ease) both; }
.ds-lib-reading { position: absolute; inset: 0; z-index: 2; overflow: hidden; border-radius: var(--ds-r-inner); background: rgba(6, 13, 28, .35); }
.ds-lib-reading::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: ds-lib-scan 1.4s var(--ds-ease) 1 both; }
body.ds-still .ds-lib-card.is-new, body.ds-still .ds-lib-card.is-new .ds-lib-pv, body.ds-still .ds-ath.ds-lib-landed, body.ds-still .ds-lib-reading::after, body.ds-still .ds-lib-it.is-pop .ds-lib-it-ck { animation: none; }
body.ds-still .ds-lib-media, body.ds-still .ds-lib-way3, body.ds-still .ds-lib-text1, body.ds-still .ds-lib-inp, body.ds-still .ds-lib-add textarea { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .ds-lib-card.is-new, .ds-lib-card.is-new .ds-lib-pv, .ds-ath.ds-lib-landed, .ds-lib-reading::after, .ds-lib-it.is-pop .ds-lib-it-ck { animation: none; }
  .ds-lib-media, .ds-lib-acts, .ds-lib-way3, .ds-lib-text1, .ds-lib-inp, .ds-lib-add textarea { transition: none; }
  .ds-lib-card:hover .ds-lib-media, .ds-lib-way3:hover, .ds-lib-text1:focus, .ds-lib-add textarea:focus, .ds-lib-inp:focus-within { transform: none !important; }
}

/* ---------- the empty state: three ways in ---------- */
.ds-lib-ways3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ds-lib-way3 { display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 22px; border-radius: var(--ds-r-inner); background: var(--ds-tint); color: inherit; text-decoration: none; transition: transform .22s cubic-bezier(.22, .61, .36, 1), box-shadow .22s cubic-bezier(.22, .61, .36, 1); }
.ds-lib-way3:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(23, 40, 62, .30); }
html[data-skin] .ds-lib-way3 .ds-icon-tile { margin-bottom: 10px; background: var(--ds-paper); border-color: transparent; border-radius: var(--ds-r-key); }
.ds-lib-way3 .ds-icon-tile .ds-lib-ic { width: 19px; height: 19px; }
.ds-lib-way3 b { font-size: var(--ds-fs-5); font-weight: 650; }
.ds-lib-way3 span:last-child { font-size: var(--ds-fs-3); line-height: 1.5; color: var(--ds-muted); }
.ds-lib-empty-imp { display: flex; align-items: center; gap: 10px; margin-top: 20px; font-size: var(--ds-fs-4); color: var(--ds-ink-soft); }
.ds-lib-empty-imp .ds-lib-ic { color: var(--ds-blue); }
.ds-lib-empty-imp a { color: var(--ds-blue); font-weight: 650; text-underline-offset: 3px; }

/* ---------- the add panel ---------- */
.ds-lib-add-g { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr); gap: 32px; align-items: start; }
/* a segmented switch: a soft track, the picked segment a white key (same weight in both states) */
.ds-lib-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; max-width: 100%; padding: 4px; border-radius: calc(var(--ds-r-key) + 4px); background: var(--ds-tint); }
.ds-lib-seg button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border: 0; border-radius: var(--ds-r-key); background: transparent; font: inherit; font-size: var(--ds-fs-3); font-weight: 650; color: var(--ds-muted); white-space: nowrap; transition: background-color .18s, color .18s, box-shadow .18s; }
.ds-lib-seg button:hover:not(:disabled) { color: var(--ds-ink); background: #EBF0F8; }
.ds-lib-seg button[aria-checked="true"], .ds-lib-seg button[aria-selected="true"], .ds-lib-seg button[aria-checked="true"]:hover, .ds-lib-seg button[aria-selected="true"]:hover { background: var(--ds-paper); color: var(--ds-ink); box-shadow: 0 1px 2px rgba(23, 40, 62, .08), 0 3px 10px -5px rgba(23, 40, 62, .22); }
.ds-lib-seg button:disabled { opacity: .38; }
.ds-lib-seg button:focus-visible { outline: 2px solid var(--ds-blue); outline-offset: 1px; }
.ds-lib-seg .ds-lib-ic { width: 16px; height: 16px; }
.ds-lib-ways { margin-bottom: 16px; }
/* the drop zone: a soft tile that takes the selectable wash and ring while a file is over it */
.ds-lib-drop { position: relative; display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 184px; padding: 24px; border-radius: var(--ds-r-inner); background: var(--ds-tint); text-align: center; cursor: pointer; transition: background-color .2s, box-shadow .2s; }
.ds-lib-drop:hover { background: #EBF0F8; }
.ds-lib-drop.is-over, .ds-lib-drop:focus-within { background: var(--ds-wash); box-shadow: inset 0 0 0 1.5px var(--ds-blue); }
.ds-lib-drop.has { min-height: 132px; }
.ds-lib-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.ds-lib-drop-ic { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 4px; border-radius: 12px; background: var(--ds-paper); color: var(--ds-blue); box-shadow: 0 6px 16px -10px rgba(23, 40, 62, .35); transition: transform .22s var(--ds-ease); }
.ds-lib-drop-ic .ds-lib-ic { width: 22px; height: 22px; }
.ds-lib-drop.is-over .ds-lib-drop-ic { transform: translateY(-4px); }
.ds-lib-drop b { font-size: var(--ds-fs-5); font-weight: 650; overflow-wrap: anywhere; }
.ds-lib-drop span { max-width: 42ch; font-size: var(--ds-fs-3); color: var(--ds-muted); }
.ds-lib-drop u { color: var(--ds-blue); text-underline-offset: 3px; }
.ds-lib-q { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: var(--ds-r-key); background: transparent; font: inherit; font-size: var(--ds-fs-3); font-weight: 650; color: var(--ds-ink-soft); white-space: nowrap; }
.ds-lib-q:hover:not(:disabled) { background: var(--ds-tint); color: var(--ds-ink); }
.ds-lib-q:disabled { opacity: .5; }
.ds-lib-q .ds-lib-ic { width: 16px; height: 16px; }
.ds-lib-way > .ds-lib-q { margin-top: 10px; margin-left: -12px; }
.ds-lib-fields { display: grid; gap: 8px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--ds-line-soft); }
.ds-lib-fl { display: block; margin-top: 8px; font-size: var(--ds-fs-3); font-weight: 650; color: var(--ds-ink); }
.ds-lib-fields > .ds-lib-fl:first-child, .ds-lib-way > .ds-lib-fl:first-child { margin-top: 0; }
.ds-lib-way > .ds-lib-fl { margin-bottom: 8px; }
.ds-lib-fields .ds-lib-seg { justify-self: start; }
.ds-lib-text1, .ds-lib-add textarea, .ds-lib-inp { width: 100%; border: 1px solid var(--ds-line-strong); border-radius: var(--ds-r-field); background: var(--ds-paper); font: inherit; font-size: var(--ds-fs-4); color: var(--ds-ink); transition: border-color .2s, box-shadow .2s, transform .2s cubic-bezier(.22, .61, .36, 1); }
.ds-lib-text1 { height: 44px; padding: 0 14px; }
.ds-lib-add textarea { display: block; min-height: 112px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.ds-lib-inp { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; color: var(--ds-label); }
.ds-lib-inp input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: var(--ds-fs-4); color: var(--ds-ink); }
/* a field you are typing in rises a touch and rings */
.ds-lib-text1:focus, .ds-lib-add textarea:focus, .ds-lib-inp:focus-within { outline: 0; border-color: var(--ds-blue); box-shadow: 0 0 0 3px rgba(36, 93, 200, .16), 0 10px 24px -14px rgba(23, 40, 62, .35); transform: translateY(-1px); }
.ds-lib-inp:focus-within { color: var(--ds-blue); }
.ds-lib-text1::placeholder, .ds-lib-add textarea::placeholder, .ds-lib-inp input::placeholder { color: var(--ds-label); }
.ds-lib-hint { margin-top: 6px; font-size: var(--ds-fs-3); line-height: 1.5; color: var(--ds-muted); }
.ds-lib-hint a { color: var(--ds-blue); font-weight: 650; text-underline-offset: 3px; }
.ds-lib-add-f, .ds-lib-imp-f { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--ds-line-soft); }
.ds-lib-add-f .ds-link, .ds-lib-imp-f .ds-link { margin-left: 0; }
/* the preview: the card as it will look, laid straight on a soft tile (no card inside the tile) */
.ds-lib-add-pv { padding: 18px 18px 16px; border-radius: var(--ds-r-inner); background: var(--ds-tint); }
.ds-lib-pvk { margin-bottom: 12px; font-size: var(--ds-fs-3); font-weight: 650; color: var(--ds-muted); }
.ds-lib-add-pv .ds-lib-card { padding: 0; background: none; box-shadow: none; }
.ds-lib-add-pv .ds-lib-foot { border-top-color: var(--ds-line); }
.ds-lib-card.is-preview .ds-lib-pv { cursor: default; }
.ds-lib-status { min-height: 1.5em; margin-top: 12px; font-size: var(--ds-fs-3); line-height: 1.5; color: var(--ds-ink-soft); }

/* ---------- the import panel ---------- */
.ds-lib-impg + .ds-lib-impg { margin-top: 26px; }
.ds-lib-impg-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
html[data-skin] .ds-lib-impg-h .ds-icon-tile { width: 30px; height: 30px; margin: 0; border-radius: var(--ds-r-key); background: var(--ds-tint); border-color: transparent; }
.ds-lib-impg-h .ds-icon-tile svg { width: 16px; height: 16px; }
.ds-lib-impg-h b { font-size: var(--ds-fs-4); font-weight: 650; }
.ds-lib-impg-h span { font-family: var(--ds-m); font-size: var(--ds-fs-2); color: var(--ds-label); }
.ds-lib-impl { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
/* each piece is the selectable tile: tint, a touch deeper on hover, wash and a cobalt ring once picked */
.ds-lib-it { --pad: 6px; display: grid; grid-template-columns: 104px minmax(0, 1fr) 22px; gap: 12px; align-items: center; width: 100%; padding: var(--pad) 14px var(--pad) var(--pad); border: 0; border-radius: var(--ds-r-inner); background: var(--ds-tint); font: inherit; text-align: left; color: var(--ds-ink); cursor: pointer; transition: background-color .2s, box-shadow .2s; }
.ds-lib-it:hover:not([aria-disabled="true"]) { background: #EBF0F8; }
.ds-lib-it:focus-visible { outline: 2px solid var(--ds-blue); outline-offset: 2px; }
.ds-lib-it[aria-pressed="true"], .ds-lib-it[aria-pressed="true"]:hover:not([aria-disabled="true"]) { background: var(--ds-wash); box-shadow: inset 0 0 0 1.5px var(--ds-blue); }
html[data-skin] .ds-lib-it-th .ds-ath { border-radius: calc(var(--ds-r-inner) - var(--pad)); }
html[data-skin] .ds-lib-mini-th .ds-ath { border-radius: calc(var(--ds-r-inner) - 4px); }
.ds-lib-it-th .ds-ath-code, .ds-lib-mini-th .ds-ath-code { left: 5px; top: 5px; min-width: 20px; height: 18px; font-size: 11px; border-radius: 5px; }
.ds-lib-it-th .ds-ath-len, .ds-lib-mini-th .ds-ath-len { display: none; }
.ds-lib-it-th .ds-ath.k-logline, .ds-lib-mini-th .ds-ath.k-logline { padding: 7px 9px; }
.ds-lib-it-th .ds-ath.k-logline q, .ds-lib-mini-th .ds-ath.k-logline q { font-size: 10.5px; line-height: 1.25; -webkit-line-clamp: 3; }
.ds-lib-it-t { min-width: 0; }
.ds-lib-it-t b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--ds-fs-3); font-weight: 650; line-height: 1.3; }
.ds-lib-it-t em { display: flex; align-items: center; gap: 5px; margin-top: 3px; min-width: 0; font-style: normal; font-size: var(--ds-fs-2); color: var(--ds-muted); white-space: nowrap; }
.ds-lib-it-t em span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ds-lib-it-t em .ds-lib-ic { width: 13px; height: 13px; }
.ds-lib-it-ck { display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--ds-line-strong); border-radius: 50%; background: var(--ds-paper); color: transparent; transition: background-color .18s, border-color .18s, color .18s; }
.ds-lib-it-ck .ds-lib-ic { width: 14px; height: 14px; }
.ds-lib-it[aria-pressed="true"] .ds-lib-it-ck { background: var(--ds-blue); border-color: var(--ds-blue); color: #FFFFFF; }
.ds-lib-it.is-pop[aria-pressed="true"] .ds-lib-it-ck { animation: ds-lib-pop .28s cubic-bezier(.34, 1.56, .64, 1) both; }
.ds-lib-it.is-locked { background: #F8FAFC; cursor: default; }
.ds-lib-it.is-in { cursor: default; }
.ds-lib-it.is-locked .ds-lib-it-th, .ds-lib-it.is-locked b { opacity: .55; }
.ds-lib-it.is-locked .ds-lib-it-ck, .ds-lib-it.is-in .ds-lib-it-ck { visibility: hidden; }
.ds-lib-it.is-in em { color: var(--ds-teal); font-weight: 600; }

/* ---------- the drawer: one piece, in place. It is a peek: sheet, dim, motion and phone form live in peek.css ---------- */
.ds-lib-dr[hidden] { display: none; }
body.ds-lib-open .ds-totop { opacity: 0; visibility: hidden; }
.ds-lib-dr-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ds-lib-dr-k { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--ds-m); font-size: var(--ds-fs-1); letter-spacing: .11em; text-transform: uppercase; color: var(--ds-blue); }
.ds-lib-dr-pv { position: relative; display: block; border-radius: var(--ds-r-inner); overflow: hidden; text-decoration: none; }
html[data-skin] .ds-lib-dr-pv .ds-ath { border-radius: var(--ds-r-inner); }
.ds-lib-dr-play { position: absolute; z-index: 2; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 10px; border-radius: var(--ds-r-key); background: rgba(10, 11, 14, .72); color: #FFFFFF; font-size: var(--ds-fs-3); font-weight: 650; transition: background-color .2s; }
.ds-lib-dr-play .ds-lib-ic { width: 18px; height: 18px; }
a.ds-lib-dr-pv:hover .ds-lib-dr-play, a.ds-lib-dr-pv:focus-visible .ds-lib-dr-play { background: var(--ds-blue); }
.ds-lib-dr-q { margin: 0; padding: 22px 24px; border-radius: var(--ds-r-inner); background: #F1EEFD; color: #2B2350; font-family: 'Newsreader', Georgia, serif; font-size: 20px; line-height: 1.38; quotes: '\201C' '\201D'; }
.ds-lib-dr-q::before { content: open-quote; } .ds-lib-dr-q::after { content: close-quote; }
.ds-lib-dr-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 16px 0 0; padding: 14px 0; border-top: 1px solid var(--ds-line); border-bottom: 1px solid var(--ds-line); }
.ds-lib-dr-facts dt { font-size: var(--ds-fs-2); color: var(--ds-muted); }
.ds-lib-dr-facts dd { margin: 2px 0 0; font-size: var(--ds-fs-4); font-weight: 600; font-variant-numeric: tabular-nums; }
.ds-lib-dr h3 { margin: 24px 0 10px; font-size: var(--ds-fs-4); font-weight: 650; }
.ds-lib-minis { display: grid; gap: 8px; }
.ds-lib-mini { display: grid; grid-template-columns: 88px minmax(0, 1fr) 16px; gap: 12px; align-items: center; padding: 4px 12px 4px 4px; border-radius: var(--ds-r-inner); background: var(--ds-tint); color: inherit; text-decoration: none; transition: background-color .18s; }
div.ds-lib-mini { grid-template-columns: 88px minmax(0, 1fr); }
a.ds-lib-mini:hover { background: #EBF0F8; }
.ds-lib-mini > svg { width: 14px; height: 14px; color: var(--ds-label); transition: transform .22s cubic-bezier(.22, .61, .36, 1); }
a.ds-lib-mini:hover > svg { transform: translateX(2px); }
.ds-lib-mini-t { min-width: 0; }
.ds-lib-mini-t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--ds-fs-3); font-weight: 650; }
.ds-lib-mini-t em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; font-size: var(--ds-fs-2); color: var(--ds-muted); }
.ds-lib-dr .ds-lib-seg { display: flex; width: fit-content; }
.ds-lib-dr-acc { display: inline-flex; align-items: center; gap: 6px; font-size: var(--ds-fs-4); font-weight: 650; }
.ds-lib-dr-acc .ds-lib-ic { width: 16px; height: 16px; }
.ds-lib-dr-uses { list-style: none; margin: 0; padding: 0; }
.ds-lib-dr-uses li + li { border-top: 1px solid var(--ds-line); }
.ds-lib-dr-uses a { display: grid; grid-template-columns: 84px minmax(0, 1fr) 14px; gap: 12px; align-items: center; min-height: 52px; padding: 8px 0; color: inherit; text-decoration: none; }
.ds-lib-dr-uses a:hover b { color: var(--ds-blue); }
/* the stage of each test, as a dot and a word */
html[data-skin] .ds-lib-dr-uses .ds-stg { gap: 7px; height: auto; padding: 0; background: none; font-size: var(--ds-fs-2); }
.ds-lib-dr-uses .ds-stg::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--stg); }
.ds-lib-dr-uses b { display: block; font-size: var(--ds-fs-4); font-weight: 600; }
.ds-lib-dr-uses em { display: block; font-style: normal; font-size: var(--ds-fs-2); color: var(--ds-muted); }
.ds-lib-dr-uses a > svg { width: 14px; height: 14px; color: var(--ds-label); }
.ds-lib-dr-none { font-size: var(--ds-fs-4); color: var(--ds-muted); }
.ds-lib-dr-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--ds-line); }
.ds-lib-dr-acts .ds-btn .ds-lib-ic { width: 16px; height: 16px; }
.ds-lib-dr-end { margin-top: 10px; }
.ds-lib-dr-end > .ds-lib-rm { margin-left: -12px; color: var(--ds-muted); }
.ds-lib-rmq { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--ds-r-inner); background: var(--ds-tint); }
.ds-lib-rmq span { flex: 1 1 100%; font-size: var(--ds-fs-3); line-height: 1.5; color: var(--ds-ink-soft); }
.ds-lib-rmq .ds-btn { height: 34px; }

@media (max-width: 1100px) {
  .ds-lib-add-g { grid-template-columns: minmax(0, 1fr) minmax(220px, .7fr); gap: 24px; }
}
@media (max-width: 820px) {
  .ds-lib-dr-acts .ds-btn { flex: 1 1 auto; justify-content: center; }
  .ds-lib-add-g { grid-template-columns: 1fr; }
  .ds-lib-ways3 { grid-template-columns: 1fr; }
}
/* touch screens: the drawer carries "Use in a test" and "Watch", so the hover row stays out of the way */
@media (hover: none) { .ds-lib-acts { display: none; } }
@media (max-width: 720px) {
  .ds-ph-cta .ds-btn { flex: 1 1 auto; justify-content: center; }
  .ds-lib-grid { grid-template-columns: 1fr; gap: 16px; }
  .ds-lib-card { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 14px; align-items: start; }
  .ds-lib-card + .ds-lib-card { padding-top: 16px; border-top: 1px solid var(--ds-line-soft); }
  /* a small poster takes the control corner, not the card corner */
  .ds-lib-media, .ds-lib-pv, html[data-skin] .ds-lib-pv .ds-ath { border-radius: var(--ds-r-box); }
  .ds-lib-card:not(.is-preview):hover .ds-lib-media { transform: none; box-shadow: none; }
  .ds-lib-acts { display: none; }
  .ds-lib-body { padding-top: 0; }
  .ds-lib-body h3 { font-size: var(--ds-fs-4); }
  .ds-lib-foot { margin-top: 6px; padding-top: 6px; }
  .ds-lib-add-pv .ds-lib-card { display: block; }
  .ds-lib-add-pv .ds-lib-body { padding-top: 12px; }
  .ds-lib-add-pv .ds-lib-media, .ds-lib-add-pv .ds-lib-pv, html[data-skin] .ds-lib-add-pv .ds-lib-pv .ds-ath { border-radius: var(--ds-r-inner); }
  .ds-lib-seg.ds-lib-ways { display: flex; width: 100%; }
  .ds-lib-ways button { flex: 1 1 0; justify-content: center; padding: 0 8px; }
  .ds-lib-drop { min-height: 150px; padding: 18px; }
  .ds-lib-impl { grid-template-columns: 1fr; }
  .ds-lib-it { grid-template-columns: 88px minmax(0, 1fr) 22px; }
  .ds-lib-way3 { padding: 16px; }
  .ds-lib-way3:hover { transform: none; box-shadow: none; }
  .ds-lib-empty-imp { align-items: flex-start; font-size: var(--ds-fs-3); }
}
@media print { .ds-lib-dr, .ds-lib-dim, .ds-lib-acts, .ds-lib-add, .ds-lib-imp { display: none !important; } }

/* ---------- round two: count contrast, cards that share a floor, quieter locks, crops that keep the title cards out ---------- */
.ds-lib-grid > .ds-lib-card { display: flex; flex-direction: column; }
.ds-lib-grid > .ds-lib-card .ds-lib-body { flex: 1; display: flex; flex-direction: column; }
.ds-lib-grid > .ds-lib-card .ds-lib-foot { margin-top: auto; }
.ds-lib-body > :nth-last-child(2) { margin-bottom: 10px; }
.ds-lib-lock.is-from { min-width: 0; color: var(--ds-muted); font-weight: 600; }
.ds-lib-lock.is-from span { overflow: hidden; text-overflow: ellipsis; }
.ds-lib-lock.is-all { color: var(--ds-muted); font-weight: 600; }
/* what a team keeps to itself: a quiet tinted note, no dashed box */
.ds-lib-locked { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: var(--ds-r-inner); background: #F8FAFC; font-size: var(--ds-fs-3); line-height: 1.5; color: var(--ds-muted); }
.ds-lib-locked .ds-lib-ic { width: 16px; height: 16px; margin-top: 2px; color: var(--ds-label); }
.ds-lib-locked b { color: var(--ds-ink-soft); font-weight: 650; }
.ds-lib-impl + .ds-lib-locked { margin-top: 12px; }
@media (max-width: 720px) { .ds-lib-grid > .ds-lib-card { display: grid; } .ds-lib-grid > .ds-lib-card .ds-lib-body { display: block; } .ds-lib-body > :nth-last-child(2) { margin-bottom: 0; } }

@media (max-width: 720px) {
  .ds-lib-fields .ds-lib-seg { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ds-lib-fields .ds-lib-accseg, .ds-lib-dr .ds-lib-accseg { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-lib-fields .ds-lib-seg button, .ds-lib-dr .ds-lib-accseg button { justify-content: center; height: auto; min-height: 36px; padding: 8px 6px; white-space: normal; text-align: center; line-height: 1.25; }
  .ds-lib-locked { background: var(--ds-tint); }
}
@media (max-width: 720px) {
  .ds-lib-src span, .ds-lib-from, .ds-lib-lock.is-from span { white-space: normal; overflow: visible; text-overflow: clip; }
}

/* keyboard focus keeps each shape's own corner (the kit's focus rule rounds every focused control to 6px) */
.ds-lib-pv:focus-visible, .ds-lib-way3:focus-visible, .ds-lib-it:focus-visible, a.ds-lib-mini:focus-visible, a.ds-lib-dr-pv:focus-visible { border-radius: var(--ds-r-inner); }
.ds-lib-seg button:focus-visible, html[data-skin] .ds-lib-kinds .ds-lane:focus-visible { border-radius: var(--ds-r-key); }
@media (max-width: 720px) { .ds-lib-pv:focus-visible { border-radius: var(--ds-r-box); } }
