/* ============ Base ============ */

:root {
  --bg: #141526;
  --bg-elev: #1b1c30;
  --bg-elev-2: #23243b;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);
  --text: #ffffff;
  --muted: #8f93b3;
  --blue: #1799d6;
  --blue-soft: rgba(23, 153, 214, 0.16);
  --green: #2ec866;
  --violet: #8a5cf6;
  --amber: #ffb400;
  --shell: 1160px;
  --header-h: 64px;
  --font: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

body.drawer-open { overflow: hidden; }

a { color: inherit; }

button { font-family: inherit; }

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
}

.link-btn {
  background: none;
  border: 0;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  opacity: 0.85;
  padding: 6px 2px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.link-btn:hover { opacity: 1; text-decoration: underline; }
.link-btn.small { font-size: 12px; color: var(--blue); opacity: 1; }

.ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 8px 18px;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

.primary-btn {
  background: var(--blue);
  border: 1px solid var(--blue);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 9px 24px;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, transform 0.15s, box-shadow 0.2s;
}

.primary-btn:hover {
  background: #1a86ba;
  box-shadow: 0 6px 22px rgba(23, 153, 214, 0.35);
}

.primary-btn:active, .ghost-btn:active { transform: translateY(1px); }

.is-nudged { animation: nudge 0.45s var(--ease); }

@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ============ Header ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  transition: background 0.25s, box-shadow 0.25s;
}

