/* Product shell. Brand colors and the original Kombination logo are retained. */
:root {
  --font-display:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #192b3c;
  --muted: #6a7887;
  --line: #e1e7ee;
  --soft: #f3f6fa;
  --radius: 18px;
  --shadow: 0 8px 30px rgb(34 57 80 / 7%);
}
body {
  background: #f4f7fa;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  line-height: 1.55;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display) !important;
  text-transform: none !important;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
h1 {
  font-size: var(--text-display);
  max-width: 800px;
}
h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.015em;
}
h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
}
p {
  overflow-wrap: anywhere;
}
input,
textarea,
select {
  font-size: var(--text-sm) !important;
}
/* 16px on phones: smaller text makes iOS zoom into the field. */
@media (max-width: 760px) {
  input,
  textarea,
  select {
    font-size: var(--text-md) !important;
  }
}
textarea {
  line-height: 1.65;
  resize: vertical;
  min-width: 0;
}
label {
  font-weight: 600;
  line-height: 1.45;
}
.eyebrow,
.card-kicker {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--brand-primary);
}
.card,
.company-list-panel,
.company-detail-panel,
.analysis-progress-card {
  box-shadow: 0 4px 16px rgb(34 57 80 / 3%);
  border-color: var(--line);
  border-radius: var(--radius-card);
}
.card {
  padding: 28px;
}
.history-sidebar {
  background: linear-gradient(185deg, #27405a 0%, #1c2e3f 100%);
  border-right: none;
  padding: 20px 14px 16px;
  box-shadow: inset -1px 0 0 rgb(255 255 255 / 6%);
}
.history-sidebar-brand {
  padding: 0 8px 22px;
}
.sidebar-logo {
  max-width: 158px;
  height: auto;
  border-radius: var(--radius-control);
}
.sidebar-product-label {
  margin-top: 12px;
  color: #93a7bd;
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
}
.sidebar-section-label {
  display: block;
  margin: 24px 0 8px;
  padding: 0 8px;
  color: #7e93aa;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0;
}
.nav-icon {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Sidebar navigation: every destination looks the same; only the page you
   are on is filled (aria-current, set by product-interactions.js). */
.nav-item.history-new-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  margin: 0 0 4px;
  padding: 10px 12px;
  justify-content: flex-start;
  text-align: left;
  font-size: var(--text-sm);
  font-weight: 600;
  color: #c3d1df;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
}
.nav-item.history-new-button:hover:not(:disabled):not([aria-current="page"]) {
  background: rgb(255 255 255 / 8%);
  color: #fff;
  transform: none;
  box-shadow: none;
}
.nav-item.history-new-button[aria-current="page"] {
  background: #fff;
  border-color: #fff;
  color: var(--k-blue, #344c66);
  font-weight: 700;
}
.nav-item.history-new-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
/* A field, not a button: a light search icon on a quiet dark surface. */
.history-search {
  background-color: rgb(255 255 255 / 7%) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b9cada' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 12px 50% !important;
  background-size: 15px !important;
  border: 1px solid rgb(255 255 255 / 14%) !important;
  border-radius: var(--radius-control);
  padding-left: 36px !important;
  color: #eef3f9;
  font-size: var(--text-sm);
}
.history-status {
  font-size: var(--text-xs);
  margin-top: 10px;
  color: #7e93aa;
}
.history-group-toggle {
  color: #93a7bd !important;
}
.history-group-toggle:hover,
.history-group-toggle:focus-visible {
  background: rgb(255 255 255 / 8%) !important;
}
.history-group-chevron {
  color: #cbd8e6 !important;
}
.history-item:hover,
.history-item:focus-visible {
  background: rgb(255 255 255 / 9%) !important;
}
.history-item-title {
  color: #e8eef5 !important;
}
.history-item-meta {
  color: #8296ac !important;
}
.history-item[aria-current="true"] .history-item-title,
.history-item[aria-current="true"] .history-item-meta {
  color: var(--ink) !important;
}
.history-item-menu-trigger {
  color: #93a7bd !important;
}

.sidebar-profile {
  border-color: rgb(255 255 255 / 12%);
  padding-top: 16px;
}
.profile-initials {
  background: #eef3f9;
  color: var(--brand-primary-hover);
}
.profile-name {
  color: #eef3f9 !important;
}
.profile-email {
  color: #8296ac !important;
}
.profile-menu-chevron {
  color: #8296ac !important;
}
.profile-menu-button:hover,
.profile-menu-button:focus-visible {
  background: rgb(255 255 255 / 8%) !important;
}
main#leadstudio-app {
  max-width: 1560px;
  padding: 0 44px 40px;
}

.start-screen {
  padding-top: 38px;
  scroll-margin-top: 24px;
}
.start-copy {
  text-align: left;
  max-width: none;
  margin: 0 0 28px;
}
.start-copy h1 {
  margin: 0 0 14px;
}
.start-copy p {
  font-size: var(--text-sm);
  max-width: 700px;
  color: var(--muted);
}
.meeting-prep-grid {
  max-width: 1150px;
  width: 100%;
  margin: 0;
  gap: 20px;
}
.meeting-prep-card {
  max-width: none;
}
#discovery-step-criteria {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 1fr);
  gap: 0 32px;
}
#discovery-step-criteria > .card-heading,
#discovery-step-criteria > .preview-help,
#discovery-step-criteria > .discovery-form-footer {
  grid-column: 1/-1;
}

#discovery label {
  display: block;
  margin: 20px 0 7px;
  font-size: var(--text-xs);
}
#discovery label:first-child {
  margin-top: 0;
}
#discovery input:not(.sc-input),
#discovery select,
#discovery textarea {
  border-color: #d5dfe8;
  min-height: 44px;
  padding: 11px 12px;
  border-radius: var(--radius-control);
}
#discovery select[multiple] {
  min-height: 120px;
}
#discovery input[type="checkbox"] {
  min-height: auto;
  width: auto;
}

.analysis-workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.msg {
  display: block;
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  font-size: var(--text-xs);
  line-height: 1.6;
}
.msg.err {
  border: 1px solid #ecd9b6;
  background: #fbf2e4;
  color: var(--warning);
}
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  font-size: var(--text-xs);
  font-weight: 650;
}
.tag.off {
  border: 1px solid var(--success-border);
  background: var(--success-soft);
  color: var(--success);
}

#discovery .preview-help {
  font-size: var(--text-xs);
  line-height: 1.65;
  margin: 8px 0 14px;
}

.discovery-form-footer {
  display: flex;
  /* The action's status wraps to its own row below (form-interactions.js);
     in one row it re-centred and moved the button. */
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.discovery-form-footer .preview-help {
  margin: 0 !important;
  max-width: 640px;
}
#discovery-start-status:empty {
  display: none;
}

#discovery-candidates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.discovery-candidate-card {
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
}
.discovery-candidate-card.is-selected {
  border-color: var(--brand-primary-border);
  box-shadow: inset 0 0 0 1px var(--brand-primary-border);
  background: #f9fbfd;
}
.discovery-candidate-card h4 {
  font-size: var(--text-lg);
  margin: 0 0 8px;
}
.discovery-candidate-card .company-candidate-cvr {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-bottom: 18px;
}

