:root {
  color-scheme: dark;
  --bg: #080b12;
  --surface: #111722;
  --surface-2: #182233;
  --surface-3: #0d121c;
  --ink: #eef4ff;
  --muted: #94a3b8;
  --line: #243246;
  --blue: #6ea8fe;
  --blue-2: rgba(110, 168, 254, 0.14);
  --green: #4ade80;
  --green-2: rgba(74, 222, 128, 0.13);
  --amber: #fbbf24;
  --amber-2: rgba(251, 191, 36, 0.14);
  --orange: #fb923c;
  --orange-2: rgba(251, 146, 60, 0.15);
  --red: #f87171;
  --red-2: rgba(248, 113, 113, 0.15);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(34, 72, 130, 0.22), transparent 34rem),
    linear-gradient(180deg, #0a0f19 0%, var(--bg) 42%);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(10, 15, 25, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-direction: column;
}

.brand-logo {
  display: block;
  width: 206px;
  height: auto;
}

.brand-copy {
  display: block;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  color: #06101e;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(110, 168, 254, 0.35);
  background: var(--blue-2);
  color: #f8fbff;
}

.icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--blue);
}

.project-card {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 23, 34, 0.94), rgba(13, 18, 28, 0.94));
}

.project-card h2 {
  margin: 8px 0;
  font-size: 20px;
}

.project-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-meta span,
.tag {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #d7e2f2;
  font-size: 12px;
  font-weight: 700;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 4px 0 0;
  font-size: 30px;
  font-weight: 780;
  line-height: 1.12;
}

h2 {
  margin: 4px 0 0;
  font-size: 19px;
  font-weight: 740;
  line-height: 1.2;
}

p {
  line-height: 1.55;
}

.topbar-actions,
.panel-heading,
.panel-actions,
.score-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.text-button {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 720;
}

.primary-button {
  border: 1px solid rgba(110, 168, 254, 0.48);
  background: linear-gradient(135deg, #2f7df4, #1bbdd1);
  color: #06101e;
  padding: 10px 14px;
}

.primary-button.cta-highlight {
  border-color: rgba(72, 211, 133, 0.9);
  box-shadow: 0 0 0 4px rgba(72, 211, 133, 0.14), 0 0 24px rgba(27, 189, 209, 0.28);
  animation: ctaBreath 1.8s ease-in-out infinite;
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(17, 23, 34, 0.78);
  color: #d7e2f2;
  padding: 10px 14px;
}

.library-nav-item {
  margin-top: 10px;
  border-color: rgba(72, 211, 133, 0.28);
  background: rgba(72, 211, 133, 0.08);
}

.library-nav-item .icon {
  color: #48d385;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 34, 0.78);
  color: #d7e2f2;
  padding: 10px 14px;
  font-weight: 720;
  text-decoration: none;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 8px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.dashboard-grid,
.matching-layout,
.detail-layout,
.recommendations-layout,
.users-layout {
  display: grid;
  gap: 18px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.matching-layout,
.detail-layout,
.users-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recommendations-layout {
  grid-template-columns: minmax(0, 1fr);
}

.web-radar-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
}

.section-stack {
  display: grid;
  gap: 18px;
}

.decision-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.decision-header p {
  max-width: 760px;
}

.project-context {
  margin-top: 12px;
  white-space: pre-line;
  color: var(--muted);
  line-height: 1.5;
}

.scoring-details {
  margin-top: 14px;
}

.scoring-details summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 850;
}

.weight-controls {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.weight-controls label {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 760;
}

.weight-controls input {
  accent-color: var(--blue);
}

.weight-controls output {
  color: var(--muted);
  font-weight: 850;
  text-align: right;
}

.panel,
.readiness-panel,
.detail-summary,
.table-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 34, 0.92);
  box-shadow: var(--shadow);
}

.panel,
.detail-summary {
  padding: 20px;
}

.readiness-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 24px;
}

.readiness-panel p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.metric-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric-row div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
}

.metric-row strong {
  display: block;
  font-size: 28px;
}

.metric-row span {
  color: var(--muted);
  font-size: 13px;
}

