/* ============================================
   ShrinkTo v2 - Design System
   Inspired by Google's clean, refined aesthetic
   ============================================ */

:root {
  /* Brand Colors */
  --color-primary: #1a73e8;
  --color-primary-hover: #1765cc;
  --color-primary-active: #185abc;
  --color-primary-light: #e8f0fe;
  --color-primary-50: #f8fbff;

  --color-success: #1e8e3e;
  --color-success-light: #e6f4ea;
  --color-warning: #f9ab00;
  --color-warning-light: #fef7e0;
  --color-danger: #d93025;
  --color-danger-light: #fce8e6;
  --color-info: #1a73e8;
  --color-purple: #8430ce;
  --color-purple-light: #f3e8fd;

  --color-text: #202124;
  --color-text-secondary: #5f6368;
  --color-text-tertiary: #80868b;
  --color-text-disabled: #bdc1c6;
  --color-border: #dadce0;
  --color-border-light: #e8eaed;
  --color-bg: #ffffff;
  --color-bg-subtle: #f8f9fa;
  --color-bg-elevated: #ffffff;
  --color-overlay: rgba(32, 33, 36, 0.6);

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px; --space-10: 128px;

  --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Monaco, Consolas, monospace;

  --text-xs: 12px; --text-sm: 14px; --text-base: 16px; --text-lg: 18px;
  --text-xl: 20px; --text-2xl: 24px; --text-3xl: 32px; --text-4xl: 40px;
  --text-5xl: 56px; --text-6xl: 72px;

  --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600; --weight-bold: 700;

  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px;
  --radius-2xl: 24px; --radius-full: 9999px;

  --shadow-1: 0 1px 2px 0 rgba(60, 64, 67, 0.08), 0 1px 3px 1px rgba(60, 64, 67, 0.04);
  --shadow-2: 0 1px 2px 0 rgba(60, 64, 67, 0.1), 0 2px 6px 2px rgba(60, 64, 67, 0.05);
  --shadow-3: 0 4px 8px 3px rgba(60, 64, 67, 0.08), 0 1px 3px rgba(60, 64, 67, 0.07);
  --shadow-4: 0 6px 10px 4px rgba(60, 64, 67, 0.1), 0 2px 3px rgba(60, 64, 67, 0.08);
  --shadow-modal: 0 24px 48px rgba(60, 64, 67, 0.2), 0 0 0 1px rgba(60, 64, 67, 0.05);
  --shadow-focus: 0 0 0 3px rgba(26, 115, 232, 0.2);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  --container-max: 1280px;
  --container-narrow: 960px;
  --container-text: 720px;
  --header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { font-family: var(--font-family); font-size: var(--text-base); line-height: 1.5; color: var(--color-text); background: var(--color-bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11'; }
img, svg, video { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-primary-hover); text-decoration: none; }

.material-symbols-rounded { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; vertical-align: middle; user-select: none; }
.material-symbols-rounded.filled { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

h1, h2, h3, h4, h5, h6 { font-weight: var(--weight-semibold); line-height: 1.15; letter-spacing: -0.02em; color: var(--color-text); }
h1 { font-size: clamp(36px, 5.5vw, 56px); letter-spacing: -0.03em; font-weight: var(--weight-bold); }
h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.025em; }
h3 { font-size: clamp(22px, 2.5vw, 28px); }
h4 { font-size: var(--text-xl); }
p { color: var(--color-text-secondary); line-height: 1.6; }

.eyebrow { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-primary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-4); }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-5); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--space-5); }
section { padding: var(--space-9) 0; }
@media (max-width: 768px) { section { padding: var(--space-7) 0; } }

/* ============================================ Header ============================================ */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.85); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent; transition: border-color var(--transition-normal), background var(--transition-normal); }
.site-header.scrolled { border-bottom-color: var(--color-border-light); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-height); }
.brand { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xl); font-weight: var(--weight-bold); color: var(--color-text); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; color: var(--color-text); }
.brand-mark { width: 32px; height: 32px; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--color-primary) 0%, #4285f4 100%); display: grid; place-items: center; color: white; font-size: 18px; }
.brand-name { display: flex; align-items: baseline; }
.brand-name span:first-child { color: var(--color-text); }
.brand-name span:last-child { color: var(--color-primary); }
.nav-links { display: flex; align-items: center; gap: var(--space-6); list-style: none; }
.nav-links a { color: var(--color-text-secondary); font-size: var(--text-sm); font-weight: var(--weight-medium); padding: var(--space-2) 0; }
.nav-links a:hover { color: var(--color-text); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--color-primary); font-weight: var(--weight-semibold); }
.nav-cta { display: flex; align-items: center; gap: var(--space-3); }
@media (max-width: 768px) { .nav-links { display: none; } .brand { font-size: var(--text-lg); } }

