/*
 * mk-responsive.css
 * Conservative responsive compatibility layer for mk.bcgsc.ca.
 *
 * Goals:
 *   - preserve the historic 975 px desktop layout
 *   - make the global shell fit smaller viewports
 *   - stack the two-panel layout when 975 px no longer fits
 *   - make common legacy content fail gracefully on narrow screens
 *   - avoid changing page-specific desktop presentation
 *
 * This file is intended to be loaded AFTER all page-specific CSS.
 */

/* --------------------------------------------------------------------------
 * Global shell
 * -------------------------------------------------------------------------- */

/* Keep the historic desktop width, but never make the document wider than
 * the viewport. normalize.css removes the browser's default body margin, so
 * the 20 px allowance leaves the same 10 px visual margin used by the shell.
 */
body.mk-responsive #pagewrap-container {
  width: 975px;
  max-width: calc(100% - 20px);
}

/* Grid items default to min-width:auto, which can let legacy fixed-width
 * descendants force a grid track wider than intended. Allow the two global
 * panels themselves to shrink. This does not resize their descendants.
 */
body.mk-responsive #page-content,
body.mk-responsive #page-thoughts {
  min-width: 0;
  max-width: 100%;
}

/* Keyboard focus should remain visible even on old components. */
body.mk-responsive a:focus-visible,
body.mk-responsive button:focus-visible,
body.mk-responsive input:focus-visible,
body.mk-responsive select:focus-visible,
body.mk-responsive textarea:focus-visible,
body.mk-responsive [tabindex]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Layout debug mode. mk-responsive.js enables this only for
 * ?mkdebug=layout. There is no effect during normal browsing.
 */
html.mk-layout-debug [data-mk-overflow="true"] {
  outline: 2px solid #c00 !important;
  outline-offset: 2px !important;
}

/* --------------------------------------------------------------------------
 * Below the historic shell width
 *
 * At this point the old 975 px two-column geometry no longer fits. Rather
 * than squeezing the 630/345 tracks, stack them. This is deliberately close
 * to the old desktop boundary so old fixed-width page content gets as much
 * room as possible.
 * -------------------------------------------------------------------------- */

@media (max-width: 994px) {
  body.mk-responsive #page-2-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  /* CSS fallback: place News + Thoughts before the article visually even if
   * the progressive-enhancement JS is unavailable or cached. The JS also
   * moves the node in the DOM so visual and keyboard/read order agree.
   */
  body.mk-responsive #page-2-panel > #page-thoughts {
    grid-row: 1;
  }

  body.mk-responsive #page-2-panel > #page-content {
    grid-row: 2;
  }

  body.mk-responsive #page-thoughts {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    border-top: 2px solid #ddd;
    margin-top: 10px;
    padding-top: 20px;
  }

  /* Keep ordinary media inside the global content panels. Image maps are
   * excluded because scaling an old usemap image does not scale its map
   * coordinates.
   */
  body.mk-responsive #page-content img:not([usemap]),
  body.mk-responsive #page-thoughts img:not([usemap]),
  body.mk-responsive #page-content video,
  body.mk-responsive #page-thoughts video,
  body.mk-responsive #page-content iframe,
  body.mk-responsive #page-thoughts iframe {
    max-width: 100%;
  }

  body.mk-responsive #page-content img:not([usemap]),
  body.mk-responsive #page-thoughts img:not([usemap]),
  body.mk-responsive #page-content video,
  body.mk-responsive #page-thoughts video {
    height: auto;
  }

  /* Existing thought thumbnails are forced to 300 px with !important in
   * style.css. Retain 300 px when it fits, but permit them to shrink.
   */
  body.mk-responsive div.thought img {
    max-width: 100% !important;
    height: auto;
  }

  /* Preformatted/code material should scroll inside its panel rather than
   * widening the whole page.
   */
  body.mk-responsive #page-content pre,
  body.mk-responsive #page-thoughts pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* The debug accordion has a hard-coded 900 px minimum in accordion.css. */
  body.mk-responsive .faqon.debug {
    min-width: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent exceptionally long URLs/identifiers in article copy from
   * becoming the width of the document. Do not apply this to navigation.
   */
  body.mk-responsive #page-content p a,
  body.mk-responsive #page-content li a,
  body.mk-responsive #page-thoughts p a,
  body.mk-responsive #page-thoughts li a {
    overflow-wrap: anywhere;
  }

  /* The masthead component now owns its own responsive carousel layout.
   * Keep only the outer shell contract here.
   */
  body.mk-responsive #masthead {
    min-width: 0 !important;
    max-width: 100%;

    /* autohandler historically gives #masthead class=vmarb6.  That spacing
     * was useful around the old fixed-height Cycle2 box, but it leaves a
     * conspicuous empty band below the new flow-based masthead on narrow
     * screens.  Keep a modest separation instead.
     */
    margin-bottom: 12px !important;
  }
}

/* --------------------------------------------------------------------------
 * Narrow screens: common legacy helpers
 * -------------------------------------------------------------------------- */

@media (max-width: 800px) {
  /* Old general-purpose 750 px wrapper. Keep its display mode; only make its
   * declared width fluid.
   */
  body.mk-responsive #page-content .wrap,
  body.mk-responsive #page-thoughts .wrap {
    width: 100%;
    max-width: 100%;
  }

  /* Tab/chip rail behavior is configured later via mk-ui-config.js. */

  /* Long crumb trails can likewise scroll without widening the document. */
  body.mk-responsive #crumb-trail-inner {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  /* The existing return-to-top control is positioned 2.5 em outside the
   * content edge. Keep it inside the viewport on narrow screens.
   */
  body.mk-responsive div.tocsection div.top,
  body.mk-responsive div#crumb-trail-inner div.top {
    left: auto;
    right: 0;
  }
}

