/* ==========================================================================
   TextReverse - Modern Apple-Grade Stylesheet
   Zero external dependencies | 100% Native CSS3 | Ultra-High Performance
   Strict WCAG AAA Contrast (>= 7:1) across Light and Dark Themes
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables & Design Tokens (WCAG AAA Compliant)
   -------------------------------------------------------------------------- */
:root {
  --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", "Courier New", monospace;

  /* Color Palette - Light Mode (All text pairs >= 7:1 contrast on background) */
  --bg-body: #F8FAFC;
  --bg-gradient: radial-gradient(circle at 50% 0%, #EEF2FF 0%, #F8FAFC 65%);
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F1F5F9;
  --bg-surface-glass: rgba(255, 255, 255, 0.92);
  --bg-input: #FFFFFF;
  --bg-card: #FFFFFF;

  /* Strict WCAG AAA text contrast against white/surface:
     --text-primary: #0F172A (17.85:1 contrast)
     --text-secondary: #334155 (10.35:1 contrast)
     --text-muted: #475569 (7.58:1 contrast)
  */
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #475569;
  --text-inverse: #FFFFFF;

  /* Accent colors with >= 7:1 contrast */
  --accent-primary: #1E40AF;       /* Blue-800: 8.72:1 contrast against white text */
  --accent-hover: #1D4ED8;
  --accent-active: #172554;
  --accent-subtle: #EFF6FF;
  --accent-border: #93C5FD;
  --accent-badge-text: #1E40AF;   /* 8.01:1 contrast against #EFF6FF */

  --success-color: #065F46;        /* 7.4:1 contrast */
  --success-bg: #ECFDF5;
  --success-border: #6EE7B7;

  --danger-color: #991B1B;         /* Red-800: 8.31:1 contrast against white */
  --danger-bg: #FEF2F2;
  --danger-border: #FCA5A5;

  --border-subtle: #CBD5E1;
  --border-medium: #94A3B8;
  --border-focus: #1E40AF;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.03);
  --shadow-inner: inset 0 2px 4px 0 rgba(15, 23, 42, 0.04);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-body: #090D16;
  --bg-gradient: radial-gradient(circle at 50% 0%, #172554 0%, #090D16 65%);
  --bg-surface: #131C2E;
  --bg-surface-elevated: #1E293B;
  --bg-surface-glass: rgba(19, 28, 46, 0.92);
  --bg-input: #0F172A;
  --bg-card: #131C2E;

  /* Strict WCAG AAA text contrast against dark backgrounds:
     --text-primary: #F8FAFC (18.57:1 contrast on #090D16)
     --text-secondary: #E2E8F0 (13.81:1 contrast on #131C2E)
     --text-muted: #CBD5E1 (10.9:1 contrast on #131C2E)
  */
  --text-primary: #F8FAFC;
  --text-secondary: #E2E8F0;
  --text-muted: #CBD5E1;
  --text-inverse: #090D16;

  /* Dark mode accent: #60A5FA on dark text (7.64:1 AAA), #93C5FD on surface (9.44:1 AAA) */
  --accent-primary: #3B82F6;
  --accent-hover: #60A5FA;
  --accent-active: #93C5FD;
  --accent-subtle: rgba(59, 130, 246, 0.18);
  --accent-border: rgba(96, 165, 250, 0.45);
  --accent-badge-text: #93C5FD;

  --success-color: #34D399;
  --success-bg: rgba(16, 185, 129, 0.2);
  --success-border: rgba(52, 211, 153, 0.45);

  --danger-color: #FCA5A5;        /* 8.97:1 contrast against #131C2E */
  --danger-bg: rgba(239, 68, 68, 0.18);
  --danger-border: rgba(248, 113, 113, 0.45);

  --border-subtle: #334155;
  --border-medium: #475569;
  --border-focus: #60A5FA;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 32px -4px rgba(0, 0, 0, 0.6);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   Global Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Screen Reader Only Utility */
.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;
}

/* Accessible Focus States */
:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Container & Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.content-container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color var(--transition-normal), background-color var(--transition-normal);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: opacity var(--transition-fast);
}

.brand-logo:hover {
  opacity: 0.85;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-primary), #4338CA);
  color: #FFFFFF;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.35);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
  color: var(--accent-hover);
}

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

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--border-subtle);
  transform: translateY(-1px);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-smooth);
}

.icon-sun { display: none; }
.icon-moon { display: block; }

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

/* --------------------------------------------------------------------------
   Hero & Title Section
   -------------------------------------------------------------------------- */
.hero-section {
  text-align: center;
  padding: 2.75rem 0 1.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--accent-subtle);
  color: var(--accent-badge-text);
  border: 1px solid var(--accent-border);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-badge-text);
  box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.7);
  animation: pulse-ring 2s infinite cubic-bezier(0.45, 0, 0.2, 1);
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(30, 64, 175, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(30, 64, 175, 0); }
}

