/* Fonts are self-hosted for speed (SIL Open Font License, see assets/fonts) */
@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/source-serif-4.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }

/* whatismyipadd.com — the IP address is the return address on everything you send online. */
:root {
  --paper: #F4F6F8;
  --label: #FFFFFF;
  --ink: #14213D;
  --muted: #5B6676;
  --rule: #D7DCE3;
  --tape: #F5C534;
  --link: #1F4FBF;
  --ok: #1E7A4E;
  --warn: #B4471F;
  --info: #1F4FBF;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: 74rem;
  --map-dot: #C3CBD6;
  --map-hot: #14213D;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1626;
    --label: #16233B;
    --ink: #EEF2F7;
    --muted: #9AA6B6;
    --rule: #2A3A55;
    --tape: #F5C534;
    --link: #8FB1FF;
    --ok: #5CC793;
    --warn: #F08A62;
    --info: #8FB1FF;
    --map-dot: #42557A;
    --map-hot: #EEF2F7;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--tape); outline-offset: 3px; border-radius: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-weight: 700; font-variation-settings: "wdth" 110; letter-spacing: -0.01em; font-size: 1.1rem; }
.brand svg { width: 28px; height: 28px; }
.site-nav { display: flex; gap: 1.25rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }

/* Hero: the address label */
.hero { padding: 3rem 0 2.5rem; }
.hero h1 { margin: 0 0 1.5rem; font-size: 1.25rem; font-weight: 600; color: var(--muted); }
.label {
  position: relative;
  background: var(--label);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 2.25rem 1.5rem 1.5rem;
}
.label::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 1.5rem;
  width: 7.5rem;
  height: 22px;
  background: var(--tape);
  opacity: 0.88;
  transform: rotate(-2.5deg);
  border-radius: 1px;
}
.ip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.ip {
  margin: 0;
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  font-size: clamp(2.3rem, 4.9vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.ip.is-v6 { font-size: clamp(1.35rem, 2.5vw, 2.15rem); letter-spacing: 0; line-height: 1.15; overflow-wrap: normal; word-break: keep-all; }
.ip.is-pending { color: var(--muted); }
.copy {
  font: inherit;
  font-weight: 600;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  min-height: 44px;
  cursor: pointer;
}
.copy:hover { opacity: 0.9; }
.copy[disabled] { opacity: 0.4; cursor: default; }

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 2rem;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--rule);
}
.fields div { min-width: 0; }
.fields dt { color: var(--muted); font-size: 0.9rem; }
.fields dd { margin: 0.15rem 0 0; font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; opacity: 0.35; transition: opacity 300ms ease; }
.fields dd.is-in { opacity: 1; }
.hero-note { margin: 1.25rem 0 0; color: var(--muted); font-size: 0.95rem; max-width: 60ch; }
.other-ip { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.95rem; overflow-wrap: anywhere; }
.other-ip strong { color: var(--ink); font-weight: 600; }


/* Hero: label + map */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 1.5rem; align-items: stretch; }
.map-card { margin: 0; background: var(--label); border: 1px solid var(--rule); border-radius: 6px; padding: 1.5rem 1.5rem 1.1rem; display: flex; flex-direction: column; justify-content: center; }
.map { position: relative; aspect-ratio: 180 / 71; overflow: hidden; }
.map canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map::before, .map::after { content: ""; position: absolute; opacity: 0; transition: opacity 600ms ease 200ms; pointer-events: none; }
.map::before { left: 0; right: 0; top: var(--py, 50%); border-top: 1px dashed var(--ink); }
.map::after { top: 0; bottom: 0; left: var(--px, 50%); border-left: 1px dashed var(--ink); }
.map.has-pin::before, .map.has-pin::after { opacity: 0.22; }
.pin { position: absolute; z-index: 2; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--tape); border: 2px solid var(--ink); box-shadow: 0 0 0 3px var(--label); opacity: 0; }
.pin.is-in { animation: pin-drop 460ms cubic-bezier(0.2, 1.5, 0.4, 1) forwards; }
.pin-ring { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--tape); opacity: 0; }
.pin.is-in .pin-ring { animation: pin-ring 2.8s ease-out 700ms infinite; }
@keyframes pin-drop { from { opacity: 0; transform: translateY(-16px) scale(0.5); } to { opacity: 1; transform: none; } }
@keyframes pin-ring { 0% { opacity: 0.9; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(3.8); } }
.map-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; margin-top: 1rem; padding-top: 0.85rem; border-top: 1px dashed var(--rule); font-size: 0.95rem; }
.map-place { font-weight: 600; }
.map-coords { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .ip { font-size: clamp(2.3rem, 10vw, 4.5rem); }
  .ip.is-v6 { font-size: clamp(1.2rem, 5.2vw, 2rem); }
}
@media (prefers-reduced-motion: reduce) {
  .pin { opacity: 1; }
}


/* Phase 1: dual addresses, connection check, quick links, FAQ */
.addr + .addr { margin-top: 1.1rem; }
.addr-kind { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 0.35rem; }
.ip6 { margin: 0; font-weight: 700; font-variation-settings: "wdth" 104; font-size: clamp(1.05rem, 1.55vw, 1.35rem); line-height: 1.3; overflow-wrap: normal; word-break: keep-all; font-variant-numeric: tabular-nums; }
.ip6.is-pending { color: var(--muted); font-weight: 500; }
.ip.is-empty, .ip6.is-empty { color: var(--muted); font-weight: 500; font-size: 1rem; letter-spacing: 0; }
.copy-quiet { background: transparent; color: var(--ink); border: 1px solid var(--rule); padding: 0.45rem 1rem; min-height: 40px; }
.copy-quiet:hover { border-color: var(--ink); opacity: 1; }
.fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.check[data-level] {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.5rem 1rem;
  margin-top: 1.5rem; padding: 1.1rem 1.25rem; background: var(--label);
  border: 1px solid var(--rule); border-left: 4px solid var(--rule); border-radius: 6px;
}
.check-mark { width: 12px; height: 12px; border-radius: 50%; background: var(--rule); box-shadow: 0 0 0 4px var(--paper); }
.check[data-level="vpn"] { border-left-color: var(--ok); }
.check[data-level="vpn"] .check-mark { background: var(--ok); }
.check[data-level="maybe"] { border-left-color: var(--tape); }
.check[data-level="maybe"] .check-mark { background: var(--tape); }
.check[data-level="direct"] { border-left-color: var(--info); }
.check[data-level="direct"] .check-mark { background: var(--info); }
.check-title { margin: 0; font-weight: 700; }
.check-detail { margin: 0.2rem 0 0; color: var(--muted); }
.check-detail:empty { display: none; }
.check-action {
  justify-self: end; font-weight: 600; text-decoration: none; color: var(--paper); background: var(--ink);
  border-radius: 999px; padding: 0.6rem 1.2rem; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap;
}
.check-action:hover { opacity: 0.9; }
.check-note { margin: 0.6rem 0 0; font-size: 0.85rem; color: var(--muted); }

