    /* Home logo: the gold medallion. The emblem (hands, plane, arc) sits in a
       gold-ringed coin. On an 18s loop the emblem turns once, the coin opens
       into a pill, the script name drops in like a split-flap board, holds,
       lifts away, and the pill closes back to the coin. */
    .brand-logo {
      --md-gold: conic-gradient(from 30deg, #8A6416, #F6D77A, #B8892A, #FFF1B8, #9C7420, #E9C25A, #8A6416);
      --md-w: 50px;
      --md-open: 142px;
      position: relative;
      display: flex;
      align-items: center;
      height: 50px;
      min-width: 0;
      -webkit-tap-highlight-color: transparent;
    }

    .md {
      position: relative;
      display: flex;
      align-items: center;
      width: var(--md-w);
      height: 50px;
      box-sizing: border-box;
      border: 3px solid transparent;
      border-radius: 25px;
      background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--md-gold) border-box;
      box-shadow: 0 6px 14px rgba(var(--shade-rgb), 0.22);
      overflow: hidden;
      perspective: 200px;
      animation: mdOpen 18s cubic-bezier(0.65, 0, 0.35, 1) infinite;
    }

    .md-coin {
      position: relative;
      flex: 0 0 44px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .md-coin::before {
      content: ''; position: absolute; inset: 2px; border-radius: 50%;
      border: 1px solid rgba(184, 137, 42, 0.55);
    }

    .md-emblem {
      width: 33px; height: 31px;
      background: url("../Media/brand/logo-emblem.png") center / contain no-repeat;
      animation: mdTurn 18s cubic-bezier(0.45, 0, 0.3, 1) infinite;
    }

    /* The name sits a little low: the script climbs to the right, so its
       optical middle is above its box's. */
    .md-text {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      margin-top: 5px;
      padding: 0 14px 0 1px;
      opacity: 0;
      transform-origin: center top;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      animation: mdFlap 18s cubic-bezier(0.34, 1.5, 0.64, 1) infinite;
    }
    .md-script { width: 69px; height: 30px; background: url("../Media/brand/logo-script.png") center / contain no-repeat; }

    /* The open starts as the turn finishes, the name drops in while the pill
       is still growing, and the pill starts closing as the name fades. */
    @keyframes mdTurn {
      0%, 3.556% { transform: rotate(0); }
      12.444%, 100% { transform: rotate(360deg); }
    }
    @keyframes mdOpen {
      0%, 11.111% { width: var(--md-w); }
      16%, 36.222% { width: var(--md-open); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
      40.667%, 100% { width: var(--md-w); }
    }
    @keyframes mdFlap {
      0%, 14% { opacity: 0; transform: rotateX(-90deg); }
      14.889% { opacity: 1; }
      18.889%, 34.667% { opacity: 1; transform: rotateX(0); animation-timing-function: cubic-bezier(0.55, 0, 0.85, 0.3); }
      36.222% { opacity: 1; animation-timing-function: linear; }
      37.333%, 100% { opacity: 0; transform: rotateX(80deg); }
    }

    @media (prefers-reduced-motion: reduce) {
      .brand-logo .md, .brand-logo .md-emblem, .brand-logo .md-text { animation: none; }
    }
