/* GopherIP. Developed by Michael H Lampkin. Copyright 2000-2026. All rights reserved. */
@font-face { font-family: "Baloo 2"; font-weight: 600; font-display: swap; src: url(/fonts/baloo2-600.woff2) format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url(/fonts/baloo2-800.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/fonts/inter-400.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/fonts/inter-600.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-display: swap; src: url(/fonts/jetbrainsmono-700.woff2) format("woff2"); }

:root {
  --sand: #FFF4DF; --dirt: #3B2414; --sub: #6B4A2E; --orange: #FF9A2E; --orange-d: #E07A10;
  --teal: #0F766E; --line: #EAD7B8; --card: #FFFFFF; --code: #FBF3E6;
  --head: "Baloo 2", system-ui, sans-serif; --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sand); color: var(--dirt); font: 16px/1.6 var(--body); }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: #0B5A54; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 5vw, 40px); }
h2 { font-size: 22px; }
h3 { font-size: 18px; font-weight: 600; margin-top: 1.2em; }
p { margin: 0 0 1em; }
code, pre, .mono { font-family: var(--mono); }
code { font-size: .92em; background: var(--code); padding: 1px 5px; border-radius: 5px; }
pre { background: #2B1A10; color: #FFE7C2; padding: 12px 14px; border-radius: 10px; overflow-x: auto; margin: 0 0 1em; font-size: 14px; line-height: 1.5; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--head); font-weight: 600; }
.wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--sub); }
.small { font-size: 14px; }
.big { font-family: var(--head); font-size: 24px; font-weight: 600; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* Header and footer */
.site-header { border-bottom: 2px solid var(--line); background: var(--sand); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--dirt); }
.brand img { width: 44px; height: 44px; }
.wordmark { font-family: var(--head); font-weight: 800; font-size: 26px; line-height: 1; }
.wordmark span { color: var(--orange-d); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { font-family: var(--head); font-weight: 600; font-size: 16px; color: var(--dirt); text-decoration: none; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { background: #FBE6C6; }
.nav a.on { background: var(--dirt); color: #fff; }
main.wrap { padding-top: 24px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 20px; }
.site-footer { border-top: 2px solid var(--line); padding: 20px 0 32px; font-size: 14px; color: var(--sub); }
.footer-row nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.footer-row p { margin: 0 0 8px; }

/* Cards and panels */
.panel, .card { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 20px; }
.panel > :last-child, .card > :last-child { margin-bottom: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }

/* Hero: small Dig, the IP is the star */
.hero { display: flex; align-items: center; gap: 14px; }
.stage { position: relative; flex: 0 0 auto; width: clamp(110px, 20vw, 170px); }
.dig { display: block; width: 100%; height: auto; transform-origin: 50% 92%; }
.page-dig { width: 96px; height: auto; flex: 0 0 auto; }
.ipcard { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.label { font-family: var(--head); font-weight: 600; color: var(--sub); font-size: 17px; }
.ip { font-family: var(--mono); font-weight: 700; font-size: clamp(26px, 5.5vw, 44px); line-height: 1.15; overflow-wrap: anywhere; border-radius: 6px; margin: 0; }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.meta { font-size: 14px; color: var(--sub); }
.toast { font-family: var(--head); font-weight: 600; color: var(--teal); font-size: 16px; }
.hero-small .page-dig { width: 90px; }
.page-head { display: flex; align-items: center; gap: 14px; }
.page-head h1 { margin-bottom: 4px; }
.lede { font-size: 18px; color: var(--sub); }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: none; border-radius: 12px; background: var(--orange); color: #2B1A10; font: 800 18px var(--head); text-decoration: none; cursor: pointer; }
.btn:hover { background: #FF8A0F; color: #2B1A10; }
.btn-small { min-height: 36px; padding: 0 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--dirt); font: 600 14px var(--head); cursor: pointer; }
.btn-small:hover { border-color: var(--orange); }
.lookup-form { display: flex; gap: 10px; flex-wrap: wrap; }
.lookup-form input { flex: 1 1 260px; min-width: 0; min-height: 50px; padding: 0 14px; border: 2px solid var(--line); border-radius: 12px; font: 700 18px var(--mono); color: var(--dirt); background: #fff; }
.form { display: flex; flex-direction: column; gap: 8px; max-width: 620px; }
.form label { font-weight: 600; margin-top: 6px; }
.form input, .form textarea { width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; font: 16px var(--body); color: var(--dirt); background: #fff; }
.form .btn { align-self: flex-start; margin-top: 10px; }
.hp { position: absolute; left: -9999px; }
.alert { background: #FFE9E3; border: 2px solid #F3B9A8; color: #7A2414; padding: 10px 14px; border-radius: 12px; margin: 0; }

/* Details */
.details { margin: 0 0 12px; display: grid; gap: 10px; }
.details div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.details div:last-child { border-bottom: none; }
.details dt { font-family: var(--head); font-weight: 600; color: var(--sub); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.details .mono { font-size: 14px; }
@media (max-width: 480px) { .details div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.pill { display: inline-block; padding: 0 8px; border-radius: 999px; font: 600 13px var(--head); background: #E7F3F1; color: var(--teal); margin-right: 4px; }
.pill-private, .pill-reserved, .pill-loopback { background: #FBE6C6; color: var(--sub); }

/* Snippets */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.tabs [role="tab"] { min-height: 36px; padding: 0 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--dirt); font: 600 14px var(--head); cursor: pointer; }
.tabs [aria-selected="true"] { background: var(--dirt); border-color: var(--dirt); color: #fff; }
.snippet pre { white-space: pre-wrap; word-break: break-all; }

/* Guides and prose */
.prose { font-size: 17px; }
.prose h2 { margin-top: 1.3em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.guide h1 { margin-bottom: .4em; }
.crumbs { font-size: 14px; color: var(--sub); }
.guide-links { padding-left: 1.2em; }
.guide-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .guide-cards { grid-template-columns: minmax(0, 1fr); } }
.guide-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--dirt); height: 100%; }
.guide-card strong { font-family: var(--head); font-size: 19px; }
.guide-card:hover { border-color: var(--orange); }
.addr-list { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.ad { min-height: 90px; }

/* Stats */
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 720px) { .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 4px; }
.tile strong { font-family: var(--head); font-size: 30px; }
.stats-table td.num { text-align: right; font-family: var(--mono); }
.bar-col { width: 30%; }
.bar { display: block; height: 10px; background: var(--orange); border-radius: 5px; }
.on[aria-current] { font-weight: 700; }
.message { border-bottom: 1px solid var(--line); padding: 8px 0; }

/* Dig's moves */
.clod { position: absolute; width: 7%; left: 45%; top: 82%; opacity: 0; pointer-events: none; }
.dig.rise { animation: rise 750ms cubic-bezier(.25,.9,.35,1.25) both; }
@keyframes rise { 0% { transform: translateY(18%) scale(.96); opacity: 0; } 60% { transform: translateY(-3%); opacity: 1; } 100% { transform: none; } }
.dig.idle { animation: idle 4s ease-in-out infinite; }
@keyframes idle { 0%, 100% { transform: none; } 35% { transform: rotate(-1.5deg); } 70% { transform: rotate(1.2deg); } }
.dig.hop { animation: hop 600ms cubic-bezier(.3,1.4,.5,1) both; }
@keyframes hop { 0% { transform: none; } 35% { transform: translateY(-7%) rotate(-2deg); } 65% { transform: translateY(0) rotate(1.5deg); } 100% { transform: none; } }
.clod.fly { animation: fly 800ms cubic-bezier(.2,.7,.4,1) forwards; }
@keyframes fly { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); } }
.ip.flash { animation: flash 600ms ease-out; }
@keyframes flash { 0% { background: #FFE2BF; } 100% { background: transparent; } }

@media (max-width: 520px) {
  .wordmark { font-size: 22px; }
  .brand img { width: 36px; height: 36px; }
  .hero { gap: 8px; }
  .panel, .card { padding: 16px; }
  .page-dig { width: 72px; }
}
@media (prefers-reduced-motion: reduce) { .dig, .clod, .ip { animation: none !important; } }