@media (max-width: 700px) {
  /* Known 620 px legacy containers. On a phone these should become normal
   * full-width blocks. These rules intentionally do not touch their desktop
   * behavior.
   */
  body.mk-responsive #page-content #projects,
  body.mk-responsive #page-content .page-container-partial,
  body.mk-responsive #page-thoughts #projects,
  body.mk-responsive #page-thoughts .page-container-partial {
    width: auto;
    max-width: 100%;
    float: none;
    box-sizing: border-box;
  }

  body.mk-responsive #page-content #projects,
  body.mk-responsive #page-thoughts #projects {
    border-right: 0;
  }

  /* Let the small utility links at the top wrap naturally. */
  body.mk-responsive #preamble {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
  }

  body.mk-responsive #preamble a {
    margin: 0;
  }
}

@media (max-width: 640px) {
  /* Keep the utility icons and the current quote on one compact row. The
   * quote is allowed two lines; keyboard focus temporarily reveals any
   * clipped remainder.
   */
  body.mk-responsive #iconquotes {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
  }

  body.mk-responsive #iconquotes > div:first-child {
    justify-self: start;
    align-self: center;
    min-width: 0;
  }

  body.mk-responsive #iconquotes > div:not(:first-child) {
    justify-self: stretch;
    align-self: center;
    min-width: 0;
  }

  body.mk-responsive #quotes {
    text-align: right;
    line-height: 1.25;
    max-height: calc(var(--mk-quote-lines, 2) * 1.25em);
    overflow: hidden;
  }

  body.mk-responsive #quotes:focus-within {
    max-height: none;
    overflow: visible;
  }

  /* At small-tablet widths retain the familiar three-logo line while
   * allowing each image to use the available cell instead of a fixed size.
   */
  body.mk-responsive #header {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 4px;
  }

  body.mk-responsive #header > div {
    min-width: 0;
    height: clamp(42px, 12vw, 60px);
    padding-left: 4px;
    padding-right: 4px;
  }

  body.mk-responsive #header img {
    display: block;
    width: auto;
    height: auto !important;
    max-width: 100%;
    max-height: 100%;
  }
}

@media (max-width: 480px) {
  /* The three wide wordmark-style identities become unreadably small in
   * equal thirds. Give the personal mark one compact row, then share a
   * second row between the two institutional identities.
   */
  body.mk-responsive #header {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "mk-personal mk-personal"
      "mk-gsc mk-phsa";
    column-gap: 10px;
    row-gap: 4px;
  }

  body.mk-responsive #header > div:nth-child(1) {
    grid-area: mk-gsc;
    justify-self: start;
    height: 34px;
  }

  body.mk-responsive #header > div:nth-child(2) {
    grid-area: mk-personal;
    justify-self: center;
    height: 46px;
    max-width: 78%;
  }

  body.mk-responsive #header > div:nth-child(3) {
    grid-area: mk-phsa;
    justify-self: end;
    height: 34px;
  }

  body.mk-responsive #quotes {
    font-size: 11px;
  }

  /* The three top utility/promotional links normally fit on one phone row.
   * If a page supplies longer labels, let the row swipe rather than wrap into
   * a tall block.
   */
  body.mk-responsive #preamble {
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body.mk-responsive #preamble::-webkit-scrollbar {
    display: none;
  }

  body.mk-responsive #preamble a {
    flex: 0 0 auto;
    padding: 4px 7px;
    margin: 0 2px;
    font-size: 90%;
  }
}

@media (max-width: 560px) {
  /* Floated pull quotes consume too much of a phone-width text column. */
  body.mk-responsive #page-content .pull,
  body.mk-responsive #page-content .pullmed,
  body.mk-responsive #page-content .pulllarge {
    float: none;
    width: auto;
    max-width: 100%;
    margin: 1em 0;
    box-sizing: border-box;
  }
}



/* --------------------------------------------------------------------------
 * Light-background image mats
 *
 * mk-responsive.js classifies light-paper raster images using their perimeter
 * plus a corner/full-image fallback for figures whose artwork reaches an edge.
 * The mat is an outline rather than padding/border, so it consumes no layout
 * space and never moves the image. JS also clamps the effective width when
 * nearby images leave less room than the configured mat.
 * -------------------------------------------------------------------------- */

