:root {
    --paper: #f6f1e8;
    --paper-deep: #ebe4d7;
    --white: #fffdf8;
    --ink: #17191d;
    --ink-soft: #45464a;
    --muted: #77746e;
    --line: #d6cfc2;
    --blue: #1b43f2;
    --blue-dark: #1233c8;
    --orange: #ff6a3d;
    --lime: #d7ee58;
    --shadow: 0 18px 45px rgba(48, 43, 35, .1);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 11px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    min-width: 320px;
    min-height: 100vh;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 21px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
body::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    opacity: .38;
    background-image: radial-gradient(rgba(23, 25, 29, .08) .6px, transparent .7px);
    background-size: 7px 7px;
    content: "";
    pointer-events: none;
}
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
.site-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.top-nav { display: flex; min-height: 88px; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; color: var(--blue); }
.brand-mark svg { width: 42px; height: 42px; }
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 25px; font-weight: 900; letter-spacing: -.09em; text-transform: lowercase; }
.brand-copy small { margin-top: 6px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 5px; }
.nav-links a { position: relative; padding: 9px 12px; color: var(--muted); border-radius: 7px; font-size: 18px; font-weight: 700; text-decoration: none; transition: color .2s ease, background .2s ease; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); background: rgba(27, 67, 242, .08); }
.nav-links a.active { color: var(--blue); }
.nav-links a.active::after { position: absolute; right: 12px; bottom: 0; left: 12px; height: 3px; background: var(--blue); content: ""; }
.grid-tag { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 15px; font-weight: 700; letter-spacing: .08em; }
.grid-tag > span, .online-dot { display: inline-block; width: 7px; height: 7px; background: var(--orange); border-radius: 50%; box-shadow: 0 0 0 4px rgba(255, 106, 61, .14); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 82px; align-items: center; padding: 84px 0 72px; }
.eyebrow, .section-kicker, .data-label { color: var(--blue); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 25px; }
.eyebrow span { color: var(--orange); }
.hero-copy h1 { max-width: 680px; font-size: clamp(47px, 6.2vw, 85px); font-weight: 850; letter-spacing: -.09em; line-height: 1.01; }
.hero-copy h1 span { color: var(--blue); }
.hero-lede { max-width: 520px; margin-top: 26px; color: var(--ink-soft); font-size: 22px; line-height: 1.82; }
.hero-signature { display: flex; align-items: center; gap: 11px; margin-top: 30px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 15px; letter-spacing: .05em; }
.signature-line { width: 42px; height: 2px; background: var(--orange); }

.hero-art { position: relative; min-height: 420px; overflow: hidden; background: var(--blue); border: 2px solid var(--ink); border-radius: var(--radius-xl); box-shadow: 10px 10px 0 var(--ink); }
.hero-art::before { position: absolute; inset: 0; opacity: .23; background-image: linear-gradient(rgba(255, 253, 248, .23) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 253, 248, .23) 1px, transparent 1px); background-size: 34px 34px; content: ""; }
.art-label { position: absolute; top: 24px; left: 25px; color: var(--white); font-family: ui-monospace, monospace; font-size: 15px; font-weight: 800; letter-spacing: .15em; }
.art-compass { position: absolute; top: 50%; left: 50%; width: 240px; height: 240px; border: 2px solid var(--white); border-radius: 50%; transform: translate(-50%, -50%); }
.art-compass::before, .art-compass::after { position: absolute; top: 50%; left: 50%; width: 268px; height: 1px; background: rgba(255, 253, 248, .55); content: ""; transform: translate(-50%, -50%); }
.art-compass::after { transform: translate(-50%, -50%) rotate(90deg); }
.compass-n, .compass-e, .compass-s, .compass-w { position: absolute; color: var(--white); font-family: ui-monospace, monospace; font-size: 14px; font-weight: 800; }
.compass-n { top: 14px; left: 50%; transform: translateX(-50%); }
.compass-e { top: 50%; right: 14px; transform: translateY(-50%); }
.compass-s { bottom: 14px; left: 50%; transform: translateX(-50%); }
.compass-w { top: 50%; left: 14px; transform: translateY(-50%); }
.compass-cross { position: absolute; inset: 28px; border: 1px dashed rgba(255, 253, 248, .55); border-radius: 50%; }
.compass-needle { position: absolute; top: 50%; left: 50%; width: 94px; height: 2px; background: var(--orange); transform: translate(-50%, -50%) rotate(-40deg); transform-origin: center; }
.compass-needle::after { position: absolute; right: -3px; top: -4px; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 10px solid var(--orange); content: ""; }
.compass-dot { position: absolute; top: 50%; left: 50%; width: 13px; height: 13px; background: var(--lime); border: 2px solid var(--ink); border-radius: 50%; transform: translate(-50%, -50%); }
.art-coordinate { position: absolute; right: 24px; bottom: 24px; display: grid; gap: 1px; color: var(--white); font-family: ui-monospace, monospace; text-align: right; }
.art-coordinate small { margin-bottom: 3px; color: rgba(255, 253, 248, .7); font-size: 11px; letter-spacing: .13em; }
.art-coordinate strong { font-size: 17px; letter-spacing: .04em; }
.art-sticker { position: absolute; top: 102px; right: 22px; display: grid; width: 82px; height: 82px; place-content: center; color: var(--ink); background: var(--lime); border-radius: 50%; font-family: ui-monospace, monospace; font-size: 12px; font-weight: 900; letter-spacing: .08em; line-height: 1.25; text-align: center; transform: rotate(10deg); }

