:root {
  color-scheme: light dark;
  --background: #faf9f5;
  --surface: #fffefa;
  --foreground: #292722;
  --muted: #655f56;
  --line: #ded9ce;
  --soft: #f2eee5;
  --accent: #a44225;
  --accent-hover: #84351d;
  --button-text: #fff;
  --error: #9e2d27;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--sans);
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #242321;
    --surface: #2e2c27;
    --foreground: #f5f2e9;
    --muted: #c0b8ab;
    --line: #4b463f;
    --soft: #39342b;
    --accent: #f2ab8e;
    --accent-hover: #ffc1a7;
    --button-text: #2a1811;
    --error: #ffa59d;
  }
}
* { box-sizing: border-box }
body { margin: 0; color: var(--foreground); background: var(--background); line-height: 1.55 }
a { color: var(--accent); text-underline-offset: .21em }
.header { border-bottom: 1px solid var(--line) }
.bar, .layout { max-width: 73rem; width: calc(100% - 3rem); margin-inline: auto }
.bar { min-height: 4.25rem; display: flex; align-items: center; gap: 1rem }
.brand { color: var(--foreground); font-weight: 750; font-size: 1.25rem; text-decoration: none; letter-spacing: -.05em }
.brand span { color: var(--accent) }
.header-label { font-size: .875rem; color: var(--muted); padding-left: 1rem; border-left: 1px solid var(--line) }
.layout { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); padding-block: clamp(1.5rem, 4vw, 3.5rem) }
nav { display: flex; flex-direction: column; gap: .25rem; padding-top: .45rem }
nav a { text-decoration: none; border-radius: .5rem; color: var(--muted); padding: .65rem .8rem; font-size: .9375rem; white-space: nowrap }
nav a:hover, nav a[aria-current] { background: var(--soft); color: var(--foreground) }
nav a[aria-current] { font-weight: 680; color: var(--accent) }
main { min-width: 0 }
h1 { font-size: clamp(2rem, 4vw, 3.125rem); letter-spacing: -.045em; line-height: 1.08; margin: 0 }
h2 { font-size: 1.125rem; margin: 0 0 .75rem; letter-spacing: -.015em }
p { margin: .55rem 0 }
.intro p { color: var(--muted); max-width: 42rem; margin-top: .9rem }
form { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin: 1.65rem 0 1rem }
.field { width: min(100%, 22rem); display: grid; gap: .3rem }
label, dt { color: var(--muted); font-size: .875rem }
input, select, button { font: inherit; min-height: 2.75rem; border: 1px solid var(--line); border-radius: .5rem; padding: .55rem .8rem }
input, select { color: var(--foreground); background: var(--surface); width: 100% }
select { appearance: none; padding-right: 1.75rem; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 1rem center, right .75rem center; background-size: .25rem .25rem; background-repeat: no-repeat }
button { font-size: .9375rem; color: var(--button-text); background: var(--accent); border-color: var(--accent); font-weight: 680; cursor: pointer }
button:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover) }
button:disabled { opacity: .65; cursor: progress }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px }
#status:not(:empty) { margin: .75rem 0; color: var(--muted) }
#status.error { color: var(--error) }
#result { display: grid; gap: .75rem }
.card { padding: clamp(1rem, 3vw, 1.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; overflow-wrap: anywhere }
.card > :last-child { margin-bottom: 0 }
dl { display: grid; grid-template-columns: minmax(6.5rem, .9fr) minmax(0, 2fr); gap: .5rem 1rem; margin: 0 }
dd { margin: 0 }
code { font-size: .95em; font-family: ui-monospace, "Cascadia Code", monospace }
.ip-number { display: block; margin-bottom: .85rem; font-size: clamp(1.1rem, 3vw, 1.6rem); font-weight: 650 }
ul { padding-left: 1.2rem; margin: .65rem 0 0 }
details { margin-top: .95rem; font-size: .875rem }
summary { cursor: pointer; font-weight: 600; width: fit-content }
.policy { margin-top: 1.2rem; font-size: .875rem }
.note { font-size: .9rem; color: var(--muted) }
@media (max-width: 42rem) {
  .bar, .layout { width: calc(100% - 2rem) }
  .layout { display: block }
  nav { flex-direction: row; flex-wrap: wrap; margin-bottom: 1.6rem; padding-top: 0 }
  nav a { padding: .45rem .65rem }
}