.score-ring {
  --angle: calc(var(--score) * 3.6deg);
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--angle), #27364b 0deg);
  position: relative;
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: var(--surface);
}

.score-ring span,
.score-ring small {
  position: relative;
}

.score-ring span {
  align-self: end;
  font-size: 31px;
  font-weight: 850;
}

.score-ring small {
  align-self: start;
  color: var(--muted);
  font-weight: 700;
}

.score-ring.large {
  width: 144px;
  height: 144px;
  flex: 0 0 auto;
}

.deadline-list,
.opportunity-stack,
.gap-list,
.action-list,
.bar-list,
.why-list,
.checklist {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.deadline-item,
.opportunity-card,
.gap-item,
.action-item,
.requirement,
.why-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 14px;
}

.deadline-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.deadline-item strong,
.deadline-item span {
  display: block;
}

.deadline-item span,
.opportunity-card p,
.action-item span,
.requirement span,
.why-item span {
  color: var(--muted);
  font-size: 13px;
}

.opportunity-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.opportunity-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.opportunity-card p {
  margin: 0;
}

.match-badge {
  display: grid;
  min-width: 64px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  color: #06101e;
  font-weight: 850;
}

.match-badge.strong {
  background: var(--green);
}

.match-badge.viable {
  background: var(--amber);
}

.match-badge.weak {
  background: var(--orange);
}

.gap-item {
  width: 100%;
  text-align: left;
}

.gap-item strong,
.gap-item span {
  display: block;
}

.gap-item.high {
  border-color: rgba(251, 146, 60, 0.34);
  background: var(--orange-2);
}

.gap-item.medium {
  border-color: rgba(251, 191, 36, 0.34);
  background: var(--amber-2);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.toolbar input,
.toolbar select {
  min-height: 42px;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  padding: 9px 11px;
  text-transform: none;
}

.table-card {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: var(--surface-3);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  vertical-align: middle;
}

tr:hover td {
  background: rgba(110, 168, 254, 0.06);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.green {
  background: var(--green-2);
  color: var(--green);
}

.status-pill.amber {
  background: var(--amber-2);
  color: var(--amber);
}

.status-pill.orange {
  background: var(--orange-2);
  color: var(--orange);
}

.bar-item {
  display: grid;
  gap: 8px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  color: #d7e2f2;
  font-weight: 750;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #27364b;
  overflow: hidden;
}

.bar-fill {
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.requirement-grid,
.detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.requirement strong,
.requirement span {
  display: block;
}

.requirement.pass {
  border-color: rgba(74, 222, 128, 0.34);
  background: var(--green-2);
}

.requirement.warn {
  border-color: rgba(251, 191, 36, 0.34);
  background: var(--amber-2);
}

.detail-summary {
  background: linear-gradient(135deg, #10233f, #101825);
  color: var(--ink);
}

.detail-summary .eyebrow,
.detail-summary p {
  color: #bfd0e6;
}

.detail-stats div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.detail-stats strong,
.detail-stats span,
.checklist label {
  display: block;
}

.detail-stats span {
  color: #bfd0e6;
  font-size: 13px;
}

.checklist label {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checklist input {
  margin-right: 8px;
}

.full-span {
  grid-column: 1 / -1;
}

.impact-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.matrix-item {
  display: grid;
  gap: 8px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  padding: 14px;
  text-align: left;
  font-weight: 800;
}

.matrix-item span {
  color: var(--muted);
  font-size: 13px;
}

.high-impact {
  border-color: rgba(74, 222, 128, 0.34);
  background: var(--green-2);
}

.medium-impact {
  border-color: rgba(110, 168, 254, 0.34);
  background: var(--blue-2);
}

.decision-copy {
  max-width: 840px;
  color: var(--muted);
}

.muted-copy {
  color: var(--muted);
}

.diagnostic-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.diagnostic-form label,
.profile-form label,
.auth-grid label {
  display: grid;
  gap: 7px;
  color: #d7e2f2;
  font-size: 13px;
  font-weight: 800;
}

.diagnostic-form .full-field {
  grid-column: 1 / -1;
}

.diagnostic-form input,
.diagnostic-form select,
.diagnostic-form textarea,
.profile-form input,
.profile-form select,
.profile-form textarea,
.auth-grid input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  padding: 9px 11px;
}

.diagnostic-form textarea,
.profile-form textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.45;
}

.profile-form,
.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.auth-panel {
  border-color: rgba(72, 211, 133, 0.24);
}

.profile-form .full-field {
  grid-column: 1 / -1;
}

.auth-grid .full-field {
  grid-column: 1 / -1;
}

.profile-actions {
  margin-top: 16px;
}

.document-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.document-form label {
  display: grid;
  gap: 7px;
  color: #d7e2f2;
  font-size: 13px;
  font-weight: 800;
}

.document-form .full-field {
  grid-column: 1 / -1;
}

.document-form input,
.document-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  padding: 9px 11px;
}

.document-form textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.45;
}


.trl-field {
  grid-column: 1 / -1;
}

.trl-helper {
  display: grid;
  gap: 9px;
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(110, 168, 254, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(47, 125, 244, 0.12), rgba(27, 189, 209, 0.07));
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.trl-helper.pulse {
  animation: trlPulse 420ms ease-out;
}

.trl-helper-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trl-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(110, 168, 254, 0.14);
  color: #bfdbfe;
  font-weight: 850;
}

#trl-family {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.trl-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
}

