.ip-toolkit-page {
  --ip-card: rgba(12, 20, 36, 0.9);
  --ip-card-soft: rgba(255, 255, 255, 0.045);
  --ip-border: rgba(148, 163, 184, 0.18);
  --ip-border-strong: rgba(148, 163, 184, 0.3);
  --ip-text: #ecf7ff;
  --ip-soft: #bdd0e8;
  --ip-muted: #8fa4c2;
  --ip-cyan: #38bdf8;
  --ip-teal: #2dd4bf;
  --ip-green: #22c55e;
  --ip-amber: #f59e0b;
  --ip-red: #ef4444;
  color: var(--ip-text);
}

.ip-toolkit-page .breadcrumbs {
  margin-bottom: 16px;
}

.ip-hero {
  margin-top: 10px;
}

.ip-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.82fr);
  gap: 20px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid var(--ip-border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.13), transparent 44%),
    linear-gradient(180deg, rgba(13, 24, 43, 0.98), rgba(7, 13, 25, 0.92));
  box-shadow: var(--shadow-lg);
}

.ip-hero-copy {
  min-width: 0;
}

.ip-hero-copy h1 {
  margin: 16px 0 0;
  max-width: 780px;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.ip-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ip-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid var(--ip-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ip-soft);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.ip-badge.is-info {
  border-color: rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.13);
  color: #dff8ff;
}

.ip-badge.is-success {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.12);
  color: #dcfce7;
}

.ip-badge.is-warning {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.13);
  color: #fef3c7;
}

.ip-badge.is-danger {
  border-color: rgba(239, 68, 68, 0.36);
  background: rgba(239, 68, 68, 0.14);
  color: #fee2e2;
}

.ip-hero-result {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.12), transparent 52%),
    rgba(2, 6, 23, 0.5);
}

.ip-hero-label,
.ip-last-checked {
  color: var(--ip-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ip-hero-address {
  display: block;
  min-width: 0;
  color: #fff;
  font-size: clamp(27px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.ip-hero-result p {
  margin: 0;
  color: var(--ip-soft);
  line-height: 1.62;
}

.ip-action-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ip-tool-section {
  padding-top: 24px;
}

.ip-tabs {
  position: sticky;
  top: 86px;
  z-index: 18;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--ip-border);
  border-radius: 18px;
  background: rgba(4, 8, 18, 0.88);
  backdrop-filter: blur(16px);
}

.ip-tab {
  appearance: none;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ip-soft);
  font-size: 13px;
  font-weight: 800;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.ip-tab:hover {
  transform: translateY(-1px);
  border-color: var(--ip-border);
  color: #fff;
}

.ip-tab[aria-selected="true"] {
  border-color: rgba(56, 189, 248, 0.24);
  background: rgba(56, 189, 248, 0.13);
  color: #e0f7ff;
}

.ip-tab:focus-visible,
.ip-toolkit-page .btn:focus-visible,
.ip-example:focus-visible,
.ip-map-link:focus-visible,
.ip-faq-item summary:focus-visible,
.ip-details-disclosure summary:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.42);
  outline-offset: 3px;
}

.ip-tab-panels {
  margin-top: 18px;
}

.ip-tab-panel {
  padding: 22px;
  border: 1px solid var(--ip-border);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(11, 19, 35, 0.92), rgba(9, 16, 30, 0.84));
  box-shadow: var(--shadow-md);
}

.ip-section-heading,
.ip-result-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ip-section-heading h2,
.ip-result-toolbar h3,
.ip-map-card h3,
.ip-history-card h3 {
  margin: 0;
  font-size: clamp(22px, 2.3vw, 30px);
  letter-spacing: -0.035em;
}

.ip-section-heading p,
.ip-result-toolbar p,
.ip-map-card p,
.ip-history-card p {
  margin: 8px 0 0;
  color: var(--ip-soft);
  line-height: 1.65;
}

.ip-address-grid,
.ip-leak-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.ip-address-card,
.ip-leak-card,
.ip-map-card,
.ip-history-card,
.ip-education-card,
.ip-faq-item {
  border: 1px solid var(--ip-border);
  border-radius: 18px;
  background: var(--ip-card-soft);
}

