/* OEM dashboard shell, matches the YMH Yacht Assistant Figma
   (Chat Landing v2 · Desktop 1440). Light theme, Rev3 type (Montserrat, Georgia H1 and H2), action cards
   with left color stripe, chat pill with orange-circle send. Applied to
   /try, /focus, and future /oem/<brand> surfaces.

   Design tokens are inlined here (not in site.css) so the dashboard can
   ship a light theme without competing with the marketing helm's dark
   theme on /. */

/* ── Legacy names aliased to the Rev3 tokens (spec 0599 S3a) ──────────
   The tokens themselves are the generated block at the top of
   /assets/fonts/fonts.css (Figma 8rcqPM95zXXBMghQNuJLxk, node 11:2).
   This block only maps the old --ymh-* names onto them, so every rule
   and inline style that still says var(--ymh-ink) gets the brand value.
   --ymh-muted is body text, so it is text/secondary (4.54:1 on Ivory
   Hull). --ymh-muted-light is text/muted, for disabled only: it is
   3.44:1 on white, so placeholders use text/secondary (5.15:1 on white,
   4.54:1 on Ivory Hull). --ymh-muted-lighter maps to Harbor Mist, the light neutral, for
   text on navy grounds only (12:1 on Ocean); Harbor Mist on white is
   1.4:1, so a rule on a white ground uses text/secondary instead, and
   Harbor Mist on white is a divider, never text. */
:root {
  --ymh-bg: var(--brand-ivory-hull);
  --ymh-panel: var(--neutral-surface);
  --ymh-sidebar: var(--brand-ocean-depths);
  --ymh-sidebar-item: var(--brand-mariner-blue);
  --ymh-ink: var(--text-primary);
  --ymh-ink-2: var(--brand-ocean-depths);
  --ymh-muted: var(--text-secondary);
  --ymh-muted-light: var(--text-muted);
  --ymh-muted-lighter: var(--brand-harbor-mist);
  --ymh-link: var(--text-link);
  --ymh-orange: var(--brand-sunset-orange);
  --ymh-orange-2: var(--brand-sunset-orange);
  --ymh-peach: var(--functional-notice-warm);
  --ymh-danger: var(--functional-danger);
  --ymh-line: var(--neutral-line);
  --ymh-border: var(--ymh-line); /* alias: one border token; passport.css used --ymh-border with a #e6ecf3 fallback, now unified */
  --ymh-row-hover: var(--neutral-subtle);
  --ymh-chip-bg: var(--neutral-subtle);
  --ymh-r-card: var(--radius-md);
  --ymh-r-row: var(--radius-sm);
  --ymh-r-pill: var(--radius-pill);
  --ymh-r-icon: var(--radius-control);
  --ymh-shadow-card: var(--elevation-card);
  --ymh-shadow-hover: 0 6px 16px 0 rgba(23,28,47,.10);
  --ymh-serif: Georgia, Gelasio, "Times New Roman", serif;
  --ymh-sans: "Montserrat", -apple-system, "Segoe UI", sans-serif;
}

/* Held hue with no Rev3 token yet (the info dot); S4 decides it. */
:root { --ymh-info: #9ccdef; }

/* Rev3: Montserrat for everything but H1 and H2 (spec 0599 4.2, O1). */
body {
  font-family: var(--ymh-sans);
  background: var(--ymh-bg);
  color: var(--ymh-ink);
  margin: 0;
  min-height: 100vh;
}

/* Form controls take the page font. The user agent gives buttons and
   fields their own (Arial), so without this every button whose rule sets
   only weight and size (the S3a longhands of the old invalid
   "font: 700 15px/1.2 inherit") draws in Arial: Sign in, Filters, the
   bell. Zero specificity beyond the element, so any rule that names a
   family still wins. */
button, input, select, textarea { font-family: inherit; }

/* Rev3 H1 and H2: Georgia regular, sentence case, never bold (O1).
   h1.lg-h out-ranks the inline .lg-h rule in login.html, which this
   slice may not edit (it sits in open PRs; S7 tidies it). */
h1.lg-h {
  font-family: var(--ymh-serif);
  font-weight: 400;
  letter-spacing: 0;
}

/* Kill the site.css dark hero styles for pages that use the dashboard. */
.oemd { background: var(--ymh-bg); color: var(--ymh-ink); }

/* [hidden] fix: our .oemd-live sets display:grid and .oemd-identify would
   inherit its box display from its parent, both of which override the
   browser's default [hidden] { display: none }. Explicit rule so the
   identify -> live swap actually hides the other section.
   Broader [hidden] rule too so the engineer.js DOM shim (a hidden div
   containing .eng-hero / .eng-chat with dark 100vh backgrounds) does
   not leak into the page. Some element selectors in engineer.css set
   properties that ignore [hidden] on their ancestors. */
.oemd [hidden] { display: none !important; }
body.oemd-page [hidden] { display: none !important; }

/* Site nav is position:fixed cream-on-transparent, it's invisible on the
   light dashboard bg. Turn it into a proper opaque bar with dark text
   while the dashboard is being viewed. Applied via body class oemd-page
   so this doesn't affect the marketing helm at /. Also force the light
   background at every relevant scope because engineer.css keeps a full-
   viewport dark hero gradient that would otherwise leak through when
   the hidden shim is present. */
html, body.oemd-page {
  background: var(--ymh-bg) !important;
  min-height: 100vh;
}
body.oemd-page { padding-top: var(--nav-h, 80px); }
body.oemd-page .nav {
  background: var(--ymh-panel);
  border-bottom: 1px solid var(--ymh-line);
}
body.oemd-page .nav-links a,
body.oemd-page .nav-cta { color: var(--ymh-muted); }
body.oemd-page .nav-links a:hover,
body.oemd-page .nav-cta:hover { color: var(--ymh-ink); }
body.oemd-page .nav-links a.active { color: var(--brand-mariner-blue); }
body.oemd-page .nav-toggle span { background: var(--ymh-ink); }
/* Neutralize engineer.css hero + chat backgrounds that were meant for the
   old standalone chat pages. In the dashboard those elements only exist
   inside the DOM shim (already hidden), but this belt-and-suspenders
   rule guarantees no dark gradient can leak into the page. */
body.oemd-page .eng-hero,
body.oemd-page .eng-chat {
  background: transparent !important;
  min-height: 0 !important;
  color: inherit !important;
}
/* engineer.js adds `eng-chatting` to body once the first message fires,
   and engineer.css sets `body.eng-chatting { background: #0f1428 }`
   (dark navy chat page). Force the light bg here so the dashboard keeps
   its theme even after the chat gets going. */
body.oemd-page.eng-chatting { background: var(--ymh-bg) !important; }

/* ── Demo banner (top strip) ───────────────────────────────────────── */
.oem-demo-banner {
  max-width: 1080px; margin: 16px auto 0; padding: 8px 16px;
  background: var(--ymh-panel); border: 1px solid var(--ymh-line);
  border-radius: var(--ymh-r-pill); text-align: center; color: var(--ymh-muted);
  font-size: 12px; letter-spacing: .02em;
}
.oem-demo-banner b {
  color: var(--brand-mariner-blue); letter-spacing: .12em; text-transform: uppercase;
  font-size: 10px; margin-right: 8px; font-weight: 700;
}

/* ── Page shell ────────────────────────────────────────────────────── */
.oemd { max-width: 1200px; margin: 0 auto; padding: 16px 24px 24px; }

/* ── Identify state (before vessel is known) ───────────────────────── */
.oemd-identify {
  max-width: 640px; margin: 24px auto 0; text-align: center;
  background: var(--ymh-panel); border: 1px solid var(--ymh-line);
  border-radius: var(--ymh-r-card); padding: 28px 28px;
  box-shadow: var(--ymh-shadow-card);
}
.oemd-h1 {
  font-family: var(--ymh-serif);
  font-size: 26px; font-weight: 400; line-height: 1.15; color: var(--ymh-ink);
  margin: 0 0 10px; letter-spacing: -.01em;
}
.oemd-sub {
  font-size: 14px; color: var(--ymh-muted); margin: 0 0 22px; line-height: 1.55;
}
.oemd-identify-input {
  display: flex; gap: 8px; margin-bottom: 20px;
  background: var(--ymh-panel); border: 1px solid var(--ymh-line);
  border-radius: var(--ymh-r-pill); padding: 4px 4px 4px 16px;
  transition: border-color .18s ease;
}
.oemd-identify-input:focus-within { border-color: var(--ymh-orange); }
.oemd-identify-input input {
  flex: 1; background: transparent; border: 0; padding: 10px 0;
  color: var(--ymh-ink); font-size: 14px; font-family: inherit; outline: none;
}
.oemd-identify-input input::placeholder { color: var(--ymh-muted); }
.oemd-identify-input button {
  padding: 10px 20px; border-radius: var(--ymh-r-pill); border: 0;
  background: var(--ymh-orange); color: var(--ymh-ink-2);
  font-weight: 600; font-size: 12px; cursor: pointer; font-family: inherit;
}
.oemd-identify-input button:hover { filter: brightness(.98); }
.oemd-identify-chips {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.oemd-chip {
  padding: 6px 14px; border-radius: var(--ymh-r-pill);
  background: var(--ymh-chip-bg); border: 1px solid var(--ymh-line);
  color: var(--ymh-ink); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .18s ease;
}
.oemd-chip:hover {
  background: var(--ymh-peach); border-color: var(--ymh-orange); color: var(--ymh-ink-2);
}

/* ── Live state (after vessel is identified) ───────────────────────── */
.oemd-live {
  display: grid; grid-template-columns: 1fr 320px; gap: 16px; margin-top: 8px;
  align-items: start;
}
@media (max-width: 900px) { .oemd-live { grid-template-columns: 1fr; } }

/* Main column (left, wide) */
.oemd-main {
  background: var(--ymh-panel); border: 1px solid var(--ymh-line);
  border-radius: var(--ymh-r-card); padding: 20px 24px;
  display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
  box-shadow: var(--ymh-shadow-card);
}

/* Right rail */
.oemd-side {
  display: flex; flex-direction: column; gap: 18px; min-width: 0;
}
.oemd-card {
  background: var(--ymh-panel); border: 1px solid var(--ymh-line);
  border-radius: var(--ymh-r-card); padding: 20px;
  box-shadow: var(--ymh-shadow-card);
}

/* Vessel profile card (right rail top). Kept compact so the entire
   right rail fits above the fold at 900px viewport height. */
.oemd-vessel { padding: 14px; }
.oemd-vessel-badge {
  display: inline-block; font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand-mariner-blue); font-weight: 700;
  background: var(--ymh-peach); padding: 3px 9px; border-radius: var(--ymh-r-pill);
  margin-bottom: 10px;
}
.oemd-vessel-hero {
  height: 90px; border-radius: var(--ymh-r-card);
  background: linear-gradient(135deg, var(--brand-ocean-depths) 0%, var(--brand-ocean-depths) 100%);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; overflow: hidden;
}
.oemd-vessel-hero svg { max-width: 82%; max-height: 82%; }
.oemd-vessel-builder {
  font-size: 12px; font-weight: 700; color: var(--ymh-ink);
  margin-bottom: 2px;
}
.oemd-vessel-model {
  font-size: 18px; font-weight: 700; color: var(--ymh-ink);
  margin-bottom: 4px; line-height: 1.2;
}
.oemd-vessel-specs {
  font-size: 11px; color: var(--ymh-muted); line-height: 1.5;
}
.oemd-vessel-change {
  display: block; margin-top: 12px; background: none; border: none;
  color: var(--brand-mariner-blue); font-size: 11px; font-weight: 600;
  cursor: pointer; text-decoration: none; padding: 0; font-family: inherit;
}
.oemd-vessel-change:hover { text-decoration: underline; }

/* Warranty Tracker (right rail, Focus surface), replaces Passport on
   OEM surfaces where the owner already has active factory + component
   coverage that the surface needs to visualize. */
.oemd-warranty { padding: 10px 14px; }
.oemd-warranty-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.oemd-warranty-title {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ymh-muted); font-weight: 700;
}
.oemd-warranty-tag {
  font-size: 9.5px; letter-spacing: .06em; font-weight: 700;
  color: var(--functional-warning-strong); background: rgba(217,119,6,.14);
  padding: 3px 8px; border-radius: var(--ymh-r-pill);
}
.oemd-warranty-list {
  display: flex; flex-direction: column; gap: 5px;
}
.oemd-warranty-row {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 8px;
  align-items: start; padding: 6px 10px;
  background: var(--ymh-row-hover); border-radius: var(--ymh-r-row);
}
.oemd-w-icon {
  width: 20px; height: 20px; border-radius: 999px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--neutral-white);
  background: var(--functional-success);
  margin-top: 2px;
}
.oemd-warranty-row[data-status="warn"] .oemd-w-icon { background: var(--functional-warning-strong); }
.oemd-w-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.oemd-w-org {
  font-size: 9px; font-weight: 700; letter-spacing: .04em;
  color: var(--ymh-muted); text-transform: uppercase;
}
.oemd-w-item { font-size: 11.5px; font-weight: 600; color: var(--ymh-ink); }
.oemd-w-bar {
  height: 3px; background: var(--neutral-line); border-radius: 999px;
  overflow: hidden; margin-top: 3px;
}
.oemd-w-fill {
  height: 100%; background: var(--functional-success); border-radius: 999px;
}
.oemd-warranty-row[data-status="warn"] .oemd-w-fill { background: var(--functional-warning-strong); }
.oemd-w-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  min-width: 88px;
}
.oemd-w-until {
  font-size: 9.5px; color: var(--ymh-muted); white-space: nowrap;
}
.oemd-w-pct {
  font-size: 9.5px; font-weight: 700; color: var(--functional-success-strong);
}
.oemd-warranty-row[data-status="warn"] .oemd-w-pct { color: var(--functional-warning-strong); }
.oemd-warranty-foot {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--ymh-line);
  font-size: 10.5px; color: var(--ymh-muted); line-height: 1.5;
  text-align: center;
}

/* Yacht Passport progress (right rail) */
.oemd-passport-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.oemd-passport-title {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ymh-muted); font-weight: 700;
}
.oemd-passport-tag {
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-mariner-blue); font-weight: 700;
}
.oemd-passport-bar {
  height: 6px; background: var(--ymh-row-hover);
  border-radius: var(--ymh-r-pill); overflow: hidden; margin-bottom: 6px;
}
.oemd-passport-fill {
  height: 100%; background: var(--ymh-orange); transition: width .3s ease;
}
.oemd-passport-pct {
  font-size: 10px; font-weight: 600; color: var(--brand-mariner-blue);
  margin-bottom: 12px;
}
.oemd-passport-list {
  list-style: none; padding: 0; margin: 0 0 12px;
}
.oemd-passport-list li {
  padding-left: 20px; position: relative; font-size: 12px;
  color: var(--ymh-muted); margin-bottom: 6px; line-height: 1.4;
}
.oemd-passport-list li::before {
  content: "○"; position: absolute; left: 4px; color: var(--ymh-muted-light);
}
.oemd-passport-list li.done { color: var(--ymh-ink); font-weight: 600; }
.oemd-passport-list li.done::before { content: "●"; color: var(--ymh-orange); }
.oemd-passport-foot {
  font-size: 10.5px; color: var(--ymh-muted); line-height: 1.5;
  padding-top: 10px; border-top: 1px solid var(--ymh-line);
}

/* ── Main column contents ──────────────────────────────────────────── */

/* Welcome header + identity chip strip */
.oemd-welcome-h {
  font-size: 22px; font-weight: 700; color: var(--ymh-ink);
  margin: 0 0 6px; line-height: 1.25;
}
.oemd-welcome-id {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ymh-muted); margin-bottom: 4px;
}
.oemd-welcome-id b { color: var(--ymh-ink); font-weight: 600; }
.oemd-welcome-id .dot { color: var(--ymh-muted-light); }
.oemd-welcome-id .val { color: var(--ymh-link); }
.oemd-sep {
  height: 1px; background: var(--ymh-line); margin: 6px 0;
}
.oemd-things-h {
  font-size: 13px; font-weight: 600; color: var(--ymh-ink); margin: 0;
}

/* Action tile: reshaped to Figma "action card" pattern with a left
   color stripe, icon pill on the left, title/subtitle stack, orange
   Start pill on the right. 2-column grid on wider screens so the
   dashboard fits without heavy scrolling. */
.oemd-tiles {
  /* 2026-08-17 fix: auto-fit min-260px so wider screens flow to 3
     columns and the 6-tile intro grid on /try fits without scrolling.
     Narrow viewports still collapse cleanly (2 cols mid, 1 col mobile).
     Owner reported the tiles felt oversized and asymmetric to the page. */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px;

  /* ── TILE SIZING SYSTEM ──────────────────────────────────────────
     Tile height used to be whatever the copy happened to need, so the
     six tiles came out 119/119/119/99/99/99 on desktop and 90/90/90/
     72/72/72 on a phone: the first row's hint text wraps to two lines
     and the second row's does not. Every breakpoint then got its own
     patch, which is why they drifted apart in the first place.

     Two rules replace all of that, and they compose:

       --tile-sub-lines  caps the hint. This BOUNDS the tallest a tile
                         can ever get, whatever anyone writes in it.
       grid-auto-rows:1fr  makes every row equal to that tallest tile.

     Consequence: all tiles are the same height, that height is set by
     content rather than a magic number, and it can never run away
     because the clamp holds the ceiling. Changing the line budget is a
     one-line change here, not six overrides across three files. */
  --tile-sub-lines: 2;
  grid-auto-rows: 1fr;
  /* Offset for the sticky appshell topbar so #help anchor navigation
     (from the topbar "What can I ask?" chip) doesn't land underneath it. */
  scroll-margin-top: 72px;
}
@media (max-width: 720px) { .oemd-tiles { grid-template-columns: 1fr; } }

/* Passport tile, promoted while the boat's record is incomplete.
   2026-08-30, owner directive.

   Phone only, and the breakpoint is 767.98px to match the one that
   hides the rail in passport.css: the promotion exists precisely
   because the rail is not on screen to say this. Desktop keeps
   document order, since the rail there shows the same state
   permanently and a reordering grid would just be noise.

   `order` is safe here: these are grid items, grid-auto-rows:1fr still
   equalises the rows, and the attribute is only ever set on the one
   tile. Sixth of six is not an entry point; a captain who has four
   documents outstanding should meet that tile before they scroll. */
@media (max-width: 767.98px) {
  .oemd-tiles .oemd-tile[data-passport-gap="true"] { order: -1; }
}

/* Tiles, match the equipment-row + rail-list-row visual language:
   white panel, single peach icon well, semantic color lives only in the
   4px left stripe, whole tile is the CTA (chevron on right, no button
   pill). Height drops ~35% vs the previous rainbow-pill version. */
.oemd-tile {
  /* height:100% so a short tile fills the row height grid-auto-rows:1fr
     assigned it, instead of sitting short inside its own cell. */
  height: 100%;
  display: flex; align-items: stretch; padding: 0;
  background: var(--ymh-panel); border: 1px solid var(--ymh-line);
  border-radius: var(--ymh-r-card); cursor: pointer; font-family: inherit;
  overflow: hidden; transition: all .18s ease; text-align: left;
  box-shadow: var(--ymh-shadow-card);
}
.oemd-tile:hover {
  transform: translateY(-1px); box-shadow: var(--ymh-shadow-hover);
  border-color: rgba(253,161,0,.35);
}
.oemd-tile:hover .oemd-tile-arrow { color: var(--brand-mariner-blue); transform: translateX(2px); }
.oemd-tile.disabled { opacity: .55; cursor: not-allowed; }
.oemd-tile.disabled:hover { transform: none; box-shadow: var(--ymh-shadow-card); border-color: var(--ymh-line); }
.oemd-tile.disabled:hover .oemd-tile-arrow { color: var(--ymh-muted-light); transform: none; }
.oemd-tile:focus-visible { outline: 2px solid var(--ymh-orange); outline-offset: 2px; }
.oemd-tile.active { background: var(--functional-notice-warm); border-color: var(--ymh-orange); }

