/*
 * bair-minimal.css - trial "minimal" theme for the BAIR blog, as an overlay.
 *
 * WHAT IT IS
 *   A port of the look of the redesigned BAIR main site (the "Laboratory"
 *   design system: flat, square, hairline rules, smaller type, a 40px
 *   gutter that drops to 20px on phones) onto the blog's existing markup.
 *   It only restyles; it adds no markup or scripts.
 *   It is deliberately quieter than the source: no fills, no boxes, no
 *   shadows, no filled buttons. Things are separated by whitespace and a few
 *   1px hairlines, and every control reads as a text link.
 *
 * SOURCE
 *   Main-site repository, branch lab-redesign-exp at commit
 *   451882920ddbc8227683841e92ba8ae181579e6b
 *   (src/styles/laboratory.css layered on src/styles/global.css; the visual
 *   system was introduced in commit 8ee2e2593f8531e6caf5efe21fbdc2aa68c6a674,
 *   "Laboratory visual refresh").
 *
 * HOW TO SWITCH IT OFF
 *   Delete the one <link> to /css/bair-minimal.css in _includes/head.html.
 *   Nothing else refers to this file, so the site returns to its previous look.
 *
 * HOW IT IS BUILT
 *   - It loads after pixyll.css and bair-blog.css and wins by source order.
 *     Element rules are scoped with :where(), which adds no specificity, so
 *     post-specific classes (bair-blog.css, <style> blocks inside posts,
 *     discussion.css) keep winning exactly as they do today.
 *   - The site header (.navbar, .blog-subnav, .skip-link) is not touched: no
 *     selector here matches inside it. The single global rule is the root
 *     font size; the header is sized in px and does not depend on it.
 *   - No !important is used.
 *
 * FONTS
 *   IBM Plex Sans for running text, headings, labels and form controls
 *   (400 / 600 / 700). It is the sans the source theme specifies. Figure
 *   captions are set in a second face, IBM Plex Serif (400 / 600), so a
 *   caption never reads as a line of the article. Both are loaded in
 *   _includes/head.html. To try another face, change --bm-sans or
 *   --bm-caption below and that <link>. Code keeps a monospace stack. The
 *   header keeps Inter, as on the main site.
 *
 * COLOUR
 *   Navy ink on white, with the main site's blues: Berkeley blue for edges,
 *   the site's link blue for hover, a light blue tint for selected text and
 *   for the editors' own posts in the home list. No gold or brown.
 */

/* ------------------------------------------------------------------------
   1. Root size
   The base theme steps the root 14 / 16 / 18 / 20px by viewport width, so
   body text is 18px on a desktop and 12.6px on a phone. The source theme
   uses 16px everywhere.
   ------------------------------------------------------------------------ */

html {
  font-size: 16px;
}

/* ------------------------------------------------------------------------
   2. Tokens and page frame
   ------------------------------------------------------------------------ */

#main-content,
.post-refs-card,
.site > footer {
  --bm-ink: #04203C;         /* headings, links, strong */
  --bm-ink-2: #29333C;       /* bylines, code */
  --bm-body: #333B43;        /* running text */
  --bm-muted: #5A6570;       /* captions, small copy */
  --bm-faint: #66707A;       /* labels, dates */
  --bm-rule: #E5E5E5;        /* hairlines, as in the header */
  --bm-rule-strong: #C9CED4; /* link underlines */
  --bm-field: #BCC2C9;       /* input underlines, disabled labels */
  --bm-brand: #003262;       /* Berkeley blue: quote and notice edges */
  --bm-accent: #0066CC;      /* the site's link blue: hover */
  --bm-tint: #EFF5FB;        /* light blue: the editors' posts in the home list */
  --bm-sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; /* everything but code and captions */
  --bm-caption: "IBM Plex Serif", Georgia, "Times New Roman", serif; /* figure captions */
  --bm-mono: "Source Code Pro", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; /* code */
  --bm-gutter: 40px;
}

#main-content {
  padding: 56px var(--bm-gutter) 96px;
  font-family: var(--bm-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--bm-body);
  overflow-wrap: break-word;
}

/* Selected text takes a light Berkeley blue. */
#main-content ::selection {
  background: #CFE3F8;
}

/* The column is 700px on small laptops and tablets and grows with the window,
   to 820px on wide screens. */
:where(#main-content) > .measure {
  max-width: clamp(700px, 60vw, 820px);
}

/* ------------------------------------------------------------------------
   3. Running text, lists, links
   ------------------------------------------------------------------------ */

:where(.post-content, .posts) :is(p, dl, ol, ul) {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  text-align: left;
}

:where(.post-content, .posts) p {
  color: var(--bm-body);
  text-wrap: pretty;
}

:where(.post-content, .posts) :is(ol, ul) {
  padding-left: 28px;
}

:where(.post-content, .posts) li {
  margin-bottom: 8px;
}

:where(.post-content, .posts) li > p {
  margin-bottom: 8px;
}

:where(.post-content, .posts) li > :is(ol, ul) {
  margin: 8px 0 0;
}

