:root {
  --navy-deep: #0a0e1a;
  --navy: #0d1424;
  --charcoal: #1a1d27;
  --charcoal-light: #232733;
  --white: #f5f5f2;
  --gold: #c9a44c;
  --gold-light: #e2c179;
  --gold-dim: rgba(201, 164, 76, 0.15);
  --gold-border: rgba(201, 164, 76, 0.35);
  --text-muted: #a9adb8;
  --error: #e0665a;
}

body, html {
  margin: 0;
  padding: 0;
  background-color: var(--navy-deep);
  color: #e3e3e3;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 400;
  scroll-behavior: smooth;
  line-height: 1.5;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
header.header {
  background: rgba(10, 14, 26, 0.92);
  border-bottom: 1px solid var(--gold-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.header-content {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  background: linear-gradient(135deg, var(--gold), #a3813a);
  color: var(--navy-deep);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.03em;
  width: 40px;
  height: 40px;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 10px rgba(201, 164, 76, 0.5);
}
.logo-text .title {
  margin: 0;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--white);
  user-select: none;
}
.logo-text .subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  user-select: none;
}
.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
  letter-spacing: 0.07em;
  user-select: none;
}
.nav-item {
  color: #aaa;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}
.nav-item:hover,
.nav-item:focus {
  color: var(--gold-light);
  outline: none;
}

.btn {
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 32px;
  cursor: pointer;
  padding: 12px 24px;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  text-transform: none;
}
.btn-orange {
  background-color: var(--gold);
  color: var(--navy-deep);
  box-shadow: 0 0 10px rgba(201, 164, 76, 0.3);
}
.btn-orange:hover,
.btn-orange:focus {
  background-color: var(--gold-light);
  outline: none;
  box-shadow: 0 0 15px rgba(201, 164, 76, 0.45);
}
.btn-outline {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
}
.btn-outline:hover,
.btn-outline:focus {
  background-color: rgba(255,255,255,0.16);
  outline: none;
}

.get-prospect-btn {
  flex-shrink: 0;
}

.mobile-menu-toggle {
  display: none;
  font-size: 24px;
  color: var(--gold);
  background: none;
  border: none;
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 48px 24px 64px;
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-background {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(201,164,76,0.18), transparent 35%), radial-gradient(circle at bottom left, rgba(59,130,246,0.10), transparent 35%);
  pointer-events: none;
  z-index: 0;
  border-radius: 16px;
}
.hero-content {
  position: relative;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  width: 100%;
  z-index: 1;
}
.hero-text {
  flex: 1 1 360px;
}
.location-tag {
  display: inline-block;
  background-color: var(--gold-dim);
  border: 1px solid var(--gold-border);
  border-radius: 32px;
  padding: 6px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.1em;
  user-select: none;
  margin-bottom: 24px;
}
.hero-title {
  margin: 0 0 18px;
  font-size: 2.45rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--white);
  user-select: none;
}
.hero-description {
  margin: 0 0 32px;
  font-size: 1.2rem;
  line-height: 1.55;
  color: #b1b1b1;
  user-select: none;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-large {
  font-size: 1.125rem;
  padding: 16px 28px;
  border-radius: 32px;
}
.arrow-right {
  font-size: 1.3rem;
  line-height: 1;
  user-select: none;
}

/* Opportunity Card */
.opportunity-card-wrapper {
  flex: 1 1 400px;
}
.opportunity-card {
  background-color: var(--charcoal-light);
  border: 1px solid rgba(201, 164, 76, 0.18);
  border-radius: 32px;
  padding: 28px 32px;
  box-shadow: 0 0 40px rgba(0,0,0,0.8);
  color: var(--white);
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.opportunity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.score-section {
  text-align: left;
}
.score-label {
  font-size: 0.9rem;
  color: #bbb;
  margin: 0;
}
.score-value {
  font-weight: 900;
  font-size: 2.75rem;
  margin: 0;
  color: var(--gold-light);
  user-select: text;
}
.map-pin {
  font-size: 2.6rem;
  color: var(--gold-light);
  user-select: none;
}
.lead-info {
  background-color: rgba(0,0,0,0.3);
  border-radius: 24px;
  padding: 16px 20px;
}
.lead-label {
  color: #bbb;
  font-size: 0.9rem;
  margin: 0;
  user-select: none;
}
.lead-title {
  font-size: 1.75rem;
  font-weight: 900;
  margin: 8px 0 0;
  color: var(--white);
  user-select: text;
}
.lead-signals {
  list-style: none;
  margin: 16px 0 0;
  padding-left: 0;
  color: #c4c4c4;
  font-weight: 600;
  font-size: 1rem;
}
.lead-signals li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  user-select: none;
}
.lead-signals li::before {
  content: "\2022";
  color: var(--gold);
}
.card-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
}
.lead-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
  margin-top: 16px;
}
.lead-meta-item .meta-label {
  margin: 0;
  font-size: 0.75rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.lead-meta-item .meta-value {
  margin: 2px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
}
.stat-box {
  background: rgba(255,255,255,0.05);
  padding: 18px 12px;
  border-radius: 24px;
  user-select: none;
}
.stat-number {
  font-weight: 900;
  font-size: 1.75rem;
  color: white;
  margin: 0 0 6px;
}
.stat-label {
  font-size: 0.8rem;
  color: #bbb;
  margin: 0;
}

/* Sections */
section {
  padding: 56px 24px;
}
.content-wrapper {
  max-width: 1140px;
  margin: 0 auto;
}
.section-subtitle {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--gold-light);
  letter-spacing: 0.15em;
  user-select: none;
  margin-bottom: 12px;
}
.section-title {
  font-weight: 900;
  font-size: 2.5rem;
  margin: 0 0 24px;
  user-select: none;
  color: var(--white);
}
.section-description {
  font-size: 1.125rem;
  color: #ccc;
  line-height: 1.5;
  margin-bottom: 36px;
  user-select: none;
}

