﻿:root {
  color-scheme: light;
  --bg: #f7fbff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-strong: #f1f7fb;
  --line: rgba(15, 23, 42, 0.12);
  --line-strong: rgba(15, 23, 42, 0.2);
  --text: #101827;
  --muted: #5b677a;
  --soft: #8090a4;
  --primary: #0f6fff;
  --primary-strong: #0756cf;
  --cyan: #00a9c7;
  --green: #18a957;
  --amber: #b77400;
  --danger: #d92d20;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 8px;
  --max: 1200px;
  --measure: 760px;
  --focus: 0 0 0 3px rgba(15, 111, 255, 0.24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(rgba(15, 111, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 169, 199, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 46%, #f5f9fc 100%);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 10000;
  transform: translateY(-130%);
  background: var(--text);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(247, 251, 255, 0.82);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, var(--max));
  min-height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 720;
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(90deg, #ef4444 0 33%, #22c55e 33% 66%, #2563eb 66% 100%);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.86), 0 8px 22px rgba(15, 111, 255, 0.14);
}

.brand span:last-child {
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 620;
}

.main-nav a,
.main-nav button {
  min-height: 40px;
  padding: 8px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
}

.main-nav a:hover,
.main-nav button:hover {
  background: rgba(15, 111, 255, 0.08);
  color: var(--primary);
}

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

.language-switcher {
  position: relative;
  z-index: 50;
}

.language-switcher summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
  list-style: none;
}

.language-switcher summary::-webkit-details-marker {
  display: none;
}

.language-switcher summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
}

.language-switcher[open] summary,
.language-switcher summary:hover {
  border-color: rgba(15, 111, 255, 0.24);
  background: rgba(15, 111, 255, 0.08);
  color: var(--primary);
}

.language-flag {
  font-size: 16px;
  line-height: 1;
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.language-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.language-menu a:hover,
.language-menu a[aria-current="page"] {
  background: rgba(15, 111, 255, 0.08);
  color: var(--primary);
}

.menu-button {
  display: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(15, 111, 255, 0.22);
}

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

.button.secondary {
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  border-color: var(--line);
  box-shadow: none;
}

.button.secondary:hover {
  color: var(--primary);
  border-color: rgba(15, 111, 255, 0.3);
}

.button.ghost {
  background: transparent;
  color: var(--primary);
  border-color: rgba(15, 111, 255, 0.24);
  box-shadow: none;
}

.button.danger {
  background: var(--danger);
  box-shadow: 0 10px 24px rgba(217, 45, 32, 0.18);
}

.button.full {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
}

.page-shell {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 32px 22px 72px;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(100vh - 104px);
  padding: clamp(56px, 8vw, 108px) 0;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(680px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(15, 111, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--primary);
  font-size: 13px;
  font-weight: 760;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.2;
}

.lead {
  max-width: var(--measure);
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 0;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.trust-strip li,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.hero-visual {
  position: absolute;
  inset: 8% -8% 8% auto;
  width: min(56vw, 700px);
  pointer-events: none;
  opacity: 0.92;
}

.diagnostic-panel {
  position: relative;
  min-height: 430px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(239, 68, 68, 0.88), rgba(34, 197, 94, 0.88), rgba(37, 99, 235, 0.88)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px 28px),
    #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: perspective(1100px) rotateY(-14deg) rotateX(3deg);
}

.diagnostic-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(255, 255, 255, 0.34) 48%, transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), transparent 36%);
  transform: translateX(-80%);
  animation: scan 5.5s linear infinite;
}

.diagnostic-panel::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 6px;
  background:
    radial-gradient(circle at 18% 24%, #000 0 3px, transparent 4px),
    radial-gradient(circle at 74% 62%, #fff 0 3px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 42px);
}

.section {
  padding: 56px 0;
}

.section.tight {
  padding: 34px 0;
}

.section-header {
  max-width: var(--measure);
  margin-bottom: 24px;
}

.section-header p,
.content p,
.article p,
.tool-copy p,
.legal p {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.tool-card,
.step-card,
.result-card,
.info-card,
.article-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.07);
}

.tool-card,
.step-card,
.result-card,
.article-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 18px;
}

.tool-card p,
.step-card p,
.result-card p,
.article-card p {
  color: var(--muted);
}

.tool-card .button,
.article-card .button {
  align-self: flex-start;
  margin-top: auto;
}

.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border: 1px solid rgba(15, 111, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #eef8ff);
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.problem-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.problem-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font-weight: 720;
}

.problem-link:hover {
  border-color: rgba(15, 111, 255, 0.34);
  background: #fff;
}

.cluster-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.discovery-grid,
.directory-grid {
  display: grid;
  gap: 16px;
}

.discovery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.discovery-panel,
.directory-group {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.06);
}

.discovery-panel p,
.directory-group > p,
.directory-list small,
.recent-empty {
  color: var(--muted);
}

