/*
Theme Name: Tool OS Theme
Theme URI: https://example.com/tool-os-theme
Author: OpenAI
Description: Product-grade SaaS theme for Tool OS calculators, programmatic SEO pages, and content-led tool platforms.
Version: 1.0.19
Text Domain: tool-os-theme
*/

:root {
  color-scheme: light;

  /* Raw palette: single blue brand family + cool slate neutrals */
  --color-primary-50: #eef4ff;
  --color-primary-100: #e0eaff;
  --color-primary-200: #c7d7fe;
  --color-primary-300: #a5bcff;
  --color-primary-400: #7c99ff;
  --color-primary-500: #5c78ff;
  --color-primary-600: #3f5ef7;
  --color-primary-700: #324ad1;
  --color-primary-800: #2b3fa8;
  --color-primary-900: #25357f;

  --color-neutral-0: #ffffff;
  --color-neutral-50: #f8fafc;
  --color-neutral-100: #f1f5f9;
  --color-neutral-200: #e2e8f0;
  --color-neutral-300: #cbd5e1;
  --color-neutral-400: #94a3b8;
  --color-neutral-500: #64748b;
  --color-neutral-600: #475569;
  --color-neutral-700: #334155;
  --color-neutral-800: #1e293b;
  --color-neutral-900: #0f172a;
  --color-neutral-950: #020617;

  --color-success-500: #16a34a;
  --color-success-700: #166534;
  --color-warning-500: #d97706;
  --color-warning-700: #92400e;
  --color-error-500: #dc2626;
  --color-error-700: #991b1b;
  --color-info-500: #2563eb;
  --color-info-700: #1e40af;

  /* Semantic tokens */
  --color-primary: var(--color-primary-600);
  --color-primary-hover: var(--color-primary-700);
  --color-primary-active: var(--color-primary-800);
  --color-secondary: var(--color-neutral-700);
  --color-accent: var(--color-primary-500);
  --color-background: var(--color-neutral-50);
  --color-background-subtle: var(--color-neutral-100);
  --color-surface: var(--color-neutral-0);
  --color-surface-muted: var(--color-neutral-50);
  --color-surface-inverse: var(--color-neutral-900);
  --color-text-primary: var(--color-neutral-900);
  --color-text-secondary: var(--color-neutral-600);
  --color-text-tertiary: var(--color-neutral-500);
  --color-text-inverse: var(--color-neutral-0);
  --color-link: var(--color-primary);
  --color-link-hover: var(--color-primary-hover);
  --color-border: var(--color-neutral-200);
  --color-border-strong: var(--color-neutral-300);
  --color-border-focus: var(--color-primary-400);
  --color-card-background: var(--color-surface);
  --color-card-subtle: var(--color-surface-muted);
  --color-input-background: var(--color-surface);
  --color-input-border: var(--color-neutral-300);
  --color-input-placeholder: var(--color-neutral-400);
  --color-input-focus-ring: rgba(92, 120, 255, 0.24);
  --color-badge-neutral-background: var(--color-neutral-100);
  --color-badge-neutral-text: var(--color-neutral-700);
  --color-badge-primary-background: var(--color-primary-50);
  --color-badge-primary-text: var(--color-primary-700);
  --color-primary-soft: rgba(92, 120, 255, 0.08);
  --color-primary-soft-strong: rgba(92, 120, 255, 0.14);
  --color-surface-frosted: rgba(255, 255, 255, 0.88);
  --color-surface-frosted-strong: rgba(255, 255, 255, 0.92);
  --color-home-glow-1: rgba(92, 120, 255, 0.05);
  --color-home-glow-2: rgba(124, 153, 255, 0.045);
  --color-home-glow-3: rgba(37, 53, 127, 0.04);
  --color-home-gradient-start: #f9fbff;
  --color-home-gradient-mid: #f8faff;
  --color-home-gradient-end: #f8fafc;
  --color-status-success-background: #effaf3;
  --color-status-success-text: var(--color-success-700);
  --color-status-warning-background: #fff8eb;
  --color-status-warning-text: var(--color-warning-700);
  --color-status-error-background: #fef2f2;
  --color-status-error-text: var(--color-error-700);
  --color-status-info-background: #eff6ff;
  --color-status-info-text: var(--color-info-700);

  /* Legacy aliases to keep the theme stable during migration */
  --tos-primary: var(--color-primary);
  --tos-primary-soft: var(--color-primary-soft);
  --tos-background: var(--color-background);
  --tos-card: var(--color-card-background);
  --tos-text: var(--color-text-primary);
  --tos-text-secondary: var(--color-text-secondary);
  --tos-border: var(--color-border);
  --tos-success: var(--color-success-500);
  --tos-error: var(--color-error-500);
  --tos-radius-sm: 12px;
  --tos-radius-md: 18px;
  --tos-radius-lg: 24px;
  --tos-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --tos-shadow-md: 0 24px 64px rgba(15, 23, 42, 0.08);
  --tos-container: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --color-primary-50: #dde7ff;
    --color-primary-100: #c5d5ff;
    --color-primary-200: #a7bcff;
    --color-primary-300: #88a1ff;
    --color-primary-400: #6e87ff;
    --color-primary-500: #5c78ff;
    --color-primary-600: #4d69f8;
    --color-primary-700: #435adc;
    --color-primary-800: #3648b5;
    --color-primary-900: #2d3e91;

    --color-neutral-0: #ffffff;
    --color-neutral-50: #e2e8f0;
    --color-neutral-100: #cbd5e1;
    --color-neutral-200: #94a3b8;
    --color-neutral-300: #64748b;
    --color-neutral-400: #475569;
    --color-neutral-500: #334155;
    --color-neutral-600: #1e293b;
    --color-neutral-700: #172033;
    --color-neutral-800: #111827;
    --color-neutral-900: #0f172a;
    --color-neutral-950: #0b1020;

    --color-success-500: #22c55e;
    --color-success-700: #86efac;
    --color-warning-500: #f59e0b;
    --color-warning-700: #fcd34d;
    --color-error-500: #f87171;
    --color-error-700: #fca5a5;
    --color-info-500: #60a5fa;
    --color-info-700: #93c5fd;

    --color-primary: var(--color-primary-500);
    --color-primary-hover: var(--color-primary-300);
    --color-primary-active: var(--color-primary-600);
    --color-secondary: var(--color-neutral-100);
    --color-accent: var(--color-primary-300);
    --color-background: var(--color-neutral-950);
    --color-background-subtle: var(--color-neutral-900);
    --color-surface: var(--color-neutral-800);
    --color-surface-muted: #131c31;
    --color-surface-inverse: var(--color-neutral-50);
    --color-text-primary: var(--color-neutral-50);
    --color-text-secondary: var(--color-neutral-100);
    --color-text-tertiary: var(--color-neutral-200);
    --color-text-inverse: var(--color-neutral-950);
    --color-link: var(--color-primary-300);
    --color-link-hover: var(--color-primary-200);
    --color-border: var(--color-neutral-600);
    --color-border-strong: var(--color-neutral-500);
    --color-border-focus: var(--color-primary-300);
    --color-card-background: var(--color-surface);
    --color-card-subtle: var(--color-surface-muted);
    --color-input-background: var(--color-neutral-900);
    --color-input-border: var(--color-neutral-500);
    --color-input-placeholder: var(--color-neutral-300);
    --color-input-focus-ring: rgba(124, 153, 255, 0.28);
    --color-badge-neutral-background: var(--color-neutral-700);
    --color-badge-neutral-text: var(--color-neutral-100);
    --color-badge-primary-background: rgba(92, 120, 255, 0.14);
    --color-badge-primary-text: var(--color-primary-100);
    --color-primary-soft: rgba(92, 120, 255, 0.16);
    --color-primary-soft-strong: rgba(124, 153, 255, 0.2);
    --color-surface-frosted: rgba(17, 24, 39, 0.88);
    --color-surface-frosted-strong: rgba(17, 24, 39, 0.94);
    --color-home-glow-1: rgba(92, 120, 255, 0.12);
    --color-home-glow-2: rgba(124, 153, 255, 0.09);
    --color-home-glow-3: rgba(59, 130, 246, 0.08);
    --color-home-gradient-start: #0b1020;
    --color-home-gradient-mid: #0f172a;
    --color-home-gradient-end: #111827;
    --color-status-success-background: #16311f;
    --color-status-success-text: var(--color-success-700);
    --color-status-warning-background: #36240b;
    --color-status-warning-text: var(--color-warning-700);
    --color-status-error-background: #3a1517;
    --color-status-error-text: var(--color-error-700);
    --color-status-info-background: #12253e;
    --color-status-info-text: var(--color-info-700);

    --tos-primary-soft: var(--color-primary-soft);
    --tos-shadow-sm: 0 8px 24px rgba(2, 6, 23, 0.28);
    --tos-shadow-md: 0 24px 64px rgba(2, 6, 23, 0.4);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--tos-background);
  color: var(--tos-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

body.home {
  background:
    radial-gradient(circle at 42% 14%, var(--color-home-glow-2), transparent 24%),
    radial-gradient(circle at 28% 10%, var(--color-home-glow-1), transparent 42%),
    radial-gradient(circle at 50% 2%, var(--color-home-glow-3), transparent 38%),
    linear-gradient(180deg, var(--color-home-gradient-start) 0%, var(--color-home-gradient-mid) 34%, var(--color-home-gradient-end) 100%);
}

a {
  color: var(--tos-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

.tos-site-header,
.tos-site-footer {
  background: var(--color-surface-frosted);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--tos-border);
}

.tos-site-footer {
  border-top: 1px solid var(--tos-border);
  border-bottom: none;
  margin-top: 56px;
}

.tos-container {
  width: min(100% - 32px, var(--tos-container));
  margin: 0 auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tool-os-page__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 24px 0 14px;
  padding-inline: 24px;
  color: var(--color-text-tertiary);
  font-size: 0.82rem;
  line-height: 1.45;
  box-sizing: border-box;
}

.tool-os-page__breadcrumbs a {
  color: var(--tos-primary);
  text-decoration: none;
}

.tool-os-page__breadcrumbs a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

.tos-header-shell,
.tos-footer-shell {
  padding: 0 24px;
}

.tos-header-inner,
.tos-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.tos-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--tos-text);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tos-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-active));
  color: var(--color-text-inverse);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tos-brand__logo {
  height: 38px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.tos-footer__logo {
  height: 40px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.tos-header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: 18px;
}

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

.tos-nav a {
  color: var(--tos-text);
  font-weight: 600;
}

.tos-search-form {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: min(100%, 520px);
  max-width: 640px;
}

.tos-search-form__input {
  width: 100%;
  min-height: 48px;
  padding: 10px 52px 10px 18px;
  border: 1px solid var(--tos-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--tos-text);
  font: inherit;
}

.tos-search-form__input:focus {
  outline: none;
  border-color: var(--tos-primary);
  box-shadow: 0 0 0 3px var(--color-input-focus-ring);
}

.tos-search-form__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  font-size: 20px;
  line-height: 1;
}