.quick { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.quick a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.5rem 1rem;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--label);
  color: var(--ink); text-decoration: none; font-weight: 500;
}
.quick a:hover { border-color: var(--ink); }

.faq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; align-items: start; }
.faq-item { border-top: 1px solid var(--rule); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; min-height: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.faq-item summary::after { content: "+"; flex: none; font-size: 1.35rem; line-height: 1; color: var(--muted); transition: transform 200ms ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 1.15rem; color: var(--muted); max-width: 62ch; }

@media (max-width: 760px) {
  .faq-list { grid-template-columns: 1fr; }
  .check[data-level] { grid-template-columns: auto minmax(0, 1fr); }
  .check-action { grid-column: 1 / -1; justify-self: start; }
}

/* Refinement: copy beside labels, check inside the map card */
.addr-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.35rem; }
.addr-head .addr-kind { margin: 0; }
.addr-head .copy-quiet { padding: 0.3rem 0.9rem; min-height: 36px; font-size: 0.9rem; }
.label .ip { margin: 0; }
.geo-card { background: var(--label); border: 1px solid var(--rule); border-radius: 6px; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.map-figure { margin: 0; }
.geo-card .map-caption { margin-top: 0.85rem; }
.geo-card .check {
  margin: auto 0 0; grid-template-columns: auto minmax(0, 1fr); align-items: start;
  background: var(--paper); border: 0; border-left: 4px solid var(--rule); border-radius: 4px; padding: 1rem 1.1rem;
}
.geo-card .check-mark { margin-top: 0.4rem; box-shadow: none; }
.geo-card .check-action { display: inline-flex; justify-self: start; margin-top: 0.85rem; padding: 0.5rem 1.1rem; min-height: 40px; }
.geo-card .check-action[hidden] { display: none; }
.geo-card .check-note { margin: -0.4rem 0 0; }

/* Plain sections */
.section { padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.section h2 { margin: 0 0 1.25rem; font-size: 1.5rem; font-variation-settings: "wdth" 108; letter-spacing: -0.01em; }
.device { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem 2rem; margin: 0; }
.device dt { color: var(--muted); font-size: 0.9rem; }
.device dd { margin: 0.15rem 0 0; font-weight: 600; overflow-wrap: anywhere; }

.guide-list { list-style: none; margin: 0; padding: 0; }
.guide-list li { border-top: 1px solid var(--rule); }
.guide-list li:last-child { border-bottom: 1px solid var(--rule); }
.guide-list a { display: block; padding: 1rem 0; text-decoration: none; color: var(--ink); }
.guide-list a:hover .guide-title { text-decoration: underline; }
.guide-title { display: block; font-weight: 700; font-size: 1.1rem; }
.guide-desc { display: block; color: var(--muted); }

.faq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.faq h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.faq p { margin: 0; color: var(--muted); }

/* Articles */
.article { padding: 3rem 0 3.5rem; }
.article .wrap { max-width: 46rem; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin: 0 0 1rem; }
.crumbs a { color: var(--muted); }
.article h1 { margin: 0 0 0.75rem; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; font-variation-settings: "wdth" 108; letter-spacing: -0.02em; }
.article .dek { margin: 0 0 2rem; font-size: 1.15rem; color: var(--muted); }
.prose { font-family: var(--serif); font-size: 1.125rem; line-height: 1.7; }
.prose h2 { font-family: var(--sans); font-size: 1.4rem; line-height: 1.25; margin: 2.25rem 0 0.75rem; font-variation-settings: "wdth" 106; }
.prose h3 { font-family: var(--sans); font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose code { font-size: 0.92em; background: var(--label); border: 1px solid var(--rule); border-radius: 4px; padding: 0.05em 0.35em; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.98rem; margin: 0 0 1.5rem; }
.prose th, .prose td { text-align: left; padding: 0.55rem 0.75rem 0.55rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table-scroll { overflow-x: auto; }
.callout { font-family: var(--sans); font-size: 1rem; background: var(--label); border: 1px solid var(--rule); border-left: 4px solid var(--tape); border-radius: 4px; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.updated { font-size: 0.9rem; color: var(--muted); margin-top: 2.5rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 2rem 0 2.5rem; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a { color: var(--muted); }


/* Tools */
.panel { background: var(--label); border: 1px solid var(--rule); border-radius: 6px; padding: 1.5rem; }
.tool-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) auto; gap: 0.75rem; align-items: end; }
.tool-form.two { grid-template-columns: minmax(0, 1fr) auto; }
.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field > span { font-size: 0.9rem; color: var(--muted); }
.input, .select {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: 6px;
  padding: 0.65rem 0.8rem; min-height: 44px; width: 100%;
}
.input:focus, .select:focus { border-color: var(--ink); }
.btn {
  font: inherit; font-weight: 600; background: var(--ink); color: var(--paper);
  border: 0; border-radius: 999px; padding: 0.7rem 1.4rem; min-height: 44px; cursor: pointer; white-space: nowrap;
}
.btn:hover { opacity: 0.9; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn-quiet { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.form-error { color: var(--warn); margin: 0.75rem 0 0; min-height: 0; }
.form-error:empty { display: none; }
.results { margin-top: 1.5rem; }
.results table { width: 100%; border-collapse: collapse; }
.results th, .results td { text-align: left; padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.results tbody th { font-weight: 500; color: var(--muted); width: 40%; }
.results td { font-weight: 600; overflow-wrap: anywhere; }
.results code { font-size: 0.92em; }
.break { overflow-wrap: anywhere; word-break: break-word; }
.small { font-size: 0.9rem; color: var(--muted); margin: 1rem 0 0; overflow-wrap: anywhere; }
.verdict { margin: 0 0 1rem; padding: 0.9rem 1rem; border-left: 4px solid var(--info); background: var(--paper); border-radius: 4px; }
.verdict.is-ok { border-left-color: var(--ok); }
.verdict.is-warn { border-left-color: var(--warn); }
.pw-output {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(1.15rem, 3.4vw, 1.6rem); font-weight: 600;
  overflow-wrap: anywhere; margin: 0 0 0.75rem; line-height: 1.4;
}
.pw-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }
.pw-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 1.5rem; margin-top: 1rem; }
.check { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--ink); }
.range-row { display: flex; align-items: center; gap: 1rem; }
.range-row input[type=range] { flex: 1; accent-color: var(--ink); min-height: 44px; }
.range-row output { font-weight: 700; min-width: 2.5ch; text-align: right; }
.tool-body { margin-top: 2.5rem; }
@media (max-width: 640px) {
  .tool-form, .tool-form.two { grid-template-columns: 1fr; }
  .tool-form .btn { width: 100%; }
  .pw-options { grid-template-columns: 1fr; }
  .results tbody th { width: auto; }
}

@media (max-width: 760px) {
  .device { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 520px) {
  .hero { padding-top: 2rem; }
  .label { padding: 2rem 1.1rem 1.25rem; }
  .fields { grid-template-columns: 1fr; }
  .copy { width: 100%; }
  .site-nav { gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
.check-mark { display: block; flex: none; }
.geo-card .check[data-level="vpn"] { border-left-color: var(--ok); }
.geo-card .check[data-level="maybe"] { border-left-color: var(--tape); }
.geo-card .check[data-level="direct"] { border-left-color: var(--info); }
.addr-head .copy-quiet { width: auto; }
@media (max-width: 520px) {
  .label .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
  .label .fields dd { font-size: 1rem; }
}

/* Phase 2: grouped lists, live checker pages, footer links */
.groups { display: grid; gap: 1.75rem; }
.group-title { margin: 0 0 0.5rem; font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.panel.live { display: grid; gap: 1.25rem; }
.live-row { min-width: 0; }
.live-value { margin: 0; font-size: 1.35rem; font-weight: 700; font-variation-settings: "wdth" 104; overflow-wrap: anywhere; transition: opacity 300ms ease; }
.live-row.is-v6 .live-value { overflow-wrap: normal; word-break: keep-all; }
.live-value.is-pending { color: var(--muted); font-weight: 500; opacity: 0.5; }
.live-value.is-empty { color: var(--muted); font-weight: 500; font-size: 1.05rem; }
.live-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.98rem; font-weight: 500; line-height: 1.55; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 0.75rem 0.9rem; }
.live-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; padding-top: 1.25rem; border-top: 1px dashed var(--rule); }
.live-grid .live-value { font-size: 1.1rem; }
.flag { display: flex; align-items: center; gap: 0.7rem; margin: 0; padding: 0.85rem 1rem; background: var(--paper); border-left: 4px solid var(--rule); border-radius: 4px; font-weight: 600; }
.flag-mark { width: 12px; height: 12px; border-radius: 50%; background: var(--rule); flex: none; }
.flag[data-state="yes"] { border-left-color: var(--ok); }
.flag[data-state="yes"] .flag-mark { background: var(--ok); }
.flag[data-state="no"] { border-left-color: var(--tape); }
.flag[data-state="no"] .flag-mark { background: var(--tape); }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.prose a.btn { color: var(--paper); font-family: var(--sans); }
.footer-popular { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
@media (max-width: 520px) { .live-grid { grid-template-columns: 1fr; } }
.group-title { color: var(--ink); font-size: 1rem; margin: 0 0 0.25rem; }

/* Phase 3: header chip, live hints, homepage explore, brand on every panel */
.site-header .wrap { gap: 1rem; }
.brand { margin-right: auto; }
.brand svg { width: 30px; height: 30px; }
.ip-chip {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 36px; padding: 0.3rem 0.85rem 0.3rem 0.7rem;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--label);
  color: var(--ink); text-decoration: none; font-size: 0.9rem; white-space: nowrap; max-width: 46vw;
  opacity: 0.6; transition: opacity 300ms ease, border-color 200ms ease;
}
.ip-chip.is-in { opacity: 1; }
.ip-chip:hover { border-color: var(--ink); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tape); box-shadow: 0 0 0 2px var(--label), 0 0 0 3px var(--rule); flex: none; }
.chip-label { color: var(--muted); }
.chip-ip { font-weight: 700; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
body[data-page="home"] .ip-chip { display: none; }

.guide-list a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.li-text { min-width: 0; }
.hint {
  flex: none; max-width: 45%; font-size: 0.85rem; font-weight: 600; color: var(--ink);
  background: var(--label); border: 1px solid var(--rule); border-radius: 999px; padding: 0.25rem 0.7rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity 300ms ease;
}
.hint:empty { display: none; }
.hint.is-in { opacity: 1; }

.explore { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.explore h2 { margin-bottom: 1rem; }

.panel { position: relative; }
.panel::before {
  content: ""; position: absolute; top: -11px; left: 1.5rem; width: 6.5rem; height: 20px;
  background: var(--tape); opacity: 0.88; transform: rotate(-2.5deg); border-radius: 1px;
}
.panel { padding-top: 1.85rem; }

@media (max-width: 760px) {
  .explore { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: wrap; row-gap: 0; padding-top: 0.6rem; }
  .site-header .site-nav { order: 3; flex-basis: 100%; gap: 1.25rem; padding: 0.5rem 0 0.7rem; }
  .chip-label { display: none; }
  .ip-chip { max-width: 52vw; }
  .guide-list a { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .hint { max-width: 100%; }
}

/* Diagrams */
.diagram { margin: 1.75rem 0; padding: 1.5rem 1.25rem 1.1rem; background: var(--label); border: 1px solid var(--rule); border-radius: 6px; }
.diagram svg { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; }
.diagram figcaption { margin-top: 0.85rem; font-family: var(--sans); font-size: 0.92rem; line-height: 1.45; color: var(--muted); text-align: center; }
.d-box { fill: var(--paper); stroke: var(--rule); stroke-width: 1.5; }
.d-bar { fill: var(--label); stroke: var(--ink); stroke-width: 1.5; }
.d-zone { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 6 5; }
.d-line { fill: none; stroke: var(--muted); stroke-width: 1.6; }
.d-arrowhead { fill: var(--muted); }
.d-strong { fill: var(--ink); font-family: var(--sans); font-weight: 700; }
.d-soft { fill: var(--muted); font-family: var(--sans); }
.d-tape { fill: var(--tape); opacity: 0.85; }
.d-tape-solid { fill: var(--tape); }
.d-ink-on-tape { fill: #14213D; font-family: var(--sans); font-weight: 800; }
.d-dim { opacity: 0.4; }

/* Ad spaces: reserved height prevents layout jumps when an ad loads */
.ad { margin: 2rem auto; max-width: var(--wrap); min-height: 280px; text-align: center; }
.ad-label { display: block; margin-bottom: 0.4rem; font-size: 0.75rem; color: var(--muted); }
.ad-home { padding: 0 1.25rem; }
@media (min-width: 761px) { .ad { min-height: 250px; } }
.dg-narrow { display: none; }
@media (max-width: 560px) {
  .dg-wide { display: none; }
  .dg-narrow { display: block; }
  .diagram { padding: 1.1rem 0.75rem 0.9rem; }
  .diagram svg { max-width: 360px; }
}

/* Contact form */
.contact-form { display: grid; gap: 1.1rem; margin-top: 0.5rem; }
.form-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.contact-form textarea.input { resize: vertical; min-height: 9rem; line-height: 1.5; }
.contact-form .small { margin: 0; }
.form-actions { display: flex; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { min-height: 65px; }
#contact-status { margin-top: 1.25rem; }
@media (max-width: 640px) { .form-pair { grid-template-columns: 1fr; } .form-actions .btn { width: 100%; } }

/* =========================================================
   Sleek pass: translucent header, depth, motion, and Pip
   ========================================================= */
:root { --shadow: 0 1px 2px rgba(22, 35, 59, 0.05), 0 10px 28px -14px rgba(22, 35, 59, 0.18); --shadow-lift: 0 2px 4px rgba(22, 35, 59, 0.06), 0 16px 34px -14px rgba(22, 35, 59, 0.26); --ease: cubic-bezier(0.22, 1, 0.36, 1); }
@media (prefers-color-scheme: dark) { :root { --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px -14px rgba(0, 0, 0, 0.6); --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 36px -14px rgba(0, 0, 0, 0.7); } }
html { scroll-behavior: smooth; }

/* Translucent sticky header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color 250ms ease, box-shadow 250ms ease; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: color-mix(in srgb, var(--paper) 74%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); }
}
.site-header.is-scrolled { border-bottom-color: var(--rule); box-shadow: 0 8px 24px -20px rgba(22, 35, 59, 0.45); }
.site-nav a { position: relative; text-decoration: none !important; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px; background: var(--tape); transform: scaleX(0); transform-origin: left; transition: transform 250ms var(--ease); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Depth */
.label, .geo-card, .panel, .diagram, .ip-chip, .quick a { box-shadow: var(--shadow); }
.label, .geo-card, .panel, .diagram { border-color: color-mix(in srgb, var(--rule) 70%, transparent); border-radius: 10px; }

/* Press and hover feedback */
.btn, .copy, .check-action, .quick a, .ip-chip { transition: transform 140ms var(--ease), box-shadow 200ms ease, border-color 200ms ease, opacity 200ms ease, background-color 200ms ease; }
.btn:active, .copy:active, .check-action:active, .quick a:active, .ip-chip:active { transform: scale(0.97); }
.quick a:hover, .ip-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.guide-list a .guide-title { transition: transform 220ms var(--ease); }
.guide-list a:hover .guide-title { transform: translateX(4px); }
.guide-list a { transition: background-color 200ms ease; border-radius: 6px; }
.faq-item summary h3 { transition: color 150ms ease; }
.faq-item summary:hover h3 { color: var(--link); }

/* Reveal on scroll (only when JavaScript is running; a safety net shows everything) */
.js .guide-list li, .js .faq-item, .js .diagram, .js .panel, .js .groups .group-title {
  opacity: 0; transform: translateY(12px); filter: blur(3px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease), filter 600ms var(--ease);
}
.js .guide-list li.is-visible, .js .faq-item.is-visible, .js .diagram.is-visible, .js .panel.is-visible, .js .groups .group-title.is-visible, .reveal-all .guide-list li, .reveal-all .faq-item, .reveal-all .diagram, .reveal-all .panel, .reveal-all .groups .group-title { opacity: 1; transform: none; filter: none; }

/* Pip */
.brand svg.pip { width: 34px; height: 34px; overflow: visible; }
.pip .pip-body { transform-box: view-box; transform-origin: 20px 37.5px; }
.pip .pip-eyes { transform-box: fill-box; transform-origin: center; animation: pip-blink 5.5s infinite 1.8s; }
.pip-pupil { transition: transform 140ms ease-out; }
.brand .pip .pip-body { animation: pip-hop 750ms var(--ease) 350ms both; }
.brand:hover .pip .pip-body { animation: pip-hop2 750ms cubic-bezier(0.3, 1.5, 0.5, 1); }
@keyframes pip-hop { 0% { transform: translateY(-8px); opacity: 0; } 55% { transform: translateY(0) scale(1.06, 0.94); opacity: 1; } 100% { transform: none; } }
@keyframes pip-hop2 { 0% { transform: none; } 30% { transform: translateY(-5px) scale(0.95, 1.05); } 60% { transform: scale(1.06, 0.94); } 100% { transform: none; } }
@keyframes pip-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }

/* Pip on the homepage map: the tip of the pin marks your location */
.pin { width: 32px; height: 32px; margin: -31px 0 0 -16px; background: none; border: 0; border-radius: 0; box-shadow: none; }
.pin svg { display: block; width: 100%; height: 100%; position: relative; z-index: 1; filter: drop-shadow(0 3px 4px rgba(22, 35, 59, 0.3)); }
.pin-ring { inset: auto; left: 50%; top: 100%; width: 14px; height: 14px; margin: -8px 0 0 -7px; }
.pin .pip-eyes { animation-delay: 2.6s; }

/* 404 */
.lost { text-align: center; }
.lost .guide-list { text-align: left; }
.lost .dek { margin-left: auto; margin-right: auto; max-width: 52ch; }
.lost-pip { width: 120px; height: 120px; margin: 0 auto 1.25rem; }
.lost-pip .pip { width: 100%; height: 100%; overflow: visible; }
.lost-pip .pip-body { animation: pip-search 3.2s ease-in-out infinite; }
@keyframes pip-search { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .guide-list li, .js .faq-item, .js .diagram, .js .panel, .js .groups .group-title { opacity: 1; transform: none; filter: none; transition: none; }
  .pip .pip-body, .pip .pip-eyes { animation: none !important; }
}
.pip-map .pip-body > path:first-child { stroke: var(--label); stroke-width: 2.6; paint-order: stroke; stroke-linejoin: round; }
.pin { width: 38px; height: 38px; margin: -37px 0 0 -19px; }
.pin svg { overflow: visible; }
.lost .groups { text-align: left; }

/* The big IPv4 address always stays on one line; app.js scales it to fit */
.label .ip { white-space: nowrap; overflow-wrap: normal; word-break: normal; max-width: 100%; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.label, .geo-card, .addr { min-width: 0; }

/* Homepage intro under the heading */
.hero h1 { margin-bottom: 0.4rem; }
.hero-intro { margin: 0 0 1.75rem; max-width: 64ch; color: var(--muted); font-size: 1.02rem; }

/* Internet speed calculator */
.speed-form { display: grid; gap: 0.25rem; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.stepper-text { display: flex; flex-direction: column; min-width: 0; }
.stepper-text label { font-weight: 600; }
.stepper-text .small { margin: 0.1rem 0 0; }
.stepper-ctrl { display: flex; align-items: center; gap: 0.4rem; flex: none; }
.stepper-ctrl .copy { min-width: 44px; min-height: 44px; padding: 0; font-size: 1.2rem; }
.stepper-ctrl .input { width: 3.6rem; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.stepper-ctrl .input::-webkit-outer-spin-button, .stepper-ctrl .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.speed-form .check { margin-top: 0.4rem; }
.speed-result { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px dashed var(--rule); }
.speed-num { margin: 0; font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 800; font-variation-settings: "wdth" 112; letter-spacing: -0.015em; line-height: 1.1; white-space: nowrap; }
.speed-summary, .speed-result .results { grid-column: 1 / -1; margin: 0; }
.speed-summary { color: var(--muted); }
.speed-result .results td:nth-child(n+2), .speed-result .results th:nth-child(n+2) { text-align: right; }
@media (max-width: 520px) { .speed-result { grid-template-columns: 1fr; } }

/* Calculator on phones: label on top, controls underneath */
@media (max-width: 520px) {
  .stepper { flex-wrap: wrap; gap: 0.5rem; }
  .stepper-text { flex-basis: 100%; }
  .stepper-ctrl { margin-left: auto; }
}

/* New tools: quick picks, code, email results, Wi-Fi QR card */
.quick-picks { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; }
.chip-btn { font: inherit; font-size: 0.9rem; font-weight: 500; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: 0.45rem 0.9rem; min-height: 40px; cursor: pointer; transition: transform 140ms var(--ease), border-color 200ms ease; }
.chip-btn:hover { border-color: var(--ink); }
.chip-btn:active { transform: scale(0.96); }
pre.code { margin: 0.5rem 0 1rem; padding: 0.85rem 1rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; overflow-x: auto; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92rem; line-height: 1.55; }
pre.code code { background: none; border: 0; padding: 0; font-size: inherit; }
.api-h { margin: 1.25rem 0 0.25rem; font-size: 1rem; }
.mail-list { display: grid; gap: 0.75rem; }
.mail-item { border: 1px solid var(--rule); border-left: 4px solid var(--rule); border-radius: 6px; padding: 0.85rem 1rem; background: var(--label); }
.mail-item p { margin: 0.35rem 0 0; color: var(--muted); }
.mail-item pre.code { margin-bottom: 0; font-size: 0.82rem; }
.mail-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.mail-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); flex: none; }
.mail-state { margin-left: auto; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.mail-item.is-pass { border-left-color: var(--ok); } .mail-item.is-pass .mail-dot { background: var(--ok); }
.mail-item.is-warn { border-left-color: var(--tape); } .mail-item.is-warn .mail-dot { background: var(--tape); }
.mail-item.is-fail { border-left-color: var(--warn); } .mail-item.is-fail .mail-dot { background: var(--warn); }
.qr-layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: start; }
.qr-form { display: grid; gap: 1rem; }
.pw-wrap { display: flex; gap: 0.5rem; }
.pw-wrap .input { flex: 1; min-width: 0; }
.qr-card { background: #FFFFFF; color: #14213D; border: 1px solid #D7DCE3; border-radius: 12px; padding: 1rem 1rem 0.9rem; text-align: center; width: 264px; }
.qr-card canvas { width: 232px; height: 232px; image-rendering: pixelated; display: block; margin: 0 auto; }
.qr-name { margin: 0.6rem 0 0; font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }
.qr-card .qr-hint { color: #5B6676; margin: 0.2rem 0 0; }
@media (max-width: 640px) { .qr-layout { grid-template-columns: 1fr; } .qr-card { margin: 0 auto; } }
@media print {
  body.print-qr * { visibility: hidden !important; }
  body.print-qr .qr-card, body.print-qr .qr-card * { visibility: visible !important; }
  body.print-qr .qr-card { position: fixed; top: 2cm; left: 50%; transform: translateX(-50%); border: 2px solid #14213D; width: 10cm; padding: 0.8cm; box-shadow: none; }
  body.print-qr .qr-card canvas { width: 8cm; height: 8cm; }
  body.print-qr .pip-buddy { display: none !important; }
}

/* "Your IP changed" memory */
.ip-memory { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--rule); }
.ip-memory-text { margin: 0; font-weight: 600; }
.ip-history { margin-top: 0.5rem; }
.ip-history summary { cursor: pointer; color: var(--link); font-size: 0.92rem; min-height: 32px; display: inline-flex; align-items: center; }
.ip-history ul { list-style: none; margin: 0.5rem 0; padding: 0; display: grid; gap: 0.3rem; }
.ip-history li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; overflow-wrap: anywhere; }
.ip-history li span { color: var(--muted); white-space: nowrap; }
.link-btn { font: inherit; color: var(--link); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

/* =========================
   Pip the companion
   ========================= */
.pip-buddy { position: fixed; left: 0; top: 0; z-index: 60; width: 58px; height: 58px; padding: 0; margin: 0; border: 0; background: none; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; opacity: 0; transition: opacity 400ms ease; filter: drop-shadow(0 6px 8px rgba(20, 33, 61, 0.28)); }
.pip-buddy.is-in { opacity: 1; }
.pip-buddy:focus-visible { outline: 3px solid var(--tape); outline-offset: 2px; border-radius: 50%; }
.pip-buddy.is-dragging { cursor: grabbing; }
.pip-buddy svg { display: block; width: 100%; height: 100%; overflow: visible; transform: scaleX(var(--face, 1)); }
.pb-body { transform-box: view-box; transform-origin: 20px 37.5px; }
.pb-shape { fill: var(--ink); stroke: var(--label); stroke-width: 2.2; paint-order: stroke; }
.pb-white { fill: var(--label); }
.pb-pupil { fill: var(--ink); transition: transform 140ms ease-out; }
.pb-cheek { fill: var(--tape); }
.pb-mouth { fill: none; stroke: var(--label); stroke-width: 1.8; stroke-linecap: round; }
.pb-eyes-closed path { fill: none; stroke: var(--label); stroke-width: 1.8; stroke-linecap: round; }
.pb-eyes-closed, .pb-frown, .pb-mouth-o { display: none; }
.pb-mouth-o { fill: var(--label); }
.pip-buddy.is-worried .pb-smile { display: none; } .pip-buddy.is-worried .pb-frown { display: inline; }
.pip-buddy.is-surprised .pb-smile, .pip-buddy.is-dragging .pb-smile, .pip-buddy.is-flying .pb-smile { display: none; }
.pip-buddy.is-surprised .pb-mouth-o, .pip-buddy.is-dragging .pb-mouth-o, .pip-buddy.is-flying .pb-mouth-o { display: inline; }
.pip-buddy.is-asleep .pb-eyes-open { display: none; } .pip-buddy.is-asleep .pb-eyes-closed { display: inline; }
.pip-buddy .pb-eyes-open { transform-box: fill-box; transform-origin: center; animation: pip-blink 5.2s infinite 2.4s; }
.pip-buddy.is-hop .pb-body { animation: pip-hop2 650ms cubic-bezier(0.3, 1.5, 0.5, 1); }
.pip-buddy.is-squash .pb-body { animation: pb-squash 320ms ease-out; }
.pip-buddy.is-walking .pb-body { animation: pb-waddle 420ms ease-in-out infinite alternate; }
.pip-buddy.is-dragging .pb-body { transform: scale(1.08) rotate(-6deg); }
.pip-buddy.is-worried .pb-body { animation: pb-shake 500ms ease-in-out; }
.pip-buddy.is-asleep .pb-body { animation: pb-breathe 3s ease-in-out infinite; }
@keyframes pb-squash { 0% { transform: scale(1.18, 0.82); } 60% { transform: scale(0.94, 1.06); } 100% { transform: none; } }
@keyframes pb-waddle { from { transform: rotate(-6deg) translateY(0); } to { transform: rotate(6deg) translateY(-2px); } }
@keyframes pb-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-2px) rotate(-4deg); } 75% { transform: translateX(2px) rotate(4deg); } }
@keyframes pb-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03, 0.97); } }
.pb-z { position: absolute; right: -6px; top: -8px; font: 700 13px/1 var(--sans); color: var(--muted); opacity: 0; pointer-events: none; }
.pb-z span { position: relative; left: 3px; top: -6px; font-size: 10px; }
.pip-buddy.is-asleep .pb-z { opacity: 1; animation: pb-float 2.4s ease-in-out infinite; }
@keyframes pb-float { 0% { transform: translateY(4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-10px); opacity: 0; } }

.pip-bubble { position: fixed; left: 0; top: 0; z-index: 61; width: max-content; max-width: min(300px, calc(100vw - 16px)); padding: 0.75rem 0.9rem; background: var(--label); color: var(--ink); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow-lift); font-size: 0.92rem; line-height: 1.45; }
.pip-bubble::after { content: ""; position: absolute; bottom: -7px; left: calc(var(--tail, 50%) - 7px); width: 12px; height: 12px; background: var(--label); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); transform: rotate(45deg); }
.pip-bubble p { margin: 0; }
.pip-bubble.is-in { animation: pb-pop 260ms var(--ease); }
@keyframes pb-pop { from { opacity: 0; scale: 0.9; } to { opacity: 1; scale: 1; } }
.pb-actions { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; margin-top: 0.55rem !important; font-size: 0.85rem; }
.pb-actions button { font: inherit; background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }
.pip-return { font-size: 0.95rem; }
@media (max-width: 640px) { .pip-buddy { width: 48px; height: 48px; } }
@media (prefers-reduced-motion: reduce) {
  .pip-buddy .pb-body, .pip-buddy .pb-eyes-open, .pb-z { animation: none !important; }
}
@media print { .pip-buddy, .pip-bubble { display: none !important; } }

/* Pip's outfits, thinking, and celebrations */
.pip-buddy .pb-hat, .pip-buddy .pb-glasses { display: none; }
.pip-buddy[data-hat="hardhat"] .pb-hardhat, .pip-buddy[data-hat="detective"] .pb-detective, .pip-buddy[data-hat="nightcap"] .pb-nightcap { display: inline; }
.pip-buddy.wear-glasses .pb-glasses { display: inline; }
.pip-buddy.wear-glasses .pb-pupil { display: none; }
.pip-buddy.is-thinking .pb-pupil { transform: translate(1px, -1.7px); }
.pip-buddy.is-thinking .pb-smile { display: none; }
.pip-buddy.is-thinking .pb-mouth-o { display: inline; transform-box: fill-box; transform-origin: center; transform: scale(0.6); }
.pb-dots { display: inline-flex; gap: 3px; margin-left: 2px; vertical-align: middle; }
.pb-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: pb-dot 1s infinite ease-in-out; }
.pb-dots i:nth-child(2) { animation-delay: 0.15s; } .pb-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pb-dot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.pb-spark { position: fixed; z-index: 62; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 2px; background: var(--tape); pointer-events: none; animation: pb-spark 850ms cubic-bezier(0.2, 0.8, 0.3, 1) forwards; }
.pb-spark:nth-child(3n) { background: var(--ok); } .pb-spark:nth-child(3n+1) { background: var(--info); }
@keyframes pb-spark { from { transform: rotate(var(--a)) translateY(0) scale(1); opacity: 1; } to { transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(0.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pb-dots i { animation: none; opacity: 0.6; } }

/* Troubleshooter and diary */
.quick a.quick-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 600; }
.fix-q { font-weight: 700; font-size: 1.1rem; margin: 0 0 0.75rem; }
.symptoms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.symptom { font: inherit; font-weight: 600; text-align: left; color: var(--ink); background: var(--paper); border: 1.5px solid var(--rule); border-radius: 10px; padding: 0.85rem 1rem; min-height: 52px; cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease, transform 140ms var(--ease); }
.symptom:hover { border-color: var(--ink); }
.symptom:active { transform: scale(0.98); }
.symptom[aria-pressed="true"] { border-color: var(--ink); background: var(--label); box-shadow: inset 0 0 0 1.5px var(--ink); }
.fix-site { margin-top: 1rem; }
#fix-offline { margin: 1rem 0 0; }
.fix-run { margin-top: 1.25rem; }
.fix-out { margin-top: 1.5rem; }
.fix-progress { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.fix-progress li { display: flex; align-items: center; gap: 0.6rem; color: var(--muted); }
.fix-progress li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule); flex: none; }
.fix-progress li.is-active { color: var(--ink); font-weight: 600; }
.fix-progress li.is-active::before { border-color: var(--tape); border-top-color: transparent; animation: fix-spin 800ms linear infinite; }
.fix-progress li.is-done::before { background: var(--ok); border-color: var(--ok); }
@keyframes fix-spin { to { transform: rotate(360deg); } }
.fix-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.fix-metric { background: var(--paper); border-radius: 8px; padding: 0.75rem 0.9rem; border-top: 3px solid var(--rule); }
.fix-metric strong { display: block; font-size: 1.6rem; font-variation-settings: "wdth" 110; line-height: 1.15; }
.fix-metric span:last-child { color: var(--muted); font-size: 0.85rem; }
.fix-metric.is-good { border-top-color: var(--ok); } .fix-metric.is-ok { border-top-color: var(--tape); } .fix-metric.is-bad { border-top-color: var(--warn); }
.fix-h { margin: 1.25rem 0 0.5rem; font-size: 1.05rem; }
.fix-findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.fix-findings li { padding: 0.6rem 0.85rem; border-left: 4px solid var(--rule); background: var(--paper); border-radius: 4px; color: var(--muted); }
.fix-findings li strong { color: var(--ink); }
.fix-findings li.is-bad { border-left-color: var(--warn); } .fix-findings li.is-warn { border-left-color: var(--tape); } .fix-findings li.is-ok { border-left-color: var(--ok); }
.fix-steps { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.5rem; }
.fix-steps label { display: flex; gap: 0.6rem; align-items: flex-start; cursor: pointer; }
.fix-steps input { margin-top: 0.3rem; width: 1.05rem; height: 1.05rem; accent-color: var(--ok); flex: none; }
.fix-steps li.is-done span { color: var(--muted); text-decoration: line-through; }
.fix-compare { margin: 0 0 0.5rem; }
.diary-count { font-weight: 600; margin: 0 0 1rem; }
.diary-insights { margin: 0 0 1rem; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.diary-chart { margin: 0 0 1rem; }
.diary-chart svg { width: 100%; height: auto; display: block; }
.diary-chart figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }
.dg-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.dg-dot { fill: var(--tape); stroke: var(--ink); stroke-width: 1; }
.dg-grid { stroke: var(--rule); stroke-dasharray: 3 4; }
.dg-label { fill: var(--muted); font: 11px var(--sans); }
@media (max-width: 640px) { .symptoms { grid-template-columns: 1fr; } .fix-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .fix-progress li.is-active::before { animation: none; border-top-color: var(--tape); } }

/* =========================================
   Icons and category colors
   ========================================= */
:root { --t-blue: #2F6FED; --t-coral: #E5603A; --t-teal: #0F8F84; --t-violet: #7254D8; --t-green: #2A9758; --t-amber: #B98000; }
@media (prefers-color-scheme: dark) { :root { --t-blue: #7FA6FF; --t-coral: #FF8F6E; --t-teal: #3CC7B6; --t-violet: #A893FF; --t-green: #5FCB8D; --t-amber: #F5C534; } }
.tone-blue { --tone: var(--t-blue); } .tone-coral { --tone: var(--t-coral); } .tone-teal { --tone: var(--t-teal); }
.tone-violet { --tone: var(--t-violet); } .tone-green { --tone: var(--t-green); } .tone-amber { --tone: var(--t-amber); }

.li-ico, .page-ico { display: inline-grid; place-items: center; flex: none; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, var(--label)); border: 1px solid color-mix(in srgb, var(--tone) 22%, transparent); }
.li-ico { width: 42px; height: 42px; border-radius: 12px; }
.li-ico .ico { width: 22px; height: 22px; }
.guide-list a { gap: 0.9rem; }
.guide-list a .li-text { flex: 1; }
.guide-list a:hover .li-ico { background: color-mix(in srgb, var(--tone) 20%, var(--label)); }

.group-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--tone); margin-right: 0.5rem; vertical-align: 0.08em; }

.page-ico { width: 52px; height: 52px; border-radius: 15px; margin-bottom: 0.9rem; }
.page-ico .ico { width: 28px; height: 28px; }

/* Card grids on the Tools and Guides pages */
.guide-list.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.guide-list.cards li, .guide-list.cards li:last-child { border: 0; }
.guide-list.cards a {
  height: 100%; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 14px;
  background: var(--label); border: 1px solid color-mix(in srgb, var(--rule) 75%, transparent); box-shadow: var(--shadow);
  transition: transform 200ms var(--ease), box-shadow 200ms ease, border-color 200ms ease;
}
.guide-list.cards a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--tone, var(--ink)) 35%, var(--rule)); }
.guide-list.cards a:hover .guide-title { transform: none; }
.guide-list.cards .guide-title { margin-top: 0.1rem; }
.guide-list.cards .guide-desc { font-size: 0.93rem; }
.guide-list.cards .hint { align-self: center; }
.guide-list.cards li:has(.tone-blue) a { --tone: var(--t-blue); } .guide-list.cards li:has(.tone-coral) a { --tone: var(--t-coral); }
.guide-list.cards li:has(.tone-teal) a { --tone: var(--t-teal); } .guide-list.cards li:has(.tone-violet) a { --tone: var(--t-violet); }
.guide-list.cards li:has(.tone-green) a { --tone: var(--t-green); } .guide-list.cards li:has(.tone-amber) a { --tone: var(--t-amber); }
.groups:has(.cards) { gap: 2.25rem; }
.groups:has(.cards) .group-title { font-size: 1.1rem; margin-bottom: 0.85rem; }
@media (max-width: 720px) {
  .guide-list.cards { grid-template-columns: 1fr; }
  .guide-list.cards a { flex-direction: row; align-items: flex-start; }
}
@media (max-width: 640px) { .guide-list a { flex-direction: row; align-items: flex-start; } .guide-list a .li-text { display: flex; flex-direction: column; } }