html.mk-image-mats-active body.mk-responsive :is(#page-content, #page-thoughts)
img.mk-image-light-bg {
  outline: var(--mk-image-mat-width, 0px) solid var(--mk-image-mat-color, transparent);
  outline-offset: 0;
}

/* Masthead slide motion is clipped by .mk-masthead-stage, so an outward IMG
 * outline would be clipped away. Paint the same zero-layout mat on the stage
 * whenever its active slide has been classified as light-background. The
 * bottom margin reserves room for that outward edge so it cannot overlap the
 * masthead pager/actions; the masthead image itself never moves or resizes. */
html.mk-image-mats-active body.mk-responsive
.mk-masthead-stage.mk-image-mat-masthead {
  outline: var(--mk-image-mat-width, 0px) solid var(--mk-image-mat-color, transparent);
  outline-offset: 0;
  margin-bottom: var(--mk-image-mat-width, 0px);
}

/* An outward outline can visually occupy the normal image/caption gap. Add
 * clearance inside only the caption associated with that matted image. A
 * pseudo-element preserves any historical caption margin/padding rules and
 * moves neither the image nor neighboring gallery columns. */
html.mk-image-mats-active body.mk-responsive :is(#page-content, #page-thoughts)
.mk-image-mat-caption::before {
  content: "";
  display: block;
  height: var(--mk-image-mat-caption-clearance, 0px);
}



/* --------------------------------------------------------------------------
 * Site-wide tab/chip navigation
 *
 * mk-ui-config.js chooses "chips" or "tabs". The historical menu CSS remains
 * the fallback when JS is unavailable or menuStyle is "tabs".
 * -------------------------------------------------------------------------- */

:root {
  --mk-chip-height: 30px;
  --mk-chip-radius: 8px;
  --mk-chip-gap: 8px;
  --mk-chip-padding-y: 6px;
  --mk-chip-padding-x: 10px;
  --mk-year-chip-height: 27px;
  --mk-year-chip-gap: 6px;
  --mk-year-chip-padding-x: 8px;
  --mk-toc-anchor-offset: 56px;
  --mk-toc-z-index: 500;
  --mk-interaction-highlight: #fff200;
  --mk-interaction-highlight-text: #222;
  --mk-control-fill: #4e7e8f;
  --mk-control-fill-text: #fff;
}

html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mk-chip-gap);
  width: 100% !important;
  max-width: 100%;
  clear: both;
  margin: 20px 0 16px !important;
  padding: 0 !important;
  border-bottom: 0 !important;
  overflow: visible;
  white-space: normal;
  z-index: auto;
}

html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu a,
html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu a.level0,
html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu a.level1,
html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu a.level2,
html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu a.level3 {
  position: static !important;
  top: auto !important;
  bottom: auto !important;
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: var(--mk-chip-height);
  box-sizing: border-box;
  padding: var(--mk-chip-padding-y) var(--mk-chip-padding-x) !important;
  margin: 0 !important;
  border: 1px solid #d9d9d9 !important;
  border-radius: var(--mk-chip-radius) !important;
  background: #eee !important;
  color: #666 !important;
  font-family: "Open Sans", "segoe ui", geneva, verdana, trebuchet, arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.35px;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none !important;
  white-space: nowrap;
  z-index: auto !important;
}

html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu a:hover,
html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu a:focus-visible {
  border-color: #bdbdbd !important;
  background: var(--mk-interaction-highlight) !important;
  color: var(--mk-interaction-highlight-text) !important;
  text-decoration: none !important;
}

html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu a.active,
html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu a[aria-current="page"] {
  border-color: #d0d0d0 !important;
  background: var(--mk-interaction-highlight) !important;
  color: var(--mk-interaction-highlight-text) !important;
  padding: var(--mk-chip-padding-y) var(--mk-chip-padding-x) !important;
  text-decoration: none !important;
}

html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu a.active:hover,
html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu a[aria-current="page"]:hover {
  border-color: #bdbdbd !important;
  background: var(--mk-interaction-highlight) !important;
  color: var(--mk-interaction-highlight-text) !important;
}

/* The theme adapter is loaded after this compatibility layer. The extra
 * .mk-js specificity deliberately keeps the site's yellow interaction cue
 * for modern menu chips even when a color theme is active. */
html.mk-js.mk-theme-active[data-mk-menu-style="chips"]
body.mk-responsive div.tabmenu a:hover,
html.mk-js.mk-theme-active[data-mk-menu-style="chips"]
body.mk-responsive div.tabmenu a:focus-visible,
html.mk-js.mk-theme-active[data-mk-menu-style="chips"]
body.mk-responsive div.tabmenu a.active,
html.mk-js.mk-theme-active[data-mk-menu-style="chips"]
body.mk-responsive div.tabmenu a[aria-current="page"] {
  border-color: #bdbdbd !important;
  background: var(--mk-interaction-highlight) !important;
  color: var(--mk-interaction-highlight-text) !important;
}


/* Year rails are the same component family, but intentionally denser. */
html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu.mk-tabmenu-years {
  gap: var(--mk-year-chip-gap);
  margin-top: 14px !important;
  margin-bottom: 12px !important;
}

html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu.mk-tabmenu-years a,
html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu.mk-tabmenu-years a.level0,
html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu.mk-tabmenu-years a.level1,
html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu.mk-tabmenu-years a.level2,
html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu.mk-tabmenu-years a.level3 {
  min-height: var(--mk-year-chip-height);
  padding-left: var(--mk-year-chip-padding-x) !important;
  padding-right: var(--mk-year-chip-padding-x) !important;
  font-size: 9px;
  letter-spacing: 0.2px;
}

/* mk-responsive.js upgrades the legacy hamburger character to the same
 * Material Icons Rounded vocabulary used elsewhere in the site and marks the
 * containing anchor/button as .mk-menu-trigger. The legacy .hamburger is
 * usually a child span, so sizing the glyph itself is not enough: the control
 * must own the same 30 px square geometry as the neighboring chips. */
html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu .hamburger {
  position: static !important;
  top: auto !important;
  bottom: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  font-size: 18px !important;
  line-height: 1 !important;
  vertical-align: middle;
}

html[data-mk-menu-style="chips"] body.mk-responsive div.tabmenu > :is(a, button).mk-menu-trigger {
  width: var(--mk-chip-height) !important;
  min-width: var(--mk-chip-height) !important;
  height: var(--mk-chip-height) !important;
  min-height: var(--mk-chip-height) !important;
  padding: 0 !important;
}