.meeting-prep-actions {
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
#discovery-step-results > .meeting-prep-actions:last-of-type {
  position: sticky;
  bottom: 12px;
  padding: 16px;
  background: rgb(255 255 255 / 96%);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow);
  z-index: 2;
  margin-top: 22px;
}
/* The sticky actions bar above overlays whatever is beneath it once stuck —
   without this, the last row of candidate cards stays permanently covered
   (its own Vælg/Fravælg buttons included) because nothing ever scrolls
   the bar past them. */
#discovery-candidates {
  padding-bottom: 76px;
}
#discovery-label-input {
  max-width: 260px;
}

.results-section {
  padding-top: 36px;
}
.results-heading h1,
.results-heading h2 {
  font-size: var(--text-2xl);
}
.company-workspace {
  gap: 20px;
  align-items: start;
}
.company-list-panel {
  padding: 12px;
}
.company-detail-panel {
  padding: 26px;
  min-width: 0;
}

.company-tabs {
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0;
  margin-bottom: 20px;
}
.company-tab {
  border-radius: var(--radius-control);
  font-size: var(--text-xs);
}
.source-badge {
  font-size: var(--text-xs);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.swot-grid {
  gap: 16px;
}
.swot-card {
  padding: 20px;
  border-radius: var(--radius-control);
  box-shadow: none;
}
.analysis-progress-card {
  padding: 22px;
}

.auth-screen {
  background: radial-gradient(ellipse at 15% 0%, #e1e9f2, transparent 65%), #f4f7fa;
}
.auth-card {
  width: min(480px, 100%);
  padding: 38px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}
.auth-card h1 {
  font-size: var(--text-2xl);
}
.auth-card .auth-logo {
  width: 170px;
  display: block;
  margin-bottom: 30px;
}
.auth-card .eyebrow {
  margin-bottom: 12px;
}
.login-form {
  gap: 12px;
}
.login-form label {
  font-size: var(--text-xs);
}
.login-form input {
  min-height: 46px;
}
.profile-workspace {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 0;
  width: min(1080px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 100px rgb(20 40 60 / 20%);
}
.profile-workspace::backdrop {
  background: rgb(19 35 51 / 48%);
  backdrop-filter: blur(5px);
}
.workspace-shell {
  padding: 30px 38px;
}
.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.workspace-header img {
  width: 150px;
  height: auto;
}
.workspace-intro h1 {
  max-width: 630px;
  font-size: 36px;
  line-height: 1.1;
}
.workspace-intro > p {
  color: var(--muted);
  max-width: 690px;
}
.workspace-steps {
  display: flex;
  gap: 22px;
  list-style: none;
  padding: 18px 0 24px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.workspace-steps li {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: var(--text-xs);
}
.workspace-steps span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.workspace-steps [aria-current] {
  font-weight: 650;
  color: var(--brand-primary);
}
.workspace-steps [aria-current] span {
  color: white;
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}
.workspace-status {
  font-size: var(--text-sm);
  color: var(--brand-primary);
  padding: 16px 0;
  margin: 0;
}
.workspace-status:empty {
  padding: 10px 0;
}
.is-busy .workspace-status {
  display: flex;
  gap: 10px;
  align-items: center;
}
.is-busy .workspace-status::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid var(--brand-primary-border);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: product-spin 0.8s linear infinite;
}
.workspace-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 30px;
}
.workspace-columns label {
  display: block;
  font-size: var(--text-xs);
  margin: 10px 0 8px;
}
.workspace-columns textarea {
  padding: 14px;
  width: 100%;
  font: inherit;
}
.workspace-files-panel {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px;
  min-width: 0;
}
.workspace-files-panel h2 {
  font-size: var(--text-lg);
}
.workspace-files-panel > p {
  color: var(--muted);
  font-size: var(--text-xs);
}
.workspace-upload {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px dashed var(--brand-primary-border);
  border-radius: var(--radius-control);
  background: white;
  padding: 16px !important;
  cursor: pointer;
}
.workspace-upload > span {
  font-size: var(--text-2xl);
  line-height: 1;
}
.workspace-upload small {
  color: var(--muted);
  font-size: var(--text-xs);
}
.workspace-source {
  padding: 14px;
  margin-top: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.workspace-source-top {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: start;
}
.workspace-source-top label {
  display: flex;
  gap: 8px;
  align-items: start;
  min-width: 0;
  margin: 0;
}
.workspace-source-top strong {
  overflow-wrap: anywhere;
  font-size: var(--text-xs);
}
.workspace-source-top small {
  white-space: nowrap;
  color: var(--muted);
  font-size: var(--text-xs);
}
.workspace-source input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-primary);
  flex: none;
}
.source-state {
  display: block;
  color: var(--success);
  font-size: var(--text-xs);
  margin: 6px 0 10px;
}
/* Danger text, never a danger button (white on rust): the unscoped
   selector made "Slet permanent" invisible. */
.source-state.error,
.danger:not(.button) {
  color: var(--danger) !important;
}
.workspace-source details {
  font-size: var(--text-xs);
  color: var(--muted);
}
.workspace-source pre {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 180px;
  overflow: auto;
  font: inherit;
  line-height: 1.6;
  padding: 12px;
  background: var(--soft);
}
.workspace-file-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  gap: 10px;
}
.workspace-file-actions button {
  font-size: var(--text-xs);
  padding: 3px;
}
.workspace-empty {
  font-size: var(--text-xs);
  padding: 15px 0;
  color: var(--muted);
}
.workspace-source-list {
  max-height: 360px;
  overflow-y: auto;
}
.workspace-partial {
  font-size: var(--text-xs) !important;
  color: var(--warning);
  line-height: 1.6;
}
.workspace-actions {
  display: flex;
  /* The status line wraps to its own row below the buttons; in one row
     its text made the footer taller and re-centred (moved) the button. */
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.workspace-actions .preview-help {
  margin: 0;
  max-width: 420px;
}
/* An interpretation is read first: only "what we understood" shows until
   the advisor chooses "Rediger". */
.workspace-editor.is-reading > :not(.icp-understood),
.workspace-editor.is-reading .icp-missing {
  display: none;
}
.workspace-actions .workspace-restart {
  margin-right: auto;
  font-size: var(--text-sm);
}
.workspace-criteria {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}
.workspace-criterion {
  padding: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.workspace-criterion > span {
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 600;
}
.workspace-criterion > p {
  font-size: var(--text-sm);
  margin: 7px 0 0;
}
/* Editable review: each criterion keeps the card look of the read-only view. */
/* Editor fields are sections with a divider, not tinted boxes inside the
   dialog; the summary at the top stays the one highlighted block. */
.icp-edit-field {
  margin: 0;
  padding: var(--space-4) 0 0;
  min-width: 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.icp-edit-field > legend {
  float: left;
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
  font-size: var(--text-sm);
  color: var(--ink);
  font-weight: 650;
}
.icp-edit-field > :not(legend) {
  clear: both;
}
.icp-edit-field .preview-help {
  clear: both;
  margin: 8px 0 0;
  font-size: var(--text-xs);
}
.icp-edit-value {
  grid-column: 1 / -1;
}
.icp-edit-value > label {
  display: block;
  clear: both;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 6px;
}
.icp-edit-value .icp-edit-field {
  margin-top: 12px;
  background: #fff;
}
.icp-list-items {
  clear: both;
  display: grid;
  gap: 8px;
}
.icp-list-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.workspace-editor {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.workspace-editor .icp-edit-industries {
  grid-column: 1 / -1;
}

.workspace-editor .icp-list-item textarea {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 9px 12px;
  font-size: var(--text-sm);
  resize: none;
}
.icp-list-add {
  margin-top: 8px;
}
.icp-range-row {
  clear: both;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}
.icp-range-row label {
  display: grid;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--muted);
}
.icp-range-row input,
.icp-range-row select {
  min-width: 0;
}
.icp-check {
  clear: both;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: var(--text-sm);
  margin-top: 6px;
}
/* A criteria group: keep/remove, and Krav/Ønske for the whole group. */
.icp-group-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  justify-content: space-between;
}
.icp-group-row .icp-check {
  flex: 1 1 260px;
  min-width: 0;
}
.icp-group-row select {
  flex: 0 0 auto;
  margin-top: 6px;
}
.workspace-editor [aria-invalid="true"] {
  border-color: var(--danger, #b42318);
  box-shadow: 0 0 0 2px rgb(180 35 24 / 15%);
}
.workspace-edit-errors {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--danger, #b42318);
  border-radius: var(--radius-control);
  color: var(--danger, #b42318);
  font-size: var(--text-sm);
}
.workspace-edit-errors ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.workspace-warning {
  font-size: var(--text-xs);
  color: var(--warning);
  margin-top: 14px;
}
.workspace-proposals {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.workspace-proposals h3 {
  font-size: var(--text-sm);
  margin: 0 0 6px;
}
.workspace-proposals ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.workspace-proposals li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  overflow-wrap: anywhere;
}
.workspace-ready {
  text-align: center;
  padding: 36px 0 24px;
  max-width: 600px;
  margin: auto;
}
.workspace-check {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: var(--text-2xl);
}
.workspace-ready h2 {
  font-size: var(--text-2xl);
}
.workspace-ready p {
  color: var(--muted);
  line-height: 1.7;
}
.workspace-ready .button {
  margin-top: 16px;
}
.screen-enter {
  animation: product-enter 0.28s ease-out both;
}
.company-tab {
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}
/* Standards-based dialog open/close transition (Chromium supports
   @starting-style + allow-discrete) — covers every <dialog> in the app
   (ICP workspace, company detail, KM24 enrich, delete confirmation)
   uniformly, with no JS replay logic needed. Neutralized automatically
   by the global prefers-reduced-motion rule below, since it only uses
   opacity/transform transitions. */
dialog {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    overlay 0.18s ease allow-discrete,
    display 0.18s ease allow-discrete;
}
dialog::backdrop {
  opacity: 1;
  transition:
    opacity 0.18s ease,
    overlay 0.18s ease allow-discrete,
    display 0.18s ease allow-discrete;
}
@starting-style {
  dialog[open] {
    opacity: 0;
    transform: scale(0.97) translateY(6px);
  }
  dialog[open]::backdrop {
    opacity: 0;
  }
}
.button.is-requesting {
  position: relative;
  cursor: progress;
}
.button.is-requesting::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: product-spin 0.8s linear infinite;
}
@keyframes product-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes product-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 1100px) {
  main#leadstudio-app {
    padding: 0 28px 30px;
  }
  #discovery-step-criteria {
    grid-template-columns: 1fr;
  }

  .workspace-columns {
    gap: 20px;
  }
}
@media (max-width: 760px) {
  main#leadstudio-app {
    padding: 0 18px 28px;
  }

  .start-screen {
    padding-top: 26px;
  }
  .start-copy h1 {
    font-size: var(--text-2xl);
  }
  .card {
    padding: 22px;
  }
  #discovery-candidates {
    grid-template-columns: 1fr;
  }
  .discovery-form-footer {
    align-items: stretch;
    flex-direction: column;
    /* In a column, wrapping turned the status's flex-basis:100% into a
       second, off-screen column; stacked items need no wrapping. */
    flex-wrap: nowrap;
    gap: 14px;
  }
  .discovery-form-footer .button {
    width: 100%;
  }

  .profile-workspace {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: var(--radius-card);
  }
  .workspace-shell {
    padding: 20px;
  }
  .workspace-header {
    margin-bottom: 22px;
  }
  .workspace-header img {
    width: 128px;
  }
  .workspace-intro h1 {
    font-size: var(--text-2xl);
  }
  .workspace-columns,
  .workspace-criteria {
    grid-template-columns: 1fr;
  }
  .workspace-editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .workspace-steps {
    gap: 12px;
  }
  .workspace-steps li {
    font-size: var(--text-xs);
  }
  .workspace-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .workspace-actions .button {
    width: 100%;
  }
  .workspace-files-panel {
    padding: 16px;
  }
  .company-detail-panel {
    padding: 18px;
  }

  #discovery-step-results > .meeting-prep-actions:last-of-type {
    position: static;
  }
  .auth-card {
    padding: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .profile-workspace {
    display: none !important;
  }
  body,
  main#leadstudio-app {
    background: white;
    padding: 0;
  }
  .company-detail-panel {
    border: 0;
    box-shadow: none;
  }
}

