/* ============================================================
   captions-workflow — customer-facing guided journey
   nanocosmos App Page standard: navy gradient page, white card,
   Lexend Deca display + Source Sans 3 body, orange primary.
   Layout doctrine: ONE centered column, ONE page scroller.
   ============================================================ */

:root {
  /* Brand (web-css-shared) */
  --orange:        #F48220;
  --orange-dark:   #EF7D00;
  --blue:          #0F8DC8;
  --blue-dark:     #0A6FA0;
  --navy:          #00486C;

  /* Surfaces — white cards on the navy gradient page */
  --bg:            #FFFFFF;
  --bg-soft:       #F2F5F7;
  --bg-sunken:     #E9EEF1;

  /* Text — ink darkened beyond the shared sheet for 4.5:1 body contrast */
  --ink:           #1E3340;
  --muted:         #5A6B76;
  --faint:         #8295A1;
  --text-on-dark:  #FFFFFF;

  /* Lines */
  --line:          #E2E7EA;
  --line-strong:   #C9D2D8;

  /* Status */
  --ok:            #1E7B34;
  --ok-soft:       #E8F4EA;
  --err:           #C0392B;
  --err-soft:      #FBEDEB;
  --warn:          #B26A00;
  --warn-soft:     #FCF3E3;
  --live:          #D33A2C;
  --live-soft:     #FDEFED;

  --font-display:  'Lexend Deca', Helvetica, Arial, sans-serif;
  --font-body:     'Source Sans 3', 'Open Sans', Helvetica, Arial, sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm:     6px;
  --radius:        8px;
  --radius-lg:     14px;
  --shadow-sm:     0 1px 2px rgba(0, 72, 108, 0.08);
  --shadow:        0 8px 30px rgba(0, 28, 46, 0.20);
  --shadow-lg:     0 22px 60px rgba(0, 22, 36, 0.40);
  --tint-current:  #FFFAF4;     /* warm wash on the active station */

  /* Journey column — single centered axis (layout doctrine) */
  --journey-w:     860px;

  /* Semantic z-scale */
  --z-sticky:      30;
  --z-drawer:      40;
  --z-modal:       50;
  --z-toast:       60;

  --ease-out:      cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body.cw-app-bg {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(ellipse at top left, rgba(15, 141, 200, 0.7) 0%, transparent 55%) fixed,
    linear-gradient(260deg, #2b87da 0%, #00486c 55%, #05283d 100%) fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  margin: 0;
  text-wrap: balance;
}

.hidden { display: none !important; }

code { font-family: var(--font-mono); }

/* Keyboard focus — one consistent ring everywhere */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: rgba(15, 141, 200, 0.22); }

/* ── Sticky brand header (navy) ─────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--navy);
  padding: 12px 24px;
  box-shadow: var(--shadow-sm);
}
.app-header-inner {
  max-width: var(--journey-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.app-logo-link { display: inline-flex; align-items: center; flex-shrink: 0; }
.app-logo { height: 26px; width: auto; display: block; }
.app-header-titles { display: flex; flex-direction: column; min-width: 0; }
.app-eyebrow {
  margin: 0;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}
.app-title {
  margin: 1px 0 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}
.app-header-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Account chip — click opens sign-in */
.cw-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 240px;
  min-width: 0;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.cw-account:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.4); }
.cw-account__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--faint);
  flex-shrink: 0;
}
.cw-account__dot--on  { background: #4ade80; }
.cw-account__dot--off { background: #f87171; }
.cw-account__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Quiet header action (Start over) */
.cw-header-reset {
  background: none;
  border: none;
  padding: 6px 8px;
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-body);
  font-size: 12.5px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  text-decoration: none;   /* also used as a plain link (help.html) */
  transition: color 0.15s, background 0.15s;
}
.cw-header-reset:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

/* ── Page column ────────────────────────────────────────────── */
.cw-main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.cw-column {
  width: min(calc(100% - 32px), var(--journey-w));
  margin: 0 auto;
  padding: 28px 0 48px;
}

/* ── Page intro — what this is, how it works ────────────────── */
.cw-intro {
  color: #fff;
  margin: 6px 4px 22px;
}
.cw-intro__summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cw-intro__summary::-webkit-details-marker { display: none; }
.cw-intro__heading { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.cw-intro__kicker {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
}
.cw-intro__lead {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 33px);
  font-weight: 700;
  line-height: 1.14;
  color: #fff;
  text-wrap: balance;
}
.cw-intro__hint {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 5px 12px;
  transition: background 0.15s, color 0.15s;
}
.cw-intro__summary:hover .cw-intro__hint { background: rgba(255, 255, 255, 0.12); color: #fff; }
.cw-intro__sub {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}
.cw-intro__steps {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  counter-reset: intro;
}
.cw-intro__steps li {
  counter-increment: intro;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 12px 14px 12px 40px;
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  position: relative;
  transition: transform 0.18s var(--ease-out), background 0.18s, border-color 0.18s;
}
.cw-intro__steps li:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.26);
}
.cw-intro__steps li b { color: #fff; display: block; margin-bottom: 1px; }
.cw-intro__steps li::before {
  content: counter(intro);
  position: absolute;
  left: 12px;
  top: 13px;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