/* Narrow chip rails must retain flex centering; the generic rail fallback
 * otherwise changes anchors back to inline-block. */
html[data-mk-menu-style="chips"].mk-tabs-narrow
body.mk-responsive div.tabmenu a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* Configured narrow rail: applies to both the modern chip style and the
 * historical tab style. This class is driven by navigation.scrollBelow.
 */
html.mk-tabs-narrow body.mk-responsive div.tabmenu {
  flex-wrap: nowrap !important;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

html.mk-tabs-narrow body.mk-responsive div.tabmenu::-webkit-scrollbar {
  display: none;
}

html.mk-tabs-narrow body.mk-responsive div.tabmenu a {
  flex: 0 0 auto;
  display: inline-block;
  scroll-margin-inline: 24px;
}

html.mk-tabs-narrow body.mk-responsive div.tabmenu.mk-tab-overflow-left {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 100%);
}

html.mk-tabs-narrow body.mk-responsive div.tabmenu.mk-tab-overflow-right {
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
}

html.mk-tabs-narrow body.mk-responsive div.tabmenu.mk-tab-overflow-left.mk-tab-overflow-right {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}


/* --------------------------------------------------------------------------
 * Shared interaction cue: breadcrumbs and return-to-top controls
 *
 * Yellow is intentionally invariant across color themes. Themes may change
 * resting fills, but hover/focus remains the site's familiar interaction cue.
 * -------------------------------------------------------------------------- */

body.mk-responsive :is(
  #crumb-trail-outer a.crumb-in-trail,
  #crumb-trail-inner a.crumb-in-trail
):hover,
body.mk-responsive :is(
  #crumb-trail-outer a.crumb-in-trail,
  #crumb-trail-inner a.crumb-in-trail
):focus-visible,
body.mk-responsive div.tocsection div.top:hover,
body.mk-responsive div.tocsection div.top:focus-within,
body.mk-responsive div#crumb-trail-inner div.top:hover,
body.mk-responsive div#crumb-trail-inner div.top:focus-within {
  background: var(--mk-interaction-highlight) !important;
  color: var(--mk-interaction-highlight-text) !important;
}

body.mk-responsive :is(
  div.tocsection div.top,
  div#crumb-trail-inner div.top
) > a:hover,
body.mk-responsive :is(
  div.tocsection div.top,
  div#crumb-trail-inner div.top
) > a:focus-visible {
  background: var(--mk-interaction-highlight) !important;
  color: var(--mk-interaction-highlight-text) !important;
}

body.mk-responsive :is(
  div.tocsection div.top,
  div#crumb-trail-inner div.top
) > a:is(:hover, :focus-visible) > .material-icons-round {
  background: transparent !important;
  color: inherit !important;
}

/* The theme adapter is loaded after mk-responsive.css. The additional .mk-js
 * specificity below intentionally outranks its themed control rules without
 * requiring each theme to carry a duplicate hover palette. It also fixes the
 * section return icon itself: the icon inherits from its anchor, so the anchor
 * must receive the calculated contrast color as well as the outer square. */
html.mk-js.mk-theme-active body.mk-responsive :is(
  div.tocsection div.top,
  div#crumb-trail-inner div.top
) > a {
  color: var(--mk-theme-fill-text, var(--mk-interaction-highlight-text)) !important;
}

html.mk-js.mk-theme-active body.mk-responsive :is(
  div.tocsection div.top,
  div#crumb-trail-inner div.top
) > a > .material-icons-round {
  color: inherit !important;
}

html.mk-js.mk-theme-active body.mk-responsive :is(
  #crumb-trail-outer a.crumb-in-trail,
  #crumb-trail-inner a.crumb-in-trail
):hover,
html.mk-js.mk-theme-active body.mk-responsive :is(
  #crumb-trail-outer a.crumb-in-trail,
  #crumb-trail-inner a.crumb-in-trail
):focus-visible,
html.mk-js.mk-theme-active body.mk-responsive div.tocsection div.top:hover,
html.mk-js.mk-theme-active body.mk-responsive div.tocsection div.top:focus-within,
html.mk-js.mk-theme-active body.mk-responsive div#crumb-trail-inner div.top:hover,
html.mk-js.mk-theme-active body.mk-responsive div#crumb-trail-inner div.top:focus-within,
html.mk-js.mk-theme-active body.mk-responsive :is(
  div.tocsection div.top,
  div#crumb-trail-inner div.top
) > a:hover,
html.mk-js.mk-theme-active body.mk-responsive :is(
  div.tocsection div.top,
  div#crumb-trail-inner div.top
) > a:focus-visible {
  background: var(--mk-interaction-highlight) !important;
  color: var(--mk-interaction-highlight-text) !important;
}

html.mk-js.mk-theme-active body.mk-responsive :is(
  div.tocsection div.top,
  div#crumb-trail-inner div.top
) > a:is(:hover, :focus-visible) > .material-icons-round {
  background: transparent !important;
  color: var(--mk-interaction-highlight-text) !important;
}

/* Top utility/promotional chips use the same filled-control treatment as the
 * Home / email / camera controls and breadcrumb chips. The #preamble selector
 * is intentional: mk-theme.css also styles #preamble (including .piday) and
 * is loaded later, so this rule must outrank those theme-specific declarations.
 */
body.mk-responsive #preamble .mk-preamble-links a {
  border-color: var(--mk-control-fill) !important;
  background: var(--mk-control-fill) !important;
  color: var(--mk-control-fill-text) !important;
  text-decoration: none !important;
}