.oemd-tile-stripe {
  width: 3px; flex: 0 0 3px;
  background: var(--ymh-orange);
}
.oemd-tile-inner {
  /* 2026-08-17: tightened top/bottom padding from 10px to 8px and gap
     from 10 to 8; combined with the auto-fit grid this shaves ~10px
     off each tile so the 6-tile intro grid on /try fits above the fold. */
  flex: 1; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 8px 12px; min-width: 0;
}
.oemd-tile-left { display: flex; gap: 10px; align-items: center; min-width: 0; }
.oemd-tile-icon-pill {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 7px;
  background: var(--ymh-peach); display: grid; place-items: center;
  color: var(--brand-mariner-blue);
}
.oemd-tile-icon-pill svg { display: block; }
.oemd-tile-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.oemd-tile-title {
  font-size: 13px; font-weight: 600; color: var(--ymh-ink); line-height: 1.3;
}
.oemd-tile-sub {
  font-size: 11px; color: var(--ymh-muted); line-height: 1.4;
  /* The ceiling. Everything else about tile height follows from this. */
  display: -webkit-box;
  -webkit-line-clamp: var(--tile-sub-lines, 2);
  line-clamp: var(--tile-sub-lines, 2);
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.oemd-tile-arrow {
  flex: 0 0 auto; color: var(--ymh-muted-light); font-size: 16px;
  transition: color .15s ease, transform .15s ease;
}
.oemd-tile-arrow::after { content: "→"; }

/* Legacy .oemd-tile-cta pill kept as an alias: the inline HTML still writes
   'Start', 'Decode', 'Upload', 'See my plan', etc. into a span. We render
   those as the same subtle chevron the row-family uses, the button-label
   text is hidden (font-size:0) and only the ::after arrow shows. Preserves
   accessibility (the label reads to a screen reader) while matching the
   app-brand row-family visual. */
.oemd-tile-cta {
  flex: 0 0 auto;
  color: var(--ymh-muted-light);
  font-size: 0;
  background: transparent !important;
  padding: 0;
  border-radius: 0;
  font-weight: 400;
  transition: color .15s ease, transform .15s ease;
  min-width: 16px; text-align: right;
}
.oemd-tile-cta::after {
  content: "→";
  font-size: 16px;
  font-weight: 400;
  color: inherit;
}
.oemd-tile:hover .oemd-tile-cta { color: var(--brand-mariner-blue); transform: translateX(2px); }

/* Stripe colors per tile action, the ONLY semantic color the tile uses. */
.oemd-tile[data-action="troubleshoot"] .oemd-tile-stripe { background: var(--ymh-orange); }
.oemd-tile[data-action="ask"]           .oemd-tile-stripe { background: var(--ymh-link); }
.oemd-tile[data-action="safety"]        .oemd-tile-stripe { background: var(--functional-success); }
.oemd-tile[data-action="photo"]         .oemd-tile-stripe { background: var(--ymh-danger); }
.oemd-tile[data-action="weekly"]        .oemd-tile-stripe { background: var(--ymh-link); }
.oemd-tile[data-action="preventive"]    .oemd-tile-stripe { background: var(--functional-success); }
.oemd-tile[data-action="fault"]         .oemd-tile-stripe { background: var(--ymh-danger); }
.oemd-tile[data-action="passport"]      .oemd-tile-stripe { background: var(--ymh-muted-lighter); }
/* Icon pill inherits the tile's peach + orange treatment. Inline styles
   in the current HTML markup override this with per-action tints, those
   still work, but the default is aligned with the rest of the app. */

/* Panels (fault code, photo) */
.oemd-panel {
  background: var(--ymh-panel); border: 1px solid var(--ymh-orange);
  border-radius: var(--ymh-r-card); overflow: hidden;
  animation: oemdFade .25s ease both;
  box-shadow: var(--ymh-shadow-card);
}
/* Floating panel variant, proper viewport-anchored modal + scrim so the
   fault/photo panels can't overflow into the sidebar, right rail, or
   topbar regardless of what column they were rendered inside. Uses a
   ::before pseudo for the backdrop so no extra DOM node is needed. */
.oemd-panel-float {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 96px);
  display: flex; flex-direction: column;
  z-index: 201;
  box-shadow: 0 24px 60px rgba(11,20,32,.32), var(--ymh-shadow-card);
}
.oemd-panel-float .oemd-panel-head { flex: 0 0 auto; }
.oemd-panel-float .oemd-panel-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
}
/* Modal backdrop + body scroll lock. The .oemd-modal-scrim node is
   injected by oem-dashboard.js when a panel opens and removed on close,
   so the scrim always attaches to the viewport, not to any element's
   stacking context. */
body.oemd-modal-lock { overflow: hidden; }
.oemd-modal-scrim {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(11,20,32,.55);
  animation: oemdFade .16s ease both;
}
@keyframes oemdFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.oemd-panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid var(--ymh-line);
}
.oemd-panel-title { font-size: 14px; font-weight: 600; color: var(--ymh-ink); }
.oemd-panel-close {
  background: none; border: none; color: var(--ymh-muted);
  font-size: 20px; cursor: pointer; padding: 0; width: 28px; height: 28px;
  border-radius: var(--ymh-r-pill); display: grid; place-items: center;
  font-family: inherit;
}
.oemd-panel-close:hover { background: var(--ymh-row-hover); color: var(--ymh-ink); }
.oemd-panel-body { padding: 20px; }

/* Fault-code widget */
.oemd-fault-input, .oemd-photo-input {
  display: flex; gap: 8px; background: var(--ymh-chip-bg);
  border: 1px solid var(--ymh-line); border-radius: var(--ymh-r-pill);
  padding: 4px 4px 4px 16px; transition: border-color .18s ease;
}
.oemd-fault-input:focus-within, .oemd-photo-input:focus-within { border-color: var(--ymh-orange); }
.oemd-fault-input input, .oemd-photo-input input {
  flex: 1; background: transparent; border: 0; padding: 10px 0;
  color: var(--ymh-ink); font-size: 14px; font-family: inherit; outline: none;
}
.oemd-fault-input input {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px;
}
.oemd-fault-input input::placeholder, .oemd-photo-input input::placeholder { color: var(--ymh-muted); }
.oemd-fault-input button, .oemd-photo-input button {
  padding: 10px 20px; border-radius: var(--ymh-r-pill); border: 0;
  background: var(--ymh-orange); color: var(--ymh-ink-2);
  font-weight: 600; font-size: 12px; cursor: pointer; font-family: inherit;
}
.oemd-fault-input button:disabled, .oemd-photo-input button:disabled { opacity: .45; cursor: not-allowed; }

.oemd-fault-result, .oemd-photo-result {
  margin-top: 16px; display: grid; gap: 10px; font-size: 13px;
}
.oemd-fault-result .row, .oemd-photo-result .row {
  padding: 10px 12px; background: var(--ymh-row-hover);
  border-radius: var(--ymh-r-row);
}
.oemd-fault-result .k, .oemd-photo-result .k {
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ymh-muted); margin-bottom: 4px; font-weight: 700;
}
.oemd-fault-result .v, .oemd-photo-result .v {
  color: var(--ymh-ink); line-height: 1.55;
}
.oemd-fault-result .sev-info, .oemd-photo-result .sev-info { color: var(--functional-success-strong); }
.oemd-fault-result .sev-advisory, .oemd-photo-result .sev-advisory { color: var(--functional-warning-strong); }
.oemd-fault-result .sev-safety_critical, .oemd-photo-result .sev-safety_critical {
  color: var(--functional-danger-strong); font-weight: 600;
}
.oemd-fault-result .sev-unknown, .oemd-photo-result .sev-unknown { color: var(--ymh-muted); }
.oemd-fault-result ol, .oemd-photo-result ol { margin: 0; padding-left: 22px; }
.oemd-fault-result li, .oemd-photo-result li { line-height: 1.55; margin-bottom: 4px; }
.oemd-fault-result .disclaimer, .oemd-photo-result .disclaimer {
  font-size: 11.5px; color: var(--ymh-muted); font-style: italic;
  padding-top: 4px;
}

/* Photo drop zone */
.oemd-photo-drop {
  display: block; padding: 30px 20px; text-align: center;
  border: 2px dashed rgba(253,161,0,.35); border-radius: var(--ymh-r-card);
  cursor: pointer; transition: all .18s ease; background: var(--neutral-subtle);
  margin-bottom: 12px;
}
.oemd-photo-drop:hover { border-color: var(--ymh-orange); background: var(--functional-notice-warm); }
.oemd-photo-drop.dragover { border-color: var(--ymh-orange); background: var(--functional-notice-warm); }
.oemd-photo-icon { font-size: 30px; margin-bottom: 6px; }
.oemd-photo-text { font-size: 12.5px; color: var(--ymh-muted); }
/* Multi-photo preview: horizontal thumb row + "add another" button.
   Replaces the single-img layout. Up to 3 thumbs, 96px square each. */
.oemd-photo-preview {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
}
.oemd-photo-thumb {
  position: relative; width: 96px; height: 96px;
  border-radius: var(--ymh-r-card); overflow: hidden;
  background: var(--ymh-row-hover); border: 1px solid var(--ymh-line);
}
.oemd-photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.oemd-photo-thumb-remove {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(11,30,51,.85); border: 0; color: var(--neutral-white);
  font-weight: 700; font-size: 14px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.oemd-photo-thumb-remove:hover { background: var(--ymh-ink); }
.oemd-photo-thumb-add {
  width: 96px; height: 96px;
  border-radius: var(--ymh-r-card);
  border: 1px dashed var(--ymh-line);
  background: transparent; color: var(--ymh-muted);
  font-weight: 300; font-size: 34px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: border-color .12s ease, color .12s ease;
}
.oemd-photo-thumb-add:hover { border-color: var(--ymh-orange); color: var(--brand-mariner-blue); }

/* Chat P2 · Figma 8rcqPM95zXXBMghQNuJLxk node 20:253 (Photo attachment).
   Navy panel, 240 by 150, radius 12, the camera glyph, harbor mist caption.
   Scoped to the composer and the sent bubble so the old photo panel is unchanged. */
.eng-photo-strip {
  display: flex; flex-wrap: wrap; gap: 8px; width: 100%;
}
.eng-photo-strip[hidden] { display: none; }
.eng-photo-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 240px; height: 150px; max-width: 100%; box-sizing: border-box;
  border-radius: var(--radius-md);
  background: var(--neutral-navy-panel);
}
.eng-photo-card img { width: 22px; height: 22px; display: block; }
.eng-photo-card-caption {
  margin: 0;
  font-family: var(--ymh-sans);
  font-weight: 400; font-size: 11.5px; line-height: 16px;
  color: var(--brand-harbor-mist);
  white-space: nowrap;
}
.eng-photo-card-remove {
  position: absolute; top: 8px; right: 8px;
  width: 20px; height: 20px; border-radius: 50%;
  background: transparent; border: 0; color: var(--brand-harbor-mist);
  font-weight: 700; font-size: 14px; line-height: 1; cursor: pointer;
}
.eng-photo-note {
  margin: 0; width: 100%;
  font-size: 12.5px; color: var(--ymh-muted, var(--text-secondary));
}
.eng-photo-note[hidden] { display: none; }
.eng-input-wrap.eng-photo-drag { outline: 2px solid var(--ymh-orange); outline-offset: 2px; }
.eng-photo-sent { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin: 0 0 8px; }

/* Badge row above the identified line: severity, confidence, failure mode,
   quality flag. Keeps the reading order (badges first, then explanation). */
.oemd-photo-badges {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 12px;
}
.oemd-photo-badge {
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  font-weight: 700; padding: 4px 10px; border-radius: var(--ymh-r-pill);
  background: rgba(11,30,51,.06); color: var(--ymh-ink);
}
.oemd-photo-badge.sev-info { background: rgba(22,163,74,.14); color: var(--functional-success-strong); }
.oemd-photo-badge.sev-advisory { background: rgba(217,119,6,.16); color: var(--functional-warning-strong); }
.oemd-photo-badge.sev-safety_critical { background: rgba(220,38,38,.16); color: var(--functional-danger-strong); }
.oemd-photo-badge.sev-unknown { background: rgba(11,30,51,.06); color: var(--ymh-muted); }
.oemd-photo-badge.conf-high { background: rgba(22,163,74,.10); color: var(--functional-success-strong); }
.oemd-photo-badge.conf-medium { background: rgba(59,130,246,.14); color: var(--brand-mariner-blue); }
.oemd-photo-badge.conf-low { background: rgba(107,128,153,.18); color: var(--ymh-muted); }
.oemd-photo-badge.mode { background: rgba(11,30,51,.06); color: var(--ymh-ink); }
.oemd-photo-badge.quality-poor { background: rgba(220,38,38,.14); color: var(--functional-danger-strong); }

/* Nudge line surfaced when the model was uncertain AND the captain sent
   too few / low-quality photos to be decisive. Coaches them to add
   angles rather than trusting a low-confidence verdict. */
.oemd-photo-nudge {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: rgba(253,161,0,.10);
  border: 1px dashed rgba(253,161,0,.45);
  border-radius: 10px;
  font-size: 12.5px; color: var(--ymh-ink); line-height: 1.4;
}

/* Follow-up input pinned to the bottom of the result card so the captain
   can ask "what should a healthy one look like" without re-uploading. */
.oemd-photo-followup {
  display: flex; gap: 8px; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--ymh-line);
}
.oemd-photo-followup input {
  flex: 1; min-width: 0;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--ymh-line); background: var(--neutral-white);
  font-weight: 400; font-size: 13px; line-height: 1.3; color: var(--ymh-ink);
  outline: none;
}
.oemd-photo-followup input:focus { border-color: var(--ymh-orange); }
.oemd-photo-followup button {
  padding: 0 14px; min-height: 36px; border-radius: 10px;
  border: 0; background: var(--ymh-orange); color: var(--ymh-ink-2);
  font-weight: 600; font-size: 12.5px; line-height: 1; cursor: pointer;
}

/* ── Chat pane (main column bottom) ────────────────────────────────── */
.oemd-chat-intro {
  text-align: center; padding: 8px 0 0; font-size: 12px; color: var(--ymh-muted);
}
.oemd-chat {
  display: flex; flex-direction: column; gap: 10px;
}
.oemd-chat .eng-thread {
  min-height: 120px; max-height: 340px; overflow-y: auto;
  padding: 6px 0; display: flex; flex-direction: column; gap: 12px;
}
.oemd-chat .eng-thread:empty { min-height: 0; padding: 0; }
.oemd-chat .eng-thread > *:first-child { margin-top: 0; } /* top-anchored, see engineer.css */

/* Intent-chip row above the chat input */
.oemd-mode-row {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.oemd-mode {
  padding: 6px 13px; border-radius: var(--ymh-r-pill);
  border: 1px solid transparent; background: var(--ymh-panel);
  color: var(--ymh-link); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.oemd-mode:hover { background: var(--neutral-subtle); transform: translateY(-1px); }
.oemd-mode.active {
  background: var(--ymh-ink); border-color: var(--ymh-ink);
  color: var(--neutral-white);
}
.oemd-mode.vessel {
  background: var(--ymh-peach); border-color: transparent; color: var(--ymh-ink-2);
}

/* Chat input pill (Figma pattern) */
.oemd-chat .eng-input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--ymh-panel); border: 1px solid var(--ymh-line);
  border-radius: var(--ymh-r-pill); padding: 6px 6px 6px 16px;
  transition: border-color .18s ease;
}
.oemd-chat .eng-input-wrap:focus-within { border-color: var(--ymh-orange); }
.oemd-chat .eng-input {
  flex: 1; background: transparent; border: 0; padding: 10px 0;
  color: var(--ymh-ink); font-size: 14px; font-family: inherit; outline: none;
}
.oemd-chat .eng-input::placeholder { color: var(--ymh-muted); }
.oemd-chat .eng-mic,
.oemd-chat .eng-attach {
  width: 32px; height: 32px; flex: 0 0 auto; background: transparent;
  border: 0; color: var(--ymh-muted); cursor: pointer;
  display: grid; place-items: center; border-radius: var(--ymh-r-pill);
  transition: all .12s ease;
}
.oemd-chat .eng-mic:hover:not(:disabled),
.oemd-chat .eng-attach:hover:not(:disabled) { color: var(--brand-mariner-blue); background: var(--ymh-peach); }
.oemd-chat .eng-mic:disabled,
.oemd-chat .eng-attach:disabled { opacity: .5; cursor: not-allowed; }
.oemd-chat .eng-send {
  width: 36px; height: 36px; flex: 0 0 auto; border: 0;
  background: var(--ymh-orange); color: var(--ymh-ink-2);
  border-radius: var(--ymh-r-pill); font-size: 16px; cursor: pointer;
  display: grid; place-items: center; font-weight: 700;
  transition: filter .12s ease;
}
.oemd-chat .eng-send:hover { filter: brightness(1.03); }
.oemd-chat .eng-send:disabled { opacity: .5; cursor: not-allowed; }

/* Chat message bubbles, light theme override for engineer.css defaults */
.oemd .eng-msg-wrap { align-self: flex-start; max-width: 88%; }
.oemd .eng-msg-wrap.user { align-self: flex-end; }
.oemd .eng-msg {
  padding: 12px 16px; border-radius: 14px; line-height: 1.55;
  font-size: 14px; animation: engFadeIn .35s cubic-bezier(.2,.9,.3,1.05) both;
  font-family: inherit; white-space: pre-wrap;
}
.oemd .eng-msg.user {
  background: var(--ymh-orange); color: var(--ymh-ink-2);
  font-weight: 500; border-radius: 14px 14px 4px 14px;
}
.oemd .eng-msg.bot {
  background: var(--ymh-row-hover); color: var(--ymh-ink);
  border: 1px solid var(--ymh-line);
  border-radius: 14px 14px 14px 4px;
}
.oemd .eng-msg.typing {
  background: var(--ymh-row-hover); border: 1px solid var(--ymh-line);
  padding: 12px 20px;
}
.oemd .eng-msg.typing i {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ymh-orange); margin: 0 2px; opacity: .4;
  animation: engBlink 1.2s infinite;
}
.oemd .eng-msg.typing i:nth-child(2) { animation-delay: .15s; }
.oemd .eng-msg.typing i:nth-child(3) { animation-delay: .3s; }
.oemd .eng-fb {
  display: flex; gap: 6px; align-items: center; padding: 6px 4px 0 4px;
  opacity: .55; transition: opacity .18s ease;
}
.oemd .eng-msg-wrap:hover .eng-fb { opacity: 1; }
.oemd .eng-fb-btn {
  background: var(--ymh-chip-bg); border: 1px solid var(--ymh-line);
  color: var(--ymh-ink); font-size: 14px; padding: 4px 10px;
  border-radius: var(--ymh-r-pill); cursor: pointer;
  transition: all .18s ease; display: inline-flex; align-items: center;
}
.oemd .eng-fb-btn:hover { border-color: var(--ymh-orange); color: var(--brand-mariner-blue); }
.oemd .eng-fb-thanks { font-size: 12px; color: var(--ymh-muted); font-style: italic; }

/* Loading spinner (shared) */
.oemd-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(11,20,32,.15); border-top-color: var(--ymh-orange);
  border-radius: 50%; animation: oemdSpin .8s linear infinite;
  vertical-align: middle; margin-right: 6px;
}
@keyframes oemdSpin { to { transform: rotate(360deg); } }
@keyframes engBlink { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }
@keyframes engFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ═══════════════════════════════════════════════════════════════════════
   APP SHELL (v3, matches Figma Chat Landing v2 pattern)
   ═══════════════════════════════════════════════════════════════════════
   Opt-in via body.oemd-shell so we don't disturb pages still on the older
   two-column dashboard. Grid layout:
     [ 256px sidebar ][ 64px topbar spanning main + rail ]
     [ 256px sidebar ][ 1fr main content ][ 352px right rail ]
   Sidebar and rail are position:fixed so only the main column scrolls.
   Kills the marketing site nav on shell pages via a fresh override
   (body.oemd-shell hides the .nav that was fixed at top). */