.tos-search-form__button {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-tertiary);
  cursor: pointer;
}

.tos-search-form__button:hover,
.tos-search-form__button:focus-visible {
  color: var(--tos-primary);
  outline: none;
}

.tos-search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--tos-border);
  border-radius: 16px;
  background: var(--color-surface, #fff);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  max-height: min(60vh, 360px);
  overflow: auto;
}

.tos-search-suggest__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--tos-text);
}

.tos-search-suggest__item:hover,
.tos-search-suggest__item.is-active {
  background: color-mix(in srgb, var(--tos-primary, #2563eb) 10%, transparent);
}

.tos-search-suggest__title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

.tos-search-suggest__meta {
  font-size: 0.8rem;
  color: var(--tos-text-secondary, #64748b);
  line-height: 1.35;
}

.tos-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--tos-border);
  border-radius: 12px;
  background: var(--color-surface-frosted-strong);
  white-space: nowrap;
  color: var(--tos-text);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.tos-login-link:hover,
.tos-login-link:focus-visible {
  color: var(--tos-primary);
  border-color: var(--color-border-strong);
  background: var(--color-surface);
  text-decoration: none;
}

.tos-lang-switcher {
  position: relative;
}

.tos-lang-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--tos-border);
  border-radius: 12px;
  background: var(--color-surface-frosted-strong);
  color: var(--tos-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.tos-lang-switcher__toggle:hover,
.tos-lang-switcher__toggle:focus-visible,
.tos-lang-switcher[data-open] .tos-lang-switcher__toggle {
  color: var(--tos-primary);
  border-color: var(--color-border-strong);
  background: var(--color-surface);
}

.tos-lang-switcher__toggle[aria-expanded="true"] .tos-lang-switcher__icon {
  transform: rotate(180deg);
}

.tos-lang-switcher__code,
.tos-lang-switcher__toggle .tos-lang-switcher__name {
  font-size: 13px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.tos-lang-switcher__icon {
  font-size: 18px;
  line-height: 1;
  transition: transform 160ms ease;
}

.tos-lang-switcher__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: max(100%, 240px);
  width: max-content;
  max-width: min(92vw, 320px);
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--tos-border);
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.tos-lang-switcher__list[hidden] {
  display: none;
}

.tos-lang-switcher__item a {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--tos-text);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease;
}

.tos-lang-switcher__item a:hover,
.tos-lang-switcher__item a:focus-visible {
  background: var(--color-surface-frosted);
  color: var(--tos-primary);
  text-decoration: none;
}

.tos-lang-switcher__item.is-current a {
  color: var(--tos-primary);
  font-weight: 700;
}

.tos-lang-switcher__flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 14px;
  line-height: 1;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.tos-lang-switcher__flag-img {
  display: block;
  width: 20px;
  height: 14px;
  object-fit: cover;
}

.tos-lang-switcher__toggle .tos-lang-switcher__flag,
.tos-lang-switcher__toggle .tos-lang-switcher__flag-img {
  width: 22px;
  height: 15px;
}

.tos-lang-switcher__name {
  font-size: 14px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .tos-lang-switcher__list {
    right: auto;
    left: 0;
  }
}

.tos-category-nav {
  padding: 14px 0 0;
}

.tos-category-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tos-category-nav__item {
  flex: 1 1 0;
  display: flex;
  justify-content: center;
  min-width: max-content;
}

.tos-category-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tos-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.tos-category-nav__link:hover {
  color: var(--tos-primary);
  text-decoration: none;
}

.tos-category-nav__link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--tos-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 160ms ease;
}

