/* ============================================================================
   Career Leap states.css: the seven relationships between a person and the system, plus M0 (moving between places).
     M1 control feedback (atoms, see atoms.css) · M2 she gives · M3 system works · M4 system gives
     M5 nothing here · M6 can't proceed · M7 she's stuck · M0 moving between places
   ONE SOURCE PER COMPONENT (round A2/C1 ruling 3): this file holds only state PATTERNS (upload row and dropzone, analysis wait, job chip,
   voice, one-time code, snackbar, saved, draw-on, reveal, empty, alert and banner, nudge, helper, sheet). Controls are the real atoms
   (cl-button, cl-chip, cl-icon-button, cl-input, cl-switch, cl-spinner, cl-progress, cl-skeleton) and the molecules (cl-choice-card, cl-list-item).
   Documentation layout (screens, columns, playground) is css/docs-states.css; specimen mirrors are css/docs-specimens.css.
   Rules: every value is a token. Only transform and opacity animate. Hover only under (hover:hover) and (pointer:fine).
   Disabled = solid colours. Validation state is data-validity; progress state is data-status (data-state is a docs-only mirror attribute).
   Layer cl.states.  Class prefix cl-st-.
   ========================================================================== */
@layer cl.states {
.cl-st-job {
  display: inline-flex; align-items: center; gap: var(--cl-space-12); max-width: 100%;
  min-height: var(--cl-size-control-48); padding: var(--cl-space-8) var(--cl-space-16);
  border: var(--cl-border-width-1) solid var(--cl-color-border-strong); border-radius: var(--cl-radius-999);
  background: var(--cl-color-surface-raised); color: var(--cl-color-on-surface);
  font-size: var(--cl-type-body-small-size); line-height: var(--cl-type-body-small-line-height);
}
.cl-st-job strong { font-weight: var(--cl-font-weight-semibold); }
/* ============================================================================
   M2 · SHE GIVES: fields, upload, parsed preview, voice, OTP
   ========================================================================== */
.cl-st-msg { display: none; grid-template-columns: var(--cl-size-icon-20) minmax(0, 1fr); gap: var(--cl-space-8); align-items: center; font-size: var(--cl-type-body-small-size); line-height: var(--cl-type-body-small-line-height); }
.cl-st-msg--error { color: var(--cl-color-on-error-container); }
.cl-st-msg--ok { color: var(--cl-color-on-success-container); }
.cl-st-msg--error .cl-icon { color: var(--cl-color-error); }
.cl-st-msg--ok .cl-icon { color: var(--cl-color-success); }
.cl-st-field[data-validity="error"] .cl-st-msg--error, .cl-st-field[data-validity="ok"] .cl-st-msg--ok, .cl-st-msg.is-shown { display: grid; }
.cl-st-field[data-validity="error"] .cl-st-msg--error { animation: cl-st-enter var(--cl-motion-fade-enter) var(--cl-easing-emphasized-decelerate) both; }
@keyframes cl-st-enter { from { opacity: 0; transform: translateY(calc(var(--cl-motion-shift) * -1)); } to { opacity: 1; transform: none; } }
@keyframes cl-st-enter-up { from { opacity: 0; transform: translateY(var(--cl-motion-shift)); } to { opacity: 1; transform: none; } }
/* File rows: one pattern, five states (queued, uploading, done, error, removed-confirm) */
.cl-st-files { list-style: none; padding: 0; display: grid; gap: var(--cl-space-8); }
.cl-st-file {
  display: grid; grid-template-columns: var(--cl-size-icon-24) minmax(0, 1fr) auto; gap: var(--cl-space-4) var(--cl-space-12); align-items: center;
  padding: var(--cl-space-12) var(--cl-space-16); border: var(--cl-border-width-1) solid var(--cl-color-border); border-radius: var(--cl-radius-12); background: var(--cl-color-surface-raised);
}
.cl-st-file__name { font-size: var(--cl-type-label-size); line-height: var(--cl-type-label-line-height); font-weight: var(--cl-type-label-weight); overflow-wrap: anywhere; }
.cl-st-file__meta { grid-column: 2 / 3; font-size: var(--cl-type-body-small-size); line-height: var(--cl-type-body-small-line-height); color: var(--cl-color-on-surface-muted); }
.cl-st-file .cl-progress { grid-column: 2 / -1; }
.cl-st-file__actions { grid-column: 3; grid-row: 1 / span 2; display: flex; gap: var(--cl-space-4); align-items: center; }
.cl-st-file[data-status="error"] { border-color: var(--cl-color-error); background: var(--cl-color-error-container); color: var(--cl-color-on-error-container); }
.cl-st-file[data-status="error"] .cl-st-file__meta { color: var(--cl-color-on-error-container); }
.cl-st-file[data-status="done"] > .cl-icon:first-child { color: var(--cl-color-success); }
.cl-st-file[data-status="error"] > .cl-icon:first-child { color: var(--cl-color-error); }
/* Dropzone (laptop): real <input type=file> inside a label; dashed border-strong; drag-over is a state, not just a colour */
.cl-st-drop {
  position: relative; display: grid; justify-items: center; gap: var(--cl-space-8); text-align: center;
  padding: var(--cl-space-32) var(--cl-space-24); border: var(--cl-border-width-2) dashed var(--cl-color-border-strong); border-radius: var(--cl-radius-16);
  background: var(--cl-color-surface); color: var(--cl-color-on-surface);
}
.cl-st-drop__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
/* keyboard focus only: a mouse click on the dropzone does not ring it */
.cl-st-drop:has(.cl-st-drop__input:focus-visible) { outline: var(--cl-border-width-2) solid var(--cl-color-focus-ring); outline-offset: 2px; box-shadow: 0 0 0 4px var(--cl-color-background); }
/* The dropzone is a LAPTOP pattern: below 840 the button composition replaces it (round C1 finding 14). The docs laptop frame re-shows it. */
@media (max-width: 839px) { .cl-st-drop { display: none; } }
.cl-st-drop.is-dragover, .cl-st-drop[data-dragover="true"] { border-style: solid; border-color: var(--cl-color-selected-border); background: var(--cl-color-selected-container); color: var(--cl-color-on-selected-container); }
.cl-st-drop__title { font-size: var(--cl-type-heading-4-size); line-height: var(--cl-type-heading-4-line-height); font-weight: var(--cl-type-heading-4-weight); }
.cl-st-drop__sub { font-size: var(--cl-type-body-small-size); line-height: var(--cl-type-body-small-line-height); color: var(--cl-color-on-surface-muted); }
.cl-st-drop.is-dragover .cl-st-drop__sub { color: var(--cl-color-on-selected-container); }
.cl-st-drop__btn { position: relative; z-index: 1; pointer-events: none; }
/* OTP: ONE native input styled as six cells (round C1 ruling 14). Paste, SMS autofill, WebOTP and Gboard backspace all work natively:
   <input class="cl-st-otp__input" type="text" inputmode="numeric" autocomplete="one-time-code" maxlength="6" pattern="\d{6}">.
   The cells are two background layers (fill + a 2px base line) tiled at the digit pitch; letter-spacing = pitch - 1ch puts each tabular digit
   in the middle of its cell. 6 x 40 + 5 x 8 = 280 wide: fits 320 with a 16 margin. */
.cl-st-otp__input {
  --_cell: var(--cl-size-control-40); --_gap: var(--cl-space-8); --_pitch: calc(var(--_cell) + var(--_gap)); --_line: var(--cl-color-border-strong);
  display: block; width: calc(var(--_pitch) * 6 - var(--_gap)); max-width: 100%;
  min-height: var(--cl-size-control-56); padding: 0 0 0 calc((var(--_cell) - 1ch) / 2);
  border: 0; border-radius: var(--cl-radius-4);
  font-family: var(--cl-font-family-sans); font-size: var(--cl-type-heading-3-size); font-weight: var(--cl-font-weight-semibold);
  font-variant-numeric: tabular-nums; letter-spacing: calc(var(--_pitch) - 1ch);
  color: var(--cl-color-on-surface);
  background:
    linear-gradient(to right, var(--_line) 0 var(--_cell)) 0 100% / var(--_pitch) var(--cl-border-width-2) repeat-x,
    linear-gradient(to right, var(--cl-color-surface-raised) 0 var(--_cell)) 0 0 / var(--_pitch) 100% repeat-x;
}
.cl-st-otp__input:focus-visible { outline: var(--cl-border-width-2) solid var(--cl-color-focus-ring); outline-offset: var(--cl-border-width-2); box-shadow: 0 0 0 calc(var(--cl-border-width-2) * 3) var(--cl-color-focus-halo); }
.cl-st-field[data-validity="error"] .cl-st-otp__input { --_line: var(--cl-color-error); }
.cl-st-field[data-validity="ok"] .cl-st-otp__input { --_line: var(--cl-color-success); }
/* a lone action is full width on a phone; the screen container query below turns it back to auto on a laptop */
/* ============================================================================
   M4 · SYSTEM GIVES: snackbar, saved, artefact ready, reveal
   ========================================================================== */
     



.cl-st-snack {
  display: flex; align-items: center; gap: var(--cl-space-8); min-height: var(--cl-toast-min-height); max-width: var(--cl-toast-max-width);
  padding: var(--cl-space-4) var(--cl-space-4) var(--cl-space-4) var(--cl-space-16); border-radius: var(--cl-toast-radius);
  background: var(--cl-color-inverse-surface); color: var(--cl-color-on-inverse-surface);
  box-shadow: var(--cl-elevation-2);
  font-size: var(--cl-type-body-small-size); line-height: var(--cl-type-body-small-line-height);
  opacity: 0; transform: translateY(var(--cl-motion-shift)); pointer-events: none; visibility: hidden;
  transition: opacity var(--cl-motion-fade-exit) var(--cl-easing-emphasized-accelerate), transform var(--cl-duration-200) var(--cl-easing-emphasized-accelerate), visibility 0s linear var(--cl-duration-200);
}
.cl-st-snack.is-open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity var(--cl-motion-fade-enter) var(--cl-easing-emphasized-decelerate), transform var(--cl-duration-300) var(--cl-easing-emphasized-decelerate), visibility 0s; }
.cl-st-snack__text { flex: 1; min-width: 0; }
.cl-st-snack__btn {                       /* Undo: on-inverse-surface text, underlined and 600 so it reads as an action; gold is a mark, never text (ruling 17) */
  position: relative; min-height: var(--cl-size-control-48); padding-inline: var(--cl-space-12); border-radius: var(--cl-radius-8);
  font-size: var(--cl-type-label-size); font-weight: var(--cl-font-weight-semibold); color: inherit;
  text-decoration: underline; text-underline-offset: var(--cl-space-4);
}
.cl-st-snack__btn:focus-visible { outline: var(--cl-border-width-2) solid var(--cl-color-on-inverse-surface); outline-offset: -2px; box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .cl-st-snack__btn:hover { text-decoration-thickness: var(--cl-border-width-2); } }
.cl-st-snack__x { color: inherit; display: grid; place-items: center; width: var(--cl-icon-button-target); height: var(--cl-icon-button-target); border-radius: var(--cl-radius-999); }
.cl-st-snack__x:focus-visible { outline: var(--cl-border-width-2) solid var(--cl-color-on-inverse-surface); outline-offset: -4px; box-shadow: none; }
.cl-st-snack__clock { position: absolute; left: 0; bottom: 0; height: var(--cl-space-2); width: 100%; background: var(--cl-color-inverse-mark); transform-origin: left center; transform: scaleX(0); border-radius: var(--cl-radius-999); }
.cl-st-snack { position: relative; overflow: hidden; }
.cl-st-snack.is-running .cl-st-snack__clock { animation: cl-st-clock var(--cl-timing-undo-window) linear forwards; transform: scaleX(1); }
.cl-st-snack.is-paused .cl-st-snack__clock { animation-play-state: paused; }
@keyframes cl-st-clock { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.cl-st-saved { display: inline-flex; align-items: center; gap: var(--cl-space-4); color: var(--cl-color-on-success-container); font-size: var(--cl-type-body-small-size); line-height: var(--cl-type-body-small-line-height); min-height: var(--cl-size-icon-24); }
.cl-st-saved .cl-icon { color: var(--cl-color-success); }
.cl-st-saved.is-in { animation: cl-st-fade var(--cl-motion-duration-fade) var(--cl-easing-standard) both; }
@keyframes cl-st-fade { from { opacity: 0; } to { opacity: 1; } }
/* ============================================================================
   M5 · NOTHING HERE
   ========================================================================== */
.cl-st-spot { width: min(100%, 15rem); height: auto; flex: none; } /* lint-allow: component measure in rem so it follows text size (menu, panel, column or frame width); no layout token holds this value */
/* ============================================================================
   M6 · CAN'T PROCEED
   ========================================================================== */
.cl-st-alert {
  display: grid; grid-template-columns: var(--cl-size-icon-24) minmax(0, 1fr); gap: var(--cl-space-4) var(--cl-space-12); align-items: center;
  padding: var(--cl-space-16); border-radius: var(--cl-radius-12); border: var(--cl-border-width-1) solid var(--cl-color-error);
  background: var(--cl-color-error-container); color: var(--cl-color-on-error-container);
}
.cl-st-alert > .cl-icon { color: var(--cl-color-error); margin-top: var(--cl-space-2); }
.cl-st-alert__body { display: grid; gap: var(--cl-space-8); justify-items: start; min-width: 0; }
.cl-st-alert__title { font-size: var(--cl-type-heading-4-size); line-height: var(--cl-type-heading-4-line-height); font-weight: var(--cl-type-heading-4-weight); }
.cl-st-alert p, .cl-st-alert li { font-size: var(--cl-type-body-size); line-height: var(--cl-type-body-line-height); }
.cl-st-alert--warning { background: var(--cl-color-warning-container); color: var(--cl-color-on-warning-container); border-color: var(--cl-color-warning); }
.cl-st-alert--warning > .cl-icon { color: var(--cl-color-warning); }
.cl-st-alert--info { background: var(--cl-color-info-container); color: var(--cl-color-on-info-container); border-color: var(--cl-color-info); }
.cl-st-alert--info > .cl-icon { color: var(--cl-color-info); }
.cl-st-alert a, .cl-st-alert .cl-st-link { color: inherit; font-weight: var(--cl-font-weight-semibold); text-underline-offset: var(--cl-space-4); }
.cl-st-alert .cl-button--outlined { --_bd: currentColor; --_fg: currentColor; --_sl: currentColor; }
.cl-st-alert:focus-visible, .cl-st-alert:focus { outline: var(--cl-border-width-2) solid var(--cl-color-focus-ring); outline-offset: 2px; box-shadow: 0 0 0 4px var(--cl-color-background); }
.cl-st-alert ul { padding: 0; list-style: none; display: grid; gap: var(--cl-space-4); }
.cl-st-alert li a { display: inline-flex; align-items: center; min-height: var(--cl-size-control-40); }
.cl-st-alert.is-in { animation: cl-st-enter-up var(--cl-motion-fade-enter) var(--cl-easing-emphasized-decelerate) both; }
.cl-st-alert--bar { border-radius: var(--cl-radius-8); padding: var(--cl-space-12) var(--cl-space-16); align-items: center; }
.cl-st-alert--bar > .cl-icon { margin-top: 0; }
.cl-st-link { color: var(--cl-color-primary-text); text-underline-offset: var(--cl-space-4); }
/* ============================================================================
   M7 · SHE'S STUCK: nudge, "Stuck?" affordance, helper sheet / side panel
   ========================================================================== */
.cl-st-nudge { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--cl-space-8); align-items: center; padding: var(--cl-space-12) var(--cl-space-16); border-radius: var(--cl-radius-12); background: var(--cl-color-surface-glass-lite); -webkit-backdrop-filter: var(--cl-glass-filter); backdrop-filter: var(--cl-glass-filter); border: var(--cl-border-width-1) solid var(--cl-color-border); color: var(--cl-color-on-surface); font-size: var(--cl-type-body-small-size); line-height: var(--cl-type-body-small-line-height); }
.cl-st-nudge .cl-button--text { --_fg: var(--cl-color-primary-text); --_sl: var(--cl-color-state-layer-on-surface); }
.cl-st-nudge.is-in { animation: cl-st-enter-up var(--cl-motion-fade-enter) var(--cl-easing-emphasized-decelerate) both; }
.cl-st-helper {
  display: grid; gap: var(--cl-space-4); background: var(--cl-color-surface-overlay); color: var(--cl-color-on-surface);
}
.cl-st-helper__head { display: flex; align-items: center; justify-content: space-between; gap: var(--cl-space-8); }
.cl-st-helper__title { font-size: var(--cl-type-heading-4-size); line-height: var(--cl-type-heading-4-line-height); font-weight: var(--cl-type-heading-4-weight); }
.cl-st-helper__list { list-style: none; padding: 0; display: grid; gap: var(--cl-space-2); }
.cl-st-helper__list .cl-list-item { min-height: var(--cl-list-item-min-height-two-line); }
.cl-st-helper__list .cl-list-item__main { text-align: start; }
/* rows are the molecules' cl-list-item */
   