/* Index pages: full width, vertical cards */
.article .wrap.wide { max-width: var(--wrap); }
.guide-list.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.guide-list.cards a { flex-direction: column; align-items: flex-start; gap: 0.75rem; padding: 1.15rem 1.2rem 1.2rem; }
.guide-list.cards .li-ico { width: 46px; height: 46px; border-radius: 13px; }
.guide-list.cards .li-ico .ico { width: 24px; height: 24px; }
.guide-list.cards .li-text { display: flex; flex-direction: column; gap: 0.3rem; }
.guide-list.cards .guide-title { font-size: 1.05rem; line-height: 1.3; margin: 0; }
.guide-list.cards .hint { align-self: flex-start; margin-top: auto; max-width: 100%; }
@media (max-width: 980px) { .guide-list.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .guide-list.cards { grid-template-columns: 1fr; gap: 0.75rem; }
  .guide-list.cards a { flex-direction: row; align-items: flex-start; padding: 1rem; }
  .guide-list.cards .hint { display: inline-block; }
}
@media (max-width: 640px) {
  .guide-list.cards a { flex-direction: column; align-items: flex-start; }
  .guide-list:not(.cards) a { flex-wrap: wrap; align-items: flex-start; }
  .guide-list:not(.cards) .li-text { flex: 1; min-width: 0; }
  .guide-list:not(.cards) .hint { margin-left: calc(42px + 0.9rem); }
}