:where(.post-content, .posts) :is(strong, b) {
  font-weight: 600;
  color: var(--bm-ink);
}

:where(.post-content, .posts) dt {
  font-weight: 600;
  color: var(--bm-ink);
}

:where(.post-content, .posts) sup,
:where(.post-header) sup {
  line-height: 0;
}

:where(.post-content, .posts, .post-header, .generic-box) a {
  color: var(--bm-ink);
  text-decoration: underline;
  text-decoration-color: var(--bm-rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: color 0.15s ease-out, text-decoration-color 0.15s ease-out;
}

:where(.post-content, .posts, .post-header, .generic-box) a:hover,
:where(.post-content, .posts, .post-header, .generic-box) a:focus,
:where(.post-content, .posts, .post-header, .generic-box) a:active {
  color: var(--bm-accent);
  text-decoration: underline;
  text-decoration-color: var(--bm-accent);
  text-decoration-thickness: 1px;
}

:where(.post-content, .posts) a :is(strong, b) {
  color: inherit;
}

/* A linked image carries no underline. */
:where(.post-content, .posts) a:has(> img) {
  text-decoration: none;
}

:where(#main-content) :is(a, button, summary):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ------------------------------------------------------------------------
   4. Headings
   ------------------------------------------------------------------------ */

:where(.post-content, .posts, .post-header) :is(h1, h2, h3, h4, h5, h6),
:where(#main-content) > .measure > h1 {
  font-family: var(--bm-sans);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--bm-ink);
  text-wrap: balance;
}

:where(.post-content) h1 {
  margin: 56px 0 14px;
  font-size: 26px;
}

:where(.post-content) h2,
:where(#main-content) > .measure > h1 {
  margin: 56px 0 12px;
  font-size: 22px;
}

:where(.post-content) h3 {
  margin: 36px 0 8px;
  font-size: 18px;
}

:where(.post-content) h4 {
  margin: 28px 0 6px;
  font-size: 16px;
}

:where(.post-content) :is(h5, h6) {
  margin: 20px 0 6px;
  font-size: 14px;
}

/* ------------------------------------------------------------------------
   5. Page title and byline (post pages, Archive, About, Subscribe)
   ------------------------------------------------------------------------ */

.post-header {
  margin-bottom: 40px;
  text-align: left;
}

.post-header h1 {
  margin: 0 0 16px;
  font-size: 38px;
  line-height: 1.15;
}

.post-meta {
  padding: 0;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.6;
  color: var(--bm-ink-2);
  text-wrap: pretty;
}

/* Author links read as names: same colour as unlinked authors, hairline only. */
:where(.post-meta) a {
  color: inherit;
}

/* The date sits on its own line under the authors, in a quieter grey, so a
   byline of any length wraps without stranding it mid-line. */
.post-header .post-date,
/* Author names are in the brand blue, on the list and on the post; the date stays grey. */
#main-content .post-authors,
#main-content .post-authors a {
  color: var(--bm-brand);
}

.posts .post-meta + .post-meta {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--bm-faint);
}

.post-header .post-date,
.posts .post-meta + .post-meta {
  display: block;
  margin-top: 6px;
  white-space: nowrap;
}

/* Paper-author and affiliation lines (classes from bair-blog.css). Their
   sizes there are em fractions of a 21px byline; restate them for a 14px one. */
.post-header .post-paper-authors {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--bm-muted);
}

.post-header .post-affiliations {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--bm-muted);
}

.post-header .post-paper-authors a:hover,
.post-header .post-paper-authors a:focus {
  color: var(--bm-accent);
  text-decoration-color: var(--bm-accent);
}

/* Affiliation chips were spaced for a centred header; start each line flush. */
.post-header .post-affiliations :where(.fcs2-aff) {
  margin-left: 0;
  margin-right: 1.1em;
}

/* ------------------------------------------------------------------------
   6. Home page post list and pagination
   ------------------------------------------------------------------------ */

/* One hairline between posts is the only divider on the page. */
.posts .post {
  margin: 0;
  padding: 56px 0;
  border-bottom: 1px solid var(--bm-rule);
}

.posts .post:first-child {
  padding-top: 0;
}

.posts center {
  text-align: left;
}

.posts .post-title {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
}

.posts .post-title a,
.posts .post-title a:hover,
.posts .post-title a:focus {
  text-decoration: none;
}

.posts .post > h5 {
  margin: 0 0 28px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
}

/* Layout leftovers in the list markup: a paragraph the parser closes at once,
   a spacer <br>, and an empty paragraph after "Continue". */
.posts .post > .post-summary,
.posts .post > br,
.posts .post > p:empty {
  display: none;
}

/* "Continue" */
.posts .post > a:last-of-type {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
}

/* Posts written by the editors (conference round-ups, the graduate showcase)
   sit on a light blue block. The class is set in index.html from the byline.
   The tint runs 28px past the column on each side, so the text stays on the
   column edge; on phones it reaches the screen edge. */
.posts .post.post--editors {
  margin: 0 -28px;
  padding: 40px 28px;
  border-bottom-color: transparent;
  background: var(--bm-tint);
}

.posts .post:has(+ .post--editors) {
  border-bottom-color: transparent;
}