body.oemd-shell {
  padding: 0 !important;
  overflow-x: hidden;
}
/* Kill the fixed marketing nav on shell pages, the shell has its own
   topbar and there's no room at the top for the site nav strip. */
body.oemd-shell > header.nav { display: none !important; }

.appshell {
  display: grid;
  /* Round 12 · the same zero-floor the mobile block applies. `1fr` is
     minmax(auto, 1fr), so the growing column cannot shrink below its
     content's min-content width. Below 768 that produced M-01; in the
     768-1023 tablet band it was quietly producing a 10px overhang on
     /try (M-20). Fixed at every width rather than one band at a time. */
  grid-template-columns: minmax(0, 1fr) 352px;
  grid-template-rows: 64px 1fr;
  min-height: 100vh;
  background: var(--ymh-bg);
  position: relative;
}
/* App pages (Projects, Equipment, Warranty, Preventive, Fault, etc.)
   don't render the right rail, reclaim its 352px so the main column
   uses the full width. */
.appshell:has(.appshell-app) { grid-template-columns: minmax(0, 1fr); }
/* Focus keeps a 1200px reading cap. /app pages are working surfaces
   (tables, grids, editors, forms), not prose, so they take the whole
   column the shell gives them (spec app-page-layout). Written as "not
   app" so a page that loses its brand falls back to the cap. A rule
   that wants to cap one /app page needs at least this specificity. */
body:not([data-shell-brand="app"]) .appshell-main.appshell-app { max-width: 1200px; }

/* ── SIDEBAR, overlay drawer, hidden by default on every viewport
   (ChatGPT-style burger nav). Slides in from the left when
   body.appshell-drawer-open is set. Scrim below dims the page. ── */
.appshell-sidebar {
  position: fixed; top: 0; left: 0;
  width: 300px; height: 100vh; z-index: 100;
  /* Owner, 2026-08-31, iPhone 13 Pro Max Chrome: "the log in button is
     unaccessible." On iOS, 100vh is the LARGE viewport (URL bar
     retracted), so the drawer ran ~180px past the visible window and
     its last item — Log in — sat in that hidden band, unreachable at
     any scroll position. dvh tracks the VISIBLE viewport; the vh line
     above stays as the fallback for engines without dvh. Same cure the
     composer got at the media block near the end of this file. */
  height: 100dvh;
  background: var(--ymh-sidebar); color: var(--neutral-white);
  padding: 14px 14px 12px;
  display: flex; flex-direction: column; gap: 14px;
  /* 2026-08-17 fix: was overflow:hidden — but at typical laptop
     viewport heights (~800px), the sidebar content (New chat +
     Your vessel + YOUR CHATS + APPS + UNLOCK box + Log in) is TALLER
     than 100vh. Log in button was pushed off-screen with no way to
     reach it. Now scrolls within the sidebar so every item stays
     reachable regardless of window height. */
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .22s cubic-bezier(.2,.7,.2,1);
}
/* 2026-08-31. appshell.js moves every sidebar child except Log out into
   .appshell-scroll, so the button is a footer OUTSIDE the scroll region
   and can never paint over a nav row (at scrollTop 0 the sticky variant
   covered the Yacht Passport row and a tap there signed the captain
   out). Keyed off the wrapper so markup without it keeps the old
   scrolling sidebar. */
.appshell-sidebar:has(> .appshell-scroll) { overflow: hidden; }
.appshell-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  will-change: transform;
}
body.appshell-drawer-open .appshell-sidebar {
  transform: translateX(0);
  box-shadow: 8px 0 32px rgba(0,0,0,.28);
}
.appshell-scrim {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(11,20,32,.55);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
body.appshell-drawer-open .appshell-scrim {
  opacity: 1; pointer-events: auto;
}
body.appshell-drawer-open { overflow: hidden; }
.appshell-logo {
  display: flex; gap: 10px; align-items: center; padding: 4px 8px;
}
.appshell-logo-mark {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px;
  /* The white brand yacht on Ocean navy, matching the app icon, so the
     tile on the home screen and the tile in the sidebar are the same
     mark. Hairline keeps the tile legible on the dark sidebar. */
  background: var(--brand-ocean-depths); display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  color: var(--ymh-ink-2); font-weight: 700; font-size: 15px;
}
.appshell-logo-mark svg { display: block; }
.appshell-logo-title {
  font-size: 13px; font-weight: 700; line-height: 1.2; color: var(--neutral-white);
}
.appshell-logo-sub {
  font-size: 11px; color: var(--ymh-muted-lighter); line-height: 1.2; /* on the Ocean sidebar: Harbor Mist */
}
.appshell-newchat {
  background: var(--ymh-orange); color: var(--ymh-ink-2);
  border: 0; border-radius: var(--ymh-r-pill);
  padding: 10px 14px; font-weight: 600; font-size: 13px;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: filter .12s ease;
}
.appshell-newchat:hover { filter: brightness(.98); }
.appshell-vessel-switch {
  border: 1px solid rgba(255,255,255,.24); border-radius: var(--ymh-r-pill);
  background: transparent; color: var(--neutral-white);
  padding: 9px 14px; font-weight: 600; font-size: 12px;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.appshell-vessel-switch:hover { background: rgba(255,255,255,.06); }
.appshell-vessel-switch .name { display: flex; align-items: center; gap: 8px; }
/* Founder 2026-11-05: every plan has one boat, so the chip opens the boat's
   record and is not a switcher. The down arrow read as a boat picker; it is
   hidden until a plan with several boats needs a real switcher. */
.appshell-vessel-switch > svg { display: none; }
.appshell-sect-label {
  font-size: 9.5px; font-weight: 700; color: var(--ymh-muted-light);
  letter-spacing: .1em; padding: 0 8px 6px;
}
.appshell-history { display: flex; flex-direction: column; gap: 2px; }
.appshell-hist-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--ymh-r-row);
  color: var(--neutral-white); font-size: 12px; font-family: inherit;
  background: transparent; border: 0; cursor: pointer; text-align: left;
  width: 100%;
}
.appshell-hist-item:hover { background: rgba(255,255,255,.04); }
.appshell-hist-item.active { background: var(--ymh-sidebar-item); font-weight: 600; }
.appshell-hist-item svg { flex: 0 0 auto; }

/* Spec 0180 · the profile thread sits above the conversations and reads
   as a place rather than one of them. Structure only: the rule below
   reuses the accent pairing already carried by .appshell-nav-item.active
   in this file, so no new colour enters the palette. */
.appshell-hist-item .hist-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appshell-hist-profile { font-weight: 600; }
.appshell-hist-profile + .appshell-hist-item { margin-top: 6px; }
/* The count is how a captain learns an upload landed here. It is the
   only thing in the sidebar that changes on its own, so it is allowed
   to be the one thing that draws the eye. */
.appshell-hist-badge {
  flex: 0 0 auto; margin-left: auto;
  min-width: 18px; padding: 0 6px; border-radius: 9px;
  font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center;
  background: rgba(253,161,0,.14); color: var(--ymh-orange);
}
.appshell-spacer { flex: 1 1 auto; min-height: 8px; }
.appshell-apps { display: flex; flex-direction: column; gap: 2px; }
.appshell-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--ymh-r-row);
  color: var(--ymh-muted-lighter); font-size: 12px; font-family: inherit;
  background: transparent; border: 0; cursor: pointer; text-align: left;
  width: 100%; text-decoration: none;
}
.appshell-nav-item:hover { background: rgba(255,255,255,.05); color: var(--neutral-white); }
.appshell-nav-item.active { background: rgba(253,161,0,.14); color: var(--ymh-orange); }
.appshell-nav-item svg { flex: 0 0 auto; }
.appshell-nav-item .lock { margin-left: auto; opacity: .6; }
.appshell-upgrade {
  background: var(--brand-ocean-depths); border: 1px solid rgba(191,204,222,.28);
  border-radius: var(--ymh-r-card); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.appshell-upgrade-tag {
  font-size: 9px; font-weight: 700; color: var(--ymh-muted-light);
  letter-spacing: .06em;
}
.appshell-upgrade-title {
  font-size: 13px; font-weight: 700; color: var(--ymh-orange);
  margin-top: 2px;
}
.appshell-upgrade-body {
  font-size: 11px; color: var(--ymh-muted-lighter); line-height: 1.45;
  margin: 4px 0 6px;
}
.appshell-upgrade-link {
  font-size: 11px; font-weight: 700; color: var(--ymh-orange);
  text-decoration: none;
}
.appshell-upgrade-link:hover { text-decoration: underline; }
.appshell-logout {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--ymh-r-row);
  color: var(--ymh-muted-lighter); font-size: 12px; font-family: inherit;
  background: transparent; border: 0; cursor: pointer;
}
/* 2026-08-20 · "the log out button is gone".
 *
 * It was not gone, it was 31px below the fold. The 2026-08-17 fix made the
 * sidebar scroll so nothing would be unreachable, and that is true but weak:
 * it only helps if the captain realises the sidebar scrolls, and Log out is
 * the LAST child, so it is always the one that falls off. On a 706px
 * viewport it measured top:702 in a container that scrolls all of 43px.
 *
 * Sticky to the bottom of the scroll container instead. It stays put at
 * either end of the scroll, it keeps its own opaque ground so the list
 * passes behind it rather than through it, and margin-top:auto holds it at
 * the bottom when the content is short enough not to scroll at all.
 *
 * Verified on a signed-in /app at 706px: 658-694 at scrollTop 0 and at
 * scrollTop max, hit-testing to .appshell-logout in both. */
.appshell-sidebar > .appshell-logout {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  flex-shrink: 0;
  background: var(--ymh-sidebar);
  border-top: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 -10px 18px -6px var(--ymh-sidebar);
}
/* With the scroll wrapper in place the footer needs no sticky tricks:
   it sits in normal flow below the scroll region and is always visible.
   Sticky plus bottom 0 inside a non scrolling parent would still hover
   the button over the wrapper's last rows, so switch it off. */
.appshell-sidebar:has(> .appshell-scroll) > .appshell-logout {
  position: static;
  margin-top: 0;
}
.appshell-logout:hover { background: rgba(255,255,255,.05); color: var(--neutral-white); }
/* ── TOPBAR: spec 0599c moved every bar rule (bar, title, crumb, help,
   badge, Upgrade, bell, menu) into app-shell.css. None live here. ── */

/* ── MAIN CONTENT AREA (left column, only scrollable region) ── */
.appshell-main {
  grid-column: 1; grid-row: 2;
  min-width: 0; padding: 22px 24px;
  overflow-y: auto;
}

/* ── RIGHT RAIL (fixed 352px on wide desktop, scrolls internally) ── */
.appshell-rail {
  grid-column: 2; grid-row: 2;
  background: var(--ymh-panel); border-left: 1px solid var(--ymh-line);
  padding: 14px 16px; min-width: 0;
  display: flex; flex-direction: column; gap: 10px;
  /* 2026-08-17 fix: was overflow:hidden — but at typical laptop
     viewport heights, rail content (vessel card + profile completeness
     + NEXT 3 DUE + QUICK ACTIONS + UNLOCK + Save with Google) is TALLER
     than calc(100vh - 64px). Bottom CTA was clipped. Now scrolls within
     the rail so every item stays reachable. */
  overflow-y: auto;
  position: sticky; top: 64px; height: calc(100vh - 64px);
}
/* Rail children get min-height:0 so shrinking works. The photo card and the
   bottom Focus-care/Unlock CTA stay pinned. Middle sections (Next 3 Due,
   Quick Actions, etc.) are flex columns whose section header stays put
   and whose list inside can scroll if there are more items than fit. */
.appshell-rail > * { min-height: 0; }
/* .rail-inspection joins the pinned set. It is a small fixed card, not
   a scrollable section, so shrinking it has nowhere to give: the rail
   simply cut the "Run weekly walk" button in half. The rail scrolls
   (overflow-y above), so refusing to shrink costs nothing. Same defect
   the hero photo card had, one tile later. */
.appshell-rail > .rail-photo,
.appshell-rail > .rail-inspection,
.appshell-rail > .rail-focus-care { flex-shrink: 0; }
.appshell-rail > div:not(.rail-photo):not(.rail-inspection):not(.rail-focus-care) {
  flex-shrink: 1;
  display: flex; flex-direction: column;
  min-height: 0;
}
.appshell-rail > div:not(.rail-photo):not(.rail-focus-care) > .rail-section-head,
.appshell-rail > div:not(.rail-photo):not(.rail-focus-care) > .oemd-warranty-head {
  flex: 0 0 auto;
}
.appshell-rail > div:not(.rail-photo):not(.rail-focus-care) > .oemd-warranty-foot {
  flex: 0 0 auto;
}
.appshell-rail > div:not(.rail-photo):not(.rail-focus-care) > .rail-section-list,
.appshell-rail > div:not(.rail-photo):not(.rail-focus-care) > .oemd-warranty-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  /* Slim scrollbar so 'a little scroll' reads as scroll, not chrome. */
  scrollbar-width: thin;
  scrollbar-color: rgba(191,204,222,.55) transparent;
}
.appshell-rail > div:not(.rail-photo):not(.rail-focus-care) > .rail-section-list::-webkit-scrollbar,
.appshell-rail > div:not(.rail-photo):not(.rail-focus-care) > .oemd-warranty-list::-webkit-scrollbar {
  width: 6px;
}
.appshell-rail > div:not(.rail-photo):not(.rail-focus-care) > .rail-section-list::-webkit-scrollbar-thumb,
.appshell-rail > div:not(.rail-photo):not(.rail-focus-care) > .oemd-warranty-list::-webkit-scrollbar-thumb {
  background: rgba(191,204,222,.55); border-radius: 999px;
}
/* Rail children were letting their content paint outside the flex box
 * when vertical space got tight (warranty rows leaking into NEXT 3 DUE,
 * QUICK ACTIONS title landing on top of the warranty foot). Clip each
 * section to its allocated flex box so overflow scrolls the list inside
 * instead of colliding with the next section. */
.appshell-rail > div:not(.rail-photo):not(.rail-focus-care) {
  overflow: hidden;
}

/* Boat photo hero card at the top of the right rail */
.rail-photo {
  height: 128px; flex: 0 0 auto; border-radius: var(--ymh-r-card);
  background: linear-gradient(135deg, var(--brand-ocean-depths) 0%, var(--brand-ocean-depths) 100%);
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 12px 14px;
}
.rail-photo-badge {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--ymh-r-pill);
  /* Spec 0185: an 18% green wash over the photo's bright sky made the
     text unreadable. Solid ink backing (the palette's own #0b1e33),
     same green text; contrast repair, not a palette change. */
  background: rgba(11,30,51,.66); color: var(--functional-success);
  font-size: 9px; font-weight: 700; letter-spacing: .06em;
}
.rail-photo-avatar {
  position: absolute; top: 10px; left: 10px;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--ymh-orange); color: var(--ymh-ink-2);
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
}
.rail-photo-avatar svg { display: block; }
.rail-photo-hrs {
  position: absolute; top: 40px; right: 10px;
  padding: 3px 10px; border-radius: var(--ymh-r-pill);
  background: rgba(255,255,255,.14); color: var(--neutral-white);
  font-size: 10px; font-weight: 600;
}
.rail-vessel-name {
  color: var(--neutral-white); font-weight: 700; font-size: 16px; line-height: 1.2;
}
.rail-vessel-meta {
  color: var(--ymh-muted-lighter); font-size: 11px; margin-top: 2px;
}
.rail-photo-inner {
  display: flex; flex-direction: column; gap: 2px; width: 100%;
}

/* Reused inside rail: NEXT 3 DUE, QUICK ACTIONS sections */
.rail-section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.rail-section-title {
  font-size: 10.5px; font-weight: 700; color: var(--ymh-muted);
  letter-spacing: .08em; text-transform: uppercase;
}
.rail-section-list { display: flex; flex-direction: column; gap: 4px; }
.rail-list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 10px; border-radius: var(--ymh-r-row);
  background: var(--ymh-row-hover);
}
.rail-list-row .dot {
  width: 8px; height: 8px; border-radius: 999px; background: var(--ymh-orange);
  flex: 0 0 auto;
}
.rail-list-row .dot.blue { background: var(--ymh-info); }
.rail-list-row .body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rail-list-row .t { font-size: 12px; font-weight: 600; color: var(--ymh-ink); line-height: 1.3; }
.rail-list-row .m { font-size: 10px; color: var(--ymh-muted); }
.rail-qa-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px; border-radius: var(--ymh-r-pill);
  background: var(--ymh-panel); border: 1px solid var(--ymh-line);
  color: var(--ymh-ink); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; text-align: left;
  width: 100%;
}
.rail-qa-row:hover { border-color: var(--ymh-orange); }
.rail-qa-row svg { flex: 0 0 auto; }
.rail-qa-row .arrow { margin-left: auto; color: var(--ymh-muted); }
.rail-focus-care {
  margin-top: auto;
  background: linear-gradient(135deg, var(--brand-ocean-depths) 0%, var(--brand-ocean-depths) 100%);
  border-radius: var(--ymh-r-card); padding: 10px 14px;
  color: var(--neutral-white);
}
.rail-focus-care .tag {
  font-size: 9px; font-weight: 700; color: var(--ymh-orange);
  letter-spacing: .08em; margin-bottom: 4px;
}
.rail-focus-care .title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.rail-focus-care .body {
  font-size: 10.5px; color: var(--ymh-muted-lighter); line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.rail-focus-care .cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: var(--ymh-r-pill);
  background: var(--ymh-orange); color: var(--ymh-ink-2);
  font-size: 11.5px; font-weight: 700; text-decoration: none;
  border: 0; cursor: pointer; font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════════
 * Spec 0180 (2026-08-17): full responsive pass across 4 breakpoints.
 *
 * Prior state: sidebar+rail turned on at 1024, giving main only 384px
 * at 1024 viewport (256 + 384 + 352 + gaps = 992). Captains on 13"
 * laptops saw tiles overflow, cards clipped, "elements hide" complaint.
 *
 * New band map:
 *   ≥1440  : sidebar 256 + main 1fr + rail 352    (comfortable)
 *   1280-1439: sidebar 256 + main 1fr + rail 300  (rail narrower)
 *   1024-1279: sidebar 256 + main 1fr + rail 280  (rail even narrower)
 *   768-1023 : sidebar drawer, main 1fr, rail STACKS BELOW main (was hidden)
 *   ≤767     : full mobile pass (spec 0132, unchanged)
 *
 * Rationale: at 1024 laptop viewport, main now gets 1024-256-280-16
 * = 472px minimum. Rail content still accessible on the same viewport
 * (no toggle needed) — just narrower. Tablet band gets full-width main
 * with rail as a below-fold section instead of a hidden feature.
 * ═══════════════════════════════════════════════════════════════ */

/* Desktop ≥ 1024px: sidebar is persistent (256px column), no drawer,
   burger hidden. Reclaims 300px of always-visible nav real estate so
   Projects / Equipment / Documents / Warranty / Focus Care / Settings
   are one click away. Under 1024px the drawer pattern still applies. */
@media (min-width: 1024px) {
  .appshell {
    /* Spec 0180: rail width scales down at narrower desktops (see
       ≥1280 override below); at 1024-1279 it's 280 to keep main >= 470px. */
    grid-template-columns: 256px minmax(0, 1fr) 280px;
  }
  .appshell:has(.appshell-app) {
    grid-template-columns: 256px minmax(0, 1fr);
  }
  .appshell-sidebar {
    position: sticky;
    top: 0; left: auto;
    height: 100vh;
    width: auto;
    grid-column: 1; grid-row: 1 / span 2;
    transform: none;
    box-shadow: none;
    z-index: 5;
    transition: none;
  }
  .appshell-main   { grid-column: 2; }
  .appshell-rail   { grid-column: 3; }
  /* Drawer-open state on desktop is a no-op: sidebar is already visible,
     and there's no scrim. */
  body.appshell-drawer-open .appshell-sidebar { box-shadow: none; }
  body.appshell-drawer-open .appshell-scrim   { display: none; }
  body.appshell-drawer-open                   { overflow: auto; }
}

/* Spec 0180: 1280-1439 band gives rail a bit more room (300px). */
@media (min-width: 1280px) {
  .appshell {
    grid-template-columns: 256px minmax(0, 1fr) 300px;
  }
}

/* Spec 0180: 1440+ (typical external monitor) rail returns to full 352. */
@media (min-width: 1440px) {
  .appshell {
    grid-template-columns: 256px minmax(0, 1fr) 352px;
  }
}

/* Spec 0180: tablet band (768-1023). Sidebar is drawer. Rail STACKS
   below main content instead of hiding (was display:none pre-0180).
   Captain still sees vessel details on the same viewport; scrolls to
   reach them. */
@media (max-width: 1023px) and (min-width: 768px) {
  .appshell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 64px auto auto;
  }
  .appshell-main   { grid-column: 1; grid-row: 2; }
  .appshell-rail {
    grid-column: 1; grid-row: 3;
    display: block;
    padding: 8px 16px 24px;
    background: var(--ymh-bg);
    border-top: 1px solid var(--ymh-line);
    max-width: 100%;
  }
}

