/* SixProbe design system: light/dark tokens, no framework, no font downloads. */

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --elevated: #ffffff;
  --text: #0b1219;
  --muted: #5a6b7b;
  --border: #dce5ee;
  --accent: #007a55;
  --accent-soft: #e6f7f0;
  --accent-contrast: #ffffff;
  --blue: #0066cc;
  --blue-soft: #e8f2ff;
  --warn: #9a5b00;
  --warn-soft: #fff4e0;
  --glow: rgba(0, 122, 85, 0.1);
  --grid: rgba(11, 18, 25, 0.055);
  --shadow: 0 1px 2px rgba(11, 18, 25, 0.04), 0 12px 32px rgba(11, 18, 25, 0.06);
  --shadow-sm: 0 1px 2px rgba(11, 18, 25, 0.05);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1120px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b10;
    --surface: #0e151d;
    --elevated: #131d27;
    --text: #e8f1f7;
    --muted: #93a6b5;
    --border: #223140;
    --accent: #3df5a6;
    --accent-soft: #0f2a22;
    --accent-contrast: #06251b;
    --blue: #6cb6ff;
    --blue-soft: #0b2138;
    --warn: #ffc45c;
    --warn-soft: #2a1f0a;
    --glow: rgba(61, 245, 166, 0.1);
    --grid: rgba(232, 241, 247, 0.07);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #070b10;
  --surface: #0e151d;
  --elevated: #131d27;
  --text: #e8f1f7;
  --muted: #93a6b5;
  --border: #223140;
  --accent: #3df5a6;
  --accent-soft: #0f2a22;
  --accent-contrast: #06251b;
  --blue: #6cb6ff;
  --blue-soft: #0b2138;
  --warn: #ffc45c;
  --warn-soft: #2a1f0a;
  --glow: rgba(61, 245, 166, 0.1);
  --grid: rgba(232, 241, 247, 0.07);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
}

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

[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent);
  color: var(--accent-contrast);
}

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

.container {
  width: min(var(--max), calc(100% - (2 * var(--gutter))));
  margin-inline: auto;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--accent-contrast);
  filter: brightness(1.06);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

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

.btn-sm {
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -3px;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

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

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  gap: 0.15rem;
  margin-left: 0.35rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 550;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  list-style: none;
  cursor: pointer;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu[open] summary,
.lang-menu summary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lang-menu .chevron {
  width: 12px;
  height: 12px;
}

.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 60;
  min-width: 180px;
  margin: 0;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  list-style: none;
}

.lang-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.65rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.lang-list a:hover {
  background: var(--accent-soft);
}

.lang-list a[aria-current="true"] {
  color: var(--accent);
  font-weight: 650;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

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

.theme-toggle .icon {
  width: 18px;
  height: 18px;
}

.icon-sun {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: block;
}

:root[data-theme="dark"] .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .icon-moon {
    display: none;
  }
}

html:not(.js) .theme-toggle,
html:not(.js) .copy-btn {
  display: none;
}

html:not(.js) .js-only {
  display: none;
}

.contact-link[href="mailto:"] {
  display: none;
}

/* Hero and interior page headers */

.hero,
.page-hero {
  position: relative;
  overflow: clip;
  border-bottom: 1px solid var(--border);
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: -30% 0 auto;
  height: 620px;
  background: radial-gradient(560px 320px at 72% 18%, var(--glow), transparent 72%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 65% 25%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse at 65% 25%, #000 10%, transparent 72%);
  pointer-events: none;
}

.hero .container,
.page-hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.32rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.lede {
  max-width: 40ch;
  margin-bottom: 1.6rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.page-hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.8rem, 4vw, 2.8rem);
}

.page-hero h1 {
  max-width: 18ch;
  margin-bottom: 0.35em;
}

.page-hero .lede {
  margin-bottom: 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.8rem;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--border);
}

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

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

/* Status panel */