/* ============================================ Buttons ============================================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 12px 24px; font-size: var(--text-sm); font-weight: var(--weight-medium); border-radius: var(--radius-full); transition: all var(--transition-fast); cursor: pointer; white-space: nowrap; text-decoration: none; border: 1px solid transparent; letter-spacing: 0.01em; }
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--color-primary); color: white; box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--color-primary-hover); color: white; box-shadow: var(--shadow-2); transform: translateY(-1px); }
.btn-primary:active { background: var(--color-primary-active); transform: translateY(0); box-shadow: var(--shadow-1); }
.btn-secondary { background: white; color: var(--color-primary); border-color: var(--color-border); }
.btn-secondary:hover { background: var(--color-primary-50); border-color: var(--color-primary); color: var(--color-primary); }
.btn-ghost { background: transparent; color: var(--color-text-secondary); }
.btn-ghost:hover { background: var(--color-bg-subtle); color: var(--color-text); }
.btn-success { background: var(--color-success); color: white; }
.btn-success:hover { background: #137333; color: white; box-shadow: var(--shadow-2); }
.btn-danger { background: white; color: var(--color-danger); border-color: var(--color-border); }
.btn-danger:hover { background: var(--color-danger-light); border-color: var(--color-danger); color: var(--color-danger); }
.btn-large { padding: 16px 32px; font-size: var(--text-base); }
.btn-small { padding: 8px 16px; font-size: var(--text-xs); }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

/* ============================================ Hero ============================================ */
.hero { padding: var(--space-7) 0 var(--space-8); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -200px; right: -200px; width: 600px; height: 600px; background: radial-gradient(circle, rgba(26, 115, 232, 0.06) 0%, transparent 70%); pointer-events: none; z-index: 0; }
.hero::after { content: ''; position: absolute; bottom: -200px; left: -200px; width: 500px; height: 500px; background: radial-gradient(circle, rgba(52, 168, 83, 0.04) 0%, transparent 70%); pointer-events: none; z-index: 0; }
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 800px; margin: 0 auto var(--space-6); }
.hero-badge { display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px 14px; background: var(--color-primary-light); color: var(--color-primary); font-size: var(--text-xs); font-weight: var(--weight-medium); border-radius: var(--radius-full); margin-bottom: var(--space-5); letter-spacing: 0.02em; }
.hero-badge .material-symbols-rounded { font-size: 16px; }
.hero h1 { margin-bottom: var(--space-4); }
.hero h1 .gradient-text { background: linear-gradient(135deg, var(--color-primary) 0%, #4285f4 50%, #1a73e8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: clamp(17px, 1.8vw, 20px); color: var(--color-text-secondary); max-width: 640px; margin: 0 auto var(--space-5); line-height: 1.5; }
.hero-trust { display: flex; align-items: center; justify-content: center; gap: var(--space-5); flex-wrap: wrap; font-size: var(--text-sm); color: var(--color-text-tertiary); margin-bottom: var(--space-6); }
.trust-item { display: inline-flex; align-items: center; gap: var(--space-1); }
.trust-item .material-symbols-rounded { font-size: 18px; color: var(--color-success); }

/* ============================================ Compressor v2 ============================================ */
.compressor { max-width: 1100px; margin: 0 auto; background: white; border: 1px solid var(--color-border-light); border-radius: var(--radius-2xl); box-shadow: var(--shadow-3); overflow: hidden; position: relative; }

.toolbar { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-border-light); background: var(--color-bg); display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.toolbar-group { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.toolbar-divider { width: 1px; height: 24px; background: var(--color-border-light); margin: 0 var(--space-2); }
.toolbar-label { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-right: var(--space-1); }
@media (max-width: 768px) { .toolbar-divider { display: none; } .toolbar { padding: var(--space-3) var(--space-4); gap: var(--space-3); } }

.preset-select { padding: 8px 32px 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); font-family: inherit; font-size: var(--text-sm); color: var(--color-text); background: white url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%235f6368'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 8px center; -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); max-width: 240px; }
.preset-select:focus { outline: none; border-color: var(--color-primary); box-shadow: var(--shadow-focus); }
.preset-select:hover { border-color: var(--color-primary); }

.size-presets { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.size-preset { padding: 6px 12px; background: var(--color-bg-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-text-secondary); cursor: pointer; transition: all var(--transition-fast); }
.size-preset:hover { background: var(--color-primary-light); border-color: var(--color-primary); color: var(--color-primary); }
.size-preset.active { background: var(--color-primary); border-color: var(--color-primary); color: white; }

.custom-size { display: flex; align-items: center; gap: 6px; }
.custom-size input { width: 72px; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); font-family: inherit; font-size: var(--text-sm); color: var(--color-text); transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
.custom-size input:focus { outline: none; border-color: var(--color-primary); box-shadow: var(--shadow-focus); }
.custom-size span { font-size: var(--text-xs); color: var(--color-text-secondary); font-weight: var(--weight-medium); }

.format-toggle { display: inline-flex; background: var(--color-bg-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.format-toggle button { padding: 6px 12px; font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-text-secondary); background: transparent; border: none; cursor: pointer; transition: all var(--transition-fast); }
.format-toggle button.active { background: var(--color-primary); color: white; }
.format-toggle button:not(.active):hover { background: var(--color-border-light); color: var(--color-text); }

.dropzone {
  border-radius: var(--radius-xl); padding: var(--space-9) var(--space-6); text-align: center; cursor: pointer; transition: background var(--transition-normal); position: relative; }
.dropzone:hover, .dropzone.dragover { background: var(--color-primary-50); }
.dropzone.dragover { background: var(--color-primary-light); }
.dropzone-icon { width: 80px; height: 80px; background: var(--color-primary-light); border-radius: 50%; margin: 0 auto var(--space-5); display: grid; place-items: center; transition: transform var(--transition-normal); }
.dropzone:hover .dropzone-icon { transform: scale(1.05); }
.dropzone-icon .material-symbols-rounded { font-size: 40px; color: var(--color-primary); }
.dropzone h3 { margin-bottom: var(--space-2); color: var(--color-text); }
.dropzone p { color: var(--color-text-secondary); font-size: var(--text-sm); margin-bottom: var(--space-5); }
.dropzone-formats { display: inline-flex; gap: var(--space-2); font-size: var(--text-xs); color: var(--color-text-tertiary); flex-wrap: wrap; justify-content: center; }
.format-tag { padding: 2px 8px; background: var(--color-bg-subtle); border-radius: var(--radius-sm); font-family: var(--font-mono); }
.dropzone-shortcuts { margin-top: var(--space-5); font-size: var(--text-xs); color: var(--color-text-tertiary); }
.kbd { display: inline-block; padding: 2px 6px; background: var(--color-bg-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 11px; color: var(--color-text-secondary); box-shadow: 0 1px 0 var(--color-border); }

#fileInput, #fileInputAdd { display: none; }

/* ============================================ Workspace ============================================ */
.batch-info { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-5); background: var(--color-bg-subtle); border-bottom: 1px solid var(--color-border-light); font-size: var(--text-sm); flex-wrap: wrap; gap: var(--space-3); }
.batch-info-stats { display: flex; align-items: center; gap: var(--space-5); color: var(--color-text-secondary); flex-wrap: wrap; }
.batch-info-stat { display: inline-flex; align-items: center; gap: 4px; }
.batch-info-stat strong { color: var(--color-text); font-weight: var(--weight-semibold); }
.batch-info-stat .material-symbols-rounded { font-size: 16px; color: var(--color-text-tertiary); }
.batch-savings { padding: 4px 10px; background: var(--color-success-light); color: var(--color-success); font-weight: var(--weight-semibold); border-radius: var(--radius-full); font-size: var(--text-xs); }
.batch-actions { display: flex; gap: var(--space-2); }

.file-queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); padding: var(--space-5); }
@media (max-width: 640px) { .file-queue { grid-template-columns: 1fr; padding: var(--space-3); } }

.file-card { background: white; border: 1px solid var(--color-border-light); border-radius: var(--radius-lg); overflow: hidden; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); display: flex; flex-direction: column; }
.file-card:hover { box-shadow: var(--shadow-2); border-color: var(--color-border); }
.file-card.error { border-color: var(--color-danger); background: var(--color-danger-light); }

.file-card-preview { position: relative; height: 180px; background-color: white; background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f0f0 75%), linear-gradient(-45deg, transparent 75%, #f0f0f0 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, 8px 0px; overflow: hidden; display: grid; place-items: center; }
.file-card-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

.file-card-overlay-status { position: absolute; top: var(--space-3); right: var(--space-3); display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: rgba(255, 255, 255, 0.95); border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--weight-semibold); backdrop-filter: blur(8px); }
.file-card-overlay-status.queued { color: var(--color-text-tertiary); }
.file-card-overlay-status.compressing { color: var(--color-primary); }
.file-card-overlay-status.done { color: var(--color-success); background: var(--color-success-light); }
.file-card-overlay-status.error { color: var(--color-danger); background: var(--color-danger-light); }
.file-card-overlay-status .material-symbols-rounded { font-size: 14px; }
.file-card-mini-spinner { width: 12px; height: 12px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 800ms linear infinite; }

.file-card-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.file-card-name { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card-sizes { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); font-feature-settings: 'tnum'; flex-wrap: wrap; }
.file-card-size-original { color: var(--color-text-tertiary); text-decoration: line-through; }
.file-card-size-compressed { color: var(--color-success); font-weight: var(--weight-semibold); }
.file-card-arrow { color: var(--color-text-tertiary); }
.file-card-savings { margin-left: auto; padding: 2px 8px; background: var(--color-success-light); color: var(--color-success); border-radius: var(--radius-full); font-size: 11px; font-weight: var(--weight-semibold); }
.file-card-meta { font-size: var(--text-xs); color: var(--color-text-tertiary); }
.file-card-target { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 11px; color: var(--color-text-secondary); padding: 4px 8px; background: var(--color-bg-subtle); border-radius: var(--radius-sm); width: max-content; max-width: 100%; }
.file-card-target.individual { background: var(--color-primary-light); color: var(--color-primary); font-weight: var(--weight-semibold); }
.file-card-error { font-size: var(--text-xs); color: var(--color-danger); padding: var(--space-2) var(--space-3); background: var(--color-danger-light); border-radius: var(--radius-sm); }
.file-card-actions { display: flex; gap: 4px; margin-top: auto; padding-top: var(--space-2); border-top: 1px solid var(--color-border-light); }
.file-card-action { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 8px; background: transparent; border: 1px solid transparent; border-radius: var(--radius-md); font-size: 11px; font-weight: var(--weight-medium); color: var(--color-text-secondary); transition: all var(--transition-fast); }
.file-card-action:hover:not(:disabled) { background: var(--color-primary-light); color: var(--color-primary); }
.file-card-action.danger:hover { background: var(--color-danger-light); color: var(--color-danger); }
.file-card-action .material-symbols-rounded { font-size: 16px; }
.file-card-action:disabled { opacity: 0.4; cursor: not-allowed; }

.add-more-tile { display: grid; place-items: center; background: var(--color-bg-subtle); border: 2px dashed var(--color-border); border-radius: var(--radius-lg); min-height: 320px; cursor: pointer; transition: all var(--transition-fast); color: var(--color-text-secondary); }
.add-more-tile:hover { border-color: var(--color-primary); background: var(--color-primary-50); color: var(--color-primary); }
.add-more-tile-inner { text-align: center; }
.add-more-tile .material-symbols-rounded { font-size: 32px; margin-bottom: 8px; }
.add-more-tile-inner > span:last-child { font-size: var(--text-sm); font-weight: var(--weight-medium); display: block; }

/* ============================================ Modal ============================================ */
.modal-overlay { position: fixed; inset: 0; background: var(--color-overlay); z-index: 1000; display: grid; place-items: center; padding: var(--space-4); backdrop-filter: blur(4px); animation: fadeIn var(--transition-normal); }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.modal { background: white; border-radius: var(--radius-2xl); max-width: 900px; max-height: calc(100vh - 32px); width: 100%; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-modal); animation: modalUp var(--transition-normal); }
@keyframes modalUp { from { opacity: 0; transform: translateY(20px) scale(0.98) } to { opacity: 1; transform: translateY(0) scale(1) } }
.modal-header { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-border-light); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.modal-title { font-size: var(--text-lg); font-weight: var(--weight-semibold); color: var(--color-text); display: flex; align-items: center; gap: var(--space-2); }
.modal-title .material-symbols-rounded { color: var(--color-primary); }
.modal-close { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-md); color: var(--color-text-secondary); }
.modal-close:hover { background: var(--color-bg-subtle); color: var(--color-text); }
.modal-body { flex: 1; overflow: auto; padding: var(--space-5); }
.modal-footer { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--color-border-light); display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3); flex-wrap: wrap; }

