@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800&family=Quicksand:wght@400;500;600;700&display=swap');

:root {
  --bg0: #fff9f5;
  --bg1: #fff3eb;
  --surface: #ffffff;
  --input: #ffffff;
  --border: #ffe4d6;
  --text: #2d3436;
  --muted: #5c6568;
  --accent: #ff9f5a;
  --accent-2: #ff9f5a;
  --accent-soft: #fff1e4;
  --accent-ink: #2d3436;
  --mint: #067a5c;
  --pink: #c73b6f;
  --danger: #b42318;
  --radius: 24px;
  --font: 'Quicksand', 'Nunito', system-ui, sans-serif;
  --display: 'Nunito', 'Quicksand', sans-serif;
  --shadow: 6px 6px 0 rgba(255, 140, 66, 0.16);
  --header: rgba(255, 249, 245, 0.94);
  --max: 1120px;
}

html[data-theme='dark'] {
  --bg0: #1c1614;
  --bg1: #2a1e18;
  --surface: #2c221c;
  --input: #241c18;
  --border: #5c4034;
  --text: #fff6ee;
  --muted: #e7d5c8;
  --accent: #ff9f5a;
  --accent-2: #ff9f5a;
  --accent-soft: rgba(255, 159, 90, 0.18);
  --accent-ink: #1c1614;
  --mint: #5eecc4;
  --pink: #ff8ab3;
  --danger: #ff8b80;
  --shadow: 6px 6px 0 rgba(0, 0, 0, 0.35);
  --header: rgba(28, 22, 20, 0.94);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(820px 380px at 0% -8%, rgba(255, 140, 66, 0.2), transparent 62%),
    radial-gradient(640px 320px at 100% 0%, rgba(255, 107, 157, 0.14), transparent 58%),
    radial-gradient(520px 280px at 78% 18%, rgba(6, 214, 160, 0.1), transparent 55%),
    var(--bg0);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: var(--header);
  border-bottom: 3px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  flex-wrap: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: 0.02em;
}

.brand img,
.brand .brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

.brand .brand-logo-dark {
  display: none;
}

html[data-theme='dark'] .brand.has-dark-logo .brand-logo-light {
  display: none;
}

html[data-theme='dark'] .brand.has-dark-logo .brand-logo-dark {
  display: block;
}

.brand.has-logo {
  gap: 0;
}

.ad-slot {
  margin: 1rem auto;
  width: min(100% - 2rem, var(--max));
}

.ad-slot img,
.ad-slot iframe {
  max-width: 100%;
}

.brand span {
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.nav a:hover {
  color: var(--text);
}

.hero {
  padding: 3.6rem 0 2.2rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  margin: 0 0 0.75rem;
  animation: rise 0.7s ease both;
}

.hero p {
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 auto;
  animation: rise 0.8s 0.08s ease both;
}

.section {
  padding: 2rem 0 4rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ff9f5a;
  margin: 0 0 1.25rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.2rem 1.25rem;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  animation: rise 0.55s ease both;
}

.tool-card:hover {
  border-color: var(--accent-2);
  background: var(--accent-soft);
  box-shadow: 8px 8px 0 rgba(255, 140, 66, 0.22);
}

.tool-card h2,
.tool-card-title {
  margin: 0;
  font-size: 1.15rem;
}

.tool-card-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}

.badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2d3436;
  border: 0;
  background: #ff9f5a;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.page-hero {
  padding: 2.8rem 0 1.25rem;
}

.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 0.5rem;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
}

