/* Consent banner (analytics + advertising). Bottom of the viewport, above the
   concierge launcher, never covering the primary CTA (spec 0223: compact
   first view, space reserved under it, above the composer at every width). Decline all carries the
   same visual weight as Allow all: a decline that is harder to find than the
   accept is not a free choice. */
.ymh-consent {
  /* The width below is the whole box: /login and /onboarding carry no
     global reset, and without this the padding and border pushed the
     banner past both edges of the screen (#741). */
  box-sizing: border-box;
  position: fixed;
  /* Centred on the main column beside the app sidebar when there is one
     (consent.js), else on the window. Lifted above a page's fixed foot bar
     when there is one. */
  left: var(--ymh-consent-x, 50%);
  bottom: max(16px, var(--ymh-consent-lift, 0px));
  transform: translateX(-50%);
  z-index: 90;
  width: min(860px, var(--ymh-consent-w, calc(100vw - 24px)));
  /* Opened on a 320x568 phone the banner was taller than the room left for
     it, so its own Sub-processors link sat off screen. It scrolls inside
     itself instead. */
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(15, 20, 34, .94);
  border: 1px solid rgba(245, 241, 235, .16);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #F5F1EB;
  font-family: "Montserrat", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.ymh-consent-copy {
  flex: 1 1 300px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(245, 241, 235, .82);
}
.ymh-consent-copy a { color: #FEA200; text-decoration: underline; text-underline-offset: 2px; }
.ymh-consent-opts { flex: 1 1 100%; display: grid; gap: 8px; margin: 0; }
.ymh-consent-opts[hidden] { display: none; }
.ymh-consent-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(245, 241, 235, .82);
  cursor: pointer;
}
.ymh-consent-opt input {
  font-size: 16px;
  margin: 2px 0 0;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  accent-color: #FEA200;
  cursor: pointer;
}
.ymh-consent-opt input:focus-visible { outline: 2px solid #FEA200; outline-offset: 2px; }
.ymh-consent-opt strong { color: #F5F1EB; }
.ymh-consent-actions { display: flex; gap: 10px; flex: 0 0 auto; justify-content: flex-end; }
/* Once the purposes are open, the buttons take their own row under them. */
.ymh-consent-opts:not([hidden]) ~ .ymh-consent-actions { flex: 1 1 100%; }
/* Spec 0223: while the banner is up, reserve its height at the foot of the
   page, so whatever it overlays can be scrolled clear of it. Published by
   consent.js from the banner's measured height, and removed with it. */
/* !important and the extra html and body selectors because the app shell
   pins both paddings with !important below 1024px (body.oemd-shell,
   .appshell .appshell-main), which silently cancelled the reserve on every
   app page on a phone. Only while the banner is up. */
html.ymh-consent-open body { padding-bottom: var(--ymh-consent-space, 0px) !important; }
html.ymh-consent-open body .appshell-main { padding-bottom: var(--ymh-consent-space, 0px) !important; }
/* On a page with a composer the thread is what scrolls, above the
   composer; reserving there never moves the composer (see consent.js).
   Only where the composer is in the flow: with it fixed (phones) the page
   reserve already ends the column above the banner, and padding the thread
   as well left a sliver of thread. !important and the body selector beat
   the shell's own !important thread padding. */
html.ymh-consent-open-thread:not(.ymh-consent-open) body .eng-thread { padding-bottom: calc(20px + var(--ymh-consent-space, 0px)) !important; }
/* Before the first message the starter cards are not in the thread but in
   the hero block above it, which scrolls on its own; it takes the same
   reserve (cold audit round 3 sweep: "Weekly inspection", "Preventive
   Care", "Yacht Passport" out of reach at 1024 to 1300 wide). Padding alone
   grew the block and pushed the composer down, so consent.js measures the
   block first and pins it to that height: the reserve is room to scroll,
   never a bigger box. Off once a chat starts and the block collapses. */
html.ymh-consent-hero body:not(.eng-chatting):not(.oemd-hero-collapsed) .oemd-hero-block {
  box-sizing: border-box;
  max-height: var(--ymh-consent-hero-h, 60vh);
  padding-bottom: calc(8px + var(--ymh-consent-space, 0px));
  transition: none;
}

/* The home page's floating Ask bar is fixed to the same foot of the screen
   once a visitor scrolls past the hero; lift it above the banner rather than
   leave it under. */
html.ymh-consent-open .ymh-wrapper .floating-ask-bar { bottom: var(--ymh-consent-space, 20px); }
.ymh-consent-btn {
  position: relative;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #FEA200;
  color: #171C2F;
  font: 600 12.5px/1.2 inherit;
  cursor: pointer;
  white-space: nowrap;
}
/* A 44px tap without changing the drawn pill (about 36 tall): an invisible
   band centred on the button, the same pattern as the site chrome links. */
.ymh-consent-btn::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.ymh-consent-btn.ghost { background: transparent; border-color: rgba(245, 241, 235, .32); color: #F5F1EB; }
.ymh-consent-btn:hover { filter: brightness(1.06); }
.ymh-consent-btn:focus-visible { outline: 2px solid #FEA200; outline-offset: 3px; }
/* Clear the composer, do not sit on it.
   2026-08-30, reported as "try is not working": the banner sat on the
   composer's input and send button, so a visitor seeing it for the first
   time could not type or send at all on the surface whose whole job is to
   let them try.

   Measured, not guessed: keyboard-inset.js publishes --chat-chrome-h, the
   whole pinned band at the chat's foot (composer plus the disclaimer with
   its "How it works" link), and --composer-clear, the composer alone. The
   guide bubble floats on the same number for the same reason. The 84px
   fallback keeps a blocked or slow keyboard-inset.js clear of the composer.

   Spec 0223: keyed to the presence of a composer, not to a width. It used
   to apply at every width under 768px, so on the home page and /login a
   phone banner floated 96px up for a composer that was not there, while on
   a desktop /try or /app it sat on the composer. consent.js adds the class
   when the page has one. With the composer in the flow it clears the
   disclaimer and the /focus rail as well; with it fixed (phones) it clears
   the composer alone and the disclaimer scrolls clear (rule below). */
/* The higher of the two: --ymh-consent-lift (consent.js, measured when the
   banner opens or the window resizes, and the only one that sees the /focus
   rail) and --chat-chrome-h (keyboard-inset.js, kept live, so a composer
   that moves when a chat starts is never caught under a stale lift). */
.ymh-consent--above-composer {
  bottom: max(var(--ymh-consent-lift, 0px), calc(var(--chat-chrome-h, var(--composer-clear, 84px)) + 12px));
  max-height: calc(100vh - max(var(--ymh-consent-lift, 0px), calc(var(--chat-chrome-h, var(--composer-clear, 84px)) + 12px)) - 12px);
}
/* With the composer fixed to the screen (phones) the page takes the
   reserve (consent.js), and the disclaimer is page content that scrolls,
   so the banner clears the fixed composer alone. Riding --chat-chrome-h
   there fed back: in a chat the disclaimer sits just above the composer,
   the page reserve moved it, the band measured taller, the banner rose and
   the reserve grew, on every resize. */
html.ymh-consent-open .ymh-consent--above-composer {
  bottom: calc(var(--composer-clear, 84px) + 12px);
  max-height: calc(100vh - var(--composer-clear, 84px) - 24px);
}

@media (max-width: 560px) {
  .ymh-consent { flex-direction: column; align-items: stretch; gap: 10px; }
  /* Round 12 (2026-08-19) · M-17. .ymh-consent-copy carries `flex: 1 1 320px`
   * for the row layout, where 320px is a sensible MIN WIDTH for the text
   * column. Switching the container to `column` re-points flex-basis at the
   * cross axis, so that 320px silently became a MIN HEIGHT: the paragraph
   * needs ~56px and was being held open to 320px. The banner measured a
   * constant 403px tall at every width below 560 — 71% of a 320x568 phone —
   * with ~250px of dead space between the copy and the buttons.
   * Reset the basis so the column sizes to its content. */
  .ymh-consent-copy { flex: 0 1 auto; }
  /* Three short buttons share one row, each taking an equal share; they
     fit a 320px phone without wrapping (spec 0223). */
  .ymh-consent-actions { justify-content: stretch; flex-wrap: nowrap; gap: 8px; }
  .ymh-consent-btn { flex: 1 1 0; padding: 9px 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .ymh-consent { animation: ymhConsentIn .28s cubic-bezier(.2,.9,.3,1.02) both; }
  @keyframes ymhConsentIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
}