.tos-category-nav__link:hover::after,
.tos-category-nav__link:focus-visible::after,
.tos-category-nav__link.is-current::after {
  transform: scaleX(1);
}

.tos-category-nav__link.is-current {
  color: var(--tos-primary);
}

.tos-main {
  padding: 32px 0 0;
}

.tos-hero,
.tos-panel,
.tos-card,
.tos-archive-item,
.tos-result-summary,
.tool-os {
  background: var(--tos-card);
  border: 1px solid var(--tos-border);
  border-radius: var(--tos-radius-md);
  box-shadow: none;
}

.tos-hero {
  padding: 40px;
  margin-bottom: 28px;
}

.tos-home-hero {
  max-width: 820px;
  padding: 40px 24px 32px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.tos-search-hero {
  max-width: 860px;
  margin: 0 auto 16px;
  padding: 24px 24px 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: center;
}

.tos-search-hero .tos-kicker {
  justify-content: center;
}

.tos-search-hero .tos-title {
  margin-bottom: 12px;
}

.tos-search-hero .tos-subtitle {
  max-width: 720px;
  margin: 0 auto;
}

.tos-home-hero .tos-title {
  margin-bottom: 12px;
  color: var(--tos-primary);
}

.tos-home-hero .tos-subtitle {
  max-width: 720px;
  margin: 0;
  font-size: 1.05rem;
}

.tos-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--tos-primary-soft);
  color: var(--tos-primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tos-title {
  margin: 14px 0 8px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.tos-subtitle,
.tos-text-muted,
.tos-footer-copy,
.tos-meta {
  color: var(--tos-text-secondary);
}

.tos-page-grid,
.tos-tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

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

.tos-content-stack,
.tos-sidebar-stack {
  display: grid;
  gap: 24px;
}

.tos-content-stack--tool {
  width: 100%;
}

.tos-tool-embed {
  width: 100%;
}

.tos-tool-embed .tool-os {
  margin: 0;
}

.tos-panel,
.tos-card,
.tos-result-summary {
  padding: 0 24px;
}

.tos-panel:has(> .tool-os),
.tos-panel:has(> .tos-tool-embed > .tool-os) {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.tos-panel:has(> .tool-os) > .tos-section-title,
.tos-panel:has(> .tool-os) > .tos-text-muted,
.tos-panel:has(> .tos-tool-embed > .tool-os) > .tos-section-title,
.tos-panel:has(> .tos-tool-embed > .tool-os) > .tos-text-muted {
  display: none;
}

.tool-os-page--embedded .tool-os-page__content > .tos-panel:not(.tos-prose) {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.tool-os-page--embedded .tool-os-page__content > .tos-panel > .tos-section-title,
.tool-os-page--embedded .tool-os-page__content > .tos-panel > .tos-text-muted {
  display: none;
}

.tool-os-page--embedded .tool-os-page__content > .tos-panel > .tos-tool-embed,
.tool-os-page--embedded .tool-os-page__content > .tos-panel > .tool-os {
  width: 100%;
}

.tool-os-page--embedded .tool-os-page__content > .tos-panel > .tos-tool-embed > .tool-os,
.tool-os-page--embedded .tool-os-page__content > .tos-panel > .tool-os {
  margin: 0;
}

.tos-section-title {
  margin: 0 0 14px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.tos-formula {
  margin: 0;
  padding: 16px 18px;
  border-radius: var(--tos-radius-sm);
  background: #0f172a;
  color: #e2e8f0;
  overflow: auto;
}

.tos-faq-list {
  display: grid;
  gap: 14px;
}

.tos-faq-item {
  padding: 18px;
  border: 1px solid var(--tos-border);
  border-radius: var(--tos-radius-sm);
  background: #fff;
}

.tos-cta-block {
  margin-top: 24px;
}

.tos-cta-block__actions {
  margin: 18px 0 0;
}

.tos-cta-block__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--tos-primary);
  border-radius: 10px;
  background: transparent;
  color: var(--tos-primary);
  font-weight: 700;
  text-decoration: none;
}

.tos-cta-block__button:hover {
  text-decoration: none;
}

.tos-card-grid,
.tos-archive-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tos-archive-item {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 220px;
  padding: 22px;
}

.tos-archive-item__arrow {
  position: absolute;
  top: 18px;
  right: 18px;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.tos-archive-item__arrow:hover,
.tos-archive-item__arrow:focus-visible {
  color: #64748b;
  text-decoration: none;
  transform: translate(1px, -1px);
}

.tos-country-variants {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px 8px;
  margin-top: -12px;
}

.tos-country-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tos-country-badge:hover,
.tos-country-badge:focus-visible {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #1e293b;
  text-decoration: none;
}

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

.tos-country-code {
  font-size: 12px;
  letter-spacing: 0.5px;
}

.tos-category-overview {
  display: block;
}

.tos-category-overview__grid {
  display: grid;
  gap: 20px;
  padding: 24px 0;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tos-category-overview__card {
  display: grid;
  position: relative;
  justify-items: center;
  align-content: center;
  gap: 10px;
  min-height: 156px;
  padding: 22px 22px 20px;
  border: 1px solid var(--tos-border);
  border-radius: var(--tos-radius-md);
  background: var(--color-surface);
  color: var(--tos-text);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease,
    box-shadow 160ms ease;
}

.tos-category-overview__card:hover,
.tos-category-overview__card:focus-visible {
  text-decoration: none;
  border-color: var(--color-border-strong);
  background: var(--color-surface-muted);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.tos-category-overview__card:hover .tos-category-overview__arrow,
.tos-category-overview__card:focus-visible .tos-category-overview__arrow {
  color: var(--color-text-secondary);
  transform: translate(1px, -1px);
}

.tos-category-overview__card:hover .tos-category-overview__icon,
.tos-category-overview__card:focus-visible .tos-category-overview__icon {
  background: var(--color-primary-soft-strong);
  color: var(--color-primary);
}

.tos-category-overview__arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--color-badge-primary-background);
  font-size: 17px;
  line-height: 1;
  transition: color 160ms ease, transform 160ms ease;
}

.tos-category-overview__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--tos-primary-soft);
  color: var(--tos-primary);
  font-size: 24px;
  line-height: 1;
  text-align: center;
  vertical-align: middle;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  transition: background-color 160ms ease, color 160ms ease;
}

.tos-category-overview__icon-glyph {
  display: block;
  font-size: 24px;
  line-height: 1;
  text-align: center;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.tos-category-overview__card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
  text-align: center;
}

.tos-category-overview__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tos-text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

.tos-home-collection {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.tos-home-collection__header {
  margin: 80px 0 60px;
  text-align: center;
}

.tos-home-collection .tos-section-title {
  font-size: 2rem;
}

.tos-home-collection__text {
  margin: 0;
  text-align: center;
}

.tos-home-collection .tos-archive-item {
  justify-items: start;
  align-content: start;
  min-height: 240px;
  padding: 22px 22px 20px;
  border: 1px solid var(--tos-border);
  border-radius: var(--tos-radius-md);
  background: var(--color-surface);
  color: var(--tos-text);
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease,
    box-shadow 160ms ease;
}

.tos-home-collection .tos-archive-item:hover,
.tos-home-collection .tos-archive-item:focus-within {
  border-color: var(--color-border-strong);
  background: var(--color-surface-muted);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.tos-home-collection .tos-archive-item__arrow {
  top: 16px;
  right: 16px;
  color: var(--color-badge-primary-background);
}

.tos-home-collection .tos-archive-item .tos-meta,
.tos-home-collection .tos-archive-item .tos-text-muted {
  text-align: left;
}

.tos-home-collection .tos-archive-item h2,
.tos-home-collection .tos-archive-item h3 {
  margin: 0;
  text-align: left;
}

.tos-search-best-match {
  margin: 60px 0 36px;
  padding: 28px;
  border: 1px solid var(--color-primary-soft-strong);
  border-radius: var(--tos-radius-lg);
  background: linear-gradient(180deg, var(--color-surface-frosted-strong), var(--color-surface));
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease,
    box-shadow 160ms ease;
}

.tos-search-best-match:hover,
.tos-search-best-match:focus-within {
  border-color: var(--color-primary-soft-strong);
  background: linear-gradient(180deg, var(--color-surface), var(--color-surface-muted));
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.tos-search-best-match:hover .tos-search-best-match__cta,
.tos-search-best-match:focus-within .tos-search-best-match__cta {
  border-color: var(--color-primary-soft-strong);
}

.tos-search-best-match__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.tos-search-best-match__meta {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--color-primary-soft-strong);
  border-radius: 999px;
  background: var(--color-surface-frosted);
  color: var(--tos-text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
}

.tos-search-best-match__body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.tos-search-best-match__content {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.tos-search-best-match__content h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.tos-search-best-match__content h2 a {
  color: var(--tos-text);
  text-decoration: none;
}

.tos-search-best-match__content h2 a:hover,
.tos-search-best-match__content h2 a:focus-visible {
  color: var(--tos-primary);
  text-decoration: none;
}

.tos-search-best-match__content .tos-text-muted {
  margin: 0;
  font-size: 1rem;
}

.tos-search-best-match__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--color-primary-soft-strong);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--tos-primary);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.tos-search-best-match__cta:hover,
.tos-search-best-match__cta:focus-visible {
  color: var(--color-link-hover);
  text-decoration: none;
}

.tos-search-results__header {
  display: grid;
  gap: 8px;
  margin: 60px 0 40px;
  padding: 0 24px;
}

.tos-search-results__header .tos-text-muted {
  margin: 0;
}

.tos-search-card {
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease,
    box-shadow 160ms ease;
}

.tos-search-card:hover,
.tos-search-card:focus-within {
  border-color: var(--color-border-strong);
  background: var(--color-surface-muted);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.tos-search-card:hover .tos-archive-item__arrow,
.tos-search-card:focus-within .tos-archive-item__arrow {
  color: var(--color-text-secondary);
  transform: translate(1px, -1px);
}

.tos-search-highlight {
  padding: 0 0.18em;
  border-radius: 0.25em;
  background: var(--color-primary-soft-strong);
  color: inherit;
}

.tos-archive-item h2,
.tos-archive-item h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.tos-archive-item h2 a,
.tos-archive-item h3 a {
  color: var(--tos-text);
  text-decoration: none;
}

.tos-archive-item h2 a:hover,
.tos-archive-item h2 a:focus-visible,
.tos-archive-item h3 a:hover,
.tos-archive-item h3 a:focus-visible {
  color: var(--tos-primary);
  text-decoration: none;
}

.tool-os-page--tool,
.tool-os-page--category {
  width: min(100% - 32px, var(--tos-container));
  margin: 0 auto 40px;
}

.tool-os-page__content {
  width: 100%;
}

.tool-os-page__header {
  display: grid;
  gap: 12px;
  margin: 24px 0 8px;
  padding-inline: 24px;
  box-sizing: border-box;
}

.tool-os-page__header h1 {
  margin: 0;
  color: var(--tos-text);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
}

.tool-os-page__lede {
  margin: 0;
  max-width: 760px;
  color: var(--tos-text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* GEO: crawlable SSR tool identity (must remain in HTML for AI/Google) */
.tool-os-page__geo-identity {
  margin: 28px 0 8px;
  max-width: 760px;
  padding: 18px 24px 0;
  border-top: 1px solid color-mix(in srgb, var(--tos-border, #d6dbe3) 80%, transparent);
}

.tool-os-page__geo-identity-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--tos-text);
  font-weight: 600;
}

.tool-os-page__geo-identity-summary {
  margin: 0 0 10px;
  color: var(--tos-text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.tool-os-page__geo-identity-details {
  margin: 0;
  color: var(--tos-text-secondary);
  font-size: 0.9rem;
}

.tool-os-page__geo-identity-summary-toggle {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--tos-text);
  padding: 4px 0;
}

.tool-os-page__geo-identity-summary-toggle::-webkit-details-marker {
  display: none;
}

.tool-os-page__geo-identity-summary-toggle::before {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-right: 0.5em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  vertical-align: 0.15em;
  transition: transform 0.15s ease;
}

.tool-os-page__geo-identity-details[open] > .tool-os-page__geo-identity-summary-toggle::before {
  transform: rotate(45deg);
  vertical-align: 0.05em;
}

.tool-os-page__geo-identity-meta {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 6px 14px;
  margin: 10px 0 0;
  color: var(--tos-text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tool-os-page__geo-identity-meta dt {
  margin: 0;
  font-weight: 600;
  color: var(--tos-text);
}

.tool-os-page__geo-identity-meta dd {
  margin: 0;
}

.tool-os-page__geo-identity-meta code {
  font-size: 0.88em;
}

.tool-os-page__geo-identity-meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

@media (max-width: 640px) {
  .tool-os-page__geo-identity {
    padding-inline: 16px;
  }

  .tool-os-page__geo-identity-meta {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }

  .tool-os-page__geo-identity-meta dt {
    margin-top: 6px;
  }
}

.tool-os-page__content > p {
  max-width: 760px;
  margin: 0 0 18px;
  padding-inline: 24px;
  color: var(--tos-text-secondary);
}

.tool-os-page__content > ul,
.tool-os-page__content > ol {
  max-width: 760px;
  margin: 0 0 18px;
  padding-inline-start: 24px;
  padding-inline-end: 24px;
  list-style-position: inside;
  color: var(--tos-text-secondary);
}

.tool-os-page__content > ul > li,
.tool-os-page__content > ol > li {
  margin: 0 0 10px;
  line-height: 1.75;
}

.tool-os-page__content > ul > li:last-child,
.tool-os-page__content > ol > li:last-child {
  margin-bottom: 0;
}

.tool-os-page__intro {
  padding-inline: 24px;
}

.tool-os-subcategory-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px !important;
  padding-inline: 24px;
}

.tool-os-subcategory-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--tos-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--tos-text);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.tool-os-subcategory-nav__link:hover {
  text-decoration: none;
  border-color: var(--tos-primary);
  background: var(--color-surface-muted);
  color: var(--tos-primary);
  transform: translateY(-1px);
}

.tool-os-subcategory-nav__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--color-badge-neutral-background);
  color: var(--tos-text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.tool-os-category-groups {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: none;
  padding-inline: 0 !important;
  box-sizing: border-box;
}

.tool-os-category-group {
  border: 1px solid var(--tos-border);
  border-radius: 14px;
  background: var(--color-surface);
  padding: 24px;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.tool-os-category-group__header {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.tool-os-category-group__header h2 {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--tos-text);
  font-size: 1.2rem;
}

.tool-os-category-group__count {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--color-badge-primary-background);
  color: var(--color-badge-primary-text);
  font-size: 0.78rem;
  font-weight: 700;
}

.tool-os-category-group__header p {
  margin: 0;
  color: var(--tos-text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

.tool-os-category-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.tool-os-category-list__item {
  min-width: 0;
}

.tool-os-category-list__link {
  display: grid;
  padding: 8px 16px;
  border: 1px solid var(--tos-border);
  border-radius: 12px;
  background: var(--color-surface-muted);
  color: var(--tos-text);
  text-decoration: none;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.tool-os-category-list__link:hover {
  text-decoration: none;
  border-color: var(--tos-primary);
  background: var(--color-surface);
  transform: translateY(-2px);
}

.tool-os-category-list__name {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
}

.tool-os-country-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  padding-left: 4px;
}

.tool-os-country-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tool-os-country-badge:hover,
.tool-os-country-badge:focus-visible {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #1e293b;
  text-decoration: none;
}

.tool-os-country-flag {
  font-size: 14px;
  line-height: 1;
}

.tool-os-country-badge .tool-os-country-code {
  font-size: 11px;
  letter-spacing: 0.5px;
}

.tos-button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tos-button:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--color-primary-hover);
}

.tos-button--secondary {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

.tos-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.tos-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--color-badge-primary-background);
  color: var(--color-badge-primary-text);
  font-size: 12px;
  font-weight: 700;
}

.tos-site-footer a {
  color: var(--tos-text);
}

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

.tos-footer-shell {
  display: grid;
  gap: 18px;
}

.tos-footer-nav {
  width: 100%;
}

.tos-footer-nav ul,
.tos-footer-links {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tos-footer-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.tos-footer-section--brand {
  max-width: 420px;
}

.tos-footer-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tos-text);
}

.tos-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 22px;
  border-top: 1px solid var(--tos-border);
  color: var(--tos-text-secondary);
  font-size: 0.88rem;
}

.tos-footer-text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: inherit;
  text-decoration: none;
}

.tos-footer-text-button:hover,
.tos-footer-text-button:focus-visible {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--tos-text);
}

.tos-search-form--footer {
  min-width: 0;
  max-width: 360px;
}

/* Hide hero taxonomy and description in tool pages. */
.tool-os-page__taxonomy,
.tool-os-page__lede,
.toolos-shortcode__description {
  display: none;
}

/* SEO content block: clean reading width without card background/border. */
.tos-panel.tos-prose {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0 0 30px 24px;
  max-width: 800px;
  justify-self: start;
}

@media (max-width: 640px) {
  .tos-panel.tos-prose {
    padding: 24px 0;
  }
}

.tos-prose {
  color: var(--tos-text);
  font-size: 1rem;
  line-height: 1.75;
}

.tos-prose > .tos-section-title {
  margin-bottom: 1.25rem;
}

.tos-prose > div > *:first-child {
  margin-top: 0;
}

.tos-prose > div > *:last-child {
  margin-bottom: 0;
}

.tos-prose > div > h2,
.tos-prose > div > h3,
.tos-prose > div > h4,
.tos-prose > div > h5,
.tos-prose > div > h6 {
  color: var(--tos-text);
  font-weight: 700;
  line-height: 1.3;
}

.tos-prose > div > h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.tos-prose > div > h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}

.tos-prose > div > h4 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.125rem;
}

.tos-prose > div > p {
  margin-bottom: 1.25rem;
  color: var(--tos-text-secondary);
}

.tos-prose > div > ul,
.tos-prose > div > ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.tos-prose > div > ul {
  list-style-type: disc;
}

.tos-prose > div > ol {
  list-style-type: decimal;
}

.tos-prose > div > ul li,
.tos-prose > div > ol li {
  margin-bottom: 0.5rem;
  color: var(--tos-text-secondary);
}

.tos-prose > div > ul li::marker,
.tos-prose > div > ol li::marker {
  color: var(--tos-text-tertiary);
}

.tos-prose > div > a {
  color: var(--tos-primary);
  text-decoration: none;
  font-weight: 500;
}

.tos-prose > div > a:hover,
.tos-prose > div > a:focus {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

.tos-prose > div > hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--tos-border);
}