/* Mobile: drop the right rail and tighten padding. The sidebar is an
   overlay drawer below 1024px so nothing else needs to shift.
   (Spec 0132 mobile pass at ≤767.98px handles the deeper mobile work
   including stacking the rail — keeping this fallback for the
   double-breakpoint band 640-767 as belt-and-suspenders.) */
@media (max-width: 767.98px) {
  .appshell { grid-template-columns: minmax(0, 1fr); }
  /* Declaring one column is not enough on its own. The base rule at
     .appshell-rail sets `grid-column: 2; grid-row: 2`, and that is
     overridden at >=1024 (to column 3) and in the 768-1023 band (to
     column 1, row 3) but NOWHERE below 768. So the rail kept asking for a
     second column, the grid created an implicit track to hold it, and the
     single 1fr column above became the leftover: measured at 390px, main
     rendered 61px wide against a 329px rail, with the welcome heading
     wrapping one word per line. /focus was unusable on a phone.

     /app does not show this because app-shell-mobile.css collapses the
     grid and hides the rail on phones, and no focus page loads that
     stylesheet. Rather than pull in a file built for another surface,
     stack the rail here the same way the tablet band already does.

     Scoped to the Focus surface; anything else with a rail and without
     app-shell-mobile.css has the same fault and is not mine to change. */
  body[data-shell-brand="focus"] .appshell {
    grid-template-rows: 64px auto auto;
  }
  body[data-shell-brand="focus"] .appshell-main { grid-column: 1; grid-row: 2; }
  body[data-shell-brand="focus"] .appshell-rail {
    grid-column: 1; grid-row: 3;
    display: block;
    max-width: 100%;
    padding: 8px 16px 24px;
    background: var(--ymh-bg);
    border-left: 0;
    border-top: 1px solid var(--ymh-line);
    /* The desktop rail is a fixed-height scrollport. Stacked, it is just
       content in the page and must grow, or it becomes a second scroller
       inside the one the thread already owns. */
    height: auto;
    max-height: none;
    overflow: visible;
    position: static;
  }
}
@media (max-width: 640px) {
  .appshell-main { padding: 16px 14px; }
  .appshell-sidebar { width: 86vw; max-width: 320px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   AI CHAT SURFACE, "ambient glass + gradient" (only the conversation
   scrolls; everything else is fixed). Applies to /focus and /try where
   .appshell-main contains .oemd-chat.oemd-chat-hero.
   ═══════════════════════════════════════════════════════════════════════ */

/* When the main column holds the chat hero, lock its scroll and stack the
   hero-block (welcome + tiles) on top of the chat pane. The chat pane's
   internal .eng-thread is the only scrollable region. */
.appshell-main:has(> .oemd-chat-hero) {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  position: relative;
}
/* Hero block above the chat, welcome heading + tiles + panels. Collapses
   to zero height once the first message fires (body.eng-chatting) so the
   chat takes over the whole surface. Also collapses when a tile is picked
   (body.oemd-hero-collapsed, wired below). */
.oemd-hero-block {
  flex: 0 0 auto;
  overflow-y: auto;
  padding: 22px 24px 8px;
  transition: max-height .28s ease, opacity .18s ease, padding .28s ease;
  max-height: 60vh;
  opacity: 1;
}
body.eng-chatting .oemd-hero-block,
body.oemd-hero-collapsed .oemd-hero-block {
  max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0;
  pointer-events: none; overflow: hidden;
}

/* Chat pane, ambient gradient bg so the surface feels lifted. Grid:
   messages on top (flex-grows), input dock pinned at bottom. */
.oemd-chat-hero {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  /* Round 12 (2026-08-19). Was `1fr auto auto` — three declared rows for
   * FOUR children (.eng-thread, .oemd-mode-row, .eng-input-wrap and
   * p.eng-disclaimer). The disclaimer landed in an implicit row, and with
   * align-content resolving to stretch the leftover height was shared out
   * across the tracks instead of going to the 1fr: measured on a 430px
   * phone in the chatting state the tracks came back as
   * 149.5 / 181.5 / 197.5 / 169.4, so the composer rendered 189.5px tall
   * around 42px of content, the mode pills 169.5px tall, and the thread
   * was squeezed to 149.5px.
   *
   * Declaring only the growing row and letting every later row size to
   * its content fixes it without hard-coding the child count, which JS
   * changes. Measured after: thread 538, mode row 44, pill 40,
   * composer 60, disclaimer 32. */
  grid-template-rows: minmax(0, 1fr);
  grid-auto-rows: auto;
  /* Round 12 · M-19. Columns were never declared, so the single implicit
   * column was `auto` — which carries an automatic MINIMUM, exactly like
   * the `1fr` that caused M-01 on .appshell. The track could not shrink
   * below the min-content of its widest item, so at 320px .eng-thread and
   * .eng-input-wrap rendered 349px inside a 292px parent and the composer
   * ran 47px off the screen. Declaring the column with a zero floor lets
   * it follow the container. */
  grid-template-columns: minmax(0, 1fr);
  padding: 20px 24px 24px;
  gap: 10px;
  position: relative;
  /* No decorative glows. Low-alpha radials over a large cream field only
     have a few RGB levels to step through, so they render as concentric
     rings, an airbrush artifact, not an accent. Flat ground reads calmer
     and more current. */
  background: var(--ymh-bg);
}
/* Messages column, grows; only region that scrolls. */
.oemd-chat-hero .eng-thread {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 6px 4px 12px;
  display: flex; flex-direction: column; gap: 24px;
  scroll-behavior: smooth;
  /* The rail sheet already hides its own bar (passport.css). A permanent
     grey track down the side of the answers is the loudest thing on the
     surface and it is furniture, not content. */
  scrollbar-width: none;
  /* Fade the top edge so scrolled-off messages slip away instead of hard
     cut. Only visible once content overflows. */
  mask-image: linear-gradient(to bottom, transparent 0, var(--brand-ocean-depths) 24px, var(--brand-ocean-depths) 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, var(--brand-ocean-depths) 24px, var(--brand-ocean-depths) 100%);
}
.oemd-chat-hero .eng-thread::-webkit-scrollbar { width: 0; height: 0; }
.oemd-chat-hero .eng-thread > *:first-child { margin-top: 0; } /* top-anchored, see engineer.css */

/* Empty-thread state: no centerpiece, the hero tiles above already
   answer "what can I ask." Keeping empty::before/after removed so the
   layout collapses cleanly into the input row (matches app chat). */

/* ── Messages: no avatars, either side ── */
/* Claude, ChatGPT and Grok all dropped in-thread avatars: the reply is
   plain text at full column width, the user's words are a right-aligned
   bubble, and alignment alone carries the role. The diamond and disc
   that used to sit here were the last avatars in the product. */
.oemd-chat-hero .eng-msg-wrap {
  display: grid; grid-template-columns: 1fr;
  align-self: stretch; max-width: 780px; width: 100%;
  margin: 0 auto;
  align-items: flex-start;
}
.oemd-chat-hero .eng-msg-wrap::before { content: none; }
/* The assistant does not speak in a bubble. A card around every answer
   makes a two-paragraph troubleshooting reply read like a chat sticker;
   stripping the chrome lets the text set its own measure and gives the
   reader a normal reading column. Role is carried by the avatar and the
   left offset, which is all it ever needed to carry. */
.oemd-chat-hero .eng-msg {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 1px 0 0;
  line-height: 1.7; font-size: 15.5px;
  color: var(--ymh-ink);
  box-shadow: none;
  /* pre-wrap was correct while this surface rendered escaped plain text,
     because markdown-it never loaded here. Now that it does, pre-wrap
     would preserve the newlines BETWEEN block elements as literal blank
     lines, doubling every paragraph gap. The user's own message keeps it
     below, since that is still plain text. */
  animation: engFadeIn .28s cubic-bezier(.2,.9,.3,1.05) both;
  /* 68ch is the comfortable measure; the 780px wrap caps it on wide screens. */
  max-width: 68ch;
}
.oemd-chat-hero .eng-msg.user { white-space: pre-wrap; }
/* Rendered markdown needs block spacing that plain text never did.
   Mirrors engineer.css:119-139, retuned for this surface's 1.7 line-height
   and light ground rather than /engineer's dark one. */
.oemd-chat-hero .eng-msg.bot p { margin: 0 0 .85em; }
.oemd-chat-hero .eng-msg.bot p:last-child { margin-bottom: 0; }
.oemd-chat-hero .eng-msg.bot ul,
.oemd-chat-hero .eng-msg.bot ol { margin: .5em 0 .85em; padding-left: 1.4em; }
.oemd-chat-hero .eng-msg.bot li { margin: .25em 0; }
.oemd-chat-hero .eng-msg.bot li::marker { color: var(--ymh-muted); }
.oemd-chat-hero .eng-msg.bot strong { font-weight: 700; color: var(--ymh-ink); }
.oemd-chat-hero .eng-msg.bot em { font-style: italic; }
.oemd-chat-hero .eng-msg.bot h1,
.oemd-chat-hero .eng-msg.bot h2,
.oemd-chat-hero .eng-msg.bot h3 {
  font-size: 1em; font-weight: 700; margin: 1.1em 0 .4em; line-height: 1.35;
}
.oemd-chat-hero .eng-msg.bot h1:first-child,
.oemd-chat-hero .eng-msg.bot h2:first-child,
.oemd-chat-hero .eng-msg.bot h3:first-child { margin-top: 0; }
.oemd-chat-hero .eng-msg.bot code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em; background: var(--ymh-chip-bg); padding: .1em .35em; border-radius: 4px;
}
.oemd-chat-hero .eng-msg.bot pre {
  margin: .6em 0; padding: 10px 12px; background: var(--ymh-chip-bg);
  border-radius: 8px; overflow-x: auto;
}
.oemd-chat-hero .eng-msg.bot pre code { background: transparent; padding: 0; }
.oemd-chat-hero .eng-msg.bot a { color: var(--ymh-link); text-underline-offset: 2px; }
/* The user's own words stay in a bubble, that is the one place the shape
   earns its keep. But a full-saturation gradient plus a coloured glow on
   every line the owner types is the loudest thing on the page, and it is
   the least important. Tint it instead: same brand hue, a tenth of the
   volume. */
.oemd-chat-hero .eng-msg-wrap.user .eng-msg {
  /* Neutral, like every current chat product: a quiet surface bubble.
     Brand orange on every typed line made the least important text on
     the page the loudest. */
  background: var(--ymh-panel);
  color: var(--ymh-ink);
  border: 0;
  border-radius: 18px;
  padding: 10px 16px;
  box-shadow: 0 1px 3px rgba(11,20,32,.06);
  justify-self: end;
  max-width: 82%;
}
/* Streaming cursor, added by engineer.js as content lands, removed on
   completion. Also renders visually on any .streaming bot msg. */
.oemd-chat-hero .eng-msg.streaming::after {
  content: "▍";
  display: inline-block; margin-left: 3px;
  color: var(--brand-mariner-blue);
  animation: aiCursor 1s steps(2) infinite;
  font-weight: 700;
}
@keyframes aiCursor { 50% { opacity: 0; } }

/* ── Demo prompt rail ────────────────────────────────────────────────
 * One tap sends a complete question. Sits above the mode chips, which
 * stay as they are.
 *
 * 44px minimum height, deliberately, because this is the control that
 * gets tapped on a tablet in front of someone. Most of this surface sits
 * under that floor (the floor lives in app-shell-mobile.css, which no
 * focus page loads); this is not the place to inherit that.
 *
 * Scrolls horizontally rather than wrapping: a rail that reflows to two
 * rows on a narrow screen pushes the composer down and moves the target
 * between taps. Scroll-snap and a fade on the right edge signal there is
 * more without needing a scrollbar. */
.oemd-demo-rail {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
  /* Fade the right edge so a half-visible chip reads as "more", not as
     a clipped one. */
  -webkit-mask-image: linear-gradient(90deg, var(--brand-ocean-depths) calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(90deg, var(--brand-ocean-depths) calc(100% - 28px), transparent 100%);
}
.oemd-demo-rail::-webkit-scrollbar { display: none; }
/* Spec 0182: at iPad landscape and up, all six chips fit in two rows,
   so show them. "Draft the outreach" is the second half of the warranty
   walk and was sitting off screen at rest at 1194px, reachable only by
   a swipe nobody knows to make. Below 1024px the scrolling rail with
   its edge fade is unchanged; there the half visible chip does its job.
   Landing state only (body not .eng-chatting): once a conversation is
   active the second row costs the thread exactly the height that put
   the survey card's commit button 24px under the fold on an iPad
   (caught by 37-focus-cannes-readiness), so mid chat the rail returns
   to the single scrolling row and the thread keeps its space. */
@media (min-width: 1024px) {
  body:not(.eng-chatting) .oemd-demo-rail {
    flex-wrap: wrap;
    overflow-x: visible;
    -webkit-mask-image: none;
            mask-image: none;
  }
}
.oemd-demo-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--ymh-line);
  background: var(--ymh-panel);
  color: var(--ymh-ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: background .14s ease, border-color .14s ease, transform .06s ease;
}
/* The warranty questions are the ones worth reaching for, so they read as
   the primary pair rather than as three identical greys. */
.oemd-demo-chip.warranty {
  border-color: color-mix(in srgb, var(--ymh-orange) 45%, var(--ymh-line));
  background: var(--ymh-peach, var(--functional-notice-warm));
}
.oemd-demo-chip:hover { border-color: var(--ymh-orange); }
/* A press state, because on a touch device there is no hover to confirm
   the tap landed and the answer takes a moment to arrive. */
.oemd-demo-chip:active { transform: scale(.97); background: var(--ymh-row-hover, var(--neutral-subtle)); }
.oemd-demo-chip:focus-visible { outline: 2px solid var(--ymh-link); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .oemd-demo-chip { transition: none; }
  .oemd-demo-chip:active { transform: none; }
}

/* ── Demo action cards ───────────────────────────────────────────────
 * The card the chat offers after an answer, and the committed state it
 * becomes. Scoped to the Focus surface: nothing else renders these. */
body[data-shell-brand="focus"] .fda-card {
  border: 1px solid var(--ymh-line);
  border-left: 3px solid var(--ymh-orange);
  border-radius: 12px;
  background: var(--ymh-panel);
  padding: 14px 16px;
  max-width: 68ch;
}
body[data-shell-brand="focus"] .fda-head {
  display: flex; align-items: center; gap: 9px; margin-bottom: 10px;
  font-size: 14.5px; line-height: 1.3;
}
body[data-shell-brand="focus"] .fda-badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: .09em;
  padding: 3px 7px; border-radius: 5px;
  background: var(--ymh-peach, var(--functional-notice-warm)); color: var(--ymh-orange-ink, var(--functional-warning-strong));
  white-space: nowrap;
}
body[data-shell-brand="focus"] .fda-badge-done { background: var(--functional-success-a12); color: var(--functional-success-strong); }
body[data-shell-brand="focus"] .fda-rows { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
body[data-shell-brand="focus"] .fda-row { display: flex; gap: 10px; font-size: 13.5px; }
body[data-shell-brand="focus"] .fda-k { color: var(--ymh-muted); min-width: 82px; flex: 0 0 auto; }
body[data-shell-brand="focus"] .fda-v { color: var(--ymh-ink); }
body[data-shell-brand="focus"] .fda-actions { display: flex; gap: 8px; }
/* 44px, because this is a control a presenter taps on a tablet. */
body[data-shell-brand="focus"] .fda-go,
body[data-shell-brand="focus"] .fda-skip {
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center;
}
body[data-shell-brand="focus"] .fda-go { background: var(--ymh-orange); color: var(--brand-ocean-depths); border: 0; }
body[data-shell-brand="focus"] .fda-skip { background: transparent; color: var(--ymh-muted); border: 1px solid var(--ymh-line); }
body[data-shell-brand="focus"] .fda-go:active { transform: scale(.98); }
body[data-shell-brand="focus"] .fda-done { border-left-color: var(--functional-success-strong); }
body[data-shell-brand="focus"] .fda-note { font-size: 13.5px; color: var(--ymh-ink-2, var(--ymh-muted)); }
body[data-shell-brand="focus"] .fda-note a { color: var(--ymh-link); font-weight: 700; }

/* The documentation survey. Three questions, tap to answer. */
body[data-shell-brand="focus"] .fds-lead { font-size: 13px; color: var(--ymh-muted); margin-bottom: 10px; }
body[data-shell-brand="focus"] .fds-q { margin-bottom: 10px; }
body[data-shell-brand="focus"] .fds-qt {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--ymh-ink); margin-bottom: 6px;
}
body[data-shell-brand="focus"] .fds-n {
  width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto;
  background: var(--ymh-chip-bg); color: var(--ymh-muted);
  font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
/* The owner's own words. Deliberately roomier than a form field: the
   size of a box tells someone how much they are expected to write. */
body[data-shell-brand="focus"] .fds-notes {
  width: 100%; padding: 11px 12px; margin-top: 2px;
  border: 1px solid var(--ymh-line); border-radius: 10px;
  background: var(--ymh-bg); color: var(--ymh-ink);
  font: inherit; font-size: 13.5px; line-height: 1.6; resize: vertical; min-height: 76px;
}
body[data-shell-brand="focus"] .fds-notes { min-height: 54px; }
body[data-shell-brand="focus"] .fds-summary .fds-done-a { font-weight: 600; color: var(--ymh-ink); }
body[data-shell-brand="focus"] .fds-card .fds-free { margin-bottom: 4px; }
body[data-shell-brand="focus"] .fds-notes:focus { outline: 2px solid var(--ymh-link); outline-offset: 1px; }
body[data-shell-brand="focus"] .fds-notes::placeholder { color: var(--ymh-muted); }
body[data-shell-brand="focus"] .fds-free .fds-n { background: var(--ymh-peach, var(--functional-notice-warm)); color: var(--ymh-orange-ink, var(--functional-warning-strong)); }
/* Answered questions collapse to one line each, so the report visibly
   builds as the owner answers rather than sitting there as a form. */
body[data-shell-brand="focus"] .fds-done-list { margin-bottom: 12px; }
body[data-shell-brand="focus"] .fds-done-row {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13px; padding: 4px 0; color: var(--ymh-muted);
}
body[data-shell-brand="focus"] .fds-tick { color: var(--functional-success-strong); font-weight: 800; flex: 0 0 auto; }
body[data-shell-brand="focus"] .fds-done-q { flex: 1 1 auto; min-width: 0; }
body[data-shell-brand="focus"] .fds-done-a { color: var(--ymh-ink); font-weight: 700; flex: 0 0 auto; }
body[data-shell-brand="focus"] .fds-opts { display: flex; flex-wrap: wrap; gap: 7px; }
/* 44px, like every other control a presenter taps on a tablet. */
body[data-shell-brand="focus"] .fds-opt {
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--ymh-line); background: var(--ymh-panel);
  color: var(--ymh-ink); font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center;
  transition: background .12s ease, border-color .12s ease;
}
body[data-shell-brand="focus"] .fds-opt:hover { border-color: var(--ymh-orange); }
/* The chosen answer has to be unmistakable across a stand, so it changes
   ground and weight rather than only its border. */
