/* WhereGoes-style tracer UI: light theme, navy shell, red action, blue headings. */

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

:root {
  --navy: #002855;
  --navy-soft: #32658d;
  --blue: #65a2c4;
  --blue-pale: #97dffc;
  --red: #a00000;
  --red-dark: #b50000;
  --ink: #212121;
  --muted: #6d6e71;
  --line: #ccc;
  --line-soft: #e6e6e6;
  --paper: #fff;
  --shell: #f9f9f9;
  --panel: #f4f4f4;
  --green: #14803c;
  --gold: #daa520;
  --radius: 3px;
  --wrap: 1250px;
  --header: 85px;
  --shadow: 0 12px 30px rgba(0, 20, 45, 0.14);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--navy);
}

a:hover {
  color: var(--red-dark);
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

h1 {
  font-size: 2.125rem;
  color: var(--blue);
}

article > header h1 {
  margin-bottom: 0;
  text-align: center;
}

article > header {
  margin-bottom: 1em;
}

h2 {
  font-size: 1.5rem;
  color: var(--navy-soft);
}

h3 {
  font-size: 1.25rem;
  color: var(--navy);
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0 0 1em;
  padding-left: 1.1em;
}

li {
  margin: 0 0 8px;
}

code,
kbd,
pre {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- shell ---------- */

.h {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: var(--header);
  background: var(--shell);
  border-bottom: 3px solid var(--line);
}

.h-in {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--wrap);
  height: 100%;
  margin: 0 auto;
  padding: 0 34px;
}

.logo-link {
  display: block;
  width: 290px;
  max-width: 62vw;
  margin-top: 6px;
}

.logo-link img {
  display: block;
  width: 100%;
}

.nav-w > ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-w > ul > li {
  position: relative;
  margin: 0;
}

.nav-w > ul > li > a {
  display: block;
  padding: 30px 10px;
  color: #222;
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-w > ul > li > a:hover,
.nav-w > ul > li.on > a {
  color: var(--navy-soft);
  text-decoration: underline;
}

.nav-w .sub-menu {
  position: absolute;
  top: 100%;
  right: 0;
  display: none;
  min-width: 250px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid #dad4cf;
  border-top: 0;
  box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.25);
}

.nav-w li.on > .sub-menu {
  display: block;
}

.nav-w .sub-menu a {
  display: block;
  padding: 12px 15px;
  border-top: 1px solid #d9d9d9;
  color: #383635;
  text-decoration: none;
}

.nav-w .sub-menu li:first-child a {
  border-top: 0;
}

.nav-w .sub-menu a:hover {
  padding-left: 28px;
  color: var(--navy-soft);
}

.nav-w .sub-menu a::before {
  content: "›";
  margin-right: 7px;
  color: var(--blue);
}

.menu-btn {
  display: none;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pg-b {
  margin-top: var(--header);
}

.pg-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 34px;
}

.pg-b .pg-in {
  padding-bottom: 54px;
}

.bread {
  padding: 18px 0 0;
  color: #999;
  font-size: 14px;
}

.bread a {
  color: #999;
  text-decoration: none;
}

.bread a:hover {
  color: #333;
}

.bread .sep {
  margin: 0 6px;
}

/* ---------- footer ---------- */

.f {
  background: var(--navy);
  color: #9aa9b8;
  text-align: center;
  padding: 30px 0 110px;
  box-shadow: 0 0 21px rgba(0, 0, 0, 0.25);
}

.f a {
  color: #dbe6f0;
}

.f-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.f-nav li {
  margin: 0;
}

.f-nav a {
  text-decoration: none;
}

.f-nav a:hover {
  text-decoration: underline;
}

.f .follow-us,
.f .review-us {
  color: #fff;
  font-size: 17px;
  margin: 0 0 14px;
}

.f .follow-us a {
  margin: 0 7px;
  text-decoration: none;
}

.f .stars {
  color: gold;
  letter-spacing: 2px;
}

.f .disclaimer,
.f .copyright {
  margin: 0 auto 10px;
  max-width: 780px;
  font-size: 14px;
  color: #b9c6d3;
}

/* ---------- tool ---------- */

.tool {
  margin: 26px auto 0;
}

.tool form {
  max-width: 960px;
}

.input-wrapper {
  display: flex;
  gap: 0;
}

#url {
  flex: 1;
  height: 55px;
  padding: 0 1em;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius) 0 0 var(--radius);
}

#url:focus {
  outline: 2px solid var(--blue-pale);
  outline-offset: -1px;
}

#form_button {
  width: 150px;
  height: 55px;
  padding: 8px 13px;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

#form_button:hover {
  background: #8a0000;
}

#form_button:disabled {
  background: #999;
  cursor: progress;
}

