/*!
  mdfd.css — global site styles + summit landing/program styles
  Source: minireset.css-based build compiled from a Sass/Koala pipeline.
  Rebuilt with: @layer, custom properties, native nesting, container
  queries, aspect-ratio, and no build step required.

  See the notes at the bottom of this file for what was deliberately
  changed or dropped versus the original compiled output.
*/

@import url("https://fonts.googleapis.com/css?family=Archivo+Narrow");
@import url("https://fonts.googleapis.com/css?family=Allerta");

@layer reset, tokens, base, layout, components, utilities, overrides;

/* ============================================================
   RESET  (minireset, unchanged in spirit)
   ============================================================ */
@layer reset {
  html, body, p, ol, ul, li, dl, dt, dd, blockquote, figure, fieldset,
  legend, textarea, pre, iframe, hr, h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
  }
  h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; }
  ul { list-style: none; }
  button, input, select, textarea { margin: 0; }
  html { box-sizing: border-box; }
  *, *::before, *::after { box-sizing: inherit; }
  img, embed, object, audio, video { max-width: 100%; }
  iframe { border: 0; }
  table { border-collapse: collapse; border-spacing: 0; }
  td, th { padding: 0; text-align: left; }
  a img { border-style: none; }
}

/* ============================================================
   DESIGN TOKENS  — every repeated color/font/size in the old
   file now lives here once instead of dozens of times.
   ============================================================ */
@layer tokens {
  :root {
    /* colors */
    --c-text: #4a4a4a;
    --c-heading: #404040;
    --c-ink: #1e1e1e;
    --c-accent: #263663;   /* navy — links/hover, field labels */
    --c-brand: #df7b25;    /* orange — breadcrumbs, category headers */
    --c-amber: #e5a52e;   /* Industrial Amber — accent */
    --c-danger: #da4231;   /* button border/hover fill */
    --c-white: #fff;
    --c-black: #000;
    --c-gray: gray;
    --c-border: #dcdcdc;

    /* Bulma-style status colors, kept as tokens (only used via .has-text-*) */
    --c-primary: #00d1b2;
    --c-info: #3273dc;
    --c-success: #23d160;
    --c-warning: #ffdd57;
    --c-error: #ff3860;

    /* type */
    --font-body: "Archivo Narrow", "Lucida Sans Unicode", sans-serif;
    --font-heading: Headline, "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    --font-display: Display, "Lucida Sans Unicode", sans-serif;
    --font-block: Allerta, "Lucida Sans Unicode", sans-serif;

    /* shadows */
    --shadow-card: 12px 12px 32px rgb(0 0 0 / 50%);

    /* twelfths, computed once instead of repeated as magic numbers
       across five separate breakpoint blocks */
    --col-1: 8.3333%;  --col-2: 16.6667%; --col-3: 25%;
    --col-4: 33.3333%; --col-5: 41.6667%; --col-6: 50%;
    --col-7: 58.3333%; --col-8: 66.6667%; --col-9: 75%;
    --col-10: 83.3333%; --col-11: 91.6667%; --col-12: 100%;
  }

  @font-face { font-family: Axis;     src: url("axis.eot"), url("axis.ttf"); }
  @font-face { font-family: Display;  src: url("nevis.woff"), url("nevis.woff2"); }
  @font-face { font-family: Headline; src: url("oranienbaum.woff"), url("oranienbaum.woff2"); }
}

/* ============================================================
   BASE TYPOGRAPHY
   ============================================================ */
@layer base {
  html { scrollbar-gutter: stable; }
  html, body {
    width: 100%;
    height: 100%;
    font: 14pt/1.6 var(--font-body);
    letter-spacing: .03em;
    color: var(--c-text);
    text-align: left;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    background-size: contain;
    background-attachment: fixed;
  }

  a {
    cursor: pointer;
    text-decoration: none;
    color: var(--c-heading);

    &:hover, &:active { color: var(--c-accent); }
  }
  #feeds a:hover { color: var(--c-accent); }

  h1, h2, h3, h4, h5, h6 {
    padding: 0 0 4% 0;
    line-height: 1.6;
    color: var(--c-heading);
    font-weight: 600;
  }
  h1, h2, h3 { font-family: var(--font-heading); }
  h1 { font-size: 2.2em; letter-spacing: .04em; }
  h2 { font-size: 1.6em; letter-spacing: .04em; }
  h3 { font-size: 1.2em; letter-spacing: .05em; padding: 1% 0 3%; }
  h4 { font-family: var(--font-body); font-size: 1.2em; letter-spacing: .05em; font-weight: 600; }
  h5 { font-family: var(--font-body); font-size: 1.1em; font-weight: 500; }
  p  { font-family: var(--font-body); font-size: 1.1em; line-height: 1.6; margin: 0 0 2% 0; }

  small { font-size: .875em; }
  span { font-style: inherit; font-weight: inherit; }
  strong { color: #363636; font-weight: 700; }

  .feeds { font-size: 1em; line-height: 1.5; }
  #navigation {
    font-family: var(--font-display), Helvetica, sans-serif;
    font-size: 1.2em;
    letter-spacing: .4em;
    text-transform: uppercase;
  }
  .icon { color: var(--c-heading); font-size: 1.8em; margin-left: 2%; vertical-align: middle; }
  #footer { font-size: 1em; color: var(--c-black); }
  .error { text-align: left; text-transform: lowercase; color: red; font-weight: 300; }
  .dateline { font-family: var(--font-body); font-size: .84em; letter-spacing: .1em; opacity: .7; }
  .textblock {
    font-family: var(--font-block);
    font-size: 1em;
    background: var(--c-white);
    color: var(--c-accent);
    padding: 6%;
    font-weight: 900;
    letter-spacing: .1em;
  }

  /* forms */
  input, textarea {
    background: rgb(255 255 255 / 90%);
    border: 1px solid var(--c-border);
    padding: 16px 10px;
    width: 100%;
    font: 1.4em var(--font-body) !important;
    color: var(--c-ink);
    text-align: left;

    &:focus { background: var(--c-white); color: var(--c-accent); opacity: 1; }
    &::placeholder { opacity: .3; }
  }
  input[type="checkbox"], input[type="radio"] { vertical-align: baseline; width: 16px; }

  button, input[type="submit"] {
    width: auto;
    appearance: none;
    background-color: transparent;
    border: 2px solid var(--c-danger);
    color: var(--c-danger);
    cursor: pointer;
    display: flex;
    align-self: center;
    font: 800 .85em var(--font-display) !important;
    letter-spacing: 2px;
    line-height: 1;
    margin: 2% 0 2% 2%;
    padding: 2% 4%;
    text-transform: uppercase;
    transition: box-shadow .3s ease-in-out, color .3s ease-in-out;

    &:hover, &:focus {
      color: var(--c-white);
      outline: 0;
    }
    &:hover { box-shadow: 0 0 40px 40px var(--c-danger) inset; }
  }
  input[type="submit"] { float: right; }

  form h3, form h4 { margin: 4% 0; }

  #searchform {
    display: inline;
    white-space: nowrap;

    input { width: 74%; border: 0; border-bottom: 2px solid var(--c-accent); }

    button {
      width: 54px;
      display: inline;
      border: 0;
      font-size: 2.8em;
      margin: 0 1%;
      padding: 0;

      &:hover, &:focus { box-shadow: unset; color: unset; opacity: .7; }
      img { width: 100%; margin: 0 0 -16px -8px; padding: 0; }
      i { font-size: 2.8em; opacity: 1; }
    }
  }
}