.cl-st-helper__consent { display: none; gap: var(--cl-space-8); padding: var(--cl-space-12) var(--cl-space-16); border: var(--cl-border-width-1) solid var(--cl-color-border-strong); border-radius: var(--cl-radius-12); background: var(--cl-color-surface-raised); }
.cl-st-helper__consent.is-open { display: grid; animation: cl-st-enter-up var(--cl-motion-fade-enter) var(--cl-easing-emphasized-decelerate) both; }
.cl-st-helper__when { display: none; flex-wrap: wrap; gap: var(--cl-space-16); }
/* chip row: 32 + 16 = 48 pitch, no overlapping hit areas */
   
.cl-st-helper__when.is-open { display: flex; }
/* ---- Reduced motion: loops stop, ticks are instant (the real media query; docs-specimens.css repeats it for the simulation switch) ---- */
@media (prefers-reduced-motion: reduce) {
  .cl-st-snack.is-running .cl-st-snack__clock { animation: none; transform: scaleX(0.5); }
}
/* ---- Forced colours / high contrast ------------------------------------- */
@media (forced-colors: active) {
  .cl-st-snack { border: var(--cl-border-width-1) solid ButtonText; }
  .cl-st-otp__input { forced-color-adjust: none; background: Canvas; color: CanvasText; border: var(--cl-border-width-1) solid ButtonText; letter-spacing: normal; padding-inline: var(--cl-space-12); }
  .cl-st-drop:has(.cl-st-drop__input:focus-visible), .cl-st-otp__input:focus-visible { box-shadow: none; outline-color: Highlight; }
}

} /* @layer cl.states */
