/* Blackhount Watch — App CSS */
:root {
  --navy: #0a1a2f;
  --accent: #0a1a2f;
  --offwhite: #ffffff;
  --muted: #9fb0c4;
  --danger: #e05252;
  --success: #3a9e6f;
  --warning: #e08c3a;
  --radius: 8px;
  --font: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--offwhite);
  color: var(--navy);
  min-height: 100vh;
}

/* NAV */
.watch-nav {
  background: var(--navy);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.watch-nav .logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--offwhite);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.watch-nav .logo img {
  width: 170px;
  height: auto;
  display: block;
}
.watch-nav .logo span { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.14em; }
.watch-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.watch-nav .nav-right a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.watch-nav .nav-right a:hover { color: var(--offwhite); }
.watch-nav .nav-right .btn-logout {
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--muted);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
}
.watch-nav .nav-right .btn-logout:hover { border-color: var(--navy); color: var(--navy); }

/* LAYOUT */
.watch-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* AUTH PAGES */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
}
.auth-card {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.auth-card .auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
}
.auth-card .auth-logo span { color: var(--navy); }
.auth-card h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--navy);
}
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-group input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #ddd;
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--navy);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--navy); }
.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: var(--navy);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-footer {
  text-align: center;
  margin-top: 1.2rem;
  font-size: 0.88rem;
  color: #777;
}
.auth-footer a { color: var(--navy); text-decoration: none; font-weight: 600; }
.error-msg {
  background: #fff0f0;
  border: 1px solid #f5c6c6;
  color: var(--danger);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  display: none;
}