body[data-shell-brand="focus"] .fds-opt.sel {
  background: var(--ymh-ink); color: var(--neutral-white); border-color: var(--ymh-ink); font-weight: 700;
}
body[data-shell-brand="focus"] .fds-opt:focus-visible { outline: 2px solid var(--ymh-link); outline-offset: 2px; }
body[data-shell-brand="focus"] .fda-go[disabled] { opacity: .45; cursor: default; }
@media (prefers-reduced-motion: reduce) {
  body[data-shell-brand="focus"] .fds-opt { transition: none; }
}

/* The outreach composer. Reads as a message being written, not as a form. */
body[data-shell-brand="focus"] .fda-mail .fda-f {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--ymh-line); padding: 7px 0;
}
body[data-shell-brand="focus"] .fda-mail .fda-f span {
  font-size: 11.5px; color: var(--ymh-muted); min-width: 54px; flex: 0 0 auto;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
}
body[data-shell-brand="focus"] .fda-mail .fda-f input {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent;
  font: inherit; font-size: 14px; color: var(--ymh-ink); padding: 4px 0;
}
body[data-shell-brand="focus"] .fda-mail .fda-f input:focus { outline: none; }
body[data-shell-brand="focus"] .fda-mail textarea.fda-body {
  width: 100%; margin: 12px 0; padding: 12px;
  border: 1px solid var(--ymh-line); border-radius: 10px;
  background: var(--ymh-bg); color: var(--ymh-ink);
  font: inherit; font-size: 13.5px; line-height: 1.65;
  resize: vertical; min-height: 190px;
}
body[data-shell-brand="focus"] .fda-mail textarea.fda-body:focus {
  outline: 2px solid var(--ymh-link); outline-offset: 1px;
}
body[data-shell-brand="focus"] .fda-copy {
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center;
  background: transparent; color: var(--ymh-ink); border: 1px solid var(--ymh-line);
}

/* Rows the chat added, on the pages that own those records. */
body[data-shell-brand="focus"] .fdr-chip {
  font-size: 9.5px; font-weight: 800; letter-spacing: .08em;
  padding: 3px 7px; border-radius: 5px; background: var(--functional-success-a12); color: var(--functional-success-strong);
}
body[data-shell-brand="focus"] .fdr-claims {
  border: 1px solid var(--ymh-line); border-radius: 12px;
  background: var(--ymh-panel); padding: 16px 18px; margin-bottom: 16px;
}
body[data-shell-brand="focus"] .fdr-claims h3 { margin: 0 0 10px; font-size: 15px; }
body[data-shell-brand="focus"] .fdr-claim { border-top: 1px solid var(--ymh-line); padding: 10px 0 2px; }
body[data-shell-brand="focus"] .fdr-claim:first-of-type { border-top: 0; padding-top: 0; }
body[data-shell-brand="focus"] .fdr-claim-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; font-size: 13px; }
body[data-shell-brand="focus"] .fdr-claim-item { font-size: 14px; font-weight: 600; color: var(--ymh-ink); }
body[data-shell-brand="focus"] .fdr-claim-note { font-size: 12.5px; color: var(--ymh-muted); margin-top: 2px; }

/* Thinking dots, refined: three orange dots pulsing in a pill. */
.oemd-chat-hero .eng-msg.typing {
  background: transparent;
  border: 0;
  padding: 6px 0;
  display: inline-flex; gap: 5px; align-items: center;
}
.oemd-chat-hero .eng-msg.typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ymh-orange);
  opacity: .35; margin: 0;
  animation: aiPulse 1.1s ease-in-out infinite;
}
.oemd-chat-hero .eng-msg.typing i:nth-child(2) { animation-delay: .12s; }
.oemd-chat-hero .eng-msg.typing i:nth-child(3) { animation-delay: .24s; }

/* The dots above have had nothing to style since spec 0105 G3 replaced them
   with a shimmer skeleton: addTyping() (engineer.js:1009) emits
   .eng-shimmer-line divs and no <i> at all. So on this surface the rules
   above match nothing, the lines fall through to engineer.css:109 whose
   gradient is rgba(255,255,255,...) built for the dark /engineer surface,
   and white-on-white renders as nothing. The container is inline-flex, so
   with zero visible children it collapses to zero height too.

   The result: between pressing send and the first token there was no
   feedback of any kind. On a good connection that is about three seconds.
   On conference wifi it is twelve or more, in front of an audience, and
   the app looks dead rather than busy. */
.oemd-chat-hero .eng-msg.typing.shimmer {
  display: block;
  width: min(68ch, 100%);
  padding: 4px 0 6px;
}
.oemd-chat-hero .eng-msg.typing .eng-shimmer { display: flex; flex-direction: column; gap: 9px; }
.oemd-chat-hero .eng-msg.typing .eng-shimmer-line {
  height: 11px;
  border-radius: 6px;
  /* Dark on light, the inverse of engineer.css, and tuned so the sweep is
     legible under glare on a tablet held at arm's length rather than a
     laptop screen at 60cm. */
  background: linear-gradient(90deg,
    rgba(11,20,32,.055) 0%,
    rgba(11,20,32,.13) 50%,
    rgba(11,20,32,.055) 100%);
  background-size: 200% 100%;
  animation: engShimmer 1.4s ease-in-out infinite;
}
.oemd-chat-hero .eng-msg.typing .eng-shimmer-line.long  { width: 96%; }
.oemd-chat-hero .eng-msg.typing .eng-shimmer-line.mid   { width: 88%; }
.oemd-chat-hero .eng-msg.typing .eng-shimmer-line.short { width: 62%; }
@media (prefers-reduced-motion: reduce) {
  .oemd-chat-hero .eng-msg.typing .eng-shimmer-line { animation: none; background-position: 50% 0; }
}
@keyframes aiPulse {
  0%, 60%, 100% { opacity: .35; transform: scale(.9); }
  30%           { opacity: 1;   transform: scale(1.15); }
}

/* ── Input dock, pinned bottom, backdrop-blur glass ── */
/* Chip row is hidden on the initial /focus + /try landing so tiles are the
   only intent picker. Once chat activates (body.eng-chatting) tiles
   collapse and the chip row appears as the compact switcher inside the
   input dock. Dedupes 'do I tap tile or chip?' during the first turn. */
.oemd-chat-hero .oemd-mode-row {
  display: none;
  max-width: 780px; width: 100%; margin: 0 auto;
  padding: 0 4px;
}
/* Skills-in-the-bar (2026-08-28) supersedes the spread chip row: the
   callable functions live behind the composer's Skills button now, so
   the row stays hidden even while chatting. One solid bar. */
body.eng-chatting .oemd-chat-hero .oemd-mode-row { display: none; }
/* Spec 0599 S4 (composer part, released by O3 2026-10-15) · Composer
   12:635: a white card on the line colour, 16 radius, the Card elevation
   at 2/4, text on top and the controls row under it (18 20 12, gap 14).
   Focus is the 2 px Mariner ring of 0599 section 5. */
.oemd-chat-hero .eng-input-wrap {
  max-width: 784px; width: 100%; margin: 0 auto;
  box-sizing: border-box;
  background: var(--neutral-surface);
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-lg, 16px);
  padding: 8px 8px 8px 20px;
  box-shadow: 0 2px 4px rgba(23, 28, 47, 0.06);
  transition: border-color .18s ease, box-shadow .18s ease;
}
/* The two row composer (app.html) is 12:635's own layout. A one row
   composer (/try) keeps its row padding and takes the same card. */
.oemd-chat-hero .eng-input-wrap-stacked { padding: 18px 20px 12px; gap: 14px; }
.oemd-chat-hero .eng-input-wrap:focus-within {
  border-color: var(--brand-mariner-blue);
  box-shadow: 0 0 0 1px var(--brand-mariner-blue), 0 2px 4px rgba(23, 28, 47, 0.06);
}
/* The field: App Body 13/20 (12:636). Phones keep 16 px so iOS does not
   zoom on focus (0599 L4); the line height stays 20 (composer check, 28 max). */
.oemd-chat-hero .eng-input { font-size: 13px; padding: 0; line-height: 20px; height: 20px; color: var(--text-primary); }
.oemd-chat-hero .eng-input::placeholder { color: var(--text-secondary); opacity: 1; }
@media (max-width: 767.98px) { .oemd-chat-hero .eng-input { font-size: 16px; } }
/* Send (12:653): the one orange action, flat, 40 round. */
.oemd-chat-hero .eng-send {
  position: relative;
  width: 40px; height: 40px;
  background: var(--brand-sunset-orange);
  color: var(--text-strong);
  box-shadow: none;
}
.oemd-chat-hero .eng-send:hover { filter: brightness(1.04); }
/* Attach (12:638): a quiet 34 px plus; Skills (12:642): the subtle pill
   with the sparkle at 14. Every control keeps a 44 px target. */
.oemd-chat-hero .eng-attach { position: relative; width: 34px; height: 34px; color: var(--text-secondary); }
.oemd-chat-hero .eng-attach svg { width: 18px; height: 18px; }
.oemd-chat-hero .eng-skills {
  position: relative;
  height: 38px; padding: 0 18px; gap: 6px;
  background: var(--neutral-subtle); color: var(--text-link);
  font-size: 13px; line-height: 18px;
}
.oemd-chat-hero .eng-skills svg { width: 14px; height: 14px; }
.oemd-chat-hero .eng-attach::after,
.oemd-chat-hero .eng-skills::after,
.oemd-chat-hero .eng-send::after { content: ""; position: absolute; inset: -5px; }
.oemd-chat-hero .eng-skills::after { inset: -3px 0; }
.oemd-chat-hero .eng-send::after { inset: -2px; }
.oemd-chat-hero .eng-controls { gap: 8px; }
/* The disclaimer (19:367): App Small 11.5/16 on one line, "How it works"
   at its end; on a narrow column the sentence wraps and the link keeps
   to the right (19:370, 213:14013). */
.oemd-chat-hero .eng-disclaimer {
  display: flex; align-items: center; justify-content: space-between; gap: 0 4px;
  font-size: 11.5px; line-height: 16px; color: var(--text-secondary);
}
.oemd-chat-hero .eng-disclaimer a { flex: none; font-weight: 400; color: var(--text-link); white-space: nowrap; }

/* Composer "+" attach (2026-08-28), the Claude-style leading control:
   a quiet round glyph, low-key until hover, opening the photo flow. */
.eng-attach {
  width: 38px; height: 38px; flex: none;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--ymh-muted, var(--text-secondary));
  cursor: pointer; display: grid; place-items: center;
  transition: background .16s ease, color .16s ease;
}
.eng-attach:hover { background: var(--ymh-row-hover, var(--neutral-subtle)); color: var(--ymh-ink, var(--text-primary)); }
.eng-attach:active { transform: scale(.94); }

/* Skills button — the single entry point to the callable functions,
   replacing the row of mode chips that used to spread across the top. */
.eng-skills {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 11px 0 9px;
  border: 0; border-radius: 999px;
  background: var(--ymh-row-hover, var(--neutral-subtle)); color: var(--ymh-ink, var(--text-primary));
  font-weight: 600; font-size: 12.5px; line-height: 1; cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.eng-skills:hover { background: var(--neutral-line); }
.eng-skills.open, .eng-skills.picked { background: var(--ymh-ink, var(--text-primary)); color: var(--neutral-white); }
.eng-skills-label { white-space: nowrap; }

/* Skills popover — floats above the composer, right-anchored to the
   Skills button. */
.eng-skills-menu {
  position: absolute; bottom: calc(100% + 10px); left: 0;
  width: min(320px, calc(100vw - 28px));
  background: var(--ymh-panel, var(--neutral-white));
  border: 1px solid var(--ymh-line, var(--neutral-line));
  border-radius: 16px;
  /* One tight, quiet shadow (owner, 2026-10-22): the old 60 px blur
     overlapped the composer's own and drew grey rings on the page. */
  box-shadow: var(--ymh-shadow-hover, 0 6px 16px 0 rgba(23,28,47,.10));
  padding: 6px; z-index: 80;
  display: flex; flex-direction: column; gap: 2px;
}
.eng-skills-menu[hidden] { display: none; }
.eng-skills-menu-head {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ymh-muted, var(--text-secondary)); padding: 8px 10px 4px;
}
.eng-skills-menu button {
  display: flex; align-items: center; gap: 11px; text-align: left;
  border: 0; background: none; border-radius: 10px; padding: 9px 10px; cursor: pointer;
  transition: background .14s ease;
}
.eng-skills-menu button:hover { background: var(--ymh-row-hover, var(--neutral-subtle)); }
.eng-skills-menu .sk-ico { flex: none; width: 22px; display: grid; place-items: center; color: var(--ymh-muted, var(--text-secondary)); }
.eng-skills-menu .sk-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.eng-skills-menu .sk-txt b { font-size: 13.5px; font-weight: 600; color: var(--ymh-ink, var(--text-primary)); }
.eng-skills-menu .sk-txt small { font-size: 11.5px; color: var(--ymh-muted, var(--text-secondary)); }

/* The composer is the positioning context for the popover. */
.eng-input-wrap { position: relative; }

/* Two-row composer (2026-08-28, the Claude layout): text on top, a
   controls row (+ · Skills · … · mic · send) beneath it. */
.eng-input-wrap-stacked {
  display: flex !important;
  flex-direction: column;
  /* !important: a more specific .oemd-chat .eng-input-wrap sets
     align-items:center, which in a column collapses the controls row to
     content width and centred it (+/send bunched). Stretch spans the row
     full width so + sits flush-left and send flush-right, Claude-style. */
  align-items: stretch !important;
  gap: 6px;
}
.eng-input-wrap-stacked .eng-controls { width: 100%; }
.eng-input-wrap-stacked .eng-input {
  width: 100%; flex: none;
}
.eng-controls {
  display: flex; align-items: center; gap: 8px;
}
.eng-controls-spacer { flex: 1 1 auto; }
/* Attach menu shares the skills-menu look. */
.eng-attach-menu {
  position: absolute; bottom: calc(100% + 10px); left: 0;
  width: min(300px, calc(100vw - 28px));
  background: var(--ymh-panel, var(--neutral-white));
  border: 1px solid var(--ymh-line, var(--neutral-line));
  border-radius: 16px;
  /* One tight, quiet shadow (owner, 2026-10-22): the old 60 px blur
     overlapped the composer's own and drew grey rings on the page. */
  box-shadow: var(--ymh-shadow-hover, 0 6px 16px 0 rgba(23,28,47,.10));
  padding: 6px; z-index: 80;
  display: flex; flex-direction: column; gap: 2px;
}
.eng-attach-menu[hidden] { display: none; }
.eng-attach-menu button {
  display: flex; align-items: center; gap: 11px; text-align: left;
  border: 0; background: none; border-radius: 10px; padding: 9px 10px; cursor: pointer;
  transition: background .14s ease;
}
.eng-attach-menu button:hover { background: var(--ymh-row-hover, var(--neutral-subtle)); }
.eng-attach-menu .sk-ico { flex: none; width: 22px; display: grid; place-items: center; color: var(--ymh-muted, var(--text-secondary)); }
.eng-attach-menu .sk-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.eng-attach-menu .sk-txt b { font-size: 13.5px; font-weight: 600; color: var(--ymh-ink, var(--text-primary)); }
.eng-attach-menu .sk-txt small { font-size: 11.5px; color: var(--ymh-muted, var(--text-secondary)); }
.eng-attach.open { background: var(--ymh-row-hover, var(--neutral-subtle)); color: var(--ymh-ink, var(--text-primary)); }

/* Right rail on chat pages also gets a fixed feel, its own scroll only.
   Already sticky with overflow-y auto; add a subtle top fade so items
   scroll cleanly under the topbar shadow. */
.appshell-main:has(> .oemd-chat-hero) ~ .appshell-rail {
  border-left: 1px solid var(--ymh-line);
}

@media (max-width: 640px) {
  .oemd-chat-hero { padding: 14px 12px 12px; }
  .oemd-chat-hero .eng-msg { font-size: 15px; line-height: 1.62; }
  .oemd-chat-hero .eng-thread { gap: 20px; }
  /* No track override here. These three lines used to read
   *   .eng-msg-wrap      { grid-template-columns: 24px 1fr }
   *   .eng-msg-wrap.user { grid-template-columns: 1fr 24px }
   *   .eng-msg-wrap::before { width: 22px; height: 22px }
   * which was correct while each message carried an avatar in a gutter.
   * The avatars went (see ::before { content: none } above), and grid
   * auto-placement puts the FIRST child in the FIRST track. The first
   * child is the reply, so every assistant answer was laid out inside
   * the 24px gutter, and `overflow-wrap: anywhere` in engineer.css — the
   * guard that stops long part numbers overflowing — broke each word to
   * fit. Two characters per line, on a phone, for every answer.
   *
   * Not "the wrapper has one child", which is what this note said first
   * and is wrong: engineer.js appends the feedback thumbs beside the
   * message on every reply that carries a messageId, so the broken state
   * measured at 390px was a 24px reply sliver AND a 326px feedback bar.
   * Only the reply being FIRST is load-bearing. The captain's own
   * messages were fine because their variant put the wide track first,
   * which is why this survived review.
   * The single-column rule outside this block is the whole layout now;
   * pinned by tests/unit/chat-visual.test.ts. */
  .oemd-chat-hero .eng-msg-wrap { gap: 8px; }
  .oemd-chat-hero .eng-msg-wrap.user .eng-msg { padding: 8px 13px; max-width: 88%; }
  /* 16px, not 14px: below 16px iOS Safari force-zooms the whole page on focus. */
  .oemd-chat-hero .eng-input { font-size: 16px; padding: 0; line-height: 1.5; }
  .oemd-hero-block { padding: 16px 14px 4px; }
}

/* ── One left edge for the whole column ──────────────────────────────
 *
 * Measured at 390px before this: the reply text sat at x=4, the chips at
 * x=8, and the first feedback glyph at x=16, because .eng-fb carries 4px
 * of its own padding and each .eng-fb-btn another 8-10px inside that.
 * Three left edges down one column, which is what "it doesn't line up"
 * looks like on a phone.
 *
 * The buttons keep their padding — it is the tap target, and shrinking
 * it to align the glyph would trade a real affordance for a visual one.
 * Instead the bar gives back exactly what the button adds, so the glyph
 * lands on the text's edge and the target keeps its size. Normalising
 * the button padding to a single value first is what makes that offset
 * exact whichever button happens to be first: the speak button is only
 * rendered when speechSynthesis exists, so without this the alignment
 * would differ by 2px between browsers.
 *
 * Spacing and alignment only. No palette. */
.oemd-chat-hero .eng-fb-btn { padding: 4px 8px; }
.oemd-chat-hero .eng-fb { padding-left: 0; margin-left: -8px; }
.oemd-chat-hero .oemd-mode-row { padding-left: 0; }
/* The disclaimer was the only centred thing in a left-aligned column. */
.oemd-chat-hero .eng-disclaimer { text-align: left; }

/* MOBILE (<= 900px): the 'only chat scrolls' desktop pattern gets in the
   way on a phone (users can't scroll to see the 5th + 6th tile, and the
   hero-block max-height clips content). Fall back to a normal page scroll
   on mobile: main is auto-height, hero-block has no cap, and the chat
   input dock sticks to the bottom of the viewport instead of the grid.  */