.site-header.is-scrolled {
  background: rgba(20, 21, 38, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-mark { width: 30px; height: 30px; color: var(--blue); }

.brand-name { font-size: 19px; font-weight: 300; letter-spacing: 0.14em; }
.brand-name b { font-weight: 700; }

.main-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  margin-right: auto;
  height: 100%;
}

.nav-item { position: relative; display: flex; align-items: center; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  opacity: 0.85;
  position: relative;
  transition: opacity 0.15s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s var(--ease);
}

.nav-item:hover .nav-link,
.nav-item.is-open .nav-link { opacity: 1; }

.nav-item:hover .nav-link::after,
.nav-item.is-open .nav-link::after,
.nav-item.is-current .nav-link::after { transform: scaleX(1); }

.caret {
  width: 9px;
  height: 6px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
  transition: transform 0.25s var(--ease);
}

.nav-item.is-open .caret { transform: rotate(180deg); }

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

.icon-btn.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.icon-btn.burger span {
  display: block;
  height: 2px;
  width: 22px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.28s var(--ease), opacity 0.2s;
}

.burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-active span:nth-child(2) { opacity: 0; }
.burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Mega menu ---- */

.mega {
  position: absolute;
  top: 100%;
  left: -20px;
  width: max-content;
  max-width: min(92vw, 940px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  z-index: 70;
}

.nav-item.is-open .mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(6px);
}

.mega-inner {
  display: grid;
  /* --cols do layout.js đặt theo số nhóm, khối promo luôn nằm ở cột cuối. */
  grid-template-columns: repeat(var(--cols, 2), minmax(168px, 1fr)) 196px;
  gap: 26px;
  padding: 26px 28px;
}

.mega-title {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.mega-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

.mega-list a {
  display: block;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.16s, transform 0.16s;
}

.mega-list a:hover { background: rgba(255, 255, 255, 0.06); transform: translateX(3px); }

.mega-name { display: block; font-size: 14px; }
.mega-desc { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }

.mega-promo {
  background: linear-gradient(160deg, var(--blue-soft), rgba(138, 92, 246, 0.12));
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mega-kicker {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
}

.mega-promo p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }

.mega-cta {
  margin-top: auto;
  font-size: 13px;
  color: #fff;
  text-decoration: none;
  transition: transform 0.16s;
  display: inline-block;
}

.mega-cta:hover { transform: translateX(3px); }

/* ---- Drawer (mobile) ---- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 16, 0.65);
  backdrop-filter: blur(2px);
  z-index: 80;
  animation: fadeIn 0.2s var(--ease);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 86vw);
  background: var(--bg-elev);
  border-left: 1px solid var(--line);
  z-index: 90;
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer.is-open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-close {
  background: none;
  border: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.drawer-nav { padding: 8px 0 32px; }

.drawer-group { border-bottom: 1px solid var(--line-soft); }

.drawer-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: 0;
  color: #fff;
  font-size: 15px;
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
}

.drawer-toggle .caret { transition: transform 0.25s var(--ease); }
.drawer-toggle.is-open .caret { transform: rotate(180deg); }

.drawer-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}

.drawer-panel a {
  display: block;
  padding: 10px 20px 10px 32px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.drawer-panel a:hover { background: rgba(255, 255, 255, 0.05); }

.drawer-sub {
  margin: 10px 0 2px;
  padding: 0 20px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.drawer-main-link { color: var(--blue) !important; padding-bottom: 16px !important; }

.drawer-plain {
  display: block;
  padding: 16px 20px;
  font-size: 15px;
  text-decoration: none;
}

/* ============ Footer ============ */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  margin-top: auto;
  padding: 44px 0 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 32px;
}

.footer-brand p {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 240px;
  line-height: 1.6;
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }

.footer-col a {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.15s, transform 0.15s;
  display: inline-block;
}

.footer-col a:hover { color: #fff; transform: translateX(2px); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.footer-note { margin: 0; font-size: 12px; color: var(--muted); }

.footer-legal { display: flex; gap: 20px; }

.footer-legal a { font-size: 12px; color: var(--muted); text-decoration: none; }
.footer-legal a:hover { color: #fff; }

/* ============ Back to top ============ */

#backToTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(27, 28, 48, 0.9);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 50;
  font-size: 18px;
}

#backToTop.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#backToTop:hover { background: var(--blue); border-color: var(--blue); }

/* ============ Trang đo tốc độ ============ */

.stage {
  flex: 1;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 8px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Quầng sáng phía sau đồng hồ, đổi màu theo pha đang đo. */
.stage::before {
  content: "";
  position: absolute;
  top: 90px;
  left: 50%;
  width: 760px;
  height: 760px;
  max-width: 120vw;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(23, 153, 214, 0.13), transparent 70%);
  opacity: 0.6;
  transition: background 0.6s var(--ease), opacity 0.6s var(--ease);
  pointer-events: none;
  z-index: -1;
}

body.is-testing .stage::before { opacity: 1; }

body.phase-download .stage::before {
  background: radial-gradient(closest-side, rgba(46, 200, 102, 0.16), transparent 70%);
}

body.phase-upload .stage::before {
  background: radial-gradient(closest-side, rgba(138, 92, 246, 0.16), transparent 70%);
}

.metrics {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: start;
  gap: 12px;
  padding: 22px 0 4px;
  min-height: 104px;
}

.metric { text-align: center; }
.metric--ping { text-align: left; }

.metric-sub { display: flex; gap: 34px; }

.sub { display: flex; flex-direction: column; }

.sub-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

.sub-label i { font-style: normal; font-size: 10px; opacity: 0.75; }

.sub-value {
  font-size: 26px;
  font-weight: 300;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.metric-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.metric-label i { font-style: normal; font-size: 10px; letter-spacing: 0.1em; opacity: 0.8; }

.arrow {
  width: 17px;
  height: 17px;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric--down .arrow { stroke: var(--green); }
.metric--up .arrow { stroke: var(--violet); }

.metric-value {
  display: block;
  font-size: 54px;
  font-weight: 200;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.metric.is-active .metric-value { color: #fff; }
.metric.is-idle .metric-value { color: rgba(255, 255, 255, 0.35); }

.gauge-area { display: flex; flex-direction: column; align-items: center; margin-top: 4px; }

.gauge { position: relative; width: min(460px, 82vw); aspect-ratio: 1; }

.gauge-svg { width: 100%; height: 100%; overflow: visible; }

.gauge-track { stroke: rgba(255, 255, 255, 0.12); stroke-width: 3; }

.gauge-progress {
  stroke: var(--blue);
  stroke-width: 3;
  transition: stroke 0.35s;
  filter: drop-shadow(0 0 6px rgba(23, 153, 214, 0.55));
}

.gauge.phase-download .gauge-progress { stroke: var(--green); filter: drop-shadow(0 0 6px rgba(46, 200, 102, 0.55)); }
.gauge.phase-upload .gauge-progress { stroke: var(--violet); filter: drop-shadow(0 0 6px rgba(138, 92, 246, 0.55)); }

.ticks {
  opacity: 1;
  transition: opacity 0.16s var(--ease);
}

/* Khi thang đo tự giãn, vạch chia mờ đi rồi hiện lại với mốc mới. */
.ticks.is-swapping { opacity: 0; }

.ticks line { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.5; }

.ticks text {
  fill: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-family: var(--font);
  text-anchor: middle;
  dominant-baseline: middle;
}

.needle path {
  fill: rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}

.needle-tip {
  fill: #fff;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.65));
}

.needle {
  transform-origin: 230px 230px;
  transform: rotate(225deg);   /* vị trí nghỉ = vạch 0 ở góc dưới bên trái */
  opacity: 0;
  transition: opacity 0.3s;
}

.gauge.is-testing .needle { opacity: 1; }


.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: none;
}

.go-btn {
  pointer-events: auto;
  position: relative;
  width: 43%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font-size: clamp(28px, 6.2vw, 44px);
  font-weight: 300;
  letter-spacing: 0.1em;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.3s;
  animation: goIn 0.45s var(--ease);
}

/* Vòng sáng lan ra từ nút GO khi đang chờ, nhịp chậm cho đỡ gây nhiễu. */
.go-btn::before,
.go-btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  opacity: 0;
  animation: goPulse 3.2s var(--ease) infinite;
  pointer-events: none;
}

.go-btn::after { animation-delay: 1.6s; }

@keyframes goPulse {
  0% { transform: scale(1); opacity: 0.5; }
  70% { opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes goIn {
  from { transform: scale(0.86); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.go-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
  box-shadow: 0 0 46px rgba(23, 153, 214, 0.3);
}

.go-btn:active { transform: scale(0.97); }
.go-btn[hidden] { display: none; }

.gauge-readout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: readoutIn 0.4s var(--ease);
}

.gauge-readout[hidden] { display: none; }

@keyframes readoutIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.readout-phase {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.readout-arrow {
  width: 14px;
  height: 14px;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: var(--green);
  opacity: 0;
  transition: opacity 0.25s, stroke 0.3s;
}

body.phase-upload .readout-arrow { stroke: var(--violet); }

.readout-value {
  font-size: clamp(40px, 9vw, 64px);
  font-weight: 200;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: font-size 0.2s var(--ease);
}

/* Số dài (đường truyền hàng Gbps) thu nhỏ lại để không tràn khỏi vòng trong. */
.readout-value.is-long { font-size: clamp(30px, 6vw, 44px); }
.readout-value.is-longer { font-size: clamp(24px, 4.6vw, 34px); }

.readout-unit { font-size: 13px; letter-spacing: 0.16em; color: var(--muted); }

.live-graph {
  width: min(460px, 82vw);
  margin-top: -18px;
  animation: liveIn 0.4s var(--ease);
}

.live-graph[hidden] { display: none; }

.live-graph canvas { display: block; width: 100%; height: 76px; }

@keyframes liveIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.gauge-status {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  min-height: 20px;
}

.connection {
  width: 100%;
  max-width: 720px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.conn-side { display: flex; align-items: center; gap: 12px; }
.conn-server { justify-content: flex-end; text-align: right; }

.conn-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  fill: none;
  stroke: rgba(255, 255, 255, 0.65);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.conn-server .conn-icon { stroke: var(--blue); }

.conn-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }

.conn-text strong {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conn-text span { font-size: 12px; color: var(--muted); }
.conn-server .conn-text { align-items: flex-end; }

.conn-line { display: flex; gap: 6px; align-items: center; }

.conn-line span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

body.is-testing .conn-line span { animation: flow 1.2s infinite; }
body.is-testing .conn-line span:nth-child(2) { animation-delay: 0.2s; }
body.is-testing .conn-line span:nth-child(3) { animation-delay: 0.4s; }

@keyframes flow {
  0%, 100% { background: rgba(255, 255, 255, 0.25); }
  50% { background: var(--blue); }
}

.result-panel {
  width: 100%;
  max-width: 720px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.result-panel[hidden] { display: none; }

.result-graph canvas { width: 100%; height: 140px; display: block; }

.result-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.result-note { font-size: 12px; color: var(--muted); }

/* ============ Responsive ============ */

@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .icon-btn.burger { display: flex; }
  .header-actions .link-btn,
  .header-actions .ghost-btn { display: none; }
  .header-inner { justify-content: space-between; gap: 12px; }
  .brand { margin-right: auto; }
}

@media (max-width: 700px) {
  .metrics {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "ping ping" "down up";
    gap: 16px 12px;
    text-align: center;
  }
  .metric--ping { grid-area: ping; text-align: center; }
  .metric--down { grid-area: down; }
  .metric--up { grid-area: up; }
  .metric-sub { justify-content: center; gap: 40px; }
  .metric-value { font-size: 40px; }
  .conn-icon { width: 24px; height: 24px; }
  .conn-text strong { font-size: 12px; }
  .conn-text span { font-size: 11px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
