/* polish.css (build v16, agent "polish"): five small fixes from brainstorm-v16 (PLAN.md, "The polish list").
   Linked last. Page tokens only: no new colours, no new motion numbers. Notes: docs/design/build-v16/polish.md */

/* ---------------------------------------------------------------- 1. failure reads as failure
   failed: red rim and glow (styles.css) and, on the canvas, its tint light gives way to one soft red glow (app.js).
   stopped: the calm grey chip and lamp it already had. not sent: a neutral "Not sent" chip on the card and a hollow lamp
   in the dock, so it never looks delivered (mint) and never looks broken (red). */
.status-chip[data-kind="stopped"] + .err{color:var(--text-3)}
.dock-result[data-outcome="partial"]{--word:var(--text-1)}
.dock-result[data-outcome="partial"] .lamp{background:transparent;box-shadow:inset 0 0 0 1.5px var(--text-2)}
.dock-result[data-outcome="noemail"]{--word:var(--text-1)}
/* the failed card's tile stops glowing in its success tint */
.card[data-state="failed"] .tile{filter:saturate(.55)}

/* ---------------------------------------------------------------- 3. the hover lift: noticeable, calm, mouse only */
@media (hover:hover) and (pointer:fine){
  .card.glass{transition:transform var(--d-2) var(--ease-out)}
  .card::after{transition:opacity var(--d-2) var(--ease-out),box-shadow var(--d-2) var(--ease-out)}
  .card:hover:not(.is-dragging){transform:translateY(-4px)}
  .card:hover:not(.is-dragging)::after{box-shadow:0 34px 60px -18px rgba(3,2,15,.85),0 14px 26px -16px color-mix(in srgb,var(--tint) 55%,transparent)}
  .card.is-dragging{transform:translateY(-6px)}
}
@media (hover:none){ .card:hover:not(.is-dragging){transform:none} }
/* reduced motion: no travel, the shadow and rim light still fade in */
html.rm .card:hover:not(.is-dragging),html.rm .card.is-dragging{transform:none}

/* ---------------------------------------------------------------- 4a. touch: every control a visitor uses is at least 44 px */
@media (pointer:coarse){
  .ex-pill{height:2.75rem}
  #island-right .status{height:2.75rem}
  .dock-result{height:2.75rem}
  /* the caret keeps its look inside Test run; its hit area grows */
  .split .run-caret{position:relative}
  .split .run-caret::after{content:"";position:absolute;left:50%;top:50%;width:2.75rem;height:2.75rem;transform:translate(-50%,-50%)}
  /* things on the canvas are scaled with the camera: their hit areas are 44 screen px whatever the zoom */
  .f10-receipt::after,.open-end .plus-btn::after,.line-disc::after{content:"";position:absolute;left:50%;top:50%;
    width:max(100%,calc(2.75rem / var(--cam-k,1)));height:max(100%,calc(2.75rem / var(--cam-k,1)));transform:translate(-50%,-50%)}
}

/* ---------------------------------------------------------------- 4b. portrait phones: the headline fills the empty top band
   (it was tucked away for lack of room in the header). Under the business pill, clear of Fit; the flow is framed below it. */
@media (max-width:600px) and (orientation:portrait) and (min-height:640px){
  :root{--safe-top:12rem}
  .f10-head.docked.tucked{display:block;top:calc(var(--island-inset) + var(--island-h) + 4rem);left:var(--s-4);right:var(--s-4);width:auto;max-width:none;
    padding:0;z-index:18;transition:opacity var(--d-3) var(--ease-out)}
  .f10-head.docked.tucked .h1{font:600 1.375rem/1.75rem var(--font-sans);letter-spacing:-.02em;text-wrap:balance;text-shadow:0 2px 18px rgba(0,0,0,.7)}
  /* the bottom sheet or the business field takes the screen: the headline steps back */
  .inspector:not([hidden]) ~ .f10-head.tucked,body:has(.bz[data-state="open"]) .f10-head.tucked{opacity:0}
}

/* ---------------------------------------------------------------- 5. "Not Sam?": clears the kept name (intro.js) */
.pl-notme{pointer-events:auto;position:relative;display:inline;margin-left:.5rem;padding:0;border:0;background:none;cursor:pointer;
  font:500 .875rem/1.375rem var(--font-sans);color:var(--text-3);text-decoration:underline;text-decoration-color:rgba(255,255,255,.18);text-underline-offset:3px;
  transition:color var(--d-1) var(--ease-out),text-decoration-color var(--d-1) var(--ease-out)}
.pl-notme:hover{color:var(--text-2);text-decoration-color:currentColor}
.pl-notme:focus-visible{outline:2px solid var(--focus);outline-offset:3px;border-radius:4px}
@media (pointer:coarse){
  .pl-notme::after{content:"";position:absolute;left:50%;top:50%;width:max(100%,2.75rem);height:2.75rem;transform:translate(-50%,-50%)}
}

/* ---------------------------------------------------------------- fix round 2: the × on the shrunk business pill, thumb-sized on touch */
@media (pointer:coarse){ .bz.has-text[data-state="set"] .bz-x{width:2.75rem;height:2.75rem;margin-right:-.75rem} }

/* ---------------------------------------------------------------- fix round 2: a long toast wraps its sentence, never its buttons
   (1280: "Now starts with a phone call · …" beside the card panel squeezed "Back to the original" over two lines) */
.toast.glass > span{min-width:0}
.toast .undo{flex:none;white-space:nowrap}
