:root {
  --bg: #f4f7fb;
  --bg-alt: #ffffff;
  --primary: #4f46e5;
  --primary-soft: #eef2ff;
  --accent: #22c55e;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 35px rgba(15, 23, 42, 0.09);
  --shadow-card: 0 14px 30px rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] {
  --bg: #020617;
  --bg-alt: #020617;
  --primary: #6366f1;
  --primary-soft: rgba(79, 70, 229, 0.16);
  --accent: #22c55e;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --border: #1f2933;
  --shadow-soft: 0 18px 35px rgba(0, 0, 0, 0.7);
  --shadow-card: 0 14px 30px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #e0f2fe 0, transparent 40%),
    radial-gradient(circle at bottom right, #e0f2fe 0, transparent 45%),
    var(--bg);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16) 0, transparent 40%),
    radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.16) 0, transparent 45%),
    var(--bg);
}

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

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(244, 247, 251, 0.9);
  border-bottom: 1px solid rgba(209, 213, 219, 0.6);
}

html[data-theme="dark"] .site-header {
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(30, 64, 175, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 16px;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 0;
  border: none;
  background: none;
}

.logo-img {
  height: 52px;
  width: auto;
  display: block;
  user-select: none;
}

.main-nav {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
  color: var(--text-muted);
  align-items: center;
}

.main-nav a {
  position: relative;
  padding: 4px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  transition: width 0.18s ease-out;
}

.main-nav a:hover::after {
  width: 100%;
}

.main-nav a.is-current::after {
  width: 100%;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}

.theme-switch:hover .theme-switch-track {
  box-shadow:
    0 6px 14px rgba(148, 163, 184, 0.55),
    0 0 0 1px rgba(148, 163, 184, 0.3);
}

.theme-switch:active .theme-switch-track {
  transform: scale(0.97);
}

.theme-switch:focus-visible .theme-switch-track {
  outline: 2px solid rgba(79, 70, 229, 0.7);
  outline-offset: 3px;
}

.theme-switch-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #ffffff, rgba(148, 163, 184, 0.3));
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  box-shadow:
    0 4px 10px rgba(148, 163, 184, 0.5),
    inset 0 0 0 1px rgba(148, 163, 184, 0.45);
  transition:
    background-color 0.22s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.22s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.12s ease-out;
}

.theme-switch-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #4b5563;
  transform: translateX(0);
  box-shadow:
    0 3px 6px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(148, 163, 184, 0.6);
  transition:
    transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1),
    background-color 0.22s ease-out,
    color 0.22s ease-out,
    box-shadow 0.22s ease-out;
}

.theme-switch:active .theme-switch-thumb {
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.45),
    0 0 0 1px rgba(148, 163, 184, 0.7);
}

.theme-switch.is-dark .theme-switch-track {
  background: radial-gradient(circle at 30% 30%, rgba(248, 250, 252, 0.25), #4f46e5);
  box-shadow:
    0 8px 18px rgba(79, 70, 229, 0.7),
    inset 0 0 0 1px rgba(191, 219, 254, 0.5);
}

.theme-switch.is-dark .theme-switch-thumb {
  transform: translateX(20px);
  background: #020617;
  color: #e5e7eb;
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.85),
    0 0 0 1px rgba(55, 65, 81, 0.9);
}

html[data-theme="dark"] .theme-switch-track {
  background: radial-gradient(circle at 30% 30%, rgba(248, 250, 252, 0.12), rgba(15, 23, 42, 0.9));
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.7),
    inset 0 0 0 1px rgba(30, 64, 175, 0.6);
}

main {
  padding: 28px 0 52px;
}

.breadcrumbs {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

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

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

.breadcrumbs-separator {
  margin: 0 4px;
  opacity: 0.7;
}

.tool-hero {
  padding-bottom: 20px;
}

.tool-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: flex-start;
}

.tool-hero-title {
  margin: 0 0 8px;
  font-size: clamp(2rem, 3.2vw, 2.4rem);
  letter-spacing: -0.03em;
}

.tool-hero-subtitle {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 560px;
}

.tool-hero-subtitle strong {
  color: var(--text);
  font-weight: 600;
}

.tool-hero-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--text-muted);
}

.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