/* Generated leads go directly to selection and analysis. Import remains
   available only through its explicit secondary navigation action. */
#setup[data-workflow="discovery"] > .start-copy,
#setup[data-workflow="discovery"] #lead-import-card {
  display: none;
}
#setup[data-workflow="discovery"] .setup-grid {
  margin-top: 32px;
}

.pitch-details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
  font-size: var(--text-xs);
}
/* In a pitch card, "Mere om vinklen" sits at the bottom, without a rule. */
.pitch-card .pitch-details {
  margin-top: auto;
  padding: var(--space-4) 0 0;
  border-top: 0;
}
.pitch-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-primary);
}
.pitch-details[open] summary {
  margin-bottom: 14px;
}
.pitch-details .pitch-card-field {
  border-top: 0;
  padding-top: 0;
}
@media print {
  .pitch-details > summary {
    display: none;
  }
  .pitch-details > * {
    display: block !important;
  }
}

/* Fluid workspace: use available width without stretching reading paragraphs. */
@media (min-width: 981px) {
  .app-shell main#leadstudio-app {
    max-width: 1920px;
    margin-inline: auto;
    padding-inline: clamp(24px, 3vw, 64px);
  }
  .company-selection {
    max-width: none;
  }
  .sidebar-toggle-button:not([hidden]) {
    display: inline-flex;
    position: fixed;
    z-index: 35;
    top: 12px;
    left: 218px;
    width: 30px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-control);
    background: #e9f1f8;
    color: #233e56;
    box-shadow: 0 3px 12px rgb(24 45 66 / 12%);
  }
  .sidebar-toggle-button > span:last-child {
    display: none;
  }
  .history-sidebar {
    transition:
      width 180ms ease,
      flex-basis 180ms ease,
      padding 180ms ease;
  }
  body.sidebar-collapsed .history-sidebar {
    flex-basis: 0;
    width: 0;
    padding-inline: 0;
    border: 0;
    overflow: hidden;
    visibility: hidden;
  }
  body.sidebar-collapsed .sidebar-toggle-button {
    left: 8px;
  }
  body.sidebar-collapsed main#leadstudio-app {
    padding-left: 48px;
  }
}
@media (min-width: 1600px) {
  .company-selection-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.discovery-card-details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.discovery-card-details > summary {
  cursor: pointer;
  color: var(--brand-primary);
  font-weight: 650;
  padding: 5px 0;
}
.discovery-card-details[open] > summary {
  margin-bottom: 12px;
}
.rating-unknown {
  background: #edf1f5;
  color: #526579;
}

@media (prefers-reduced-motion: reduce) {
  .history-sidebar {
    transition: none;
  }
}

.icp-editor-more {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px 18px;
}
.icp-editor-more > summary {
  cursor: pointer;
  color: var(--brand-primary);
  font-weight: 650;
}
.icp-editor-more-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 16px;
}
@media (max-width: 680px) {
  .icp-editor-more-content {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Calm, readable disclosure and feedback at the action. */

.action-feedback,
.workspace-status {
  font-size: var(--text-md);
  line-height: 1.5;
  flex-basis: 100%;
  margin: 10px 0 0;
}
.action-feedback:empty,
.workspace-status:empty {
  display: none;
}
/* Action feedback is placed right after its button; in a flex row it takes
   its own line instead of squeezing the field beside the button. */
.meeting-prep-search-row,
.pick-bar {
  flex-wrap: wrap;
}
.relevance-score {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.relevance-score strong {
  font-size: var(--text-xl);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.relevance-score strong span {
  font-size: var(--text-sm);
  font-weight: 500;
}
/* Criterion-by-criterion is a plain disclosure, not another tinted box. */
.score-explanation {
  margin: var(--space-3) 0;
  padding: var(--space-3) 0 0;
  border-top: 1px solid var(--line);
}
.score-explanation summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-primary);
}
.score-explanation dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.score-explanation dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.score-explanation .score-sub {
  padding-left: 14px;
  color: var(--muted);
}
/* Lead Quality Engine V2: criterion-by-criterion explanation. */
.lq-criteria {
  margin: 8px 0;
  padding-left: 0;
  list-style: none;
}
.lq-criteria li {
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.lq-legacy {
  font-size: var(--text-xs);
  font-weight: 600;
  opacity: 0.7;
}

.research-live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.research-live i,
.button.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  display: inline-block;
  flex-shrink: 0;
  animation: clarity-spin 1s linear infinite;
}
.button.is-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
@keyframes clarity-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .research-live i,
  .button.is-loading::before {
    animation: none;
  }
  .button {
    transition: none !important;
    transform: none !important;
  }
}

/* --- Search combobox (search-combobox.js): every reference-data picker. ---
   The visible box is .sc-field; the icon is its own flex item and the input
   carries no padding or border of its own, so the entered text can never
   run under the icon or the clear button, whatever generic input styles
   apply (those exclude .sc-input). */
.sc {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.sc-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 8px 0 14px;
  border: 1px solid #cdd8e2;
  border-radius: var(--radius-control);
  background: #f8fafc;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.sc-field:hover {
  border-color: #a9bccd;
}
.sc-field:focus-within {
  border-color: var(--brand-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(52 76 102 / 16%);
}
.sc-icon {
  flex: none;
  width: 16px;
  height: 16px;
  background: #6b89a3;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10' cy='10' r='6.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m15 15 5 5' stroke='black' stroke-width='2'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10' cy='10' r='6.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m15 15 5 5' stroke='black' stroke-width='2'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.sc .sc-input {
  flex: 1;
  min-width: 0;
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  color: var(--ink);
  font: inherit;
  font-size: var(--text-sm);
  -webkit-appearance: none;
  appearance: none;
}
.sc .sc-input:focus,
.sc .sc-input:hover {
  border: 0;
  box-shadow: none;
  outline: none;
  background: transparent;
}
.sc-clear-query {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #e1ebf3;
  color: #597793;
  font-size: var(--text-md);
  line-height: 1;
  cursor: pointer;
}
.sc-clear-query:hover {
  background: #d0e0ed;
}
.sc-clear-query:focus-visible,
.sc-chip-remove:focus-visible,
.sc-clear-all:focus-visible {
  outline: 2px solid #4a6f93;
  outline-offset: 2px;
}
.sc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sc-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 4px 4px 4px 11px;
  border: 1px solid var(--brand-primary-border, #c9d8e6);
  border-radius: var(--radius-pill);
  background: var(--brand-primary-soft, #eaf1f7);
  color: var(--brand-primary, #344c66);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.3;
}
.sc-chip-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.sc-chip--unknown {
  border-style: dashed;
  border-color: #c9a227;
  background: #fff8e1;
  color: #6b5200;
}
.sc-chip--unknown .sc-chip-label::after {
  content: " · ikke i listen";
  font-weight: 500;
}
.sc-chip-remove {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: var(--text-md);
  line-height: 1;
  cursor: pointer;
}
.sc-chip-remove:hover {
  background: rgb(52 76 102 / 12%);
}
/* The list floats over what follows instead of pushing it down: opening
   or closing it never changes the height of the page or dialog, so nothing
   below moves and the browser never has to scroll to compensate. */
.sc-anchor {
  position: relative;
}
.sc-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  border: 1px solid #d5e2ed;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 10px 28px rgb(34 57 80 / 10%);
  overflow: hidden;
}
.sc-listbox {
  position: relative; /* offsetTop of a row is measured from the list */
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 6px;
  list-style: none;
}
.sc-option {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: var(--radius-control);
  font-size: var(--text-sm);
  color: var(--ink);
  cursor: pointer;
}
.sc-option:hover,
.sc-option.is-active {
  background: #e7f0f7;
}
.sc-option.is-active {
  outline: 2px solid #6486a6;
  outline-offset: -2px;
}
.sc-option-meta {
  flex: none;
  font-size: var(--text-xs);
  color: var(--muted);
}
.sc-skeleton {
  height: 34px;
  margin: 4px 6px;
  border-radius: var(--radius-control);
  background: linear-gradient(90deg, #eef3f8 25%, #f7fafc 50%, #eef3f8 75%);
  background-size: 200% 100%;
  animation: sc-shimmer 1.2s linear infinite;
}
@keyframes sc-shimmer {
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sc-skeleton {
    animation: none;
  }
}
.sc-foot {
  margin: 0;
  padding: 8px 14px 10px;
  border-top: 1px solid #edf2f7;
  font-size: var(--text-xs);
  color: var(--muted);
}
.sc-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-xs);
  color: var(--muted);
}
.sc-clear-all {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: var(--text-xs);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.sc-clear-all:hover {
  color: var(--ink);
}

/* ICP editor: primary fields first, the rest under "Flere kriterier". */
.workspace-editor .icp-edit-geo,
.workspace-editor .icp-legacy-notice {
  grid-column: 1 / -1;
}
.icp-audience-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 650;
  color: var(--muted);
}
.icp-geo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.icp-picker-label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}
.icp-edit-industries .icp-picker-label {
  font-size: var(--text-xs);
  color: var(--muted);
}
.icp-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.icp-pill {
  margin-top: 0;
  padding: 8px 14px;
  border: 1px solid #c6d6e4;
  border-radius: var(--radius-pill);
  background: #fff;
  cursor: pointer;
}
.icp-pill:has(input:checked) {
  border-color: var(--brand-primary, #344c66);
  background: var(--brand-primary-soft, #eaf1f7);
  font-weight: 600;
}
.icp-more-summary {
  font-weight: 500;
  color: var(--muted);
}
@media (max-width: 860px) {
  .icp-geo-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- The match: one percentage and one label (script.js leadQualityMatch).
   Blue, white and light grey carry the page; green only for good matches,
   rust only for "Passer ikke". */
.lq-match {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
}
.lq-pct {
  font-size: var(--text-lg);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--k-dark, #1f2a35);
}
.lq-label {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--k-light, #e6ebed);
  color: var(--k-blue, #344c66);
  font-size: var(--text-sm);
  font-weight: 600;
}
.lq-match[data-lq-label="strong"] .lq-label {
  background: #e3ece3;
  color: #3f5e3e;
}
.lq-match[data-lq-label="good"] .lq-label {
  background: #edf2ec;
  color: #4d6a4c;
}
.lq-match[data-lq-label="low"] .lq-label {
  background: #f1f3f4;
  color: #5d6b74;
}
.lq-match[data-lq-label="rejected"] .lq-label {
  background: #f6e7e2;
  color: var(--k-rust, #b55239);
}
.lq-facts {
  display: grid;
  gap: 4px;
  margin: 0 0 10px;
}
.lq-facts > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
}
.lq-facts dt {
  color: var(--muted);
}
.lq-facts dd {
  margin: 0;
}
.lq-historic {
  margin-left: 6px;
  font-weight: 500;
  opacity: 0.75;
}
.lq-block h4 {
  margin: 0 0 8px;
}

/* Discovery card: who, state, why — the rest under "Se match og kilder". */

.discovery-research-meta {
  margin-top: 10px;
}
/* "Se hvorfor" on the left, the actions on the right; opened, the
   explanation takes the full width and the actions stay below it. */

#discovery-review-reference:empty {
  display: none;
}

/* "Sådan har AI forstået din målgruppe". */
.icp-understood {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #f7f9fa;
}
.icp-understood p {
  margin: 0;
}
.icp-understood-list {
  display: grid;
  gap: 6px;
  margin: 0;
}
.icp-understood-list > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
}
.icp-understood-list dt {
  color: var(--muted);
  font-size: var(--text-sm);
}
.icp-understood-list dd {
  margin: 0;
}
.icp-missing {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
}
.icp-missing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.icp-missing-add {
  padding: 6px 12px;
  border: 1px dashed var(--k-grey, #8ea5b2);
  border-radius: var(--radius-pill);
  background: white;
  color: var(--k-blue, #344c66);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.icp-missing-add:hover {
  background: var(--k-light, #e6ebed);
}
.icp-missing-add.is-done {
  border-style: solid;
  border-color: var(--k-green, #7c927b);
  color: #4d6a4c;
}

/* --- Loading: local, bounded, calm (loading-ui.js) --------------------- */
.button[aria-disabled="true"] {
  cursor: progress;
}
/* A busy button keeps its size: one line, at least its idle width
   (loading-ui.js), with a short label. */
.button.is-loading {
  white-space: nowrap;
}
/* The search form never changes above the reader, so it needs no scroll
   anchoring; WebKit's anchoring moved the page by a line when the status
   row appeared under "Gennemgå søgning". */
#discovery-step-criteria {
  overflow-anchor: none;
}
.loading-panel {
  margin: 14px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fbfcfd;
}
.loading-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: var(--text-md);
  font-weight: 650;
  color: var(--ink);
}
.loading-indicator {
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid var(--brand-primary-border, #c9d6e3);
  border-top-color: var(--brand-primary, #344c66);
  border-radius: 50%;
  animation: clarity-spin 0.9s linear infinite;
}
.loading-steps {
  margin: 10px 0 0 26px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.7;
}
.loading-steps li::before {
  content: "·";
  margin-right: 8px;
}
.loading-note {
  margin: 8px 0 0 26px;
  color: var(--muted);
  font-size: var(--text-sm);
}
.skeleton-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.skeleton-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: white;
}
.sk-line {
  position: relative;
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: #e9eef3;
}
.sk-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 70%), transparent);
  transform: translateX(-100%);
  animation: sk-shimmer 1.6s ease-in-out infinite;
}
.sk-title {
  width: 60%;
  height: 14px;
}
.sk-pill {
  width: 40%;
  height: 22px;
}
.sk-short {
  width: 70%;
}
@keyframes sk-shimmer {
  to {
    transform: translateX(100%);
  }
}
.analysis-skeleton .skeleton-cards {
  grid-template-columns: minmax(0, 1fr);
}
.analysis-skeleton .skeleton-card {
  min-height: 160px;
}
.processing-skeletons {
  margin-top: 14px;
}
.processing-skeletons.is-compact .skeleton-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.processing-skeletons.is-compact .skeleton-card {
  min-height: 92px;
}
.loading-slot.processing-compact .loading-panel {
  padding-bottom: 12px;
}
.analysis-live-status {
  display: grid;
  gap: 10px;
  width: min(520px, 100%);
}
.analysis-live-heading {
  font-weight: 700;
  color: var(--ink);
}
.analysis-stage-list {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.analysis-stage-list li {
  min-height: 38px;
}
.analysis-live-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-xs);
}
.analysis-live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary, #344c66);
  box-shadow: 0 0 0 0 rgb(52 76 102 / 22%);
  animation: processing-pulse 1.8s ease-out infinite;
}
@keyframes processing-pulse {
  70% {
    box-shadow: 0 0 0 8px rgb(52 76 102 / 0%);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(52 76 102 / 0%);
  }
}
#session-switch-skeleton {
  min-height: 220px;
}
#session-switch-skeleton .stage-panel {
  max-width: 520px;
}
@media (max-width: 680px) {
  .analysis-stage-list,
  .processing-skeletons.is-compact .skeleton-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .analysis-live-pulse {
    animation: none;
  }
}
/* Over the form while the AI interprets it; the form keeps its space. */
.workspace-columns {
  position: relative;
}
.loading-overlay {
  position: absolute;
  inset: -8px;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 40px;
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 82%);
}
.loading-overlay[hidden] {
  display: none;
}
.loading-overlay .loading-panel {
  width: min(420px, 100%);
  margin: 0;
  box-shadow: var(--shadow);
}
/* A new step arrives with a short fade, not a jump. Opacity only: a
   transform would shift the step's box while the page scrolls to it. */