.trl-track span {
  display: block;
  width: var(--trl-progress, 44%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7df4, #1bbdd1, #48d385);
  transition: width 240ms ease;
}

.trl-helper p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.trl-helper small {
  color: var(--muted);
  line-height: 1.45;
}

@keyframes trlPulse {
  0% { transform: scale(0.995); border-color: rgba(110, 168, 254, 0.28); }
  50% { transform: scale(1.003); border-color: rgba(72, 211, 133, 0.55); }
  100% { transform: scale(1); border-color: rgba(110, 168, 254, 0.28); }
}
.diagnostic-form input[type="range"] {
  min-height: auto;
  padding: 0;
  accent-color: #2563eb;
}

.range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}

.range-row output {
  display: grid;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-2);
  color: var(--blue);
  font-weight: 850;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 8px;
}

.query-list,
.radar-flow {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.saved-opportunities,
.match-results,
.usage-history,
.document-list,
.insight-results,
.premium-results,
.source-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.source-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.saved-summary {
  margin-top: 10px;
  color: var(--muted);
}

.saved-card,
.match-card,
.document-card,
.role-card,
.insight-card,
.source-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 14px;
}

.saved-card header,
.match-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.saved-card h3,
.match-card h3,
.role-card h2 {
  margin: 0;
  font-size: 17px;
}

.saved-card p,
.match-card p,
.document-card p,
.role-card p {
  margin: 0;
  color: var(--muted);
}

.saved-card a {
  color: var(--blue);
  font-weight: 750;
}

.source-card strong,
.source-card span,
.source-card a {
  min-width: 0;
}

.source-card strong {
  color: var(--text);
}

.source-card span {
  color: var(--muted);
  font-size: 13px;
}

.source-card a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

.saved-card-badges {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.locked-teaser {
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: rgba(13, 18, 28, 0.72);
  filter: blur(0.2px);
  opacity: 0.72;
  padding: 16px;
}

.locked-teaser strong,
.locked-teaser span {
  display: block;
}

.locked-teaser span {
  margin-top: 6px;
  color: var(--muted);
}

.match-card {
  padding: 20px;
}

.match-card-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.match-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 0 auto;
}

.source-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(110, 168, 254, 0.55);
  border-radius: 8px;
  background: var(--blue-2);
  color: var(--blue);
  padding: 9px 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.source-button:hover {
  border-color: var(--blue);
  background: rgba(110, 168, 254, 0.2);
}

.inline-source {
  width: fit-content;
  min-height: 34px;
  margin-top: 4px;
  padding: 7px 10px;
}

.premium-panel {
  border-color: rgba(77, 223, 133, 0.28);
}


.plan-document-upload {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(110, 168, 254, 0.22);
  border-radius: 8px;
  background: rgba(110, 168, 254, 0.06);
}