/* ============================================================
   LAYOUT — header, nav, mobile menu, modal/overlay
   ============================================================ */

/* ============================================================
   GRID — replaces the old five-tier (mobile/tablet/desktop/
   widescreen/fullhd) x twelve-column Bulma-style expansion.
   .row is now a container, so columns respond to the space
   they actually have instead of the viewport. Only three
   breakpoint tiers are kept (base, ≥700px, ≥1000px); widescreen
   and fullhd tiers collapsed into the desktop tier since they
   carried identical values. See notes at the end of the file.
   ============================================================ */
@layer layout {
  header, #header {
    anchor-name: --site-header;
    position: fixed;
    inset: 0 0 auto 0;
    min-height: 90px;
    background: var(--c-white);
    transition: top 200ms ease, opacity 200ms ease;
    	z-index: 1000;
  }
  #home header, #home #header { background: rgb(255 255 255 / 0%); }

  @media (prefers-reduced-motion: reduce) {
      header,
      #header {
          transition: none;
      }
  }

  main {
    position: relative;
    top: anchor(--site-header bottom);
    padding: var(--header-h, 0px) 2%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  #footer { clear: both; width: 100%; padding: 4%; text-align: right; }
  .right { text-align: right; }

  #logo { display: none; }
  #iconlogo {
    position: relative;
    float: left;
    cursor: pointer;
    width: 16%;
    margin: 2%;
    z-index: 1000;

    img { width: 100%; height: auto; margin: 2% 0 0 0; }
  }

  @media (min-width: 768px) {
    #iconlogo { display: none; }
    #logo {
      position: relative;
      float: left;
      display: inline-block;
      width: 30%;
      max-width: 390px;
      margin: 8px 2% 0;
      z-index: 1000;

      img { width: 100%; height: auto; margin: 2% 0 0 0; }
    }
  }

  #editlink, #editlink a {
    position: fixed;
    top: 90%;
    right: 2%;
    letter-spacing: .4em;
    text-transform: uppercase;
    background: var(--c-gray);
    color: var(--c-white);
    padding: .5% 2%;
    z-index: 8000;
  }

  .overlay {
    position: fixed;
    inset: 0;
    background: rgb(38 54 99 / 70%);
    z-index: 8000;
    opacity: 0;
    transition: opacity .4s ease-in;
    pointer-events: none;

    &:target { opacity: 1; pointer-events: auto; }

    > .modalcontent {
      width: 96%;
      height: 80%;
      position: relative;
      margin: 1% auto;
      padding: 1%;
      text-align: right;
      background: var(--c-white);
      z-index: 9999;

      @media (min-width: 700px) { width: 80%; }
    }
  }
  .innermodal { position: absolute; overflow: auto; inset: 0; padding: 1%; }
  .closelayer { position: absolute; top: 0; width: 100%; height: 100%; z-index: 100; }
  .modalcontent { text-transform: none; font-weight: 500; }

  #search {
    position: absolute;
    margin: 0 0 0 2%;
    width: 96%;
    height: 120px;
    background: var(--c-white);
    padding: 1% 4% 4% 1%;
  }
  #searchresults { float: left; text-align: left; width: 100%; font-size: 1rem; font-weight: 400; }
  #found { text-align: left; margin: 0 0 0 2%; padding: 0 1%; box-shadow: unset; width: 96%; }
  .result {
    &:first-of-type { padding: 2% 0 0 0; }
    &:last-of-type  { padding: 0 0 8% 0; }
    &:only-of-type  { padding: 2% 0 8% 0; }
  }

  .row {
    container-type: inline-size;
    width: 98%;
    padding: 0 0 0 2%;
    margin: 0;
    clear: both;
    min-width: 0;

    &.is-mobile, &.is-multiline { display: flex; }
    &.is-multiline { flex-wrap: wrap; }
    &.is-vcentered { align-items: center; }
  }

  @container (min-width: 45em) {
    .row:not(.is-desktop) { display: flex; }
  }

  .column {
    display: block;
    flex: 1 1 0;
    padding: 0 1% 0 0;
    min-width: 0;

    &:last-of-type { padding: 0; }

    &.is-half  { flex: none; width: var(--col-6); }
    &.is-one-third { flex: none; width: var(--col-4); }
    &.is-two-thirds { flex: none; width: var(--col-8); }
    &.is-one-quarter { flex: none; width: var(--col-3); }
    &.is-three-quarters { flex: none; width: var(--col-9); }
    &.is-full { flex: none; width: var(--col-12); }
    &.is-1 { flex: none; width: var(--col-1); }
    &.is-2 { flex: none; width: var(--col-2); }
    &.is-3 { flex: none; width: var(--col-3); }
    &.is-4 { flex: none; width: var(--col-4); }
    &.is-5 { flex: none; width: var(--col-5); }
    &.is-6 { flex: none; width: var(--col-6); }
    &.is-7 { flex: none; width: var(--col-7); }
    &.is-8 { flex: none; width: var(--col-8); }
    &.is-9 { flex: none; width: var(--col-9); }
    &.is-10 { flex: none; width: var(--col-10); }
    &.is-11 { flex: none; width: var(--col-11); }
    &.is-12 { flex: none; width: var(--col-12); }
    &.is-offset-1 { margin-left: var(--col-1); }
    &.is-offset-2 { margin-left: var(--col-2); }
    &.is-offset-3 { margin-left: var(--col-3); }
    &.is-offset-4 { margin-left: var(--col-4); }
    &.is-offset-5 { margin-left: var(--col-5); }
    &.is-offset-6 { margin-left: var(--col-6); }
    &.is-offset-7 { margin-left: var(--col-7); }
    &.is-offset-8 { margin-left: var(--col-8); }
    &.is-offset-9 { margin-left: var(--col-9); }
    &.is-offset-10 { margin-left: var(--col-10); }
    &.is-offset-11 { margin-left: var(--col-11); }
  }
}