html.mk-js.mk-theme-active body.mk-responsive #preamble .mk-preamble-links a {
  border-color: var(--mk-theme-fill, var(--mk-control-fill)) !important;
  background: var(--mk-theme-fill, var(--mk-control-fill)) !important;
  color: var(--mk-theme-fill-text, var(--mk-control-fill-text)) !important;
}

body.mk-responsive #preamble .mk-preamble-links a :is(span, strong, em),
html.mk-js.mk-theme-active body.mk-responsive #preamble .mk-preamble-links a :is(span, strong, em) {
  color: inherit !important;
}

body.mk-responsive #preamble .mk-preamble-links a:hover,
body.mk-responsive #preamble .mk-preamble-links a:focus-visible,
html.mk-js.mk-theme-active body.mk-responsive #preamble .mk-preamble-links a:hover,
html.mk-js.mk-theme-active body.mk-responsive #preamble .mk-preamble-links a:focus-visible {
  border-color: #bdbdbd !important;
  background: var(--mk-interaction-highlight) !important;
  color: var(--mk-interaction-highlight-text) !important;
  text-decoration: none !important;
}


/* Image purchase overlays share the same filled-control color contract as
 * the preamble, breadcrumb and icon controls. Keep the legacy purchase
 * control's positioning, dimensions, padding and typography untouched; this
 * compatibility layer only owns its resting and interaction colors.
 */
body.mk-responsive [data-mk-image-purchase] {
  border-color: var(--mk-control-fill) !important;
  background: var(--mk-control-fill) !important;
  color: var(--mk-control-fill-text) !important;
  text-decoration: none !important;
}

html.mk-js.mk-theme-active body.mk-responsive [data-mk-image-purchase] {
  border-color: var(--mk-theme-fill, var(--mk-control-fill)) !important;
  background: var(--mk-theme-fill, var(--mk-control-fill)) !important;
  color: var(--mk-theme-fill-text, var(--mk-control-fill-text)) !important;
}

body.mk-responsive [data-mk-image-purchase]:hover,
body.mk-responsive [data-mk-image-purchase]:focus-visible,
html.mk-js.mk-theme-active body.mk-responsive [data-mk-image-purchase]:hover,
html.mk-js.mk-theme-active body.mk-responsive [data-mk-image-purchase]:focus-visible {
  border-color: #bdbdbd !important;
  background: var(--mk-interaction-highlight) !important;
  color: var(--mk-interaction-highlight-text) !important;
  text-decoration: none !important;
}


/* --------------------------------------------------------------------------
 * Responsive table of contents
 *
 * mk-responsive.js wraps existing .toc components in .mk-toc-shell and adds
 * an accessible disclosure button. The collapse breakpoint and sticky-control
 * choice come from js/config/mk-ui-config.js. Without JS, historical TOCs
 * remain visible.
 * -------------------------------------------------------------------------- */

.mk-toc-shell {
  display: contents;
}

/* The wide sticky TOC changes height when follow mode opens/closes branches.
 * Temporarily disable browser scroll anchoring while JS performs those
 * structural changes so the browser does not counter-scroll and push the
 * sticky sentinel back across its activation threshold.
 */
html.mk-toc-reflowing,
html.mk-toc-reflowing body.mk-responsive {
  overflow-anchor: none;
}

.mk-toc-toggle {
  display: none;
}

/* Keep enhanced TOCs available while the reader scrolls.
 * On wide layouts the TOC remains full-height at its natural position. Once it
 * actually sticks to the viewport, JS adds .mk-toc-stuck. On hierarchical
 * TOCs, inactive top-level branches then collapse to their headings while the
 * current branch remains expanded. Internal scrolling remains only as a
 * fallback for an unusually tall active branch.
 */
html.mk-toc-sticky body.mk-responsive .mk-toc-shell {
  display: block;
  position: sticky;
  top: 6px;
  z-index: var(--mk-toc-z-index);
  align-self: start;
}

html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive .mk-toc-shell {
  box-sizing: border-box;
}

html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive .mk-toc-shell.mk-toc-stuck {
  margin-left: -3em;
  width: calc(100% + 3em);
  max-width: calc(100% + 3em);
  padding: 6px 0 10px 3em;
  background: #fff;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 5px 8px -8px rgba(0, 0, 0, 0.45);
}

html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive .mk-toc-shell.mk-toc-stuck .toc.mk-toc-enhanced {
  position: relative;
  z-index: 1;
  max-height: min(62vh, 560px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-right: 8px;
  background: transparent;
}

/* The current-reading highlight belongs to the sticky shell rather than the
 * indented TOC link. JS supplies its vertical position/height. This makes the
 * yellow bar start at one invariant left edge for every hierarchy level and
 * extend across the complete sticky surface. */
html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive
.mk-toc-shell.mk-toc-stuck.mk-toc-has-current-highlight::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: var(--mk-toc-current-top, 0px);
  left: 0;
  right: 0;
  height: var(--mk-toc-current-height, 0px);
  background: var(--mk-interaction-highlight);
  pointer-events: none;
}

/* mk-theme.css is loaded later and gives .toc an opaque themed page surface.
 * Keep the shell themed, but leave the stuck TOC itself transparent so the
 * full-width current-row bar remains visible. */
html.mk-js.mk-theme-active:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive
.mk-toc-shell.mk-toc-stuck .toc.mk-toc-enhanced {
  background: transparent !important;
}

