/* Multi-view Berkshire letters page. Colours come from the Chirpy theme. */
/* the page carries its own title, like a post; the theme's is hidden on phones */
#topbar-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h1.dynamic-title { display: none; }
h1.dynamic-title ~ .content { margin-top: 0; }
.bk-head { margin-bottom: 1.75rem; }
.bk-head h1 span { white-space: nowrap; }
.bk-intro { margin-top: 1.5rem; font-size: .85rem; color: var(--text-muted-color); }
.bk-intro span { display: block; line-height: 1.8; }
.bk-intro a { color: var(--text-muted-highlight-color); }

#bk-src .bk-y { font-weight: 600; font-size: 1.15rem; margin: 2rem 0 .75rem; }
#bk-src .bk-u { margin-bottom: 1rem; }
#bk-app { --bk-line: var(--main-border-color); --bk-hit: rgba(255, 196, 0, .38); --bk-diff: rgba(64, 158, 255, .24); }
#bk-app button, #bk-app input, #bk-app select { font: inherit; color: inherit; }
#bk-app button { cursor: pointer; }
#bk-app button:focus-visible, #bk-app input:focus-visible, #bk-app select:focus-visible { outline: 2px solid var(--link-color); outline-offset: 1px; }

.bk-bar { position: sticky; top: 0; z-index: 3; padding: .6rem 0 .5rem; background: var(--main-bg); border-bottom: 1px solid var(--bk-line); }
.bk-tabs { display: flex; gap: 1.25rem; overflow-x: auto; scrollbar-width: none; }
.bk-tabs::-webkit-scrollbar { display: none; }
.bk-tabs button { flex: none; padding: .3rem 0 .4rem; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-muted-color) !important; font-weight: 600 !important; }
.bk-tabs button[aria-selected="true"] { color: var(--heading-color) !important; border-bottom-color: var(--link-color); }
.bk-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .55rem; font-size: .85rem; }
.bk-tools input { flex: 1 1 11rem; min-width: 0; }
.bk-tools input, .bk-tools select { height: 2.1rem; padding: 0 .6rem; border: 1px solid var(--bk-line); border-radius: .4rem; background: var(--card-bg); }
.bk-tools select option { color: #222; background: #fff; }

.bk-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .9rem 0 0; font-size: .85rem; }
.bk-chips + .bk-chips { margin-top: .5rem; }
.bk-chips button { padding: .2rem .6rem; border: 1px solid var(--bk-line); border-radius: .4rem; background: var(--card-bg); line-height: 1.5; }
.bk-chips button:hover { border-color: var(--link-color); }
.bk-chips button[aria-pressed="true"] { border-color: var(--link-color); color: var(--link-color) !important; font-weight: 600 !important; }
.bk-chips small { margin-left: .3rem; color: var(--text-muted-color); font-variant-numeric: tabular-nums; }
.bk-chips.bk-sub button { border-color: transparent; background: none; padding: .15rem .35rem; }
.bk-chips.bk-sub button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: .3em; }
.bk-count { margin: .8rem 0 0; font-size: .82rem; color: var(--text-muted-color); }

.bk-h { margin: 2rem 0 .25rem; font-size: 1.2rem; font-weight: 600; color: var(--heading-color); }
.bk-h2 { margin: 1.4rem 0 .25rem; font-size: 1rem; font-weight: 600; color: var(--heading-color); }
.bk-h + .bk-h2 { margin-top: .5rem; }
.bk-h small, .bk-h2 small { margin-left: .4rem; font-size: .78rem; font-weight: 400; color: var(--text-muted-color); }
#bk-app .bk-u { padding: .95rem 0 .8rem; border-bottom: 1px solid var(--bk-line); }
#bk-app .bk-u p { margin: 0 0 .5rem; }
#bk-app .bk-u.bk-flash { background: var(--bk-diff); transition: background 1.2s; }
.bk-m { display: flex; flex-wrap: wrap; gap: .1rem .9rem; align-items: baseline; font-size: .8rem; color: var(--text-muted-color); }
.bk-m b { font-weight: 600; color: var(--text-color); font-variant-numeric: tabular-nums; }
.bk-m a, .bk-m button { color: var(--text-muted-color) !important; border: 0; background: none; padding: 0; text-align: left; }
.bk-m a:hover, .bk-m button:hover { color: var(--link-color) !important; }
.bk-m .bk-more { color: var(--link-color) !important; }
.bk-panel { margin: .75rem 0 .3rem; padding: .1rem 0 .1rem .9rem; border-left: 2px solid var(--link-color); }
.bk-panel .bk-v { padding: .5rem 0; }
.bk-panel .bk-v + .bk-v { border-top: 1px dashed var(--bk-line); }
.bk-panel p { font-size: .95em; }
.bk-note { margin: .4rem 0 0; font-size: .8rem; color: var(--text-muted-color); }
#bk-app mark { padding: 0; color: inherit; background: var(--bk-hit); border-radius: 2px; }
#bk-app mark.bk-d { background: var(--bk-diff); }

.bk-g { border-bottom: 1px solid var(--bk-line); }
.bk-g > summary { display: flex; gap: .6rem; align-items: baseline; padding: .75rem 0; cursor: pointer; list-style: none; }
.bk-g > summary::-webkit-details-marker { display: none; }
.bk-g > summary::before { content: "▸"; flex: none; width: .8em; color: var(--text-muted-color); }
.bk-g[open] > summary::before { content: "▾"; }
.bk-g > summary span { flex: 1; font-weight: 600; color: var(--heading-color); }
.bk-g > summary em { flex: none; font-style: normal; font-size: .78rem; color: var(--text-muted-color); font-variant-numeric: tabular-nums; }
.bk-line { margin: 0 0 1rem .35rem; padding-left: 1.1rem; border-left: 2px solid var(--bk-line); }
.bk-line .bk-v { position: relative; padding: .35rem 0 .7rem; }
.bk-line .bk-v::before { content: ""; position: absolute; left: calc(-1.1rem - 5px); top: .85rem; width: 8px; height: 8px; border-radius: 50%; background: var(--link-color); }
.bk-line p { margin: .15rem 0 .4rem; }
.bk-empty { padding: 2.5rem 0; color: var(--text-muted-color); }
.bk-year { scroll-margin-top: 8rem; }
@media (max-width: 575px) {
  .bk-bar { position: static; }
  .bk-year { scroll-margin-top: 1rem; }
  .bk-g > summary { flex-wrap: wrap; }
  .bk-g > summary em { flex-basis: 100%; padding-left: 1.4em; }
  .bk-tools input { flex-basis: 100%; }
  .bk-tools select { flex: 1; min-width: 0; }
}
