/* Agency onboarding (flag new_ui), js/views/onboarding-ui.js. Mockup:
   diseno/new-ui/onboarding.html. Full screen, no sidebar: a form on the left
   (360–440px) and the report preview on the right; one column on a phone,
   with the sample report first in step 2. */
body.new-ui .ou[hidden] { display: none; }
body.new-ui .ou {
  position: fixed; inset: 0; z-index: 900; overflow-y: auto;
  display: flex; flex-direction: column; background: var(--ui-bg); color: var(--ui-ink);
  font: 15px/1.55 var(--ui-font); -webkit-font-smoothing: antialiased;
}
body.new-ui .ou *, body.new-ui .ou *::before, body.new-ui .ou *::after { box-sizing: border-box; }

/* Top bar: mark, progress, leave */
body.new-ui .ou-top {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 16px;
  padding: 14px 28px; border-bottom: 1px solid var(--ui-line); background: var(--ui-card);
}
body.new-ui .ou-logo { display: flex; align-items: center; gap: 8px; font-weight: 600; }
body.new-ui .ou-logo svg { width: 26px; height: 20px; }
body.new-ui .ou-steps { flex: 1; display: flex; gap: 6px; justify-content: center; align-items: center; font-size: 13px; color: var(--ui-ink-3); }
body.new-ui .ou-steps i { width: 28px; height: 4px; border-radius: 99px; background: var(--ui-rival-soft); }
body.new-ui .ou-steps i.on { background: var(--ui-ink); }
body.new-ui .ou-steps span { margin-left: 10px; }
body.new-ui .ou-x {
  width: 36px; height: 36px; padding: 0; border-radius: 9px; border: 1px solid var(--ui-line);
  background: var(--ui-card); color: var(--ui-ink); display: grid; place-items: center; box-shadow: none;
}
body.new-ui .ou-x:hover:not(:disabled) { background: var(--ui-hover); }
body.new-ui .ou-x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.6; fill: none; }

/* Body: form | stage */
body.new-ui .ou-body { flex: 1; display: grid; grid-template-columns: minmax(360px, 440px) minmax(0, 1fr); }
body.new-ui .ou-form {
  padding: 48px 44px 40px; display: flex; flex-direction: column; gap: 18px;
  border-right: 1px solid var(--ui-line); background: var(--ui-card); min-width: 0;
}
body.new-ui .ou-form h1 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.035em; font-weight: 600; }
body.new-ui .ou-form p { margin: 0; color: var(--ui-ink-2); }
body.new-ui .ou-form label { font-size: 13.5px; font-weight: 500; display: block; margin-bottom: 6px; color: var(--ui-ink); }
body.new-ui .ou-k { font-size: 13px; color: var(--ui-ink-3) !important; }
body.new-ui .ou-in {
  width: 100%; height: 46px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-card);
  color: var(--ui-ink); padding: 0 14px; font: 15px var(--ui-font); box-shadow: none; margin: 0;
}
body.new-ui .ou-in.sm { height: 34px; font-size: 14px; padding: 0 10px; }
body.new-ui .ou-in:focus { outline: 2px solid var(--ui-accent); outline-offset: -1px; border-color: transparent; }
body.new-ui .ou-in.bad { border-color: var(--ui-neg); }
body.new-ui .ou-sel {
  appearance: none; -webkit-appearance: none; padding-right: 34px; background-repeat: no-repeat; background-position: right 12px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23707379' stroke-width='1.5'/%3E%3C/svg%3E");
}
body.new-ui .ou-err { font-size: 13px; color: var(--ui-neg) !important; margin-top: 6px !important; }
body.new-ui .ou-hint { font-size: 13px; color: var(--ui-ink-3) !important; }
body.new-ui .ou-hint.center { text-align: center; }
body.new-ui .ou-hint.tight { margin-top: -8px !important; }
body.new-ui .ou-spacer { flex: 1; }
body.new-ui .ou-w { width: 100%; }
body.new-ui .ou-form .ui-btn.lg { height: 46px; font-size: 15px; }
body.new-ui .ou-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
body.new-ui .ou-back { align-self: center; }