/* ============================================================
   MEDIA / IMAGE HANDLING
   Old file used the "padding-bottom: 56.25%" trick to fake
   aspect ratios. That's no longer needed — aspect-ratio does
   it directly with no absolutely-positioned inner image.
   ============================================================ */
@layer components {
  .preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-position: center;
    background-size: cover;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;

      &.portrait { aspect-ratio: 9 / 16; height: auto; min-height: 200%; }
    }

    /* embeds and self-hosted video fill the 16:9 box like images do */
    iframe, video {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      border: 0;
    }

    /* ratio modifiers: speaker grids, text+image blocks */
    &.is-square { aspect-ratio: 1 / 1; }
    &.is-4x3    { aspect-ratio: 4 / 3; }

    h3 {
      position: absolute;
      bottom: 8%;
      right: 0;
      text-align: right;
      color: var(--c-white);
      margin: 0 2%;
      padding: 1%;
      background: rgb(0 0 0 / 20%);
      z-index: 400;
      font-size: 1.1em;
      line-height: 1.2;
    }
  }
  .post .preview { margin: 0 0 4% 0; }

  .headshot {
    position: relative;
    overflow: hidden;
    float: left;
    margin: 0 2%;
    width: 20%;
    aspect-ratio: 1 / 1;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;

      &.landscape { object-fit: cover; }
    }
  }
  #public .headshot, .right .headshot { float: right; }

  #fullsize img, #fullsize2 img {
    position: fixed;
    inset: 0;
    max-width: 96%;
    max-height: 96%;
    margin: auto;
    overflow: auto;
  }

  .post img { width: 100%; height: auto; }
  .post .overlay img { width: auto; }

  .fluid-width-video-wrapper, .video { margin: 0; padding: 0; }

  /* Summit slideshow background styles are defined below. */

  #colorscreen {
    background: var(--c-brand);
    opacity: .7;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 50;
  }

  .vidbg {
    width: 200%;
    height: 200%;

    video {
      position: fixed;
      top: 50%;
      left: 50%;
      width: auto;
      max-width: 200%;
      height: auto;
      max-height: 200%;
      translate: -50% -50%;
      object-fit: cover;
    }
  }

  .videobox {
    position: relative;
    padding: 0 0 4% 0;

    &:hover .videocover { display: none; }
  }
  .videocover { z-index: 300; position: absolute; top: 0; left: 0; width: 100%; display: block; }

  .field {
    position: relative;

    label {
      margin: 0;
      padding: 8px;
      color: var(--c-accent);
      font-size: 1.4em;
      opacity: .7;
      text-transform: lowercase;
    }
  }

  .mariah { height: 0; width: 0; opacity: 0; color: transparent; position: fixed; top: 0; left: -200px; z-index: 0; }
}

/* ============================================================
   ARTICLE + SIDEBAR  (.row.is-multiline.has-sidebar)
   Narrow: article then sidebar, both full width, left-aligned.
   ≥45em row width: 2/3 article + 1/3 sidebar, sidebar text
   right-aligned. Keys off the row's own width (container query),
   not the viewport. Uses .is-multiline on the row so it is
   always flex+wrap; the generic .is-* widths set a fixed width
   at every size, so this block overrides them via .is-main /
   .sidebar instead of using .is-two-thirds / .is-one-third.
   ============================================================ */