/* Follow mode: preserve the complete TOC at its natural position. Only while
 * it is stuck do inactive top-level branches hide their descendants. JS marks
 * each visual TOC row from the hierarchy of the target headings, rather than
 * depending on historical TOC list nesting. Every top-level row remains
 * visible; descendant rows are shown only for the current branch. */
html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive
.mk-toc-shell.mk-toc-stuck .toc.mk-toc-enhanced.mk-toc-follow
.mk-toc-follow-item:not(.mk-toc-follow-root):not(.mk-toc-follow-current-branch) {
  display: none !important;
}

/* Wide-layout manual collapse. The narrow layout already has the full
 * CONTENTS disclosure button, so this icon-only control is desktop/tablet
 * only. It remains available both at the TOC's natural position and while the
 * TOC is stuck. */
html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive .mk-toc-collapse-toggle {
  position: absolute;
  top: 3px;
  right: 4px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive .mk-toc-collapse-toggle .material-icons-round {
  font-size: 20px;
  line-height: 1;
}

html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive .mk-toc-collapse-toggle:hover,
html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive .mk-toc-collapse-toggle:focus-visible {
  border-color: #bdbdbd;
  background: var(--mk-interaction-highlight) !important;
  color: var(--mk-interaction-highlight-text) !important;
}

/* Preserve the native CONTENTS heading while manually collapsed and hide the
 * tree below it. The expand icon remains available at the upper right. */
html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive
.mk-toc-shell.mk-toc-user-collapsed .toc.mk-toc-enhanced > :not(.mk-toc-native-label) {
  display: none !important;
}

html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive
.mk-toc-shell.mk-toc-user-collapsed .toc.mk-toc-enhanced {
  max-height: none;
  overflow: visible;
  padding-right: 36px;
}

/* Return-to-top controls live in the same left gutter. Keep their stacking
 * below the sticky TOC so they disappear behind its opaque surface as they
 * scroll past.
 */
body.mk-responsive div.tocsection div.top {
  z-index: 1;
}

html.mk-toc-narrow body.mk-responsive .mk-toc-shell {
  display: block;
  position: relative;
  top: auto;
  z-index: var(--mk-toc-z-index);
  width: 100%;
  max-width: 100%;
  pointer-events: none;
}

html.mk-toc-narrow body.mk-responsive .mk-toc-collapse-toggle {
  display: none;
}

html.mk-toc-narrow body.mk-responsive .mk-toc-toggle {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d5d5d5;
  border-radius: 5px;
  padding: 5px 9px;
  margin: 0 0 6px 0;
  background: #eee;
  color: #666;
  font-family: "Open Sans", "segoe ui", geneva, verdana, trebuchet, arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
}

html.mk-toc-narrow body.mk-responsive .mk-toc-toggle:hover,
html.mk-toc-narrow body.mk-responsive .mk-toc-toggle:focus-visible {
  background: var(--mk-interaction-highlight);
  color: var(--mk-interaction-highlight-text);
}

html.mk-toc-narrow body.mk-responsive .mk-toc-toggle::after {
  content: "▾";
  font-size: 11px;
  line-height: 1;
}

html.mk-toc-narrow body.mk-responsive .mk-toc-shell.mk-toc-open .mk-toc-toggle::after {
  content: "▴";
}

html.mk-toc-narrow body.mk-responsive .mk-toc-shell .toc.mk-toc-enhanced {
  display: none;
}

html.mk-toc-narrow body.mk-responsive .mk-toc-shell.mk-toc-open .toc.mk-toc-enhanced {
  pointer-events: auto;
  display: block;
  max-height: min(68vh, 520px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

html.mk-toc-narrow body.mk-responsive .toc .mk-toc-native-label {
  display: none;
}


/* Keep anchor targets clear of the sticky Contents control after a jump. */
body.mk-responsive .mk-toc-target {
  scroll-margin-top: var(--mk-toc-anchor-offset);
}

/* Current-section state is useful in both historical and enhanced TOCs. */
body.mk-responsive .toc a.mk-toc-current,
body.mk-responsive .toc a[aria-current="location"] {
  color: #333;
  text-decoration: none;
}

body.mk-responsive .toc a.mk-toc-current::before,
body.mk-responsive .toc a[aria-current="location"]::before {
  content: "›";
  display: inline-block;
  margin-left: -0.9em;
  width: 0.9em;
  color: #e50046;
  font-weight: 700;
}

/* While the TOC is following the reader, promote the current row from the
 * subtle marker above to the same yellow interaction language used elsewhere.
 * Keeping this scoped to .mk-toc-stuck avoids turning the ordinary full TOC at
 * the top of the page into a permanently highlighted navigation block. */
html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive
.mk-toc-shell.mk-toc-stuck .toc a.mk-toc-current,
html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive
.mk-toc-shell.mk-toc-stuck .toc a[aria-current="location"],
html.mk-js.mk-theme-active:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive
.mk-toc-shell.mk-toc-stuck .toc a.mk-toc-current,
html.mk-js.mk-theme-active:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive
.mk-toc-shell.mk-toc-stuck .toc a[aria-current="location"] {
  display: block;
  background: transparent !important;
  color: var(--mk-interaction-highlight-text) !important;
  text-decoration: none !important;
}

/* The full-width yellow bar replaces the small leading current-section chevron
 * while the TOC is stuck. At the TOC's natural page position the original
 * subtle chevron remains available. */
html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive
.mk-toc-shell.mk-toc-stuck .toc a.mk-toc-current::before,
html:not(.mk-toc-narrow).mk-toc-sticky body.mk-responsive
.mk-toc-shell.mk-toc-stuck .toc a[aria-current="location"]::before {
  content: none !important;
  display: none !important;
}

html.mk-toc-narrow body.mk-responsive .mk-toc-toggle-current {
  display: inline-block;
  max-width: min(52vw, 360px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}


/* --------------------------------------------------------------------------
 * Landing page / homepage structures
 *
 * The home page has two long-lived fixed desktop layouts that need their own
 * narrow-screen treatment: the three-column #about block and the nine-column
 * project-focus strip. Keep their desktop geometry unchanged and only reduce
 * the number/rigidity of columns when the shell becomes narrow.
 * -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  /* Keep all three about columns at tablet widths, but make the two formerly
   * fixed side tracks proportional enough to let the centre copy shrink.
   */
  body.mk-responsive #page-content > #about {
    grid-template-columns: minmax(180px, 26%) minmax(0, 1fr) minmax(150px, 20%);
  }

  body.mk-responsive #page-content > #about > * {
    min-width: 0;
  }

  /* The desktop landing page intentionally shows a dense nine-item strip.
   * Six columns keeps the same visual character without making the thumbnails
   * unreasonably small on a tablet-width viewport.
   */
  body.mk-responsive #page-content .projectfocuscontainer {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 16px;
    margin-left: 5px;
    margin-right: 5px;
  }
}