.posts .post.post--editors + .post--editors {
  margin-top: 16px;
}

.posts .post.post--editors:first-child {
  margin-bottom: 0;
}

.posts .post.post--editors + .post:not(.post--editors) {
  padding-top: 56px;
}

.pagination {
  margin-top: 48px;
  font-family: var(--bm-sans);
  font-size: 14px;
  font-weight: 600;
}

/* "Newer" / "Older" are text links; the padding only enlarges the tap area. */
.pagination a,
.pagination .disabled {
  display: inline-block;
  padding: 16px 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--bm-ink);
  line-height: 1;
}

.pagination a {
  text-decoration: underline;
  text-decoration-color: var(--bm-rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.pagination .disabled {
  color: var(--bm-field);
}

.pagination a:hover,
.pagination a:focus {
  background: none;
  color: var(--bm-accent);
  text-decoration-color: var(--bm-accent);
}

/* ------------------------------------------------------------------------
   7. Figures, captions, media
   ------------------------------------------------------------------------ */

:where(.post-content, .posts) :is(video, iframe, embed, object) {
  max-width: 100%;
}

/* Keep the aspect ratio when max-width narrows an image that also has a
   height attribute; object-fit covers images that carry only a height. */
:where(.post-content, .posts) :is(img, video)[width][height] {
  height: auto;
}

:where(.post-content, .posts) img {
  object-fit: contain;
}

/* The base theme lets an emphasised image bleed 7em past the column on wide
   screens. The minimal layout keeps every figure inside the measure. */
:where(.post-content, .posts) em img {
  max-width: 100%;
  margin-left: 0;
}

/* Standard figure format: one set of rules for every figure, in a post and in
   the teasers on the list pages (Latest and its numbered pages).
   A caption is any of the forms the posts use:
     - an <i> or <em> after the picture, video or frame in the same paragraph
       (nearly every post). A picture floated with align="left|right" sits in
       running text, so an italic after it is not a caption;
     - a centred paragraph that holds only an <i>, straight after the figure;
     - <figcaption>;
     - an element whose class contains "fig-cap" (.abbel-fig-cap, .apr-fig-cap,
       .cuda-mlx-fig-caption).
   The rules start at #main-content, so they outrank the caption styles some
   posts carry in their own <style> block. That keeps the format the same
   everywhere without !important.
   The caption is a block under the figure: caption face, italic, smaller and
   lighter than the text, centred, 10px under the figure, 28px of space under
   the caption. js/figures.js gives it the figure's width and
   centres it under the figure (--bm-figure-width, --bm-figure-offset). Without
   the script it is a centred block of readable width.
   js/figures.js repeats these selectors: change both together. */
#main-content :is(.post-content, .posts) figcaption,
#main-content :is(.post-content, .posts) p > :is(img:not([align="left"], [align="right"]), video, iframe, a:has(> img)) ~ :is(i, em),
#main-content :is(.post-content, .posts) p:has(> img, > video, > iframe, > a > img) + p[style*="center"] > :is(i, em):only-child,
#main-content :is(.post-content, .posts) [class*="fig-cap"] {
  display: block;
  box-sizing: border-box;
  width: var(--bm-figure-width, fit-content);
  max-width: var(--bm-figure-max, min(100%, 76ch));
  margin: 10px auto 28px var(--bm-figure-offset, auto);
  padding: 0;
  font-family: var(--bm-caption);
  font-size: 14px !important; /* one size, whatever a post set inline on its caption */
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--bm-faint);
  text-align: center;
  text-wrap: pretty;
}

/* An empty <i> left after a picture is not a caption. */
#main-content :is(.post-content, .posts) p > :is(img:not([align="left"], [align="right"]), video, iframe, a:has(> img)) ~ :is(i, em):empty {
  display: none;
}

/* The picture sits on the bottom of its line, so the 10px above the caption is
   the same with or without a <br> between them. */
#main-content :is(.post-content, .posts) p > :is(img:not([align="left"], [align="right"]), video, iframe):has(~ :is(i, em)),
#main-content :is(.post-content, .posts) p > a:has(> img):has(~ :is(i, em)) > img {
  vertical-align: bottom;
}

/* A caption in a paragraph of its own keeps the same 10px. */
#main-content :is(.post-content, .posts) p:has(> img, > video, > iframe, > a > img):has(+ p[style*="center"] > :is(i, em):only-child) {
  margin-bottom: 0;
}

#main-content :is(.post-content, .posts) p:has(> img, > video, > iframe, > a > img) + p[style*="center"]:has(> :is(i, em):only-child) {
  margin-top: 0;
}

/* Labels under side-by-side pictures share the caption face, not the block. */
#main-content :is(.post-content, .posts) .wordWide {
  font-family: var(--bm-caption);
  font-size: 14px;
  font-style: italic;
  line-height: 1.5;
  color: var(--bm-faint);
}

/* Inside a caption, wrappers the authors added for size or slant do nothing. */
#main-content :is(.post-content, .posts) :is(figcaption, [class*="fig-cap"], .wordWide) :is(i, em, small) {
  font-size: inherit;
  font-style: inherit;
}