h1.hero-title {
  font-size: clamp(2rem, 4vw + 1rem, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.2vw + 0.5rem, 1.2rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   App Card / Interactive Tool Interface
   -------------------------------------------------------------------------- */
.tool-wrapper {
  margin-bottom: 4rem;
}

.tool-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

/* Action Toolbar */
.action-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.925rem;
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all var(--transition-fast);
}

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

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--text-inverse);
  box-shadow: 0 2px 4px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(30, 64, 175, 0.4);
}

.btn-primary:active {
  background-color: var(--accent-active);
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background-color: var(--border-subtle);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

.btn-danger-outline {
  background-color: var(--danger-bg);
  color: var(--danger-color);
  border-color: var(--danger-border);
}

.btn-danger-outline:hover {
  background-color: rgba(153, 27, 27, 0.12);
  border-color: var(--danger-color);
  transform: translateY(-1px);
}

.btn-danger-outline:active {
  transform: translateY(0) scale(0.98);
}

/* Two-Column Editor Layout */
.editors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.editor-box {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-inner);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.editor-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-subtle), var(--shadow-inner);
}

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

.editor-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.editor-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-mini {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.btn-mini:hover {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-mini.btn-copy-highlight {
  background-color: var(--accent-primary);
  color: #FFFFFF;
  border-color: var(--accent-primary);
}

.btn-mini.btn-copy-highlight:hover {
  background-color: var(--accent-hover);
}

.btn-mini.copied {
  background-color: var(--success-color) !important;
  color: #FFFFFF !important;
  border-color: var(--success-color) !important;
  transform: scale(1.03);
}

.textarea-field {
  width: 100%;
  height: 250px;
  min-height: 200px;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-primary);
  background-color: transparent;
  border: none;
  outline: none;
  resize: vertical;
}

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

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.counter-group {
  display: flex;
  gap: 0.95rem;
}

.counter-item strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Quick Mode Switcher Buttons (Fully accessible button elements) */
.mode-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.mode-tag {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.pill-option {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill-option:hover {
  color: var(--accent-primary);
  border-color: var(--accent-border);
  background: var(--accent-subtle);
}

/* Toast Micro-Feedback */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--text-primary);
  color: var(--bg-body);
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Semantic SEO Content Section (800+ words)
   -------------------------------------------------------------------------- */
.seo-article {
  padding: 2rem 0 4rem;
}

.article-body {
  color: var(--text-primary);
}

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

.article-section h2 {
  font-size: clamp(1.4rem, 2vw + 0.6rem, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.15rem;
  position: relative;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-subtle);
}

.article-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
}

.article-section p {
  color: var(--text-secondary);
  font-size: 1.025rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.article-section p strong {
  color: var(--text-primary);
}

.feature-list,
.step-list,
.bullet-list {
  list-style: none;
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bullet-list li,
.feature-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 1rem;
}

.bullet-list li::before,
.feature-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

[data-theme="dark"] .bullet-list li::before,
[data-theme="dark"] .feature-list li::before {
  color: var(--accent-hover);
}

/* Step-by-Step Numbered List */
.step-list {
  counter-reset: step-counter;
}

.step-list li {
  position: relative;
  padding-left: 2.75rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.step-list li::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.85rem;
  height: 1.85rem;
  background-color: var(--accent-subtle);
  color: var(--accent-badge-text);
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Comparison / Feature Grid */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.feature-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
}

.feature-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background-color: var(--accent-subtle);
  color: var(--accent-badge-text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.feature-icon-badge svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.feature-card p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0;
}

/* FAQ Accordion (<details> & <summary>) */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.faq-item[open] {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.faq-summary {
  padding: 1.15rem 1.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
  list-style: none;
}

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

.faq-icon-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: transform var(--transition-smooth), color var(--transition-fast);
}

.faq-item[open] .faq-icon-arrow {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

[data-theme="dark"] .faq-item[open] .faq-icon-arrow {
  color: var(--accent-hover);
}

.faq-content {
  padding: 0 1.35rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.975rem;
  line-height: 1.7;
}

.faq-content p {
  margin-bottom: 0.65rem;
}

.faq-content p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.footer-brand p {
  margin-top: 0.65rem;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h3 {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
}

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

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

[data-theme="dark"] .footer-links a:hover {
  color: var(--accent-hover);
}

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

/* --------------------------------------------------------------------------
   Responsive Design Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .editors-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .action-toolbar {
    justify-content: stretch;
  }

  .action-toolbar .btn {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 140px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .action-toolbar .btn {
    flex: 1 1 100%;
  }

  .hero-section {
    padding: 1.75rem 0 1rem;
  }

  .tool-card {
    padding: 1.15rem;
  }

  .editor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .editor-controls {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Reduced Motion Preference for Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print Styles */
@media print {
  .site-header, .action-toolbar, .theme-toggle, .btn-mini, .site-footer {
    display: none !important;
  }
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
}