.cropper-container-wrapper { background: #f0f0f0; border-radius: var(--radius-md); overflow: hidden; height: 50vh; max-height: 480px; min-height: 320px; position: relative; }
.cropper-container-wrapper img { max-width: 100%; display: block; }
.cropper-presets { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-3); }
.cropper-preset { padding: 6px 12px; background: var(--color-bg-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-text-secondary); cursor: pointer; transition: all var(--transition-fast); }
.cropper-preset:hover, .cropper-preset.active { background: var(--color-primary); border-color: var(--color-primary); color: white; }
.cropper-tools { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); flex-wrap: wrap; }

.compare-container { position: relative; width: 100%; max-height: 60vh; background: var(--color-bg-subtle); border-radius: var(--radius-md); overflow: hidden; user-select: none; }
.compare-img-original { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; }
.compare-img-compressed { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; clip-path: inset(0 50% 0 0); }
.compare-slider { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; background: white; box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 0 0 12px rgba(0,0,0,0.3); cursor: ew-resize; transform: translateX(-50%); z-index: 5; }
.compare-slider-handle { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; background: white; border-radius: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.3); color: var(--color-primary); }
.compare-labels { position: absolute; top: var(--space-3); display: flex; justify-content: space-between; width: 100%; padding: 0 var(--space-3); pointer-events: none; }
.compare-label { padding: 4px 12px; background: rgba(0, 0, 0, 0.7); color: white; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--weight-semibold); backdrop-filter: blur(8px); }