@media (max-width: 900px) {
  .appshell-main:has(> .oemd-chat-hero) {
    height: auto;
    min-height: calc(100vh - 64px);
    overflow: visible;
  }
  .oemd-hero-block {
    max-height: none;
    overflow: visible;
    padding: 16px 14px 8px;
  }
  .oemd-chat-hero {
    /* Round 12 (2026-08-19). Was `auto auto auto` — the same three-rows-
     * for-four-children mismatch as the base rule at :1282, and this one
     * wins below 900px, which is why the phone was the surface that showed
     * it. All-auto rows plus align-content resolving to stretch meant the
     * leftover height was shared across the tracks: composer 190px around
     * 42px of content, mode pills 170px tall, thread squeezed to 150px.
     * Same shape as the base rule now: one growing row, everything after
     * it sized to its own content, no dependence on the child count. */
    grid-template-rows: minmax(0, 1fr);
    grid-auto-rows: min-content;
    padding: 8px 12px 12px;
  }
  .oemd-chat-hero .eng-thread {
    /* Round 12 · was min-height:200px / max-height:none, on the reasoning that
       "the chat thread grows with content, the whole page scrolls, not the
       internal grid". That is what lost the composer: with the PAGE scrolling,
       the composer scrolled away with it. Measured at 768, the page scrolled
       1391px and the composer ended at top:-69px, off the screen entirely,
       while position:sticky could not save it because it was only ever
       position:relative in that band.

       Now the thread scrolls internally and the chat column is viewport
       height, which is what desktop has always done. The composer is a grid
       row that cannot leave the viewport. */
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .oemd-chat-hero .eng-input-wrap {
    /* No position games. It is the last row of a viewport-height grid, so it
       is always on screen without depending on sticky, on an ancestor's
       overflow, or on how far the page has scrolled. */
    position: relative;
    bottom: auto;
    /* Kept to the card elevation so it never stacks with an open menu's
       shadow into a halo (owner, 2026-10-22). */
    box-shadow: 0 2px 4px rgba(23, 28, 47, 0.06);
  }
  /* Show the Infinity/Focus 3X photo on mobile as a small hero card
     at the top of the hero-block. Scoped to data-shell-brand="focus"
     (fix 2026-08-16): previously matched any .oemd-hero-block, so the
     Focus 3X photo rendered on /try guest mobile, brand confusion,
     since /try is the generic YMH surface, not Focus co-branded.
     /focus.html sets data-shell-brand="focus"; /engineer.html + /try
     do not. */
  body[data-shell-brand="focus"] .oemd-hero-block::before {
    content: "";
    display: block;
    height: 120px;
    background: linear-gradient(180deg,rgba(11,20,32,.15) 0%,rgba(11,20,32,.65) 100%),url('/assets/vessels/infinity-focus-3x.jpg') center/cover no-repeat;
    border-radius: 12px;
    margin-bottom: 12px;
  }
}

/* ── One scroller on a phone, not two ────────────────────────────────
 *
 * Owner, 2026-08-29: "feels like it has a different scroller than the
 * chat. When I scroll down on the chat it stays high, when I scroll on
 * the disclaimer it moves the text bar and scrolls on its own
 * underneath."
 *
 * It was two scrollers, because this stylesheet carries two scroll
 * architectures and both are live on a phone:
 *
 *   @media (max-width: 900px)      the thread scrolls internally, the
 *                                  chat column is viewport height, the
 *                                  composer is a grid row.
 *   @media (max-width: 1023.98px)  the composer is position:fixed, the
 *                                  topbar is position:fixed, and the
 *                                  thread gets 96px of bottom padding to
 *                                  clear it — which only makes sense if
 *                                  the PAGE is what scrolls.
 *
 * Each was a correct fix for the bug in front of it, and neither removed
 * the other. Measured in a real 390x844 viewport, chatting, eight
 * replies: the page overflowed by 163px AND the thread had its own
 * overflow, so a drag over the messages moved one and a drag over the
 * disclaimer moved the other.
 *
 * This does not add a third model. It removes the premise of the second:
 * give the column a DEFINITE height and the page has nothing left to
 * scroll, so `position: fixed` on the composer simply keeps it where it
 * already is, and the thread's `minmax(0, 1fr)` finally resolves against
 * real leftover space instead of its own content.
 *
 * Scoped to body.eng-chatting on purpose. The landing state needs the
 * page to scroll so a captain can reach the fifth and sixth tile, which
 * is the regression the 900px block's own comment warns about.
 *
 * dvh with a vh fallback: on iOS the URL bar makes 100vh taller than
 * what you can actually see, which would put the composer under the
 * chrome — the exact failure this file has been round-tripping on.
 *
 * Measured after: page overflow 0, thread the only scroller. */
@media (max-width: 900px) {
  /* ...and minus the software keyboard, added 2026-09-01 after the owner
     iPhone report: "this damn text bar and the disclaimer keep riding up
     ... to the point I'm not even able to read the output."

     dvh fixed the URL bar, which is what the comment above is about, and
     a keyboard is a different animal: on iOS the LAYOUT viewport does not
     shrink when it opens, the VISUAL one does, so no viewport unit knows
     it happened. The column therefore stayed a full screen tall with a
     third of it behind the keys, and the compensation had to happen
     INSIDE the column, where the only elastic thing is the thread.

     Measured at 390x664 with the keyboard up, before this: the reading
     area collapsed from 421px to 85px and the thread lost its pin to the
     bottom, so the newest reply sat under the chrome and stayed there.

     --kb is the measured inset from keyboard-inset.js and is 0px when the
     keyboard is closed, so this changes nothing in the resting state. The
     composer does not move because of it either: it is position:fixed and
     already rides --kb. */
  body.eng-chatting .appshell-main:has(> .oemd-chat-hero) {
    height: calc(100vh - 64px - var(--kb, 0px));
    height: calc(100dvh - 64px - var(--kb, 0px));
    min-height: 0;
    overflow: hidden;
  }
  /* The collapsed hero block keeps ~24px of padding while chatting, which
     is 24px the column cannot give the thread. Its children are already
     hidden by the max-height:0 rule above, so this removes leftover box,
     not content. */
  body.eng-chatting .oemd-hero-block { display: none; }
}

/* Save-to-Projects-Hub button on photo diagnose verdicts. Only rendered
   when the model identified a specific failure mode. Flips to a done
   state after save. */
.oemd-photo-savetask {
  display: block;
  width: 100%;
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(11,30,51,.14);
  background: var(--neutral-white);
  color: var(--ymh-ink);
  font-weight: 700; font-size: 12.5px; line-height: 1;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.oemd-photo-savetask:hover:not(:disabled) {
  border-color: var(--ymh-orange);
  background: rgba(253,161,0,.06);
  color: var(--brand-mariner-blue);
}
.oemd-photo-savetask.saved {
  background: rgba(22,163,74,.10);
  border-color: rgba(22,163,74,.35);
  color: var(--functional-success-strong);
  cursor: default;
}

/* ═══════════════════════════════════════════════════════════════════
 * Round 12 · the composer is FIXED while chatting. Non-negotiable.
 * ═══════════════════════════════════════════════════════════════════
 * Owner report: "I was chatting with it and I lost the damn text bar."
 * Reproduced at 768: the page scrolled 1391px and the composer ended at
 * top:-61px, off the screen, with no way to type.
 *
 * It was never pinned. Measured: position:relative at 393 and 768,
 * position:static at 1280. It only looked pinned on desktop because the
 * desktop chat does not scroll the page at all.
 *
 * Sizing the chat column to the viewport does NOT fix this: below 1024 the
 * right rail stacks underneath, so the page is tall regardless and scrolling
 * carries the whole main column, composer included, off the top.
 *
 * So: position fixed. It does not depend on an ancestor's overflow, on sticky
 * containing blocks, or on how far the page has scrolled. Scoped to below
 * 1024 because at desktop the page does not scroll and the composer is
 * already always on screen.
 * ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1023.98px) {
  body.eng-chatting .eng-input-wrap,
  body.eng-chatting .oemd-chat-hero .eng-input-wrap {
    position: fixed !important;
    /* Floating capsule (2026-08-28, the Claude treatment): side gaps and
       a rounded card that floats above the home indicator, instead of
       the old edge-to-edge flat bar. bottom rides --kb so it sits just
       above the keyboard when it is up (home-indicator inset is covered
       by the keys then, so it is only added when the keyboard is closed
       — max() picks whichever is larger, and --kb is 0 when closed). */
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(var(--kb, 0px) + max(8px, env(safe-area-inset-bottom)));
    z-index: 70;
    /* left+right define the box; kill the hero rule's width:100%/max-width
       that otherwise overflows the right edge past the viewport. */
    width: auto !important;
    max-width: none !important;
    margin: 0;
    /* Spec 0599 S4 · in a conversation too it is Composer 12:635, so it
       does not change shape on the first message (S5 criterion 2). */
    border-radius: var(--radius-lg, 16px);
    padding: 6px 6px 6px 8px !important;
    background: var(--neutral-surface);
    border: 1px solid var(--neutral-line);
    box-shadow: 0 2px 4px rgba(23, 28, 47, 0.06);
  }
  /* Owner 2026-10-24, "the chat box not as tall": 10 16 6 and a 4 px
     row gap below 1024 (was 18 20 12, gap 14), about 84 px at rest instead
     of 106. Send stays 40 with its 44 px target. */
  body.eng-chatting .oemd-chat-hero .eng-input-wrap-stacked { padding: 10px 16px 6px !important; gap: 4px; }

  /* Reserve the space it now occupies so the last message is never hidden
     behind it, and the disclaimer under it stays readable. */
  body.eng-chatting .eng-thread {
    padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
  }
  body.eng-chatting .eng-disclaimer {
    margin-bottom: calc(84px + env(safe-area-inset-bottom));
  }
}



/* ── The composer rejoins the layout, and four props stop propping ───
 *
 * Owner, 2026-08-29, pointing at the empty band on a phone: "the empty
 * space, sort that out properly."
 *
 * Measured at 390x844, chatting: 74px of void above the thread, and the
 * disclaimer sitting 216px ABOVE the composer with nothing in between.
 *
 * The cause is a stack of compensations that all exist to work around
 * two elements being position:fixed, layered up over several rounds:
 *
 *   composer   position: fixed          leaves the grid entirely
 *   main       padding-top: 64px        for the fixed topbar
 *   main       padding-bottom: 72px     for the fixed composer
 *   thread     padding-bottom: 96px     for the fixed composer
 *   disclaimer margin-bottom: 84px      for the fixed composer
 *
 * The first of those was never needed: `.appshell` declares
 * `grid-template-rows: 64px 1fr` with the topbar in row 1 and main in
 * row 2, so the row is reserved whether or not the bar is in flow. It
 * was giving back height the grid had already given back.
 *
 * The rest only existed because the composer had left the grid. Once
 * the column has a definite height — which it now does, from the
 * two-scroller fix — the composer does not need to be fixed at all: it
 * is a row in a viewport-height grid and cannot leave the screen. So
 * this puts it back in flow and removes the four props holding up a
 * building that is standing on its own.
 *
 * That is the point. Every previous round added a layer and left the
 * last one standing, which is how a 24px avatar gutter, two scrollers
 * and 290px of void all ended up in the same file. This subtracts.
 *
 * Measured after, against desktop as the reference:
 *
 *              voidTop  voidBottom  composer->disclaimer
 *   before          74           8                 -216
 *   after           10          18                   18
 *   desktop        n/a          24                   18
 *
 * Stable at 1 and 12 messages, and at 375x667 where the thread becomes
 * the only scroller. The page never scrolls and the composer is on
 * screen in every case.
 *
 * env(safe-area-inset-bottom) stays on the disclaimer so the home
 * indicator still gets its room. */
@media (max-width: 1023.98px) {
  /* 2026-08-31, owner iPhone screenshot: "Text bar in try sits super
     high." The un-pin above (position: relative + the auto resets that
     used to live in this block) put the composer back in flow, where it
     sits at the column's bottom MINUS the disclaimer block — 105px
     above the viewport bottom on the rig at 390x844, worse on Safari
     where the column height drifts with the toolbar dynamics. Round 12
     had it right ("the composer is FIXED while chatting.
     Non-negotiable"); what 2026-08-29 was actually fixing was the
     STACK OF HARDCODED compensations (64+72+96+84px of paddings) that
     rotted into voids, not the pin itself.

     So: the pin stays (the round-12 rule above applies again), and the
     one compensation left is MEASURED, not hardcoded — keyboard-inset.js
     publishes --composer-clear as the live distance from the composer's
     top edge to the viewport bottom, so the disclaimer rides exactly
     clear of the bar and a taller composer can never open a void or an
     overlap. Same lesson as the two comments in keyboard-inset.js:
     hardcoding this number was wrong twice, so measure it. */
  body.eng-chatting .appshell-main {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  body.eng-chatting .eng-thread {
    padding-bottom: 10px !important;
  }
  /* --composer-clear is the distance to the LAYOUT viewport bottom, which
     is what a position:fixed sibling needs and what the guide bubble and
     the consent bar still use. The disclaimer is not fixed: it is the last
     in-flow child of a column that now ends at the top of the keyboard, so
     measuring to the layout bottom made it reserve the keyboard's height a
     second time and squeezed the thread to 85px. In flow it only has to
     clear the composer capsule floating over it, which is the composer's
     own bottom offset without the --kb term. */
  body.eng-chatting .eng-disclaimer {
    margin-bottom: calc(var(--composer-h, 56px) + max(8px, env(safe-area-inset-bottom)) + 6px) !important;
  }

  /* While the keyboard is up, the disclaimer costs more than it earns.
     Measured at 390x664 with the keys open: 328px of viewport survives,
     the topbar takes 56 and the composer about 74, and the disclaimer
     block took a further 141 — more than half of what was left — leaving
     85px of reading area. That is the second half of the owner's report,
     which named the disclaimer directly.

     It is not being retired, only stood down while the captain is typing:
     it is on screen the whole time they are READING, which is when a
     caution about AI answers is doing its job, and it returns the instant
     the keyboard closes. Mobile only, keyboard only. */
  html.kb-open body.eng-chatting .eng-disclaimer { display: none !important; }

  /* With the disclaimer stood down, nothing sits between the thread and
     the composer capsule floating over it, so the thread's flat 10px runs
     the last two lines of the answer under the bar. Give back exactly the
     capsule, measured, plus a gap. Keyboard-open only: with the keyboard
     closed the disclaimer is back in flow and already does this. */
  html.kb-open body.eng-chatting .eng-thread {
    padding-bottom: calc(var(--composer-h, 56px) + 14px) !important;
  }

  /* The guide bubble stands down with the disclaimer, and for a reason
     the screenshots made obvious that the measurements did not.

     It floats on --composer-clear, so before the inset was re-measured
     it sat at a stale offset that put it BEHIND the keyboard, where
     nobody saw it. Making that measurement honest moved it to where it
     belongs relative to the composer, which on a phone with the keyboard
     up is directly over the answer: it covered two of the six lines the
     rest of this change had just won back.

     "Save this chat by adding your boat above" is a nudge, and a nudge
     that lands on top of the sentence the captain is reading costs more
     than it earns. Same trade as the disclaimer: it is on screen the
     whole time they are reading, and it steps aside while they type.
     This is the third thing in this file to learn that the keyboard
     state has to be asked about rather than assumed. */
  html.kb-open .eng-guide-bubble { display: none !important; }

  /* A short thread sat on the ceiling with the floor a long way below it.
     Owner screenshot, 2026-09-01: "Hello" and one greeting back, then 472
     measured pixels of nothing between the last word and the disclaimer
     on a 390x844 phone. It reads as a page that failed to load the rest
     of itself, which is a poor first impression on the surface whose only
     job is a first impression.

     margin-top:auto rather than justify-content:flex-end. They look the
     same while the content is short, and they differ exactly when it is
     not: flex-end on a scroll container clips the top of the overflow in
     both Chrome and Safari, so the first message becomes unreachable. An
     auto margin resolves to 0 the moment there is no free space, which
     hands scrolling back untouched.

     Beats .oemd-chat-hero .eng-thread > *:first-child on specificity,
     (0,3,1) against (0,3,0), so the margin-top:0 that rule sets for the
     top gap still applies everywhere else. */
  body.eng-chatting .eng-thread > *:first-child { margin-top: auto; }

  /* ...and the bottom-anchored content has to clear the guide bubble,
     which floats over the band it now occupies. While the thread sat at
     the top the bubble covered empty space and nobody noticed; the first
     screenshot after the anchor change had it across the greeting.
     --chat-stack-h is the chrome plus the bubble, measured. */
  body.eng-chatting .eng-thread {
    padding-bottom: calc(var(--chat-stack-h, 158px) - var(--chat-chrome-h, 158px) + 10px) !important;
  }
}

/* ── Sidebar chat history · the scrollbar was the loudest thing in the
   drawer. A chunky default track down a dark navy panel reads as a
   defect. Thin, and coloured to the panel it lives on. ─────────────── */
.appshell-history {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.16) transparent;
}
.appshell-history::-webkit-scrollbar { width: 6px; }
.appshell-history::-webkit-scrollbar-track { background: transparent; }
.appshell-history::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.14);
  border-radius: 3px;
}
.appshell-history:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,.24); }


/* ═══════════════════════════════════════════════════════════════════
 * MOBILE CHAT CHROME · round 13
 * ═══════════════════════════════════════════════════════════════════ */

/* ── The chrome is fixed from the first paint, not from the first
 * message ─────────────────────────────────────────────────────────
 * The pinning shipped in round 12 was gated on body.eng-chatting, which
 * engineer.js only sets once you send. So on the /app landing — the
 * screen everyone actually opens — the composer and the burger were
 * still in flow and still scrolled away. From the captain's side there
 * is no such thing as "before chatting": the text bar is either always
 * there or it is unreliable. Drop the gate on mobile. */