.tos-prose > div > blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--tos-primary);
  border-radius: 8px;
  background: var(--color-primary-50);
  color: var(--tos-text-secondary);
}

.tos-prose > div > blockquote p:last-child {
  margin-bottom: 0;
}

.tos-prose > div > table {
  width: 100%;
  margin-bottom: 1.5rem;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.9375rem;
  background: var(--color-neutral-0);
  box-shadow: 0 0 0 1px var(--color-neutral-200);
}

.tos-prose > div > table th,
.tos-prose > div > table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-neutral-200);
  text-align: left;
  vertical-align: top;
}

.tos-prose > div > table th {
  background: var(--color-neutral-100);
  font-weight: 600;
  color: var(--tos-text);
}

.tos-prose > div > table td {
  color: var(--tos-text-secondary);
}

.tos-prose > div > table tbody tr:nth-child(even) {
  background: var(--color-neutral-50);
}

.tos-prose > div > table tbody tr:last-child td {
  border-bottom: 0;
}

.tos-prose > div > img,
.tos-prose > div > figure {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: var(--tos-radius-sm);
}

.tos-prose > div > figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--tos-radius-sm);
}

.tos-prose > div > code {
  padding: 0.125rem 0.375rem;
  border-radius: 6px;
  background: var(--color-background-subtle);
  color: var(--color-secondary);
  font-size: 0.875em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tos-prose > div > pre {
  margin-bottom: 1.5rem;
  padding: 1rem;
  overflow: auto;
  border-radius: var(--tos-radius-sm);
  background: var(--color-surface-inverse);
  color: var(--color-text-inverse);
  font-size: 0.875rem;
  line-height: 1.6;
}

.tos-prose > div > pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.tos-faq-section .tos-panel {
  max-width: 824px;
  margin-left: 0;
  margin-right: auto;
  padding-top: 24px;
  padding-bottom: 24px;
}

/* FAQ block refinements */
.tos-faq-item {
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tos-faq-item:hover {
  background: var(--color-background-subtle);
  border-color: var(--color-border-strong);
}

.tos-faq-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--tos-text);
}