/* The agency row: logo, name, where it came from */
body.new-ui .ou-row { display: flex; flex-direction: column; gap: 10px; }
body.new-ui .ou-row:empty { display: none; }
body.new-ui .ou-found {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-paper-2);
}
body.new-ui .ou-found-t { min-width: 0; flex: 1; }
body.new-ui .ou-found-t b { display: block; font-weight: 600; overflow-wrap: anywhere; }
body.new-ui .ou-found-t small { display: block; color: var(--ui-ink-3); font-size: 13px; }
body.new-ui .ou-found-a { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
body.new-ui .ou-found-a .ui-link { font-size: 13.5px; }
body.new-ui .ou-upload { margin: 0 !important; font-weight: 400 !important; }
body.new-ui .ou-dark { display: flex !important; gap: 8px; align-items: center; font-weight: 400 !important; color: var(--ui-ink-2) !important; }
body.new-ui .ou-lg {
  width: 40px; height: 40px; border-radius: 9px; flex: none; display: grid; place-items: center; overflow: hidden;
  background: var(--ui-card); border: 1px solid var(--ui-line); font: 600 15px var(--ui-font); color: var(--ui-ink-2);
}
body.new-ui .ou-lg.sm { width: 26px; height: 26px; border-radius: 7px; font-size: 11px; }
body.new-ui .ou-lg img { width: 72%; height: 72%; object-fit: contain; }
body.new-ui .ou-lg.dark { background: #0e0f11; border-color: #0e0f11; }
body.new-ui .ou-lg.init { background: var(--ui-rival-soft); border-color: transparent; }
body.new-ui .ou-lg.ghost { background: var(--ui-rival-soft); border-color: transparent; color: var(--ui-ink-3); }
body.new-ui .ou-lg.skel, body.new-ui .skel-line {
  background: linear-gradient(90deg, var(--ui-rival-soft), var(--ui-line-2), var(--ui-rival-soft));
  background-size: 200% 100%; animation: ou-sweep 1.2s linear infinite; border-color: transparent;
}
body.new-ui .skel-line { display: block; height: 12px; width: 140px; border-radius: 4px; margin: 4px 0; }
body.new-ui .skel-line.short { width: 200px; height: 10px; }
@keyframes ou-sweep { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { body.new-ui .ou-lg.skel, body.new-ui .skel-line { animation: none; } }

/* Stage: the report preview */
body.new-ui .ou-stage {
  padding: 40px 44px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; min-width: 0;
}
body.new-ui .ou-cap { font-size: 13px; color: var(--ui-ink-3); display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 0; }
body.new-ui .ou-rep {
  width: 100%; max-width: 760px; background: var(--ui-card); border: 1px solid var(--ui-line);
  border-radius: 14px; box-shadow: var(--ui-shadow); overflow: hidden;
}
body.new-ui .ou-rep-top { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--ui-line); }
body.new-ui .ou-rep-top .pb { font-size: 12.5px; color: var(--ui-ink-3); }
body.new-ui .ou-ag { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
body.new-ui .ou-ag b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.new-ui .ou-ag.ghost b { color: var(--ui-ink-3); font-weight: 500; }
body.new-ui .ou-rep-top .dt { margin-left: auto; font-size: 12.5px; color: var(--ui-ink-3); }
body.new-ui .ou-rep-h { padding: 22px 22px 4px; }
body.new-ui .ou-rep-h small { font-size: 13px; color: var(--ui-ink-3); }
body.new-ui .ou-rep-h h2 { margin: 2px 0 0; font-size: 24px; letter-spacing: -.03em; font-weight: 600; }
body.new-ui .ou-rep-g { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; padding: 16px 22px 22px; }
body.new-ui .ou-tile { border: 1px solid var(--ui-line); border-radius: 11px; padding: 16px; min-width: 0; }
body.new-ui .ou-tile .l { font-size: 12.5px; color: var(--ui-ink-2); }
body.new-ui .ou-tile .big { font: 500 44px/1 var(--ui-font); letter-spacing: -.05em; margin-top: 8px; display: flex; align-items: baseline; gap: 8px; }
body.new-ui .ou-tile .big.muted { color: var(--ui-ink-3); }
body.new-ui .ou-tile .big small { font: 500 13px var(--ui-font); letter-spacing: 0; color: var(--ui-ink-2); }
body.new-ui .ou-tile .v { font-size: 18px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; color: var(--ui-accent-ink); }
body.new-ui .ou-tile .s { font-size: 14px; color: var(--ui-ink-3); margin-top: 6px; }
body.new-ui .ou-fade { position: relative; }
body.new-ui .ou-fade::after { content: ""; position: absolute; inset: auto 0 0 0; height: 60px; background: linear-gradient(transparent, var(--ui-card)); }

/* Step 2: the real sample report, framed */
body.new-ui .ou-seg { display: inline-flex; background: var(--ui-paper-2); border: 1px solid var(--ui-line); border-radius: 9px; padding: 3px; }
body.new-ui .ou-seg button {
  border: 0; background: none; border-radius: 6px; padding: 4px 11px; font: 13px var(--ui-font);
  color: var(--ui-ink-2); box-shadow: none; height: auto;
}
body.new-ui .ou-seg button:hover:not(:disabled) { background: none; color: var(--ui-ink); }
body.new-ui .ou-seg button.on, body.new-ui .ou-seg button.on:hover:not(:disabled) { background: var(--ui-card); color: var(--ui-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
body.new-ui .ou-stage:has(.ou-frame) { justify-content: flex-start; padding-top: 24px; padding-bottom: 24px; }
body.new-ui .ou-frame {
  width: 100%; max-width: 820px; flex: 1; min-height: 560px; height: calc(100vh - 150px);
  border: 1px solid var(--ui-line); border-radius: 14px; background: var(--ui-card); box-shadow: var(--ui-shadow);
}
body.new-ui .ou-list { display: flex; flex-direction: column; gap: 12px; }
body.new-ui .ou-check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 14px; color: var(--ui-ink-2); }
body.new-ui .ou-check svg { width: 18px; height: 18px; stroke: var(--ui-accent-ink); stroke-width: 1.8; fill: none; margin-top: 2px; }

/* Step 3: market and the two ways to start */
body.new-ui .ou-mk { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
body.new-ui .ou-paths { display: grid; gap: 10px; }
body.new-ui .ou-path { border: 1px solid var(--ui-line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
body.new-ui .ou-path b { font-weight: 600; }
body.new-ui .ou-path p { font-size: 13.5px; }
body.new-ui .ou-path .ui-btn { margin-top: 6px; height: 42px; }
body.new-ui .ou-path.used { background: var(--ui-paper-2); }

/* Step 3: the client's name, the market said on the free card, the status */
body.new-ui .ou-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; margin-top: -6px; }
body.new-ui .ou-name-row .ou-name-k { color: var(--ui-ink-3); font-size: 13px; }
body.new-ui .ou-name-row b { font-weight: 600; overflow-wrap: anywhere; }
body.new-ui .ou-name-row .ou-in.sm { flex: 1; min-width: 150px; width: auto; }
body.new-ui .ou-path-mk { font-size: 13px !important; color: var(--ui-ink-3) !important; }
body.new-ui .ou-status { font-size: 14px; font-weight: 600; color: var(--ui-accent-ink) !important; margin: 4px 0 0 !important; }
body.new-ui .ou-path-more { align-self: flex-start; font-size: 13.5px; }

/* Step 2 on a phone: a short card that fades out and opens full screen */
body.new-ui .ou-frame-wrap { position: relative; width: 100%; max-width: 820px; flex: 1; display: flex; flex-direction: column; }
body.new-ui .ou-frame-tap { display: none; }

/* Steps 4–6 and the confirmation: one centered column */
body.new-ui .ou-col-body { display: block; }
body.new-ui .ou-col {
  max-width: 720px; margin: 0 auto; padding: 48px 24px 56px; display: flex; flex-direction: column; gap: 18px;
}
body.new-ui .ou-col h1 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.035em; font-weight: 600; }
body.new-ui .ou-col .ou-lede { margin: 0; color: var(--ui-ink-2); }
body.new-ui .ou-col .ou-k, body.new-ui .ou-col .ou-hint { margin: 0; }
body.new-ui .ou-col a { color: inherit; text-decoration: underline; }
body.new-ui .ou-wait { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px solid var(--ui-line); border-radius: 12px; background: var(--ui-card); }
body.new-ui .ou-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: q; }
body.new-ui .ou-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; min-height: 52px;
  border: 1px solid var(--ui-line); border-radius: 11px; background: var(--ui-card);
}
body.new-ui ol.ou-items .ou-item::before { counter-increment: q; content: counter(q); font: 500 13px var(--ui-font); color: var(--ui-ink-3); min-width: 16px; }
body.new-ui .ou-item > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
body.new-ui .ou-item small { color: var(--ui-ink-3); }
body.new-ui .ou-item .fav { width: 20px; height: 20px; border-radius: 4px; flex: none; }
body.new-ui .ou-item-x {
  width: 36px; height: 36px; padding: 0; flex: none; border-radius: 9px; border: 1px solid transparent;
  background: none; color: var(--ui-ink-3); display: grid; place-items: center; box-shadow: none;
}
body.new-ui .ou-item-x:hover:not(:disabled) { background: var(--ui-hover); color: var(--ui-ink); }
body.new-ui .ou-item-x svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.6; fill: none; }
body.new-ui .ou-add { display: flex; gap: 10px; }
body.new-ui .ou-add .ou-in { flex: 1; min-width: 0; }
body.new-ui .ou-col .ui-btn.lg { height: 46px; font-size: 15px; }
body.new-ui .ou-nav { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 6px; }
body.new-ui .ou-who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; font-size: 14px; }
body.new-ui .ou-who .pb, body.new-ui .ou-who .for { color: var(--ui-ink-3); font-size: 13px; }
/* The label sits on its own line above the agency, like the report header:
   inline, "Preparado por Faro Digital" broke into three lines on a phone. */
body.new-ui .ou-who { row-gap: 4px; }
body.new-ui .ou-who .pb { flex-basis: 100%; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
body.new-ui .ou-chips { display: flex; gap: 8px; flex-wrap: wrap; }
body.new-ui .ou-chip { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--ui-paper-2); border: 1px solid var(--ui-line); color: var(--ui-ink-2); }
body.new-ui .ou-period { display: flex; }
body.new-ui .ou-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
body.new-ui .ou-plan {
  position: relative; border: 1px solid var(--ui-line); border-radius: 14px; padding: 22px; background: var(--ui-card);
  display: flex; flex-direction: column; gap: 6px;
}
body.new-ui .ou-plan.best { border-color: var(--ui-ink); }
body.new-ui .ou-plan h3 { margin: 0; font-size: 17px; font-weight: 600; }
body.new-ui .ou-plan-tag { position: absolute; top: -11px; left: 18px; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--ui-ink); color: var(--ui-card); }
body.new-ui .ou-price { font: 500 36px/1.1 var(--ui-font); letter-spacing: -.04em; }
body.new-ui .ou-per { margin: 0; font-size: 13px; color: var(--ui-ink-3); }
body.new-ui .ou-plan ul { margin: 8px 0 12px; padding-left: 18px; font-size: 14px; color: var(--ui-ink-2); display: flex; flex-direction: column; gap: 4px; flex: 1; }
body.new-ui .ou-facts { display: flex; flex-direction: column; border: 1px solid var(--ui-line); border-radius: 14px; background: var(--ui-card); }
body.new-ui .ou-fact { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 16px 18px; }
body.new-ui .ou-fact + .ou-fact { border-top: 1px solid var(--ui-line); }
body.new-ui .ou-fact span { font-size: 13px; color: var(--ui-ink-3); padding-top: 1px; }
body.new-ui .ou-fact p { margin: 0; overflow-wrap: anywhere; }