.orange-text,
.gold-text {
  color: var(--gold-light);
}

.inline-link {
  color: var(--gold-light);
  text-decoration: underline;
}
.inline-link:hover,
.inline-link:focus {
  color: var(--white);
}

/* Freight module — de-emphasized secondary section */
.freight-legacy-section {
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.freight-legacy-section .card-badge {
  margin-bottom: 12px;
}

/* Platform Positioning Banner */
.platform-intro-section {
  padding: 0 24px 8px;
}
.platform-intro-banner {
  max-width: 1140px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(201,164,76,0.12), rgba(201,164,76,0.03));
  border: 1px solid var(--gold-border);
  border-radius: 24px;
  padding: 28px 32px;
  text-align: center;
}
.platform-intro-banner p {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.5;
}

/* Cards Grid base */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 24px;
}

/* Module group headers within Services */
.module-group {
  margin-bottom: 40px;
}
.module-group:last-of-type {
  margin-bottom: 0;
}
.module-group-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.module-group-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  margin: 0;
}
.module-group-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  padding: 4px 12px;
  border-radius: 16px;
}
.module-overlap-note {
  max-width: 720px;
  color: #ccc;
  font-size: 1rem;
  margin: 0 0 40px;
}

/* Service Cards */
.service-card {
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 32px;
  padding: 24px 24px 32px;
  box-shadow: 0 0 24px rgba(201, 164, 76, 0.12);
  display: flex;
  flex-direction: column;
  gap: 16px;
  user-select: none;
}
.service-card.overlap-card {
  border: 1px solid var(--gold-border);
  background: linear-gradient(160deg, var(--charcoal), rgba(201,164,76,0.06));
}
.icon-bg {
  font-size: 36px;
  color: var(--gold-light);
  background: var(--gold-dim);
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.service-card h3 {
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0;
  color: white;
}
.service-card p {
  margin: 0;
  color: #ddd;
  font-size: 1rem;
  line-height: 1.4;
}

/* Plumbing Permit Intelligence Section */
.plumbing-section {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.plumbing-content {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.plumbing-text {
  flex: 1 1 420px;
}
.plumbing-headline {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  margin: 0 0 16px;
  line-height: 1.4;
}
.page-title {
  font-size: 2.15rem;
  font-weight: 900;
  color: var(--white);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.dashboard-reports-hint {
  margin: 14px 0 0;
  font-size: 1.05rem;
  color: #ccc;
  line-height: 1.45;
}
.dashboard-reports-hint .text-muted {
  color: var(--text-muted);
}
.path-code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
  color: var(--gold-light);
  background: rgba(201, 164, 76, 0.12);
  border: 1px solid var(--gold-border);
  border-radius: 6px;
  padding: 2px 8px;
}
.permit-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 12px;
  margin-top: 12px;
}
.permit-type-item {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 700;
  color: var(--gold-light);
  font-size: 0.92rem;
  user-select: none;
}
.plumbing-card-wrapper {
  flex: 1 1 380px;
}

/* Data Signals Grid */
.data-signals-section {
  background: rgba(255,255,255,0.02);
}
.signals-content {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.signals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 16px;
  align-self: stretch;
}
.signal-item {
  background: rgba(0,0,0,0.6);
  padding: 16px;
  border-radius: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-light);
  user-select: none;
  font-size: 1rem;
}

/* Who We Help Cards */
.who-we-help-section {
  background:none;
}
.help-grid {
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 18px;
}
.help-card {
  background: var(--charcoal);
  border-radius: 32px;
  padding: 20px 16px;
  font-weight: 700;
  user-select: none;
  font-size: 1rem;
  color: #ddd;
  box-shadow: 0 0 22px rgba(201, 164, 76, 0.12);
}

/* Sample Report Section */
.report-section {
  background: rgba(255,255,255,0.02);
}
.report-content {
  display: flex;
  justify-content: center;
}
.report-text {
  max-width: 720px;
  text-align: left;
}
.report-list {
  margin: 0 0 32px;
  padding-left: 20px;
  color: #ccc;
  font-size: 1rem;
  line-height: 1.8;
}

/* Pricing Section */
.pricing-section {
  background: var(--navy);
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 24px;
  margin-top: 12px;
}
.pricing-card {
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 32px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pricing-card.featured {
  border: 1px solid var(--gold-border);
  background: linear-gradient(160deg, var(--charcoal-light), rgba(201,164,76,0.08));
  box-shadow: 0 0 30px rgba(201, 164, 76, 0.18);
  position: relative;
}
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 28px;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 16px;
}
.pricing-tier {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
  margin: 0;
}
.pricing-price {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--gold-light);
  margin: 0;
}
.pricing-price .price-period {
  font-size: 1rem;
  font-weight: 600;
  color: #999;
}
.pricing-features {
  list-style: none;
  margin: 0;
  padding: 0;
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.9;
  flex-grow: 1;
}
.pricing-features li::before {
  content: "\2713  ";
  color: var(--gold);
  font-weight: 800;
}

