:root {
  --brand-dark: #1a2742;
  --brand-light: #e8f4fd;
  --text-muted: #6c757d;
  --card-border: #dbe4ef;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f7f9fc;
  color: #1c2636;
}

.site-header {
  background: var(--brand-dark);
}

.navbar-brand,
.navbar-brand:hover,
.navbar-brand:focus,
.site-header .nav-link,
.site-header .nav-link:hover,
.site-header .nav-link:focus {
  color: #fff;
}

.logo-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.main-content {
  min-height: 60vh;
}

.hero-card,
.action-card,
.ip-card,
.tool-card,
.warning-card,
.steps-card,
.brand-card,
.search-card {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: #fff;
}

.hero-card {
  background: var(--brand-light);
}

.wrong-ip-item {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.875rem 1rem;
  background: #fff;
  min-height: 56px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;
}

.credential-box {
  background: #fff;
  border: 1px solid #cfe0f5;
  border-radius: 10px;
}

.access-quick-card {
  background: #f8fff9;
  border: 1px solid #d7f0dd;
  border-left: 4px solid #198754;
  border-radius: 10px;
  padding: 1rem;
}

.access-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.access-field {
  background: #fff;
  border: 1px solid #d8e8dd;
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
}

.access-label {
  font-size: 0.78rem;
  color: #5f6f66;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.access-value {
  font-weight: 700;
  color: #1c2636;
}

.access-note {
  margin-top: 0.75rem;
  color: #5f6f66;
  font-size: 0.95rem;
}

.ip-large {
  font-size: 1.7rem;
  font-weight: 700;
}

.ip-tool-card .ip-large {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
}

.ip-highlight-box {
  background: #f0f4ff;
  border-radius: 8px;
  padding: 10px 16px;
  position: relative;
  z-index: 1;
}

.ip-meta {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #6c757d;
  position: relative;
  z-index: 1;
}

.ip-tool-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.ip-tool-actions a {
  font-weight: 600;
}

.tools-equal-row {
  align-items: stretch;
}

.tools-equal-row > [class*="col-"] {
  display: flex;
  align-items: stretch;
}

.ip-tool-card {
  position: relative;
  overflow: hidden;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ip-tool-top {
  position: relative;
  z-index: 1;
}

.ip-tool-subtitle {
  font-size: 0.875rem;
  color: #6c757d;
}

.ip-tool-icon {
  width: 22px;
  height: 22px;
  color: #495057;
  display: inline-block;
  margin-bottom: 0.45rem;
}

.ip-tool-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.ip-tool-card-bg {
  position: absolute;
  top: -38px;
  right: -34px;
  width: 190px;
  height: 190px;
  color: #1a2742;
  opacity: 0.06;
  z-index: 0;
  pointer-events: none;
}

.brand-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  background: #fff;
  color: #1c2636;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  width: 100%;
  text-align: center;
  min-height: 60px;
}

.brand-pill:hover {
  background: #f8f9fa;
  color: #1c2636;
}

.brand-grid .col {
  display: flex;
}

.byline {
  color: var(--text-muted);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.byline-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(145deg, #b9c8dd, #dbe6f3);
  display: inline-block;
}

.breadcrumb-wrap {
  background: #eef2f7;
  border-bottom: 1px solid #dbe3ee;
}

.breadcrumb {
  margin-bottom: 0;
  padding: 0.75rem 0;
  font-size: 0.92rem;
}

.site-footer {
  background: var(--brand-dark);
  color: #fff;
}

.site-footer a {
  color: #d3e4ff;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom-legal {
  text-align: center;
}

.footer-bottom-legal a {
  font-weight: 600;
}

.table-search {
  max-width: 420px;
}

.qr-output canvas,
.qr-output img {
  max-width: 220px;
  width: 100%;
  height: auto;
  padding: 0.5rem;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
}

.copy-btn {
  white-space: nowrap;
}

article h2 {
  margin-top: 2rem;
}

article h2,
article h3 {
  margin-bottom: 1rem;
}

article h3 {
  margin-top: 1.75rem;
}

article p,
article ul,
article ol {
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

article li {
  margin-bottom: 0.5rem;
}

.typo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.wrong-ip-code {
  color: #dc3545;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95rem;
}

.wrong-ip-item a {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
}

.wrong-ip-item a:hover {
  text-decoration: underline;
}

.article-wrap {
  background: #f8f9fa;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.article-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6c757d;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.free-tool-card-clickable {
  cursor: pointer;
  transition: 0.2s;
}

.free-tool-card-clickable:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.free-tool-card-clickable:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* Hover state for repeated inline-card groups (safe selector) */
main .row.g-3 > [class*="col-"] > a[style*="border-radius:10px"]:hover,
main .row.g-3 > [class*="col-"] > div[style*="border-radius:10px"][style*="border:1px solid #e9ecef"]:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (min-width: 992px) {
  .ip-large {
    font-size: 2rem;
  }
}

@media (max-width: 767.98px) {
  .access-fields {
    grid-template-columns: 1fr;
  }

  .ip-tool-card .ip-large {
    font-size: 1.4rem;
  }

  .ip-tool-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 991.98px) {
  .site-footer .row > [class*="col-"] {
    text-align: center;
  }
}

/* Keep ad placeholders in markup but hide them globally */
.adsense-placeholder {
  display: none !important;
}

/* Accessibility contrast hardening */
.breadcrumb a {
  color: #334155 !important;
}

.byline,
.byline span {
  color: #334155 !important;
}

.article-label {
  color: #334155 !important;
}

.btn-outline-secondary {
  color: #334155 !important;
  border-color: #334155 !important;
  background: #ffffff !important;
}

.free-tool-card-clickable a,
[data-free-tool-card] a,
[data-related-card] a {
  color: #0a58ca !important;
}

/* Final contrast fixes from full-site axe crawl */
.btn-outline-primary {
  color: #0a58ca !important;
  border-color: #0a58ca !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  color: #ffffff !important;
  background-color: #0a58ca !important;
  border-color: #0a58ca !important;
}

.text-muted a {
  color: #0a58ca !important;
}