.is-arriving {
  animation: step-arrive 0.18s ease-out;
}
@keyframes step-arrive {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-indicator,
  .sk-line::after,
  .is-arriving {
    animation: none;
  }
}

/* --- Results: toolbar, plain "Se hvorfor" headings, the folded section
   for companies that could not be assessed. */

.why-heading {
  margin: 16px 0 6px;
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--k-dark, #1f2a35);
}
.why-heading:first-of-type {
  margin-top: 4px;
}

.discovery-candidate-card.is-pending {
  background: #fafbfc;
}

/* Saved searches: at most 3 per row, never wider than the page. */
.saved-search-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}
.saved-search-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
}
.saved-search-card h2 {
  margin: 0 0 4px;
  font-size: var(--text-lg) !important;
  line-height: 1.3;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
  overflow-wrap: anywhere;
}
.saved-search-meta {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}
.saved-search-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
}
.saved-search-card .button {
  align-self: flex-start;
}
@media (max-width: 1100px) {
  .saved-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .saved-search-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- File-to-form suggestions and staged progress (onboarding step 1).
   Nothing here changes a box's size: the badge and the button sit in the
   label row, the skeleton is drawn inside the empty field, and both
   progress panels lie over space that is already there. */
.field-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  min-height: 30px;
  margin: 10px 0 8px;
}
.workspace-columns .field-head label {
  margin: 0;
}
.suggestion-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: #eef3f8;
  color: var(--brand-primary, #344c66);
  font-size: var(--text-xs);
  font-weight: 600;
}
.suggestion-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}
.suggestion-badge[hidden],
.suggestion-use[hidden] {
  display: none;
}
.suggestion-use {
  font-size: var(--text-xs);
}
/* Two IDs: the brand field style in brand-motion.css is scoped by the
   dialog's id and loads later, so a class alone would lose to it. */