/* Contact Section */
.contact-section {
  background: none;
  color: #eee;
  padding-bottom: 80px;
}
.lead-form {
  max-width: 460px;
  margin: 0 auto;
  user-select: none;
}
form * {
  box-sizing: border-box;
}
.form-row {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}
label {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--gold-light);
}
input[type="text"],
input[type="email"],
textarea {
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  border: 2px solid #444;
  background-color: #121212;
  color: white;
  outline-offset: 2px;
  transition: border-color 0.25s;
  resize: vertical;
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--gold);
  outline: none;
}
.error-msg {
  color: var(--error);
  font-size: 0.9rem;
  height: 18px;
  margin-top: 2px;
}
.form-success {
  text-align: center;
  color: var(--gold-light);
  margin-top: 20px;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  padding: 24px;
  text-align: center;
  color: #777;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Responsive */
@media (max-width: 899px) {
  .hero-section {
    flex-direction: column;
  }
  .hero-text,
  .opportunity-card-wrapper {
    flex: none;
    width: 100%;
  }
  .signals-content,
  .plumbing-content {
    flex-direction: column;
  }
  .nav-links {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}

/* ============================================================
   Dashboard page (dashboard.html / dashboard.js)
   ============================================================ */
.dashboard-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.dashboard-generated-at {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}
.dashboard-loading,
.dashboard-empty {
  color: var(--text-muted);
  font-size: 1rem;
  padding: 24px 0;
}

.widget-panel {
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 24px;
  padding: 24px 28px;
  margin-bottom: 28px;
}
.widget-panel h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--white);
  margin: 0 0 18px;
}

