/* ipssl.cc landing page. Sibling of berry.pub: cool grey ground, white
   panels with hairlines, indigo #4f46e5 for the address inside a name. */

:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --soft: #eef2ff;
  --soft-line: #dcdffb;
  --text: #151b2b;
  --muted: #57637a;
  --line: #e0e4eb;
  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --button: #4f46e5;
  --button-hover: #4338ca;
  --focus: rgb(79 70 229 / 0.16);
  --selection: rgb(79 70 229 / 0.18);
  --code-bg: #151b2b;
  --code-line: rgb(255 255 255 / 0.08);
  --code-border: transparent;
  --code-text: #e6e9f2;
  --code-muted: #95a0b8;
  --code-accent: #a5b4fc;
  --ok: #047857;
  --warn: #b45309;
  --bad: #b91c1c;
  --code-warn: #fbbf24;
  --shadow: 0 1px 2px rgb(21 27 43 / 0.05), 0 6px 14px -8px rgb(21 27 43 / 0.12);
  --radius: 14px;
  --radius-sm: 7px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0a0f1d;
    --panel: #121827;
    --soft: #1d2440;
    --soft-line: #2c3562;
    --text: #f1f5f9;
    --muted: #b4bfce;
    --line: #293245;
    --accent: #818cf8;
    --accent-strong: #a5b4fc;
    --button: #6265ef;
    --button-hover: #4f46e5;
    --focus: rgb(129 140 248 / 0.22);
    --selection: rgb(129 140 248 / 0.3);
    --code-bg: #070b16;
    --code-line: rgb(255 255 255 / 0.07);
    --code-border: var(--line);
    --ok: #34d399;
    --warn: #fbbf24;
    --bad: #f87171;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 14px -8px rgb(0 0 0 / 0.5);
  }
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  scrollbar-color: var(--line) transparent;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--sans);
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--selection);
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

code,
pre {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

/* Chinese headings break at punctuation, not inside a word. */
:lang(zh) :is(h1, h2, h3) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

p {
  text-wrap: pretty;
}

.wrap {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--button);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus,
.skip:hover {
  top: 12px;
  color: #fff;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Inline code inside prose */

.lead code,
.note code,
.rules code,
.notes code,
.faq-list code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--text);
  font-size: 0.9em;
  white-space: nowrap;
}

/* Header */

.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--button);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
  text-decoration: none;
}

.brand:hover {
  background: var(--button-hover);
  color: #fff;
}

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 14.5px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang {
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s;
}