#main-content :is(.post-content, .posts) :is(figcaption, [class*="fig-cap"]) :is(b, strong),
#main-content :is(.post-content, .posts) p > :is(img, video, iframe, a:has(> img)) ~ :is(i, em) :is(b, strong) {
  font-weight: 600;
  color: var(--bm-muted);
}

/* Figure numbers: "Figure 1." before the caption, the same in a post and in its
   teaser on a list page. _includes/figure_gate.html sets data-figure-numbers
   (on the post's article, and on its block in the list) unless the post already
   numbers its own figures or tables ("Figure 1", "Fig. 2", "Table 1" anywhere
   in its text) or opts out with `figure_numbers: false` in its front matter.
   Captioned figures are counted in reading order; a picture with no caption
   has no number. Labels under side-by-side pictures (.wordWide) are not
   counted. */
[data-figure-numbers] {
  counter-reset: bm-figure;
}

#main-content [data-figure-numbers] figcaption::before,
#main-content [data-figure-numbers] p > :is(img:not([align="left"], [align="right"]), video, iframe, a:has(> img)) ~ :is(i, em):not(:empty)::before,
#main-content [data-figure-numbers] p:has(> img, > video, > iframe, > a > img) + p[style*="center"] > :is(i, em):only-child::before,
#main-content [data-figure-numbers] [class*="fig-cap"]::before {
  counter-increment: bm-figure;
  content: "Figure " counter(bm-figure) ". ";
  font-weight: 600;
  color: var(--bm-muted);
}

/* A label the authors typed, restyled by js/figures.js to match the automatic one. */
#main-content .bm-figure-label {
  font-weight: 600;
  color: var(--bm-muted);
}

:where(.post-content) p:has(> img:first-child) {
  margin-top: 36px;
  margin-bottom: 36px;
}

/* Conference logo cards (bair-blog.css) keep their frame as a square hairline. */
:where(.post-content, .posts) img.conf-card {
  border-color: var(--bm-rule);
  border-radius: 0;
}


/* ------------------------------------------------------------------------
   8. Code
   ------------------------------------------------------------------------ */

:where(.post-content, .posts) :is(pre, code, samp, kbd) {
  font-family: var(--bm-mono);
}

/* Inline code is set apart by the mono face alone. */
:where(.post-content, .posts) code {
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--bm-ink-2);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

/* A code block is marked by one hairline down its left edge. */
:where(.post-content, .posts) pre {
  margin: 0 0 24px;
  padding: 2px 0 2px 18px;
  border: 0;
  border-left: 1px solid var(--bm-rule-strong);
  border-radius: 0;
  background: none;
  color: var(--bm-ink-2);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

:where(.post-content, .posts) pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

:where(.post-content, .posts) .highlight {
  background: none;
}

/* Post-specific code and appendix panels (bair-blog.css) get the same
   treatment: no tint, no box, no thick coloured edge. */
.post-content .post-code-compact pre,
.post-content .post-appendix pre,
.post-content .language-bibtex pre {
  padding: 2px 0 2px 16px;
  border-left: 1px solid var(--bm-rule-strong);
  background: none;
}

/* A citation is read, not debugged: one ink colour, no syntax colouring. */
.post-content .language-bibtex pre span {
  color: inherit;
  font-weight: inherit;
}

.post-content .post-appendix {
  margin-top: 56px;
  padding: 24px 0 0;
  border: 0;
  border-top: 1px solid var(--bm-rule);
  border-radius: 0;
  background: none;
}

.post-content .post-appendix h2 {
  color: var(--bm-ink);
}

/* The base theme sets punctuation tokens larger than the code around them. */
:where(.post-content, .posts) .highlight .p {
  font-size: inherit;
  line-height: inherit;
}

/* ------------------------------------------------------------------------
   9. Tables
   Tables whose class starts with "gs" belong to the Google search widget on
   the Archive page and are left alone here (see section 12).
   ------------------------------------------------------------------------ */

:where(.post-content) table:where(:not([class^="gs"])) {
  margin: 0 0 24px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

:where(.post-content) table:where(:not([class^="gs"])) > :is(thead, tbody, tfoot) > tr > :is(th, td) {
  padding: 10px 12px;
  border-top: 1px solid var(--bm-rule);
  line-height: 1.5;
}

:where(.post-content) table:where(:not([class^="gs"])) > thead > tr > th {
  border-bottom: 1px solid var(--bm-ink);
  color: var(--bm-ink);
  font-weight: 600;
}

:where(.post-content) table a {
  overflow-wrap: break-word;
}

/* ------------------------------------------------------------------------
   10. Quotes, rules, footnotes, maths
   ------------------------------------------------------------------------ */

:where(.post-content, .posts) blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--bm-brand);
  background: none;
  font-size: 15px;
  font-style: normal;
  line-height: 1.65;
  text-align: left;
}

:where(.post-content, .posts) blockquote p {
  display: block;
  margin: 0 0 10px;
  font-size: 15px;
  font-style: normal;
  line-height: 1.65;
  text-align: left;
}