.status-panel {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.panel-head h2 {
  margin: 0;
  font-size: 1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.status-pill[data-state="checking"] {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill[data-state="warn"],
.status-pill[data-state="error"] {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-pill[data-state="ok"] .spinner,
.status-pill[data-state="warn"] .spinner,
.status-pill[data-state="error"] .spinner {
  display: none;
}

.connection-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--elevated);
}

.protocol-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.protocol {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ip-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  margin: 0.4rem 0 0.9rem;
}

.ip-row code {
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.copy-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  cursor: pointer;
}

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

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.mini-grid dt {
  margin-bottom: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-grid dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.status-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Sections, cards, steps */

.section {
  padding-block: clamp(2.8rem, 6vw, 4.8rem);
}

.section + .section {
  padding-top: clamp(1.8rem, 4vw, 3rem);
}

.section-head {
  max-width: 660px;
  margin-bottom: 2rem;
}

.section-head h2 {
  margin-bottom: 0.45rem;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin-bottom: 0.45rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

.icon-badge svg {
  width: 19px;
  height: 19px;
}

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.step {
  position: relative;
  min-height: 100%;
  padding: 1.35rem 1.35rem 1.35rem 3.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1.35rem;
  top: 1.3rem;
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.step h3 {
  margin-bottom: 0.35rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.cta-band h2 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
}

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

.callout {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

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

.callout.warn {
  border-left-color: var(--warn);
}

/* Checker */

.checker-shell {
  display: grid;
  gap: 1.5rem;
}

.checker-form {
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 650;
}

.checker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.checker-row input {
  flex: 1 1 260px;
  min-height: 48px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
}

.checker-row input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.field-help {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.chip {
  min-height: 44px;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.78rem;
  cursor: pointer;
}

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

.form-error {
  margin: 0.85rem 0 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--warn);
  border-radius: 8px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.85rem;
}

.result-panel {
  display: grid;
  gap: 1rem;
}

.verdict {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.verdict[data-verdict="ok"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.verdict[data-verdict="no_aaaa"],
.verdict[data-verdict="unreachable"],
.verdict[data-verdict="tls_error"],
.verdict[data-verdict="http_error"],
.verdict[data-verdict="dns_error"],
.verdict[data-verdict="timeout"] {
  border-color: var(--warn);
  background: var(--warn-soft);
}

.verdict-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  font-family: var(--mono);
  font-weight: 800;
}

.verdict h2 {
  margin: 0;
  font-size: 1.15rem;
}

.verdict p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.cache-badge {
  margin-left: auto;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.result-card {
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.result-card h3 {
  margin-bottom: 0.5rem;
}

.kv {
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
  gap: 0.25rem 0.9rem;
  margin: 0;
  font-size: 0.85rem;
}

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

.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.record-list {
  margin: 0.3rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}

.record-list li {
  padding: 0.28rem 0;
  border-bottom: 1px dashed var(--border);
  overflow-wrap: anywhere;
}

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

.timings {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.timings th,
.timings td {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.timings th {
  color: var(--muted);
  font-weight: 550;
}

.timings td:last-child {
  text-align: right;
  font-family: var(--mono);
}

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

.details-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 1.15rem;
}

.details-block summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  list-style: none;
  font-weight: 650;
  cursor: pointer;
}

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

.details-block summary::after {
  content: "+";
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.2rem;
}

.details-block[open] summary::after {
  content: "\2212";
}

.details-block .details-body {
  padding-bottom: 1rem;
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--elevated);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

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

.data-table code {
  font-size: 0.82rem;
}

/* Long-form prose, guide */

.prose {
  max-width: 72ch;
}

.prose h2 {
  margin-top: 2.3em;
}

.prose h3 {
  margin-top: 1.7em;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li {
  margin: 0.35em 0;
}

.prose code {
  padding: 0.12em 0.35em;
  border-radius: 5px;
  background: var(--accent-soft);
  font-size: 0.9em;
}

.prose pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--elevated);
  font-size: 0.85rem;
  line-height: 1.55;
}

.prose pre code {
  padding: 0;
  background: none;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.guide-aside {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 1rem;
}

.toc {
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.toc h2 {
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.86rem;
}

.toc li {
  margin: 0.3rem 0;
}

/* FAQ */

.faq {
  display: grid;
  gap: 0.6rem;
  max-width: 820px;
}

.faq details {
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.faq details[open] {
  border-color: var(--accent);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  list-style: none;
  font-weight: 600;
  cursor: pointer;
}

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

.faq summary::after {
  content: "+";
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.2rem;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq .faq-body {
  padding-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.faq .faq-body p {
  margin: 0.4rem 0 0.9rem;
}

/* Ads and affiliate placeholders */

.ad-slot {
  position: relative;
  margin-block: 1.5rem;
  padding: 1rem;
  min-height: 110px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.ad-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.adsbygoogle {
  display: block;
  min-height: 80px;
}

.affiliate-slot {
  margin-block: 1.5rem;
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Footer */

.site-footer {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-block: 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) 1.9fr;
  gap: 2rem 3rem;
}

.footer-brand p {
  max-width: 34ch;
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-brand .footer-copy {
  margin-top: 0.9rem;
  font-size: 0.82rem;
}

.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.1rem 2rem;
  align-content: start;
}

.footer-nav-col {
  display: grid;
  gap: 0.1rem;
  align-content: start;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

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

.lang-toast {
  position: fixed;
  left: calc(1rem + env(safe-area-inset-left, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(430px, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lang-toast p {
  flex: 1 1 auto;
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.35;
}

.lang-toast .btn {
  flex: 0 0 auto;
}

.lang-toast-close {
  flex: 0 0 auto;
  padding: 0.2rem 0.3rem;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.lang-toast-close:hover {
  color: var(--text);
}

@media (max-width: 600px) {
  .lang-toast {
    right: calc(0.75rem + env(safe-area-inset-right, 0px));
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    left: calc(0.75rem + env(safe-area-inset-left, 0px));
    width: auto;
  }
}

/* 404 */

.notfound {
  display: grid;
  place-items: center;
  min-height: 58vh;
  padding-block: 4rem;
  text-align: center;
}

.notfound .code {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(4rem, 15vw, 9rem);
  font-weight: 750;
  line-height: 1;
}

.notfound h1 {
  margin-top: 0.4rem;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.notfound p {
  max-width: 46ch;
  color: var(--muted);
}

/* Responsive */

@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding-block: clamp(2.5rem, 7vw, 4rem);
  }

  .page-hero h1 {
    max-width: none;
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-aside {
    position: static;
    order: -1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 760px) {
  .header-inner {
    gap: 0.4rem;
    padding-block: 0.35rem;
  }

  .site-nav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    padding-top: 0.3rem;
    padding-bottom: 0.25rem;
    border-top: 1px solid var(--border);
    overflow-x: auto;
  }

  .site-nav a {
    white-space: nowrap;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .mini-grid {
    grid-template-columns: 1fr 1fr;
  }

  .verdict {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .cache-badge {
    margin-left: 0;
  }

  .checker-row .btn {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .protocol {
    font-size: 1.35rem;
  }
}

/* Legal operator images embedded as data URIs on privacy and legal pages. */
.legal-document {
  margin: 1.5rem 0;
}

.legal-document img {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--border, #dce5ee);
  border-radius: 12px;
}

@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;
  }
}

/* Japanese typography: relaxed body rhythm, phrase-aware wrapping, system fonts. */
:lang(ja) {
  line-height: 1.9;
  word-break: auto-phrase;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", var(--sans);
}

:lang(ja) h1,
:lang(ja) h2,
:lang(ja) h3,
:lang(ja) h4 {
  line-height: 1.3;
}

:lang(ja) code,
:lang(ja) kbd,
:lang(ja) samp,
:lang(ja) .mono {
  font-family: var(--mono);
}
