.profile-hero {
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) 155px;
  gap:28px;
  align-items:center;
  margin:10px 0 26px;
}
.profile-hero > * { position:relative; z-index:1; }
.profile-title-block { min-width:0; }
.profile-title-block h1 {
  max-width:980px;
  margin-bottom:18px;
  font-size:clamp(40px,5vw,68px);
  line-height:1.08;
}
.profile-headline-lead {
  position:relative;
  z-index:2;
  display:inline;
  top:.05em;
  color:var(--accent-text,var(--pink));
}
.profile-headline-highlight {
  position:relative;
  z-index:1;
  display:inline;
  top:-.05em;
  color:#fff;
  background:var(--navy);
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
  padding:0 .12em .05em;
}
.profile-evidence-note { margin-top:10px; font-size:clamp(14px,1.5vw,16px); }
.profile-stamp {
  width:140px;
  height:140px;
  align-self:center;
  justify-self:end;
  margin-right:12px;
  border:4px double var(--pink);
  border-radius:50%;
  display:grid;
  place-content:center;
  text-align:center;
  color:var(--accent-text,var(--pink));
  transform:rotate(calc(8deg * var(--tilt)));
}
.profile-stamp strong { font-size:18px; letter-spacing:.08em; }
.profile-stamp span { font-family:var(--hand); font-size:24px; }

