/* ========================================================
   ONE RESIZER — MASTER DESIGN SYSTEM
   Visual Source of Truth: Approved OneResizer UI
   Light & Dark Mode / Mobile 2-Card Grid / Desktop 4-Col Grid
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Core Brand Tokens */
  --primary-cyan: #1687f5;
  --primary-blue: #0b68d6;
  --primary-glow: rgba(22, 135, 245, 0.28);
  --accent-cyan: #4ce3ff;
  --accent-green: #12a346;
  --accent-orange: #ff6b00;
  --accent-violet: #713be7;
  --accent-pink: #ff174d;
  --ok-green: #10a858;
  
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================================
   THEME PALETTES
   ======================================================== */

/* LIGHT MODE — Distinctive Premium Warm Orange SaaS Palette & Clean White Cards */
html[data-theme="light"] {
  --bg-body: #faf8f5;
  --bg-gradient: radial-gradient(circle at 10% 15%, rgba(234, 88, 12, 0.05), transparent 28%),
                 radial-gradient(circle at 90% 25%, rgba(249, 115, 22, 0.04), transparent 30%),
                 linear-gradient(155deg, #ffffff 0%, #faf8f5 55%, #f5f2eb 100%);
  --bg-header: rgba(255, 255, 255, 0.95);
  --bg-card: #ffffff;
  --bg-panel: #ffffff;
  --bg-input: #ffffff;
  --bg-subtle: #fff7ed;
  
  --line: #e7e5e4;
  --line-light: #f5f5f4;
  --input-border: #d6d3d1;
  
  --text: #1c1917;
  --text-heading: #0f172a;
  --text-muted: #57534e;
  --text-light: #78716c;
  
  --brand-navy: #0f172a;
  --brand-accent: #ea580c;
  
  --primary-cyan: #ea580c;
  --primary-blue: #c2410c;
  --primary-glow: rgba(234, 88, 12, 0.22);
  
  --shadow-xs: 0 2px 6px rgba(41, 37, 36, 0.04);
  --shadow-sm: 0 4px 14px rgba(41, 37, 36, 0.06);
  --shadow-md: 0 7px 20px rgba(41, 37, 36, 0.08);
  --shadow-lg: 0 14px 34px rgba(41, 37, 36, 0.12);
  --shadow-hover: 0 12px 28px rgba(234, 88, 12, 0.18);
}

/* DARK MODE — Approved Deep Navy Cyber & Glowing Cards */
html[data-theme="dark"] {
  --bg-body: #07111f;
  --bg-gradient: radial-gradient(circle at 7% 5%, rgba(60, 142, 255, 0.22), transparent 30%),
                 radial-gradient(circle at 94% 8%, rgba(153, 78, 255, 0.20), transparent 32%),
                 linear-gradient(145deg, #050a12 0%, #071323 50%, #080d18 100%);
  --bg-header: rgba(8, 18, 34, 0.94);
  --bg-card: linear-gradient(150deg, rgba(14, 30, 52, 0.92), rgba(8, 18, 33, 0.94));
  --bg-panel: rgba(10, 24, 44, 0.92);
  --bg-input: #0e1d31;
  --bg-subtle: rgba(255, 255, 255, 0.04);
  
  --line: rgba(140, 193, 255, 0.15);
  --line-light: rgba(255, 255, 255, 0.08);
  --input-border: rgba(140, 193, 255, 0.22);
  
  --text: #f0f7ff;
  --text-heading: #ffffff;
  --text-muted: #9eb1c7;
  --text-light: #6d829e;
  
  --brand-navy: #ffffff;
  --brand-accent: #4ce3ff;
  
  --shadow-xs: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 14px 36px rgba(76, 227, 255, 0.18);
}

/* ========================================================
   BASE RESET & TYPOGRAPHY
   ======================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg-gradient);
  background-color: var(--bg-body);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

/* ========================================================
   HEADER (TOPBAR)
   ======================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  min-height: 74px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(22, 135, 245, 0.22);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease);
}
.brand:hover .brand-logo {
  transform: scale(1.04);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.brand-name {
  font-size: 26px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -1.2px;
}
.brand-name .one {
  color: var(--brand-navy);
}
.brand-name .resizer {
  color: var(--brand-accent);
}

.brand-sub {
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search {
  width: 250px;
  height: 42px;
  background: var(--bg-input);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  padding: 0 12px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}
.search:focus-within {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.search input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  background: transparent;
}
.search input::placeholder {
  color: var(--text-light);
}
.search span {
  font-size: 18px;
  color: var(--primary-cyan);
  font-weight: 800;
  margin-left: 6px;
}

.theme-toggle {
  height: 42px;
  min-width: 86px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}
.theme-toggle:hover {
  border-color: var(--primary-cyan);
  transform: translateY(-1px);
}

/* ========================================================
   CATEGORY FILTER BAR
   ======================================================== */
.nav {
  background: var(--bg-header);
  border-bottom: 1px solid var(--line-light);
  position: sticky;
  top: 74px;
  z-index: 90;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar {
  display: none;
}

.nav button, .nav a {
  border: 1.5px solid var(--line);
  background: var(--bg-card);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: var(--transition);
}
.nav button:hover, .nav a:hover {
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
  transform: translateY(-1px);
}
.nav button.active, .nav a.active {
  background: var(--primary-cyan);
  border-color: var(--primary-cyan);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* ========================================================
   HERO BRANDING
   ======================================================== */
main {
  flex: 1;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 24px 48px;
}

.hero-branding {
  text-align: center;
  padding: 32px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(22, 135, 245, 0.25);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease);
}
.hero-logo:hover {
  transform: scale(1.05);
}
.hero-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-title {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -1.5px;
  margin-bottom: 6px;
}
.hero-title .one {
  color: var(--brand-navy);
}
.hero-title .resizer {
  color: var(--brand-accent);
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 650;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}
.hero-pill-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok-green);
  box-shadow: 0 0 6px var(--ok-green);
  flex-shrink: 0;
}
.hero-pill-badge .ticker-text {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--primary-cyan);
  min-width: 205px;
  text-align: center;
  display: inline-block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
html[data-theme="dark"] .hero-pill-badge .ticker-text {
  color: #55dcff;
}

/* ========================================================
   PRIVACY NOTICE BAR
   ======================================================== */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin: 16px 0 28px;
  font-size: 13px;
  color: var(--text-muted);
  box-shadow: var(--shadow-xs);
}
.badge-offline {
  background: rgba(16, 168, 88, 0.12);
  color: #0d8a47;
  border: 1px solid rgba(16, 168, 88, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 750;
  font-size: 11.5px;
  white-space: nowrap;
}
html[data-theme="dark"] .badge-offline {
  color: #4ee6a8;
  border-color: rgba(78, 230, 168, 0.35);
}

/* ========================================================
   TOOL DIRECTORY SECTIONS & GRID (PC 4 cols / Mobile 2 cards)
   ======================================================== */
.section {
  margin-bottom: 34px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.section-head h2 {
  font-size: 14.5px;
  font-weight: 850;
  letter-spacing: 0.05em;
  color: var(--text-heading);
  text-transform: uppercase;
  white-space: nowrap;
}
.section-head .line {
  height: 1.5px;
  flex: 1;
  background: var(--line);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 22px;
}

/* APPROVED TOOL CARD COMPONENT */
.card {
  position: relative;
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 160px;
  box-shadow: var(--shadow-md);
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
  cursor: pointer;
  text-decoration: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-cyan);
  box-shadow: var(--shadow-hover);
}

.card .icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  color: var(--primary-cyan);
  transition: transform 0.24s var(--ease);
}
.card:hover .icon {
  transform: scale(1.08);
}
.card .icon svg {
  width: 48px;
  height: 48px;
  stroke: currentColor;
  fill: none;
}