@layer components {
  .row.has-sidebar > .column.is-main,
  .row.has-sidebar > .column.sidebar {
    flex: none;
    width: 100%;
    padding: 0;
    text-align: left;
  }
  .row.has-sidebar > .column.sidebar { margin-top: 8%; }

  @container (min-width: 45em) {
    .row.has-sidebar > .column.is-main {
      width: var(--col-8);
      padding-right: 4%;
    }
    .row.has-sidebar > .column.sidebar {
      width: var(--col-4);
      margin-top: 0;
      padding-left: 2%;
      text-align: right;
    }
  }

  .sidebar h3 { padding-top: 0; }
  .sidebar .feed-list li { padding: 0 0 6% 0; }
  .sidebar .feed-list a { display: block; line-height: 1.3; }
  .sidebar .feed-list .dateline { margin: 0; }
}

/* ============================================================
   CARD GRID  (.row > .card-grid > .card)
   Responsive card layout driven by the row's own width, not the
   viewport: 1 across (mobile) -> 2 (≥600px) -> 3 (≥960px) ->
   4 (≥1500px). Cards in a row stretch to equal height; summary
   text is clamped to 3 lines so the rows stay even.
   .row is already the size container, so no extra wrapper.
   ============================================================ */
@layer components {
  .card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.25rem, 3cqw, 2.5rem);
    padding: 0 2% 4% 0;
    margin: 0;
  }
  @container (min-width: 600px)  { .card-grid { grid-template-columns: repeat(2, 1fr); } }
  @container (min-width: 960px)  { .card-grid { grid-template-columns: repeat(3, 1fr); } }
  @container (min-width: 1500px) { .card-grid { grid-template-columns: repeat(4, 1fr); } }

  .card {
    min-width: 0;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    transition: box-shadow .25s ease, border-color .25s ease;

    > a {
      display: flex;
      flex-direction: column;
      height: 100%;
      color: inherit;
    }

    .preview { margin: 0; }
    .preview img { transition: scale .4s ease; }

    h3 { margin: 0; padding: 0 0 .4rem; font-size: 1.15em; line-height: 1.25; transition: color .2s ease; }
    .dateline { margin: 0 0 .6rem; }

    &:hover, &:focus-within {
      border-color: var(--c-accent);
      box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
    }
    &:hover h3 { color: var(--c-accent); }
    &:hover .preview img { scale: 1.04; }
    > a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
  }

  .card-body {
    flex: 1;
    padding: 1rem 1.25rem 1.4rem;

    p:last-child { margin: 0; }
  }
  .card-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
  }

  @media (prefers-reduced-motion: reduce) {
    .card, .card h3, .card .preview img { transition: none; }
    .card:hover .preview img { scale: 1; }
  }
}

/* ============================================================
   OVERLAY CARD — text on image with a brand "colour screen"
   The screen is a gradient: light at the top so the photo still
   reads, deepening to dark rust where the text sits.
   ============================================================ */
.card-overlay {
	.preview {
		background: var(--c-brand);   /* fallback when there's no image */

		/* the colour screen */
		&::after {
			content: "";
			position: absolute;
			inset: 0;
			z-index: 1;
			pointer-events: none;
			background: linear-gradient(
				to top,
				color-mix(in srgb, var(--c-brand) 55%, black) 0%,
				color-mix(in srgb, var(--c-brand) 80%, transparent) 40%,
				color-mix(in srgb, var(--c-brand) 25%, transparent) 75%,
				color-mix(in srgb, var(--c-brand) 15%, transparent) 100%
			);
		}

		/* undo the generic .preview h3 (absolute, right-aligned, grey box) */
		h3 {
			position: static;
			margin: 0;
			padding: 0 0 .3rem;
			background: none;
			text-align: left;
			font-size: 1.3em;
			line-height: 1.2;
			color: var(--c-white);
			text-shadow: 0 1px 3px rgb(0 0 0 / 35%);
		}
	}

	.caption {
		position: absolute;
		inset: auto 0 0 0;
		z-index: 2;
		padding: 1rem 1.25rem 1.1rem;
		color: var(--c-white);

		/* amber accent bar */
		&::before {
			content: "";
			display: block;
			width: 2.5rem;
			height: 3px;
			margin-bottom: .6rem;
			background: var(--c-amber);
			transition: width .3s ease;
		}
	}

	.dateline {
		margin: 0;
		opacity: 1;
		color: var(--c-white);
		text-shadow: 0 1px 3px rgb(0 0 0 / 35%);
	}

	&:hover, &:focus-within { border-color: var(--c-amber); }
	&:hover h3 { color: var(--c-white); }   /* beat the generic .card:hover h3 navy */
	&:hover .caption::before { width: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
	.card-overlay .caption::before { transition: none; }
}

/* ============================================================
   PRIMARY NAV — .cf-site-nav component (see nav.html / nav.js)
   Deliberately UNLAYERED. Do not move this into a @layer: any
   unlayered rule anywhere in the cascade beats any layered rule
   regardless of specificity, and this site still has other
   unlayered legacy selectors that this nav must keep winning
   against. A prior pass moved this into @layer components for
   architectural tidiness and it broke the live nav. Verify with
   a hostile-collision test (a throwaway stylesheet with `nav ul
   li > ul { left: -99999px }`-style rules loaded first) before
   ever moving this into a layer again.
   ============================================================ */
nav.cf-site-nav {
    --nav-fg: #111;
    --nav-fg-muted: rgb(0 0 0 / 0.65);
    --nav-accent: #7a1f1f;
    --nav-panel-bg: #ffffff;
    --nav-panel-border: rgb(0 0 0 / 0.1);
    --nav-gap: clamp(1.25rem, 2vw, 2rem);
    --nav-radius: 0.375rem;
    --nav-transition: 160ms ease;

    /* #navblock has no flex/grid of its own — #logo/#iconlogo float
       left, #rightnav is position:absolute. This nav needs to slot
       into that same non-flex layout the way the original nav {}
       rule did (float:right; width:78%; top:48px offset to clear
       #rightnav), rather than rendering full-width and overlapping
       #rightnav. */
    position: relative;
    top: 4%;
    right: 2%;
    float: right;
    width: 66%;
    z-index: 800;

    display: flex;
    align-items: center;
    justify-content: flex-end; /* right-aligned */
    font-family: inherit;
  }
nav.cf-site-nav .cf-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
/* ---------- hamburger toggle (mobile only) ---------- */
nav.cf-site-nav .cf-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--nav-fg);
    z-index: 2;

    & .cf-nav-toggle-box {
      display: inline-flex;
      flex-direction: column;
      gap: 5px;
      width: 22px;
    }

    & .cf-nav-toggle-bar {
      display: block;
      height: 2px;
      min-width: 16px;
      background: currentColor;
      border-radius: 1px;
      transition: transform var(--nav-transition), opacity var(--nav-transition);
      transform-origin: center;
    }

    &[aria-expanded="true"] .cf-nav-toggle-bar:nth-child(1) {
      transform: translateY(7px) rotate(45deg);
    }
    &[aria-expanded="true"] .cf-nav-toggle-bar:nth-child(2) {
      opacity: 0;
    }
    &[aria-expanded="true"] .cf-nav-toggle-bar:nth-child(3) {
      transform: translateY(-7px) rotate(-45deg);
    }
  }