.stat-tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.stat-tile {
  container-type: inline-size;
  background: linear-gradient(165deg, #161c2a 0%, #10151f 100%);
  border: 1px solid rgba(201, 164, 76, 0.22);
  border-radius: 18px;
  padding: 18px 16px 16px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  box-sizing: border-box;
}
.stat-tile .stat-tile-value {
  font-size: clamp(1.35rem, 12cqi, 2.1rem);
  font-weight: 900;
  color: var(--gold-light);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.stat-tile-money .stat-tile-value {
  font-size: clamp(1.25rem, 11cqi, 1.85rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-tile .stat-tile-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  margin: 2px 0 0;
  letter-spacing: 0.01em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.stat-tile .stat-tile-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 960px) {
  .stat-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .stat-tile-grid {
    grid-template-columns: 1fr;
  }
}

.jurisdiction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.jurisdiction-card {
  background: rgba(0,0,0,0.4);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.jurisdiction-card .jurisdiction-name {
  font-weight: 800;
  color: var(--white);
  font-size: 1rem;
}
.jurisdiction-card .jurisdiction-notes {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.status-chip {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 16px;
}
.status-chip-connected {
  background: rgba(120, 200, 130, 0.15);
  border: 1px solid rgba(120, 200, 130, 0.45);
  color: #8fdc9a;
}
.status-chip-pending {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text-muted);
}

.category-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.category-chip {
  background: rgba(0,0,0,0.4);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #ddd;
}
.category-chip .category-count {
  font-weight: 800;
  color: var(--gold-light);
}

.data-table-wrapper {
  overflow-x: auto;
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
table.data-table th {
  text-align: left;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  white-space: nowrap;
}
table.data-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: #ddd;
  vertical-align: top;
}
table.data-table tr:last-child td {
  border-bottom: none;
}
.score-cell {
  font-weight: 800;
  color: var(--gold-light);
}

/* Contractor matching page */
.matching-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.matching-search {
  flex: 1 1 260px;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid #444;
  background-color: #121212;
  color: white;
}
.matching-search:focus {
  border-color: var(--gold);
  outline: none;
}
.matching-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  user-select: none;
  cursor: pointer;
}
.matching-toggle input {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
}
.jurisdiction-badge {
  margin: 2px 4px 2px 0;
  white-space: nowrap;
}

/* Reports page */
.report-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.report-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.report-card:hover,
.report-card:focus-visible {
  border-color: var(--gold-border);
  background: rgba(201, 164, 76, 0.08);
  outline: none;
}
.report-card-latest {
  border-color: rgba(201, 164, 76, 0.35);
}
.report-card.is-active-report {
  border-color: rgba(224, 103, 46, 0.7);
  box-shadow: 0 0 0 1px rgba(224, 103, 46, 0.35);
}
.report-archive summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-muted, #8a9099);
}
.report-job-link {
  color: var(--gold-light, #c9a44c);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.report-job-link:hover,
.report-job-link:focus-visible {
  color: #fff;
}
.report-table tr.report-row-clickable {
  cursor: pointer;
}
.report-table tr.report-row-clickable:hover td {
  background: rgba(201, 164, 76, 0.08);
}
.job-facts-table th {
  width: 34%;
  text-align: left;
  white-space: nowrap;
}
.report-card-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  padding: 3px 10px;
}
.report-card-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
}
.report-card-file {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  color: #8a8f9c;
  word-break: break-all;
}
.report-card-blurb {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Saleable report document */
.report-document {
  background: linear-gradient(180deg, #141924 0%, #0f1420 100%);
  border: 1px solid rgba(201, 164, 76, 0.28);
  border-radius: 24px;
  padding: 0;
  margin-bottom: 28px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.report-document-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px 32px 22px;
  border-bottom: 1px solid rgba(201, 164, 76, 0.22);
  background:
    radial-gradient(600px 180px at 0% 0%, rgba(201, 164, 76, 0.14), transparent 60%),
    linear-gradient(135deg, #171d2a, #10151f);
}
.report-doc-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-deep);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}
.report-doc-heading {
  margin: 0 0 8px;
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.report-doc-submeta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 640px;
}
.report-doc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.report-document-body {
  padding: 28px 32px 12px;
  color: #d8dbe3;
  font-size: 1.02rem;
  line-height: 1.6;
}
.report-document-body .report-doc-title {
  display: none; /* header already shows title */
}
.report-document-body .report-section-title {
  margin: 28px 0 12px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 0.02em;
}
.report-document-body .report-subhead {
  margin: 20px 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
}
.report-document-body p {
  margin: 0 0 14px;
  color: #c8ccd6;
}
.report-document-body strong {
  color: var(--white);
}
.report-document-body code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
  color: var(--gold-light);
  background: rgba(201, 164, 76, 0.1);
  border-radius: 4px;
  padding: 1px 6px;
}
.report-callout {
  margin: 0 0 22px;
  padding: 14px 18px;
  border-left: 3px solid var(--gold);
  background: rgba(201, 164, 76, 0.08);
  border-radius: 0 12px 12px 0;
  color: #e5e7ee;
  font-size: 0.98rem;
}
.report-actions,
.report-bullets {
  margin: 0 0 18px;
  padding-left: 1.25rem;
  color: #d0d4de;
}
.report-actions li,
.report-bullets li {
  margin-bottom: 10px;
  padding-left: 4px;
}
.report-actions li::marker {
  color: var(--gold-light);
  font-weight: 800;
}
.report-table-wrap {
  overflow-x: auto;
  margin: 0 0 22px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 640px;
}
.report-table th {
  text-align: left;
  padding: 12px 14px;
  background: rgba(201, 164, 76, 0.12);
  color: var(--gold-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border-bottom: 1px solid rgba(201, 164, 76, 0.25);
}
.report-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #d5d8e0;
  vertical-align: top;
}
.report-table tr:last-child td {
  border-bottom: none;
}
.report-table tr.report-row-priority {
  background: rgba(201, 164, 76, 0.05);
}
.report-table .report-score-cell {
  font-weight: 800;
  color: var(--gold-light);
  white-space: nowrap;
}
.report-document-footer {
  padding: 16px 32px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #7d8390;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-view-toggle {
  display: inline-flex;
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}
.report-view-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
}
.report-view-btn.is-active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
}
.report-raw-view {
  margin: 0;
  padding: 24px 28px;
  background: rgba(0, 0, 0, 0.45);
  color: #e8e8e4;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 70vh;
  overflow: auto;
  border: 0;
}
.print-only {
  display: none;
}