#profile-workspace :is(#workspace-text, #workspace-value).is-suggested {
  background: #fbfcfe;
  border-color: var(--brand-primary-border, #c9d6e3);
}
/* An empty field while its suggestion is being read: soft lines where the
   text will appear, inside the field's own box. */
#profile-workspace :is(#workspace-text, #workspace-value).is-suggesting {
  background-color: #fbfcfd;
  background-image:
    linear-gradient(90deg, transparent, rgb(255 255 255 / 80%), transparent),
    linear-gradient(#e9eef3, #e9eef3), linear-gradient(#e9eef3, #e9eef3),
    linear-gradient(#e9eef3, #e9eef3);
  background-repeat: no-repeat;
  background-size:
    40% 100%,
    72% 10px,
    56% 10px,
    64% 10px;
  background-position:
    -60% 0,
    14px 18px,
    14px 40px,
    14px 62px;
  animation: field-shimmer 1.6s ease-in-out infinite;
  /* The brand field's background transition would fight the shimmer
     (WebKit restarts it on every frame). */
  transition: none;
}
#profile-workspace :is(#workspace-text, #workspace-value).is-suggesting::placeholder {
  color: transparent;
}
@keyframes field-shimmer {
  to {
    background-position:
      160% 0,
      14px 18px,
      14px 40px,
      14px 62px;
  }
}
/* Staged progress: the current stage is softly highlighted, finished ones
   carry a check, later ones wait in grey. */