.profile-learning {
  margin:0 0 24px;
  padding:18px 20px;
  border:2px solid var(--navy);
  border-radius:16px;
  background:var(--tint-cool,#f5feff);
  box-shadow:calc(5px * var(--hard)) calc(5px * var(--hard)) 0 var(--shadow-ink,rgb(var(--ink-rgb,17 26 75) / .1));
}
.profile-learning-head { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; }
.profile-learning-head h2 { margin:2px 0 4px; font-size:clamp(24px,3vw,34px); }
.profile-learning-head p:last-child { margin:0; color:var(--muted); font-size:13px; line-height:1.45; }
.profile-learning-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:14px; }
.profile-learning-item {
  display:grid;
  gap:5px;
  min-width:0;
  padding:12px 13px;
  border:1.5px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.78);
}
.profile-learning-item strong { color:var(--navy); font-size:14px; line-height:1.3; }
.profile-learning-item span { color:var(--text2,#3f4774); font-size:12px; line-height:1.45; }
@media (max-width:760px) { .profile-learning-list { grid-template-columns:1fr; } }

.profile-evidence-strip {
  display:grid;
  grid-template-columns:120px minmax(0,1fr);
  align-items:start;
  gap:12px;
  margin:0 0 26px;
  padding:16px 18px;
  background:var(--navy);
  color:#fff;
  border-radius:16px;
  transform:rotate(calc(-.25deg * var(--tilt)));
}
.profile-evidence-label { font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; padding-top:7px; }
.profile-evidence-track { display:flex; gap:8px; flex-wrap:wrap; }
.profile-evidence-item {
  padding:7px 10px;
  border-radius:999px;
  color:var(--navy);
  background:#fff;
  font-size:12px;
  font-weight:700;
}
.evidence-1 { background:var(--pink-soft); }
.evidence-2 { background:var(--cyan-soft); }
.evidence-3 { background:var(--tint-lime,#efffc2); }
.evidence-4 { background:var(--violet-soft); }
.profile-evidence-more { display:inline-flex; flex-wrap:wrap; gap:8px; align-items:center; }
.profile-evidence-more summary {
  list-style:none;
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:6px 10px;
  border:1px dashed rgb(255 255 255 / .72);
  border-radius:999px;
  color:#fff;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.profile-evidence-more summary::-webkit-details-marker { display:none; }
.profile-evidence-more[open] { flex-basis:100%; }
.profile-evidence-more-items { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }

.profile-map {
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:20px;
  align-items:start;
}
.profile-map-aside {
  position:sticky;
  top:18px;
  padding:24px 18px;
  border:2px solid var(--navy);
  background:var(--tint-warm,#fff8cf);
  box-shadow:calc(7px * var(--hard)) calc(7px * var(--hard)) 0 var(--navy);
  transform:rotate(calc(-1.5deg * var(--tilt)));
}
.profile-aside-number { display:block; font-size:70px; line-height:.8; font-weight:700; color:var(--accent-text,var(--pink)); letter-spacing:-.08em; }
.profile-map-aside p { color:var(--navy); font-weight:700; line-height:1.15; }
.profile-aside-note { color:#4155af; font-size:19px; margin-top:18px; }
.signal-stack { display:grid; border-top:2px solid var(--navy); }
.signal-row {
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  min-height:165px;
  border-bottom:2px solid var(--navy);
  background:rgba(255,255,255,.62);
}
.signal-row:nth-child(2n) { background:rgba(236,232,255,.6); }
.signal-row-3 { background:rgba(220,251,253,.55); }
.signal-row-4 { background:rgba(255,227,246,.55); }
.signal-index {
  display:grid;
  place-items:center;
  border-right:2px solid var(--navy);
  color:var(--navy);
  font-size:34px;
  font-weight:700;
  letter-spacing:-.08em;
}
.signal-main { padding:20px 22px; }
.signal-title-row { display:flex; gap:14px; justify-content:space-between; align-items:flex-start; }
.signal-title-row h3 { margin:0; max-width:760px; font-size:clamp(22px,2.5vw,34px); }
.signal-status {
  flex:0 0 auto;
  padding:6px 9px;
  border:2px solid var(--navy);
  border-radius:999px;
  background:var(--lime);
  color:var(--navy);
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
}
.signal-status.emerging { background:var(--cyan-soft,#dcfbfd); }
.signal-status.supported { background:var(--tint-lime,#efffc2); }
.signal-status.conditional { background:var(--violet-soft); }
.signal-status.revision { background:var(--tint-red,#ffd9d5); }
.signal-badges { display:flex; flex:0 0 auto; gap:6px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.signal-flag { padding:4px 8px; border:1.5px dashed var(--navy); border-radius:999px; color:var(--navy); font-size:10px; font-weight:700; text-transform:uppercase; }
.signal-say { display:grid; gap:10px; margin-top:12px; }
.signal-say-primary { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.signal-say-group { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.signal-followups {
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  margin-left:0;
  padding:10px 12px;
  border-left:3px solid var(--line);
  background:rgb(255 255 255 / .42);
}
.signal-followups-partial { display:grid; gap:9px; }
.signal-followup-heading { color:var(--navy); font-size:12px; font-weight:800; }
.signal-say-label { color:var(--muted); font-size:12px; font-weight:700; }
.signal-say-button { min-height:32px; min-width:0; padding:4px 10px; font-size:12px; box-shadow:none; }
.signal-say-button[aria-pressed="true"] { background:var(--navy); color:#fff; }
.signal-scope { align-items:center; margin-top:0; }
.signal-scope-label { color:var(--navy); font-size:13px; }
.signal-scope-options { display:flex; flex-wrap:wrap; gap:8px; }
.signal-scope-option {
  appearance:none;
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:38px;
  padding:6px 11px 6px 8px;
  border:2px solid var(--line);
  border-radius:10px;
  background:rgba(255,255,255,.72);
  color:var(--muted);
  font:inherit;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
.signal-scope-option[aria-pressed="true"] {
  border-color:var(--navy);
  background:var(--paper);
  color:var(--navy);
}
.signal-scope-check {
  display:grid;
  place-items:center;
  width:19px;
  height:19px;
  flex:none;
  border:2px solid currentColor;
  border-radius:4px;
  background:transparent;
  font-size:12px;
  line-height:1;
}
.signal-scope-option[aria-pressed="true"] .signal-scope-check {
  background:var(--navy);
  border-color:var(--navy);
  color:#fff;
}
.signal-said { margin-top:8px; padding:6px 10px; border-left:3px solid var(--navy); background:var(--tint-warm,#fff9e6); font-size:13px; color:var(--text2,#3f4774); }
.signal-row.is-excluded .signal-claim, .signal-row.is-excluded h3 { opacity:.6; }
.signal-provenance { margin-top:6px; font-size:13px; line-height:1.4; color:var(--text2,#3f4774); }
.profile-legend { margin-top:10px; max-width:640px; font-size:14px; }
.profile-legend summary { min-height:28px; display:flex; align-items:center; cursor:pointer; color:var(--navy); font-weight:700; }
.profile-legend ul { margin:6px 0; padding-left:20px; display:grid; gap:4px; }
.profile-legend p { margin:6px 0 0; color:var(--muted); }
.signal-claim { margin:9px 0 14px; color:var(--muted); line-height:1.48; }
.signal-evidence { font-size:12px; color:var(--text2,#3f4774); }
.signal-evidence span {
  margin-right:6px;
  color:var(--accent-text,var(--pink));
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.signal-lean {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  width:fit-content;
  max-width:100%;
  margin-top:10px;
  padding:5px 11px;
  border:1px dashed var(--navy);
  border-radius:999px;
  background:rgba(255,255,255,.72);
  color:var(--text2,#3f4774);
  font-size:12px;
  font-weight:700;
}
.signal-lean em { font-style:normal; font-weight:500; color:#5b6390; }
.signal-lean.is-away { border-color:var(--warn,#b5524b); }
.signal-blind {
  margin-top:8px;
  padding:6px 12px;
  border-left:4px solid var(--coral);
  border-radius:0 10px 10px 0;
  background:rgba(255,255,255,.72);
  color:var(--text2,#3f4774);
  font-size:12px;
  font-weight:700;
}
.signal-update {
  margin-top:12px;
  padding:9px 11px;
  border-left:5px solid var(--cyan);
  background:var(--tint-cool,#f5feff);
  color:#3e4774;
  font-size:12px;
}
.profile-footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-top:28px;
  padding:0 10px;
}
.footer-note { color:#4254b7; font-size:20px; transform:rotate(calc(-1deg * var(--tilt))); }

.profile-ai-status {
  width:fit-content;
  max-width:720px;
  margin:12px 0 0;
  padding:8px 11px;
  border-left:3px solid var(--cyan);
  background:var(--tint-cool,#eef8fa);
  color:var(--text2,#3f4774);
  font-size:13px;
  line-height:1.45;
}


.profile-empty {
  margin:18px 0 4px;
  padding:28px;
  border:2px dashed var(--line);
  border-radius:16px;
  background:rgb(255 255 255 / .72);
  color:var(--text2,#3f4774);
}
.profile-empty strong { display:block; margin-bottom:6px; color:var(--navy); font-size:20px; }
.profile-empty p { max-width:68ch; margin:0; line-height:1.5; }


.profile-ai-status { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.profile-retry {
  flex:0 0 auto;
  min-width:0;
  min-height:34px;
  padding:5px 10px;
  border-color:var(--line);
  background:rgb(255 255 255 / .58);
  color:var(--navy);
  font-size:12px;
  box-shadow:none;
}

.profile-ai-status.is-loading {
  border-left-width:5px;
  border-left-color:var(--cyan);
  background:var(--tint-cool,#eef8fa);
  color:var(--navy);
  font-weight:700;
}
.profile-ai-status-dot {
  width:7px;
  height:7px;
  flex:none;
  border-radius:50%;
  background:var(--muted);
  opacity:.55;
}
.profile-ai-status.is-loading .profile-ai-status-dot {
  background:var(--cyan);
  opacity:1;
  box-shadow:0 0 0 4px rgb(32 217 232 / .16);
  animation:profile-refresh-pulse 1.2s ease-in-out infinite;
}
@keyframes profile-refresh-pulse {
  0%,100% { opacity:.45; transform:scale(.85); }
  50% { opacity:1; transform:scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .profile-ai-status.is-loading .profile-ai-status-dot { animation:none; }
}


.corrected-patterns {
  margin:22px 0 0;
  border:1px solid rgb(var(--ink-rgb,17 26 75) / .2);
  border-radius:14px;
  background:rgb(255 255 255 / .55);
  overflow:hidden;
}
.corrected-patterns > summary {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:48px;
  padding:10px 14px;
  color:var(--navy);
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}
.corrected-pattern-count {
  display:inline-grid;
  place-items:center;
  min-width:24px;
  min-height:22px;
  padding:0 6px;
  border-radius:999px;
  background:var(--pink-soft);
  font-size:11px;
}
.corrected-patterns-note {
  margin:0;
  padding:0 14px 10px;
  color:var(--muted);
  font-size:12px;
}
.corrected-pattern-list {
  display:grid;
  border-top:1px solid var(--line);
}
.corrected-pattern-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 14px;
}
.corrected-pattern-row + .corrected-pattern-row { border-top:1px solid var(--line); }
.corrected-pattern-row > div { min-width:0; }
.corrected-pattern-row strong,
.corrected-pattern-row span { display:block; }
.corrected-pattern-row strong { color:var(--navy); font-size:14px; }
.corrected-pattern-row span { margin-top:2px; color:var(--muted); font-size:11px; }
.corrected-pattern-reconsider {
  min-width:0;
  min-height:34px;
  padding:5px 9px;
  font-size:11px;
  box-shadow:none;
}
.profile-no-active-patterns {
  padding:20px;
  border-bottom:2px solid var(--navy);
  background:rgb(255 255 255 / .62);
  color:var(--muted);
  font-size:13px;
}
.signal-say,
.signal-said,
.signal-followups {
  scroll-margin-top:18px;
}
@media (max-width: 640px) {
  .corrected-pattern-row { align-items:flex-start; flex-direction:column; }
}

.signal-consequence {
  display:flex;
  gap:8px;
  align-items:flex-start;
  margin:10px 0 0;
  padding:9px 11px;
  border-left:3px solid var(--cyan);
  background:var(--tint-cool,#f4fdff);
  color:var(--text2,#3f4774);
  font-size:12px;
  line-height:1.4;
}
.signal-consequence strong { flex:none; color:var(--navy); }
.profile-learning-source { color:var(--note-ink,#4053ad) !important; }
.profile-learning-item b { color:var(--navy); }
@media (max-width:620px) {
  .signal-consequence { display:grid; gap:3px; }
}


/* Deeper Taste Profile views: keep the overview concise while allowing the working model to grow. */
.profile-depth-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin:28px 0 18px;
}
.profile-depth-head > div { max-width:760px; }
.profile-depth-head h2 { margin:4px 0 8px; font-size:clamp(26px,3vw,38px); }
.profile-depth-head p:last-child { margin:0; color:var(--muted); line-height:1.5; }
.profile-more-callout {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin:20px 0 8px;
  padding:18px 20px;
  border:2px dashed var(--navy);
  border-radius:16px;
  background:var(--tint-cool,#eef9fb);
}
.profile-more-callout > div:first-child { display:grid; gap:3px; }
.profile-more-callout span { color:var(--muted); font-size:13px; }
.profile-more-actions { display:flex; flex-wrap:wrap; gap:8px; }
@media (max-width:760px) {
  .profile-depth-head,.profile-more-callout { align-items:stretch; flex-direction:column; }
  .profile-depth-head > button,.profile-more-actions .button { width:100%; }
}


/* Compact Taste Profile entry: get users to the patterns before supporting context. */
.profile-compact-lede {
  max-width:700px;
  margin-bottom:4px;
}
.profile-ai-status-compact {
  margin-top:8px;
  padding:5px 9px;
  border-left-width:2px;
  background:transparent;
  font-size:12px;
}
.profile-ai-status-compact .profile-retry {
  min-height:30px;
  padding:3px 8px;
}
.profile-depth-head {
  align-items:flex-end;
  margin:10px 0 14px;
}
.profile-depth-head h2 { margin-bottom:5px; }
.profile-depth-head p:last-child { font-size:13px; }
.profile-legend-inline {
  width:fit-content;
  margin:12px 0 0;
}
.profile-evidence-collapsed {
  display:block;
  margin-top:22px;
  padding:0;
  border:1px solid rgb(var(--ink-rgb,17 26 75) / .16);
  border-radius:13px;
  background:rgb(255 255 255 / .45);
}
.profile-evidence-collapsed > summary {
  padding:10px 13px;
  color:var(--navy);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.profile-evidence-collapsed[open] > summary { border-bottom:1px solid var(--line); }
.profile-evidence-collapsed .profile-evidence-track { padding:11px 13px 13px; }
.profile-learning { margin-top:26px; }

@media (max-width:760px) {
  .profile-depth-head { margin-top:8px; }
  .profile-ai-status-compact { width:100%; }
}


.profile-evidence-summary {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  padding:11px 13px 0;
}
.profile-evidence-summary strong { color:var(--navy); font-size:14px; }
.profile-evidence-summary span { color:var(--muted); font-size:12px; }
.profile-evidence-collapsed .profile-evidence-label {
  flex-basis:100%;
  margin-bottom:2px;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em;
}
@media (max-width:640px) {
  .profile-evidence-summary { align-items:flex-start; flex-direction:column; gap:3px; }
}
