/* Content plan workspace: field help, empty state, loader, sticky brand header, ideas and their tabs. */

/* ---------- Field help ---------- */
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-label { display: flex; align-items: center; gap: 0.45rem; font: 500 0.84rem var(--font-display); color: var(--text-2); }
.brief legend.field-label { flex-direction: row; margin-bottom: 0.5rem; }
.info-wrap { position: relative; display: inline-flex; }
.info {
  display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem; padding: 0; border: 0; border-radius: 50%; cursor: help;
  font: 600 0.68rem/1 var(--font-display); font-style: italic; color: var(--text-2); background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px var(--line-2); transition: background 140ms var(--ease-out), color 140ms var(--ease-out);
}
.info:hover, .info:focus-visible, .info-wrap.is-open .info { background: var(--text); color: #000; }
.info:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tip {
  position: absolute; left: 50%; bottom: calc(100% + 0.55rem); z-index: 30; width: min(17rem, 78vw);
  padding: 0.7rem 0.85rem; border-radius: 12px; font: 400 0.8rem/1.5 var(--font-body); color: var(--text-2); text-align: left;
  background: rgba(20, 20, 24, 0.96); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px var(--line-2), 0 18px 40px rgba(0, 0, 0, 0.6);
  opacity: 0; transform: translate(-50%, 4px); pointer-events: none; transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.info-wrap:hover .tip, .info:focus-visible + .tip, .info-wrap.is-open .tip { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) { .tip { left: 0; transform: translate(0, 4px); } .info-wrap:hover .tip, .info:focus-visible + .tip, .info-wrap.is-open .tip { transform: none; } }
@media (pointer: coarse) { .info { width: 1.6rem; height: 1.6rem; font-size: 0.8rem; } }

/* ---------- Empty state ---------- */
.plan-empty {
  display: flex; flex-direction: column; gap: 1rem; padding: clamp(1.4rem, 3vw, 2.4rem); border-radius: var(--r-card);
  background: radial-gradient(120% 90% at 100% 0%, rgba(207, 198, 255, 0.09), transparent 60%), var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px var(--line);
}
.empty-kicker { margin: 0; font: 600 0.72rem var(--font-display); text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); }
.empty-title { margin: 0; font: 600 clamp(1.5rem, 1.2rem + 1vw, 2.1rem)/1.1 var(--font-display); letter-spacing: -0.035em; max-width: 22ch; }
.empty-steps { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.empty-steps li { display: flex; gap: 0.9rem; align-items: baseline; color: var(--text-2); }
.empty-n { font: 600 0.8rem var(--font-display); color: var(--faint); font-variant-numeric: tabular-nums; }

/* ---------- Loader ---------- */
.plan-loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem; min-height: 22rem; text-align: center;
  padding: 2rem; border-radius: var(--r-card); background: var(--panel); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px var(--line);
}
.spinner {
  width: 3.4rem; height: 3.4rem; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(207, 198, 255, 0.15) 90deg, var(--accent) 280deg, #fff 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }
.loader-title {
  margin: 0; font: 600 clamp(1.5rem, 1.2rem + 1.2vw, 2.3rem)/1.1 var(--font-display); letter-spacing: -0.04em;
  background: linear-gradient(100deg, #8b8b94 20%, #ffffff 45%, var(--accent) 55%, #8b8b94 80%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 2.6s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.loader-step { margin: 0; font-size: 0.92rem; color: var(--muted); min-height: 1.4em; }

/* ---------- Sticky brand header ---------- */
.plan-head.is-sticky {
  position: sticky; top: 4.9rem; z-index: 8;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 42%), rgba(12, 12, 15, 0.86);
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.plan-head .plan-title { flex-direction: row; align-items: center; gap: 0.9rem; min-width: 0; }
.plan-head .plan-title > div { min-width: 0; }
.plan-head h3 { margin: 0; overflow-wrap: anywhere; }
.plan-head .plan-note { color: var(--muted); font-size: 0.78rem; }
.plan-head .plan-note a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.plan-head .plan-note a:hover { color: var(--text); }
.plan-swatches { display: flex; gap: 0.3rem; margin-left: auto; }
.swatch { width: 0.95rem; height: 0.95rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.sw-b1 { background: var(--b1); }
.sw-b2 { background: var(--b2); }
.sw-b3 { background: var(--b3); }
@media (max-width: 760px) {
  .plan-head.is-sticky { top: 7rem; padding: 0.8rem 0.9rem; }
  .plan-swatches { display: none; }
}
@media (prefers-reduced-transparency: reduce) { .plan-head.is-sticky { backdrop-filter: none; -webkit-backdrop-filter: none; background: #0c0c0f; } }

/* ---------- Logo tiles ---------- */
.logo-tile {
  flex: none; display: inline-grid; place-items: center; overflow: hidden; background: #fff; color: #111;
  font: 700 0.7rem var(--font-display); letter-spacing: 0.02em; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.logo-tile img { width: 82%; height: 82%; object-fit: contain; }
.logo-tile svg { width: 64%; height: 64%; }
.logo-tile.is-mono { background: var(--b1, #222); color: var(--b1-ink, #fff); }
.logo-xs { width: 1.5rem; height: 1.5rem; border-radius: 50%; font-size: 0.5rem; }
.logo-sm { width: 2.1rem; height: 2.1rem; border-radius: 9px; font-size: 0.62rem; }
.logo-md { width: 3rem; height: 3rem; border-radius: 12px; font-size: 0.85rem; }

/* ---------- Ideas ---------- */
.ideas-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1rem; margin-bottom: 0.75rem; }
.ideas-head .block-title { margin: 0; }
.ideas-hint { margin: 0; font-size: 0.85rem; color: var(--muted); }
.ideas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.9rem; }
.idea-card { gap: 0.7rem; }
.idea-num { font: 600 0.7rem var(--font-display); text-transform: uppercase; letter-spacing: 0.14em; color: var(--faint); }
.idea-card.is-picked { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1.5px rgba(255, 255, 255, 0.7); }
.pick-btn {
  display: inline-flex; align-items: center; gap: 0.45rem; margin-right: auto; padding: 0.42rem 0.85rem; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 0.78rem var(--font-display); color: #000; background: var(--text);
  transition: transform 140ms var(--ease-out), background 160ms var(--ease-out);
}
.pick-btn:active { transform: scale(0.97); }
.pick-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #000; }
.pick-btn[aria-pressed='true'] { background: var(--ok); }
.pick-btn[aria-pressed='true'] .pick-dot { background: #000; }

.ideas-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.7rem 0.9rem; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.ideas-summary[hidden] { display: none; }
.ideas-count { margin: 0; font: 500 0.88rem var(--font-display); color: var(--text-2); }
.undo-btn {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.42rem 0.85rem; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 0.78rem var(--font-display); color: var(--text); background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line-2);
}
.undo-btn:hover { background: #222227; }
.undo-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.undo-ico { display: inline-block; font-size: 1rem; line-height: 1; transition: transform 300ms var(--ease-out); }
.undo-btn:hover .undo-ico { transform: rotate(-200deg); }

/* ---------- Tabs ---------- */
.workspace { margin-top: 1.2rem; }
.workspace[hidden] { display: none; }
.idea-tabs { display: flex; gap: 0.35rem; overflow-x: auto; scrollbar-width: none; padding: 0.3rem; border-radius: 14px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.idea-tabs::-webkit-scrollbar { display: none; }
.idea-tab {
  flex: none; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem; border: 0; border-radius: 10px; cursor: pointer;
  font: 600 0.82rem var(--font-display); color: var(--muted); background: transparent; transition: background 160ms var(--ease-out), color 160ms var(--ease-out);
}
.idea-tab:hover { color: var(--text); }
.idea-tab[aria-selected='true'] { color: #000; background: var(--text); }
.idea-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tab-net { font-weight: 500; opacity: 0.75; }
.tab-badge { min-width: 1.2rem; padding: 0.05rem 0.35rem; border-radius: 999px; font-size: 0.68rem; color: #000; background: var(--ok); }
.idea-stage { margin-top: 1rem; }
.idea-panel:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 12px; }
.idea-brief { padding: 1rem 1.1rem; border-radius: var(--r-card); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 1rem; }
.idea-meta { font: 500 0.74rem var(--font-display); color: var(--faint); }
.idea-hook { margin: 0.35rem 0 0; font: 600 1.15rem/1.3 var(--font-display); letter-spacing: -0.02em; color: var(--text); }
.block-sub { margin: 0 0 0.65rem; font: 600 0.72rem var(--font-display); text-transform: uppercase; letter-spacing: 0.14em; color: var(--faint); }

@media (pointer: coarse) {
  .pick-btn, .undo-btn, .idea-tab { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; background: conic-gradient(var(--accent) 0 75%, transparent 75%); }
  .loader-title { animation: none; color: var(--text); background: none; }
  .undo-btn:hover .undo-ico { transform: none; }
}

/* [hidden] must win over the display rules above (the list folds away after picking). */
.ideas-grid[hidden], .ideas-head[hidden], .idea-panel[hidden], .adapt[hidden] { display: none; }
.idea-card .post-actions { flex-wrap: wrap; row-gap: 0.5rem; }
.pick-btn { white-space: nowrap; }

/* Tooltips are anchored to their field, not to the (i) button: they always fit inside the form, so a
   hidden tooltip can never widen the page on a phone (it used to push the layout to 434px on a 390px screen). */
.field, .brief fieldset { position: relative; }
.info-wrap { position: static; }
.tip, .tip-anchor { left: 0; right: 0; width: auto; transform: translateY(4px); }
.info-wrap:hover .tip, .info:focus-visible + .tip, .info-wrap.is-open .tip { transform: none; }
.tip { bottom: calc(100% - 1.6rem); visibility: hidden; }
.info-wrap:hover .tip, .info:focus-visible + .tip, .info-wrap.is-open .tip { visibility: visible; }
/* A fieldset defaults to min-inline-size: min-content, which let the form grow past a phone screen. */
.brief fieldset { min-inline-size: 0; min-width: 0; }
.brief, .plan-out { min-width: 0; max-width: 100%; }
/* Phones: the sticky brand bar stays one compact row so it doesn't eat the screen. */
@media (max-width: 760px) {
  .plan-head.is-sticky { top: 7.8rem; flex-wrap: nowrap; gap: 0.6rem; padding: 0.55rem 0.75rem; }
  .plan-head .logo-md { width: 2.2rem; height: 2.2rem; border-radius: 9px; }
  .plan-head h3 { font-size: 1.15rem; }
  .plan-head .plan-note { font-size: 0.68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .plan-head .plan-title { flex: 1; }
}

/* ---------- Objective helper ---------- */
.link-btn {
  align-self: flex-start; padding: 0.2rem 0; border: 0; background: none; cursor: pointer;
  font: 500 0.8rem var(--font-display); color: var(--accent); text-decoration: underline; text-decoration-color: rgba(207, 198, 255, 0.4); text-underline-offset: 3px;
}
.link-btn:hover { color: #fff; }
.link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.refine { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.3rem; padding: 0.8rem; border-radius: 14px; background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--line-2); }
.refine[hidden] { display: none; }
.refine-label { font: 500 0.8rem var(--font-display); color: var(--text-2); }
.refine textarea { resize: vertical; min-height: 3.4rem; font: inherit; font-size: 0.9rem; color: var(--text); background: var(--panel-2); border: 0; border-radius: 10px; padding: 0.6rem 0.75rem; box-shadow: inset 0 0 0 1px var(--line); }
.refine textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.refine-go { align-self: flex-start; }
.refine-out { display: flex; flex-direction: column; gap: 0.5rem; }
.refine-msg { margin: 0; font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 0.5rem; }
.spinner.sm { width: 1rem; height: 1rem; flex: none; }
.refine-opt { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.7rem 0.8rem; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.refine-type { align-self: flex-start; font: 600 0.64rem var(--font-display); text-transform: uppercase; letter-spacing: 0.12em; padding: 0.15rem 0.5rem; border-radius: 999px; color: #000; background: var(--accent); }
.refine-type.t-conversion { background: var(--ok); }
.refine-type.t-consideration { background: var(--warm); }
.refine-type.t-loyalty { background: #a5d8ff; }
.refine-obj { margin: 0; font: 600 0.9rem/1.35 var(--font-display); color: var(--text); }
.refine-why, .refine-kpi { margin: 0; font-size: 0.78rem; line-height: 1.45; color: var(--muted); }
.refine-kpi b { color: var(--text-2); }
.refine-use { align-self: flex-start; padding: 0.3rem 0.75rem; border: 0; border-radius: 999px; cursor: pointer; font: 600 0.74rem var(--font-display); color: #000; background: var(--text); }
.refine-use:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (pointer: coarse) { .link-btn, .refine-use { min-height: 44px; } }

/* ---------- Two-layer brief ---------- */
.stage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.stage-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; padding: 0.55rem 0.7rem; border: 0; border-radius: 12px; cursor: pointer; text-align: left;
  color: var(--text-2); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); transition: background 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.stage-opt:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.stage-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stage-opt[aria-checked='true'] { color: #000; background: var(--text); box-shadow: none; }
.stage-main { font: 600 0.8rem/1.25 var(--font-display); }
.stage-sub { font: 500 0.66rem var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.6; }
.brief-more { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.brief-more > summary { cursor: pointer; padding: 0.65rem 0.8rem; font: 500 0.84rem var(--font-display); color: var(--text-2); list-style: none; display: flex; justify-content: space-between; }
.brief-more > summary::-webkit-details-marker { display: none; }
.brief-more > summary::after { content: '+'; color: var(--muted); }
.brief-more[open] > summary::after { content: '−'; }
.brief-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.brief-more-body { display: flex; flex-direction: column; gap: 0.9rem; padding: 0.2rem 0.8rem 0.9rem; }
.brief select { width: 100%; }

/* ---------- Brief as understood ---------- */
.brief-read { padding: 1.1rem 1.2rem; border-radius: var(--r-card); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.read-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem 1.4rem; margin: 0; }
.read-row dt { font: 600 0.66rem var(--font-display); text-transform: uppercase; letter-spacing: 0.14em; color: var(--faint); margin-bottom: 0.2rem; }
.read-row dd { margin: 0; font-size: 0.92rem; line-height: 1.45; color: var(--text-2); }
.read-assumed { list-style: none; margin: 0.9rem 0 0; padding: 0.7rem 0.8rem; border-radius: 10px; background: rgba(247, 215, 168, 0.06); box-shadow: inset 0 0 0 1px rgba(247, 215, 168, 0.18); display: grid; gap: 0.3rem; }
.read-assumed li { font-size: 0.82rem; color: var(--muted); }
.read-assumed b { color: var(--warm); font-weight: 600; }
.split { display: flex; align-items: center; gap: 0.8rem; margin-top: 1rem; flex-wrap: wrap; }
.split-label { font: 600 0.66rem var(--font-display); text-transform: uppercase; letter-spacing: 0.14em; color: var(--faint); }
.split-bar { flex: 1; min-width: 8rem; display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 3px; height: 0.5rem; }
.split-seg { border-radius: 999px; }
.split-seg.is-brand, .lg.is-brand::before { background: var(--accent); }
.split-seg.is-activation, .lg.is-activation::before { background: var(--ok); }
.split-legend { display: flex; gap: 0.8rem; font: 500 0.76rem var(--font-display); color: var(--text-2); }
.lg::before { content: ''; display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: middle; }

/* ---------- Traceability on each idea ---------- */
.insight-n { display: block; font: 600 0.66rem var(--font-display); text-transform: uppercase; letter-spacing: 0.14em; color: var(--faint); margin-bottom: 0.4rem; }
.trace { display: flex; flex-direction: column; gap: 0.45rem; }
.trace-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.role-badge { font: 700 0.66rem var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; padding: 0.18rem 0.55rem; border-radius: 999px; color: #000; }
.role-badge.is-brand { background: var(--accent); }
.role-badge.is-activation { background: var(--ok); }
.trace-chip { font: 500 0.7rem var(--font-display); padding: 0.18rem 0.55rem; border-radius: 999px; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.trace-chip b { font-weight: 700; color: var(--muted); }
.trace-why { margin: 0; font-size: 0.8rem; line-height: 1.45; color: var(--muted); }
.trace-why b { color: var(--text-2); }
.idea-brief .trace { margin-top: 0.7rem; }

/* ---------- Wall additions ---------- */
.adapt-formats { margin: -0.6rem 0 0.6rem; font-size: 0.8rem; color: var(--muted); }
.left-out { margin-bottom: 1.2rem; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.left-out > summary { cursor: pointer; padding: 0.6rem 0.8rem; font: 500 0.8rem var(--font-display); color: var(--text-2); }
.left-out > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.left-out ul { margin: 0; padding: 0 0.8rem 0.8rem 1.8rem; display: grid; gap: 0.35rem; }
.left-out li { font-size: 0.8rem; color: var(--muted); line-height: 1.45; }
.left-out b { color: var(--text-2); font-weight: 600; }
.adapt-cost { font: 600 0.78rem var(--font-display); color: var(--ok); font-variant-numeric: tabular-nums; }
.adapt-cost[hidden] { display: none; }
@media (min-width: 900px) { .piece-google_rsa { grid-column: span 2; } }

.adapt-formats { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: -0.5rem 0 0.8rem; }
.adapt-formats-label { font: 600 0.66rem var(--font-display); text-transform: uppercase; letter-spacing: 0.14em; color: var(--faint); }
.format-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.format-chips li { font: 500 0.72rem var(--font-display); padding: 0.18rem 0.55rem; border-radius: 999px; color: var(--text-2); background: rgba(255, 255, 255, 0.05); }

/* ---------- Platinum instead of warm yellow: one palette (black, white, silver, the AI lilac) ---------- */
:root { --platinum: #d6d8de; --silver-1: rgba(236, 238, 243, 0.95); --silver-2: rgba(170, 174, 186, 0.35); }
.form-msg, .plan-note { color: var(--platinum); }
.read-assumed { background: linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)), #121216; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px var(--line-2); }
.read-assumed li { color: var(--text-2); letter-spacing: 0.005em; }
.read-assumed b { color: var(--platinum); font: 600 0.68rem var(--font-display); text-transform: uppercase; letter-spacing: 0.12em; margin-right: 0.35rem; }
.post.is-paid { box-shadow: inset 0 0 0 1px var(--silver-2); }
.post.is-paid::before { background: linear-gradient(155deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1) 40%, rgba(200, 204, 214, 0.35)); }
.mode.paid { color: var(--platinum); box-shadow: inset 0 0 0 1px var(--silver-2); }

/* ---------- Picked idea: a silver line runs round the border once, then stays ---------- */
@property --sweep { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.idea-card { position: relative; }
.idea-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: 0;
  background: conic-gradient(from -90deg, var(--silver-1) var(--sweep), transparent var(--sweep));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.idea-card.is-picked { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 18px 50px rgba(0, 0, 0, 0.5); }
.idea-card.is-picked::after { opacity: 1; animation: sweep-in 900ms cubic-bezier(.23, 1, .32, 1) forwards, sheen 5s 900ms linear infinite; }
@keyframes sweep-in { from { --sweep: 0deg; } to { --sweep: 360deg; } }
@keyframes sheen { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
@media (prefers-reduced-motion: reduce) { .idea-card.is-picked::after { animation: none; --sweep: 360deg; } }

/* "Continue" after picking ideas: white text, underline. */
.ideas-continue { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; margin-top: 1rem; }
.ideas-continue p { margin: 0; font-size: 0.82rem; color: var(--muted); }
.continue-btn {
  padding: 0.3rem 0; border: 0; background: none; cursor: pointer; font: 600 1rem var(--font-display); color: var(--text);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; text-decoration-color: rgba(255, 255, 255, 0.6);
  transition: text-decoration-color 160ms var(--ease-out), opacity 160ms var(--ease-out);
}
.continue-btn:hover { text-decoration-color: #fff; }
.continue-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.continue-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

/* ---------- Tooltips: you can move into the box; it closes when you leave it ---------- */
.tip { top: 1.75rem; bottom: auto; pointer-events: none; transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out), visibility 0s linear 220ms; }
.tip::before { content: ''; position: absolute; left: 0; right: 0; top: -0.8rem; height: 0.8rem; } /* bridge from the (i) to the box */
.info-wrap:hover .tip, .info:focus-visible + .tip, .info-wrap.is-open .tip { pointer-events: auto; transition-delay: 0s; }

/* ---------- The brief column scrolls on its own when it is taller than the screen ---------- */
@media (min-width: 1025px) {
  .brief { max-height: calc(100vh - 6rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent; }
  .brief::-webkit-scrollbar { width: 6px; }
  .brief::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); border-radius: 999px; }
}

/* ---------- Loader with live steps ---------- */
.loader-log { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.35rem; min-width: min(28rem, 100%); text-align: left; }
.loader-log li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.84rem; color: var(--text-2); padding: 0.45rem 0.7rem; border-radius: 10px; background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--line); }
.loader-log li.is-miss { color: var(--muted); }
.loader-log .ms { font-variant-numeric: tabular-nums; color: var(--muted); }
.loader-log li.is-active { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.loader-meta { margin: 0; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Regenerate with notes ---------- */
.regen { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; align-items: end; padding: 0.9rem 1rem; border-radius: var(--r-card); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.regen-title { grid-column: 1 / -1; margin: 0; font: 600 0.92rem var(--font-display); color: var(--text); }
.regen label { display: flex; flex-direction: column; gap: 0.35rem; font: 500 0.78rem var(--font-display); color: var(--muted); }
.regen textarea { resize: vertical; min-height: 2.6rem; font: inherit; font-size: 0.9rem; color: var(--text); background: var(--panel-2); border: 0; border-radius: 10px; padding: 0.55rem 0.75rem; box-shadow: inset 0 0 0 1px var(--line); }
.regen textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- Insight basis ---------- */
.block-head { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.75rem; }
.block-head .block-title { margin: 0; }
.block-head .info-wrap { position: relative; }
.block-head .tip { left: 0; right: auto; width: min(22rem, 70vw); top: 1.7rem; }
.basis { display: inline-block; margin-top: 0.7rem; font: 600 0.64rem var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; padding: 0.16rem 0.5rem; border-radius: 999px; color: var(--platinum); box-shadow: inset 0 0 0 1px var(--silver-2); }
.basis.is-hypothesis { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); border: 1px dashed transparent; }
.evidence { display: block; margin-top: 0.35rem; font-size: 0.76rem; color: var(--muted); line-height: 1.4; }
.basis-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.basis-row .basis { margin-top: 0.7rem; }
.confidence { display: inline-block; margin-top: 0.7rem; font: 600 0.64rem var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; padding: 0.16rem 0.5rem; border-radius: 999px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.confidence.is-high { color: var(--platinum); box-shadow: inset 0 0 0 1px var(--silver-2); }
.confidence.is-low { border: 1px dashed var(--line-2); box-shadow: none; }
.evidence.is-note { font-style: italic; }

/* Adaptation wall: running spinner next to the timer. */
.adapt-tools .spinner.sm { width: 1.1rem; height: 1.1rem; }
.ideas-continue[hidden] { display: none; }

/* Reset on the right of the pipeline row. */
.demo-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 2.4rem 0 1.8rem; }
.demo-top .pipeline { margin: 0; }
.reset-row { margin: 0; display: flex; align-items: baseline; gap: 0.6rem; font-size: 0.88rem; color: var(--muted); }
.reset-row .continue-btn { font-size: 0.92rem; }

/* ---------- Legal app gallery ---------- */
#legal-shots { display: flex; flex-direction: column; gap: 0.8rem; }
#legal-shots[hidden] { display: none; }
.shot-stage { position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2), 0 30px 70px -28px rgba(0, 0, 0, 0.85); background: #000; }
.shot-stage > img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.shot-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 2.6rem; height: 2.6rem; border: 0; border-radius: 50%; cursor: pointer;
  color: #fff; font-size: 1.05rem; background: rgba(12, 12, 15, 0.6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0.85; transition: opacity 160ms var(--ease-out), background 160ms var(--ease-out);
}
.shot-nav:hover { opacity: 1; background: rgba(12, 12, 15, 0.85); }
.shot-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; opacity: 1; }
.shot-nav.is-prev { left: 0.8rem; }
.shot-nav.is-next { right: 0.8rem; }
.shot-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.shot-meta p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.shot-title { color: var(--text); font-weight: 600; margin-right: 0.3rem; }
.shot-count { font: 500 0.8rem var(--font-display); color: var(--faint); font-variant-numeric: tabular-nums; }
.shot-thumbs { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 0.4rem; }
.shot-thumb { padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; opacity: 0.5; background: #000; box-shadow: 0 0 0 1px var(--line); transition: opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.shot-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.shot-thumb:hover { opacity: 0.8; }
.shot-thumb[aria-selected='true'] { opacity: 1; box-shadow: 0 0 0 1.5px var(--silver-1, #fff); }
.shot-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.shot-note { margin: 0; font-size: 0.76rem; color: var(--faint); }
@media (max-width: 760px) { .shot-thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.split-explain { margin: 0.55rem 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--muted); max-width: 70ch; }

/* Brief as understood: each part is its own filled card so the labels don't get lost. */
.read-grid { gap: 0.6rem; }
.read-row {
  padding: 0.85rem 1rem; border-radius: 14px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)), #141418;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px var(--line);
}
.read-row dt { display: inline-block; margin-bottom: 0.45rem; padding: 0.15rem 0.5rem; border-radius: 999px; font: 700 0.64rem var(--font-display); letter-spacing: 0.14em; color: #0b0b0c; background: var(--platinum, #d6d8de); }
.read-row dd { color: var(--text); }

/* ---------- Editable assumptions ---------- */
.assumed-box { margin-top: 0.9rem; padding: 0.85rem 1rem; border-radius: 14px; background: linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)), #121216; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px var(--line-2); }
.assumed-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.assumed-title { margin: 0; font: 600 0.9rem var(--font-display); color: var(--text); }
.assumed-hint { margin: 0; font-size: 0.78rem; color: var(--muted); }
.assumed-box .read-assumed { margin: 0; padding: 0; background: none; box-shadow: none; gap: 0.45rem; }
.assumed-box .read-assumed li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem; border-radius: 10px; background: rgba(255, 255, 255, 0.03); }
.assumed-text { color: var(--text-2); }
.assumed-input { width: 100%; font: inherit; font-size: 0.85rem; color: var(--text); background: var(--panel-2); border: 0; border-radius: 8px; padding: 0.45rem 0.6rem; box-shadow: inset 0 0 0 1px var(--line-2); }
.assumed-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.assumed-input[hidden], .assumed-edit[hidden], .assumed-text[hidden] { display: none; }
.assumed-edit, .assumed-add { border: 0; background: none; cursor: pointer; font: 600 0.76rem var(--font-display); color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, 0.45); }
.assumed-edit:hover, .assumed-add:hover { text-decoration-color: #fff; }
.assumed-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 0.7rem; }
.assumed-regen:disabled { opacity: 0.4; cursor: not-allowed; }

/* Secondary buttons with volume: glass fill, edge and shadow (Proponme objetivos, Volver a generar…). */
.btn-ghost {
  padding: 0.55rem 1rem; border: 0; border-radius: 999px; cursor: pointer; font: 600 0.84rem var(--font-display); color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)), #16161a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 8px 20px -8px rgba(0, 0, 0, 0.8);
  transition: transform 140ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.btn-ghost:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 10px 24px -8px rgba(0, 0, 0, 0.85); }
.btn-ghost:active { transform: scale(0.97); }
.btn-ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Claim sets ---------- */
.claims-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.65rem; }
.claims-head .block-sub { margin: 0; }
.set-tools { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.set-nav { width: 2rem; height: 2rem; border: 0; border-radius: 50%; cursor: pointer; color: var(--text); background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.set-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.set-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.set-label { font: 500 0.78rem var(--font-display); color: var(--muted); font-variant-numeric: tabular-nums; min-width: 4.5rem; text-align: center; }
.suggest-btn { padding: 0.4rem 0.85rem; font-size: 0.78rem; }

/* ---------- Custom format ---------- */
.custom-format { margin-top: 1.4rem; padding: 0.9rem 1rem; border-radius: 14px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.custom-q { margin: 0 0 0.55rem; font: 600 0.88rem var(--font-display); color: var(--text); }
.custom-bar { display: flex; gap: 0.6rem; }
.custom-input { flex: 1; font: inherit; font-size: 0.9rem; color: var(--text); background: var(--panel-2); border: 0; border-radius: 10px; padding: 0.55rem 0.75rem; box-shadow: inset 0 0 0 1px var(--line-2); }
.custom-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.custom-status { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.4rem; font-size: 0.8rem; color: var(--muted); }

/* ---------- Final step ---------- */
.final {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: center; padding: 1.5rem 1.6rem; border-radius: var(--r-card);
  background: radial-gradient(120% 120% at 100% 0%, rgba(207, 198, 255, 0.1), transparent 55%), linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)), #111114;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1px var(--line-2), 0 30px 70px -30px rgba(0, 0, 0, 0.9);
}
.final-kicker { margin: 0; font: 600 0.7rem var(--font-display); text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); }
.final-title { margin: 0.3rem 0 0.5rem; font: 600 clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem)/1.15 var(--font-display); letter-spacing: -0.03em; color: var(--text); }
.final-lead { margin: 0; font-size: 0.88rem; line-height: 1.55; color: var(--muted); }
.final-stats { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.final-stats li { display: flex; flex-direction: column; }
.final-stats strong { font: 600 1.5rem var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
.final-stats span { font-size: 0.74rem; color: var(--muted); }
.final-actions { display: flex; flex-direction: column; gap: 0.6rem; align-items: stretch; }
.final-actions .btn-primary, .final-actions .btn-ghost { justify-content: center; text-align: center; padding: 0.8rem 1rem; }
.final-actions button:disabled { opacity: 0.5; cursor: progress; }
.final-msg { margin: 0; min-height: 1.2em; font-size: 0.8rem; color: var(--platinum, #d6d8de); text-align: center; }
.head-export { margin-left: auto; padding: 0.4rem 0.9rem; border: 0; border-radius: 999px; cursor: pointer; font: 600 0.78rem var(--font-display); color: #000; background: var(--text); }
.head-export:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.head-export + .plan-swatches, .plan-swatches + .head-export { margin-left: 0.6rem; }
@media (max-width: 900px) { .final { grid-template-columns: 1fr; } }

/* The brief scrolls on its own: its decorative glass edge (::before) would scroll with the content and
   leave a cut rectangle mid-form, so the edge is drawn with inset shadows, which stay on the box. */
@media (min-width: 1025px) {
  .brief::before { display: none; }
  .brief { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 30px 70px -30px rgba(0, 0, 0, 0.8); }
}

/* ---------- Stop ---------- */
.stop-btn { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; }
.stop-btn.sm { margin: 0; padding: 0.35rem 0.75rem; font-size: 0.76rem; }
.stop-ico { width: 0.62rem; height: 0.62rem; border-radius: 2px; background: var(--urgent); }

/* ---------- Did you mean…? ---------- */
.brand-suggest-head { margin: 0.35rem 0 0; font: 600 0.74rem var(--font-display); color: var(--accent); }
.brand-suggest-head[hidden], .brand-suggest[hidden] { display: none; }
.brand-suggest { list-style: none; margin: 0.3rem 0 0; padding: 0.3rem; border-radius: 12px; background: #16161a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px var(--line-2), 0 18px 40px -12px rgba(0, 0, 0, 0.8); }
.brand-opt { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.5rem 0.6rem; border-radius: 8px; cursor: pointer; }
.brand-opt:hover, .brand-opt[aria-selected='true'] { background: rgba(255, 255, 255, 0.08); }
.brand-opt-name { font: 600 0.88rem var(--font-display); color: var(--text); }
.brand-opt-desc { font-size: 0.74rem; color: var(--muted); }

/* ---------- Idea versions ---------- */
.idea-slot { display: flex; }
.idea-slot > .idea-card { flex: 1; }
.idea-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.version-tools { display: flex; align-items: center; gap: 0.3rem; }
.version-tools .set-label { min-width: 2.6rem; font-size: 0.72rem; }
.set-nav.sm { width: 1.6rem; height: 1.6rem; font-size: 0.8rem; }
.another-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.another-btn { padding: 0.3rem 0; border: 0; background: none; cursor: pointer; font: 600 0.8rem var(--font-display); color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, 0.45); }
.another-btn:hover { text-decoration-color: #fff; }
.another-btn:disabled { opacity: 0.35; cursor: not-allowed; text-decoration: none; }
.another-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Brand voice traits in the brief read (product-marketing: means / doesn't mean) */
.voice { margin-top: 1.1rem; }
.voice-title { margin: 0 0 0.5rem; font: 600 0.68rem var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.6rem; }
.voice-trait { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.7rem 0.8rem; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 0.8rem; line-height: 1.4; color: var(--text-2); }
.voice-trait strong { color: var(--text); font-size: 0.86rem; }
.voice-not { color: var(--muted); }

/* Transparency: how this AI works (sources and criteria) */
.how { margin-top: 2.5rem; padding: 1.4rem 1.5rem; border-radius: 22px; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px var(--line-2); background: linear-gradient(150deg, rgba(255,255,255,.05), rgba(255,255,255,.015) 45%); }
.how h3 { margin: 0 0 0.6rem; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); letter-spacing: -0.03em; }
.how-answer { margin: 0; max-width: 62ch; color: var(--text-2); line-height: 1.55; text-wrap: pretty; }
.how-more { margin-top: 1rem; }
.how-more > summary { cursor: pointer; list-style: none; display: inline-flex; gap: 0.5rem; font: 500 0.88rem var(--font-display); color: var(--text); }
.how-more > summary::-webkit-details-marker { display: none; }
.how-more > summary::after { content: '+'; color: var(--muted); }
.how-more[open] > summary::after { content: '−'; }
.how-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin-top: 1.2rem; }
@media (max-width: 1100px) { .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .how-grid { grid-template-columns: 1fr; } }
.how-card { position: relative; display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 1.05rem 1.1rem; border-radius: 16px; background: rgba(255, 255, 255, 0.025); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px var(--line); }
.how-num { font: 600 0.7rem var(--font-display); letter-spacing: 0.12em; color: var(--accent); }
.how-card h4 { margin: 0; font: 600 1rem/1.3 var(--font-display); letter-spacing: -0.01em; color: var(--text); }
.how-note { margin: 0 0 0.35rem; font-size: 0.78rem; color: var(--muted); }
.how-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.84rem; line-height: 1.5; color: var(--text-2); }
.how-list li { padding-left: 0.9rem; position: relative; }
.how-list li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 0.32rem; height: 1px; background: var(--muted); }
.how-chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.how-chips li { padding: 0.32rem 0.65rem; border-radius: 999px; font-size: 0.78rem; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

/* Goal helper above "Specific goal": four quadrants that only read the objective; hover/focus shows the full card */
.refine-toggle { align-self: flex-start; margin-bottom: 0.15rem; }
.refine { margin: 0 0 0.6rem; }
.refine-quads { position: relative; }

/* "Did you mean…?" head with its (i) */
.brand-suggest-head { display: flex; align-items: center; gap: 0.4rem; }
.brand-suggest-head .info-wrap { position: relative; }
.brand-suggest-head .tip { left: 0; right: auto; width: min(20rem, 70vw); transform: translateY(4px); font-weight: 400; color: var(--text-2); }

/* A control the page just filled in for the visitor glows lilac for a moment */
@keyframes filled-glow { 0% { box-shadow: 0 0 0 0 rgba(207, 198, 255, 0); } 25% { box-shadow: 0 0 0 3px rgba(207, 198, 255, 0.55); } 100% { box-shadow: 0 0 0 0 rgba(207, 198, 255, 0); } }
.is-filled { animation: filled-glow 1.2s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .is-filled { animation: none; outline: 2px solid var(--accent); } }
.brand-suggest-head .info-wrap:hover .tip, .brand-suggest-head .info-wrap.is-open .tip, .brand-suggest-head .info:focus-visible + .tip { transform: none; }
/* The (i) of "Did you mean…?" opens upwards, so it never covers the suggestions the visitor is about to click */
.brand-suggest-head .tip { top: auto; bottom: calc(100% + 0.5rem); }
.brand-suggest-head .tip::before { top: auto; bottom: -0.8rem; }
.brand-suggest-head { position: relative; }
.brand-suggest-head .info-wrap { position: static; }
.brand-suggest-head .tip { left: 0; right: 0; width: auto; }

/* Specific goal: a box that grows with the sentence so it reads whole (field-sizing where supported) */
.brief textarea.objective-input {
  width: 100%; min-height: 3.3rem; resize: none; field-sizing: content; max-height: 9rem;
  font: 400 0.98rem/1.45 var(--font-body); color: var(--text); background: rgba(255, 255, 255, 0.05); border: 0;
  box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-ctl); padding: 0.72rem 0.9rem; transition: box-shadow 160ms var(--ease-out);
}
.brief textarea.objective-input::placeholder { color: var(--faint); }
.brief textarea.objective-input:focus { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); outline: none; }
@media (pointer: coarse) { .brief textarea.objective-input { font-size: 16px; } }

/* Goal quadrants: the hovered/focused one grows in place (its column widens, its card opens), the others shrink */
.refine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; transition: grid-template-columns 340ms var(--ease-out); }
.refine-grid[data-focus="0"], .refine-grid[data-focus="2"] { grid-template-columns: 1.75fr 0.75fr; }
.refine-grid[data-focus="1"], .refine-grid[data-focus="3"] { grid-template-columns: 0.75fr 1.75fr; }
.refine-grid .refine-opt { all: unset; box-sizing: border-box; min-width: 0; cursor: pointer; display: flex; flex-direction: column; gap: 0.4rem; padding: 0.6rem 0.65rem; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); transition: opacity 220ms var(--ease-out), background-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out), transform 140ms var(--ease-out); }
.refine-grid .refine-opt .refine-type { font-size: 0.58rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-sizing: border-box; }
.refine-grid .refine-opt .refine-obj { font: 600 0.78rem/1.35 var(--font-display); color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.refine-grid[data-focus]:not([data-focus=""]) .refine-opt:not(.is-previewed) { opacity: 0.55; }
.refine-grid[data-focus]:not([data-focus=""]) .refine-opt:not(.is-previewed) .refine-obj { font-size: 0.7rem; }
.refine-grid .refine-opt.is-previewed { background: var(--panel-2); box-shadow: inset 0 0 0 1px rgba(207, 198, 255, 0.45), 0 12px 28px -16px rgba(0, 0, 0, 0.9); }
.refine-grid .refine-opt.is-previewed .refine-obj { display: block; font-size: 0.86rem; }
.refine-grid .refine-opt:active { transform: scale(0.98); }
.refine-grid .refine-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The full card opens inside the quadrant: height animates with the 0fr -> 1fr grid-rows trick */
.refine-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 340ms var(--ease-out); }
.refine-more-in { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 0.35rem; opacity: 0; transition: opacity 200ms var(--ease-out); }
.refine-opt.is-previewed .refine-more { grid-template-rows: 1fr; }
.refine-opt.is-previewed .refine-more-in { opacity: 1; transition-delay: 80ms; }
.refine-hint { font-size: 0.72rem; color: var(--accent); }
/* "Suggest goals" invites a click once the visitor stops typing (it never sends on its own) */
.refine-go.is-ready { box-shadow: inset 0 0 0 1px rgba(207, 198, 255, 0.7), 0 0 0 4px rgba(207, 198, 255, 0.14); color: var(--text); }
@media (prefers-reduced-motion: reduce) { .refine-grid, .refine-more, .refine-more-in, .refine-grid .refine-opt { transition: none; } }
.refine-grid[data-focus]:not([data-focus=""]) .refine-opt:not(.is-previewed) { align-self: start; }

/* Brand field status: spinner while looking, green check when identified, red when nothing matches */
.brand-input { position: relative; }
.brand-input input { width: 100%; padding-right: 2.6rem; }
.brand-status { position: absolute; right: 0.8rem; top: 50%; transform: translateY(-50%); display: inline-flex; pointer-events: none; }
.brand-mark { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 999px; font: 700 0.72rem/1 var(--font-display); color: #000; animation: brand-mark-in 260ms cubic-bezier(.34,1.36,.64,1); }
.brand-input[data-status="ok"] .brand-mark { background: var(--ok); }
.brand-input[data-status="none"] .brand-mark { background: #ff8a7a; }
.brand-input[data-status="ok"] input { box-shadow: inset 0 0 0 1px rgba(143, 240, 191, 0.55); }
.brand-input[data-status="none"] input { box-shadow: inset 0 0 0 1px rgba(255, 138, 122, 0.75); }
.brand-note { margin: 0.35rem 0 0; font-size: 0.76rem; line-height: 1.45; color: #ff8a7a; }
.brand-note:empty { display: none; }
.brand-note.is-ok { color: var(--ok); }
@keyframes brand-mark-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .brand-mark { animation: none; } }

/* Live generation steps: green check + time once done, a small spinner on the one in progress */
.loader-log li.is-ok .ok-mark { display: inline-grid; place-items: center; width: 1rem; height: 1rem; border-radius: 999px; background: var(--ok); color: #000; font: 700 0.62rem/1 var(--font-display); vertical-align: -0.12em; }
.loader-log li.is-active { color: var(--text); }
.spinner.xs { width: 0.8rem; height: 0.8rem; border-width: 2px; display: inline-block; vertical-align: -0.1em; }

/* Photo credit under a piece */
.piece-credit { margin: 0.2rem 0 0; font-size: 0.7rem; color: var(--muted); }
.piece-credit a { color: var(--text-2); }

/* Assumptions: the correction goes below the original */
.assumed-box .read-assumed li { grid-template-columns: auto 1fr auto auto; }
.assumed-box .read-assumed li .assumed-input { grid-column: 1 / -1; }
.assumed-box .read-assumed li.is-fixing .assumed-text { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.35); }
@media (max-width: 640px) { .assumed-box .read-assumed li { grid-template-columns: 1fr auto; } .assumed-box .read-assumed li > b { grid-column: 1 / -1; } }

/* Idea split: which idea is which */
.split-seg { position: relative; display: grid; place-items: center; }
.split-n { font: 700 0.6rem/1 var(--font-display); color: #000; }
.split-legend { flex-wrap: wrap; }

/* Idea cards: no sibling stretches when one opens; roomier trace */
.ideas-grid { align-items: start; }
.idea-slot { display: block; }
.idea-card .trace-chips { gap: 0.35rem; }
.idea-card .trace-chip { white-space: normal; }
.idea-card.is-regenerating { min-height: 22rem; }
.regen-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; text-align: center; color: var(--text-2); }
.regen-state p { margin: 0; font: 600 0.95rem var(--font-display); color: var(--text); }
.regen-state small { color: var(--muted); }

/* Steps of the proposal */
.flow-steps { list-style: none; margin: 0 0 1.2rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font: 500 0.8rem var(--font-display); color: var(--muted); }
.flow-steps li { display: flex; align-items: center; gap: 0.45rem; }
.flow-n { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 999px; font-size: 0.7rem; box-shadow: inset 0 0 0 1px var(--line-2); }
.flow-steps li.is-now { color: var(--text); }
.flow-steps li.is-now .flow-n { background: var(--text); color: #000; box-shadow: none; }
.flow-steps li.is-done .flow-n { background: var(--ok); color: #000; box-shadow: none; }
.flow-steps li + li::before { content: ''; width: 1.2rem; height: 1px; background: var(--line-2); margin-right: 0.6rem; }

/* Continue: the next step, with weight; it sticks to the bottom while ideas are picked */
.continue-main { display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.8rem 1.3rem; font-size: 0.95rem; }
.continue-main:disabled { opacity: 0.4; cursor: not-allowed; }
.ideas-continue.is-ready { position: sticky; bottom: 1rem; z-index: 20; padding: 0.8rem 1rem; border-radius: 16px; background: rgba(14, 14, 18, 0.88); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 40px rgba(0, 0, 0, 0.6); }
.ideas-continue.is-ready p { color: var(--text-2); }
.early-word { margin: 1rem 0 0; font-size: 0.82rem; color: var(--muted); }
.early-word[hidden], .final[hidden], .adapt-history[hidden] { display: none; }

/* The idea's formats and the next step */
.idea-formats { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin-top: 0.6rem; }
.idea-formats-label { font: 600 0.72rem var(--font-display); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.idea-next { margin: 0.7rem 0 0; font-size: 0.84rem; color: var(--accent); }

/* Cancel controls and the adapted-claims history */
.claim-adapt .cancel-x { opacity: 0.75; }
.cancel-btn { border: 0; cursor: pointer; width: 1.8rem; height: 1.8rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--text); font-size: 0.8rem; }
.cancel-btn:hover { background: rgba(255, 255, 255, 0.16); }
.cancel-btn[hidden] { display: none; }
.adapt-history { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin: 1rem 0 0.4rem; padding: 0.6rem 0.75rem; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.adapt-history-label { font: 600 0.72rem var(--font-display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-right: 0.3rem; }
.history-chip { border: 0; cursor: pointer; padding: 0.35rem 0.7rem; border-radius: 999px; font: 500 0.78rem var(--font-display); color: var(--text-2); background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line-2); max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-chip.is-current { background: var(--text); color: #000; }
.history-chip:focus-visible, .cancel-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Narrow screens (desktop first; the result flow folds to one column) ---- */
@media (max-width: 640px) {
  .read-grid { grid-template-columns: 1fr; }
  .flow-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 0.8rem; }
  .flow-steps li + li::before { display: none; }
  .ideas-continue { flex-direction: column; align-items: stretch; text-align: left; gap: 0.6rem; }
  .ideas-continue.is-ready { bottom: 0.5rem; }
  .continue-main { justify-content: center; }
  .adapt-history { gap: 0.35rem; }
  .history-chip { max-width: 100%; }
  .refine-grid[data-focus="0"], .refine-grid[data-focus="2"], .refine-grid[data-focus="1"], .refine-grid[data-focus="3"] { grid-template-columns: 1fr 1fr; }
}
