/* -------------------------------------------------------------
   Duplicate Line Remover & Alphabetical Sorter - Stylesheet
   Pure Modern CSS (CSS Grid, Flexbox, Custom Properties)
   ------------------------------------------------------------- */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "Fira Code", "JetBrains Mono", Consolas, "Courier New", monospace;

  /* Color Palette - Dark Theme (Default) */
  --bg-app: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #1c2128;
  --bg-input: #0b0e14;
  --border-color: #30363d;
  --border-focus: #58a6ff;
  
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-dim: #6e7681;

  --accent-primary: #238636;
  --accent-primary-hover: #2ea043;
  --accent-blue: #1f6feb;
  --accent-blue-hover: #388bfd;
  --accent-danger: #da3633;
  --accent-danger-hover: #f85149;
  --accent-warning: #d29922;

  --badge-bg: #21262d;
  --badge-text: #c9d1d9;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
body.light-theme {
  --bg-app: #f6f8fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f4f6;
  --bg-input: #ffffff;
  --border-color: #d0d7de;
  --border-focus: #0969da;

  --text-main: #1f2328;
  --text-muted: #57606a;
  --text-dim: #8c959f;

  --accent-primary: #1a7f37;
  --accent-primary-hover: #2da44e;
  --accent-blue: #0969da;
  --accent-blue-hover: #218bff;
  --accent-danger: #cf222e;
  --accent-danger-hover: #a40e26;
  --accent-warning: #9a6700;

  --badge-bg: #eaeef2;
  --badge-text: #24292f;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1540px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.25rem;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
  flex-wrap: wrap;
}

.header-branding {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #1f6feb 0%, #238636 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(31, 111, 235, 0.3);
}

.logo-icon svg {
  width: 24px;
  height: 24px;
}

.header-branding h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.header-branding .subtitle {
  font-size: 0.825rem;
  color: var(--text-muted);
}

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

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-dim);
}

.status-badge.online .status-dot {
  background-color: #3fb950;
  box-shadow: 0 0 8px rgba(63, 185, 80, 0.6);
}

.status-badge.checking .status-dot {
  background-color: #d29922;
  animation: pulse-dot 1.2s infinite ease-in-out;
}