.ip-address-card,
.ip-leak-card {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.ip-address-card span,
.ip-leak-card span {
  color: var(--ip-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ip-address-card strong,
.ip-leak-card strong {
  color: #fff;
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ip-address-card small,
.ip-leak-card p {
  margin: 0;
  color: var(--ip-soft);
  line-height: 1.55;
}

.ip-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.ip-detail-item {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--ip-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.ip-detail-label {
  display: block;
  color: var(--ip-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ip-detail-value {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ip-detail-note {
  display: block;
  margin-top: 6px;
  color: var(--ip-muted);
  font-size: 13px;
  line-height: 1.45;
}

.ip-note,
.ip-dns-status {
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 18px;
  background: rgba(56, 189, 248, 0.08);
}

.ip-note strong {
  display: block;
  color: #ecfeff;
}

.ip-note p,
.ip-dns-status {
  color: var(--ip-soft);
  line-height: 1.68;
}

.ip-note p {
  margin: 8px 0 0;
}

.ip-lookup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-top: 18px;
}

.ip-field-error {
  min-height: 20px;
  margin: 0;
  color: #fecaca;
  font-size: 13px;
  line-height: 1.45;
}

.ip-example-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.ip-example {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--ip-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ip-soft);
  font-size: 13px;
  font-weight: 800;
}

.ip-example:hover {
  border-color: rgba(56, 189, 248, 0.32);
  color: #fff;
}

.ip-lookup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 16px;
  margin-top: 18px;
}

.ip-lookup-results,
.ip-map-card,
.ip-history-card {
  min-width: 0;
}

.ip-map-card,
.ip-history-card {
  padding: 18px;
}

.ip-map-placeholder {
  display: grid;
  place-items: center;
  min-height: 260px;
  margin-top: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.34);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.08), transparent 52%),
    rgba(2, 6, 23, 0.36);
  color: var(--ip-muted);
  overflow: hidden;
}

.ip-map-link {
  display: inline-flex;
  margin-top: 12px;
  color: #9ee8ff;
  font-size: 13px;
  font-weight: 800;
}

.ip-history-card {
  margin-top: 18px;
}

.ip-history-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  color: var(--ip-soft);
}

.ip-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ip-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.ip-history-item button {
  min-width: 0;
  border: 0;
  background: transparent;
  color: #9ee8ff;
  font-weight: 800;
  text-align: left;
  overflow-wrap: anywhere;
}

.ip-history-item span {
  color: var(--ip-muted);
  font-size: 12px;
  white-space: nowrap;
}

.ip-details-disclosure {
  margin-top: 18px;
  border: 1px solid var(--ip-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.ip-details-disclosure summary {
  cursor: pointer;
  padding: 15px 16px;
  color: #dff8ff;
  font-weight: 800;
}

.ip-details-disclosure pre {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--ip-soft);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ip-education-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.ip-education-card {
  padding: 18px;
}

.ip-education-card h3 {
  margin: 0;
  color: #fff;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.ip-education-card p {
  margin: 9px 0 0;
  color: var(--ip-soft);
  line-height: 1.7;
}

.ip-faq-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.ip-faq-item {
  padding: 0;
}

.ip-faq-item summary {
  cursor: pointer;
  padding: 16px 18px;
  color: #fff;
  font-weight: 850;
  line-height: 1.45;
}

.ip-faq-item p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--ip-soft);
  line-height: 1.7;
}

.ip-related-section {
  padding-top: 0;
}

.ip-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.ip-related-grid a {
  padding: 14px 16px;
  border: 1px solid var(--ip-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: #dff8ff;
  font-weight: 800;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.ip-related-grid a:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.32);
  background: rgba(56, 189, 248, 0.1);
}

.ip-toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.ip-toast {
  padding: 13px 15px;
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 16px;
  background: rgba(7, 13, 25, 0.96);
  color: #ecfeff;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
}

.ip-toast.is-success {
  border-color: rgba(34, 197, 94, 0.34);
}

.ip-toast.is-warning {
  border-color: rgba(245, 158, 11, 0.38);
}

.ip-toast.is-danger {
  border-color: rgba(239, 68, 68, 0.38);
}

.is-loading {
  position: relative;
  color: transparent !important;
}

.is-loading::after {
  content: "";
  position: absolute;
  inset: 4px 0;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07));
  background-size: 220% 100%;
  animation: ip-shimmer 1.2s ease-in-out infinite;
}

