*, *::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;
  -moz-osx-font-smoothing: grayscale;
}

.mono-text {
  font-family: 'JetBrains Mono', monospace;
}

/* Base Container & Grid */
.site-header {
  border-bottom: 1px solid #E4E4E7;
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-badge {
  background: #09090B;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: -0.02em;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #09090B;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: #71717A;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: #09090B;
}

.btn-primary {
  background: #000000;
  color: #FFFFFF;
  border: 1px solid #000000;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn-primary:hover {
  background: #27272A;
  border-color: #27272A;
}

.btn-secondary {
  background: #FFFFFF;
  color: #09090B;
  border: 1px solid #E4E4E7;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.btn-secondary:hover {
  background: #FAFAFA;
}

.main-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Safe Ad Containers */
.ad-slot-zone {
  border: 1px solid #E4E4E7;
  background: #FAFAFA;
  border-radius: 4px;
  margin-top: 40px;
  margin-bottom: 40px;
  padding: 16px;
  text-align: center;
}

.ad-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #A1A1AA;
  margin-bottom: 8px;
  font-weight: 600;
}

.ad-content-box {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px dashed #E4E4E7;
  color: #71717A;
  font-size: 13px;
}

/* Tool Header */
.tool-hero {
  margin-bottom: 28px;
}

.tool-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #09090B;
  background: #F4F4F5;
  border: 1px solid #E4E4E7;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.tool-hero h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #09090B;
  line-height: 1.15;
  margin-bottom: 8px;
}

.tool-hero p {
  color: #71717A;
  font-size: 15px;
  max-width: 760px;
}

/* Workspace Grid */
.app-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

.app-grid > * {
  min-width: 0;
}

.panel-card {
  background: #FAFAFA;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  padding: 24px;
  min-width: 0;
}

.panel-card-white {
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  padding: 24px;
  min-width: 0;
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #09090B;
  margin-bottom: 6px;
}

.input-control {
  width: 100%;
  padding: 8px 12px;
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  font-size: 13px;
  color: #09090B;
  outline: none;
  transition: border-color 0.15s ease;
}

.input-control:focus {
  border-color: #09090B;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: #F4F4F5;
  padding: 4px;
  border-radius: 4px;
  border: 1px solid #E4E4E7;
}

.seg-btn {
  background: transparent;
  border: none;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  color: #71717A;
  border-radius: 2px;
  cursor: pointer;
  text-align: center;
}

.seg-btn.active {
  background: #FFFFFF;
  color: #09090B;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
}

.summary-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.metric-cell {
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  padding: 12px;
}

.metric-label {
  font-size: 11px;
  font-weight: 500;
  color: #71717A;
  margin-bottom: 4px;
}

.metric-val {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Results Table */
.results-container {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  background: #FFFFFF;
}

.dns-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.dns-table th {
  background: #FAFAFA;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #71717A;
  border-bottom: 1px solid #E4E4E7;
}

.dns-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F4F4F5;
  vertical-align: top;
}

.dns-table tr:last-child td {
  border-bottom: none;
}

.resolver-badge {
  font-weight: 600;
  font-size: 13px;
  color: #09090B;
}

.resolver-loc {
  font-size: 11px;
  color: #71717A;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
}

.status-tag.synced {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.status-tag.pending {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.status-tag.error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.records-list {
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
}

.records-list code {
  background: #F4F4F5;
  padding: 2px 4px;
  border-radius: 3px;
  border: 1px solid #E4E4E7;
}

/* Native Micro Affiliate */
.affiliate-recom-box {
  background: #FAFAFA;
  border: 1px solid #E4E4E7;
  border-radius: 4px;
  padding: 16px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.affiliate-recom-text h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.affiliate-recom-text p {
  font-size: 12px;
  color: #71717A;
}

/* Algorithmic Methodology E-E-A-T section */
.methodology-block {
  margin-top: 56px;
  border-top: 1px solid #E4E4E7;
  padding-top: 40px;
}

.methodology-block h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.method-card {
  border: 1px solid #E4E4E7;
  background: #FAFAFA;
  padding: 18px;
  border-radius: 4px;
}

.method-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.method-card p {
  font-size: 12px;
  color: #71717A;
  line-height: 1.6;
}

/* Structural Footer */
.structural-footer {
  border-top: 1px solid #E4E4E7;
  background: #FFFFFF;
  padding: 40px 24px 32px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #09090B;
}

.footer-col p, .footer-col ul {
  font-size: 12px;
  color: #71717A;
  line-height: 1.6;
  list-style: none;
}

.footer-col a {
  color: #71717A;
  text-decoration: none;
}

.footer-col a:hover {
  color: #09090B;
}

.footer-bottom-bar {
  max-width: 1200px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid #F4F4F5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #A1A1AA;
}

/* Modals */
.modal-scrim {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-scrim.hidden {
  display: none !important;
}

.modal-box {
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 6px;
  width: 100%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #71717A;
  cursor: pointer;
  line-height: 1;
}

.modal-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #F4F4F5;
  padding: 4px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.tab-btn {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 600;
  padding: 6px;
  border-radius: 3px;
  cursor: pointer;
  color: #71717A;
  text-align: center;
}

.tab-btn.active {
  background: #FFFFFF;
  color: #09090B;
}

/* Floating Buy Me Coffee Button */
.support-widget-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #000000;
  color: #FFFFFF;
  border: 1px solid #27272A;
  border-radius: 50px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 50;
  transition: transform 0.15s ease;
}

.support-widget-float:hover {
  transform: translateY(-2px);
}

/* Responsive Rules */
@media (max-width: 860px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
  .summary-matrix {
    grid-template-columns: repeat(2, 1fr);
  }
  .methodology-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .main-wrapper {
    padding: 16px 12px;
  }
  .panel-card, .panel-card-white {
    padding: 16px 12px;
  }
  .segmented-control {
    grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
  }
  .seg-btn {
    padding: 6px 2px;
    font-size: 10px;
  }
  .modal-tabs {
    grid-template-columns: 1fr;
  }
  .support-widget-float span {
    display: none;
  }
  .support-widget-float {
    padding: 10px 12px;
    border-radius: 50%;
  }
}