:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-soft: #eff6ff;
  --accent: #0f766e;
  --accent-soft: #f0fdfa;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px -6px rgba(15, 23, 42, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --max-w: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #111827;
  --surface-alt: #1e293b;
  --text: #f8fafc;
  --text-muted: #cbd5e1;
  --border: #283548;
  --primary: #60a5fa;
  --primary-hover: #93c5fd;
  --primary-soft: rgba(59, 130, 246, 0.14);
  --accent: #2dd4bf;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px -6px rgba(0, 0, 0, 0.45);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  font-weight: 600;
  z-index: 200;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  border-radius: 8px;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

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

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--surface-alt);
  color: var(--text);
  text-decoration: none;
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--surface-alt);
}

.menu-btn {
  display: none;
}

.theme-icon-sun {
  display: none;
}

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

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

@media (max-width: 820px) {
  .menu-btn {
    display: inline-flex;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 18px;
    box-shadow: var(--shadow-md);
  }
  .site-nav.is-open {
    display: block;
  }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-links a {
    padding: 11px 14px;
  }
}

/* Main */
main {
  flex: 1;
}

/* Breadcrumbs */
.breadcrumb-bar {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 0.88rem;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
}

.breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-list li + li::before {
  content: "/";
  color: var(--text-muted);
  opacity: 0.7;
}

.breadcrumb-list a {
  color: var(--text-muted);
  font-weight: 500;
}

.breadcrumb-list [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* Hero */
.hero {
  padding: 52px 0 40px;
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 4vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-sub {
  margin: 0 auto 28px;
  max-width: 650px;
  font-size: 1.06rem;
  color: var(--text-muted);
}

/* Search Box */
.search-wrap {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}

.search-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 6px 8px 6px 16px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.15s ease;
}

.search-input-box:focus-within {
  border-color: var(--primary);
}

.search-input-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input-box input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  padding: 8px 4px;
  outline: none;
}

.search-clear {
  border: 0;
  background: var(--surface-alt);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.search-clear[hidden] {
  display: none;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-item svg {
  color: var(--accent);
}

/* Sections */
.section {
  padding: 52px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  letter-spacing: -0.02em;
}

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

/* Suite Pillar Cards */
.suite-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1024px) {
  .suite-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.suite-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  color: inherit;
  text-decoration: none;
}

.suite-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.suite-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.suite-card[data-suite="pdf"] .suite-icon {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.suite-card[data-suite="audio"] .suite-icon {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.suite-card[data-suite="base64"] .suite-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

html[data-theme="dark"] .suite-card[data-suite="pdf"] .suite-icon {
  color: #f87171;
  background: rgba(248, 113, 113, 0.14);
}

html[data-theme="dark"] .suite-card[data-suite="audio"] .suite-icon {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.14);
}

.suite-domain {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.suite-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.suite-card p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.93rem;
  flex: 1;
}

.suite-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--primary);
}

/* Filter Pills */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.filter-btn.is-active,
.filter-btn[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

html[data-theme="dark"] .filter-btn.is-active,
html[data-theme="dark"] .filter-btn[aria-pressed="true"] {
  color: #0b1120;
}

/* Tool Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 960px) {
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.tool-card[hidden] {
  display: none;
}

.tool-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tool-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tool-card h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
  color: var(--text);
}

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

.empty-state {
  text-align: center;
  padding: 36px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  background: var(--surface);
}

.empty-state[hidden] {
  display: none;
}

/* Feature & Steps Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

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

.info-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.info-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.section-alt .info-card {
  background: var(--bg);
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 12px;
}

html[data-theme="dark"] .step-num {
  color: #0b1120;
}

.info-card h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
}

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

/* FAQ */
.faq-list {
  display: grid;
  gap: 12px;
  max-width: 860px;
}

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

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.faq-chevron {
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.arrow-icon {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.tool-card:hover .arrow-icon,
.suite-card:hover .arrow-icon {
  transform: translateX(3px);
}

.faq-answer {
  padding: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.faq-answer p {
  margin: 0;
}

/* Prose / Content Pages */
.page-hero {
  padding: 36px 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 720px;
}

.prose {
  max-width: 820px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.prose h2 {
  margin: 26px 0 10px;
  font-size: 1.25rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p, .prose li {
  color: var(--text-muted);
}

.prose ul {
  padding-left: 20px;
}

/* Form */
.form-grid {
  display: grid;
  gap: 16px;
  max-width: 620px;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.93rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  border: 0;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--primary-hover);
  text-decoration: none;
}

html[data-theme="dark"] .btn {
  color: #0b1120;
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

html[data-theme="dark"] .btn-secondary {
  color: var(--text);
}

.status-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--accent);
  font-size: 0.94rem;
}

.status-box[hidden] {
  display: none;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 44px 0 26px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 32px;
}

@media (max-width: 920px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.footer-col h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 10px 0 0;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.87rem;
  color: var(--text-muted);
}

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