.history-list { display: flex; flex-direction: column; gap: var(--space-2); }
.history-empty { text-align: center; color: var(--color-text-tertiary); padding: var(--space-7) var(--space-4); }
.history-empty .material-symbols-rounded { font-size: 48px; margin-bottom: var(--space-2); }
.history-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); background: var(--color-bg-subtle); border-radius: var(--radius-md); cursor: pointer; transition: background var(--transition-fast); }
.history-item:hover { background: var(--color-primary-light); }
.history-item-thumb { width: 48px; height: 48px; background: white; border-radius: var(--radius-sm); display: grid; place-items: center; flex-shrink: 0; }
.history-item-thumb .material-symbols-rounded { color: var(--color-text-tertiary); }
.history-item-info { flex: 1; min-width: 0; }
.history-item-name { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item-meta { font-size: var(--text-xs); color: var(--color-text-tertiary); }

/* Toast notifications */
.toast-container { position: fixed; bottom: var(--space-5); left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: var(--space-2); pointer-events: none; }
.toast { background: var(--color-text); color: white; padding: var(--space-3) var(--space-5); border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: var(--weight-medium); box-shadow: var(--shadow-modal); display: flex; align-items: center; gap: var(--space-2); animation: toastSlide var(--transition-normal); pointer-events: auto; }
.toast.success { background: var(--color-success); }
.toast.error { background: var(--color-danger); }
.toast .material-symbols-rounded { font-size: 18px; }
@keyframes toastSlide { from { opacity: 0; transform: translateY(20px) } to { opacity: 1; transform: translateY(0) } }

@keyframes spin { to { transform: rotate(360deg) } }
.spinner { width: 48px; height: 48px; border: 3px solid var(--color-border-light); border-top-color: var(--color-primary); border-radius: 50%; margin: 0 auto var(--space-4); animation: spin 800ms linear infinite; }

.error-banner { display: none; padding: var(--space-3) var(--space-5); background: var(--color-danger-light); color: var(--color-danger); font-size: var(--text-sm); border-bottom: 1px solid var(--color-danger); align-items: center; gap: var(--space-2); }
.error-banner.active { display: flex; }

.drag-overlay {
  border-radius: var(--radius-xl); position: fixed; inset: 0; background: rgba(26, 115, 232, 0.1); border: 4px dashed var(--color-primary); z-index: 9999; display: none; pointer-events: none; align-items: center; justify-content: center; }
.drag-overlay.active { display: flex; }
.drag-overlay-inner { background: white; padding: var(--space-7); border-radius: var(--radius-2xl); text-align: center; box-shadow: var(--shadow-modal); }
.drag-overlay-inner .material-symbols-rounded { font-size: 80px; color: var(--color-primary); margin-bottom: var(--space-3); }
.drag-overlay-inner h2 { font-size: 28px; margin-bottom: var(--space-2); }
.drag-overlay-inner p { font-size: var(--text-base); color: var(--color-text-secondary); }

/* ============================================ Sections ============================================ */
.section-header { text-align: center; max-width: 640px; margin: 0 auto var(--space-7); }
.section-header h2 { margin-bottom: var(--space-3); }
.section-header p { font-size: var(--text-base); }

.features { background: var(--color-bg-subtle); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-4); }
.feature-card { background: white; border: 1px solid var(--color-border-light); border-radius: var(--radius-xl); padding: var(--space-5); transition: transform var(--transition-normal), box-shadow var(--transition-normal); }
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }
.feature-icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center; margin-bottom: var(--space-4); }
.feature-icon .material-symbols-rounded { font-size: 26px; }
.feature-icon.icon-blue { background: var(--color-primary-light); color: var(--color-primary); }
.feature-icon.icon-green { background: var(--color-success-light); color: var(--color-success); }
.feature-icon.icon-yellow { background: var(--color-warning-light); color: #ea8600; }
.feature-icon.icon-red { background: var(--color-danger-light); color: var(--color-danger); }
.feature-icon.icon-purple { background: var(--color-purple-light); color: var(--color-purple); }
.feature-card h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.feature-card p { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.6; }

.use-cases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3); }
.use-case { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4); background: white; border: 1px solid var(--color-border-light); border-radius: var(--radius-lg); text-decoration: none; color: inherit; transition: all var(--transition-fast); }
.use-case:hover { border-color: var(--color-primary); background: var(--color-primary-50); text-decoration: none; color: inherit; transform: translateX(2px); }
.use-case-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--color-primary-light); color: var(--color-primary); }
.use-case-icon .material-symbols-rounded { font-size: 22px; }
.use-case h4 { font-size: var(--text-sm); font-weight: var(--weight-semibold); margin-bottom: 2px; color: var(--color-text); }
.use-case p { font-size: var(--text-xs); color: var(--color-text-secondary); margin: 0; }