.plan-document-upload label {
  display: grid;
  gap: 7px;
  color: #d7e2f2;
  font-size: 13px;
  font-weight: 800;
}

.plan-document-upload input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  padding: 9px 11px;
}

.plan-document-upload .muted-copy {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
}
.premium-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.plan-selection-summary {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(110, 168, 254, 0.32);
  border-radius: 8px;
  background: rgba(110, 168, 254, 0.08);
  color: var(--ink);
}

.plan-opportunity-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.plan-opportunity-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  padding: 14px;
  text-align: left;
}

.plan-opportunity-card:hover,
.plan-opportunity-card.active {
  border-color: rgba(77, 223, 133, 0.42);
  background: rgba(77, 223, 133, 0.08);
}

.plan-opportunity-card strong,
.plan-opportunity-card span,
.plan-opportunity-card small {
  display: block;
}

.plan-opportunity-card span,
.plan-opportunity-card small {
  color: var(--muted);
}

.plan-opportunity-card small {
  margin-top: 6px;
  line-height: 1.45;
}

.match-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.premium-output,
.action-pill {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 16px;
}

.premium-output h3,
.action-pill h4 {
  margin: 0;
}

.loss-warning {
  margin: 0;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  color: #ffd98a;
  padding: 12px 14px;
  font-weight: 780;
}

.pill-list,
.template-stack {
  display: grid;
  gap: 12px;
}

.action-pill header,
.pill-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.action-pill header strong {
  color: var(--green);
  white-space: nowrap;
}

.pill-footer {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.artifact-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
}

.artifact-details summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 850;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.artifact-details summary span {
  min-width: 0;
}

.copy-button {
  border: 1px solid rgba(110, 168, 254, 0.42);
  border-radius: 7px;
  background: rgba(110, 168, 254, 0.12);
  color: #9fc2ff;
  padding: 6px 10px;
  font-weight: 820;
  cursor: pointer;
  flex: 0 0 auto;
}

.copy-button:hover {
  background: rgba(110, 168, 254, 0.2);
}

.artifact-details pre {
  max-height: 360px;
  overflow: auto;
  margin: 12px 0 0;
  white-space: pre-wrap;
  color: #dbeafe;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.system-grid div,
.premium-table-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
}

.system-grid strong,
.system-grid span {
  display: block;
}

.system-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.premium-table-section {
  display: grid;
  gap: 10px;
}

.premium-table-section h4 {
  margin: 0;
}

.premium-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.premium-table-row {
  display: grid;
  grid-template-columns: var(--premium-cols, repeat(auto-fit, minmax(140px, 1fr)));
  gap: 12px;
  min-width: max(860px, 100%);
  align-items: start;
}

.premium-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(17, 23, 34, 0.96);
  border-color: rgba(110, 168, 254, 0.32);
  padding-block: 8px;
}

.premium-table-head span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 850;
}

.premium-table-row span {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.premium-table-row .compact-cell {
  color: #d7e2f2;
  font-weight: 820;
}

.premium-table-row .wide-cell {
  max-width: 68ch;
}

.match-card-header h3 {
  font-size: 20px;
}

.match-sections {
  display: grid;
  gap: 18px;
}

.match-section {
  display: grid;
  gap: 10px;
}

.match-section h4 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.match-section-list {
  display: grid;
  gap: 8px;
}

.match-section-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 14px;
}

.match-section-list span {
  display: block;
  color: var(--ink);
  line-height: 1.45;
}

.score-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.score-breakdown-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 12px;
}

.score-breakdown-grid strong,
.score-breakdown-grid span {
  display: block;
}

.score-breakdown-grid strong {
  font-size: 22px;
}

.score-breakdown-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.evidence-item {
  border-color: rgba(104, 158, 255, 0.45) !important;
}

.risk-item {
  border-color: rgba(245, 158, 11, 0.55) !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

.action-item {
  border-color: rgba(78, 221, 133, 0.35) !important;
}

.empty-state {
  text-align: left;
}

.mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-card {
  background: rgba(17, 23, 34, 0.92);
}

.role-card.active {
  border-color: rgba(110, 168, 254, 0.5);
  box-shadow: 0 0 0 1px rgba(110, 168, 254, 0.2);
}

.role-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.match-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.match-map div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 14px;
}