@media (max-width: 620px) {
  /* On phone-sized screens the biography/contact area becomes one natural
   * reading column: photo, activities/biography, then contact.
   */
  body.mk-responsive #page-content > #about {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  body.mk-responsive #page-content > #about #about-photo {
    width: min(260px, 100%);
    max-width: 100%;
    justify-self: center;
    margin-bottom: 14px;
  }

  body.mk-responsive #page-content > #about #about-activities {
    padding-left: 0;
    padding-right: 0;
  }

  body.mk-responsive #page-content > #about #about-contact {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #ddd;
  }

  body.mk-responsive #page-content .projectfocuscontainer {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 14px;
    margin-left: 0;
    margin-right: 0;
  }

  body.mk-responsive #page-content .focusonprojects {
    padding-left: 0;
    padding-right: 0;
  }

  /* Old paired project blocks are useful on desktop but should become normal
   * full-width blocks once there is only one reading column.
   */
  body.mk-responsive #page-content div.project {
    width: auto;
    max-width: 100%;
    float: none;
    padding-right: 0;
  }
}

@media (max-width: 430px) {
  body.mk-responsive #page-content .projectfocuscontainer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 10px;
    row-gap: 12px;
  }
}

@media (max-width: 330px) {
  body.mk-responsive #page-content .projectfocuscontainer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Respect reduced-motion preferences for the global effects we know about.
 * Avoid a blanket '*' override because individual pages may contain their own
 * interactive visualizations.
 */
@media (prefers-reduced-motion: reduce) {
  body.mk-responsive button.accordion,
  body.mk-responsive div.faqpanel,
  body.mk-responsive div.projectfocus a img,
  body.mk-responsive div.quicklink a img,
  body.mk-responsive img.zoomonhover {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
 * News + thoughts preview strip
 *
 * The Mason output places the .thought blocks as siblings, but not
 * necessarily inside #thoughts. mk-responsive.js therefore marks their
 * actual shared parent with .mk-thoughts-grid and marks the first three
 * preview items explicitly. This avoids depending on historical wrapper
 * details.
 * -------------------------------------------------------------------------- */

@media (max-width: 994px) {
  body.mk-responsive #page-thoughts {
    margin: 0 0 22px 0;
    padding: 12px 0 18px 0;
    border-left: 0;
    border-top: 0;
    border-bottom: 1px solid #ddd;
    max-width: 100%;
    position: relative;
  }

  /* The JS applies this class to the element that directly contains the
   * .thought siblings. It may be #page-thoughts, #thoughts, or another
   * historical wrapper.
   */
  body.mk-responsive #page-thoughts.mk-thoughts-grid,
  body.mk-responsive #page-thoughts .mk-thoughts-grid {
    width: auto !important;
    max-width: 100%;
    float: none !important;
    padding: 0;
    border-left: 0;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 8px;
    align-items: start;
    position: relative;
  }

  /*
   * If #page-thoughts itself is the grid container, the generic grid reset
   * above would otherwise remove the panel's bottom breathing room.
   */
  body.mk-responsive #page-thoughts.mk-thoughts-grid {
    padding: 12px 0 18px 0;
  }

  /* Any direct non-thought children (for example the NEWS + THOUGHTS
   * heading wrapper) occupy a full row instead of consuming a card column.
   */
  body.mk-responsive #page-thoughts.mk-thoughts-grid > :not(.thought),
  body.mk-responsive #page-thoughts .mk-thoughts-grid > :not(.thought) {
    grid-column: 1 / -1;
    min-width: 0;
  }

  body.mk-responsive #page-thoughts #thoughts {
    width: auto !important;
    max-width: 100%;
    float: none !important;
    padding: 0;
    border-left: 0;
  }

  body.mk-responsive #page-thoughts #thoughts > h1 {
    margin-top: 0;
  }

  /* Keep VIEW ALL anchored to the upper-right of the preview strip no matter
   * which historical wrapper contains it.
   */
  body.mk-responsive #page-thoughts .mk-thoughts-view-all {
    position: absolute !important;
    top: 12px;
    right: 0;
    z-index: 2;
  }

  body.mk-responsive #page-thoughts.mk-thoughts-grid > .thought,
  body.mk-responsive #page-thoughts .mk-thoughts-grid > .thought {
    min-width: 0;
    width: auto !important;
    max-width: 100%;
    max-height: 330px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    display: none;
  }

  /* JS marks these independently of their position among other DIVs. */
  body.mk-responsive #page-thoughts.mk-thoughts-grid > .thought.mk-thought-preview-1,
  body.mk-responsive #page-thoughts.mk-thoughts-grid > .thought.mk-thought-preview-2,
  body.mk-responsive #page-thoughts.mk-thoughts-grid > .thought.mk-thought-preview-3,
  body.mk-responsive #page-thoughts .mk-thoughts-grid > .thought.mk-thought-preview-1,
  body.mk-responsive #page-thoughts .mk-thoughts-grid > .thought.mk-thought-preview-2,
  body.mk-responsive #page-thoughts .mk-thoughts-grid > .thought.mk-thought-preview-3 {
    display: block;
  }

  body.mk-responsive #page-thoughts .thought img:not([usemap]),
  body.mk-responsive #page-thoughts .thought div.image {
    max-width: 100% !important;
    height: auto;
  }
}