/* ---------- menu ---------- */
nav.cf-site-nav .cf-nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--nav-gap);
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: visible; /* neutralizes a legacy `nav ul { overflow: hidden }` rule that would clip the dropdown */
  }
nav.cf-site-nav .cf-nav-item {
    position: relative;
    flex-shrink: 0; /* keep items at their natural width instead of compressing */

    & .cf-nav-link-group {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
    }

    & .cf-nav-link {
      color: var(--nav-fg);
      text-decoration: none;
      font-size: 0.9rem;
      font-weight: 500;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      padding-block: 0.5rem;
      white-space: nowrap; /* the old nav had this on its <a> elements; carried forward */

      &:hover,
      &:focus-visible {
        color: var(--nav-accent);
      }
    }

    & .cf-nav-caret-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.5rem;
      height: 1.5rem;
      background: transparent;
      border: 0;
      color: var(--nav-fg-muted);
      cursor: pointer;

      & .cf-nav-caret {
        width: 10px;
        height: 7px;
        transition: transform var(--nav-transition);
      }

      &[aria-expanded="true"] .cf-nav-caret {
        transform: rotate(180deg);
      }

      &:hover,
      &:focus-visible {
        color: var(--nav-accent);
      }
    }

    & .cf-submenu {
      display: block; /* overrides a legacy `nav ul li > ul { display: flex }` rule */
      overflow: visible; /* overrides a legacy `nav ul { overflow: hidden }` rule */
      position: absolute;
      inset-inline-end: 0; /* right-aligned under the parent */
      left: auto; /* overrides a legacy `nav ul li > ul { left: -99999px }` rule that shoves this off-screen */
      top: 100%;
      min-width: 13rem;
      margin: 0.4rem 0 0;
      padding: 0.4rem 0;
      list-style: none;
      background: var(--nav-panel-bg);
      border: 1px solid var(--nav-panel-border);
      border-radius: var(--nav-radius);
      box-shadow: 0 16px 32px -16px rgb(0 0 0 / 0.55);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-6px);
      transition: opacity var(--nav-transition), transform var(--nav-transition), visibility var(--nav-transition);

      & a {
        display: block;
        padding: 0.55rem 1.1rem;
        color: var(--nav-fg-muted);
        text-decoration: none;
        font-size: 0.88rem;
        white-space: nowrap;

        &:hover,
        &:focus-visible {
          background: rgb(0 0 0 / 0.05);
          color: var(--nav-accent);
        }
      }
    }

    &[data-cf-nav-open="true"] > .cf-submenu {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }
  }
/* pointer-fine devices also get hover-to-open, click still works for touch/keyboard */
@media (hover: hover) and (pointer: fine) {
    nav.cf-site-nav .cf-nav-item:hover > .cf-submenu {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }
  }
/* ---------- mobile layout ---------- */
@media (max-width: 860px) {

    nav.cf-site-nav {
      float: none;
      width: auto;
      /* top:48px / right:2% carry over unchanged from the base rule —
         the old nav kept this same offset at every breakpoint to clear
         #rightnav; only the open-menu state goes position:fixed. */
    }

    nav.cf-site-nav .cf-nav-toggle {
      display: inline-flex;
      margin-inline-start: auto;
      z-index: 10002; /* above the open menu panel (10001) so it stays tappable to close, and above #rightnav (1400) and everything else sitewide */
    }

    nav.cf-site-nav .cf-nav-backdrop {
      position: fixed;
      inset: 0;
      background: rgb(0 0 0 / 0.45);
      opacity: 0;
      visibility: hidden;
      transition: opacity var(--nav-transition), visibility var(--nav-transition);
      z-index: 10000; /* above #rightnav (1400) and everything else sitewide */
    }

    nav.cf-site-nav .cf-nav-backdrop:not([hidden]) {
      opacity: 1;
      visibility: visible;
    }

    nav.cf-site-nav .cf-nav-menu {
      position: fixed;
      inset-block: 0;
      inset-inline-end: 0;
      width: min(320px, 85vw);
      flex-direction: column;
      align-items: stretch;
      justify-content: flex-start;
      gap: 0;
      padding: 5.5rem 1.5rem 2rem;
      background: var(--nav-panel-bg);
      overflow-y: auto;
      transform: translateX(100%);
      transition: transform 240ms ease;
      z-index: 10001; /* above the backdrop (10000), and above everything else sitewide */
    }

    nav.cf-site-nav[data-cf-nav-menu-open="true"] .cf-nav-backdrop {
      opacity: 1;
      visibility: visible;
    }

    nav.cf-site-nav[data-cf-nav-menu-open="true"] .cf-nav-menu {
      transform: translateX(0);
    }

    nav.cf-site-nav .cf-nav-item {
      border-bottom: 1px solid var(--nav-panel-border);

      & .cf-nav-link-group {
        justify-content: space-between;
        width: 100%;
        padding-block: 0.5rem;
      }

      & .cf-nav-caret-btn {
        width: 2.5rem;
        height: 2.5rem;
      }

      & .cf-submenu {
        display: block; /* overrides a legacy `nav ul li > ul { display: flex }` rule */
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
        background: transparent;
        transition: max-height 220ms ease;
      }

      &[data-cf-nav-open="true"] > .cf-submenu {
        max-height: 20rem;
        padding-block: 0.25rem 0.5rem;
      }
    }
  }