.stage-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}
.stage-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-control);
  color: var(--muted);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}
.stage-mark {
  position: relative;
  width: 16px;
  height: 16px;
  flex: none;
  border: 1.5px solid #cfd8e2;
  border-radius: 50%;
}
.stage-list li.is-current {
  background: #eef3f8;
  color: var(--ink);
  font-weight: 600;
}
.stage-list li.is-current .stage-mark {
  border-color: var(--brand-primary-border, #c9d6e3);
  border-top-color: var(--brand-primary, #344c66);
  animation: clarity-spin 0.9s linear infinite;
}
.stage-list li.is-done {
  color: var(--ink);
}
.stage-list li.is-done .stage-mark {
  border-color: #6f8f6e;
  background: #6f8f6e;
}
.stage-list li.is-done .stage-mark::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.stage-panel .loading-note {
  margin: 10px 0 0 10px;
}
/* While busy, an emptied status line keeps its place (setBusy holds its
   height), so the footer does not move up; the stage panel says what is
   happening, so no second spinner. */
.workspace-status.is-held:empty {
  display: block;
}
.workspace-status.is-held:empty::before {
  content: none;
}
/* Over the files panel while files are read; the panel keeps its size. */
.workspace-files-panel {
  position: relative;
}
.file-progress {
  inset: 0;
  align-items: center;
  padding: 16px;
  background: rgb(243 246 250 / 92%);
}
@media (prefers-reduced-motion: reduce) {
  #profile-workspace :is(#workspace-text, #workspace-value).is-suggesting,
  .stage-list li.is-current .stage-mark {
    animation: none;
  }
  .stage-list li {
    transition: none;
  }
}

/* Every poll re-renders the cards, which replayed the global card entrance
   (style.css lg-rise: a 10 px slide) on every card every few seconds. Here
   only a card that changed group fades in. */
#discovery-candidates .meeting-prep-candidate-card:not(.is-arriving) {
  animation: none;
}

/* The search screen: the approved target group as a short summary, edited
   only through "Rediger målgruppe", and one action. */
.discovery-target {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin: 20px 0 8px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f6f9fc;
}
/* Small, task-specific search-readiness review; NOT the later UX redesign. */
.discovery-readiness {
  margin: 18px 0 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.discovery-readiness [hidden] {
  display: none !important;
}
.discovery-readiness h3 {
  margin: 0 0 8px;
  font-size: var(--text-md);
}
.discovery-readiness h4 {
  margin: 12px 0 5px;
  font-size: var(--text-sm);
}
.discovery-readiness ul {
  margin: 4px 0 12px;
  padding-left: 20px;
}
.discovery-readiness li {
  margin: 7px 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.discovery-readiness li .text-button {
  display: inline-block;
  margin: 2px 4px;
}
.discovery-readiness-confirm {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  line-height: 1.5;
}
.discovery-readiness-confirm input {
  margin-top: 5px;
  flex-shrink: 0;
}
.discovery-readiness-edit-preview {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.discovery-readiness-edit-preview button {
  margin-right: 8px;
  margin-top: 8px;
}
.discovery-target-summary p {
  margin: 4px 0 0;
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--ink, #1d2b3a);
}
.discovery-target-summary .discovery-target-label {
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--muted);
}
.discovery-target-summary .discovery-target-offer,
.discovery-target-summary .discovery-target-legacy {
  font-size: var(--text-sm);
  color: var(--muted);
}
.discovery-target-missing {
  font-size: var(--text-md);
}
@media (max-width: 640px) {
  .discovery-target {
    flex-direction: column;
  }
  .discovery-target .button {
    width: 100%;
  }
}

/* --- "Vælg virksomheder" (UX, 23 Oct 2026). The whole card is the choice.
   Chosen: the card turns dark (the product's navy), so the ten can be read
   at a glance as chosen or not; hover differs per state; keyboard focus is
   always a visible ring. The match number is the one figure on the card. */
.pick-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.pick-card {
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  color: var(--ink);
  transition:
    background-color var(--motion, 180ms) var(--ease-out, ease),
    border-color var(--motion, 180ms) var(--ease-out, ease),
    box-shadow var(--motion-slow, 220ms) var(--ease-out, ease);
}
.pick-main {
  all: unset;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  grid-template-areas:
    "check name score"
    ". label label"
    ". reason reason";
  column-gap: 12px;
  row-gap: 4px;
  width: 100%;
  padding: 18px 18px 12px;
  border-radius: 14px 14px 0 0;
  cursor: pointer;
  text-align: left;
}
.pick-main:disabled {
  cursor: progress;
}
/* Keyboard focus rings the whole card (the button is only its upper part;
   a ring on the button alone cut through the card). */
.pick-main:focus-visible {
  outline: none;
}
.pick-card:has(.pick-main:focus-visible) {
  outline: 3px solid #2f6fde;
  outline-offset: 2px;
}
.pick-check {
  grid-area: check;
  align-self: center;
  width: 20px;
  height: 20px;
  border: 2px solid #9fb2c4;
  border-radius: 50%;
}
.pick-name {
  grid-area: name;
  align-self: center;
  font-size: var(--text-lg);
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.pick-score {
  grid-area: score;
  align-self: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pick-score b {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pick-score small {
  margin-left: 1px;
  font-size: var(--text-sm);
  font-weight: 600;
}
.pick-score.is-pending {
  font-size: var(--text-sm);
  color: var(--muted);
}
.pick-label {
  grid-area: label;
  font-size: var(--text-sm);
  font-weight: 600;
  color: #3f5e3e;
}
.pick-place {
  margin-left: 6px;
  font-weight: 400;
  color: var(--muted);
}
.pick-reason {
  grid-area: reason;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--ink);
}
.pick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding: 8px 18px 12px 52px;
}
.pick-actions > .discovery-card-details {
  flex: 1 1 auto;
  border-top: 0;
  padding-top: 0;
  margin: 0;
}
/* Open: the summary stays on the card next to Skift (see .why-body). */
.pick-actions > .discovery-card-details[open] {
  flex-basis: 100%;
}
.pick-swap {
  font-size: var(--text-sm);
  font-weight: 600;
  min-height: 32px;
}
.pick-card:not(.is-selected):hover {
  border-color: #8aa2b8;
  background: #f7fafc;
}
.pick-card.is-selected {
  background: #192b3c;
  border-color: #192b3c;
  color: #fff;
}
.pick-card.is-selected:hover {
  background: #243a50;
}
.pick-card.is-selected .pick-check {
  border-color: #fff;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23192b3c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}
.pick-card.is-selected :is(.pick-name, .pick-reason, .pick-score) {
  color: #fff;
}
.pick-card.is-selected .pick-label {
  color: #cfe3cf;
}
.pick-card.is-selected .pick-place,
.pick-card.is-selected .pick-score.is-pending {
  color: #b9cddd;
}
.pick-card.is-selected .pick-actions :is(summary, .text-button) {
  color: #fff;
}
.pick-card.is-selected:has(.pick-main:focus-visible) {
  outline-color: #2f6fde;
}
.pick-notice {
  margin: 0 18px 12px 52px;
  font-size: var(--text-sm);
  color: #8a3b26;
}
.pick-card.is-selected .pick-notice {
  color: #ffd9cc;
}
.pick-card.is-swapping {
  opacity: 0.6;
}
.pick-progress {
  margin: 0 0 4px;
  font-size: var(--text-sm);
  color: var(--muted);
}
/* "N valgt" and "Fortsæt" stay in reach while the list is read. */
.pick-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px -4px 0;
  padding: 12px 4px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.pick-bar p {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 600;
}
@media (max-width: 900px) {
  .pick-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 520px) {
  .pick-main {
    padding: 14px 14px 8px;
    column-gap: 10px;
  }
  .pick-actions {
    padding: 6px 14px 10px 46px;
  }
  .pick-name {
    font-size: var(--text-md);
  }
  .pick-score b {
    font-size: var(--text-xl);
  }
  .pick-bar .button {
    flex: 0 0 auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pick-card {
    transition: none;
  }
}

/* --- The company list is the single navigation on the analysis screen
   (UX, 23 Oct 2026). The whole card opens the company; the one shown is
   unmistakable: dark navy, "Vises nu", and aria-current. */
.priority-card:not(.priority-card-placeholder) {
  padding: 0;
}
.priority-card-main {
  all: unset;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 14px 15px;
  border-radius: var(--radius-control);
  cursor: pointer;
  text-align: left;
}
.priority-card-main:focus-visible {
  outline: 3px solid #2f6fde;
  outline-offset: 2px;
}
.priority-card-main .priority-card-name {
  font-size: var(--text-md);
}
.priority-card-main .priority-card-reasoning {
  margin: 6px 0 0;
  font-size: var(--text-sm);
  color: var(--ink);
}
.priority-card.is-active {
  background: #192b3c;
  border-color: #192b3c;
  color: #fff;
  box-shadow: 0 8px 22px rgb(25 43 60 / 22%);
}
.priority-card.is-active:hover {
  background: #243a50;
  border-color: #243a50;
}
.priority-card.is-active :is(.priority-card-name, .priority-card-reasoning, .lq-pct) {
  color: #fff;
}
.priority-card.is-active .priority-card-main:focus-visible {
  outline-color: #9cc3ff;
}
.priority-card-current {
  margin-top: 8px;
  font-size: var(--text-xs);
  font-weight: 650;
  color: #cfe3cf;
}

/* "Filtrer" and "Sortér: Bedste match" side by side (imported lists only);
   readable labels, not 9 px. */
.priority-tools-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 10px;
}
.priority-tools-row > .filter-details {
  margin-top: 0;
  flex: 1 1 auto;
}
.priority-tools-row > .filter-details[open] {
  flex-basis: 100%;
  order: 2;
}
.priority-tools-row > .filter-details > summary {
  padding: 6px 0;
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--brand-primary);
}
/* Active filter count, only when a filter is on (set by script.js). It is
   drawn before the +/− sign (::after), which keeps showing open/closed. */
.priority-tools-row > .filter-details > summary[data-count] {
  display: inline-flex;
  align-items: center;
}
.priority-tools-row > .filter-details > summary[data-count]::after {
  order: 2;
  margin-left: 4px;
}
.priority-tools-row > .filter-details > summary[data-count]::before {
  order: 1;
  content: attr(data-count);
  display: inline-grid;
  place-items: center;
  margin-left: var(--space-2);
  vertical-align: 1px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--brand-primary);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
}
.priority-sort-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
}
.priority-sort-field select {
  min-height: 36px;
  font-size: var(--text-sm);
}
.prioritized-filters .filter-field {
  font-size: var(--text-sm);
  color: var(--ink);
}

/* Phones and tablets: the "Menu" button sits in the top bar and scrolls
   away with it, instead of floating over headings and cards (390 px: it
   covered the "Virksomheder" heading while scrolling). */
@media (max-width: 980px) {
  .sidebar-toggle-button:not([hidden]) {
    position: absolute;
  }
}
.pick-swaps {
  display: inline-flex;
  gap: 14px;
}

/* --- Top bar (UI polish, Oct 2026): desktop has none, the sidebar says
   where you are. Phones and tablets keep a quiet bar with Menu and logo. */
.product-topbar {
  display: none;
}
@media (max-width: 980px) {
  .product-topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 12px 0;
  }
  .topbar-logo {
    height: 30px;
    width: auto;
    border-radius: 4px;
  }
}

/* --- Cards and states (UI polish, Oct 2026) ------------------------------
   One card level: what used to be a card inside a card is now spacing and
   a divider. */

/* Once companies are listed, the card's own "Vælg virksomheder" is the
   heading; the page title stays for screen readers. */
#discovery:has(#discovery-step-results:not([hidden])) > .start-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.discovery-target {
  margin: 24px 0 8px;
  padding: 0;
  border: 0;
  background: none;
}