.match-map strong,
.match-map span {
  display: block;
}

.match-map span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.insight-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.usage-grid div,
.usage-entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 14px;
}

.usage-grid strong,
.usage-grid span,
.usage-entry strong,
.usage-entry span {
  display: block;
}

.usage-grid strong {
  font-size: 24px;
}

.usage-grid span,
.usage-entry span,
.usage-note {
  color: var(--muted);
  font-size: 13px;
}

.usage-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.query-card,
.radar-flow div {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 14px;
}

.query-card strong,
.query-card span,
.radar-flow strong,
.radar-flow span {
  display: block;
}

.query-card span,
.radar-flow span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.query-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.query-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(110, 168, 254, 0.32);
  border-radius: 8px;
  background: var(--blue-2);
  color: var(--blue);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.web-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.web-filter-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 14px;
}

.web-filter-grid strong,
.web-filter-grid span {
  display: block;
}

.web-filter-grid span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.timeline div {
  min-height: 94px;
  padding: 14px;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--surface-3);
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline span {
  margin-top: 8px;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(380px, calc(100vw - 48px));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e6f0ff;
  color: #07111f;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.onboarding-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(3, 7, 18, 0.52);
  pointer-events: none;
}

.onboarding-card {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: min(420px, calc(100vw - 32px));
  gap: 16px;
  border: 1px solid rgba(110, 168, 254, 0.32);
  border-radius: 8px;
  background: #101827;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  padding: 18px;
}

.onboarding-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.onboarding-progress {
  display: flex;
  gap: 6px;
}

.onboarding-dot {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: #334155;
}

.onboarding-dot.active {
  background: var(--blue);
}

.onboarding-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.onboarding-highlight {
  position: relative;
  z-index: 25;
  outline: 2px solid rgba(110, 168, 254, 0.8);
  outline-offset: 4px;
  box-shadow: 0 0 0 8px rgba(110, 168, 254, 0.12);
}

.hidden {
  display: none;
}

