/* ==========================================================================
   Everything Converter — Modern SaaS Conversion Platform
   Developed by Shubham Kumar ❤
   ========================================================================== */

:root {
  /* Colors - Light Theme */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f5f9;
  --bg-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Accent & Brand Colors */
  --brand-primary: #4f46e5;
  --brand-hover: #4338ca;
  --brand-subtle: #eef2ff;
  --brand-border: #c7d2fe;
  --brand-text: #3730a3;

  --accent-cyan: #0284c7;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --container-max: 1200px;
}

[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-hover: #1f2937;
  --bg-elevated: #1a2234;
  --bg-subtle: #1e293b;
  --border-subtle: #1f293d;
  --border-strong: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --brand-primary: #6366f1;
  --brand-hover: #818cf8;
  --brand-subtle: #1e1b4b;
  --brand-border: #3730a3;
  --brand-text: #c7d2fe;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo-img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.header-nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.header-nav-link:hover,
.header-nav-link.active {
  color: var(--brand-primary);
  text-decoration: none;
  background: var(--brand-subtle);
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.65rem;
  font-size: 1.15rem;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s ease;
}

.mobile-menu-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.mobile-nav-menu {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 0 1rem 0;
  border-top: 1px solid var(--border-subtle);
}

.mobile-nav-menu.open {
  display: flex;
}

.mobile-nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--brand-subtle);
  color: var(--brand-primary);
  text-decoration: none;
}

@media (max-width: 860px) {
  .header-nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
}

.nav-center {
  flex: 1;
  max-width: 28rem;
  display: none;
}

@media (min-width: 768px) {
  .nav-center {
    display: block;
  }
}

.header-search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.45rem 0.95rem;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.header-search-bar:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
}

.header-search-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
}

.search-shortcut {
  font-size: 0.72rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.lang-btn {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Square Categories Grid (First Page) */
.square-categories-section {
  margin: 2.25rem 0;
}

.square-categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .square-categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 680px) {
  .square-categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 440px) {
  .square-categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
}

.square-cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  aspect-ratio: 1 / 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.85rem 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.square-cat-tile:hover {
  transform: translateY(-4px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
  background: var(--bg-surface-hover);
  text-decoration: none;
}

.square-cat-icon-wrap {
  font-size: 2.35rem;
  line-height: 1;
  margin-bottom: 0.45rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
  transition: transform 0.2s ease;
}

.square-cat-tile:hover .square-cat-icon-wrap {
  transform: scale(1.15);
}

.square-cat-name {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0 0.25rem;
}

.square-cat-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* Main Content Area */
#app-main {
  flex: 1;
  padding: 1.75rem 0 3.5rem 0;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 2.25rem 0 2rem 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--brand-subtle);
  color: var(--brand-text);
  border: 1px solid var(--brand-border);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 42rem;
  margin: 0 auto 1.5rem auto;
}

.hero-search-wrapper {
  max-width: 36rem;
  margin: 0 auto 1.5rem auto;
  position: relative;
}

.hero-search-input {
  width: 100%;
  padding: 0.9rem 1.25rem 0.9rem 2.85rem;
  font-size: 1rem;
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-search-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.hero-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.quick-tools-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.chip-btn {
  font-size: 0.825rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all 0.15s ease;
  text-decoration: none;
}

.chip-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-subtle);
  text-decoration: none;
}

/* Category Grid */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.category-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-border);
}

.cat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cat-icon-wrap {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--brand-subtle);
  color: var(--brand-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.cat-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.cat-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.cat-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.cat-tool-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: auto;
}

.cat-tool-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-secondary);
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}

.cat-tool-item a:hover {
  background: var(--bg-subtle);
  color: var(--brand-primary);
  text-decoration: none;
}

.view-all-cat-link {
  display: inline-block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--brand-primary);
  margin-top: 0.75rem;
  text-decoration: none;
}

.view-all-cat-link:hover {
  text-decoration: underline;
}

/* Tool View Component */
.tool-view-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .tool-view-container {
    grid-template-columns: 1fr 340px;
  }
}