.tos-faq-item .tos-text-muted {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--tos-text-secondary);
}

@media (max-width: 640px) {
  .tos-prose > div > h2 {
    font-size: 1.5rem;
  }

  .tos-prose > div > h3 {
    font-size: 1.25rem;
  }

  .tos-prose > div > table {
    display: block;
    overflow-x: auto;
  }

  .tos-faq-item h3 {
    font-size: 1rem;
  }
}

.tool-os-page--embedded .tool-os-page__content > .tos-related-tools.tos-panel {
  margin: 24px 0 0;
  padding: 24px 0;
}

.tool-os-page--embedded .tool-os-page__content > .tos-related-tools.tos-panel > .tos-section-title {
  display: block;
  margin-left: 24px;
}

.tos-related-tools .tos-section-title {
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 600;
}

.tos-related-tools__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}

.tos-related-tools__item {
  display: grid;
  gap: 0;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--tos-border);
  border-radius: var(--tos-radius-md);
  background: var(--color-neutral-0);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tos-related-tools__item:hover,
.tos-related-tools__item:hover .tos-related-tools__title,
.tos-related-tools__item:hover .tos-related-tools__excerpt {
  text-decoration: none;
}

.tos-related-tools__item:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--tos-shadow-sm);
}

.tos-related-tools__meta {
  margin-bottom: 6px;
  font-size: 0.75rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tos-primary);
}