/* "Se hvorfor": the summary stays on the card next to Skift; only the
   explanation gets a flat panel, and an open card never stretches the
   card beside it. */
.pick-list:has(details[open]) > .pick-card {
  align-self: start;
}
.pick-actions {
  position: relative;
}
.pick-actions:has(> .discovery-card-details[open]) > .pick-swaps {
  position: absolute;
  top: 8px;
  right: 18px;
}
.pick-actions > .discovery-card-details[open] > summary {
  margin-bottom: 0;
}
.why-body {
  margin-top: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-control);
  background: #f4f7fa;
  color: var(--ink);
  font-size: var(--text-sm);
}
.why-body .why-heading:first-child {
  margin-top: 0;
}

/* Analysis status: a finished run is one quiet line, not a second hero. */
.analysis-progress-card.is-complete {
  padding: 14px 20px;
}
.analysis-progress-card.is-complete :is(.analysis-progress-message, .progress-track) {
  display: none;
}
.analysis-progress-card.is-complete h3 {
  margin: 0;
  font-size: var(--text-md);
}
#results:has(#analysis-panel:not([hidden])) #result-badge {
  display: none;
}

/* A source without a real logo shows a status dot instead of 6px initials. */
span.source-badge-logo {
  width: 8px;
  min-width: 8px;
  height: 8px;
  margin-left: 6px;
  font-size: 0;
}
.source-badge {
  gap: 7px;
  padding: 5px 11px 5px 5px;
}