.status-badge.offline .status-dot {
  background-color: #f85149;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

.btn-icon {
  padding: 0.45rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-icon:hover {
  background-color: var(--bg-card-hover);
}

.btn-circle {
  border-radius: 50%;
  width: 42px;
  height: 42px;
  box-shadow: var(--shadow-md);
}

.btn-action-highlight {
  color: var(--accent-blue);
  border-color: rgba(31, 111, 235, 0.4);
}

.btn-action-highlight:hover {
  background-color: rgba(31, 111, 235, 0.1);
  color: var(--accent-blue-hover);
}

.btn-icon-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.text-danger {
  color: var(--accent-danger) !important;
}

/* Theme Toggle Icons */
.theme-icon {
  font-size: 1.1rem;
  line-height: 1;
}

body.dark-theme .light-icon { display: inline-block; }
body.dark-theme .dark-icon { display: none; }
body.light-theme .light-icon { display: none; }
body.light-theme .dark-icon { display: inline-block; }

/* Main Content Layout */
.app-main {
  flex: 1;
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Toolbar */
.toolbar-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  background-color: var(--bg-card);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

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

.file-upload-label {
  cursor: pointer;
}

/* Switch Toggle (Live Update) */
.switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-toggle .slider {
  position: relative;
  width: 38px;
  height: 22px;
  background-color: var(--border-color);
  border-radius: 9999px;
  transition: var(--transition);
}

.switch-toggle .slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: var(--transition);
}

.switch-toggle input:checked + .slider {
  background-color: var(--accent-blue);
}

.switch-toggle input:checked + .slider::before {
  transform: translateX(16px);
}

.switch-label {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Form Controls & Selects */
select, input[type="text"] {
  font-family: inherit;
  font-size: 0.85rem;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.75rem;
  outline: none;
  transition: var(--transition);
}

select:focus, input[type="text"]:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.2);
}

.form-control {
  width: 100%;
}

.form-control.mono {
  font-family: var(--font-mono);
  font-size: 0.825rem;
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

@media (min-width: 1100px) {
  .options-grid {
    grid-template-columns: 1fr 1fr 1.4fr 1fr;
  }
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.card-icon {
  font-size: 0.95rem;
  color: var(--accent-blue);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Checkboxes */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

/* Prefix & Suffix Layout */
.prefix-suffix-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.preset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.25rem;
}

.preset-label {
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
}

.preset-pill {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.725rem;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.preset-pill:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--accent-blue);
}

.info-note {
  font-size: 0.725rem;
  color: var(--text-dim);
}

.info-note code {
  font-family: var(--font-mono);
  color: var(--accent-blue);
  background: var(--bg-input);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

.mt-2 {
  margin-top: 0.5rem;
}

/* Live Metrics Dashboard Bar */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  align-items: center;
  gap: 0.75rem;
  background-color: var(--bg-card);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.stat-card {
  display: flex;
  flex-direction: column;
  position: relative;
}

.stat-title {
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
  line-height: 1.2;
}

.stat-arrow {
  font-size: 1.4rem;
  color: var(--text-dim);
  text-align: center;
  user-select: none;
}

.stat-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: var(--badge-bg);
  color: var(--text-muted);
  width: fit-content;
  margin-top: 0.2rem;
}

.highlight-danger .stat-value {
  color: var(--accent-danger);
}

.highlight-danger .stat-badge {
  background-color: rgba(218, 54, 51, 0.15);
  color: var(--accent-danger);
}

.badge-engine {
  background-color: rgba(31, 111, 235, 0.15);
  color: var(--accent-blue);
}

/* Dual Editor Panes */
.editors-container {
  display: flex;
  gap: 1rem;
  position: relative;
  align-items: stretch;
}

@media (max-width: 860px) {
  .editors-container {
    flex-direction: column;
  }
  .stat-arrow {
    display: none;
  }
}

.editor-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 440px;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  background-color: var(--badge-bg);
  border-bottom: 1px solid var(--border-color);
}

.pane-title {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.pane-title h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.pane-counter {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.pane-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.editor-body {
  flex: 1;
  display: flex;
}

.code-editor {
  width: 100%;
  height: 100%;
  min-height: 400px;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: none;
  outline: none;
  resize: vertical;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
  tab-size: 2;
}

.code-editor::placeholder {
  color: var(--text-dim);
  font-style: italic;
}

.editors-separator {
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .editors-separator {
    margin: -0.5rem 0;
  }
}

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

.toast {
  pointer-events: auto;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: toast-in 0.25s ease-out forwards;
}

.toast.toast-success {
  border-left: 4px solid var(--accent-primary);
}

.toast.toast-error {
  border-left: 4px solid var(--accent-danger);
}

.toast.toast-info {
  border-left: 4px solid var(--accent-blue);
}

@keyframes toast-in {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toast-out {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(20px);
    opacity: 0;
  }
}

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

/* Header Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background-color: var(--bg-card);
}

.feedback-btn {
  color: var(--accent-blue);
  border-color: var(--border-color);
  font-weight: 500;
}

.feedback-btn:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--accent-blue);
}

/* Footer */
.app-footer {
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.footer-links a {
  color: var(--accent-blue);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------------
   SEO Content Pages (Landing, About, Blog Hub & Articles)
   ------------------------------------------------------------- */
.seo-page-container {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  padding: 2.5rem 1.25rem 4rem;
}

.seo-hero {
  text-align: center;
  margin-bottom: 3.5rem;
}

.seo-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.seo-hero .hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

.seo-cta-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.seo-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
}

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

.seo-card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.seo-card h2, .seo-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  color: var(--text-main);
}

.seo-card p {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.6;
}

.seo-section {
  margin-bottom: 3.5rem;
}

.seo-section h2 {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

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

.seo-prose p {
  margin-bottom: 1.25rem;
}

.seo-prose h3 {
  font-size: 1.35rem;
  color: var(--text-main);
  margin: 2rem 0 0.75rem;
}

.seo-prose ul, .seo-prose ol {
  margin: 0 0 1.5rem 1.5rem;
}

.seo-prose li {
  margin-bottom: 0.5rem;
}

.seo-prose code {
  font-family: var(--font-mono);
  background-color: var(--bg-input);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.875em;
  color: var(--accent-blue);
}

.seo-prose pre {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.seo-faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.seo-faq-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.seo-faq-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.blog-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background-color: var(--badge-bg);
  color: var(--accent-blue);
  font-size: 0.75rem;
  font-weight: 600;
}

.article-card {
  display: block;
  text-decoration: none;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

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

.article-card h2 {
  font-size: 1.35rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.article-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* -------------------------------------------------------------
   Ad Placement Slots (Responsive IAB Banner Units)
   ------------------------------------------------------------- */
.ad-slot {
  width: 100%;
  margin: 1.5rem auto;
  display: block;
  text-align: center;
  box-sizing: border-box;
  clear: both;
}

.ad-slot-top {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.ad-slot-middle {
  margin: 1.75rem auto;
}

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

.ad-slot-vertical {
  width: 100%;
  max-width: 300px;
  margin: 1.5rem auto;
}

.ad-placeholder {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  margin-left: auto;
  margin-right: auto;
  background-color: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  display: block;
  box-sizing: border-box;
  transition: var(--transition);
  position: relative;
  text-align: center;
}

.ad-placeholder-square {
  max-width: 336px;
  min-height: 280px;
}

.ad-placeholder-vertical {
  min-height: 600px;
  max-width: 300px;
}

.blog-article-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

.blog-article-layout .seo-prose {
  flex: 1;
  min-width: 0;
}

.blog-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 1.5rem;
}

@media (max-width: 992px) {
  .blog-article-layout {
    flex-direction: column;
  }
  .blog-sidebar {
    width: 100%;
    position: static;
  }
  .ad-placeholder-vertical {
    min-height: 250px;
    max-width: 100%;
  }
}

.ad-placeholder:hover {
  border-color: var(--accent-blue);
  background-color: var(--bg-card-hover);
}

.ad-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
  user-select: none;
  text-align: center;
}

.ad-content-slot {
  display: block;
  width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  text-align: center;
  margin: 0 auto;
}

/* Ensure Google AdSense ins elements always have positive measurable width */
ins.adsbygoogle {
  display: block !important;
  width: 100% !important;
  min-width: 250px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

.ad-dimension-hint {
  opacity: 0.75;
  font-size: 0.75rem;
}

@media (max-width: 768px) {
  .ad-placeholder {
    max-width: 100%;
    min-height: 60px;
    padding: 0.5rem;
  }
}