.how-it-works { background: var(--color-bg-subtle); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
@media (max-width: 768px) { .steps { grid-template-columns: 1fr; } }
.step { text-align: center; }
.step-number { width: 56px; height: 56px; border-radius: 50%; background: white; border: 2px solid var(--color-primary); color: var(--color-primary); display: grid; place-items: center; font-size: var(--text-xl); font-weight: var(--weight-bold); margin: 0 auto var(--space-4); }
.step h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.step p { font-size: var(--text-sm); max-width: 280px; margin: 0 auto; }

.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--color-border-light); }
.faq-item:first-child { border-top: 1px solid var(--color-border-light); }
.faq-question { width: 100%; padding: var(--space-4) 0; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--color-text); text-align: left; background: none; border: none; cursor: pointer; font-family: inherit; transition: color var(--transition-fast); }
.faq-question:hover { color: var(--color-primary); }
.faq-question .material-symbols-rounded { flex-shrink: 0; color: var(--color-text-tertiary); transition: transform var(--transition-normal), color var(--transition-fast); }
.faq-item.open .faq-question .material-symbols-rounded { transform: rotate(180deg); color: var(--color-primary); }
.faq-item.open .faq-question { color: var(--color-primary); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--transition-normal); }
.faq-answer-inner { padding: 0 0 var(--space-4); color: var(--color-text-secondary); line-height: 1.7; font-size: var(--text-sm); }
.faq-answer-inner p + p { margin-top: var(--space-2); }

.final-cta { text-align: center; background: linear-gradient(135deg, var(--color-primary-50) 0%, white 100%); position: relative; overflow: hidden; }
.final-cta::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 800px; height: 800px; background: radial-gradient(circle, rgba(26, 115, 232, 0.05) 0%, transparent 60%); pointer-events: none; }
.final-cta-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.final-cta h2 { margin-bottom: var(--space-3); }
.final-cta p { font-size: var(--text-base); margin-bottom: var(--space-5); }