:where(.post-content, .posts) blockquote p:last-child {
  margin-bottom: 0;
}

:where(.post-content, .posts) hr {
  margin: 40px 0;
  border: 0;
  border-bottom: 1px solid var(--bm-rule);
}

/* Many posts end with a rule. The box after the article draws its own, so the
   closing one is dropped rather than shown as a second line above empty space. */
.post-content > hr:last-child {
  display: none;
}

.post-content .footnotes {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--bm-rule);
}

.post-content .footnotes :is(ol, li, p) {
  font-size: 14px;
  line-height: 1.6;
  color: var(--bm-muted);
}

.post-content a.footnote,
.post-content a.reversefootnote {
  padding: 0 0.2em;
  text-decoration: none;
}

/* Equations break at an operator to fit the column (MathJax "linebreaks" in
   _includes/head.html). One that cannot break, such as a wide matrix, scrolls
   inside its own box. */
:where(.post-content) :is(.MathJax_Display, .MJXc-display, .MathJax_SVG_Display, mjx-container[display="true"]) {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

/* "Paper and links" (_includes/post_links.html): a post's paper, code and
   data links, one to a line, in the same place under every article. */
.post-content .post-links__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-content .post-links__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px;
  margin: 0;
  padding: 3px 0;
}

.post-content .post-links__host {
  color: var(--bm-muted);
  font-size: 14px;
}

/* ------------------------------------------------------------------------
   11. Standard footer under every post (_includes/standard_footer.html):
       the RSS line, the share row with its live counts, the comments
   ------------------------------------------------------------------------ */

.generic-box {
  margin: 72px 0 0;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--bm-rule);
  background: none;
  font-size: 14px;
  line-height: 1.6;
  color: var(--bm-muted);
  text-align: left;
}

.generic-box .standard-footer__feed {
  margin: 0;
}

/* The share row: its label, then the icons, from the left. */
.generic-box .share-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4px;
  margin-top: 4px;
}

/* Bare icons; the 40px square is only the tap area. */
.generic-box .share-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--bm-muted);
  font-size: 16px;
  text-decoration: none;
}

.generic-box .share-links a:hover,
.generic-box .share-links a:focus {
  color: var(--bm-ink);
  text-decoration: none;
}

/* A live count beside an icon ("3 posts", "2 points"), written by
   js/discussion.js. It sits close to its icon and leads to the comments. */
.generic-box .share-links a.share-count {
  width: auto;
  margin: 0 10px 0 -8px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.generic-box .share-links a[hidden] {
  display: none;
}

/* The comments (css/discussion.css) are drawn from their own custom
   properties, pointed here at the theme tokens. */
#main-content .bair-discussion {
  --bd-ink: var(--bm-body);
  --bd-muted: var(--bm-muted);
  --bd-rule: var(--bm-rule);
  margin: 28px 0 0;
  font-size: 14px;
}

/* A small heading: the footer is quieter than the post above it. */
/* Blank until a lookup finds something: no heading, no space, no rule. */
#main-content .bair-discussion:not(:has(> .bair-discussion__group:not([hidden]))) {
  margin: 0;
  padding: 0;
  border: 0;
}

#main-content .bair-discussion .bair-discussion__title {
  margin: 0 0 2px;
  color: var(--bm-ink);
  font-family: var(--bm-sans);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

/* Links in the block take the site's blue on hover, as links in a post do. */
#main-content .bair-discussion a:hover,
#main-content .bair-discussion a:focus {
  color: var(--bm-accent);
  text-decoration-color: var(--bm-accent);
}

/* ------------------------------------------------------------------------
   12. Archive, Subscribe
   ------------------------------------------------------------------------ */

/* Archive: the list under the "All Blog Posts ..." heading, as plain rows
   with no bullets and no lines. The hook is that heading's generated id; if
   the heading text changes, the list falls back to an ordinary bulleted list. */
#all-blog-posts-in-reverse-chronological-order + ul {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

#all-blog-posts-in-reverse-chronological-order + ul > li {
  margin: 0;
  padding: 7px 0;
}

#all-blog-posts-in-reverse-chronological-order + ul > li > p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--bm-faint);
}

#all-blog-posts-in-reverse-chronological-order + ul > li a {
  text-decoration: none;
}

/* Archive: the Google search widget draws its box with layout tables, which
   the base theme's table rules pad and rule. Give it back plain cells. */
.post-content .gsc-control-cse table > :is(thead, tbody) > tr > :is(th, td) {
  padding: 0;
  border: 0;
}

/* Archive: Google draws its "enhanced by Google" mark in the empty search box
   from a 123x15 picture, which is soft on a high-density screen. Use Google's
   own double-size file at the same drawn size. Google's script writes the mark
   into the box's style attribute only while the box is empty and not in use,
   and this rule matches only then, so the mark still clears for typing. */
.post-content input.gsc-input[style*="branding.png"] {
  background-image: url("https://www.google.com/cse/static/images/2x/en/branding.png") !important;
  background-size: auto 16px !important;
}

/* Archive: line the search box up with the text column, and keep the mark and
   the typed words off the box's edge (the cell reset above removed that gap). */