html[data-theme="dark"] .tool-pill {
  background: rgba(15, 23, 42, 0.96);
  border-color: #1f2937;
}

.tool-pill i {
  font-size: 0.8rem;
}

.tool-hero-side {
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, #eef2ff, #ffffff);
  border: 1px solid rgba(199, 210, 254, 0.9);
  box-shadow: var(--shadow-soft);
  padding: 16px 16px 14px;
}

html[data-theme="dark"] .tool-hero-side {
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.9), #020617);
  border-color: rgba(37, 99, 235, 0.8);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
}

.tool-hero-side h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.tool-hero-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.tool-hero-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.tool-hero-list i {
  margin-top: 3px;
  font-size: 0.85rem;
  color: #4f46e5;
}

.tool-row-primary {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.7fr);
  gap: 24px;
  align-items: stretch;
}

.tool-meta-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
}

html[data-theme="dark"] .tool-meta-card {
  background: rgba(15, 23, 42, 0.96);
  border-color: #1f2937;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.9);
}

.tool-meta-card h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.tool-meta-card p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.tool-meta-card p strong {
  color: var(--text);
}

.tool-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.tool-meta-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.tool-meta-list i {
  margin-top: 4px;
  font-size: 0.55rem;
  color: #4f46e5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease-out, box-shadow 0.1s ease-out,
    background-color 0.12s ease-out, border-color 0.12s ease-out;
  white-space: nowrap;
  gap: 6px;
}

.btn-primary {
  background-image: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #f9fafb;
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.32);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(79, 70, 229, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-muted);
  border-color: rgba(148, 163, 184, 0.6);
}

.btn-ghost:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .btn-ghost {
  background: #020617;
  border-color: #1f2937;
  color: var(--text-muted);
}

html[data-theme="dark"] .btn-ghost:hover {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.9);
}

.btn-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(.8);
  box-shadow: none;
  transform: none;
}

.btn-small {
  padding: 4px 10px;
  font-size: 0.8rem;
  box-shadow: none;
}

.page-main-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.7fr);
  gap: 24px;
  align-items: flex-start;
}

.page-main-grid > aside {
  position: sticky;
  top: 96px;
  align-self: flex-start;
  height: calc(100vh - 120px);
}

.sticky-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 4px;
}

.article-toc-card,
.related-tools-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 16px 16px 14px;
}

html[data-theme="dark"] .article-toc-card,
html[data-theme="dark"] .related-tools-card,
html[data-theme="dark"] .related-tools-mobile {
  background: rgba(15, 23, 42, 0.96);
  border-color: #1f2937;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.9);
}

/* TOC */
.article-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.article-toc-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-toc-title-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: #4f46e5;
  font-size: 0.9rem;
}

.article-toc {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.article-toc li + li {
  margin-top: 4px;
}

.article-toc a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 999px;
  color: var(--text-muted);
  transition: background 0.12s ease-out, color 0.12s ease-out;
}

.article-toc a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c7d2fe;
  flex-shrink: 0;
  transition: background 0.12s ease-out, transform 0.12s ease-out;
}

.article-toc a:hover {
  color: var(--primary);
  background: rgba(239, 246, 255, 0.8);
}

html[data-theme="dark"] .article-toc a:hover {
  background: rgba(30, 64, 175, 0.3);
}

.article-toc a.is-active {
  color: #4f46e5;
  background: rgba(224, 231, 255, 0.9);
  font-weight: 500;
}

.article-toc a.is-active::before {
  background: #4f46e5;
  transform: scale(1.1);
}

html[data-theme="dark"] .article-toc a.is-active {
  background: rgba(37, 99, 235, 0.4);
  color: #e5e7eb;
}

.article-toc-note {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.related-tools-card h2 {
  margin: 0 0 8px;
  font-size: 0.96rem;
}

.related-tools-card p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.related-list li + li {
  margin-top: 4px;
}

.related-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px;
  border-radius: 999px;
  color: var(--text-muted);
  transition: background 0.12s ease-out, color 0.12s ease-out;
}

.related-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: #4f46e5;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.related-list a:hover {
  color: var(--primary);
  background: rgba(239, 246, 255, 0.8);
}

html[data-theme="dark"] .related-list a:hover {
  background: rgba(30, 64, 175, 0.3);
}

