/* "Analyze a brand" in the new UI, js/views/new-brand-ui.js. One wide card:
   the form and what happens next on the left, the report that comes out on
   the right (the onboarding's preview card, css/new-ui/onboarding.css).
   Decision: gensig/diseno/decision-analizar-marca.md. Plain paper-2 on the
   right, no grid or glow; the only blue is the brand once typed. */

body.new-ui .wrap.ui-wide #viewDashboard > #newBrandBox.nb-on { max-width: none; }   /* full width, like the dashboard (dashboard.css keeps older blocks at 920px) */
body.new-ui #newBrandBox.nb-on > h1, body.new-ui #newBrandBox.nb-on > .sub { display: none; }

body.new-ui .nb {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); margin: 8px 0 32px;
  border: 1px solid var(--ui-line); border-radius: 18px; background: var(--ui-card); box-shadow: var(--ui-shadow);
  overflow: hidden; min-height: min(600px, calc(100vh - 160px));
}

/* Left: the form */
body.new-ui .nb-main { padding: 48px 52px 40px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
body.new-ui .nb-k { margin: 0; font-size: 13px; font-weight: 600; color: var(--ui-ink-2); letter-spacing: .01em; }
body.new-ui .nb-main h1 { margin: 0; font-size: 32px; line-height: 1.12; letter-spacing: -.035em; font-weight: 600; color: var(--ui-ink); }
body.new-ui .nb-sub { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ui-ink-2); max-width: 50ch; }

body.new-ui .nb-form { margin-top: 10px; }
body.new-ui .nb-form #form {
  display: flex; gap: 8px; padding: 6px; margin: 0; max-width: none;
  border: 1px solid var(--ui-line); border-radius: 14px; background: var(--ui-card);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(16, 24, 40, .12);
  transition: border-color .15s, box-shadow .15s;
}
body.new-ui .nb-form #form:focus-within { border-color: var(--ui-ink); box-shadow: 0 0 0 3px rgba(16, 24, 40, .1); }
body.new-ui .nb-form #url {
  flex: 1; min-width: 0; height: 48px; border: 0; box-shadow: none; background: transparent;
  padding: 0 12px; font: 16px var(--ui-font); color: var(--ui-ink);
}
body.new-ui .nb-form #url:focus { outline: none; box-shadow: none; }
body.new-ui .nb-form #go {
  height: 48px; padding: 0 22px; border-radius: 10px; border: 1px solid var(--ui-ink); white-space: nowrap;
  background: var(--ui-ink); color: var(--ui-paper); font: 600 15px var(--ui-font); box-shadow: none;
}
body.new-ui .nb-form #go:hover:not(:disabled) { filter: none; opacity: .9; }
body.new-ui .nb-hint { margin: -4px 0 0; font-size: 13px; color: var(--ui-ink-3); }

/* What happens next: three plain lines */
body.new-ui .nb-steps {
  list-style: decimal inside; margin: 6px 0 0; padding: 20px 0 0; display: grid; gap: 8px;
  border-top: 1px solid var(--ui-line); font-size: 14.5px; line-height: 1.45; color: var(--ui-ink);
}
body.new-ui .nb-steps li::marker { color: var(--ui-ink-3); font-weight: 600; }

/* The AIs it will ask, and what each one costs */
body.new-ui .nb-surf { margin: 4px 0 0; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--ui-ink-2); }
body.new-ui .nb-surf b { font-weight: 600; color: var(--ui-ink); }
body.new-ui .nb-surf-ic { display: inline-flex; gap: 4px; flex: none; padding-top: 1px; }
body.new-ui .nb-surf-ic img { width: 18px; height: 18px; border-radius: 5px; filter: grayscale(1); opacity: .85; }
body.new-ui .nb-dx { margin: 0; font-size: 13.5px; color: var(--ui-ink-2); }
body.new-ui .nb-dx .ui-link, body.new-ui .nb-logo { font-weight: 600; color: var(--ui-ink); }
body.new-ui .nb-main .lang-row { margin: 0; }