.post-content form.gsc-search-box {
  margin-left: 0;
  margin-right: 0;
}

.post-content .gsc-control-cse td.gsib_a {
  padding: 0 12px;
}

/* Subscribe: the Mailchimp embed ships its own stylesheet with #id selectors
   and loads it after this file, so these rules carry two ids to outrank it. */
#main-content #mc_embed_signup {
  width: auto;
  max-width: 480px;
  font-family: var(--bm-sans);
  font-size: 15px;
  color: var(--bm-body);
}

#main-content #mc_embed_signup form {
  margin: 0;
  padding: 0;
}

/* The page already has a "Subscribe" title above the form. */
#main-content #mc_embed_signup h2 {
  display: none;
}

#main-content #mc_embed_signup .indicates-required {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--bm-faint);
  text-align: left;
}

#main-content #mc_embed_signup .mc-field-group {
  width: 100%;
  padding-bottom: 16px;
}

#main-content #mc_embed_signup .mc-field-group label {
  margin-bottom: 6px;
  font-family: var(--bm-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--bm-ink-2);
}

#main-content #mc_embed_signup .mc-field-group input {
  box-sizing: border-box;
  height: auto;
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--bm-field);
  border-radius: 0;
  background: none;
  color: var(--bm-ink);
  font-family: var(--bm-sans);
  font-size: 16px;
  line-height: 1.4;
  text-indent: 0;
}

#main-content #mc_embed_signup .mc-field-group input:focus {
  border-bottom-color: var(--bm-ink);
}

/* The submit button reads as a text link. */
#main-content #mc_embed_signup .button {
  height: auto;
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--bm-ink);
  font-family: var(--bm-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  text-decoration: underline;
  text-decoration-color: var(--bm-rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

#main-content #mc_embed_signup .button:hover,
#main-content #mc_embed_signup .button:focus {
  background: none;
  color: var(--bm-accent);
  text-decoration-color: var(--bm-accent);
}

/* ------------------------------------------------------------------------
   13. Conference schedule posts (BAIR at CoRL / NeurIPS)
   Their styles live in a <style> block inside each post and are sized in
   rem, so they follow the smaller root on their own. Here their labels
   take the theme sans, and every card, pill, tinted panel and outlined
   button is reduced to text, whitespace and hairlines. Layout and the
   filter behaviour are left as authored. Selectors carry .post-content (and
   the .neurips / .corl wrapper where needed) to outrank that <style> block,
   which loads after this file.
   ------------------------------------------------------------------------ */

.post-content :is(.neurips, .corl) :not(code, pre, kbd, samp, .fa) {
  border-radius: 0;
  font-family: inherit;
}

/* Stats: figures on the page, not cards. */
.post-content :is(.neurips-stat, .corl-stat) {
  padding: 0;
  border: 0;
}

.post-content :is(.neurips-stat, .corl-stat) strong {
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--bm-ink);
}

/* Day links and session jump links: text links. */
.post-content :is(.neurips-nav, .corl-nav) {
  gap: 0 1.5rem;
}

.post-content :is(.neurips-jump, .corl-jump) {
  gap: 0 1rem;
}