.panel {
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.panel + .panel,
.panel + .info-box {
  margin-top: 1rem;
}

.info-box {
  color: var(--muted);
  font-size: 0.95rem;
}

.info-box p {
  margin-top: 0;
}

label {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type='text'],
input[type='email'],
input[type='url'],
input[type='search'],
input[type='number'],
input[type='password'],
input[type='color'],
textarea,
select {
  width: 100%;
  border: 3px solid var(--border);
  background: var(--input);
  color: var(--text);
  border-radius: 16px;
  padding: 0.75rem 0.95rem;
  font: inherit;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.row > * {
  flex: 1 1 180px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 3px solid rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 0.7rem 1.2rem;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  background: #ff9f5a;
  color: #2d3436;
  min-height: 44px;
  box-shadow: 4px 4px 0 rgba(255, 159, 90, 0.55);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: #ffb56f;
  color: #2d3436;
  box-shadow: 4px 4px 0 rgba(255, 159, 90, 0.7);
}

.btn.secondary {
  background: var(--surface);
  color: #2d3436;
  border: 3px solid #ff9f5a;
  box-shadow: 4px 4px 0 rgba(255, 159, 90, 0.35);
}

.btn.secondary:hover {
  background: #ff9f5a;
  color: #2d3436;
}

html[data-theme='dark'] .btn {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: rgba(255, 246, 238, 0.2);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.result {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  word-break: break-word;
}

.result.error {
  background: rgba(255, 107, 107, 0.08);
  border-color: rgba(255, 107, 107, 0.35);
}

.radio-group {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--text);
  cursor: pointer;
}

.site-footer {
  margin-top: 3rem;
  border-top: 3px solid var(--border);
  padding: 2.5rem 0 2rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.footer-grid h3 {
  margin: 0 0 0.65rem;
  color: var(--text);
  font-size: 0.95rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.footer-grid a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 3px solid var(--border);
  padding-top: 1rem;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
}

.footer-legal a {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: underline;
}

.copyright {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 3px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  box-shadow: 3px 3px 0 rgba(255, 140, 66, 0.16);
}

.social-links a:hover {
  border-color: var(--accent-2);
  background: var(--accent-soft);
  color: var(--accent);
}

.social-links svg {
  width: 20px;
  height: 20px;
  display: block;
}

.related {
  margin-top: 2rem;
}

.related h2 {
  font-size: 1rem;
  margin: 0 0 0.85rem;
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0 3rem;
}

.admin-nav {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.admin-nav a {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: var(--muted);
}

.admin-nav a.active,
.admin-nav a:hover {
  background: var(--surface);
  color: var(--text);
}

.login-box {
  max-width: 400px;
  margin: 4rem auto;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.7rem;
  border-radius: 16px;
  border: 3px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.lang-menu {
  position: relative;
}

.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 30;
  min-width: 190px;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.lang-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
}

.lang-list a[aria-current='true'],
.lang-list a:hover {
  background: var(--accent-soft);
}

.flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--border);
  flex: none;
}

html:not([data-theme='dark']) .icon-sun,
html[data-theme='dark'] .icon-moon {
  display: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.hp {
  position: absolute;
  left: -9999px;
}

table {
  width: 100%;
  border-collapse: collapse;
}
table td {
  padding: .4rem .5rem;
  border-bottom: 1px solid var(--border);
}

.tool-subhead {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

.result-rows .result-row,
.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.25rem 0;
}

.copy-row input {
  margin: 0;
}

.pct-tool {
  display: grid;
  gap: 1rem;
}

.pct-block {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}

.pct-label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
}

.pct-label small {
  color: var(--muted);
}

.pct-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.pct-row input,
.pct-row select {
  width: auto;
  min-width: 90px;
  margin: 0;
}

.char-count {
  margin-top: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.char-count.ok { color: #3dd6c6; }
.char-count.bad { color: var(--danger); }

.color-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
}

.color-chart {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
}

.swatch {
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
}

.color-list {
  display: grid;
  gap: 0.5rem;
}

.color-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.swatch-preview {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}

.qr-wrap {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.mockup-display {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 1rem;
  overflow-x: auto;
}

.device {
  text-align: center;
}

.device > span {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.device .trim {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #111;
  overflow: hidden;
  height: 280px;
}

.device iframe {
  border: 0;
  transform-origin: top left;
  background: #fff;
}

.device.mobile iframe { width: 375px; height: 667px; transform: scale(0.22); }
.device.tablet iframe { width: 768px; height: 1024px; transform: scale(0.18); }
.device.laptop iframe { width: 1280px; height: 800px; transform: scale(0.16); }
.device.desktop iframe { width: 1440px; height: 900px; transform: scale(0.15); }

.device.mobile .trim,
.device.tablet .trim,
.device.laptop .trim,
.device.desktop .trim {
  display: flex;
  justify-content: center;
}

.ads-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1.5rem;
}

.ads-form {
  display: grid;
  gap: 0.75rem;
}

.field-count {
  position: relative;
}

.field-count em {
  float: right;
  font-style: normal;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 400;
}

.count-char {
  position: absolute;
  right: 0.75rem;
  bottom: 0.7rem;
  font-size: 0.8rem;
  color: var(--muted);
  pointer-events: none;
}

.count-char.over { color: var(--danger); }

.ad-card {
  font-family: Arial, sans-serif;
  background: #fff;
  color: #202124;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 0.75rem;
  max-width: 600px;
}

.ad-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #188038;
  color: #188038;
  border-radius: 3px;
  padding: 0 4px;
  margin-right: 6px;
}

.ad-url {
  display: inline;
  font-size: 12px;
  color: #202124;
}

.ad-title {
  color: #1a0dab;
  font-size: 18px;
  margin-top: 4px;
  line-height: 1.3;
}

.ad-desc {
  color: #4d5156;
  font-size: 13px;
  margin-top: 4px;
}

.rank-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
}

.ping-result {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}

.ping-line {
  display: block;
  padding: 0.15rem 0;
  color: var(--muted);
}

.ping-line-strong {
  color: var(--accent);
  font-weight: 600;
}

.muted { color: var(--muted); margin-top: 0.4rem; }

@media (max-width: 900px) {
  .color-layout,
  .ads-layout,
  .mockup-display {
    grid-template-columns: 1fr;
  }
}

.home-search {
  position: relative;
  margin: 1.5rem auto 0;
  width: min(100%, 820px);
}

.home-search svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--muted);
}