@media (min-width: 500px) and (max-width: 699px) {
  body.mk-responsive #page-thoughts.mk-thoughts-grid,
  body.mk-responsive #page-thoughts .mk-thoughts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }

  body.mk-responsive #page-thoughts.mk-thoughts-grid > .thought,
  body.mk-responsive #page-thoughts .mk-thoughts-grid > .thought {
    max-height: 300px;
  }

  body.mk-responsive #page-thoughts.mk-thoughts-grid > .thought.mk-thought-preview-3,
  body.mk-responsive #page-thoughts .mk-thoughts-grid > .thought.mk-thought-preview-3 {
    display: none;
  }
}

@media (max-width: 499px) {
  body.mk-responsive #page-thoughts.mk-thoughts-grid,
  body.mk-responsive #page-thoughts .mk-thoughts-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.mk-responsive #page-thoughts.mk-thoughts-grid > .thought,
  body.mk-responsive #page-thoughts .mk-thoughts-grid > .thought {
    max-height: 260px;
  }

  body.mk-responsive #page-thoughts.mk-thoughts-grid > .thought.mk-thought-preview-2,
  body.mk-responsive #page-thoughts.mk-thoughts-grid > .thought.mk-thought-preview-3,
  body.mk-responsive #page-thoughts .mk-thoughts-grid > .thought.mk-thought-preview-2,
  body.mk-responsive #page-thoughts .mk-thoughts-grid > .thought.mk-thought-preview-3 {
    display: none;
  }
}


/* Step-4 TOC reading polish. */
body.mk-responsive .toc.mk-toc-enhanced a {
  scroll-margin-inline-start: 1em;
}

html.mk-toc-narrow body.mk-responsive .mk-toc-shell.mk-toc-open .toc.mk-toc-enhanced {
  padding-left: 18px;
}

/* --------------------------------------------------------------------------
 * Latest news / events
 *
 * Scoped to the new .events wrappers on /update/. Existing updates.css
 * supplies .updateitem, .date and .tag; these rules only modernize rhythm
 * and metadata-chip presentation.
 * -------------------------------------------------------------------------- */

body.mk-responsive .events {
  --mk-event-divider: #dedede;
  --mk-event-chip-bg: #eeeeee;
  --mk-event-chip-border: #d9d9d9;
  --mk-event-chip-color: #666666;
  margin-bottom: 30px;
}

body.mk-responsive .events + .events {
  margin-top: 30px;
}

body.mk-responsive .events .updateitem {
  box-sizing: border-box;
  margin: 0 !important;
  padding: 18px 0 20px;
}

body.mk-responsive .events .updateitem + .updateitem {
  border-top: 1px solid var(--mk-event-divider);
}

body.mk-responsive .events .date {
  display: block;
  margin: 0 0 7px;
  color: #777;
  font-size: 11px !important;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.2px;
}

body.mk-responsive .events .tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  box-sizing: border-box;
  margin: 0 6px 6px 0;
  padding: 4px 8px;
  border: 1px solid var(--mk-event-chip-border);
  border-radius: 6px;
  background: var(--mk-event-chip-bg);
  color: var(--mk-event-chip-color);
  font-size: 11px !important;
  font-weight: 600;
  letter-spacing: 0.15px;
  line-height: 1;
  vertical-align: middle;
}

/* Give metadata room to breathe before the event title/body that follows. */
body.mk-responsive .events .tag:last-of-type {
  margin-bottom: 10px;
}

/* Upcoming and current events deserve a small visual cue without turning
 * the chronological list into a stack of cards. */
body.mk-responsive .events-future .updateitem,
body.mk-responsive .events-today .updateitem {
  padding-left: 14px;
  border-left: 3px solid #dddddd;
}

body.mk-responsive .events-today .updateitem {
  border-left-color: #fff200;
}

/* Avoid inherited large bottom margins making individual entries uneven. */
body.mk-responsive .events .updateitem > :last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  body.mk-responsive .events {
    margin-bottom: 24px;
  }

  body.mk-responsive .events + .events {
    margin-top: 24px;
  }

  body.mk-responsive .events .updateitem {
    padding-top: 16px;
    padding-bottom: 18px;
  }

  body.mk-responsive .events .tag {
    min-height: 26px;
    padding: 5px 8px;
  }
}