.text-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--primary);
  font-weight: 760;
}

.recent-empty {
  padding: 8px 2px;
  font-size: 14px;
}

.directory-hero {
  max-width: 900px;
}

.directory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.directory-group h2 {
  font-size: 28px;
}

.directory-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.directory-list a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.76);
  color: var(--text);
}

.directory-list a:hover {
  border-color: rgba(15, 111, 255, 0.3);
  background: #fff;
}

.directory-list span {
  font-weight: 760;
}

.directory-list small {
  line-height: 1.45;
}

.cluster-panel {
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 250, 255, 0.76)),
    var(--surface);
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.06);
}

.cluster-panel p {
  color: var(--muted);
}

.link-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.link-list a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.link-list a:hover {
  border-color: rgba(15, 111, 255, 0.28);
  color: var(--primary);
}

.flow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
}

.flow-strip article {
  min-height: 74px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.flow-strip strong,
.flow-strip span {
  display: block;
}

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

.flow-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.article,
.tool-layout,
.legal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  align-items: start;
}

.tool-main,
.article-main,
.legal-main {
  max-width: var(--measure);
}

.tool-hero {
  padding: 38px 0 22px;
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.tool-meta li {
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.side-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.side-panel h3 {
  font-size: 16px;
}

.side-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-panel a {
  color: var(--muted);
  font-weight: 650;
}

.side-panel a:hover {
  color: var(--primary);
}

.content-block {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.numbered-list,
.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.option-panel {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field select,
.field input[type="number"],
.field input[type="text"],
.field input[type="color"] {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
}

.field input[type="color"] {
  padding: 4px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.warning {
  border: 1px solid rgba(217, 45, 32, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 247, 245, 0.9);
  color: #7a271a;
  padding: 14px 16px;
}

.notice {
  border: 1px solid rgba(15, 111, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(239, 248, 255, 0.9);
  color: #12315b;
  padding: 14px 16px;
}

.status-line {
  min-height: 26px;
  color: var(--muted);
  font-weight: 650;
}

.result-host {
  margin-top: 24px;
}

.result-panel {
  padding: 20px;
  border: 1px solid rgba(15, 111, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.result-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.result-options button {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  font-weight: 700;
}

.result-options button:hover {
  border-color: rgba(15, 111, 255, 0.34);
  color: var(--primary);
}

.rate-dashboard,
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.metric {
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.metric small {
  display: block;
  margin-top: 8px;
  color: var(--soft);
}

.calculator-result {
  margin: 18px 0 0;
}

.rate-dashboard.compact .metric {
  min-height: 112px;
}

.rate-dashboard.compact .metric strong {
  font-size: clamp(20px, 3vw, 30px);
  overflow-wrap: anywhere;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.info-table th,
.info-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.info-table th {
  width: 42%;
  color: var(--muted);
  font-weight: 720;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(140px, 1fr));
  gap: 24px;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 42px 22px;
}

.footer-inner p,
.footer-inner a {
  color: var(--muted);
}

.footer-inner h3 {
  font-size: 15px;
}

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

.fine-print {
  color: var(--soft);
  font-size: 13px;
}

.test-overlay,
.canvas-overlay,
.fixer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background: #000;
  color: #fff;
  touch-action: none;
  user-select: none;
}

.test-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.test-screen.with-center::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

.test-screen.grid-3::after,
.test-screen.grid-5::after,
.test-screen.with-lines::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: difference;
}

.test-screen.grid-3::after {
  background:
    linear-gradient(90deg, transparent calc(33.333% - 1px), rgba(255,255,255,0.55) calc(33.333% - 1px) calc(33.333% + 1px), transparent calc(33.333% + 1px) calc(66.666% - 1px), rgba(255,255,255,0.55) calc(66.666% - 1px) calc(66.666% + 1px), transparent calc(66.666% + 1px)),
    linear-gradient(0deg, transparent calc(33.333% - 1px), rgba(255,255,255,0.55) calc(33.333% - 1px) calc(33.333% + 1px), transparent calc(33.333% + 1px) calc(66.666% - 1px), rgba(255,255,255,0.55) calc(66.666% - 1px) calc(66.666% + 1px), transparent calc(66.666% + 1px));
}

.test-screen.grid-5::after {
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(20% - 1px), rgba(255,255,255,0.52) calc(20% - 1px) calc(20% + 1px)),
    repeating-linear-gradient(0deg, transparent 0 calc(20% - 1px), rgba(255,255,255,0.52) calc(20% - 1px) calc(20% + 1px));
}

.test-screen.with-lines::after {
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(255,255,255,0.48) calc(10% - 1px) calc(10% + 1px));
}

.test-controls,
.canvas-controls,
.fixer-controls {
  position: absolute;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(9, 14, 24, 0.76);
  backdrop-filter: blur(16px);
  color: #fff;
  transform: translateX(-50%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.test-controls.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
}

.test-controls button,
.test-controls select,
.canvas-controls button,
.fixer-controls button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 7px 10px;
  font-weight: 750;
}

.test-controls select {
  appearance: none;
}

.test-counter,
.fixer-timer {
  min-width: 72px;
  text-align: center;
  font-weight: 800;
}

.test-title-pill,
.canvas-title-pill {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 2;
  max-width: calc(100vw - 32px);
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(9, 14, 24, 0.7);
  color: #fff;
  font-weight: 780;
  backdrop-filter: blur(12px);
}

.fallback-message {
  position: absolute;
  left: 50%;
  top: 72px;
  z-index: 3;
  width: min(560px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(9, 14, 24, 0.78);
  color: #fff;
  transform: translateX(-50%);
}

.canvas-area {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.canvas-hud {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 2;
  display: grid;
  gap: 8px;
  min-width: min(320px, calc(100vw - 32px));
  padding: 12px;
  border-radius: 8px;
  background: rgba(9, 14, 24, 0.74);
  color: #fff;
  backdrop-filter: blur(12px);
}

.canvas-hud strong {
  font-size: 24px;
}

.touch-point {
  position: absolute;
  width: 54px;
  height: 54px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(15, 111, 255, 0.28);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 820;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.fixer-patch {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 128px;
  height: 128px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: red;
  transform: translate(-50%, -50%);
  cursor: grab;
  animation: fixerFlash 120ms steps(1, end) infinite;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.38);
}

.fixer-patch:active {
  cursor: grabbing;
}

.fixer-patch.small {
  width: 96px;
  height: 96px;
}

.fixer-patch.large {
  width: 176px;
  height: 176px;
}

.noscript {
  width: min(100%, 720px);
  margin: 80px auto;
  padding: 24px;
}

body.localized-test-open {
  overflow: hidden;
}

.localized-test-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  transition: background-color 160ms ease, color 160ms ease;
}

.localized-test-status,
.localized-test-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.localized-test-status {
  justify-self: start;
  padding: 8px 12px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: color-mix(in srgb, currentColor 8%, transparent);
  font-size: 14px;
}

.localized-test-status strong {
  font-size: 15px;
}

.localized-test-status [data-test-count] {
  opacity: 0.76;
}

.localized-test-instruction {
  align-self: center;
  justify-self: center;
  width: min(100%, 640px);
  margin: 0;
  text-align: center;
  font-size: clamp(18px, 2.6vw, 28px);
  font-weight: 700;
  line-height: 1.35;
}

.localized-test-controls {
  justify-self: center;
  flex-wrap: wrap;
  justify-content: center;
}

.localized-test-controls button {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid currentColor;
  border-radius: 8px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.localized-test-controls button:hover,
.localized-test-controls button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@keyframes scan {
  0% { transform: translateX(-90%); }
  100% { transform: translateX(90%); }
}

@keyframes fixerFlash {
  0% { background: #ff0000; }
  16% { background: #00ff00; }
  33% { background: #0000ff; }
  50% { background: #ffffff; }
  66% { background: #00ffff; }
  83% { background: #ff00ff; }
  100% { background: #ffff00; }
}

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

@media (max-width: 960px) {
  .main-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

  body.nav-open .main-nav {
    display: flex;
  }

  .menu-button {
    display: inline-grid;
  }

  .language-menu {
    right: auto;
    left: 0;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
  }

  .hero-visual {
    position: relative;
    inset: auto;
    width: 100%;
    margin-top: 28px;
  }

  .diagnostic-panel {
    min-height: 280px;
    transform: none;
  }

  .grid.cards,
  .grid.two,
  .discovery-grid,
  .directory-grid,
  .cluster-grid,
  .flow-strip,
  .problem-grid,
  .rate-dashboard,
  .info-grid,
  .field-grid,
  .article,
  .tool-layout,
  .legal,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .nav-shell {
    padding: 0 14px;
  }

  .brand span:last-child {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  h1 {
    font-size: clamp(38px, 14vw, 58px);
  }

  .hero-actions .button,
  .button-row .button {
    width: 100%;
  }

  .test-controls,
  .canvas-controls,
  .fixer-controls {
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    justify-content: center;
    flex-wrap: wrap;
    transform: none;
  }

  .test-controls.hidden {
    transform: translateY(10px);
  }

  .test-title-pill,
  .canvas-title-pill,
  .canvas-hud {
    left: 12px;
    right: 12px;
    top: 12px;
    width: auto;
    min-width: 0;
  }

  .canvas-hud {
    top: 58px;
  }

  .result-options {
    grid-template-columns: 1fr;
  }

  .localized-test-overlay {
    padding: 14px;
  }

  .localized-test-status {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    font-size: 12px;
  }

  .localized-test-status strong {
    font-size: 13px;
  }

  .localized-test-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .localized-test-controls button {
    width: 100%;
  }
}