nav button:hover, 
nav button:focus {
  color: inherit; /* Keeps text color danger instead of turning white */
  box-shadow: none;       /* Disables the red fill effect */
}

/*
 * Slide Labels — 2026 vanilla CSS/JS, zero PHP required
 *
 * Targets ProcessWire/FrontendForms' markup by HTML tag + type attribute,
 * NOT by the module's own CSS classes (which differ per field type —
 * inputs get "input", textareas get "textarea" — so relying on them
 * would mean tracking every field type's class name individually).
 * Tag + type is guaranteed by HTML semantics and won't change if the
 * module's internal class naming does.
 *
 * Scope: .fieldwrapper > ... > input[type=text/email/...] / textarea / select
 * An explicit allow-list of input types is used so hidden anti-spam/CSRF
 * fields, checkboxes, radios, and submit buttons are never matched.
 *
 * placeholder=" " on each field is required for :placeholder-shown to
 * work, and is added automatically by floating-labels.js on page load.
 */

.fieldwrapper {
	position: relative;
	margin-block: 1.5rem;
	container-type: inline-size;

	& input:is(
			[type="text"],
			[type="email"],
			[type="tel"],
			[type="url"],
			[type="password"],
			[type="number"],
			[type="search"]
		),
	& textarea,
	& select {
		width: 100%;
		padding: 0.75rem;
		font-size: 1rem;
		line-height: 1.4;
		border: 1px solid #999;
		border-radius: 4px;
		background: #fff;
	}

	& input:is(
			[type="text"],
			[type="email"],
			[type="tel"],
			[type="url"],
			[type="password"],
			[type="number"],
			[type="search"]
		):focus,
	& textarea:focus,
	& select:focus {
		outline: 2px solid #2563eb;
		outline-offset: 1px;
	}

	& label {
		position: absolute;
		left: 0.75rem;
		top: 50%;
		transform: translate(0, -50%);
		font-size: 1rem;
		color: #666;
		pointer-events: none;
		opacity: 1;
		transition: transform 300ms ease, opacity 300ms ease;
	}

	/* Focused and still empty: slide right, dim to a hint.
	   cqw = 1% of the .fieldwrapper's own width, so the slide distance
	   scales with the field instead of moving a fixed rem amount. */
	&:has(
			input:is(
				[type="text"],
				[type="email"],
				[type="tel"],
				[type="url"],
				[type="password"],
				[type="number"],
				[type="search"]
			):focus
		) label,
	&:has(textarea:focus) label,
	&:has(select:focus) label {
		transform: translate(55cqw, -50%);
		opacity: 0.5;
	}

	/* Has a value: gone entirely. Declared after the :focus rule so it
	   wins when both are true (typing overrides the focus-hint state). */
	&:has(
			input:is(
				[type="text"],
				[type="email"],
				[type="tel"],
				[type="url"],
				[type="password"],
				[type="number"],
				[type="search"]
			):not(:placeholder-shown)
		) label,
	&:has(textarea:not(:placeholder-shown)) label {
		transform: translate(70cqw, -50%);
		opacity: 0;
	}

	/* Select has no :placeholder-shown, so floating-labels.js toggles
	   this class based on select.value. */
	&.fl-has-value label {
		transform: translate(70cqw, -50%);
		opacity: 0;
	}
}

/* Autofill detection: Chrome/Safari don't fire 'input' events on autofill,
   but they do apply a harmless zero-length animation to autofilled fields.
   floating-labels.js listens for this and re-triggers 'input' manually. */
@keyframes fl-autofill-detect {
	from { opacity: 1; }
	to { opacity: 1; }
}

.fieldwrapper input:-webkit-autofill {
	animation-name: fl-autofill-detect;
}

/* Labels wrapping a checkbox/radio (e.g. "Show password", privacy consent,
   send-a-copy) are inline labels next to their own control, not floating
   overlays for a text field. One override undoes all the label rules
   above for just these, rather than excluding them in every rule. */
.fieldwrapper label:has(input[type="checkbox"], input[type="radio"]) {
	position: static;
	transform: none;
	opacity: 1;
	pointer-events: auto;
}


/* ======================================================================
   SUMMIT TEMPLATE STYLES — formerly mdfd-summit.css
   ====================================================================== */

/* ==========================================================================
   SUMMIT LANDING PAGE + PROGRAM
   Merged into mdfd.css; uses the global tokens and layer order above.
   ========================================================================== */