.tool-view-main {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Breadcrumbs */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

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

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

.breadcrumb-separator {
  color: var(--border-strong);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

/* Tool Hero Card */
.tool-card-interface {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.tool-header-block {
  margin-bottom: 1.25rem;
}

.tool-title-h1 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.tool-description-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Converter Interactive Engine UI */
.converter-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.converter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 640px) {
  .converter-grid {
    grid-template-columns: 1fr auto 1fr;
  }
}

.converter-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.col-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.converter-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.converter-input {
  width: 100%;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 0.75rem 0.9rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s ease;
}

.converter-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.converter-select {
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.converter-select:focus {
  border-color: var(--brand-primary);
}

.swap-btn-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-swap {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-swap:hover {
  transform: rotate(180deg);
  background: var(--brand-subtle);
  border-color: var(--brand-primary);
}

/* Converter Controls & Toolbar */
.converter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.btn-action:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-action.copied {
  background: var(--accent-emerald);
  color: #ffffff;
  border-color: var(--accent-emerald);
}

.precision-selector {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.precision-pill {
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.precision-pill.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.result-banner {
  background: var(--brand-subtle);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.result-main-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-text);
  word-break: break-all;
}

.result-formula-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Educational Content Sections */
.info-section-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.info-h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.formula-box {
  background: var(--bg-subtle);
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 0.9rem 1.15rem;
  margin: 0.85rem 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.85rem 0;
  counter-reset: step-counter;
}

.steps-list li {
  counter-increment: step-counter;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.925rem;
  color: var(--text-secondary);
}

.steps-list li::before {
  content: counter(step-counter);
  width: 1.6rem;
  height: 1.6rem;
  border-radius: var(--radius-full);
  background: var(--brand-subtle);
  color: var(--brand-text);
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Conversion Reference Table */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin: 0.85rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.data-table th {
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

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

.data-table tr:hover td {
  background: var(--bg-surface-hover);
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

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

.faq-trigger {
  width: 100%;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--text-primary);
  background: none;
}

.faq-trigger .icon-chevron {
  transition: transform 0.2s ease;
  color: var(--text-muted);
}

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

.faq-content {
  display: none;
  padding: 0 1rem 0.9rem 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-item.open .faq-content {
  display: block;
}

/* Sidebar & Related Tools */
.tool-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.related-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.related-link-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}

.related-link-item a:hover {
  background: var(--bg-subtle);
  color: var(--brand-primary);
  text-decoration: none;
}

/* AdSense Slot (Clean & Compliant) */
.ad-slot-card {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90px;
}

.ad-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.ad-placeholder-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* History Box */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 200px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.history-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.75rem 0;
}

/* Interactive Image & Text Tool Specialized Containers */
.tool-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: var(--bg-subtle);
  transition: all 0.2s ease;
}

.tool-dropzone:hover, .tool-dropzone.drag-over {
  border-color: var(--brand-primary);
  background: var(--brand-subtle);
}

.dropzone-icon {
  font-size: 2.25rem;
  color: var(--brand-primary);
  margin-bottom: 0.5rem;
}

.dropzone-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.dropzone-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tool-preview-area {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.preview-img-box {
  max-width: 100%;
  max-height: 280px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  object-fit: contain;
}

.editor-textarea {
  width: 100%;
  min-height: 140px;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  resize: vertical;
}

.editor-textarea:focus {
  border-color: var(--brand-primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.65rem;
  margin: 0.85rem 0;
}

.stat-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  text-align: center;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Modal Search Overlay */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem 1rem 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.search-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.search-modal {
  width: 100%;
  max-width: 38rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-search-input {
  width: 100%;
  font-size: 1.05rem;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
}

.modal-results-list {
  max-height: 380px;
  overflow-y: auto;
  list-style: none;
  padding: 0.5rem;
}

.modal-result-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s ease;
}

.modal-result-item a:hover {
  background: var(--bg-subtle);
}

.modal-result-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 1.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 24rem;
}

.footer-creator {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.footer-heading {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-links a {
  font-size: 0.84rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--text-primary);
  color: var(--bg-surface);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: slideUp 0.2s ease forwards;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Multi-Base Number Grid */
.multi-base-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .multi-base-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.base-input-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.15s ease;
}

.base-input-card:focus-within {
  border-color: var(--brand-primary);
}

.base-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.base-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.base-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--brand-subtle);
  color: var(--brand-text);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.base-field {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  background: none;
  border: none;
  outline: none;
}

/* Age Calculator UI */
.age-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}

@media (max-width: 600px) {
  .age-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.age-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.75rem;
  text-align: center;
}

.age-stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.1;
}

.age-stat-lbl {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.35rem;
  letter-spacing: 0.03em;
}

.age-summary-banner {
  background: linear-gradient(135deg, var(--brand-subtle) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.age-primary-text {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 0.35rem;
}

.age-sub-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* Digital & Data Breakdown Table */
.digital-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin-top: 0.75rem;
}

.digital-breakdown-table th,
.digital-breakdown-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.digital-breakdown-table th {
  background: var(--bg-subtle);
  font-weight: 600;
  color: var(--text-muted);
}

.digital-breakdown-table tr:hover {
  background: var(--bg-surface-hover);
}

/* Passport Photo Maker & Image Tools */
.passport-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.passport-preset-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.passport-preset-btn:hover,
.passport-preset-btn.active {
  background: var(--brand-subtle);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.color-swatch-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.color-swatch {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-swatch:hover,
.color-swatch.active {
  transform: scale(1.15);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px var(--brand-subtle);
}

.size-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  color: var(--text-primary);
}

.size-indicator-badge.optimized {
  color: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

/* Accessibility & Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