.advanced-options {
  padding: 0 18px;
  border-radius: 0 0 var(--radius) var(--radius);
}

.advanced-options.on {
  padding-bottom: 18px;
  background: linear-gradient(to bottom, #fff 0%, #e9e9e9 100%);
  border: 1px solid var(--line);
  border-top: 0;
}

#advanced-options {
  display: inline-block;
  padding: 14px 0 4px;
  color: #333;
  font-size: 16px;
  cursor: pointer;
  user-select: none;
}

#advanced-options span {
  text-decoration: underline;
}

#advanced-options::after {
  content: "»";
  margin-left: 4px;
}

.advanced-options .options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.advanced-options.on .options {
  max-height: 640px;
  padding-top: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > label,
.field > span {
  color: #333;
  font-size: 15px;
  font-weight: 700;
}

.field select,
.field input[type="text"],
.field input[type="number"] {
  width: 100%;
  height: 46px;
  padding: 0 10px;
  color: #444;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
}

.field input[type="text"]:focus,
.field select:focus,
.field input[type="number"]:focus {
  outline: 2px solid var(--blue-pale);
  outline-offset: -1px;
}

.field .hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.checks {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 4px 0 0;
}

.checks label {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.checks input {
  width: 17px;
  height: 17px;
  accent-color: var(--red);
}

.advanced-options .note {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.tool-msg {
  display: none;
  max-width: 960px;
  margin: 14px 0 0;
  padding: 10px 14px;
  border-left: 5px solid var(--red);
  background: #fdf3f3;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px;
}

.tool-msg.on {
  display: block;
}

/* ---------- results ---------- */

.trace-results {
  margin: 34px 0;
}

.trace-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.trace-head .date {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

.trace-head .ua {
  margin: 4px 0 0;
  font-size: 14px;
  color: #555;
  word-break: break-all;
}

.trace-head .ua b {
  color: #333;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.ok {
  color: #0c5c2c;
  background: #e3f6ea;
}

.badge.warn {
  color: #7a5200;
  background: #fff4d6;
}

.badge.bad {
  color: #8d0000;
  background: #fde8e8;
}

.summary {
  margin: 18px 0 26px;
  padding: 18px 20px;
  background: #f7fafc;
  border: 1px solid #d7e3ec;
  border-left: 6px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.summary .eyebrow {
  margin: 0 0 6px;
  color: #5b7791;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary .destination {
  display: block;
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 19px;
  font-weight: 700;
  word-break: break-all;
}

.summary .destination:hover {
  color: var(--red-dark);
}

.summary .verdict-note {
  margin: 0 0 10px;
  color: #3c556a;
  font-size: 14px;
}

.summary dl {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin: 0;
  font-size: 14px;
}

.summary dt {
  color: var(--muted);
  font-weight: 400;
}

.summary dd {
  margin: 0 0 0 6px;
  font-weight: 700;
  color: #33404d;
}

.summary .pair {
  display: flex;
  align-items: baseline;
}

.traces {
  display: table;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  word-wrap: break-word;
}

.traces .cell {
  display: table-cell;
  padding: 12px 10px;
  vertical-align: middle;
}

.traces header.row {
  display: table-row;
  background: var(--line);
}

.traces header.row .cell {
  padding: 18px 10px;
  font-size: 14px;
  font-weight: 700;
  color: #222;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.traces header.row .cell:first-child {
  border-radius: var(--radius) 0 0 0;
}

.traces header.row .cell:last-child {
  border-radius: 0 var(--radius) 0 0;
}

.traces .num {
  width: 70px;
  text-align: center;
  color: #555;
  font-weight: 700;
}

.traces .status {
  width: 100px;
  text-align: center;
}

.traces .url {
  width: auto;
  text-align: left;
  padding-left: 14px !important;
}

.trace-row {
  display: table-row;
  background: var(--paper);
  border-bottom: 1px solid #999;
  cursor: pointer;
}

.trace-row:hover {
  background: #fbfbfb;
}

.trace-row .url {
  padding: 16px 10px 16px 14px !important;
}

.trace-row .num::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 6px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid #888;
  vertical-align: middle;
  transition: transform 0.15s ease;
}

.trace-row.expanded .num::before {
  transform: rotate(90deg);
}

.trace-row .chain-url {
  display: block;
  color: #11406b;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-all;
}

.trace-row .chain-host {
  display: inline-block;
  margin-right: 3px;
  padding: 1px 6px;
  background: #eef4f9;
  border-radius: 2px;
  color: #33597a;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

.trace-row .chain-path {
  color: #5c6b78;
}

.trace-row .flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.trace-row .flags li {
  margin: 0;
  padding: 2px 7px;
  background: #f1f1f1;
  border-radius: 2px;
  color: #555;
  font-size: 12px;
}

.trace-row .flags .total-redirects {
  background: #e8f1f8;
  color: #2c5d84;
}

.details {
  display: none;
  background: #fcfcfc;
}

.details.expanded {
  display: table-row;
}

.details.expanded.last {
  border-bottom: 1px solid #999;
}

.details:hover {
  background: #f4f4f4;
}

.details .num {
  color: #999;
  font-weight: 400;
  vertical-align: top;
  padding-top: 18px !important;
}

.details .status {
  vertical-align: top;
  padding-top: 16px !important;
}

.details .status a {
  display: inline-block;
  min-width: 54px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}

.details .status a:hover {
  background: var(--blue-pale) !important;
  color: #000 !important;
}

.code-0xx {
  background: #900;
  color: #f9d000;
}

.code-1xx {
  background: #6d6e71;
  color: #fff;
}

.code-2xx {
  background: green;
  color: #fff;
}

.code-3xx {
  background: var(--blue);
  color: #000;
}

.code-4xx {
  background: var(--red-dark);
  color: #fff;
}

.code-5xx {
  background: #900;
  color: #f9d000;
}

.details .url {
  padding-top: 16px !important;
  vertical-align: top;
}

.detail-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.detail-line .full-url {
  color: #11406b;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 14px;
  word-break: break-all;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #6a7a88;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--navy);
  border-color: #9bb2c4;
  background: #eef4f9;
}

.icon-btn.on {
  color: var(--green);
  border-color: var(--green);
  background: #eefaf2;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.meta-table {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 3px 14px;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #f3f6f8;
  border: 1px solid #e0e7ec;
  border-radius: var(--radius);
  font-size: 13px;
}

.meta-table dt {
  color: var(--muted);
}

.meta-table dd {
  margin: 0;
  color: #2f3d49;
  word-break: break-all;
}

.arrow-block {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 16px;
}

.arrow-block img {
  width: 34px;
  height: auto;
}

.arrow-block a {
  color: #246e3b;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.arrow-block a:hover {
  text-decoration: underline;
}

.arrow-block .kind {
  padding: 2px 7px;
  background: #eef4f9;
  border-radius: 2px;
  color: #33597a;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.link-body {
  margin: 0;
}

.link-body summary,
.link-meta summary {
  padding: 6px 0;
  color: #33597a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.link-body summary:hover,
.link-meta summary:hover {
  color: var(--navy);
}

.link-body textarea,
.link-meta textarea {
  display: block;
  width: 100%;
  height: 190px;
  margin: 6px 0 10px;
  padding: 9px 11px;
  color: #2f3d49;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
  white-space: pre;
}

.link-meta {
  margin: 0 0 14px;
}

.good_status,
.bad_status,
.warn_status {
  display: inline-block;
  margin-top: 4px;
  font-weight: 700;
}

.good_status {
  color: #390;
}

.bad_status {
  color: #903;
}

.warn_status {
  color: #b47a00;
}

.trace-foot {
  margin-top: 18px;
}

.warnings {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.warnings li {
  margin: 0 0 5px;
  padding: 6px 10px;
  background: #fffaeb;
  border-left: 3px solid var(--gold);
  color: #6a520e;
  font-size: 13px;
  border-radius: 0 2px 2px 0;
}

.disclaimer {
  margin: 28px 0 0;
  padding: 12px 14px;
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  color: #4b4b4b;
  font-size: 14px;
  line-height: 1.55;
}

.disclaimer b {
  color: #8a3a00;
}

.share-trace {
  margin-top: 26px;
  padding: 20px 22px;
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.share-trace h3 {
  margin: 0 0 6px;
  color: #32658d;
  font-size: 19px;
}

.share-trace p {
  margin: 0;
  color: #33404d;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
}

.share-trace:hover {
  background: #f1f6fa;
}

.share-trace.copied {
  border-color: var(--green);
  background: #eefaf2;
}

.share-trace .hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
}

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

.export-row a,
.export-row button {
  padding: 8px 13px;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.export-row a:hover,
.export-row button:hover {
  background: #eef4f9;
  border-color: #9bb2c4;
}

/* ---------- content ---------- */

.c {
  max-width: 960px;
}

.c h2 {
  margin-top: 38px;
}

.c ul li {
  list-style: none;
  position: relative;
}

.c ul li::before {
  content: "›";
  position: absolute;
  left: -14px;
  color: #497593;
  font-weight: 700;
}

.promoted {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
  margin: 30px 0;
}

.promoted a {
  display: block;
  padding: 16px 18px;
  color: var(--navy);
  background: #f4f8fb;
  border: 1px solid #dce7ef;
  border-radius: var(--radius);
  text-decoration: none;
}

.promoted a:hover {
  border-color: var(--blue);
  background: #eaf3f9;
}

.promoted b {
  display: block;
  margin-bottom: 3px;
}

.promoted span {
  color: #55708a;
  font-size: 14px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin: 20px 0 30px;
  padding: 0;
  list-style: none;
}

.cards li {
  margin: 0;
}

.cards li::before {
  display: none;
}

.cards a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--line);
  border-radius: 2px;
  text-decoration: none;
}

.cards a:hover {
  border-left-color: var(--blue);
  background: #f7fafc;
}

.cards .code {
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 700;
  color: #33404d;
}

.cards .name {
  color: #66737f;
  font-size: 13px;
  text-align: right;
}

.cards li[data-group="2xx"] a {
  border-left-color: green;
}

.cards li[data-group="3xx"] a {
  border-left-color: var(--blue);
}

.cards li[data-group="4xx"] a {
  border-left-color: var(--red-dark);
}

.cards li[data-group="5xx"] a {
  border-left-color: #900;
}

.prose {
  font-size: 17px;
  line-height: 1.7;
}

.prose h2 {
  font-size: 1.45rem;
}

.panel {
  margin: 22px 0;
  padding: 18px 20px;
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: var(--radius);
}

.panel h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.panel p:last-child {
  margin-bottom: 0;
}

.prose .btn {
  display: inline-block;
  padding: 11px 18px;
  color: #fff;
  background: var(--red);
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}

.prose .btn:hover {
  background: #8a0000;
  color: #fff;
}

.kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 16px;
  margin: 16px 0;
  padding: 14px 16px;
  background: #f7fafc;
  border: 1px solid #dde7ee;
  border-radius: var(--radius);
}

.kv dt {
  color: var(--muted);
  font-size: 14px;
}

.kv dd {
  margin: 0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
}

.tag.green {
  background: #e3f6ea;
  color: #0c5c2c;
}

.tag.red {
  background: #fde8e8;
  color: #8d0000;
}

.tag.blue {
  background: #e8f1f8;
  color: #2c5d84;
}

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

.table th,
.table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.table th {
  background: #f3f3f3;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table td.mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  padding: 10px 16px;
  color: #fff;
  background: #123;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.toast.on {
  opacity: 1;
  transform: translateY(0);
}

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 7px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .menu-btn {
    display: block;
  }

  .nav-w {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 40;
    width: min(340px, 88vw);
    padding: 76px 22px 26px;
    background: var(--paper);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.2);
    transform: translateX(105%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }

  .nav-w.on {
    transform: translateX(0);
  }

  .nav-w > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-w > ul > li > a {
    padding: 15px 4px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 18px;
  }

  .nav-w .sub-menu {
    position: static;
    display: block;
    min-width: 0;
    border: 0;
    box-shadow: none;
  }

  .nav-w .sub-menu a {
    padding-left: 16px;
    border-top: 0;
    font-size: 15px;
  }

  .nav-close {
    position: absolute;
    top: 17px;
    right: 18px;
    width: 38px;
    height: 38px;
    background: #f1f1f1;
    border: 0;
    border-radius: 50%;
    color: #333;
    font-size: 20px;
    cursor: pointer;
  }

  .overlay {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 10, 25, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
  }

  .overlay.on {
    opacity: 1;
    pointer-events: auto;
  }

  .h-in {
    padding: 0 20px;
  }

  .pg-in {
    padding: 0 20px;
  }

  h1 {
    font-size: 1.75rem;
  }
}

@media (max-width: 700px) {
  .trace-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .traces,
  .traces header.row,
  .trace-row,
  .details,
  .details.expanded {
    display: block;
  }

  .traces header.row {
    display: none;
  }

  .trace-row {
    border-top: 1px solid #999;
    padding: 6px 0;
  }

  .trace-row .cell,
  .traces .cell {
    display: block;
    width: auto;
    text-align: left;
    padding: 2px 0 !important;
  }

  .trace-row .num {
    display: inline-block;
    width: auto;
    margin-right: 8px;
  }

  .trace-row .status {
    display: inline-block;
    width: auto;
    font-weight: 700;
  }

  .trace-row .num::before {
    display: none;
  }

  .details.expanded {
    padding: 8px 0 14px;
    border-bottom: 1px solid #f0f0f0;
  }

  .details .status a {
    padding: 5px 9px;
  }

  .details .num {
    display: none;
  }

  .input-wrapper {
    flex-direction: column;
  }

  #url {
    flex: none;
    height: 55px;
    border-radius: var(--radius);
  }

  #form_button {
    width: 100%;
    margin-top: 8px;
    border-radius: var(--radius);
  }

  .summary .destination {
    font-size: 16px;
  }

  .f {
    padding-bottom: 40px;
  }
}

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

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