.tool-article {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 22px 20px 20px;
}

@media (min-width: 720px) {
  .tool-article {
    padding: 26px 26px 22px;
  }
}

:root[data-theme="dark"] .tool-article {
  background: rgba(15, 23, 42, 0.98);
  border-color: var(--border);
}

.tool-article h2 {
  font-size: 1.25rem;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: 6px;
}

.tool-article h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 54px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, rgba(79, 70, 229, 0));
}

.tool-article h3 {
  font-size: 1.05rem;
  margin: 18px 0 6px;
  letter-spacing: -0.01em;
  position: relative;
  padding-top: 2px;
}

.tool-article h3::after {
  content: "";
  display: block;
  margin-top: 5px;
  width: 40px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, rgba(99, 102, 241, 0));
}

.tool-article p {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.tool-article ul {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.tool-article li {
  margin-bottom: 6px;
  position: relative;
  padding-left: 18px;
}

.tool-article li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #4f46e5;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.18);
}

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

.article-lead {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 14px;
}

.tool-article-divider {
  height: 1px;
  border: 0;
  background: linear-gradient(to right, rgba(209, 213, 219, 0.9), transparent);
  margin: 8px 0 16px;
}

.article-section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.article-section-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.78rem;
  font-weight: 500;
}

.article-section-pill i {
  font-size: 0.8rem;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 10px 0 16px;
}

.privacy-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f9fafb;
}

:root[data-theme="dark"] .privacy-item {
  background: rgba(15, 23, 42, 0.98);
}

.privacy-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: #4f46e5;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.privacy-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

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

.quality-grid {
  margin: 10px 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.quality-level {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f9fafb;
  padding: 10px 12px 12px;
}

:root[data-theme="dark"] .quality-level {
  background: rgba(15, 23, 42, 0.98);
}

.quality-label-row,
.quality-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.quality-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.quality-range,
.quality-range-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.quality-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

.quality-chip-high {
  background: #eef2ff;
  color: #4f46e5;
}

.quality-chip-max {
  background: #dcfce7;
  color: #15803d;
}

.quality-chip-balanced {
  background: #f1f5f9;
  color: #334155;
}

.quality-bar {
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin: 4px 0 6px;
}

:root[data-theme="dark"] .quality-bar {
  background: #1f2937;
}

.quality-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
}

.quality-bar-fill-high {
  width: 78%;
}

.quality-bar-fill-max {
  width: 96%;
}

.quality-bar-fill-balanced {
  width: 65%;
}

.quality-note {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

#steps + p {
  margin-bottom: 10px;
}

#steps + p + ul {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding: 0;
}

#steps + p + ul li {
  padding: 12px 12px 12px 52px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f9fafb;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}

:root[data-theme="dark"] #steps + p + ul li {
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.25), #020617);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.8);
}

#steps + p + ul li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #f9fafb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.4);
}

#steps + p + ul li strong {
  display: block;
  margin-bottom: 3px;
}

#steps + p + ul li:nth-child(odd) {
  background: linear-gradient(135deg, #f9fafb, #eff6ff);
}

:root[data-theme="dark"] #steps + p + ul li:nth-child(odd) {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.4));
}

#tips + ul {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 0;
  margin-bottom: 4px;
}

#tips + ul li {
  padding: 9px 12px 9px 32px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.03);
}

:root[data-theme="dark"] #tips + ul li {
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.8);
}

#tips + ul li::before {
  content: "💡";
  top: 0.65em;
  left: 10px;
  width: auto;
  height: auto;
  box-shadow: none;
  background: transparent;
}

#metadata + p {
  margin-bottom: 10px;
}

#metadata + p + ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  padding: 0;
}

#metadata + p + ul li {
  padding: 10px 12px 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f9fafb;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.03);
  padding-left: 32px;
}

:root[data-theme="dark"] #metadata + p + ul li {
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.8);
}

#metadata + p + ul li::before {
  top: 1em;
  left: 10px;
}

#metadata + p + ul li:nth-child(1) {
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
}

#metadata + p + ul li:nth-child(2) {
  background: linear-gradient(135deg, #fefce8, #fffbeb);
}

:root[data-theme="dark"] #metadata + p + ul li:nth-child(1) {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(37, 99, 235, 0.4));
}