.home-search input {
  min-height: 52px;
  padding-left: 2.8rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 92px;
  padding: 0.75rem 0.4rem;
  border-radius: 20px;
  border: 3px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(255, 140, 66, 0.12);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.cat-btn svg {
  width: 26px;
  height: 26px;
  color: #ff9f5a;
}

.cat-btn.is-active,
.cat-btn:hover {
  border-color: #ff9f5a;
  background: #fff1e4;
}

.cat-btn.is-active {
  background: #ff9f5a;
  color: #2d3436;
}

.cat-btn.is-active svg {
  color: #2d3436;
}

.tool-card .card-icon {
  width: 22px;
  height: 22px;
  color: #ff9f5a;
}

.empty-note {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.star-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.star-btn.is-on {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}

.tool-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-list {
  display: grid;
  gap: 0.85rem;
  max-width: 640px;
  margin-inline: auto;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 3px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
}

.contact-card svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex: none;
}

.contact-card strong {
  display: block;
  font-family: var(--display);
}

.contact-card span {
  color: var(--muted);
  word-break: break-all;
}

.cms-body {
  color: var(--text);
  font-size: 1.02rem;
}

.cms-body h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 1.35rem 0 0.4rem;
}

.cms-body p,
.cms-body li {
  line-height: 1.65;
}

.cms-body ul {
  margin: 0.4rem 0 0.8rem;
  padding-left: 1.2rem;
}

.cms-body a {
  color: var(--accent);
  text-decoration: underline;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0.8rem 0;
}

.check-row label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--text);
  cursor: pointer;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.stat-grid div {
  border: 3px solid #ffd7b8;
  border-radius: 16px;
  padding: 0.75rem 0.8rem;
  background: #fff6ee;
}

.stat-grid strong {
  display: block;
  font-family: var(--display);
  font-size: 1.35rem;
  color: #2d3436;
}

html[data-theme='dark'] .stat-grid div {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme='dark'] .stat-grid strong {
  color: var(--text);
}

.density-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}

.density-table td {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.ip-lookup-map {
  height: 320px;
  width: 100%;
  border-radius: var(--radius);
  margin-top: 1rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

.ip-lookup-map .maplibregl-map,
.ip-lookup-map .maplibregl-canvas {
  width: 100%;
  height: 100%;
}

.ip-lookup-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.ip-lookup-table th {
  text-align: left;
  padding: 0.4rem 0.75rem 0.4rem 0;
  vertical-align: top;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 600;
}

.ip-lookup-table td {
  padding: 0.4rem 0;
}

.ip-label {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-right: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.ip-lookup-attribution {
  margin-top: 1.25rem;
  font-size: 0.85rem;
}

.ip-lookup-query-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.ip-lookup-query-row #ip-query {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.ip-lookup-query-row #btn {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 768px) {
  body {
    overflow-x: clip;
  }

  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand tools"
      "nav nav";
    align-items: center;
    gap: 0.65rem 0.5rem;
  }

  .brand {
    grid-area: brand;
    min-width: 0;
  }

  .header-tools {
    grid-area: tools;
    justify-self: end;
  }

  .header-nav {
    grid-area: nav;
    width: 100%;
  }

  .tool-card-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.5rem;
    row-gap: 0;
  }

  .tool-card-top .card-icon {
    grid-column: 1;
    grid-row: 1;
  }

  .tool-card-top .tool-card-title {
    grid-column: 2;
    grid-row: 1;
    font-weight: 700;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .tool-card-top .badge {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    margin: 0;
    white-space: nowrap;
  }

}

@media (max-width: 800px) {
  .cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .social-links {
    margin-left: 0;
  }
}