@media (max-width: 1023.98px) {
  .oemd-chat-hero .eng-input-wrap,
  .appshell .eng-input-wrap {
    position: fixed !important;
    /* Floating capsule (2026-08-28, the Claude treatment): side gaps and
       a rounded card instead of the old edge-to-edge flat bar. Sits just
       above the home indicator, or just above the keyboard when it is up
       (bottom rides --kb). */
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(var(--kb, 0px) + max(8px, env(safe-area-inset-bottom)));
    z-index: 70;
    /* left+right define the box; kill the hero rule's width:100%/max-width
       that otherwise overflows the right edge past the viewport.

       The identical pair sits in the body.eng-chatting twin above, with
       the identical comment. This block was cloned from it and these two
       lines were not carried over, so the defect survived only in the
       LANDING state, which is the first screen a visitor ever sees.
       Measured on production 2026-08-30: at 390px the capsule rendered
       10 to 400 with #engSend at 349-393, three pixels past the display
       edge, and elementFromPoint(389) returned engSend, so the send
       button owned a column of pixels nobody can see or press. Same at
       430. scrollWidth equalled innerWidth, so it was clipped rather
       than reachable by scrolling.

       width:auto alone, NOT the max-width:none that the chatting twin
       also carries. width is what over-constrains the box, so removing it
       is enough for both insets to hold. Leaving max-width:780px in place
       keeps tablets between roughly 790 and 1023px exactly as they ship
       today, capped and left-aligned: the phone defect gets fixed without
       changing a width nobody complained about. */
    width: auto !important;
    margin: 0;
    /* Spec 0599 S4 · pinned, it is still Composer 12:635 (19:370). */
    border-radius: var(--radius-lg, 16px);
    padding: 6px 6px 6px 8px !important;
    background: var(--neutral-surface);
    border: 1px solid var(--neutral-line);
    box-shadow: 0 2px 4px rgba(23, 28, 47, 0.06);
  }
  .oemd-chat-hero .eng-input-wrap-stacked { padding: 10px 16px 6px !important; gap: 4px; }
  /* When the keyboard is up the home-indicator inset is already covered
     by the keys, so drop it back to a flat 8px gap above the keyboard. */
  /* Spec 0558c · html.kb-open, the class keyboard-inset.js sets, not a
     match on the inline style string (which that file warns against). An
     inset of 1 to 89px no longer counts as a keyboard, on purpose: that
     range is URL bar noise. */
  html.kb-open .oemd-chat-hero .eng-input-wrap,
  html.kb-open .appshell .eng-input-wrap {
    bottom: calc(var(--kb, 0px) + 8px);
  }

  .appshell .appshell-main {
    /* No padding-top. See the note below: the 64px grid row already
       reserves the fixed bar's space, so paying again opened a void on
       the screen the captain lands on. */
    padding-bottom: calc(var(--composer-h, 56px) + 16px + env(safe-area-inset-bottom)) !important;
  }
  /* Spec 0558c · the landing state with the keyboard up. Every keyboard
     rule above is scoped to body.eng-chatting, and since 0558 every /app
     load opens on the landing state, so there the composer rode the
     keyboard up over the cards and the disclaimer. The chatting fix (a
     definite column height) is not borrowed: the landing state must
     scroll to reach the last cards. Instead the page keeps scrolling, its
     end is padded by the composer plus the keyboard, so the last card can
     be scrolled clear of the composer, and the disclaimer stands down
     while the captain types, as it does in the chatting state. Placed
     after the padding rule above, which is also !important, so this one
     wins on order as well as weight. */
  html.kb-open body:not(.eng-chatting) .appshell .appshell-main {
    padding-bottom: calc(var(--composer-h, 56px) + var(--kb, 0px) + 14px) !important;
  }
  html.kb-open body:not(.eng-chatting) .eng-disclaimer { display: none !important; }
  /* Same double-count #437 removed, in the state #437 did not cover.
     The topbar is position:fixed in this band, so the 64px grid row above
     reserves space nothing occupies, and the padding-top on main gives that
     height back a second time: the page opens on ~128px of white before any
     content. On an iPad in portrait that is the whole first impression.

     #437 established which half is redundant ("that row is reserved whether
     or not the bar is in flow ... giving back height the grid had already
     given back") and dropped the padding, but scoped it to
     body.eng-chatting. The landing state, which is the screen a prospect
     actually opens on, still paid twice. Same fix, extended to cover it.

     Deliberately matching #437's direction rather than collapsing the grid
     track: two fixes for one double-count that disagree about which half to
     remove cancel out, and the fixed topbar lands on top of the content.

     2026-09-18, owner on an iPhone screenshot of /app: "why is the UI UX
     all messed up". Because this was scoped to Focus, and the sentence
     that used to end this note said so ("/app and /try render exactly as
     they do today"), which read as caution and was really just the bug
     left in the one place a captain actually opens. Measured on the rig
     before the change, with the captain signed in and the page scrolled
     to the top: 86px of white between the bar and the greeting at both
     393x660 and 320x568, and 107px at 768x1024. The padding is now gone
     from the rule itself rather than cancelled per brand, so there is
     one answer to which half is redundant instead of two. */
  /* The thread is the only thing that should move. Give it a real
     scrollport between the two fixed bars rather than letting the whole
     document scroll underneath them. */
  .oemd-chat-hero .eng-thread {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}



/* The streaming skeleton (.shimmer, engineer.css) is dark-theme styled:
   white-alpha lines in a bordered card. On the light chat ground that
   reads as an empty white box while the model thinks. Unboxed here, with
   ink-alpha lines that actually show against cream. */
.oemd-chat-hero .eng-msg.shimmer {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 4px 0 0;
  min-height: 0;
  width: 100%;
  max-width: 68ch;
}
.oemd-chat-hero .eng-shimmer-line {
  background: linear-gradient(90deg, rgba(11,20,32,.05) 0%, rgba(11,20,32,.12) 50%, rgba(11,20,32,.05) 100%);
  background-size: 200% 100%;
}

/* Tonal pass: the thumbs sit as bare glyphs until the pointer arrives;
   hover fills with the existing row-hover tone. No outlines. */
.oemd-chat-hero .eng-fb-btn {
  background: transparent;
  border-color: transparent;
}
.oemd-chat-hero .eng-fb-btn:hover {
  background: var(--ymh-row-hover);
  border-color: transparent;
}


/* ── View Transitions (2026-08-28) ───────────────────────────────────
   Native card->modal morph (project-detail-modal.js names the source
   card and the modal `ymh-proj-morph`; the browser tweens between them).
   Library-free, and a no-op where startViewTransition is unsupported. */
::view-transition-group(ymh-proj-morph) {
  animation-duration: .34s;
  animation-timing-function: cubic-bezier(.32, .72, 0, 1);
}
/* The root cross-fade under the morph stays quick and quiet so the
   morph is the thing the eye follows. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .2s;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* Spec 0185: the provenance chip on a demo committed Projects card.
   site.css's landing page `.chip` rule colors bare chips cream for its
   dark hero and reached this white card, white on white. Two classes
   out-specify it; the muted ink matches the seeded chips beside it. */
.chip.fdr-provenance { color: var(--ymh-muted); }

/* ── Spec 0182: demo surface stand downs ─────────────────────────────
   The Focus surface runs one boat, signed out, in front of prospects.
   Two sidebar controls made sense on the generic shell and not here:
   the vessel switcher (its tap went to #vessel, which nothing on /focus
   handles; appshell.js now stands the handler down on this brand, and
   the chevron plus pointer go with it so it reads as the label it is)
   and Log in, the last live tap target that navigates off the demo. */
body[data-shell-brand="focus"] .appshell-vessel-switch { cursor: default; }
body[data-shell-brand="focus"] .appshell-vessel-switch > svg { display: none; }
body[data-shell-brand="focus"] .appshell-logout { display: none; }

/* ═══════════════════════════════════════════════════════════════════
 * Spec 0599 S5 · the calm home (app.html, body.ymh-calm-home).
 * Figma 8rcqPM95zXXBMghQNuJLxk page 20 · App · Home, v9 frames 19:2
 * (desktop) and 19:370 (phone): a 784 px main column, the greeting at
 * App H2 (serif 400, 26/32, Mariner), the boat line, the passport line,
 * This week as Due rows (Figma 14:442), the skills as chips (7:41) above
 * the composer, and the passport as a drawer (14:485) instead of the
 * right rail. Every rule is scoped to body.ymh-calm-home.
 * ═══════════════════════════════════════════════════════════════════ */
body.ymh-calm-home .oemd-hero-block,
body.ymh-calm-home .oemd-chat-hero {
  width: 100%;
  max-width: 832px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
body.ymh-calm-home .oemd-hero-block { padding: 40px 24px 8px; max-height: none; }
body.ymh-calm-home .oemd-chat-hero { background: transparent; }
body.ymh-calm-home .app-hero-h1 {
  font-family: Georgia, Gelasio, "Times New Roman", serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 32px;
  letter-spacing: 0;
  color: var(--brand-mariner-blue);
  margin: 0 0 6px;
}
body.ymh-calm-home .home-boat-line,
body.ymh-calm-home .home-passport-line,
body.ymh-calm-home .home-missing-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
body.ymh-calm-home .home-boat-line { font-size: 13px; line-height: 20px; color: var(--text-secondary); min-height: 24px; }
body.ymh-calm-home .home-passport-line,
body.ymh-calm-home .home-missing-line { min-height: 44px; font-size: 13px; line-height: 20px; color: var(--text-link); }
body.ymh-calm-home .home-passport-line span,
body.ymh-calm-home .home-missing-line { text-decoration: underline; text-underline-offset: 2px; }
body.ymh-calm-home [hidden] { display: none !important; }
/* Figma 19:2 note: New chat is navy so the only orange actions are Send
   and the most urgent This week row (S5 criterion 3). */
body.ymh-calm-home .appshell-newchat {
  background: var(--brand-mariner-blue);
  color: var(--neutral-white);
}
body.ymh-calm-home .appshell-newchat:hover { filter: brightness(1.12); }
/* Phone (Figma 19:370): the count reads "3 things", the boat name is
   desktop only. */
@media (max-width: 767.98px) {
  body.ymh-calm-home .home-week-boat { display: none; }
}

/* Spec 0599b B2 · the card in This week's place (Figma 19:227, 14:442,
   181:2837, 183:3387, 19:712). One card: the no boat card, Getting
   started or This week. Tokens only, and class scoped (every home-*
   class lives only in app.html), never a body mode overlay; the buttons are Figma Button 5:114
   (App size: pill, 38 tall, a hidden 44 px target). */
.home-week,
.home-start {
  margin-top: 24px;
  background: var(--neutral-surface);
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-md, 12px);
  padding: 4px 16px;
}
.home-week-head,
.home-start-head { display: flex; align-items: center; gap: 10px; min-height: 44px; padding-top: 8px; }
.home-week-label { flex: none; font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-secondary); white-space: nowrap; }
.home-week-count,
.home-start-title { flex: 1; min-width: 0; font-size: 13.5px; line-height: 18px; font-weight: 600; color: var(--text-primary); }
.home-start-count { flex: none; margin-left: auto; font-size: 13px; line-height: 20px; color: var(--text-secondary); }
/* The year link (19:231): text link with the arrow after it, 44 tall. */
.home-year-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 13px;
  line-height: 20px;
  color: var(--text-link);
  text-decoration: none;
}
.home-year-link span { text-decoration: underline; text-underline-offset: 2px; }
.home-wide { display: inline; }
.home-narrow { display: none; }

/* Rows (Due row 14:442). */
.home-due-row,
.home-start-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--neutral-line); }
.home-due-row:last-child,
.home-start-row:last-child { border-bottom: 0; }
.home-tile { flex: none; display: flex; padding: 7px; border-radius: var(--radius-sm, 8px); color: var(--text-primary); }
.home-tile svg { display: block; }
.home-tile-amber { background: var(--brand-sunset-orange-a14); }
.home-tile-danger { background: var(--functional-danger-a12); }
.home-tile-navy { background: var(--brand-mariner-blue-a8); color: var(--brand-mariner-blue); }
.home-due-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-due-title { font-size: 13.5px; line-height: 18px; font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; }
.home-due-meta { font-size: 11.5px; line-height: 16px; color: var(--text-secondary); }
.home-due-overdue .home-due-meta { color: var(--functional-danger-strong); }
.home-due-soon .home-due-meta { color: var(--functional-warning-strong); }

/* Buttons: Primary (the one orange), Ghost, Outline, Dark. */
.home-btn {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill, 999px);
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.home-btn::before { content: ""; position: absolute; inset: -3px 0; }
.home-btn-primary { background: var(--brand-sunset-orange); color: var(--text-strong); }
.home-btn-ghost { background: var(--neutral-subtle); color: var(--text-link); }
.home-btn-outline { background: var(--neutral-surface); border-color: var(--neutral-line); color: var(--text-link); }
.home-btn-dark { background: var(--text-primary); color: var(--neutral-surface); }
.home-btn:focus-visible,
.home-year-link:focus-visible,
.home-start-skip:focus-visible { outline: 2px solid var(--brand-mariner-blue); outline-offset: 2px; }

/* "{n} more due" under the rows, plain quiet text (S5 audit B1). */
.home-more-due,
.home-week-empty {
  margin: 0;
  padding: 8px 0 10px;
  font-size: 13px;
  line-height: 20px;
  color: var(--text-secondary);
}
.home-week-empty { padding: 13px 0 14px; }
/* Error (19:3064): the sentence in danger strong, Retry on the right. */
.home-week-error { display: flex; align-items: center; gap: 12px; padding: 10px 0 12px; }
.home-week-error[hidden] { display: none; }
.home-week-error-text { flex: 1; margin: 0; font-size: 13px; line-height: 20px; color: var(--functional-danger-strong); }
/* Loading (19:2740): the overline and three skeleton rows. */
/* The overline 19 px from the card's top edge and the first tile at 39
   (19:2740, 19:2958). */
.home-week[data-state="loading"] .home-week-head { min-height: 0; padding-top: 7px; padding-bottom: 1px; }
.home-skel-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.home-skel-tile { flex: none; width: 32px; height: 32px; border-radius: var(--radius-sm, 8px); background: var(--neutral-line); }
.home-skel-text { display: flex; flex-direction: column; gap: 6px; }
.home-skel-bar { display: block; width: 180px; height: 8px; border-radius: var(--radius-pill, 999px); background: var(--neutral-line); }
.home-skel-bar-2 { width: 260px; height: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .home-skel-tile,
  .home-skel-bar { animation: home-skel 1.4s ease-in-out infinite; }
}
@keyframes home-skel { 50% { opacity: 0.55; } }

/* The care line (19:297), one quiet line under the card. */
.home-care { margin: 24px 0 0; font-size: 11.5px; line-height: 16px; color: var(--text-secondary); }

/* Getting started, sequential (owner 2026-10-23): at every width the
   card holds the bar, "N of 4" and one open step; the title wraps to a
   second line rather than being cut. "Skip for now" is quiet text, a
   44 px target. A step that arrives fades in (none under reduced motion). */
.home-start-bar { display: flex; gap: 4px; padding: 2px 0 4px; }
.home-start-rows .home-start-row { border-bottom: 0; }
.home-start-skip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: -6px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  line-height: 20px;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
  .home-start-in { animation: home-start-in 220ms ease-out; }
}
@keyframes home-start-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.home-start-seg { flex: 1; height: 4px; border-radius: var(--radius-pill, 999px); background: var(--brand-harbor-mist); }
.home-start-seg-done { background: var(--brand-mariner-blue); }

/* No boat (19:712). */
.home-noboat {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 18px;
  background: var(--neutral-surface);
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-md, 12px);
}
.home-noboat[hidden] { display: none; }
.home-noboat-tile { flex: none; display: flex; padding: 10px; border-radius: var(--radius-sm, 8px); background: var(--brand-sunset-orange-a14); color: var(--text-primary); }
.home-noboat-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.home-noboat-title { margin: 0; font-family: inherit; font-size: 15px; line-height: 22px; font-weight: 600; letter-spacing: 0; color: var(--text-primary); }
.home-noboat-sub { margin: 0; font-size: 11.5px; line-height: 16px; color: var(--text-secondary); }
/* The no boat greeting carries no lines under it (19:514). */
body.ymh-calm-home.home-no-boat .app-hero-h1 { margin-bottom: 0; }

/* Free near the limit (19:1201): one quiet line under the chips. */
.home-asks-left { margin: 8px 0 0; font-size: 11.5px; line-height: 16px; color: var(--text-secondary); }
body.ymh-calm-home.home-capped .home-skills,
body.ymh-calm-home.home-capped .home-asks-left,
body.ymh-calm-home.eng-chatting .home-asks-left,
body.ymh-calm-home.eng-chatting .home-verify { display: none; }
/* 0599b section 17 · the verify notice (Notice 14:484, Verify email;
   19:1881): the Ocean pill above the composer, the mail icon, the
   sentence at App Button and an outline Resend on the dark ground. */
.home-verify {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-height: 64px;
  padding: 12px 12px 12px 16px;
  border-radius: var(--radius-pill, 999px);
  background: var(--neutral-sidebar);
  color: var(--neutral-white);
}
.home-verify[hidden] { display: none; }
.home-verify svg { flex: none; display: block; }
/* Spec 0599l 1 · the session dismiss: a stroke X on the dark ground. */
.home-verify-dismiss {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin-left: -4px; padding: 0; border: 0; border-radius: var(--radius-pill, 999px);
  background: transparent; color: var(--neutral-white); cursor: pointer;
}
.home-verify-dismiss:focus-visible { outline: 2px solid var(--brand-sunset-orange); outline-offset: 2px; }
.home-verify-text { flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--neutral-white); }
/* Spec 0599l L9 · the kept boat line. No frame: it is the verify notice
   (.home-verify on the same element: the dark ground, the stroke icon,
   the sentence at App Button, the outline button), with Not now as a
   quiet text button beside Bring it back. */
.home-kept { margin: 0; }
.home-kept-text { flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--neutral-white); }
.home-kept-actions { display: flex; flex: none; align-items: center; gap: 4px; }
.home-kept-actions[hidden] { display: none; }
.home-kept-quiet {
  min-height: 38px; padding: 0 10px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--neutral-white);
  text-decoration: underline; text-underline-offset: 3px;
}
.home-kept-quiet:disabled, .home-kept .home-btn:disabled { opacity: .6; cursor: default; }
.home-kept-quiet:focus-visible { outline: 2px solid var(--brand-sunset-orange); outline-offset: 2px; }
body.ymh-calm-home.eng-chatting .home-kept { display: none; }
@media (max-width: 479.98px) {
  /* The nudge runs to four lines at 390: a pill that tall reads as a blob. */
  .home-verify { border-radius: var(--radius-lg, 16px); }
  .home-kept { flex-wrap: wrap; }
  .home-kept-text { flex-basis: calc(100% - 30px); }
  .home-kept-actions { margin-left: 30px; }
}
/* Phone (owner, 2026-10-23, "cramped"): the verify sentence wrapped to
   nine lines in a narrow column beside Resend. Below 480 the sentence
   takes the row with the X, and Resend sits under it, lined up with the
   sentence (the icon, 18, plus the gap, 12). */
@media (max-width: 479.98px) {
  #homeVerify { flex-wrap: wrap; row-gap: 10px; }
  #homeVerify .home-verify-text { flex: 1 1 calc(100% - 74px); }
  #homeVerify .home-verify-dismiss { order: 2; }
  #homeVerify #homeVerifyResend { order: 3; margin-left: 30px; }
}
.home-btn-on-dark { background: transparent; border-color: var(--neutral-white); color: var(--neutral-white); }
.home-btn-on-dark:focus-visible { outline-color: var(--brand-sunset-orange); }
/* Owner 2026-10-24, on the confirm your email notice: "not as big and
   maybe not a solid square maybe solid borders but clear in the middle?
   and maybe red?" So #homeVerify only (the kept line keeps the dark
   notice) is an outline: clear ground, a 1.5 px danger border, the text,
   icon, X and Resend in danger strong (5:1 on the page ground), 12/16
   type and tighter padding. Spec 0599 4.2 keeps red for overdue; this is
   the owner's explicit call for this notice. */
#homeVerify {
  min-height: 0;
  /* Owner 2026-10-24, second look: "not simetrical". A grid with the mail
     icon and the X in matching 16 px tracks, 12 px from each border, and
     12 px padding on all four sides. */
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto 16px;
  align-items: center;
  column-gap: 10px;
  row-gap: 12px;
  padding: 12px;
  border: 1.5px solid var(--functional-danger);
  border-radius: var(--radius-md, 12px);
  background: transparent;
  color: var(--functional-danger-strong);
}
#homeVerify svg { width: 16px; height: 16px; }
#homeVerify .home-verify-text { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--functional-danger-strong); }
#homeVerify .home-verify-dismiss { color: var(--functional-danger-strong); }
#homeVerify #homeVerifyResend {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
  border-color: var(--functional-danger);
  color: var(--functional-danger-strong);
}
/* The 30 px button keeps a 44 px target. */
#homeVerify #homeVerifyResend::before { inset: -7px 0; }
#homeVerify #homeVerifyResend:focus-visible { outline-color: var(--functional-danger-strong); }
/* The id beats .home-verify[hidden], so the hidden state is restated. */
#homeVerify[hidden] { display: none; }
#homeVerify > svg { grid-column: 1; grid-row: 1; }
#homeVerify .home-verify-text { grid-column: 2; grid-row: 1; }
#homeVerify #homeVerifyResend { grid-column: 3; grid-row: 1; margin: 0; }
/* The X is drawn at the glyph's own 16 px so its inset from the right
   border equals the icon's from the left; the hit area stays 44 px. */
#homeVerify .home-verify-dismiss {
  grid-column: 4; grid-row: 1;
  position: relative;
  width: 16px; height: 16px; margin: 0;
}
#homeVerify .home-verify-dismiss::after { content: ""; position: absolute; inset: -14px; }
@media (max-width: 479.98px) {
  /* Phone: the icon and the X on the first text line, Resend under the
     sentence at the text column's left edge, 12 below it as all round. */
  #homeVerify { grid-template-columns: 16px minmax(0, 1fr) 16px; align-items: start; }
  #homeVerify .home-verify-dismiss { grid-column: 3; }
  #homeVerify #homeVerifyResend { grid-column: 2; grid-row: 2; justify-self: start; }
}
/* At the limit on load (19:1592): the lock, the server's sentence, its
   button, in the composer's box. */
.home-limit-notice { display: flex; align-items: flex-start; gap: 12px; }
.home-limit-lock { flex: none; display: flex; padding-top: 1px; color: var(--text-primary); }
.home-limit-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.home-limit-sentence { margin: 0; font-size: 13px; line-height: 20px; color: var(--text-primary); }
/* Spec 0608 section 24 · the exists line: the verify notice's look (the
   .home-verify classes on the same element), one sentence, the 0599l
   stroke X. Under the verify notice when both show. */