.post-content :is(.neurips-nav, .corl-nav, .neurips-jump, .corl-jump) a {
  padding: 0.3rem 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-decoration-color: var(--bm-rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.post-content :is(.neurips-nav, .corl-nav, .neurips-jump, .corl-jump) a:hover,
.post-content :is(.neurips-nav, .corl-nav, .neurips-jump, .corl-jump) a:focus {
  background: none;
  color: var(--bm-accent);
  text-decoration-color: var(--bm-accent);
}

/* Notes: a Berkeley-blue edge in place of the tinted box. */
.post-content :is(.neurips-notes, .corl-notes) {
  padding: 2px 0 2px 20px;
  border-left: 2px solid var(--bm-brand);
  background: none;
}

/* Filter controls: underlined fields and a text "Reset". */
.post-content :is(.neurips-tools, .corl-tools) :is(input, select) {
  padding-left: 0;
  padding-right: 0;
  border: 0;
  border-bottom: 1px solid var(--bm-field);
  background-color: transparent;
}

.post-content :is(.neurips-tools, .corl-tools) :is(input, select):focus {
  border-bottom-color: var(--bm-ink);
}

.post-content :is(.neurips-tools, .corl-tools) button {
  padding-left: 0;
  padding-right: 0;
  border: 0;
  background: none;
  color: var(--bm-ink);
  text-decoration: underline;
  text-decoration-color: var(--bm-rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.post-content :is(.neurips-empty, .corl-empty) {
  padding-left: 0;
  border: 0;
  text-align: left;
}

/* Section rules drop from 2px to a hairline. */
.post-content :is(.neurips-day, .corl-day) > h2 {
  border-bottom: 1px solid var(--bm-ink);
}

.post-content :is(.neurips-session, .corl-session) {
  border-top-color: var(--bm-rule);
}

.post-content :is(.neurips-about, .corl-about) {
  border-top: 1px solid var(--bm-rule);
}

/* Tags and board numbers: small labels in place of filled pills. The kind
   of session is carried by colour alone. */
.post-content :is(.neurips, .corl) :is(.neurips-tag, .corl-tag) {
  margin-right: 0.8em;
  padding: 0;
  background: none;
  box-shadow: none;
  color: var(--bm-faint);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.post-content :is(.neurips, .corl) :is(.neurips-tag, .corl-tag):is(.k-oral, .b-oral) {
  color: var(--bm-ink);
}

.post-content :is(.neurips, .corl) :is(.neurips-tag, .corl-tag):is(.b-spotlight, .k-spotlight) {
  color: #2F6F90;
}

.post-content :is(.neurips, .corl) :is(.neurips-tag, .corl-tag):is(.k-tutorial, .k-keynote) {
  color: #00756C;
}

.post-content :is(.neurips, .corl) :is(.neurips-tag, .corl-tag).b-track {
  color: #145A32;
}

.post-content :is(.neurips, .corl) :is(.neurips-tag, .corl-tag).k-workshop {
  color: #4A2A75;
}

.post-content :is(.neurips-board, .corl-board) {
  margin-right: 0.8em;
  padding: 0;
  border: 0;
}

/* ------------------------------------------------------------------------
   14. Footer
   The blog footer is an empty band. It becomes plain white space.
   ------------------------------------------------------------------------ */

.site > footer {
  padding: 28px 20px;
  border: 0;
  background: #fff;
  color: var(--bm-faint);
  font-family: var(--bm-sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

/* ------------------------------------------------------------------------
   15. Tablets and phones (768px and below; the source theme's main step)
   ------------------------------------------------------------------------ */

@media (max-width: 768px) {
  #main-content {
    --bm-gutter: 20px;
    padding-top: 36px;
    padding-bottom: 72px;
  }

  .post-header {
    margin-bottom: 32px;
  }

  .post-header h1 {
    font-size: 32px;
  }

  .posts .post {
    padding: 44px 0;
  }

  .posts .post.post--editors {
    margin-left: -20px;
    margin-right: -20px;
    padding: 32px 20px;
  }

  .posts .post.post--editors + .post:not(.post--editors) {
    padding-top: 44px;
  }

  .posts .post-title {
    font-size: 25px;
  }

  :where(.post-content) h1 {
    margin-top: 44px;
    font-size: 24px;
  }

  :where(.post-content) h2,
  :where(#main-content) > .measure > h1 {
    margin-top: 44px;
    font-size: 21px;
  }

  :where(.post-content) h3 {
    margin-top: 32px;
    font-size: 18px;
  }

  :where(.post-content, .posts) pre {
    padding-left: 14px;
    font-size: 12.5px;
  }

  /* Data tables scroll sideways inside their own box instead of pushing the
     page wide, and so do figure tables drawn with fixed-size SVGs. Tables
     that hold images are left to shrink with their images. */
  :where(.post-content) table:where(:not([class^="gs"]):not(:has(img, video, iframe))) {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden; /* sideways only: no second up-and-down scroll inside the page */
    -webkit-overflow-scrolling: touch;
  }

  /* Conference posts: form controls at 16px (below that iOS zooms the page
     on focus) and larger touch areas for the day buttons and jump chips. */
  .post-content :is(.neurips-tools, .corl-tools) :is(input, select, button) {
    min-height: 44px;
    font-size: 16px;
  }

  .post-content :is(.neurips-nav, .corl-nav) a {
    padding: 12px 0;
  }

  .post-content :is(.neurips-jump, .corl-jump) a {
    padding: 10px 0;
  }
}

/* ------------------------------------------------------------------------
   16. Small phones (480px and below; not a step in the source theme)
   ------------------------------------------------------------------------ */

@media (max-width: 480px) {
  .post-header h1 {
    font-size: 27px;
    line-height: 1.2;
  }

  .posts .post-title {
    font-size: 23px;
  }

  :where(.post-content) h1 {
    font-size: 22px;
  }

  :where(.post-content) h2,
  :where(#main-content) > .measure > h1 {
    font-size: 20px;
  }

  :where(.post-content) h3 {
    font-size: 17px;
  }

  :where(.post-content, .posts) :is(ol, ul) {
    padding-left: 22px;
  }

  :where(.post-content, .posts) blockquote {
    padding-left: 16px;
  }
}

/* A note a post set small and grey inline (a cross-post line, a viewing tip) takes the
   site's small-print size and colour, so such notes read the same in every post. */
#main-content .post-content > p[style*="font-size"] {
  font-size: 14px !important;
  color: var(--bm-faint) !important;
  background: none !important;
}

/* An empty caption (marked by js/figures.js) shows nothing and takes no figure number. */
#main-content .bm-caption-empty { display: none !important; }

/* Standard disclosure note (_includes/post_disclosure.html). */
.post-content .post-disclosure {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--bm-rule);
  color: var(--bm-faint);
  font-size: 13px;
  line-height: 1.55;
}
.post-content .post-disclosure .post-disclosure__title {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  font-family: var(--bm-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--bm-ink);
}
.post-content .post-disclosure p {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--bm-faint);
}
.post-content .post-disclosure p:last-child { margin-bottom: 0; }
.post-content .post-disclosure a {
  color: var(--bm-muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.post-content .post-disclosure a:hover { color: var(--bm-accent); }
.post-content .post-disclosure__label { font-weight: 600; color: var(--bm-muted); }

/* "Originally appeared on" note: one quiet grey line above the first paragraph
   (front matter: originally_at: {name, url}). */
.post-content .post-origin {
  margin: 0 0 1.25em;
  font-size: 14px;
  line-height: 1.5;
  color: var(--bm-ink-3, #6b7280);
}
.post-content .post-origin a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Home page: card image for posts whose teaser has no figure of its own. */
.posts .post .post-tile { display: block; margin: 0 0 1.25em; }
.posts .post .post-tile img, .posts .post .post-tile video { display: block; width: 100%; height: auto; margin: 0; border-radius: 4px; }

/* Trailing ellipsis on a home-page teaser; hidden inside the article itself. */
.teaser-more { display: none; }
.posts .post .teaser-more { display: inline; }

/* References: a small, light, closed box at the end of a post (js/references.js
   folds the heading and its list into it). The list itself is styled here too,
   so it reads the same when the script has not run. */
.post-content .post-refs {
  margin: 48px 0 0;
  border-top: 1px solid var(--bm-rule);
}

.post-content .post-refs > summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--bm-ink);
}

.post-content .post-refs > summary::-webkit-details-marker {
  display: none;
}

.post-content .post-refs > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 1.5px solid var(--bm-faint);
  border-bottom: 1.5px solid var(--bm-faint);
  transform: translateY(-3px) rotate(45deg);
}

.post-content .post-refs[open] > summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.post-content .post-refs > summary:hover {
  color: var(--bm-accent);
}

.post-content .post-refs > summary:focus-visible {
  outline: 2px solid var(--bm-accent);
  outline-offset: 2px;
}

.post-content .post-refs__count {
  font-weight: 400;
  color: var(--bm-faint);
}

.post-content .post-refs :is(ol, ul) {
  margin: 0 0 16px;
  padding-left: 2.2em;
}

.post-content .post-refs :is(ol, ul, li, p),
.post-refs-card {
  font-size: 13px;
  line-height: 1.55;
  color: var(--bm-faint);
}

.post-content .post-refs li {
  margin: 0 0 5px;
}

.post-content .post-refs li:target {
  color: var(--bm-ink);
}

.post-content .post-refs a,
.post-refs-card a {
  color: var(--bm-muted);
  text-decoration: underline;
  text-decoration-color: var(--bm-rule-strong);
  text-underline-offset: 2px;
}

.post-content .post-refs a:hover,
.post-refs-card a:hover {
  color: var(--bm-accent);
}

/* The entry shown beside an in-text citation. */
.post-refs-card {
  position: absolute;
  z-index: 30;
  box-sizing: border-box;
  width: min(360px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid var(--bm-rule-strong);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(4, 32, 60, 0.08);
  font-family: var(--bm-sans);
}

.post-refs-card[hidden] {
  display: none;
}

.post-content a.post-cite {
  text-decoration: none;
}

@media print {
  .post-refs-card {
    display: none;
  }
}

/* The card sits on <body>, outside the article, so it restates its own type. */
body .post-refs-card,
body .post-refs-card * {
  font-family: var(--bm-sans) !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}
body .post-refs-card { color: var(--bm-faint) !important; }
body .post-refs-card a { color: var(--bm-muted) !important; }
body .post-refs-card a:hover { color: var(--bm-accent) !important; }

/* Play/pause and position slider under a looping video (js/scrubber.js). */
.post-content video[data-scrub] { display: block; width: 100%; height: auto; cursor: pointer; }
.post-content .scrub { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; }
.post-content .scrub__button {
  flex: none; min-width: 58px; padding: 3px 10px;
  font: 500 13px/1.4 var(--bm-sans); color: var(--bm-muted);
  background: none; border: 1px solid var(--bm-rule-strong); border-radius: 4px; cursor: pointer;
}
.post-content .scrub__button:hover { color: var(--bm-accent); border-color: var(--bm-accent); }
.post-content .scrub__button:focus-visible,
.post-content .scrub__slider:focus-visible { outline: 2px solid var(--bm-accent); outline-offset: 2px; }
.post-content .scrub__slider { flex: 1; min-width: 0; margin: 0; accent-color: var(--bm-accent); cursor: pointer; }

/* Home card: a long author list starts short and opens in place to the full list. */
#main-content .author-expand { display: inline; }
#main-content .author-expand > summary { display: inline; list-style: none; cursor: pointer; }
#main-content .author-expand > summary::-webkit-details-marker { display: none; }
#main-content .author-expand__more { text-decoration: underline; text-underline-offset: 3px; }
#main-content .author-expand > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
#main-content .author-expand[open] > summary { display: none; }
#main-content .author-expand__all { display: block; max-width: 46em; line-height: 1.6; }
#main-content .author-expand:not([open]) .author-expand__all { display: none; }
#main-content .author-expand::details-content { display: inline; }