.site-footer { background: white; border-top: 1px solid var(--color-border-light); padding: var(--space-7) 0 var(--space-5); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-7); margin-bottom: var(--space-6); }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-5); } .footer-brand { grid-column: 1 / -1; } }
.footer-brand p { margin-top: var(--space-2); font-size: var(--text-sm); max-width: 320px; }
.footer-col h4 { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--color-text); margin-bottom: var(--space-3); text-transform: uppercase; letter-spacing: 0.04em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col a { color: var(--color-text-secondary); font-size: var(--text-sm); }
.footer-col a:hover { color: var(--color-primary); text-decoration: none; }
.footer-bottom { padding-top: var(--space-4); border-top: 1px solid var(--color-border-light); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); font-size: var(--text-xs); color: var(--color-text-tertiary); }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeInUp 600ms cubic-bezier(0.4, 0, 0.2, 1) both; }
.fade-in-1 { animation-delay: 100ms; }
.fade-in-2 { animation-delay: 200ms; }
.fade-in-3 { animation-delay: 300ms; }

.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; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

.mobile-menu-toggle { display: none; width: 40px; height: 40px; border-radius: var(--radius-md); align-items: center; justify-content: center; color: var(--color-text); }
.mobile-menu-toggle:hover { background: var(--color-bg-subtle); }
@media (max-width: 768px) { .mobile-menu-toggle { display: flex; } }

@media print { .site-header, .site-footer, .compressor { display: none; } }

[hidden] { display: none !important; }

/* ==== Partner CTA in nav ==== */
.nav-partner-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 16px !important;
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  letter-spacing: -0.005em;
  transition: all 0.18s ease !important;
  box-shadow: 0 2px 8px rgba(26,115,232,0.25);
  white-space: nowrap;
}
.nav-partner-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26,115,232,0.35) !important;
  background: linear-gradient(135deg, #1668d8 0%, #3477e7 100%) !important;
}
.nav-partner-btn .material-symbols-rounded {
  font-variation-settings: 'FILL' 1;
}
@media (max-width: 720px) {
  .nav-partner-btn { padding: 7px 12px !important; font-size: 13px !important; }
  .nav-partner-btn .material-symbols-rounded { font-size: 14px !important; }
}

/* ==== Improved 5-column footer ==== */
.site-footer {
  margin-top: 80px;
  padding: 56px 0 32px;
  border-top: 1px solid var(--color-border);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}