/* ---------- tokens (page-scoped; everything else comes from mdfd.css) ---------- */
@layer tokens {
  .landing {
    --tint: var(--c-brand);                                  /* colour screen over the photo */
    --font-axis: Axis, Oswald, "Arial Narrow", "Gill Sans", sans-serif;
    --rail: var(--c-border);
  }
  /* per-city colour screens: examples, match them to the skyline photos */
  .landing[data-city="london"] { --tint: #78a9ce; }
}

/* ---------- page frame + hero ---------- */
@layer layout {
  .landing {
    position: relative; isolation: isolate;        /* keeps the fixed background layers behind our content only */
    min-block-size: 100dvh;
    padding: 2rem clamp(.5rem, 2vw, 2rem) clamp(2rem, 5vw, 4rem);
    color: var(--c-white);

    & p { margin: 0; }
    & :is(h1, h2, h3) { padding: 0; margin: 0; }
  }

  /* The container lives on an inner wrapper: a size container would become the containing
     block for the position:fixed background layers and stop them following the viewport. */
  .landing-content {
    container: landing / inline-size;
    display: grid; align-content: start; gap: clamp(2.5rem, 7vw, 6rem);
  }

  /* Full-viewport slideshow. HTML:
     .landing-bg > #bg > img (one image per slide).
     #bg is positioned inside the fixed .landing-bg wrapper so the
     slideshow remains behind the landing content without escaping
     the landing page's isolated stacking context. */
  .landing-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    overflow: hidden;
    background: #14212c;
    pointer-events: none;
  }

  .landing-bg #bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .landing-bg #bg img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center 35%;
    animation: drift 60s ease-in-out infinite alternate;
  }

  /* same idea as .card-overlay: light at the top so the photo reads, deep tint where the text sits */
  .landing-screen {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background: linear-gradient(to top,
      color-mix(in srgb, var(--tint) 55%, black) 0%,
      color-mix(in srgb, var(--tint) 80%, transparent) 35%,
      color-mix(in srgb, var(--tint) 50%, transparent) 70%,
      color-mix(in srgb, var(--tint) 30%, transparent) 100%);
  }

  .edition {
    position: fixed; inset-block-end: -.12em; inset-inline-start: clamp(.5rem, 3vw, 3rem); z-index: -1;
    font: 400 clamp(9rem, 6rem + 24vw, 30rem)/.8 var(--font-axis);
    opacity: .2; pointer-events: none; user-select: none;
  }

  .stage {
    display: grid; gap: clamp(1.5rem, 4cqw, 3rem); align-items: end;
    min-block-size: min(68dvh, 52rem);

    @container landing (min-width: 55em) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  }
}