.home-exists { margin: 0; }
.home-exists-dismiss {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin-left: -4px; padding: 0; border: 0; border-radius: var(--radius-pill, 999px);
  background: transparent; color: var(--neutral-white); cursor: pointer;
}
.home-exists-dismiss:focus-visible { outline: 2px solid var(--brand-sunset-orange); outline-offset: 2px; }
@media (max-width: 479.98px) {
  /* Two or three lines at 390: a pill that tall reads as a blob. */
  .home-exists { border-radius: var(--radius-lg, 16px); }
}
@media (max-width: 1023.98px) {
  /* Never pinned over the chips: in the page flow above the pinned
     chips and composer. With it on, the verify notice joins it there,
     verify first, so the two stack instead of overlapping. */
  body.ymh-calm-home:not(.eng-chatting) .home-verify.home-exists { position: static; margin: 8px 0 0; }
  body.ymh-calm-home.home-exists-on:not(.eng-chatting) .home-skills { bottom: calc(var(--kb, 0px) + var(--home-foot) + var(--home-disc-h, 48px) + 11px + var(--composer-h, 106px) + 8px + var(--home-asks-h, 0px)); }
  body.ymh-calm-home.home-exists-on:not(.eng-chatting) .home-asks-left { bottom: calc(var(--kb, 0px) + var(--home-foot) + var(--home-disc-h, 48px) + 11px + var(--composer-h, 106px) + 8px); }
  body.ymh-calm-home.home-exists-on:not(.eng-chatting) .home-verify:not(.home-exists) { position: static; margin: 16px 0 0; border-radius: var(--radius-lg, 16px); }
  /* The page is full width below 1024: line both up with the pinned
     column (--home-col-x), not the hero's own padding. */
  body.ymh-calm-home.home-exists-on:not(.eng-chatting) .home-verify { justify-self: center; width: calc(100vw - 2 * var(--home-col-x)); }
}

@media (max-width: 767.98px) {
  .home-wide { display: none; }
  .home-narrow { display: inline; }
  .home-week,
  .home-start,
  .home-noboat { margin-top: 16px; }
  .home-care { margin-top: 16px; }
  /* Getting started, compact (183:3375): one header line, the bar, the
     one open step, Skip for now. */
  .home-start { padding: 4px 16px; }
  .home-start-head { flex-wrap: nowrap; justify-content: space-between; padding-top: 4px; }
  .home-start-title { display: none; }
  /* No boat (19:791): the button under the text. */
  .home-noboat { display: grid; grid-template-columns: auto 1fr; align-items: start; column-gap: 14px; row-gap: 12px; }
  .home-noboat .home-btn-dark { grid-column: 2; justify-self: start; }
  .home-asks-left { margin: 0; }
}

/* Skills chips above the composer, only on the empty home. */
body.ymh-calm-home .home-skills { display: flex; gap: 8px; flex-wrap: wrap; }
body.ymh-calm-home.eng-chatting .home-skills { display: none !important; }
body.ymh-calm-home .home-skill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-pill, 999px);
  background: var(--neutral-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  cursor: pointer;
}
body.ymh-calm-home .home-skill svg { color: var(--brand-mariner-blue); }
body.ymh-calm-home .eng-send svg { display: block; }
body.ymh-calm-home.home-capped .oemd-chat-hero .eng-input-wrap { display: none !important; }
body.ymh-calm-home .home-limit {
  /* The composer's own column (.oemd-chat-hero .eng-input-wrap), so the
     notice sits exactly where the composer sat (S5 criterion 14). */
  max-width: 784px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  background: var(--neutral-surface);
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-md, 12px);
  padding: 14px 16px;
}
body.ymh-calm-home .home-limit .eng-msg-wrap { margin: 0; }

/* The passport drawer (Figma 14:485) at 768 and wider; below that,
   passport.css's bottom sheet is the drawer. passport.js's one handler
   toggles data-expanded at every width. */
@media (min-width: 768px) {
  body.ymh-calm-home .appshell-rail {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    width: min(380px, 100vw) !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    /* passport.css caps the old page column at 100vh - 72px; the drawer
       runs the full height. */
    max-height: none !important;
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px 20px !important;
    border-left: 1px solid var(--neutral-line) !important;
    border-top: 0 !important;
    background: var(--brand-ivory-hull) !important;
    overflow-y: auto !important;
    z-index: 80 !important;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
  }
  body.ymh-calm-home .appshell-rail[data-expanded="true"] {
    transform: none;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.22s ease;
  }
}
@media (min-width: 1024px) {
  body.ymh-calm-home .appshell { grid-template-columns: 256px minmax(0, 1fr) !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.ymh-calm-home .appshell-rail { transition: none !important; }
}

/* Passport drawer 14:485 header at every width: "Yacht Passport" (App
   H3, Montserrat 600 18/26) and the close X, which is passport.js's Done
   control (labelled "Close the passport"). passport.css styled Done as a
   phone-only text pill; the header replaces that look here. */
body.ymh-calm-home .passport-sheet-head { display: none; }
body.ymh-calm-home .appshell-rail[data-expanded="true"] > .passport-sheet-head {
  display: flex;
  /* A generic rail child rule sets column; the header is one row. */
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  flex: none;
  position: sticky;
  top: -16px;
  z-index: 2;
  margin: -16px 0 4px;
  padding: 16px 0 6px;
  background: var(--brand-ivory-hull);
}
body.ymh-calm-home .passport-sheet-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: "Montserrat", -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
  color: var(--text-primary);
}
body.ymh-calm-home .appshell-rail .passport-sheet-head .passport-sheet-close {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: none;
  position: static !important;
  width: 44px;
  height: 44px;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: var(--radius-pill, 999px);
  background: transparent !important;
  color: var(--text-primary);
  cursor: pointer;
}
body.ymh-calm-home .appshell-rail .passport-sheet-close::before,
body.ymh-calm-home .appshell-rail .passport-sheet-close::after { content: none !important; display: none !important; }
/* Phone (Figma 19:7422): the open drawer is the whole screen, on the
   drawer ground, with no drag handle. */
@media (max-width: 767.98px) {
  body.ymh-calm-home .appshell-rail[data-expanded="true"] {
    top: 0 !important;
    bottom: 0 !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 16px 20px 20px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: var(--brand-ivory-hull) !important;
    z-index: 95 !important;
  }
  body.ymh-calm-home .appshell-rail[data-expanded="true"]::before { display: none !important; }
}

/* Audit B5: the guide bubble ("The engineer knows your boat...") is not
   in page 20 and sat over the Safety checks chip; the calm home does not
   draw it (as the 0608 landing does not). Every other page keeps it. */
body.ymh-calm-home .eng-guide-bubble { display: none !important; }

/* Audit B4: the drawer is modal. passport.js's backdrop dims and covers
   the page and the sidebar (z above the sidebar's 100 and its scrim),
   takes every click behind the sheet, and closes the drawer on a click.
   Other pages that load passport.js never draw it. */
.passport-sheet-backdrop { display: none; }
body.ymh-calm-home .passport-sheet-backdrop:not([hidden]) {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(23, 28, 47, 0.35);
}
body.ymh-calm-home .appshell-rail[data-expanded="true"] { z-index: 120 !important; }

/* Spec 0599b B2 · one column for the whole home at every width: the
   greeting, the cards, the chips, the Free line, the composer and the
   disclaimer share its edges. 1024 and up: 784 wide in the main area
   (19:2). 768 to 1023: a 40 px gutter and a 720 px column (213:14013).
   Below 768: a 16 px gutter (19:370). --home-col-x is the column's
   distance from the screen edge, for the pinned rows below 1024. */
@media (max-width: 1023.98px) {
  body.ymh-calm-home { --home-col-x: max(40px, calc((100vw - 720px) / 2)); --home-foot: max(10px, env(safe-area-inset-bottom)); }
  body.ymh-calm-home .oemd-hero-block { max-width: none; padding: 40px var(--home-col-x) 8px; }
}
@media (max-width: 767.98px) {
  body.ymh-calm-home { --home-col-x: 16px; }
  /* Owner 2026-10-24, "can the ai disclaimer be smaller": 11/14 on a phone
     (was 11.5/16) and 6 px under the composer (was 11). The copy is #953's. */
  body.ymh-calm-home { --home-disc-gap: 6px; }
  .oemd-chat-hero .eng-disclaimer { font-size: 11px; line-height: 14px; }
  /* The main column already pads 14; the greeting 20 px under the top bar. */
  body.ymh-calm-home .oemd-hero-block { padding: 6px 2px 8px; }
}
/* Below 1024 the composer is pinned on the empty home exactly as in a
   conversation (the body.eng-chatting rule earlier in this file), so it
   does not move on the first message (S5 criterion 2). Bottom up: the
   disclaimer, 11 px, the composer, 8 px, the Free line, 8 px, the chips
   (19:370, 213:14013). */
@media (max-width: 1023.98px) {
  body.ymh-calm-home .oemd-chat-hero .eng-input-wrap,
  body.ymh-calm-home .home-limit {
    position: fixed !important;
    left: var(--home-col-x);
    right: var(--home-col-x);
    /* Audit B3: the disclaimer sits under the composer, in the empty home
       and in a conversation alike, so the composer keeps one position in
       both (criterion 2). --home-disc-h is the disclaimer's measured
       height (home.js). */
    bottom: calc(var(--kb, 0px) + var(--home-foot) + var(--home-disc-h, 48px) + var(--home-disc-gap, 11px));
    z-index: 70;
    width: auto !important;
    max-width: none !important;
    margin: 0;
  }
  body.ymh-calm-home .home-limit { border-radius: var(--radius-md, 12px); padding: 12px 16px !important; }
  body.ymh-calm-home:not(.eng-chatting) .home-skills {
    position: fixed;
    left: var(--home-col-x);
    right: var(--home-col-x);
    bottom: calc(var(--kb, 0px) + var(--home-foot) + var(--home-disc-h, 48px) + var(--home-disc-gap, 11px) + var(--composer-h, 106px) + 8px);
    z-index: 69;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  /* Spec 0599b section 6 (19:1449): the near limit line sits between the
     chips and the composer; the chips step up by its height. */
  /* 0599b section 17: the verify notice sits right above the composer
     (19:2142), the Free line above it, the chips above both. */
  /* Spec 0599l (audit B, LEAD ruling): below 1024 the reminder and the
     kept boat line sit in the page flow, above the pinned chips and
     composer, never pinned over them (the four line nudge at 390 covered
     the chips). Only the near limit line stays in the pinned stack. */
  body.ymh-calm-home.home-asks-near { --home-asks-h: 24px; }
  body.ymh-calm-home:not(.eng-chatting) .home-skills {
    bottom: calc(var(--kb, 0px) + var(--home-foot) + var(--home-disc-h, 48px) + var(--home-disc-gap, 11px) + var(--composer-h, 106px) + 8px + var(--home-asks-h, 0px));
  }
  body.ymh-calm-home:not(.eng-chatting) .home-asks-left {
    position: fixed;
    left: var(--home-col-x);
    right: var(--home-col-x);
    bottom: calc(var(--kb, 0px) + var(--home-foot) + var(--home-disc-h, 48px) + var(--home-disc-gap, 11px) + var(--composer-h, 106px) + 8px);
    z-index: 69;
    margin: 0;
  }
  body.ymh-calm-home:not(.eng-chatting) .home-verify { position: static; margin: 16px 0 0; }
  /* The screen matrix (owner 2026-10-23): from 768 to 1023 the in flow
     notice ran up to 28 px wider than the column on each side (the hero's
     own padding). The hero is centred at every width, so the notice takes
     the column's width and centres in it, edge for edge with the pinned
     composer. */
  body.ymh-calm-home:not(.eng-chatting) .home-verify {
    box-sizing: border-box;
    width: calc(100vw - 2 * var(--home-col-x));
    max-width: none;
    justify-self: center;
  }
  /* A notice under another shown notice (the kept line, 0608's exists
     line) sits 8px under it, not 16, so the stack reads as one group. */
  body.ymh-calm-home:not(.eng-chatting) .home-verify:not([hidden]) ~ .home-verify:not([hidden]) { margin-top: 8px; }
  body.ymh-calm-home:not(.eng-chatting) .home-skills::-webkit-scrollbar { display: none; }
  body.ymh-calm-home:not(.eng-chatting) .home-skill { flex: none; }
  /* The column fills the screen so the disclaimer settles at its foot,
     just above the pinned chips and composer, instead of floating under
     a short home. */
  body.ymh-calm-home:not(.eng-chatting) .appshell-main {
    display: flex !important;
    flex-direction: column;
    min-height: calc(100dvh - 56px) !important;
    /* 901 to 1023 kept the desktop's fixed, clipped column (only the
       thread scrolls there), so the pinned stack covered the end of the
       page for good at 1000 by 568: the page scrolls below 1024. */
    height: auto !important;
    overflow: visible !important;
    box-sizing: border-box;
    padding-bottom: calc(var(--composer-h, 106px) + var(--home-disc-h, 48px) + 82px + var(--home-asks-h, 0px)) !important;
  }
  /* The cookie banner on a first visit (Free integration smoke, 2026-10-24):
     consent.js floats it over the pinned stack and publishes its reach from
     the screen's foot as --ymh-consent-space, but this column's own foot
     padding outranks consent.css's reserve, so the confirm notice at the
     column's foot sat under the banner. While it is open the column keeps
     the larger of the two, so the notice ends above the banner. Layout only. */
  html.ymh-consent-open body.ymh-calm-home:not(.eng-chatting) .appshell-main {
    padding-bottom: max(var(--ymh-consent-space, 0px), calc(var(--composer-h, 106px) + var(--home-disc-h, 48px) + 82px + var(--home-asks-h, 0px))) !important;
  }
  body.ymh-calm-home:not(.eng-chatting) .oemd-chat-hero { flex: 1 1 auto; }
  body.ymh-calm-home:not(.eng-chatting) .oemd-hero-block { max-height: none; overflow: visible; }
  /* Audit B3: the disclaimer pinned under the composer in both states. */
  body.ymh-calm-home .oemd-chat-hero .eng-disclaimer {
    position: fixed;
    left: var(--home-col-x);
    right: var(--home-col-x);
    bottom: calc(var(--kb, 0px) + var(--home-foot));
    z-index: 70;
    margin: 0 !important;
  }
  /* In a conversation the thread used to run the full height of the
     column, to the foot of the screen, with padding reserving the pinned
     composer and disclaimer only at its very end. So at any scroll
     position short of the end, the answer passed behind both: the
     composer card hid it, and the disclaimer, which has no background,
     showed it through its own words (owner iPhone screenshot,
     2026-10-26: the reply's last lines and the disclaimer printed over
     each other). The thread box now ends above the pinned band: the
     column reserves the foot, the disclaimer, the 11px between it and
     the composer, the composer, and 12px of air, so nothing the thread
     scrolls can reach the band at any scroll position. Measured at
     390x844: thread bottom 649, composer top 669, disclaimer 786 to 834.
     The column padding, not thread padding, because padding inside a
     scroll container scrolls with the content. */
  body.ymh-calm-home.eng-chatting .oemd-chat-hero {
    padding-bottom: calc(var(--home-foot) + var(--home-disc-h, 48px) + 11px + var(--composer-h, 106px) + 12px) !important;
  }
  body.ymh-calm-home.eng-chatting .eng-thread {
    padding-bottom: 8px !important;
  }
  /* Keyboard up: the disclaimer stands down (the rules above this block),
     so the composer drops onto the keys as before. */
  html.kb-open body.ymh-calm-home .oemd-chat-hero .eng-input-wrap,
  html.kb-open body.ymh-calm-home .home-limit {
    bottom: calc(var(--kb, 0px) + max(8px, env(safe-area-inset-bottom)));
  }
  /* ...and the column reserves the composer alone, at its keyboard
     offset, so the thread box still ends above it. */
  html.kb-open body.ymh-calm-home.eng-chatting .oemd-chat-hero {
    padding-bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--composer-h, 106px) + 12px) !important;
  }
  html.kb-open body.ymh-calm-home:not(.eng-chatting) .home-skills {
    bottom: calc(var(--kb, 0px) + max(8px, env(safe-area-inset-bottom)) + var(--composer-h, 106px) + 8px);
  }
}
@media (max-width: 767.98px) {
  /* The phone chips run off the right edge and scroll sideways (19:370). */
  body.ymh-calm-home:not(.eng-chatting) .home-skills { right: 0; padding-right: 16px; }
}
/* Phone home on a short screen (owner, 2026-10-23, an in app browser at
   about 375 by 620: "look how crampped it looks"). Below 1024 the chips,
   the composer and the disclaimer are pinned over the page, and with no
   ground of their own the cards scrolled through the gaps between them.
   1. A plate in the page colour sits under the pinned stack, so content
      passes behind it cleanly. Its top edge is the column's bottom
      padding, so nothing in flow is ever under it at the end of the page.
   2. Under 720 px tall the chips stand down on the empty home: the same
      list is one tap away under Skills in the composer (skills.js renders
      both), and the cards get the height back. */
@media (max-width: 1023.98px) {
  body.ymh-calm-home { --home-plate-top: 52px; }
  body.ymh-calm-home.eng-chatting { --home-plate-top: 0px; }
  .home-chat::before {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--kb, 0px) + var(--home-foot) + var(--home-disc-h, 48px) + var(--home-disc-gap, 11px) + var(--composer-h, 106px) + 8px + var(--home-asks-h, 0px) + var(--home-plate-top));
    z-index: 68;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 0, var(--ymh-bg) 12px);
  }
  html.kb-open .home-chat::before {
    height: calc(var(--kb, 0px) + max(8px, env(safe-area-inset-bottom)) + var(--composer-h, 106px) + 8px + var(--home-plate-top));
  }
}
@media (max-width: 1023.98px) and (max-height: 719.98px) {
  body.ymh-calm-home { --home-plate-top: 0px; }
  body.ymh-calm-home:not(.eng-chatting) .home-skills { display: none !important; }
  /* The column's foot is the plate's own height plus its 12 px fade, so
     at the end of the page the last card ends clear of the plate (the
     screen matrix caught 3 px under it at 320 by 568). */
  body.ymh-calm-home:not(.eng-chatting) .appshell-main {
    padding-bottom: calc(var(--home-foot) + var(--home-disc-h, 48px) + var(--home-disc-gap, 11px) + var(--composer-h, 106px) + 8px + var(--home-asks-h, 0px) + 12px) !important;
  }
  html.ymh-consent-open body.ymh-calm-home:not(.eng-chatting) .appshell-main {
    padding-bottom: max(var(--ymh-consent-space, 0px), calc(var(--home-foot) + var(--home-disc-h, 48px) + var(--home-disc-gap, 11px) + var(--composer-h, 106px) + 8px + var(--home-asks-h, 0px) + 12px)) !important;
  }
}
/* 0599b combined audit B P2-2 · once a conversation starts (the first
   send, or Start opening the weekly checklist) the thread replaces the
   empty home at every width: the hero leaves the flow instead of holding
   its height empty, and the thread takes the column from the top. */
body.ymh-calm-home.eng-chatting .oemd-hero-block { display: none; }
body.ymh-calm-home.eng-chatting .oemd-chat-hero .eng-thread { min-height: 0; }
/* 1024 and up the pinned block is in flow (19:2, 19:299): chips, 8, the
   composer, 8, the disclaimer, 12 to the foot of the screen; 182 px. */
@media (min-width: 1024px) {
  body.ymh-calm-home .oemd-chat-hero { row-gap: 8px; padding-bottom: 12px; }
  body.ymh-calm-home .oemd-chat-hero .eng-disclaimer { margin: 0; }
  body.ymh-calm-home .home-asks-left { margin: 0; }
}
/* Figma 19:2 draws the desktop chips as text only; the phone (19:370)
   keeps the stroke icon. */
@media (min-width: 768px) {
  body.ymh-calm-home .home-skill svg { display: none; }
  body.ymh-calm-home .home-skill { padding: 0 12px; }
}