.lang:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-link {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.icon-link svg {
  width: 20px;
  height: 20px;
}

.icon-link:hover {
  background: var(--soft);
  color: var(--text);
}

/* Buttons */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.button.primary {
  background: var(--button);
  color: #fff;
}

.button.primary:hover {
  background: var(--button-hover);
  color: #fff;
}

.button.ghost {
  padding-inline: 4px;
  color: var(--text);
}

.button.ghost:hover {
  color: var(--accent);
}

.button.secondary {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.button:disabled {
  cursor: progress;
  opacity: 0.7;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 64px;
  /* Top-aligned so the copy stays put when the live check grows the panel. */
  align-items: start;
  padding: 76px 0 40px;
}

.hero-copy {
  padding-top: 84px;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(2.5rem, 1.4rem + 3.3vw, 3.65rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.accent {
  color: var(--accent);
}

.lead {
  max-width: 33em;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.stack {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* Converter */

.tool {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tool-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.ip-input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font: 500 18px/1 var(--mono);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.ip-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 4px var(--focus);
}

.ip-input[aria-invalid="true"] {
  border-color: var(--bad);
}

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
}

.examples span {
  margin-right: 2px;
}

.examples button {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: 12.5px/1.5 var(--mono);
  transition: border-color 0.15s, color 0.15s;
}

.examples button:hover {
  border-color: var(--soft-line);
  color: var(--accent);
}

.tool-status {
  min-height: 1.6em;
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.tool-status strong {
  margin-right: 8px;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--accent);
  font: 600 12px/1.6 var(--mono);
}

.tool-status[data-kind="private"] strong,
.tool-status[data-kind="other"] strong {
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  color: var(--warn);
}

.tool-status[data-kind="error"] {
  color: var(--bad);
}

.results {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.results li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.host {
  font: 500 15px/1.45 var(--mono);
  overflow-wrap: anywhere;
}

.host .a,
.forms .a {
  color: var(--accent);
}

.host .z,
.forms .z {
  color: var(--muted);
}

.tag {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.tag.rec {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-weight: 600;
}

.copy {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  transition: background-color 0.15s, color 0.15s;
}

.copy:hover {
  background: var(--soft);
  color: var(--accent);
}

.copy[data-copied] {
  color: var(--ok);
}

.check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 18px;
}

.check-note {
  flex: 1 1 220px;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* Live check: the path a query takes, lit up while it runs. */

.trace {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg);
}

.trace-path {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
}

.trace-path li {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
}

.trace-path li:first-child {
  flex: none;
}

.trace-path li + li::before {
  content: "";
  flex: 1 1 16px;
  min-width: 12px;
  height: 2px;
  margin: 0 8px;
  border-radius: 2px;
  background: var(--line);
  background-size: 200% 100%;
}

.trace-path span {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  white-space: nowrap;
  transition: border-color 0.3s, color 0.3s;
}

.trace[data-state="run"] .trace-path li + li::before {
  background-image: linear-gradient(90deg, var(--line) 0 35%, var(--accent) 50%, var(--line) 65% 100%);
  animation: travel 1.1s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.trace[data-state="run"] .trace-path li:nth-child(3)::before {
  animation-delay: 0.35s;
}

.trace[data-state="ok"] .trace-path li + li::before {
  background: var(--accent);
}

.trace[data-state="ok"] .trace-path span {
  border-color: var(--soft-line);
  color: var(--text);
}

.trace[data-state="bad"] .trace-path li + li::before {
  background: color-mix(in srgb, var(--bad) 50%, var(--line));
}

@keyframes travel {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -100% 0;
  }
}

.answer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-height: 1.5em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.answer code {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.answer .verdict {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.answer .verdict .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.answer[data-state="ok"] .verdict {
  color: var(--ok);
}

.answer[data-state="bad"] .verdict {
  color: var(--bad);
}

/* Sections */

.section {
  padding-top: 104px;
}

.section-head {
  margin-bottom: 36px;
}

.section-head h2 {
  max-width: 24em;
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 1.25rem + 1.3vw, 2.15rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.section-head p {
  max-width: 40em;
  margin: 0;
  color: var(--muted);
}

/* Anatomy of a name: dimension lines under each part. */

.anatomy {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 22px 0;
  margin: 0 0 28px;
  padding: 40px 36px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.seg {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.seg code {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 1px 14px;
  font-size: clamp(1.35rem, 0.75rem + 2.3vw, 2.35rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

/* The dimension line with an end tick on each side. */
.seg code::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 9px;
  border: 2px solid currentColor;
  border-top: 0;
  opacity: 0.45;
}

.seg .cap {
  max-width: 15em;
  margin-top: 10px;
  padding-right: 18px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.seg-label code {
  color: var(--muted);
}

.seg-label code::after {
  border-style: dashed;
}

.seg-addr code {
  color: var(--accent);
}

.seg-addr code::after {
  opacity: 0.8;
}

.seg-zone code {
  color: var(--text);
}

.seg-result {
  margin-left: auto;
  padding-left: 28px;
}

.seg-result code {
  color: var(--text);
}

.seg-result code::after {
  display: none;
}

.seg-result .icon {
  width: 0.9em;
  height: 0.9em;
  color: var(--accent);
  stroke-width: 2;
}

.seg-result .cap {
  padding-left: calc(0.9em + 14px);
}

/* Forms table */

.forms-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.forms {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.forms th {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 70%, var(--panel));
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
}

.forms td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.forms tr:last-child td {
  border-bottom: 0;
}

.forms td.n code {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.forms td.r code {
  color: var(--text);
  white-space: nowrap;
}

.forms td.note {
  color: var(--muted);
  font-size: 13.5px;
}

.forms td.note strong {
  color: var(--text);
}

.rules h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.rules ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14.5px;
}

.rules li:last-child {
  border-bottom: 0;
}

/* HTTPS */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 64px;
  align-items: start;
}

.split .section-head {
  margin-bottom: 0;
}

.notes {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.notes li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14.5px;
}

.notes strong {
  color: var(--text);
}

.code-panel {
  position: sticky;
  top: 24px;
  overflow: hidden;
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-text);
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 10px;
  border-bottom: 1px solid var(--code-line);
}

.tabs button {
  padding: 6px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--code-muted);
  font: 13px/1.4 var(--mono);
  transition: background-color 0.15s, color 0.15s;
}

.tabs button:hover {
  color: var(--code-text);
}

.tabs button[aria-selected="true"] {
  background: rgb(255 255 255 / 0.09);
  color: #fff;
}

.snip:focus-visible {
  outline-offset: -2px;
}

.snip pre {
  margin: 0;
  padding: 24px 24px 22px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.75;
  scrollbar-color: rgb(255 255 255 / 0.15) transparent;
}

.snip .prompt,
.snip .comment {
  color: var(--code-muted);
  user-select: none;
}

.snip .host-slot {
  color: var(--code-accent);
}

.snip-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 24px;
  border-top: 1px solid var(--code-line);
}

.snip-foot p {
  margin: 0;
  color: var(--code-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.snip-foot p[data-kind="private"],
.snip-foot p[data-kind="other"] {
  color: var(--code-warn);
}

.copy-dark {
  color: var(--code-muted);
}

.copy-dark:hover {
  background: rgb(255 255 255 / 0.08);
  color: #fff;
}

.copy-dark[data-copied] {
  color: #34d399;
}

/* Name servers */

.servers {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.ns-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.ns-list li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 6px 24px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.ns-list li:last-child {
  border-bottom: 0;
}

.ns-name code {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.ns-name span {
  color: var(--muted);
  font-size: 13.5px;
}

.ns-addrs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ns-addrs code {
  color: var(--muted);
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.facts {
  margin: 0;
}

.facts div {
  padding: 16px 0 18px;
  border-top: 1px solid var(--line);
}

.facts div:first-child {
  padding-top: 0;
  border-top: 0;
}

.facts dt {
  font-size: 15px;
  font-weight: 600;
}

.facts dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* FAQ */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 48px;
  align-items: start;
}

.faq .section-head {
  position: sticky;
  top: 24px;
  margin-bottom: 0;
}

.faq-list details {
  border-top: 1px solid var(--line);
}

.faq-list details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  padding: 18px 44px 18px 0;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary:hover {
  color: var(--accent);
}

/* Plus sign that turns into a minus when open. */
.faq-list summary::before,
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--muted);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-list summary::after {
  transform: rotate(90deg);
}

.faq-list details[open] summary::after {
  transform: rotate(0deg);
}

.faq-list details p {
  max-width: 64ch;
  margin: -4px 0 20px;
  color: var(--muted);
}

/* Closing panel */

.closing {
  padding-top: 104px;
}

/* Copy and buttons share the first row; the command gets the full width. */
.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px 40px;
  align-items: end;
  padding: 44px;
  border-radius: 16px;
  background: var(--soft);
}

.cta-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.cta-copy p {
  margin: 0;
  color: var(--muted);
}

.cmd {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 10px 14px 18px;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  background: var(--panel);
}

.cmd pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  scrollbar-color: var(--soft-line) transparent;
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 80px;
  padding: 26px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}

.footer-brand {
  color: var(--text);
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-links a {
  text-decoration: none;
}

/* Responsive */

@media (max-width: 960px) {
  .hero,
  .split,
  .servers,
  .faq,
  .cta-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    gap: 44px;
    padding-top: 56px;
  }

  .hero-copy {
    padding-top: 0;
  }

  .split,
  .faq {
    gap: 32px;
  }

  .faq .section-head,
  .code-panel {
    position: static;
  }

  .forms-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .seg-result {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(1120px, 100% - 32px);
  }

  .header-row {
    gap: 16px;
    padding: 16px 0;
  }

  .nav {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .hero {
    padding-top: 44px;
  }

  .lead {
    font-size: 16px;
  }

  .tool {
    padding: 18px;
  }

  .ip-input {
    font-size: 16px;
  }

  .results li {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 8px;
  }

  .results .tag {
    grid-row: 2;
    justify-self: start;
  }

  .results .copy {
    grid-row: 1 / span 2;
    grid-column: 2;
  }

  .results .host {
    font-size: 14px;
  }

  .trace {
    padding: 12px;
  }

  .trace-path {
    font-size: 11.5px;
  }

  .trace-path span {
    padding: 2px 7px;
  }

  .trace-path li + li::before {
    min-width: 8px;
    margin: 0 5px;
  }

  .section,
  .closing {
    padding-top: 80px;
  }

  .anatomy {
    padding: 28px 20px 22px;
  }

  /* The answer gets its own line under the name. */
  .seg-result {
    flex-basis: 100%;
    padding-left: 0;
  }

  .forms thead {
    display: none;
  }

  .forms tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }

  .forms tr:last-child {
    border-bottom: 0;
  }

  .forms td {
    padding: 0;
    border: 0;
  }

  .forms td.note {
    grid-column: 1 / -1;
    margin-top: 2px;
  }

  .forms td.note:empty {
    display: none;
  }

  .forms td.n code {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ns-list li {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }

  .cta-panel {
    padding: 28px 20px;
  }

  .cmd {
    padding-left: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 404 page */

.not-found {
  padding: 96px 0 140px;
}

.nf-name,
.nf-arrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: clamp(1.6rem, 1rem + 2.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.3;
}

.nf-name code {
  color: var(--accent);
}

.nf-arrow {
  margin-bottom: 40px;
  color: var(--muted);
}

.nf-arrow .icon {
  width: 0.9em;
  height: 0.9em;
  stroke-width: 2;
}

.not-found h1 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.1rem);
  letter-spacing: -0.025em;
}