/* Leave dialog */
body.new-ui .ou-scrim { position: fixed; inset: 0; z-index: 3; background: rgba(14, 15, 17, .35); display: grid; place-items: center; padding: 16px; }
body.new-ui .ou-dlg {
  width: 100%; max-width: 400px; background: var(--ui-card); border: 1px solid var(--ui-line);
  border-radius: 14px; padding: 24px; box-shadow: var(--ui-shadow);
}
body.new-ui .ou-dlg h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.02em; }
body.new-ui .ou-dlg p { margin: 0 0 20px; color: var(--ui-ink-2); }
body.new-ui .ou-dlg-a { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Phone: one column, the sample first in step 2, full-width 46px buttons */
@media (max-width: 900px) {
  body.new-ui .ou-top { padding: 12px 16px; }
  body.new-ui .ou-steps span { display: none; }
  body.new-ui .ou-steps i { width: 16px; }
  body.new-ui .ou-body { grid-template-columns: minmax(0, 1fr); }
  body.new-ui .ou-form { padding: 28px 16px; border-right: 0; border-bottom: 1px solid var(--ui-line); }
  body.new-ui .ou-form h1 { font-size: 25px; }
  body.new-ui .ou-stage { padding: 24px 16px 40px; }
  body.new-ui .ou-stage-first { order: -1; padding-bottom: 8px; }
  body.new-ui .ou-frame-wrap { height: 360px; flex: none; overflow: hidden; border-radius: 14px; }
  body.new-ui .ou-frame { height: 620px; min-height: 0; flex: none; }
  body.new-ui .ou-frame-wrap::after {
    content: ""; position: absolute; inset: auto 1px 1px 1px; height: 120px; border-radius: 0 0 13px 13px; pointer-events: none;
    background: linear-gradient(transparent, var(--ui-card) 85%);
  }
  body.new-ui .ou-frame-tap {
    display: flex; position: absolute; inset: 0; z-index: 1; align-items: flex-end; justify-content: center;
    padding-bottom: 16px; text-decoration: none; color: var(--ui-ink);
  }
  body.new-ui .ou-frame-tap span {
    position: relative; z-index: 1; font-size: 13.5px; font-weight: 500; padding: 7px 14px; border-radius: 99px;
    background: var(--ui-card); border: 1px solid var(--ui-line); box-shadow: var(--ui-shadow);
  }
  body.new-ui .ou-s2 > * { order: 3; }
  body.new-ui .ou-s2 > .ou-s2-top { order: 1; }
  body.new-ui .ou-s2 > .ou-s2-cta { order: 2; }
  body.new-ui .ou-s2 > .ou-spacer { display: none; }
  body.new-ui .ou-col { padding: 28px 16px 40px; }
  body.new-ui .ou-col h1 { font-size: 25px; }
  body.new-ui .ou-plans { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  body.new-ui .ou-nav .ui-btn { flex: 1; }
  body.new-ui .ou-fact { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  body.new-ui .ou-rep-g { grid-template-columns: minmax(0, 1fr); }
  body.new-ui .ou-tile .big { font-size: 36px; }
  body.new-ui .ou-mk { grid-template-columns: minmax(0, 1fr); }
  body.new-ui .ou-dlg-a .ui-btn { flex: 1; }
}

/* How we measure (P5): under the sample and on the plan step */
body.new-ui .ou-trust { width: 100%; max-width: 820px; margin-top: 14px; }
body.new-ui .ou-trust ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
body.new-ui .ou-trust li { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ui-ink-2); }
body.new-ui .ou-trust svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; flex: none; }
body.new-ui .ou-founder { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 0; font-size: 13.5px; color: var(--ui-ink-2); }
body.new-ui .ou-founder a { color: var(--ui-ink); }
body.new-ui .ou-legacy .ou-trust { margin: 18px auto 0; }
@media (max-width: 900px) {
  body.new-ui .ou-trust ul { flex-direction: column; align-items: flex-start; gap: 8px; }
  body.new-ui .ou-founder { justify-content: flex-start; text-align: left; }
  /* The sample sits above the form here: its trust list would push the CTA
     off the first screen. The plan step still carries it. */
  body.new-ui .ou-stage-first .ou-trust { display: none; }
}