/* Category Accent Icon Colors */
.section.image .card .icon { color: #1687f5; }
.section.image .card:nth-child(2) .icon { color: #713be7; }
.section.image .card:nth-child(3) .icon { color: #12a346; }
.section.image .card:nth-child(4) .icon { color: #ff6b00; }
.section.image .card:nth-child(5) .icon { color: #ff174d; }
.section.image .card:nth-child(6) .icon { color: #07a9ad; }

.section.pdf .card .icon { color: #e5322d; }
.section.pdf .card:nth-child(2) .icon { color: #8e35c7; }
.section.pdf .card:nth-child(3) .icon { color: #ff6b00; }
.section.pdf .card:nth-child(4) .icon { color: #07a9ad; }
.section.pdf .card:nth-child(5) .icon { color: #12a346; }
.section.pdf .card:nth-child(6) .icon { color: #1687f5; }

.section.office .card .icon { color: #2b579a; }
.section.office .card:nth-child(2) .icon { color: #217346; }
.section.office .card:nth-child(3) .icon { color: #d24726; }

.section.utility .card .icon { color: #6f42c1; }

.card .title {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.card .card-desc {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-muted);
  margin-bottom: 10px;
  flex: 1;
}

.card .mode {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--text-muted);
}

/* ========================================================
   DEDICATED TOOL PAGE & WORKSPACE
   ======================================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.breadcrumb a:hover {
  color: var(--primary-cyan);
}

.tool-hero {
  margin-bottom: 18px;
}
.tool-hero h1 {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-heading);
  letter-spacing: -1px;
  margin-bottom: 6px;
}
.tool-hero p {
  font-size: 15px;
  color: var(--text-muted);
}

.workspace-container {
  min-height: 280px;
  background: var(--bg-panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
}

/* Maintenance Card */
.maintenance-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  max-width: 620px;
  margin: 0 auto;
}
.maintenance-badge {
  background: rgba(22, 135, 245, 0.12);
  color: var(--primary-cyan);
  border: 1px solid rgba(22, 135, 245, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 800;
  margin-bottom: 16px;
}
.maintenance-icon {
  width: 64px;
  height: 64px;
  color: var(--primary-cyan);
  margin-bottom: 16px;
}
.maintenance-icon svg {
  width: 100%;
  height: 100%;
}
.maintenance-title {
  font-size: 24px;
  font-weight: 850;
  color: var(--text-heading);
  margin-bottom: 8px;
}
.maintenance-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}
.maintenance-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}
.spec-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}
.maintenance-notice {
  font-size: 13px;
  color: var(--text-light);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--line-light);
}

/* ========================================================
   SEO ARTICLE, ACCORDION & RELATED TOOLS
   ======================================================== */
.seo-article {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}
.seo-article h2 {
  font-size: 20px;
  font-weight: 850;
  color: var(--text-heading);
  margin: 22px 0 10px;
}
.seo-article h2:first-child {
  margin-top: 0;
}
.seo-article p, .seo-article li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}
.seo-article ul, .seo-article ol {
  padding-left: 20px;
  margin: 10px 0 16px;
}
.seo-article li {
  margin-bottom: 6px;
}

/* FAQ Accordion */
.faq-section {
  margin-top: 28px;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: var(--bg-subtle);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: none;
  border: 0;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14.5px;
  font-weight: 750;
  color: var(--text-heading);
  cursor: pointer;
  text-align: left;
}
.faq-question .toggle-icon {
  font-size: 18px;
  color: var(--primary-cyan);
  font-weight: 800;
  transition: transform 0.2s ease;
}
.faq-item.open .toggle-icon {
  transform: rotate(45deg);
}
.faq-answer {
  display: none;
  padding: 0 18px 14px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.faq-item.open .faq-answer {
  display: block;
}

/* Related Tools Grid */
.related-tools {
  margin-top: 30px;
}
.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

/* ========================================================
   FOOTER
   ======================================================== */
.site-footer {
  background: var(--bg-header);
  border-top: 1px solid var(--line);
  padding: 42px 24px 24px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px 24px;
  margin-bottom: 32px;
}
.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 320px;
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-heading);
  margin-bottom: 12px;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 8px;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
}
.footer-links a:hover {
  color: var(--primary-cyan);
}
.footer-bottom {
  border-top: 1px solid var(--line-light);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-light);
}

/* ========================================================
   RESPONSIVE DESIGN RULES
   Desktop: 4 Columns
   Tablet (700px - 1050px): 3 Columns
   Mobile (< 700px): STRICTLY 2 CARDS PER ROW
   ======================================================== */
@media (max-width: 1050px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .related-tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  /* MOBILE 2 CARDS PER ROW */
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 10px !important;
  }
  .related-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  
  .card {
    min-height: 140px;
    padding: 16px 10px 14px;
    border-radius: 14px;
  }
  .card .icon {
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
  }
  .card .icon svg {
    width: 38px;
    height: 38px;
  }
  .card .title {
    font-size: 14px;
    margin-bottom: 4px;
  }
  .card .card-desc {
    font-size: 11px;
    line-height: 1.25;
    margin-bottom: 8px;
  }
  .card .mode {
    font-size: 9.5px;
    padding: 2px 6px;
  }

  .header-inner {
    padding: 8px 12px;
    gap: 8px;
    min-height: 60px;
  }
  .brand-logo {
    width: 34px;
    height: 34px;
  }
  .brand-name {
    font-size: 18px;
  }
  .brand-sub {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
  .search {
    width: 120px;
    height: 36px;
    padding: 0 8px;
  }
  .theme-toggle {
    height: 36px;
    min-width: auto;
    padding: 0 8px;
    gap: 4px;
  }
  .theme-toggle .theme-label {
    display: none;
  }

  .nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar {
    display: none;
  }
  .nav-inner {
    justify-content: flex-start;
    padding: 8px 14px;
    width: max-content;
    min-width: 100%;
    gap: 6px;
  }
  .nav button, .nav a {
    padding: 6px 12px;
    font-size: 11.5px;
  }

  .hero-title {
    font-size: 28px;
  }
  .hero-subtitle {
    font-size: 13.5px;
  }
  .hero-logo {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .search {
    width: 95px;
  }
  .search input {
    font-size: 11.5px;
  }
}

/* ========================================================
   LIVE TOOL WORKSPACE STYLES (Image, PDF & Utility Tools)
   ======================================================== */
.tool-workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .tool-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.tool-panel {
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  box-shadow: var(--shadow-sm);
}

.tool-preview-panel {
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dropzone {
  border: 2px dashed var(--primary-cyan);
  background: rgba(22, 135, 245, 0.05);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}
.dropzone:hover, .dropzone.dragover {
  background: rgba(22, 135, 245, 0.12);
  transform: scale(1.01);
}

.control-group {
  margin-bottom: 16px;
}
.control-group label {
  display: block;
  font-size: 13px;
  font-weight: 750;
  color: var(--text-heading);
  margin-bottom: 6px;
}
.control-group input, .control-group select, .control-group textarea {
  width: 100%;
  height: 42px;
  background: var(--bg-input);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-md);
  padding: 0 12px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: var(--transition);
}
.control-group input:focus, .control-group select:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.preset-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 750;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}
.preset-btn:hover, .preset-btn.active {
  background: var(--primary-cyan);
  border-color: var(--primary-cyan);
  color: #fff;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  background: var(--primary-cyan);
  border: 0;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: var(--transition);
}
.btn-primary:hover {
  background: var(--primary-blue);
  transform: translateY(-1px);
}

.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  background: #10a858;
  border: 0;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 168, 88, 0.3);
  transition: var(--transition);
  margin-top: 10px;
}
.btn-success:hover {
  background: #0d8a47;
  transform: translateY(-1px);
}

.canvas-preview-box {
  max-width: 100%;
  max-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-subtle);
  padding: 12px;
  margin-bottom: 14px;
}
.canvas-preview-box canvas, .canvas-preview-box img {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 750;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s var(--ease);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
