/* Tool Page Layouts & Workspaces */

.tool-header-section {
  padding: 2.5rem 0 1.5rem;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

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

.breadcrumb-separator {
  color: var(--text-muted);
}

.tool-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.tool-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.tool-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 780px;
}

/* Tool Workspace Container */
.tool-workspace-container {
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 2.5rem;
}

.workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
  min-height: 52px;
  box-sizing: border-box;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Text Workspace (Split Editors) */
.split-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
  background: var(--bg-surface);
}

@media (max-width: 860px) {
  .split-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.workspace-pane {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
}

.workspace-pane:first-child {
  border-right: 1px solid var(--border-subtle);
}

@media (max-width: 860px) {
  .workspace-pane:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  padding: 0 1rem;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border-subtle);
  box-sizing: border-box;
  line-height: 1;
}

.pane-header .badge {
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  line-height: 1.2;
}

.editor-textarea {
  flex: 1;
  width: 100%;
  min-height: 380px;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  tab-size: 2;
}

.editor-textarea::placeholder {
  color: var(--text-muted);
}

/* Form Workspace (Calculators & Network Tools) */
.form-workspace-layout {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 860px) {
  .form-workspace-layout {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.95rem;
  font-family: inherit;
  font-size: 0.9375rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1em;
  padding-right: 2.25rem;
}

/* Results Card */
.results-card {
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.results-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.results-primary-val {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.results-details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.875rem;
}

.results-details-table td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.results-details-table td:first-child {
  color: var(--text-muted);
  font-weight: 500;
}

.results-details-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* Stats Bar */
.workspace-stats-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  overflow-x: auto;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.stat-val {
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* Status Alert */
.status-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin: 1rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-alert-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

.status-alert-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}

/* SEO Content Section */
.seo-content-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.seo-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 2.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.seo-content-grid > aside {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 900px) {
  .seo-content-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
}

.seo-article {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.seo-article-content {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

.seo-article h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  color: var(--text-primary);
  overflow-wrap: break-word;
}

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

.seo-article p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.seo-overview-text {
  font-size: 1.025rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2rem;
  overflow-wrap: break-word;
}

/* ==========================================================================
   Mathematical Formula Card & Legend
   ========================================================================== */
.seo-formula-block {
  margin: 2rem 0;
  min-width: 0;
  max-width: 100%;
}

.math-formula-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--primary, #3b82f6);
  border-radius: var(--radius-lg, 12px);
  padding: 1.5rem;
  margin: 1.25rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.math-formula-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.math-formula-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary, #3b82f6);
  background: var(--primary-light, rgba(59, 130, 246, 0.1));
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full, 9999px);
}

.math-formula-expression {
  background: var(--bg-muted, #f8fafc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.math-formula-expression code {
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  letter-spacing: 0.02em;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.math-formula-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0.75rem 0 1.25rem;
  overflow-wrap: break-word;
}

.math-variables-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1rem;
  box-sizing: border-box;
}

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

.math-variables-table th {
  padding: 0.65rem 0.85rem;
  background: var(--bg-muted, #f8fafc);
  color: var(--text-muted, #64748b);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.math-variables-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  overflow-wrap: break-word;
}

.var-badge {
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.var-unit {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Worked Examples Cards
   ========================================================================== */
.seo-examples-block {
  margin: 2.25rem 0;
  min-width: 0;
  max-width: 100%;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
  min-width: 0;
  max-width: 100%;
}

.worked-example-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 12px);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.worked-example-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.example-badge {
  align-self: flex-start;
  font-size: 0.725rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-muted);
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.example-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  overflow-wrap: break-word;
}

.example-scenario {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  overflow-wrap: break-word;
}

.example-inputs-list {
  background: var(--bg-muted);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md, 8px);
  font-size: 0.8125rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.example-inputs-label {
  display: block;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.example-inputs-list ul {
  list-style: disc;
  padding-left: 1.15rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--text-secondary);
  overflow-wrap: break-word;
}

.example-calc-step {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  min-width: 0;
  max-width: 100%;
}

.example-calc-label {
  display: block;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.example-calc-step code {
  display: block;
  padding: 0.5rem 0.75rem;
  background: var(--bg-muted);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.example-result-box {
  background: linear-gradient(135deg, var(--bg-muted), var(--bg-surface));
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md, 8px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  box-sizing: border-box;
}

.example-result-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.example-result-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary, #3b82f6);
  overflow-wrap: break-word;
}

/* ==========================================================================
   Real-World Use Cases Grid
   ========================================================================== */
.seo-usecases-block {
  margin: 2.25rem 0;
  min-width: 0;
  max-width: 100%;
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  min-width: 0;
  max-width: 100%;
}

.usecase-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 8px);
  padding: 1.25rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

.usecase-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  overflow-wrap: break-word;
}

.usecase-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  overflow-wrap: break-word;
}

/* How to Steps */
.how-to-steps {
  list-style: none;
  counter-reset: step-counter;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.how-to-step {
  counter-increment: step-counter;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.how-to-step::before {
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary-text);
  font-weight: 700;
  font-size: 0.875rem;
}

/* Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

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

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ==========================================================================
   Enhanced Related Tools Sidebar
   ========================================================================== */
.related-tools-card-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 12px);
  padding: 1.25rem;
  position: sticky;
  top: 80px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.related-tools-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.related-tools-icon {
  font-size: 1.25rem;
}

.related-tools-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.related-tools-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.related-tool-item-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem;
  border-radius: var(--radius-md, 8px);
  background: var(--bg-muted, #f8fafc);
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.related-tool-item-link:hover {
  background: var(--bg-surface);
  border-color: var(--primary, #3b82f6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.related-tool-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.related-tool-item-name {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-primary);
}

.related-tool-badge {
  font-size: 0.675rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--primary-light, rgba(59, 130, 246, 0.1));
  color: var(--primary, #3b82f6);
}

.related-tool-item-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.related-tool-action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.related-tool-link-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary, #3b82f6);
}

/* ==========================================================================
   Standardized 2-Card Stacked Workspace Layout
   ========================================================================== */
.stacked-workspace {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.workspace-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-header-label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary, #1e293b);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-header-label .helper-hint {
  color: var(--text-secondary, #64748b);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

.stacked-input-field {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.9375rem;
  font-family: inherit;
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 6px;
  background: var(--bg-surface-alt, #f8fafc);
  color: var(--text-primary, #0f172a);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.stacked-input-field:focus {
  outline: none;
  border-color: var(--primary, #3b82f6);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pill-toggles-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.pill-toggle-btn {
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-color, #cbd5e1);
  background: var(--bg-surface, #ffffff);
  color: var(--text-primary, #334155);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.pill-toggle-btn:hover {
  background: #f1f5f9;
}

.pill-toggle-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.inline-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary, #334155);
  cursor: pointer;
  user-select: none;
  margin-left: 0.25rem;
}

.inline-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.card-action-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.btn-card-primary {
  background: #334155;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-card-primary:hover {
  background: #1e293b;
}

.btn-card-secondary {
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.output-display-box {
  padding: 1.1rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-primary, #0f172a);
  background: var(--bg-surface, #ffffff);
  border-radius: 6px;
  word-break: break-all;
  min-height: 48px;
}

.output-copy-bar {
  margin-top: 1rem;
}

.btn-copy-bar {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--border-color, #e2e8f0);
  background: #ffffff;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.btn-copy-bar:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-copy-bar.copied {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

/* ==========================================================================
   Zero-CLS Ad Slots & Monetization Containers
   ========================================================================== */
.ad-slot-container {
  width: 100%;
  margin: 1.25rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

.ad-slot-top_leaderboard {
  max-width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.ad-slot-mid_content {
  margin: 2rem 0;
}

.ad-slot-sticky_sidebar {
  margin-top: 1.5rem;
}

.ad-placeholder-box {
  width: 100%;
  background: var(--bg-surface-alt, #f8fafc);
  border: 1px dashed var(--border-color, #cbd5e1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary, #64748b);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ==========================================================================
   1-Click Interactive Presets Row
   ========================================================================== */
.preset-bar-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.preset-bar-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #64748b);
  margin-right: 0.25rem;
}

.preset-pill-btn {
  background: var(--bg-surface-alt, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary, #334155);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.preset-pill-btn:hover {
  background: var(--primary, #4f46e5);
  color: #ffffff;
  border-color: var(--primary, #4f46e5);
}

.preset-pill-btn:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Embed Modal & Action Tools
   ========================================================================== */
.tool-action-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-color, #cbd5e1);
  background: var(--bg-surface, #ffffff);
  color: var(--text-primary, #334155);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-tool-pill:hover {
  background: #f8fafc;
  border-color: var(--primary, #4f46e5);
  color: var(--primary, #4f46e5);
}

.embed-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.embed-modal-overlay.active {
  display: flex;
}

.embed-modal-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 12px;
  padding: 1.75rem;
  width: 90%;
  max-width: 580px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}