@media (max-width: 1020px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav-item {
    justify-content: center;
    font-size: 13px;
  }

  .project-card {
    margin-top: 0;
  }

  .dashboard-grid,
  .matching-layout,
  .detail-layout,
  .recommendations-layout,
  .web-radar-layout,
  .users-layout,
  .match-map {
    grid-template-columns: 1fr;
  }

  .full-span {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .topbar-actions,
  .score-hero,
  .decision-header,
  .match-card-header,
  .match-card-actions,
  .match-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .source-button {
    white-space: normal;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .readiness-panel,
  .metric-row,
  .requirement-grid,
  .detail-stats,
  .impact-matrix,
  .timeline,
  .web-filter-grid,
  .usage-grid,
  .document-form,
  .insight-grid,
  .profile-form,
  .auth-grid,
  .weight-controls label,
  .score-breakdown-grid,
  .plan-opportunity-card {
    grid-template-columns: 1fr;
  }

  .weight-controls output {
    text-align: left;
  }

  .score-ring {
    justify-self: start;
  }

  h1 {
    font-size: 25px;
  }
}

/* UX simplification */
.process-nav {
  position: relative;
}

.process-nav .nav-item .icon {
  font-weight: 900;
}

.secondary-nav-item {
  opacity: 0.72;
}

.secondary-nav-item::before {
  content: "Apoyo";
  margin-right: auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.next-step-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: rgba(77, 223, 133, 0.34);
  background: linear-gradient(135deg, rgba(47, 125, 244, 0.13), rgba(27, 189, 209, 0.08)), var(--surface-2);
}

.next-step-panel h2 {
  margin: 6px 0 8px;
}

.next-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

.process-panel {
  background: rgba(17, 23, 34, 0.72);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.process-steps button {
  display: grid;
  gap: 6px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.process-steps button:hover {
  border-color: rgba(110, 168, 254, 0.55);
  background: rgba(110, 168, 254, 0.08);
}

.process-steps strong {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--blue-2);
  color: var(--blue);
}

.process-steps span {
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 1020px) {
  .next-step-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .process-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* MVP testing mode */
.confidentiality-panel {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}

.decision-banner {
  display: grid;
  gap: 4px;
  width: fit-content;
  max-width: 720px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.decision-banner strong {
  font-size: 13px;
  letter-spacing: 0.05em;
}

.decision-banner span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.decision-banner.go {
  border-color: rgba(77, 223, 133, 0.48);
  background: rgba(77, 223, 133, 0.1);
}

.decision-banner.observe {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.12);
}

.decision-banner.no-go {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.11);
}

.readiness-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.readiness-axis,
.red-flag-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
}

.readiness-axis span,
.readiness-axis small,
.red-flag-item span {
  color: var(--muted);
  line-height: 1.35;
}

.readiness-axis.ok {
  border-color: rgba(77, 223, 133, 0.32);
}

.readiness-axis.review {
  border-color: rgba(245, 158, 11, 0.35);
}

.readiness-axis.blocked,
.red-flag-item {
  border-color: rgba(248, 113, 113, 0.4);
}

.red-flag-list {
  display: grid;
  gap: 8px;
}

@media (max-width: 720px) {
  .readiness-index {
    grid-template-columns: 1fr;
  }
}
.project-portfolio-panel {
  display: grid;
  gap: 18px;
}

.project-portfolio-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.project-picker {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  gap: 10px;
}

.project-picker select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  padding: 9px 11px;
}

.danger-button {
  color: #ff9b91;
}

@media (max-width: 760px) {
  .project-portfolio-header {
    flex-direction: column;
  }

  .project-picker {
    grid-template-columns: 1fr 1fr;
  }

  .project-picker select {
    grid-column: 1 / -1;
  }
}

/* Proyecto y radar */
.project-radar-layout {
  grid-template-columns: 1fr;
}

.project-radar-layout .diagnostic-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-radar-layout .diagnostic-panel textarea {
  min-height: 170px;
}

.radar-ready-panel {
  border-color: rgba(77, 223, 133, 0.32);
  background: rgba(77, 223, 133, 0.08);
}

.radar-history-panel {
  background: rgba(17, 23, 34, 0.74);
}

.radar-history-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.radar-history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  padding: 14px;
  text-align: left;
}

.radar-history-card:hover {
  border-color: rgba(110, 168, 254, 0.55);
  background: rgba(110, 168, 254, 0.08);
}

.radar-history-card strong,
.radar-history-card p,
.radar-history-card small {
  display: block;
}

.radar-history-card p {
  margin: 7px 0 0;
  color: var(--muted);
}

.radar-history-card small {
  grid-column: 1 / -1;
  color: var(--muted);
}

@media (max-width: 720px) {
  .project-radar-layout .diagnostic-form,
  .radar-history-card {
    grid-template-columns: 1fr;
  }
}

/* Processing states and opportunity selection */
.primary-button.is-processing,
.ghost-button.is-processing {
  position: relative;
  overflow: hidden;
  opacity: 0.9;
  animation: buttonPulse 1.15s ease-in-out infinite;
}

.primary-button.is-processing::after,
.ghost-button.is-processing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  transform: translateX(-100%);
  animation: buttonSweep 1.25s ease-in-out infinite;
}

@keyframes buttonPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.16); }
}

@keyframes buttonSweep {
  100% { transform: translateX(100%); }
}

@keyframes ctaBreath {
  0%, 100% {
    transform: translateY(0);
    filter: brightness(1);
  }
  50% {
    transform: translateY(-1px);
    filter: brightness(1.12);
  }
}

.saved-card.selected {
  border-color: rgba(74, 222, 128, 0.42);
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.06), rgba(13, 18, 28, 0.96));
}

.match-select-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid rgba(110, 168, 254, 0.28);
  border-radius: 8px;
  background: rgba(110, 168, 254, 0.08);
  color: #d7e2f2;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.match-select-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.selection-summary {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 8px;
  background: rgba(74, 222, 128, 0.08);
  padding: 12px 14px;
}

.selection-summary span {
  color: var(--muted);
  font-size: 13px;
}