/* Right: the report that comes out, on plain paper */
body.new-ui .nb-stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 44px 48px; border-left: 1px solid var(--ui-line); min-width: 0; background: var(--ui-paper-2);
}
body.new-ui .nb-rep { width: 100%; max-width: 640px; box-shadow: 0 24px 60px -28px rgba(16, 24, 40, .25), var(--ui-shadow); }
body.new-ui .nb-logo { padding: 0; background: none; border: 0; font: inherit; font-size: 13px; cursor: pointer; }
body.new-ui .nb-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
body.new-ui .nb-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.new-ui .nb-brand.typed span { color: var(--ui-accent-ink); }
body.new-ui .nb-fav { width: 28px; height: 28px; border-radius: 7px; flex: none; }
/* Desktop: the preview is the page's picture (decision 16). A big name, and
   the brand's squares as pieces; rivals stay small. */
@media (min-width: 641px) {
  body.new-ui .nb-stage { padding: 40px 36px; }
  body.new-ui .nb-rep .ou-rep-h { padding: 26px 26px 8px; }
  body.new-ui .nb-rep .nb-brand { font-size: 48px; line-height: 1.05; letter-spacing: -.04em; gap: 14px; margin-top: 6px; }
  body.new-ui .nb-rep .nb-fav { width: 48px; height: 48px; border-radius: 12px; }
  body.new-ui .nb-rep .ou-rep-g { padding: 18px 26px 26px; }
  body.new-ui .nb-rep .ou-tile:first-child .nb-sq { display: grid; grid-template-columns: repeat(4, minmax(0, 40px)); gap: 10px; margin-top: 16px; }
  body.new-ui .nb-rep .ou-tile:first-child .nb-sq i {
    width: auto; height: auto; aspect-ratio: 1; border-radius: 9px; border: 1px solid var(--ui-line);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 14px -8px rgba(16, 24, 40, .18);
  }
}

/* GenSig's squares, empty until measured */
body.new-ui .nb-sq { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
body.new-ui .nb-sq i { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid var(--ui-line); background: var(--ui-card); }
body.new-ui .nb-rows { display: grid; gap: 6px; margin-top: 6px; }
body.new-ui .nb-rows .nb-sq { margin-top: 6px; }
body.new-ui .nb-rows .nb-sq i { width: 10px; height: 10px; border-width: 1px; }
body.new-ui .nb-of { display: block; margin-top: 10px; font-size: 12px; color: var(--ui-ink-3); }

@media (max-width: 1100px) {
  body.new-ui .nb { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  body.new-ui .nb-stage { border-left: 0; border-top: 1px solid var(--ui-line); }
  body.new-ui .nb-steps { margin-top: 8px; }
}
@media (max-width: 640px) {
  body.new-ui .nb { margin: 0 0 24px; border-radius: 14px; }
  body.new-ui .nb-main { padding: 26px 18px 22px; gap: 12px; }
  body.new-ui .nb-main h1 { font-size: 26px; }
  body.new-ui .nb-sub { font-size: 15px; }
  /* The button goes under the field, not inside it */
  body.new-ui .nb-form #form { flex-direction: column; padding: 0; border: 0; box-shadow: none; background: none; }
  body.new-ui .nb-form #form:focus-within { box-shadow: none; }
  body.new-ui .nb-form #url { flex: none; height: 50px; border: 1px solid var(--ui-line); border-radius: 12px; background: var(--ui-card); }
  body.new-ui .nb-form #url:focus { border-color: var(--ui-ink); box-shadow: 0 0 0 3px rgba(16, 24, 40, .1); }
  body.new-ui .nb-form #go { width: 100%; height: 50px; border-radius: 12px; }
  /* A compact preview: the brand and its squares, no rivals */
  body.new-ui .nb-stage { padding: 18px 16px 20px; }
  body.new-ui .nb-rep .ou-rep-g { grid-template-columns: minmax(0, 1fr); }
  body.new-ui .nb-rep .ou-tile + .ou-tile { display: none; }
}
@media (prefers-reduced-motion: reduce) { body.new-ui .nb-form #form { transition: none; } }
