/* D Index layout: A to Z index with a letter rail */
:root { --card-min: 220px; --card-gap: 24px 18px; --row-thumb: 136px; --row-h: 60px; }

.d-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.d-top { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 28px 6px; flex: none; }
.d-brand { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 0; border: 0; background: none; color: var(--ink); font: 700 20px/1 var(--font-title); cursor: pointer; }
.d-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-s); background: var(--accent); color: var(--on-accent); }
.d-mark .g { width: 18px; height: 18px; }
.d-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; max-width: 640px; height: 48px; margin: 0 auto; padding: 0 6px 0 16px; border-radius: var(--r-s); background: var(--surface-2); color: var(--ink-3); transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.d-search:focus-within { background: var(--surface); box-shadow: 0 0 0 2px var(--accent); }
.d-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: 400 17px/1 var(--font-ui); outline: none; }
.d-ctl { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 8px 28px 10px; flex: none; }
.d-views button .g { width: 18px; height: 18px; }
.d-topics { display: flex; gap: 8px; padding: 0 28px 12px; flex: none; overflow-x: auto; scrollbar-width: none; }
.d-topics button { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-s); background: var(--surface-2); color: var(--ink-2); font: 500 15px/1 var(--font-ui); cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.d-topics button:hover { background: var(--hover); color: var(--ink); }
.d-topics button[aria-checked=true] { background: var(--ink); color: var(--bg); }
.d-topics button[aria-checked=true] .tg, .d-topics button[aria-checked=true] .cnt { color: inherit; }
.d-topics .g { width: 18px; height: 18px; }
.d-main { position: relative; flex: 1; min-height: 0; display: flex; }
.d-main .app-body { flex: 1; }
.d-wrap { max-width: 1180px; margin: 0 auto; padding: 4px 64px 64px 28px; }
.is-deep .d-wrap { max-width: 1480px; padding-right: 28px; }
.d-grp { content-visibility: auto; contain-intrinsic-size: auto 400px; }
.d-L { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; height: 44px; padding: 0 10px; background: var(--bg); color: var(--accent-ink); font: 700 20px/1 var(--font-title); }
.d-grp .row { width: 100%; }
.d-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; padding: 10px 0 8px; }
.d-head h1 { display: inline-flex; align-items: center; gap: 12px; font: 700 30px/1.15 var(--font-title); }
.d-head h1 .g { width: 28px; height: 28px; }
.d-cont { margin-bottom: 12px; padding: 6px 14px 12px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1); }
.d-cont-l { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.d-ci { display: grid; grid-template-columns: var(--row-thumb) minmax(0, 1fr); align-items: center; gap: 14px; min-height: var(--row-h); padding: 6px; border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: background var(--dur) var(--ease); }
.d-ci:hover { background: var(--hover); }
.d-cr { border-radius: var(--r-s); }
.d-crh { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 10px 0 6px; border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: background var(--dur) var(--ease); }
.d-crh:hover { background: var(--hover); }
.d-crh[aria-expanded=true] .sec-f { transform: rotate(90deg); }
.d-crn { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-crt { display: flex; gap: 6px; }
.d-crt .g { width: 18px; height: 18px; }
.d-crl { padding: 0 0 8px 34px; animation: pop-in var(--dur) var(--ease) both; }
.d-rail { position: absolute; right: 6px; top: 8px; bottom: 8px; width: 44px; display: flex; flex-direction: column; justify-content: center; border-radius: var(--r-s); touch-action: none; user-select: none; cursor: pointer; transition: background var(--dur) var(--ease); }
.d-rail:hover, .d-rail.is-scrub { background: var(--hover); }
.d-rl { flex: 0 1 26px; min-height: 0; display: grid; place-items: center; color: var(--ink-2); font: 700 14px/1 var(--font-ui); pointer-events: none; transition: color var(--dur) var(--ease); }
.d-rl.is-on { color: var(--accent-ink); }
.d-rl.is-off { color: var(--line-2); }
.d-bubble { position: absolute; right: calc(100% + 10px); top: 0; width: 56px; height: 56px; margin-top: -28px; display: grid; place-items: center; border-radius: var(--r); background: var(--accent); color: var(--on-accent); font: 700 28px/1 var(--font-title); box-shadow: var(--shadow-pop); opacity: 0; transform: translateX(6px); pointer-events: none; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.is-scrub .d-bubble { opacity: 1; transform: none; }
.d-hpm { width: 40px; height: 34px; font-size: 17px; }
.d-res { padding-top: 6px; }

@container app (max-width: 899px) { .d-cont-l { grid-template-columns: minmax(0, 1fr); } }
@container app (max-width: 599px) {
  .d-top { padding: 8px 10px 4px 14px; gap: 6px; min-height: 64px; }
  .d-brand > span:last-child { display: none; }
  .d-ctl { padding: 6px 12px 8px; gap: 8px; }
  .d-ctl .seg { width: 100%; } .d-views button { flex: 1; justify-content: center; padding: 0 8px; } .d-views .g { display: none; }
  .d-topics { padding: 0 12px 10px; }
  .d-wrap, .is-deep .d-wrap { padding: 2px 48px 48px 12px; }
  .is-deep .d-wrap { padding-right: 12px; }
  .d-rail { right: 0; width: 44px; top: 4px; bottom: 4px; }
  .d-rl { flex-basis: 24px; }
  .d-crl { padding-left: 0; }
  .d-cont { padding: 4px 6px 8px; }
}

/* first open: the two Viewers, full screen */
.vp { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 280px)); gap: 20px; justify-content: center; align-content: center; padding: 24px; }
.vp-b { display: grid; justify-items: center; align-content: center; gap: 16px; min-height: 220px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); cursor: pointer; transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.vp-b:hover { background: var(--hover); transform: translateY(-2px); }
.vp-b .vw-i { width: 72px; height: 72px; margin: 0; font-size: 32px; }
.vp-n { font: var(--title-w) 24px/1.2 var(--font-title); }
@container app (max-width: 599px) { .vp { grid-template-columns: minmax(0, 1fr); align-content: center; } .vp-b { min-height: 140px; } }

/* Guest port: sign-in page, and the Guest's name with Sign out in the top bar */
.si { flex: 1; display: grid; justify-items: center; align-content: center; gap: 24px; padding: 24px; }
.si-t { margin: 0; font: var(--title-w) 28px/1.2 var(--font-title); }
.si-go { justify-content: center; min-width: 260px; }
.si-go:disabled { opacity: .6; cursor: default; }
.si-msg { margin: 0; min-height: 1.4em; color: var(--ink-2); text-align: center; }
.vw--guest { display: inline-flex; align-items: center; gap: 4px; }
.vw-out { min-height: 44px; padding: 0 14px; }
.att-row--still { cursor: default; }
.att-row--still:hover { background: transparent; }
a.att-row { text-decoration: none; }
@container app (max-width: 599px) { .vw--guest .vw-n, .vw--guest .vw-i { display: none; } .si-go { min-width: 0; width: 100%; } }