.lookup-card, .result-card, .guide-section, .content-section { background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.lookup-card { padding: 29px clamp(22px, 4vw, 44px) 24px; }
.lookup-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.lookup-card h2, .guide-intro h2 { margin-top: 7px; color: var(--ink); font-size: 35px; letter-spacing: -.06em; }
.lookup-count { color: var(--muted); font-family: ui-monospace, monospace; font-size: 14px; letter-spacing: .08em; }
.search-box { display: flex; gap: 10px; margin-top: 25px; }
.input-wrap { position: relative; flex: 1; }
.input-prefix { position: absolute; top: 50%; left: 18px; color: var(--blue); font-family: ui-monospace, monospace; font-size: 16px; font-weight: 900; transform: translateY(-50%); }
#ipInput { width: 100%; min-height: 58px; padding: 0 18px 0 48px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; outline: none; font-family: ui-monospace, monospace; font-size: 21px; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
#ipInput::placeholder { color: #99938a; }
#ipInput:focus { background: var(--white); border-color: var(--blue); box-shadow: 0 0 0 4px rgba(27, 67, 242, .12); }
#searchBtn { display: inline-flex; min-width: 152px; min-height: 58px; align-items: center; justify-content: center; gap: 12px; padding: 0 20px; color: var(--white); background: var(--ink); border: 0; border-radius: 10px; font-size: 18px; font-weight: 800; transition: background .2s ease, transform .2s ease; }
#searchBtn:hover { background: var(--blue); transform: translateY(-2px); }
#searchBtn:active { transform: translateY(0); }
#searchBtn:disabled { cursor: wait; opacity: .6; transform: none; }
#searchBtn svg, .btn-secondary svg, .data-notice svg, .map-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.lookup-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 16px; color: var(--muted); font-size: 16px; }
.lookup-foot > span { display: inline-flex; align-items: center; gap: 8px; }
.btn-secondary { display: inline-flex; min-height: 38px; align-items: center; gap: 8px; padding: 0 12px; color: var(--blue); background: #eef1ff; border: 1px solid rgba(27, 67, 242, .15); border-radius: 8px; font-size: 16px; font-weight: 800; transition: background .2s ease, color .2s ease; }
.btn-secondary:hover { color: var(--white); background: var(--blue); }

.loading, .error { margin-top: 20px; border-radius: var(--radius-lg); }
.loading { display: flex; min-height: 90px; align-items: center; justify-content: center; gap: 14px; padding: 20px; color: var(--blue); background: #eef1ff; border: 1px solid #c9d1ff; }
.loading strong { display: block; font-size: 18px; }
.loading p { margin-top: 2px; color: var(--muted); font-size: 16px; }
.loading-mark { width: 24px; height: 24px; border: 3px solid rgba(27, 67, 242, .18); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { padding: 15px 18px; color: #a63d24; background: #fff0eb; border: 1px solid #ffc7b8; font-size: 18px; }

.result-card { margin-top: 20px; padding: 29px clamp(22px, 4vw, 44px) 34px; animation: reveal .35s ease-out both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.result-card-top { display: flex; justify-content: space-between; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.result-label { color: var(--muted); font-family: ui-monospace, monospace; font-size: 14px; letter-spacing: .1em; }
.result-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 27px 0 21px; border-bottom: 1px solid var(--line); }
.result-heading h2 { margin-top: 5px; color: var(--ink); font-family: ui-monospace, monospace; font-size: clamp(31px, 5vw, 47px); letter-spacing: -.08em; }
.ip-type { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; color: var(--blue); background: #eef1ff; border: 1px solid #c9d1ff; border-radius: 999px; font-family: ui-monospace, monospace; font-size: 15px; font-weight: 800; white-space: nowrap; }
.status-dot { width: 6px; height: 6px; background: var(--orange); border-radius: 50%; }
.result-layout { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-top: 22px; }
.location-block, .data-tile, .network-block { min-height: 145px; padding: 19px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.location-block { grid-row: span 2; }
.location-main { display: flex; align-items: center; gap: 13px; margin-top: 22px; }
.pin-icon { display: grid; width: 37px; height: 37px; place-items: center; color: var(--orange); background: #fff0eb; border-radius: 10px; }
.pin-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.location-main strong { display: block; color: var(--ink); font-size: 28px; letter-spacing: -.05em; }
.location-main > div > span { display: block; margin-top: 2px; color: var(--muted); font-size: 17px; }
.location-main i { padding: 0 6px; color: #aaa298; font-style: normal; }
.location-coordinates { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-family: ui-monospace, monospace; font-size: 12px; }
.location-coordinates strong { color: var(--blue); font-weight: 600; }
.data-tile strong { display: block; min-height: 28px; margin-top: 24px; color: var(--ink); font-family: ui-monospace, monospace; font-size: 24px; overflow-wrap: anywhere; }
.data-tile small { color: var(--muted); font-size: 16px; }
.network-block { display: grid; grid-template-columns: 1fr 1fr; grid-column: 2 / -1; gap: 18px; }
.network-block > .data-label { grid-column: 1 / -1; }
.network-block div span { display: block; color: var(--muted); font-family: ui-monospace, monospace; font-size: 14px; }
.network-block div strong { display: block; margin-top: 6px; overflow-wrap: anywhere; color: var(--ink); font-size: 18px; }
.map-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 22px; padding-top: 23px; border-top: 1px solid var(--line); }
.map-row h3 { margin-top: 5px; color: var(--ink); font-size: 21px; letter-spacing: -.04em; }
.map-row p { margin-top: 3px; color: var(--muted); font-size: 17px; }
.map-link { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.map-link p { width: 100%; color: var(--muted); font-family: ui-monospace, monospace; font-size: 13px; text-align: right; }
.map-link a { display: inline-flex; min-height: 39px; align-items: center; padding: 0 12px; color: var(--white); background: var(--ink); border-radius: 8px; font-size: 16px; font-weight: 800; text-decoration: none; transition: background .2s ease, transform .2s ease; }
.map-link a:hover { background: var(--blue); transform: translateY(-2px); }

.guide-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: 50px; margin-top: 20px; padding: 33px clamp(22px, 4vw, 44px); }
.guide-intro h2 { max-width: 310px; font-size: 33px; }
.guide-intro > p:last-child { max-width: 310px; margin-top: 15px; color: var(--muted); font-size: 18px; line-height: 1.8; }
.guide-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.guide-list > div { padding: 16px 0; border-top: 3px solid var(--ink); }
.guide-list span { display: block; color: var(--orange); font-family: ui-monospace, monospace; font-size: 14px; font-weight: 800; }
.guide-list strong { display: block; margin-top: 17px; color: var(--ink); font-size: 19px; }
.guide-list p { margin-top: 7px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.data-notice { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; margin-top: 7px; padding: 13px 15px; color: #765c11; background: #fffbe8; border: 1px solid #e8d88c; border-radius: 10px; font-size: 16px; }
.data-notice svg { flex: 0 0 auto; color: #ac8700; }
.data-notice strong { color: var(--ink); }

footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 36px 0 48px; color: var(--muted); font-size: 16px; }
.footer-mark { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-family: ui-monospace, monospace; letter-spacing: .05em; text-transform: uppercase; }
.footer-mark span { display: grid; width: 22px; height: 22px; place-items: center; color: var(--white); background: var(--blue); border-radius: 6px; font-size: 14px; font-weight: 900; }
footer a, .content-section a { color: var(--blue); font-weight: 800; text-decoration: none; }
footer a:hover, .content-section a:hover { text-decoration: underline; }

/* About and privacy pages */
.page-header { padding: 73px 0 38px; }
.page-header h1 { max-width: 760px; font-size: clamp(46px, 6vw, 75px); letter-spacing: -.09em; line-height: 1; }
.page-header h1 em { color: var(--blue); font-style: normal; }
.page-header > p:last-child { max-width: 560px; margin-top: 22px; color: var(--ink-soft); font-size: 22px; line-height: 1.8; }
.content-section { margin-bottom: 20px; padding: clamp(24px, 5vw, 44px); }
.content-section p { max-width: 780px; margin-bottom: 14px; color: var(--ink-soft); line-height: 1.85; }
.content-section h2 { display: flex; align-items: center; gap: 10px; margin: 39px 0 14px; color: var(--ink); font-size: 26px; letter-spacing: -.05em; }
.content-section h2::before { width: 7px; height: 22px; background: var(--orange); border-radius: 4px; content: ""; }
.content-section h3 { margin: 22px 0 10px; color: var(--ink); font-size: 21px; }
.content-section h4 { color: var(--ink); font-size: 17px; }
.content-section ul { max-width: 800px; margin: 13px 0 20px 20px; color: var(--ink-soft); }
.content-section li { margin: 8px 0; padding-left: 5px; line-height: 1.75; }
.last-updated { display: inline-block; margin-bottom: 22px !important; padding: 6px 10px; color: var(--blue) !important; background: #eef1ff; border: 1px solid #c9d1ff; border-radius: 999px; font-family: ui-monospace, monospace; font-size: 14px; }
.policy-section, .about-section { margin-bottom: 30px; }
.policy-notice, .disclaimer { margin: 18px 0; padding: 16px 18px; color: #765c11; background: #fffbe8; border: 1px solid #e8d88c; border-radius: 12px; }
.policy-notice p, .disclaimer ul { margin: 0; color: inherit; }
.features-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.feature-item { padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s ease, transform .2s ease; }
.feature-item:hover { border-color: var(--blue); transform: translateY(-2px); }
.feature-icon { display: grid; width: 38px; height: 38px; place-items: center; margin-bottom: 15px; color: var(--white); background: var(--blue); border-radius: 10px; font-family: ui-monospace, monospace; font-size: 12px; font-weight: 900; }
.feature-item h3 { margin: 0 0 7px; }
.feature-item p { margin: 0; font-size: 18px; }
.use-cases { margin-left: 0 !important; list-style: none; }
.use-cases li { margin: 10px 0; padding: 13px 15px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.use-cases strong { color: var(--blue); }
.changelog-item { padding: 17px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 11px; }
.changelog-item h4 { margin-bottom: 8px; color: var(--orange); }
.changelog-item ul { margin-bottom: 0; }
.back-link { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.back-link a { display: inline-flex; min-height: 43px; align-items: center; padding: 0 15px; color: var(--white); background: var(--ink); border-radius: 8px; font-size: 17px; font-weight: 800; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(27, 67, 242, .35); outline-offset: 3px; }
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; padding-top: 66px; }
    .hero-art { min-height: 390px; }
    .result-layout { grid-template-columns: 2fr 1fr; }
    .location-block { grid-row: span 2; }
    .network-block { grid-column: 1 / -1; }
    .guide-section { grid-template-columns: 1fr; gap: 28px; }
    .guide-intro h2, .guide-intro > p:last-child { max-width: 520px; }
    .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .site-shell { width: min(100% - 28px, 520px); }
    .top-nav { min-height: 76px; }
    .grid-tag { display: none; }
    .nav-right { gap: 6px; }
    .nav-links a { padding: 8px 9px; font-size: 16px; }
    .hero-grid { gap: 35px; padding: 54px 0 48px; }
    .hero-copy h1 { font-size: clamp(50px, 14vw, 70px); }
    .hero-lede { font-size: 21px; }
    .hero-art { min-height: 330px; box-shadow: 6px 6px 0 var(--ink); }
    .art-compass { width: 190px; height: 190px; }
    .art-compass::before, .art-compass::after { width: 215px; }
    .art-sticker { top: 76px; right: 12px; width: 73px; height: 73px; font-size: 11px; }
    .lookup-card-head, .lookup-foot, .result-heading, .map-row, footer { align-items: flex-start; flex-direction: column; }
    .lookup-card-head { gap: 8px; }
    .search-box { flex-direction: column; }
    #searchBtn { width: 100%; }
    .lookup-foot .btn-secondary { width: 100%; justify-content: center; }
    .result-layout { grid-template-columns: 1fr; }
    .location-block { grid-row: auto; }
    .network-block { grid-column: auto; grid-template-columns: 1fr; gap: 13px; }
    .network-block > .data-label { grid-column: auto; }
    .map-link { width: 100%; justify-content: flex-start; }
    .map-link p { text-align: left; }
    .map-link a { flex: 1; justify-content: center; }
    .guide-list { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .page-header { padding: 54px 0 28px; }
    .page-header h1 { font-size: clamp(49px, 14vw, 69px); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