body.ip-light-theme .ip-toolkit-page {
  --ip-card: rgba(255, 255, 255, 0.94);
  --ip-card-soft: rgba(15, 23, 42, 0.045);
  --ip-border: rgba(15, 23, 42, 0.14);
  --ip-border-strong: rgba(15, 23, 42, 0.24);
  --ip-text: #0f172a;
  --ip-soft: #334155;
  --ip-muted: #64748b;
  color: var(--ip-text);
}

body.ip-light-theme .ip-toolkit-page .ip-hero-card,
body.ip-light-theme .ip-toolkit-page .ip-tab-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.96));
}

body.ip-light-theme .ip-toolkit-page .ip-tabs {
  background: rgba(248, 250, 252, 0.92);
}

body.ip-light-theme .ip-toolkit-page .ip-hero-result,
body.ip-light-theme .ip-toolkit-page .ip-address-card,
body.ip-light-theme .ip-toolkit-page .ip-leak-card,
body.ip-light-theme .ip-toolkit-page .ip-map-card,
body.ip-light-theme .ip-toolkit-page .ip-history-card,
body.ip-light-theme .ip-toolkit-page .ip-education-card,
body.ip-light-theme .ip-toolkit-page .ip-faq-item,
body.ip-light-theme .ip-toolkit-page .ip-detail-item,
body.ip-light-theme .ip-toolkit-page .ip-details-disclosure,
body.ip-light-theme .ip-toolkit-page .ip-related-grid a {
  background: rgba(255, 255, 255, 0.72);
}

body.ip-light-theme .ip-toolkit-page .ip-hero-copy h1,
body.ip-light-theme .ip-toolkit-page .ip-hero-address,
body.ip-light-theme .ip-toolkit-page .ip-address-card strong,
body.ip-light-theme .ip-toolkit-page .ip-leak-card strong,
body.ip-light-theme .ip-toolkit-page .ip-detail-value,
body.ip-light-theme .ip-toolkit-page .ip-section-heading h2,
body.ip-light-theme .ip-toolkit-page .ip-result-toolbar h3,
body.ip-light-theme .ip-toolkit-page .ip-map-card h3,
body.ip-light-theme .ip-toolkit-page .ip-history-card h3,
body.ip-light-theme .ip-toolkit-page .ip-education-card h3,
body.ip-light-theme .ip-toolkit-page .ip-faq-item summary {
  color: #0f172a;
}

@keyframes ip-shimmer {
  0% {
    background-position: 120% 0;
  }

  100% {
    background-position: -120% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ip-toolkit-page *,
  .ip-toolkit-page *::before,
  .ip-toolkit-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1080px) {
  .ip-hero-card,
  .ip-lookup-layout {
    grid-template-columns: 1fr;
  }

  .ip-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ip-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .ip-tabs {
    top: 74px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .ip-tab {
    flex: 0 0 auto;
  }

  .ip-hero-card,
  .ip-tab-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .ip-address-grid,
  .ip-leak-summary,
  .ip-detail-grid,
  .ip-education-grid,
  .ip-related-grid {
    grid-template-columns: 1fr;
  }

  .ip-section-heading,
  .ip-result-toolbar {
    display: grid;
  }

  .ip-lookup-form {
    grid-template-columns: 1fr;
  }

  .ip-history-item {
    align-items: flex-start;
    display: grid;
  }

  .ip-history-item span {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .ip-hero-card,
  .ip-tab-panel {
    padding: 16px;
  }

  .ip-action-grid {
    grid-template-columns: 1fr;
  }

  .ip-hero-copy h1 {
    font-size: clamp(27px, 8vw, 34px);
  }

  .ip-hero-address {
    font-size: clamp(24px, 7.5vw, 32px);
  }

  .ip-map-placeholder {
    min-height: 220px;
  }
}

@media print {
  .site-header,
  .footer,
  .ip-tabs,
  .ip-action-grid,
  .button-row,
  .ip-example-row,
  .ip-map-card,
  .ip-related-section {
    display: none !important;
  }

  body,
  .site-shell,
  .ip-toolkit-page {
    background: #fff !important;
    color: #111827 !important;
  }

  .ip-tab-panel,
  .ip-hero-card,
  .ip-address-card,
  .ip-detail-item,
  .ip-note,
  .ip-details-disclosure {
    border-color: #cbd5e1 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .ip-tab-panel[hidden] {
    display: block !important;
  }
}