/* ---------- components ---------- */
@layer components {

  /* hero text: Axis, as on the old landing page */
  .hero {
    font-family: var(--font-axis); text-transform: uppercase; letter-spacing: .2em; line-height: 1.3;
    text-shadow: 0 1px 3px rgb(0 0 0 / 35%);
  }
  .eventtitle { font-family: inherit; font-size: clamp(1.6rem, 1rem + 2.6vw, 3.6rem); font-weight: 400; color: var(--c-white); margin-block-end: .6em; }
  .when, .where { font-size: clamp(1.1rem, .8rem + 1.2vw, 2rem); }
  .venue { display: block; margin-block-start: .4em; font-size: .55em; letter-spacing: .18em; opacity: .9; }

  /* outline button with the same inset-fill hover as mdfd.css buttons */
  .landing .button {
    display: inline-flex; margin-block-start: 1.75rem; padding: .9em 1.8em;
    border: 2px solid var(--c-white); color: var(--c-white);
    font: 800 .85em/1 var(--font-display); letter-spacing: 2px; text-transform: uppercase;
    text-shadow: none;
    transition: box-shadow .3s ease-in-out, color .3s ease-in-out;

    &:hover, &:focus-visible { color: var(--c-ink); box-shadow: 0 0 40px 40px var(--c-white) inset; outline: 0; }
  }

  /* ----- speaker faces (hero): square tiles, brand colour screen, amber bar ----- */
  .lineup { container: lineup / inline-size; }
  .faces {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(.5rem, 1.2cqw, 1rem);
    color: var(--c-white);

    @container lineup (min-width: 34em) { grid-template-columns: repeat(4, 1fr); }

    & figure {
      position: relative; aspect-ratio: 1; overflow: hidden;
      background: var(--tint); border: 1px solid transparent;
      transition: border-color .25s ease;

      &::after {
        content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
        background: linear-gradient(to top,
          color-mix(in srgb, var(--tint) 55%, black) 0%,
          color-mix(in srgb, var(--tint) 40%, transparent) 45%,
          color-mix(in srgb, var(--tint) 12%, transparent) 100%);
      }
    }
    & img { inline-size: 100%; block-size: 100%; object-fit: cover; filter: grayscale(1); transition: filter .4s ease, scale .4s ease; }
    & figcaption {
      position: absolute; inset: auto 0 0 0; z-index: 2; padding: .8rem 1rem .9rem;
      font: 400 .8em/1.3 var(--font-display); letter-spacing: .1em; text-transform: uppercase;
      text-shadow: 0 1px 3px rgb(0 0 0 / 35%);

      &::before {
        content: ""; display: block; inline-size: 2rem; block-size: 3px; margin-block-end: .5rem;
        background: var(--c-amber); transition: width .3s ease;
      }
    }
    &:is(:hover, :focus-visible) {
      & figure { border-color: var(--c-amber); }
      & img { filter: none; scale: 1.04; }
      & figcaption::before { inline-size: 4rem; }
    }
  }

  /* ----- program: compact time above each full-width session ----- */
  .program {
    container: program / inline-size;
    scroll-margin-block-start: 6rem;
    padding: clamp(1.25rem, 4cqw, 3.5rem);
    background: var(--c-white); color: var(--c-text);
    border: 1px solid var(--c-border);
    box-shadow: 0 8px 24px rgb(0 0 0 / 12%);

    & > h2 {
      padding-block-end: 1.75rem; font-size: 1.8em; color: var(--c-heading);
      &::after { content: ""; display: block; inline-size: 2.5rem; block-size: 3px; margin-block-start: .6rem; background: var(--c-amber); }
    }
  }

  .agenda {
    margin: 0;
    padding: 0;
    list-style: none;
    column-count: 1;
    column-gap: clamp(2rem, 5cqw, 4rem);

    /* Two balanced vertical columns on desktop; one continuous column on mobile. */
    @container program (min-width: 45em) {
      column-count: 2;
      column-fill: balance;
    }
  }

  .session {
    display: block;
    padding-block-end: 1.5rem;
    margin-block-end: 1.5rem;
    border-block-end: 1px solid var(--c-border);
    break-inside: avoid;
    -webkit-column-break-inside: avoid;

    &:last-child { padding-block-end: 0; margin-block-end: 0; border-block-end: 0; }
  }

  .timeline {
    margin-block-end: .3rem;
    font: 600 .82em/1.35 var(--font-display);
    letter-spacing: .035em;
    color: var(--c-brand);
    font-variant-numeric: tabular-nums;
  }

  .session-body { min-width: 0; }

  .label {
    margin-block-end: .15rem;
    font: 400 .72em/1.4 var(--font-display); letter-spacing: .18em; text-transform: uppercase; color: var(--c-brand);
  }
  .session-title { font-size: 1.15em; line-height: 1.3; color: var(--c-heading); }
  .session-sub { font-size: .9em; opacity: .8; }

  /* Doors and breaks are deliberately quieter than presentation sessions. */
  :is(.session--doors, .session--networking) .session-title {
    font: 400 1em/1.4 var(--font-body);
    color: var(--c-text);
  }

  .session--keynote {
    & .session-title { font-size: 1.3em; }
    & .label { font-weight: 700; }
  }

  .speakers { display: grid; gap: .9rem; margin: .9rem 0 0; padding: 0; list-style: none; }
  .speakers li { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 0 .85rem; align-items: start; }
  .speakers :is(img, .avatar) { inline-size: 3.25rem; aspect-ratio: 1; object-fit: cover; }
  .speakers img { filter: grayscale(1); transition: filter .3s ease; }
  .speakers li:hover img { filter: none; }
  .avatar { background: color-mix(in srgb, var(--tint) 35%, var(--c-white)); }
  .name { font-weight: 700; line-height: 1.3; color: var(--c-heading); }
  .name a { color: inherit; &:hover { color: var(--c-accent); } }
  .role { margin-inline-start: .6em; font: 400 .68em/1 var(--font-display); letter-spacing: .18em; text-transform: uppercase; color: var(--c-brand); }
  .bio { margin-block-start: .15rem; font-size: .85em; line-height: 1.45; }

  /* ----- sponsors ----- */
  .sponsors { display: grid; gap: 1rem; justify-items: end; }
  .credits { font: 400 .72em/1 var(--font-display); letter-spacing: .25em; text-transform: uppercase; color: var(--c-white); }
  .logos { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: clamp(.75rem, 2cqw, 1.5rem); margin: 0; padding: 0; list-style: none; }
  .logos li {
    inline-size: clamp(7rem, 14cqw, 12.5rem); aspect-ratio: 16 / 9;
    display: grid; place-items: center; padding: .7rem;
    background: var(--c-white); border: 1px solid var(--c-border);
    transition: box-shadow .25s ease, border-color .25s ease;
    &:hover { box-shadow: 0 8px 24px rgb(0 0 0 / 12%); border-color: var(--c-amber); }
  }
  .logos a { display: grid; place-items: center; inline-size: 100%; block-size: 100%; }
  .logos img { max-inline-size: 100%; max-block-size: 100%; object-fit: contain; }
}

/* ---------- motion ---------- */
@layer utilities {
  @keyframes drift { from { scale: 1; } to { scale: 1.08; } }
  @keyframes rise  { from { opacity: 0; translate: 0 1.25rem; } }

  .hero > *, .faces figure { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }

  @media (prefers-reduced-motion: reduce) {
    .landing-bg #bg img, .hero > *, .faces figure { animation: none; }
    .landing *, .landing *::before { transition: none !important; }
    html { scroll-behavior: auto; }
  }
}

@layer overrides {
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

  @media print {
    .landing-bg, .landing-screen, .edition, .lineup, .button { display: none; }
    .landing, .program { color: #000; box-shadow: none; }
    .hero, .eventtitle, .credits { color: #000; text-shadow: none; }
  }
}

/* ==========================================================================
   OPTIONAL — global chrome on this page. Delete if your header/footer already
   handle the dark hero (e.g. via body#home). Deliberately UNLAYERED, because
   the .cf-site-nav rules in mdfd.css are unlayered too.
   ========================================================================== */
body:has(.landing) :is(header, #header) { background: transparent; }
body:has(.landing) #footer, body:has(.landing) #footer :is(p, a) { color: var(--c-white); }

@media (min-width: 861px) {
  body:has(.landing) nav.cf-site-nav { --nav-fg: #fff; }
  body:has(.landing) nav.cf-site-nav .cf-nav-item .cf-nav-link:is(:hover, :focus-visible) { color: var(--c-amber); }
}
@media (max-width: 860px) {
  body:has(.landing) nav.cf-site-nav .cf-nav-toggle[aria-expanded="false"] { color: #fff; }
}