.tos-related-tools__title {
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--tos-text);
}

.tos-related-tools__excerpt {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--tos-text-secondary);
}

@media (max-width: 1024px) {
  .tos-related-tools__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .tos-related-tools__grid {
    grid-template-columns: 1fr;
  }
}

.tos-explore-section {
  margin-top: 24px;
  text-align: center;
}

.tos-explore-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #fff;
  color: var(--tos-text);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--tos-primary);
  border-radius: var(--tos-radius-md);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.tos-explore-button:hover {
  background: var(--tos-primary);
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
}

.tos-explore-button__arrow {
  transition: transform 0.15s ease;
}

.tos-explore-button:hover .tos-explore-button__arrow {
  transform: translateX(4px);
}

.tool-os {
  margin: 0;
  padding: 28px;
}

.tool-os__title {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.tool-os__button {
  background: var(--tos-primary);
}

.tool-os__results {
  gap: 14px;
}

.tool-os__result-card {
  border-radius: var(--tos-radius-sm);
  border: 1px solid var(--tos-border);
  background: linear-gradient(180deg, var(--color-surface), var(--color-surface-muted));
}

.tool-os__result-value {
  color: var(--tos-text);
  letter-spacing: -0.03em;
}

.tool-os__error,
.tool-os__notice {
  color: var(--tos-error);
}

@media (max-width: 980px) {
  .tos-page-grid,
  .tos-tool-layout {
    grid-template-columns: 1fr;
  }

  .tos-category-overview__grid {
    grid-template-columns: 1fr;
  }

  .tool-os-page--category .tool-os-category-list {
    grid-template-columns: 1fr;
  }


  .tos-header-inner,
  .tos-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .tos-header-tools,
  .tos-search-form,
  .tos-search-form--footer {
    width: 100%;
  }

  .tos-header-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .tos-search-form {
    min-width: 100%;
    max-width: none;
  }

  .tos-nav ul {
    flex-wrap: wrap;
  }

  .tos-search-best-match__body {
    flex-direction: column;
    align-items: flex-start;
  }

  .tos-footer-bottom {
    flex-direction: column;
  }
}