/* DASHBOARD */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}
.trial-badge {
  background: var(--navy);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* STATS ROW */
.stats-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #e5e0d8;
  padding: 1.25rem 1.5rem;
  flex: 1;
  min-width: 140px;
}
.stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
}
.stat-card .stat-sub { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

/* POSTURE SCORE */
.score-good  { color: var(--success); }
.score-warn  { color: var(--warning); }
.score-bad   { color: var(--danger); }

/* ASSETS TABLE */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-header h2 { font-size: 1.1rem; font-weight: 700; }
.btn-add {
  background: var(--navy);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-add:hover { opacity: 0.85; }

.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #e5e0d8;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.asset-row {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0ece4;
  gap: 1rem;
}
.asset-row:last-child { border-bottom: none; }
.asset-domain { font-weight: 700; font-size: 0.95rem; flex: 1; }
.asset-type {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
}
.type-self { background: #e8f0fe; color: #1a56db; }
.type-vendor { background: #fef3e8; color: #b45309; }
.asset-score { font-size: 1.1rem; font-weight: 800; min-width: 60px; text-align: right; }
.asset-last-scan { font-size: 0.78rem; color: var(--muted); min-width: 100px; text-align: right; }
.btn-delete {
  background: transparent;
  border: 1px solid #ddd;
  color: var(--muted);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}
.btn-delete:hover { border-color: var(--danger); color: var(--danger); }

.empty-state {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--muted);
}
.empty-state p { margin-bottom: 1rem; }

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,26,47,0.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.modal h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.modal-footer { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.25rem; }
.btn-cancel {
  padding: 0.55rem 1.1rem;
  background: transparent;
  border: 1.5px solid #ddd;
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--navy);
}
.btn-confirm {
  padding: 0.55rem 1.2rem;
  background: var(--navy);
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  color: #ffffff;
}
.btn-confirm:hover { opacity: 0.9; }

/* UPGRADE BANNER */
.upgrade-banner {
  background: var(--navy);
  color: var(--offwhite);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.upgrade-banner p { font-size: 0.9rem; color: var(--muted); }
.upgrade-banner strong { color: var(--offwhite); }
.btn-upgrade {
  background: var(--navy);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

@media (max-width: 600px) {
  .stats-row { flex-direction: column; }
  .watch-container { padding: 1rem; }
  .asset-last-scan { display: none; }
}

/* Watch app homepage */
.watch-home-body {
  min-height: 100vh;
  margin: 0;
  background: #ffffff;
  color: #0a1a2f;
}

.watch-home {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  box-sizing: border-box;
}

.watch-home-panel {
  width: min(960px, 100%);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  padding: 36px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 22px 56px rgba(10, 26, 47, 0.12);
  border: 1px solid rgba(10, 26, 47, 0.08);
  box-sizing: border-box;
  overflow: hidden;
}

.watch-home-copy {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.watch-kicker,
.watch-card-label {
  margin: 0 0 12px;
  color: #52657a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.watch-home h1 {
  margin: 0;
  max-width: 560px;
  color: #0a1a2f;
  font-size: clamp(2.55rem, 5vw, 4.1rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.watch-home-lead {
  max-width: 540px;
  margin: 22px 0 0;
  color: #334155;
  font-size: 1.08rem;
  line-height: 1.55;
}

.watch-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.watch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.watch-button:hover {
  transform: translateY(-1px);
}

.watch-button.primary {
  background: #0a1a2f;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(10, 26, 47, 0.2);
}

.watch-button.secondary {
  background: #ffffff;
  color: #0a1a2f;
  border: 1px solid rgba(10, 26, 47, 0.16);
}

.watch-home-card {
  width: 300px;
  flex: 0 0 300px;
  padding: 26px;
  border-radius: 22px;
  background: #0a1a2f;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.watch-feature {
  padding: 18px 0;
  border-top: 1px solid rgba(245, 243, 239, 0.13);
}

.watch-feature strong {
  display: block;
  margin-bottom: 7px;
  color: #ffffff;
  font-size: 1rem;
}

.watch-feature span {
  display: block;
  color: #cbd5e1;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .watch-home {
    align-items: flex-start;
    padding: 24px 16px;
  }

  .watch-home-panel {
    flex-direction: column;
    padding: 28px;
    border-radius: 22px;
  }

  .watch-home h1 {
    font-size: clamp(2.35rem, 11vw, 3.6rem);
  }

  .watch-home-lead {
    font-size: 1.03rem;
  }

  .watch-home-card {
    width: auto;
    flex: 0 1 auto;
  }
}


/* Logo treatment */
.watch-home-logo,
.auth-logo-img {
  display: block;
  background-image: url('/public/img/blackhount-wordmark-navy.svg?v=3');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.watch-home-logo {
  width: 180px;
  max-width: 62vw;
  height: 50px;
  margin: 0 0 24px;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.35rem;
}

.auth-logo-img {
  width: 176px;
  max-width: 74%;
  height: 49px;
}

.auth-product-name {
  color: #0a1a2f;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}


.scan-message {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid #d9e0e8;
  color: #0a1a2f;
  font-size: 0.9rem;
  font-weight: 600;
}

.scan-message.success {
  border-color: rgba(10, 26, 47, 0.24);
  background: rgba(10, 26, 47, 0.05);
}

.scan-message.error {
  border-color: #f5c6c6;
  background: #fff0f0;
  color: #e05252;
}

.btn-scan {
  border: 1px solid rgba(10, 26, 47, 0.18);
  background: #0a1a2f;
  color: #ffffff;
  border-radius: 7px;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-scan:disabled {
  opacity: 0.65;
  cursor: wait;
}


.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.btn-primary-small,
.btn-secondary-small {
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary-small {
  border: 1px solid #0a1a2f;
  background: #0a1a2f;
  color: #ffffff;
}

.btn-secondary-small {
  border: 1.5px solid #0a1a2f;
  background: #ffffff;
  color: #0a1a2f;
}
.btn-secondary-small:hover { background: #0a1a2f; color: #ffffff; }

.plans-modal {
  max-width: 640px;
}

.plan-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.plan-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-height: 145px;
  border: 1px solid rgba(10, 26, 47, 0.14);
  border-radius: 12px;
  background: #ffffff;
  color: #0a1a2f;
  padding: 1rem;
  text-align: left;
  cursor: pointer;
}

.plan-option:hover {
  border-color: #0a1a2f;
}

.plan-option strong {
  font-size: 1rem;
}

.plan-option span {
  font-size: 0.9rem;
  font-weight: 800;
}

.plan-option small {
  color: #52657a;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .page-header {
    align-items: flex-start;
    gap: 1rem;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .plan-options {
    grid-template-columns: 1fr;
  }
}


.finding-card {
  padding: 1rem;
  border-bottom: 1px solid #edf0f3;
}

.finding-card:last-child {
  border-bottom: 0;
}

.finding-topline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  flex-wrap: wrap;
}

.finding-severity {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  border: 1px solid transparent;
}

.sev-critical { background: #fff0f0; color: #e05252; border-color: #f5c6c6; }
.sev-high { background: #fff5ea; color: #b95f12; border-color: #ffd8aa; }
.sev-medium { background: #fffbea; color: #8a6f00; border-color: #f2dc72; }
.sev-low { background: #edf9f2; color: #25744b; border-color: #bde7ce; }
.sev-info { background: #eef4fb; color: #52657a; border-color: #d6e2ee; }

.finding-domain {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: auto;
}

.finding-evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(110px, .7fr) minmax(120px, .8fr);
  gap: 0.75rem;
  margin-top: 0.8rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #edf0f3;
}

.finding-evidence-grid div,
.finding-line {
  min-width: 0;
}

.finding-evidence-grid span,
.finding-line span {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.finding-evidence-grid a,
.finding-line a {
  color: #0a1a2f;
  overflow-wrap: anywhere;
}

.finding-line {
  margin-top: 0.7rem;
}

.finding-line p {
  margin: 0;
  color: #334155;
  font-size: 0.84rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .finding-evidence-grid {
    grid-template-columns: 1fr;
  }

  .finding-domain {
    margin-left: 0;
  }
}

.score-note {
  margin: -0.4rem 0 1.1rem;
}

.score-help-btn {
  border: 0;
  background: transparent;
  color: #0a1a2f;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.score-help-text {
  margin-top: 0.55rem;
  max-width: 760px;
  color: #52657a;
  font-size: 0.86rem;
  line-height: 1.5;
}

.finding-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: -0.4rem 0 0.9rem;
}

.finding-filters label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #52657a;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.finding-filters select,
.finding-status-select {
  border: 1px solid #d9e0e8;
  border-radius: 8px;
  background: #ffffff;
  color: #0a1a2f;
  padding: 0.45rem 0.6rem;
  font-weight: 700;
}

.asset-row-expanded {
  flex-direction: column;
  align-items: stretch;
  gap: 0.8rem;
}

.asset-main,
.asset-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

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

.asset-verify {
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.verify-good { background: #edf9f2; color: #25744b; border: 1px solid #bde7ce; }
.verify-pending { background: #fffbea; color: #8a6f00; border: 1px solid #f2dc72; }
.verify-bad { background: #fff0f0; color: #b42318; border: 1px solid #f5c6c6; }
.verify-vendor { background: #eef4fb; color: #52657a; border: 1px solid #d6e2ee; }

.finding-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.8rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #edf0f3;
}

.finding-meta-grid div {
  min-width: 0;
}

.finding-meta-grid span,
.finding-examples > span {
  display: block;
  margin-bottom: 0.2rem;
  color: #52657a;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.finding-examples {
  margin-top: 0.85rem;
}

.finding-examples details {
  margin-top: 0.5rem;
  border: 1px solid #edf0f3;
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
}

.finding-examples summary {
  cursor: pointer;
  padding: 0.65rem 0.75rem;
  color: #0a1a2f;
  font-weight: 800;
}

.finding-examples pre {
  margin: 0;
  padding: 0.8rem;
  overflow-x: auto;
  color: #0a1a2f;
  background: #ffffff;
  border-top: 1px solid #edf0f3;
  font-size: 0.82rem;
}

.reference-link {
  display: inline-flex;
  align-items: center;
  color: #0a1a2f;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(10, 26, 47, 0.28);
}

.reference-link:hover {
  border-bottom-color: #0a1a2f;
}

.scan-message code {
  display: block;
  margin-top: 0.4rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #d9e0e8;
  color: #0a1a2f;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .asset-main,
  .asset-actions {
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
  }

  .finding-meta-grid {
    grid-template-columns: 1fr;
  }
}

.change-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1.6fr) minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #edf0f3;
}

.change-row:last-child {
  border-bottom: 0;
}

.change-row strong,
.change-row span {
  overflow-wrap: anywhere;
}

.change-row small {
  color: #52657a;
}

@media (max-width: 760px) {
  .change-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

.finding-filters input {
  border: 1px solid #d9e0e8;
  border-radius: 8px;
  background: #ffffff;
  color: #0a1a2f;
  padding: 0.45rem 0.6rem;
  font-weight: 700;
  min-width: 130px;
}

.asset-finding-group {
  border-bottom: 1px solid #edf0f3;
  padding: 0.9rem 0;
}

.asset-finding-group:last-child {
  border-bottom: 0;
}

.asset-finding-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.25rem 0.7rem;
}

.asset-finding-heading strong {
  color: #0a1a2f;
  font-size: 1rem;
}

.asset-finding-heading span {
  color: #52657a;
  font-size: 0.85rem;
  font-weight: 700;
}

.finding-summary-card {
  border: 1px solid #edf0f3;
  border-radius: 14px;
  background: #ffffff;
  margin: 0.65rem 0;
  padding: 0.85rem;
}

.finding-summary-main,
.finding-summary-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.finding-summary-main {
  justify-content: space-between;
}

.finding-summary-title {
  flex: 1;
  min-width: 220px;
}

.finding-summary-title strong,
.finding-summary-title span {
  display: block;
}

.finding-summary-title span {
  margin-top: 0.2rem;
  color: #52657a;
  font-size: 0.86rem;
}

.finding-summary-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 0.9fr 0.9fr 1.4fr;
  gap: 0.7rem;
  margin: 0.8rem 0;
}

.finding-summary-grid div {
  min-width: 0;
}

.finding-summary-grid span,
.drawer-grid span,
.evidence-table span {
  display: block;
  color: #52657a;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.finding-summary-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.86rem;
}

.summary-fix {
  grid-column: auto;
}

.priority-pill {
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 900;
  border: 1px solid #d9e0e8;
}

.priority-p1 { background: #fff0f0; color: #b42318; border-color: #f5c6c6; }
.priority-p2 { background: #fff5ed; color: #a54708; border-color: #f3c39b; }
.priority-p3 { background: #fffbea; color: #8a6f00; border-color: #f2dc72; }
.priority-p4 { background: #eef4fb; color: #52657a; border-color: #d6e2ee; }
.priority-p5 { background: #f8fafc; color: #52657a; border-color: #edf0f3; }

.detail-overlay.open {
  display: flex;
}

.finding-drawer {
  margin-left: auto;
  width: min(760px, 96vw);
  height: 100vh;
  overflow-y: auto;
  background: #ffffff;
  color: #0a1a2f;
  box-shadow: -18px 0 40px rgba(10, 26, 47, 0.18);
  padding: 1.25rem;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #edf0f3;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.drawer-header h3 {
  margin: 0.55rem 0 0.2rem;
}

.drawer-header p {
  margin: 0;
  color: #52657a;
}

.drawer-close {
  border: 1px solid #d9e0e8;
  background: #ffffff;
  color: #0a1a2f;
  border-radius: 10px;
  height: 38px;
  width: 38px;
  cursor: pointer;
  font-size: 1.4rem;
}

.drawer-section {
  border-bottom: 1px solid #edf0f3;
  padding: 1rem 0;
}

.drawer-section h4 {
  margin: 0 0 0.55rem;
}

.drawer-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  border-bottom: 1px solid #edf0f3;
  padding-bottom: 1rem;
}

.drawer-grid strong,
.evidence-table p {
  overflow-wrap: anywhere;
}

.evidence-table {
  display: grid;
  gap: 0.75rem;
}

.evidence-table div {
  border: 1px solid #edf0f3;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.75rem;
}

.evidence-table p {
  margin: 0;
}

@media (max-width: 900px) {
  .finding-summary-grid,
  .drawer-grid {
    grid-template-columns: 1fr;
  }

  .finding-drawer {
    width: 100vw;
  }
}

.findings-count-bar {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0.7rem 0 0.8rem;
}

.count-pill {
  min-width: 92px;
  border: 1px solid #d9e0e8;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.55rem 0.7rem;
}

.count-pill strong,
.count-pill span {
  display: block;
}

.count-pill strong {
  font-size: 1.05rem;
  color: #0a1a2f;
}

.count-pill span {
  font-size: 0.72rem;
  font-weight: 800;
  color: #52657a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.count-pill.critical { border-color: #f5c6c6; }
.count-pill.high { border-color: #f3c39b; }
.count-pill.medium { border-color: #f2dc72; }
.count-pill.low,
.count-pill.info { border-color: #d6e2ee; }

.asset-heading-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.asset-group-number,
.finding-row-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid #d9e0e8;
  background: #f8fafc;
  color: #0a1a2f;
  font-weight: 900;
}

.asset-group-number {
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
}

.finding-row-number {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

.finding-summary-card {
  position: relative;
}

@media (max-width: 760px) {
  .count-pill {
    flex: 1 1 90px;
  }
}


/* Less crowded finding cards. Asset is shown in the group heading, so each card focuses on the finding. */
.asset-finding-group {
  padding: 1.15rem 0;
}
.asset-finding-heading {
  padding: 0 0.35rem 0.95rem;
}
.finding-summary-card {
  margin: 0.85rem 0;
  padding: 1.1rem 1.15rem;
  border-radius: 16px;
}
.finding-summary-main {
  justify-content: flex-start;
  gap: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #edf0f3;
}
.finding-summary-title {
  flex: 1 1 420px;
  min-width: 280px;
}
.finding-summary-title strong {
  line-height: 1.35;
}
.finding-summary-title span {
  margin-top: 0.28rem;
  line-height: 1.45;
}
.finding-summary-grid-clean {
  grid-template-columns: minmax(220px, 1.35fr) minmax(220px, 1.35fr) minmax(90px, 0.55fr) minmax(120px, 0.65fr);
  gap: 1.05rem 1.25rem;
  margin: 1rem 0 0.95rem;
  align-items: start;
}
.finding-summary-grid-clean strong {
  line-height: 1.45;
}
.finding-summary-actions {
  gap: 0.75rem;
  padding-top: 0.25rem;
}
.finding-summary-actions .btn-primary-small,
.finding-summary-actions .btn-secondary-small {
  min-height: 38px;
}
@media (max-width: 1050px) {
  .finding-summary-grid-clean {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .finding-summary-card {
    padding: 1rem;
  }
  .finding-summary-main {
    align-items: flex-start;
  }
  .finding-summary-title {
    min-width: 0;
    flex-basis: calc(100% - 90px);
  }
  .priority-pill {
    margin-left: 44px;
  }
  .finding-summary-grid-clean {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
}

/* Finding row readability pass: one clean line per finding instead of stacked mini cards. */
#findings-card {
  padding: 0;
  overflow: hidden;
}

.asset-finding-group {
  padding: 0;
  border-bottom: 1px solid #dfe6ee;
}

.asset-finding-group:last-child {
  border-bottom: 0;
}

.asset-finding-heading {
  padding: 1rem 1.1rem;
  background: #fbfcfd;
  border-bottom: 1px solid #e7edf4;
}

.finding-summary-card {
  display: block;
  margin: 0;
  padding: 1rem 1.1rem 1rem 0.95rem;
  border: 0;
  border-bottom: 1px solid #e7edf4;
  border-radius: 0;
  background: #ffffff;
}

.finding-summary-card:last-child {
  border-bottom: 0;
}

.finding-summary-main {
  display: grid;
  grid-template-columns: 34px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0;
  border-bottom: 0;
}

.finding-row-number {
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
}

.finding-summary-title {
  min-width: 0;
  flex: none;
}

.finding-summary-title strong {
  line-height: 1.3;
  font-size: 0.96rem;
}

.finding-summary-title span {
  margin-top: 0.22rem;
  line-height: 1.4;
  font-size: 0.82rem;
}

.finding-summary-grid-clean {
  grid-template-columns: minmax(190px, 1.25fr) minmax(210px, 1.35fr) minmax(90px, 0.55fr) minmax(105px, 0.65fr);
  gap: 0.75rem 1rem;
  margin: 0.72rem 0 0.75rem 44px;
  padding-top: 0.72rem;
  border-top: 1px solid #f0f3f7;
}

.finding-summary-grid span,
.finding-summary-grid-clean span {
  font-size: 0.66rem;
  margin-bottom: 0.18rem;
}

.finding-summary-grid strong,
.finding-summary-grid-clean strong {
  font-size: 0.82rem;
  line-height: 1.35;
}

.finding-summary-actions {
  margin-left: 44px;
  padding-top: 0;
  gap: 0.55rem;
}

.finding-summary-actions .btn-primary-small,
.finding-summary-actions .btn-secondary-small {
  min-height: 34px;
  padding: 0.45rem 0.72rem;
}

@media (max-width: 900px) {
  .finding-summary-main {
    grid-template-columns: 34px auto minmax(0, 1fr);
  }
  .priority-pill {
    grid-column: 2 / 4;
    justify-self: start;
    margin-left: 0;
  }
  .finding-summary-grid-clean {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .asset-finding-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .finding-summary-main {
    grid-template-columns: 30px auto 1fr;
    gap: 0.55rem;
  }
  .finding-summary-grid-clean,
  .finding-summary-actions {
    margin-left: 0;
  }
  .finding-summary-grid-clean {
    grid-template-columns: 1fr;
  }
}

/* Action feedback for finding buttons. */
.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 80;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #0a1a2f;
  color: #ffffff;
  box-shadow: 0 14px 36px rgba(10, 26, 47, 0.22);
  font-weight: 800;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.toast.error {
  background: #7f1d1d;
}

.finding-summary-actions button:disabled,
.drawer-actions button:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.page-subtitle {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
  margin-top: 0.35rem;
  max-width: 720px;
}

}

.dns-import-form {
  border-top: 1px solid #e3e9f0;
  padding-top: 1rem;
  margin-top: 1.2rem;
}

.dns-import-form textarea {
  margin-top: 0.45rem;
  width: 100%;
  min-height: 120px;
  border: 1px solid #d9e1ea;
  border-radius: var(--radius);
  padding: 0.85rem;
  font: inherit;
  color: var(--navy);
  background: #fff;
  resize: vertical;
}

.btn-locked {
  opacity: 0.6;
}

/* ===== Landing page (index.html) v8 ===== */
.lp-body { margin:0; background:var(--offwhite); color:var(--navy); font-family:inherit; }
.lp-header { display:flex; align-items:center; justify-content:space-between; padding:20px 32px; background:var(--navy); }
.lp-logo { display:block; width:150px; height:30px; background:url('/public/img/blackhount-wordmark-white.svg') left center/contain no-repeat; }
.lp-nav { display:flex; align-items:center; gap:18px; }
.lp-nav-link { color:#fff; text-decoration:none; font-weight:600; font-size:.95rem; }
.lp-nav-link:hover { opacity:.85; }
.lp-btn { display:inline-block; border-radius:8px; text-decoration:none; font-weight:600; font-size:.95rem; padding:10px 18px; border:1px solid transparent; cursor:pointer; }
.lp-btn-primary { background:var(--navy); color:#fff; border-color:var(--navy); }
.lp-header .lp-btn-primary { background:#fff; color:var(--navy); border-color:#fff; }
.lp-btn-primary:hover { opacity:.92; }
.lp-btn-ghost { background:transparent; color:var(--navy); border-color:var(--navy); }
.lp-btn-ghost:hover { background:rgba(10,26,47,0.06); }
.lp-btn-lg { padding:13px 26px; font-size:1rem; }

.lp-main { max-width:1080px; margin:0 auto; padding:0 24px; }
.lp-hero { text-align:center; padding:72px 0 48px; }
.lp-kicker { text-transform:uppercase; letter-spacing:.16em; font-size:.75rem; font-weight:700; color:var(--muted, #5a6b80); margin:0 0 14px; }
.lp-h1 { font-size:2.7rem; line-height:1.08; font-weight:800; margin:0 0 18px; color:var(--navy); }
.lp-lead { max-width:640px; margin:0 auto 26px; font-size:1.08rem; line-height:1.55; color:#3a4a5e; }
.lp-actions { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.lp-microcopy { margin:18px 0 0; font-size:.85rem; color:#6b7a8d; }

.lp-features { display:flex; gap:20px; flex-wrap:wrap; padding:20px 0 60px; }
.lp-feature { flex:1 1 260px; background:#fff; border:1px solid #e3e8ee; border-radius:12px; padding:26px; }
.lp-feature h3 { margin:0 0 10px; font-size:1.1rem; color:var(--navy); }
.lp-feature p { margin:0; font-size:.95rem; line-height:1.55; color:#48586b; }

.lp-pricing { padding:24px 0 72px; }
.lp-pricing-head { text-align:center; max-width:600px; margin:0 auto 34px; }
.lp-pricing-head h2 { font-size:1.9rem; margin:0 0 12px; color:var(--navy); }
.lp-pricing-head p { margin:0; color:#48586b; font-size:1rem; line-height:1.55; }
.lp-plans { display:flex; gap:20px; flex-wrap:wrap; align-items:stretch; }
.lp-plan { flex:1 1 260px; background:#fff; border:1px solid #e3e8ee; border-radius:14px; padding:28px 26px; display:flex; flex-direction:column; }
.lp-plan-featured { border:2px solid var(--navy); box-shadow:0 12px 30px rgba(10,26,47,0.12); }
.lp-plan-tag { align-self:flex-start; background:var(--navy); color:#fff; font-size:.72rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; padding:5px 12px; border-radius:999px; margin:0 0 12px; }
.lp-plan-name { font-size:1.05rem; font-weight:700; color:var(--navy); margin:0 0 6px; }
.lp-plan-price { font-size:2rem; font-weight:800; color:var(--navy); margin:0 0 18px; }
.lp-plan-price span { font-size:.95rem; font-weight:600; color:#6b7a8d; }
.lp-plan-list { list-style:none; margin:0; padding:0; }
.lp-plan-list li { padding:9px 0 9px 26px; position:relative; font-size:.95rem; color:#3a4a5e; border-top:1px solid #eef1f5; }
.lp-plan-list li:first-child { border-top:none; }
.lp-plan-list li::before { content:''; position:absolute; left:4px; top:15px; width:8px; height:8px; border-radius:50%; background:var(--navy); }
.lp-pricing-cta { text-align:center; margin-top:36px; }

.lp-footer { display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; max-width:1080px; margin:0 auto; padding:28px 24px 40px; color:#6b7a8d; font-size:.85rem; border-top:1px solid #e3e8ee; }

@media (max-width:640px){
  .lp-header { padding:16px 18px; }
  .lp-logo { width:126px; }
  .lp-h1 { font-size:2rem; }
  .lp-hero { padding:48px 0 32px; }
}

/* Landing page plan buttons v9 */
.lp-plan-btn { display:block; text-align:center; margin-top:22px; width:100%; box-sizing:border-box; }
.lp-plan .lp-plan-list { flex:1 1 auto; }