.footer-brand {
  max-width: 280px;
}
.footer-brand .brand {
  margin-bottom: 14px;
}
.footer-brand p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  margin: 0 0 14px;
}
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: #e6f4ea;
  color: #1e7e34;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-tertiary);
  margin: 0 0 14px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col a:hover {
  color: var(--color-primary);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--color-border-light);
  font-size: 13px;
  color: var(--color-text-tertiary);
}
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px 24px;
  }
  .footer-brand { grid-column: 1 / -1; max-width: 100%; }
}
@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ==== v7 — Compact homepage hero so drop zone is above the fold ==== */
.hero { padding: 36px 0 24px !important; }
.hero-inner { margin-bottom: 20px !important; }
.hero h1 {
  font-size: clamp(32px, 4.5vw, 52px) !important;
  margin: 12px 0 14px !important;
  line-height: 1.05 !important;
}
.hero-subtitle {
  font-size: 16px !important;
  max-width: 600px;
  margin: 0 auto 18px !important;
  line-height: 1.5 !important;
}
.hero-badge {
  font-size: 13px !important;
  padding: 5px 14px !important;
  margin-bottom: 0 !important;
}
.hero-trust {
  margin-top: 14px !important;
  font-size: 13px !important;
  gap: 18px !important;
}
.hero-trust .trust-item { font-size: 13px !important; }
.compressor {
  margin-top: 12px !important;
  border: 2px dashed transparent;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, #1a73e8, #4285f4, #f9ab00) border-box;
  border: 2px solid transparent;
  box-shadow: 0 8px 32px rgba(26,115,232,0.08) !important;
}
.toolbar { padding: 14px 18px !important; }
.dropzone {
  padding: 48px 20px !important;
  min-height: 240px;
  background: linear-gradient(180deg, #fafbff 0%, #f0f5ff 100%) !important;
  border: 2px dashed #b0c8ec !important;
  transition: all 0.2s !important;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--color-primary) !important;
  background: linear-gradient(180deg, #f0f5ff 0%, #e0eaff 100%) !important;
  transform: scale(1.005);
}
.dropzone h3 {
  font-size: 26px !important;
  margin: 12px 0 6px !important;
  font-weight: 700 !important;
}
.dropzone-icon {
  width: 64px !important;
  height: 64px !important;
  background: linear-gradient(135deg, #e8f0fe 0%, #cfe0ff 100%) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 6px !important;
  animation: dz-bounce 2.5s ease-in-out infinite;
}
.dropzone-icon .material-symbols-rounded {
  font-size: 36px !important;
  color: var(--color-primary) !important;
}
@keyframes dz-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@media (max-width: 720px) {
  .hero { padding: 24px 0 16px !important; }
  .hero h1 { font-size: 28px !important; }
  .hero-subtitle { font-size: 14px !important; }
  .hero-trust { display: none !important; }
  .dropzone { padding: 36px 16px !important; min-height: 200px; }
  .dropzone h3 { font-size: 22px !important; }
}


/* ============== Tool-page enrichment (EEAT/Content boost) ============== */
.ts-content-section {
  padding: 64px 0 80px;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  border-top: 1px solid var(--color-border);
}
.ts-author-byline {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; background: #fff;
  border: 1px solid var(--color-border); border-radius: 12px;
  margin-bottom: 36px; font-size: 14px;
}
.ts-author-byline a { color: var(--color-primary); text-decoration: none; font-weight: 600; }
.ts-author-byline a:hover { text-decoration: none; }
.ts-author-avatar { border-radius: 50%; flex-shrink: 0; }
.ts-h2 {
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
  margin: 40px 0 16px; line-height: 1.2;
}
.ts-lead {
  font-size: 16px; line-height: 1.7; color: var(--color-text);
  margin: 0 0 16px;
}
.ts-usecases-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px; margin: 8px 0 24px;
}
.ts-usecase {
  padding: 18px; background: #fff;
  border: 1px solid var(--color-border); border-radius: 12px;
}
.ts-usecase h4 {
  font-size: 15px; font-weight: 700;
  margin: 0 0 6px; color: var(--color-text);
}
.ts-usecase p {
  font-size: 14px; line-height: 1.55;
  color: var(--color-text-secondary); margin: 0;
}
.ts-howto-list {
  background: #fff;
  border: 1px solid var(--color-border); border-radius: 12px;
  padding: 20px 24px 20px 44px;
  margin: 8px 0 24px;
}
.ts-howto-list li {
  margin: 0 0 10px;
  font-size: 15px; line-height: 1.6;
  color: var(--color-text);
}
.ts-howto-list li:last-child { margin-bottom: 0; }
.ts-howto-list strong { color: var(--color-primary); }
.ts-faq { margin: 8px 0 24px; }
.ts-faq-item {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: 10px; margin-bottom: 8px;
  transition: all 0.15s;
}
.ts-faq-item[open] {
  border-color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(26,115,232,0.06);
}
.ts-faq-item summary {
  cursor: pointer; padding: 14px 18px;
  font-weight: 600; font-size: 14.5px;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.ts-faq-item summary::-webkit-details-marker { display: none; }
.ts-faq-item summary::after {
  content: '+'; font-size: 20px; font-weight: 400;
  color: var(--color-text-tertiary);
}
.ts-faq-item[open] summary::after { content: '−'; }
.ts-faq-item > div {
  padding: 0 18px 16px; font-size: 14px; line-height: 1.65;
  color: var(--color-text-secondary);
}
.ts-trust-band {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 36px; padding: 18px;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 12px;
}
.ts-trust-band strong { font-size: 14px; }
@media (max-width: 600px) {
  .ts-content-section { padding: 48px 0 64px; }
  .ts-h2 { font-size: 22px; margin-top: 32px; }
}


/* ============== Mobile menu (open state) ============== */
@media (max-width: 768px) {
  .site-header .nav { position: relative; }

  /* Hidden by default on mobile (rule already exists at line 106) */
  /* When .nav-open is set on .site-header, slide the menu down */
  .site-header.nav-open .nav-links {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    padding: 12px 24px 16px;
    margin: 0;
    gap: 0;
    z-index: 200;
    animation: navSlideDown 0.18s ease-out;
  }
  .site-header.nav-open .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--color-border-light, #f0f2f5);
  }
  .site-header.nav-open .nav-links li:last-child { border-bottom: none; }
  .site-header.nav-open .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 15px;
    color: var(--color-text);
    font-weight: 500;
  }
  .site-header.nav-open .nav-links a:hover { color: var(--color-primary); }

  /* Hamburger -> X transition */
  .mobile-menu-toggle { transition: transform 0.18s; cursor: pointer; background: transparent; border: none; }
  .site-header.nav-open .mobile-menu-toggle { transform: rotate(90deg); }
  /* icon swap handled in JS — Material Symbols doesn't support ::before content swap */

  /* Hide the desktop "Become a Partner" CTA inside the open mobile drawer (it'll appear inside instead) */
  .site-header.nav-open .nav-cta .nav-partner-btn { display: none !important; }
}

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Site-wide underline removal (per user preference May 2026)
   ============================================ */
a, a:hover, a:focus, a:active, a:visited {
  text-decoration: none !important;
}

/* ============================================
   Button hover — preserve text color (per user preference May 2026)
   Buttons with white text keep white text on hover/focus/active.
   ============================================ */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-success,
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.nav-partner-btn,
.nav-partner-btn:hover,
.nav-partner-btn:focus,
.nav-partner-btn:active {
  color: #fff !important;
}

/* ============================================
   Mobile menu — bulletproof visibility (v2)
   Forces the open menu to render correctly on every page template,
   regardless of what wrapper structure (.nav vs .header-inner) is used.
   ============================================ */