/* =========================
   Stay safe: scam game, checkup, leak check, stickers
   ========================= */
.scam-progress { margin: 0 0 0.75rem; font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.scam-card { border: 1px solid var(--rule); border-radius: 14px; padding: 1rem 1.1rem; background: var(--paper); margin-bottom: 1rem; }
.scam-card.kind-textmessage { border-radius: 18px 18px 18px 4px; max-width: 34rem; }
.scam-card.kind-popup { border: 2px solid var(--warn); background: color-mix(in srgb, var(--warn) 7%, var(--label)); }
.scam-head { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; margin-bottom: 0.5rem; }
.scam-kind { font-size: 0.75rem; font-weight: 700; color: var(--paper); background: var(--muted); border-radius: 999px; padding: 0.1rem 0.55rem; }
.scam-from { font-weight: 600; font-size: 0.92rem; overflow-wrap: anywhere; }
.scam-subject { margin: 0 0 0.35rem; font-weight: 700; }
.scam-body { margin: 0; }
.scam-link { margin: 0.6rem 0 0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9rem; color: var(--link); text-decoration: underline; overflow-wrap: anywhere; }
.scam-q, .checkup-q { font-weight: 700; font-size: 1.15rem; margin: 0.25rem 0 0.75rem; }
.scam-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.scam-why { font-weight: 600; }
.scam-clues { margin: 0 0 1.25rem; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.scam-final { text-align: center; }
.scam-score { margin: 0; font-size: 4rem; font-weight: 800; font-variation-settings: "wdth" 112; line-height: 1; }
.scam-score span { font-size: 1.6rem; color: var(--muted); }
.scam-squares { font-size: 1.5rem; letter-spacing: 0.15em; margin: 0.5rem 0; }

.checkup-intro { margin-top: 0; }
.checkup-result { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.score-wrap { position: relative; width: 140px; height: 140px; flex: none; }
.score-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--rule); stroke-width: 10; }
.ring-fg { fill: none; stroke-width: 10; stroke-linecap: round; stroke-dashoffset: var(--off); animation: ring-in 1.1s var(--ease) both; }
@keyframes ring-in { from { stroke-dashoffset: 330; } to { stroke-dashoffset: var(--off); } }
.score-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-num strong { font-size: 2.6rem; font-variation-settings: "wdth" 112; line-height: 1; }
.score-num span { font-size: 0.8rem; color: var(--muted); }
.checkup-grade { margin: 0; font-size: 1.5rem; font-weight: 800; font-variation-settings: "wdth" 108; }

.kanon { margin: 1.5rem 0 0.5rem; padding: 1rem 1rem 1rem 2.2rem; background: var(--paper); border-radius: 10px; display: grid; gap: 0.45rem; font-size: 0.95rem; }

.stickers { list-style: none; margin: 0.5rem 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.sticker { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.15rem; padding: 0.85rem 0.6rem; border: 1.5px dashed var(--rule); border-radius: 14px; color: var(--muted); font-size: 0.82rem; }
.sticker strong { color: var(--ink); font-size: 0.92rem; }
.sticker-ico { font-size: 1.8rem; line-height: 1.2; filter: grayscale(1); opacity: 0.35; }
.sticker.is-got { border-style: solid; border-color: color-mix(in srgb, var(--t-green) 45%, var(--rule)); background: color-mix(in srgb, var(--t-green) 7%, var(--label)); }
.sticker.is-got .sticker-ico { filter: none; opacity: 1; }
@media (max-width: 520px) { .stickers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.pip-buddy .pb-shield { display: none; }
.pip-buddy.wear-shield .pb-shield { display: inline; }
@media (prefers-reduced-motion: reduce) { .ring-fg { animation: none; } }