@media print {
  @page {
    margin: 0.6in;
  }

  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }

  .no-print {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .app-container,
  .dashboard-main,
  #reportsContent,
  .report-document {
    display: block !important;
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .report-print-section {
    break-inside: avoid-page;
    margin-bottom: 28px;
  }

  .report-print-raw-section {
    break-before: page;
  }

  .report-print-kicker {
    margin: 0 0 6px;
    font-size: 11pt;
    font-weight: 700;
    color: #333 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .report-print-title {
    margin: 0 0 8px;
    font-size: 20pt;
    color: #111 !important;
  }

  .report-print-submeta {
    margin: 0 0 18px;
    color: #333 !important;
    font-size: 11pt;
  }

  .report-print-bundle,
  .report-print-body,
  .report-print-body *,
  .report-print-raw,
  .report-document-footer {
    color: #111 !important;
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-print-body {
    padding: 0 !important;
  }

  .report-print-body .report-doc-title {
    display: none !important;
  }

  .report-print-body .report-section-title,
  .report-print-body .report-subhead,
  .report-print-body strong,
  .report-print-body .report-score-cell,
  .report-table th {
    color: #111 !important;
  }

  .report-callout {
    border-left: 3px solid #333 !important;
    background: #f3f3f3 !important;
    color: #111 !important;
  }

  .report-table-wrap {
    overflow: visible !important;
    border: 1px solid #ccc !important;
    background: #fff !important;
  }

  .report-table {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 9pt !important;
  }

  .report-table th,
  .report-table td {
    color: #111 !important;
    border-bottom: 1px solid #ddd !important;
    background: #fff !important;
  }

  .report-table tr.report-row-priority {
    background: #f7f7f7 !important;
  }

  .report-print-raw {
    max-height: none !important;
    overflow: visible !important;
    border: 1px solid #ccc !important;
    padding: 12px !important;
    font-size: 9pt !important;
    white-space: pre-wrap !important;
  }

  .report-document-footer {
    border-top: 1px solid #ccc !important;
    color: #444 !important;
    padding: 12px 0 0 !important;
  }
}

@media (max-width: 768px) {
  .page-title {
    font-size: 1.7rem;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .report-document-header,
  .report-document-body,
  .report-document-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
  .report-doc-heading {
    font-size: 1.45rem;
  }
}
