*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #FFFFFF;
  color: #09090B;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.03em;
  font-weight: 700;
  color: #09090B;
}

.mono-font {
  font-family: 'JetBrains Mono', monospace;
}

/* Header & Navigation */
.site-header {
  border-bottom: 1px solid #E4E4E7;
  background-color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  background: #000000;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  color: #09090B;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-link {
  color: #71717A;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 10px;
  transition: color 0.15s ease;
}

.btn-link:hover {
  color: #09090B;
}

.btn-primary {
  background-color: #000000;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid #000000;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn-primary:hover {
  background-color: #27272A;
}

.btn-secondary {
  background-color: #FFFFFF;
  color: #09090B;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid #E4E4E7;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.btn-secondary:hover {
  background-color: #FAFAFA;
}

/* Layout */
.main-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
  flex: 1 0 auto;
}

.hero-section {
  margin-bottom: 28px;
}

.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #71717A;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 10px;
}

.hero-desc {
  font-size: 15px;
  color: #71717A;
  max-width: 780px;
}

/* Advertisement Container */
.ad-unit-wrapper {
  margin-bottom: 28px;
}

.ad-card {
  background-color: #FAFAFA;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.ad-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: #A1A1AA;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.ad-content {
  font-size: 12px;
  color: #71717A;
  text-align: center;
}

/* Work Area Grid */
.app-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  margin-bottom: 40px;
}

.app-grid > * {
  min-width: 0;
}

.panel-card {
  background-color: #FAFAFA;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  padding: 24px;
  min-width: 0;
}

.panel-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #E4E4E7;
}

.panel-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.panel-subtitle {
  font-size: 13px;
  color: #71717A;
}

/* Presets & Quick-load */
.preset-section {
  margin-bottom: 16px;
}

.preset-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #71717A;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.preset-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-btn {
  background-color: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #09090B;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background-color: #F4F4F5;
  border-color: #D4D4D8;
}

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #09090B;
  margin-bottom: 6px;
}

.input-control, .select-control {
  width: 100%;
  background-color: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  padding: 9px 12px;
  font-size: 13px;
  color: #09090B;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.input-control:focus, .select-control:focus {
  border-color: #09090B;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-hint {
  font-size: 11px;
  color: #71717A;
  margin-top: 4px;
}

/* Checkbox & Options */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #09090B;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: #000000;
  cursor: pointer;
}

/* Results Panel */
.results-container {
  min-width: 0;
}

.score-hero-card {
  background-color: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.score-hero-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #71717A;
  margin-bottom: 4px;
}

.score-display-number {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.score-status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 6px;
}

.status-pass {
  background-color: #F4F4F5;
  color: #09090B;
  border: 1px solid #D4D4D8;
}

.status-warning {
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}

.status-fail {
  background-color: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

/* Factor Breakdown Table */
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
  font-size: 12px;
}

.breakdown-table th, .breakdown-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #E4E4E7;
}

.breakdown-table th {
  background-color: #FAFAFA;
  font-weight: 600;
  color: #71717A;
  font-size: 11px;
  text-transform: uppercase;
}

.breakdown-table tr:last-child td {
  border-bottom: none;
}

.flag-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.flag-verified {
  background: #ECFDF5;
  color: #065F46;
}

.flag-alert {
  background: #FEF2F2;
  color: #991B1B;
}

.flag-neutral {
  background: #F4F4F5;
  color: #52525B;
}

/* Fraud Alerts Box */
.anomaly-feed {
  background-color: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.anomaly-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #09090B;
  margin-bottom: 10px;
}

.anomaly-list {
  list-style: none;
  font-size: 12px;
  color: #09090B;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.anomaly-item {
  padding: 8px 10px;
  background-color: #FAFAFA;
  border-left: 3px solid #000000;
  border-radius: 0 4px 4px 0;
}

/* Micro Affiliate Endorsement */
.affiliate-box {
  background-color: #FFFFFF;
  border: 1px dashed #D4D4D8;
  border-radius: 4px;
  padding: 14px;
  font-size: 12px;
  color: #71717A;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.affiliate-link {
  color: #09090B;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Technical Algorithmic Methodology (E-E-A-T) */
.methodology-section {
  background-color: #FAFAFA;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  padding: 32px 28px;
  margin-bottom: 40px;
}

.methodology-heading {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}

.methodology-desc {
  font-size: 14px;
  color: #71717A;
  margin-bottom: 20px;
  line-height: 1.6;
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.methodology-grid > * {
  min-width: 0;
}

.methodology-card {
  background-color: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  padding: 16px;
}

.methodology-step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #71717A;
  margin-bottom: 6px;
}

.methodology-step-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.methodology-step-body {
  font-size: 12px;
  color: #71717A;
  line-height: 1.5;
}

/* Footer Section */
.site-footer {
  background-color: #FFFFFF;
  border-top: 1px solid #E4E4E7;
  padding: 32px 24px;
  color: #71717A;
  font-size: 12px;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-link {
  color: #71717A;
  text-decoration: none;
  font-size: 12px;
}

.footer-link:hover {
  color: #09090B;
}

.footer-legal {
  border-top: 1px solid #E4E4E7;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
}

/* Floating Support Button */
.support-widget-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #000000;
  color: #FFFFFF;
  border: 1px solid #27272A;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 50;
  transition: transform 0.15s ease;
}

.support-widget-float:hover {
  transform: translateY(-2px);
}

/* Modal Overlay & Form */
.modal-scrim {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(9, 9, 11, 0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-scrim.hidden {
  display: none !important;
}

.modal-dialog {
  background-color: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 6px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #E4E4E7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #71717A;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #09090B;
}

.modal-body {
  padding: 20px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background-color: #F4F4F5;
  padding: 3px;
  border-radius: 4px;
  margin-bottom: 18px;
}

.seg-btn {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: #71717A;
  padding: 6px 4px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.1s ease;
  white-space: normal;
  word-break: break-word;
}

.seg-btn.active {
  background-color: #FFFFFF;
  color: #09090B;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

/* Responsiveness */
@media (max-width: 900px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
  .methodology-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .main-wrapper {
    padding: 16px 12px;
  }
  .panel-card {
    padding: 16px;
  }
  .header-container {
    padding: 12px 14px;
    flex-wrap: wrap;
  }
  .input-row {
    grid-template-columns: 1fr;
  }
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
  .segmented-control {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 24px;
  }
  .score-hero-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .support-widget-float {
    bottom: 12px;
    right: 12px;
    font-size: 11px;
    padding: 8px 10px;
  }
}