@media (max-width: 768px) {
  /* Make sure the menu button itself is tappable */
  .mobile-menu-toggle {
    display: flex !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 250;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  /* Force the open menu to be visible no matter what */
  .site-header.nav-open .nav-links {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: #fff !important;
    border-top: 1px solid var(--color-border, #e1e5ea);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 12px 20px 16px !important;
    margin: 0 !important;
    z-index: 240 !important;
  }
  /* Make sure links inside the open menu are visible & tappable */
  .site-header.nav-open .nav-links a {
    display: block !important;
    padding: 14px 0 !important;
    font-size: 15px !important;
    color: #1f1f1f !important;
    font-weight: 500 !important;
    border-bottom: 1px solid #f0f2f5;
  }
  .site-header.nav-open .nav-links li {
    width: 100%;
    list-style: none;
  }
  /* Variant B blogs use <nav class="nav-links"> with direct <a> children — no <li> */
  .site-header.nav-open nav.nav-links a:last-child {
    border-bottom: none;
  }
}

/* ============================================
   Tools dropdown in main navigation (Issue #2)
   Hover-reveal on desktop, click-to-expand inside mobile menu.
   ============================================ */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
  color: var(--color-text);
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  font-size: inherit;
  transition: color 0.15s ease;
}
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus,
.nav-dropdown[aria-open="true"] .nav-dropdown-toggle {
  color: var(--color-primary);
}
.nav-dropdown-caret {
  font-size: 18px !important;
  transition: transform 0.18s ease;
}
.nav-dropdown:hover .nav-dropdown-caret,
.nav-dropdown[aria-open="true"] .nav-dropdown-caret {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: -16px;
  min-width: 280px;
  background: #fff;
  border: 1px solid var(--color-border-light, #f0f2f5);
  border-radius: 12px;
  box-shadow: 0 12px 32px -6px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.04);
  padding: 8px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown[aria-open="true"] .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-dropdown-menu a:hover {
  background: var(--color-bg-subtle, #f7f9fc);
  color: var(--color-primary);
}
.nav-dropdown-menu a .material-symbols-rounded {
  font-size: 22px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.nav-dropdown-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-dropdown-title {
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.2;
}
.nav-dropdown-sub {
  font-size: 12.5px;
  color: var(--color-text-secondary, #5f6368);
}

/* Mobile: render the dropdown contents inline inside the open menu */
@media (max-width: 768px) {
  .nav-dropdown-toggle {
    width: 100%;
    padding: 14px 0;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 500;
  }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 8px 12px;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    min-width: 0;
    background: transparent;
  }
  .nav-dropdown-menu a {
    padding: 10px 0;
  }
}

/* ============================================
   FINAL OVERRIDES — highest specificity, last-loaded (Issue #5)
   The user has reported multiple times that:
     (a) underlines appear on hover anywhere on the site
     (b) button text changes color (away from white) on hover
   These rules use !important and target every state to force compliance.
   ============================================ */

/* --- Underlines: NEVER, ANYWHERE, EVER --- */
html body a,
html body a:link,
html body a:visited,
html body a:hover,
html body a:focus,
html body a:active,
html body a:focus-visible {
  text-decoration: none !important;
  text-decoration-line: none !important;
  text-underline-offset: 0 !important;
}

/* --- Buttons with white text stay white in every state --- */
html body .btn-primary,
html body .btn-primary:link,
html body .btn-primary:visited,
html body .btn-primary:hover,
html body .btn-primary:focus,
html body .btn-primary:active,
html body .btn-primary:focus-visible,
html body .btn-success,
html body .btn-success:link,
html body .btn-success:visited,
html body .btn-success:hover,
html body .btn-success:focus,
html body .btn-success:active,
html body .btn-success:focus-visible,
html body .nav-partner-btn,
html body .nav-partner-btn:link,
html body .nav-partner-btn:visited,
html body .nav-partner-btn:hover,
html body .nav-partner-btn:focus,
html body .nav-partner-btn:active,
html body .nav-partner-btn:focus-visible,
html body .btn-nav-demo,
html body .btn-nav-demo:link,
html body .btn-nav-demo:visited,
html body .btn-nav-demo:hover,
html body .btn-nav-demo:focus,
html body .btn-nav-demo:active,
html body .btn-nav-demo:focus-visible,
html body .wp-popup-btn-primary,
html body .wp-popup-btn-primary:hover,
html body .wp-popup-btn-primary:focus,
html body .wp-popup-btn-primary:active,
html body .btn-launch,
html body .btn-launch:hover,
html body .btn-launch:focus,
html body .btn-launch:active {
  color: #ffffff !important;
}

/* All children inside those buttons stay white too (catches icon/text spans) */
html body .btn-primary *,
html body .btn-primary:hover *,
html body .btn-success *,
html body .btn-success:hover *,
html body .nav-partner-btn *,
html body .nav-partner-btn:hover *,
html body .btn-nav-demo *,
html body .btn-nav-demo:hover *,
html body .wp-popup-btn-primary *,
html body .wp-popup-btn-primary:hover *,
html body .btn-launch *,
html body .btn-launch:hover * {
  color: inherit !important;
}