/* --- Phones (UI polish, Oct 2026): the explanation uses the card's full
   width, and label/value pairs stack instead of squeezing into columns. */
@media (max-width: 520px) {
  .pick-actions {
    padding-left: 14px;
  }
  .pick-actions:has(> .discovery-card-details[open]) > .pick-swaps {
    right: 14px;
  }
  .why-body {
    padding: var(--space-3);
  }
  .lq-facts > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .lq-facts > div + div {
    margin-top: var(--space-2);
  }
}

/* --- Motion and light (quality pass, 26 Oct 2026) ------------------------
   docs/quality-pass-2026-10.md §10. Short (120–220 ms), transform and
   opacity only, and light only where something just happened. Nothing
   pulses or loops; reduced motion turns all of it off (end of section). */
:root {
  --motion-fast: 120ms;
  --motion: 180ms;
  --motion-slow: 220ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Buttons: hover lights the button from within, press compresses it, the
   focus ring eases in. They never travel. */
.button {
  transition:
    background-color var(--motion-fast) var(--ease-out),
    border-color var(--motion-fast) var(--ease-out),
    color var(--motion-fast) var(--ease-out),
    box-shadow var(--motion) var(--ease-out),
    transform var(--motion-fast) var(--ease-out),
    outline-offset var(--motion-fast) var(--ease-out);
}
.button.primary:not(.history-new-button):hover:not(:disabled):not([aria-disabled="true"]) {
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 35%),
    0 6px 18px rgb(236 150 56 / 30%);
}
.button.secondary:hover:not(:disabled) {
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 80%),
    0 3px 10px rgb(34 57 80 / 8%);
}
.button:active:not(:disabled):not([aria-disabled="true"]) {
  transform: scale(0.98);
}
.button:focus-visible {
  outline-offset: 3px;
}
.text-button {
  transition:
    color var(--motion-fast) var(--ease-out),
    opacity var(--motion-fast);
}
.text-button:active:not(:disabled) {
  opacity: 0.7;
}
/* A short success state (e.g. "Kopieret ✓"). */
.text-button.is-done {
  color: var(--success);
  animation: done-pop var(--motion-slow) var(--ease-out);
}
@keyframes done-pop {
  from {
    transform: scale(0.94);
    opacity: 0.4;
  }
}

/* Orientation: an opened section, a new tab (a new step and dialogs use
   .screen-enter and the dialog transition above). */
details.is-opening[open] > :not(summary) {
  animation: fade-rise var(--motion) var(--ease-out) both;
}
.company-tab-panel.is-entering {
  animation: fade-in 150ms var(--ease-out) both;
}
@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* Choosing a company: the dark card gains depth. */
.pick-card.is-selected {
  box-shadow:
    0 0 0 1px #192b3c,
    0 10px 26px rgb(25 43 60 / 26%);
}
/* A strong match (≥ 80 %, the engine's own band) carries a quiet warm
   edge — meaning, not decoration. */
.pick-card:not(.is-selected):has(.pick-score[data-lq-label="strong"]) {
  border-color: transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgb(236 150 56 / 60%), var(--line) 45%) border-box;
}
.pick-card:not(.is-selected):has(.pick-score[data-lq-label="strong"]):hover {
  background:
    linear-gradient(#f7fafc, #f7fafc) padding-box,
    linear-gradient(135deg, rgb(236 150 56 / 75%), #8aa2b8 45%) border-box;
}
/* A match that just arrived: the number fades in and one light sweep
   crosses the card. */
.pick-card.is-new-score .pick-score {
  animation: fade-in var(--motion-slow) var(--ease-out);
}
.pick-card.is-new-score,
.pitch-card-grid.is-fresh > .pitch-card {
  position: relative;
  overflow: hidden;
}

/* One light sweep, 700 ms, then the element settles. */
:is(.sheen-once, .pick-card.is-new-score, .pitch-card-grid.is-fresh > .pitch-card)::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 55%) 50%, transparent 65%);
  transform: translateX(-110%);
  animation: sheen 700ms var(--ease-out) 1 forwards;
}
.pick-card.is-selected.is-new-score::after {
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 14%) 50%, transparent 65%);
}
.pitch-card-grid.is-fresh > .pitch-card:nth-child(2)::after {
  animation-delay: 90ms;
}
.pitch-card-grid.is-fresh > .pitch-card:nth-child(3)::after {
  animation-delay: 180ms;
}
.analysis-progress-card.sheen-once {
  overflow: hidden;
}
@keyframes sheen {
  to {
    transform: translateX(110%);
  }
}

/* Reduced motion: the global rule in style.css already stops every
   animation and transition; this removes what remains visible — the press
   scale and the sweep overlay. */
@media (prefers-reduced-motion: reduce) {
  .button:active:not(:disabled):not([aria-disabled="true"]) {
    transform: none;
  }
  :is(.sheen-once, .pick-card.is-new-score, .pitch-card-grid.is-fresh > .pitch-card)::after {
    display: none;
  }
}

/* A search made with an earlier target group (ICP revisions, B1): said
   plainly above its companies, with the way to a search for the current
   one. Neutral, not an error: nothing failed. */
.discovery-historical {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
}
.discovery-historical[hidden] {
  display: none;
}
.discovery-historical p {
  flex: 1 1 280px;
  margin: 0;
  font-size: var(--text-sm);
}