:root[data-theme="dark"] #metadata + p + ul li:nth-child(2) {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(234, 179, 8, 0.4));
}

.faq-section {
  margin-top: 22px;
}

.faq-section h3 {
  margin-bottom: 10px;
}

.faq-list {
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.15s ease-out, box-shadow 0.2s ease-out,
              background-color 0.15s ease-out;
}

:root[data-theme="dark"] .faq-item {
  background: rgba(15, 23, 42, 0.98);
}

.faq-item.is-open {
  border-color: rgba(79, 70, 229, 0.7);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.08);
  background: #f9fafb;
}

:root[data-theme="dark"] .faq-item.is-open {
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.25), #020617);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.9);
}

.faq-question {
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.faq-question span {
  flex: 1;
  min-width: 0;
}

.faq-chevron {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.16s ease-out, color 0.15s;
}

.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0;
  transition: max-height 0.25s ease-out;
}

.faq-answer-inner {
  padding: 10px 16px 14px;
}

.faq-answer-inner p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.faq-answer-inner p:last-child {
  margin-bottom: 0;
}

.related-tools-mobile {
  display: none;
}

.site-footer {
  border-top: 1px solid rgba(209, 213, 219, 0.7);
  padding: 20px 0 26px;
  background: rgba(248, 250, 252, 0.96);
}

html[data-theme="dark"] .site-footer {
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(30, 64, 175, 0.8);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-brand .logo-wordmark {
  font-size: 1rem;
}

.footer-note {
  font-size: 0.8rem;
}

.footer-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-nav a {
  padding: 2px 0;
}

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

.footer-meta {
  margin: 0;
  width: 100%;
  text-align: right;
  font-size: 0.78rem;
}

.footer-language {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(255, 255, 255, 0.96);
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  outline: none;
  white-space: nowrap;
}

.lang-toggle i.fa-globe {
  font-size: 0.85rem;
}

.lang-toggle .lang-chevron {
  font-size: 0.75rem;
  transition: transform 0.14s ease-out;
}

.lang-toggle.is-open .lang-chevron {
  transform: rotate(180deg);
}

.lang-toggle:hover {
  border-color: rgba(79, 70, 229, 0.95);
  color: var(--primary);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .lang-toggle {
  background: #020617;
  border-color: #1f2937;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.85);
  color: var(--text-muted);
}

html[data-theme="dark"] .lang-toggle i.fa-globe {
  color: #6366f1;
}

.lang-dropdown {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 100px;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(148, 163, 184, 0.3);
  display: none;
  z-index: 30;
}

.lang-dropdown.is-open {
  display: block;
}

html[data-theme="dark"] .lang-dropdown {
  background: #020617;
  border-color: #1f2937;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.92);
}

.lang-option {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.lang-option:hover {
  background: #f3f4ff;
  color: var(--primary);
}

.lang-option.is-active {
  font-weight: 600;
  color: var(--primary);
  background: #eef2ff;
}

html[data-theme="dark"] .lang-option:hover {
  background: rgba(30, 64, 175, 0.35);
  color: #e5e7eb;
}

html[data-theme="dark"] .lang-option.is-active {
  background: rgba(37, 99, 235, 0.4);
  color: #e5e7eb;
}

@media (max-width: 520px) {
  .footer-meta {
    text-align: left;
  }

  .footer-language {
    width: 100%;
    justify-content: flex-start;
  }

  .lang-dropdown {
    right: auto;
    left: 0;
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .tool-hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-row-primary {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-main-grid > aside {
    position: static;
    height: auto;
  }

  .sticky-rail {
    display: none;
  }

  .related-tools-mobile {
    display: block;
    margin-top: 16px;
  }
}

@media (max-width: 800px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    border-top: 1px solid rgba(209, 213, 219, 0.7);
    padding-top: 8px;
    margin-top: 4px;
  }

  html[data-theme="dark"] .main-nav {
    border-top: 1px solid rgba(31, 41, 55, 0.9);
  }

  .theme-switch {
    position: absolute;
    right: 20px;
    top: 22px;
  }
}

@media (max-width: 520px) {
  .faq-item {
    border-radius: 14px;
  }

  .footer-meta {
    text-align: left;
  }
}