/* ============================================================
   ToolFriendly — Premium Modern Design System (v2.1)
   Light mode (L2) default · Deep gradient dark mode · Radius: 18px
   Brand accent: teal / blue-green
============================================================ */

/* ------------------------------------------------------------
   BASE RESET
------------------------------------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  --radius: 18px;

  /* Accent colors */
  --accent-teal: #19c4b2;
  --accent-teal-dark: #0ea89a;

  /* Light Mode (L2 — soft blue-tinted) */
  --light-bg-top: #f2f7fa;
  --light-bg-bottom: #e9eff4;
  --light-panel: rgba(255, 255, 255, 0.82);
  --light-panel-soft: rgba(255, 255, 255, 0.68);
  --light-border: rgba(149, 166, 189, 0.3);
  --light-text: #1e293b;
  --light-subtext: #475569;

  /* Dark Mode (premium blue-tinted gradient) */
  --dark-bg-top: #0b1222;
  --dark-bg-mid: #07101c;
  --dark-bg-bottom: #020814;
  --dark-panel: rgba(15, 23, 42, 0.88);
  --dark-panel-soft: rgba(20, 29, 49, 0.78);
  --dark-border: rgba(148, 163, 184, 0.32);
  --dark-text: #e7eaf0;
  --dark-subtext: #94a3b8;
}

html, body {
  min-height: 100%;
}

/* ------------------------------------------------------------
   BODY THEMES
------------------------------------------------------------ */
body[data-theme="light"] {
  background: linear-gradient(to bottom,
    #f2f4f7 0%,
    #e9edf2 40%,
    #e4e9ef 100%
  );
  background-color: #f2f4f7;
  color: #111827;
}


body[data-theme="dark"],
body:not([data-theme="light"]) {
  background: radial-gradient(
    circle at top left,
    #0b1120 0%,
    #020617 45%,
    #000000 100%
  );
  color: var(--dark-text);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------------------
   PAGE WRAPPER
------------------------------------------------------------ */
.page-wrapper {
  width: 100%;
  max-width: 1450px;
  margin: 0 auto;
  padding: 32px 24px 40px;
  padding-bottom: 120px;
}

/* ------------------------------------------------------------
   HEADER
------------------------------------------------------------ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.logo {
  font-size: 1.45rem;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}

.logo span {
  font-weight: 400;
  opacity: 0.65;
}

/* ------------------------------------------------------------
   THEME TOGGLE
------------------------------------------------------------ */
.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

body[data-theme="dark"] .theme-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--dark-text);
}

body[data-theme="light"] .theme-btn {
  background: var(--light-panel);
  border: 1px solid var(--light-border);
  color: var(--light-text);
}

.theme-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

/* ------------------------------------------------------------
   HERO SECTION
------------------------------------------------------------ */
.hero-section {
  margin-bottom: 38px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.4fr);
  gap: 24px;
}

.hero-title {
  font-size: 2.28rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--dark-subtext);
}

body[data-theme="light"] .hero-subtitle {
  color: var(--light-subtext);
}

.hero-card {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--dark-border);
  background: var(--dark-panel-soft);
  backdrop-filter: blur(12px);
}

body[data-theme="light"] .hero-card {
  background: var(--light-panel-soft);
  border-color: var(--light-border);
}

/* ------------------------------------------------------------
   HOMEPAGE TOOL GRID
------------------------------------------------------------ */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.tool-item {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s ease;
}

.tool-item-grid {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--dark-border);
  background: var(--dark-panel-soft);
  backdrop-filter: blur(10px);
}

body[data-theme="light"] .tool-item-grid {
  background: var(--light-panel);
  border-color: var(--light-border);
}

.tool-item:hover:not(.disabled) .tool-item-grid {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

/* Tool icon on homepage */
.tool-icon-card {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  color: white;
  flex-shrink: 0;
}

/* Disabled tools */
.tool-item.disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* ------------------------------------------------------------
   TOOL PAGE LAYOUT
------------------------------------------------------------ */
.tool-main {
  display: flex;
  justify-content: center;
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
  gap: 36px;
  width: 100%;
  max-width: 1300px;
}

.tool-header {
  display: flex;
  align-items: center;   /* centers icon + title block vertically */
  gap: 16px;             /* clean spacing between icon and text */
  margin-bottom: 24px;   /* space before the main tool panel */
}

/* ICON */
.tool-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0; /* ✅ prevents squashing */
  min-width: 48px; /* ✅ enforces consistent shape */
  min-height: 48px;
  border-radius: 12px;
  background: var(--accent-teal);
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* TITLE + SUBTITLE STACK */
.tool-header-text {
  display: flex;
  flex-direction: column;
}

/* TITLE */
.tool-title {
  margin: 0;
  padding: 0;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 700;
}

/* SUBTITLE */
.tool-subtitle {
  margin: 4px 0 0 0;     /* subtle and clean spacing */
  font-size: 1rem;
  opacity: 0.85;
  line-height: 1.45;
}

body[data-theme="light"] .tool-subtitle {
  color: var(--light-subtext);
}

/* ------------------------------------------------------------
   MAIN TOOL PANEL
------------------------------------------------------------ */
.tool-panel {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--dark-border);
  background: var(--dark-panel);
  backdrop-filter: blur(12px);
}

body[data-theme="light"] .tool-panel {
  background: var(--light-panel);
  border-color: var(--light-border);
}

/* Textarea */
.tool-textarea {
  width: 100%;
  height: 260px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--dark-border);
  background: rgba(15, 23, 42, 0.95);
  color: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: all 0.2s ease;
}

.tool-textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-teal);
}

body[data-theme="light"] .tool-textarea {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--light-border);
}


/* ------------------------------------------------------------
   STATS GRID
------------------------------------------------------------ */
.stats-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--dark-border);
  background: rgba(20, 29, 49, 0.86);
  backdrop-filter: blur(10px);
}

body[data-theme="light"] .stat-card {
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--light-border);
}

body[data-theme="light"] .stats-box {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(200, 210, 220, 0.6);
}

.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 6px;
}

.stat-number {
  font-size: 1.48rem;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------
   SIDEBAR PANEL
------------------------------------------------------------ */
.tool-side-panel {
  padding: 24px;
  margin-top: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--dark-border);
  background: var(--dark-panel);
  backdrop-filter: blur(14px);
}

body[data-theme="light"] .tool-side-panel {
  background: var(--light-panel);
  border-color: var(--light-border);
}

/* Light mode panel adjustments */
body[data-theme="light"] .panel,
body[data-theme="light"] .tool-side-panel,
body[data-theme="light"] .tool-main-panel {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(200, 210, 220, 0.5);
  backdrop-filter: blur(10px);
}

.tool-side-panel h2 {
  font-size: 1.12rem;
  margin-bottom: 10px;
}

/* Badge */
.badge-soft {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #fcd34d;
  font-size: 0.78rem;
  margin-bottom: 10px;
}


/* ------------------------------------------------------------
   WORD COUNTER – PREMIUM SIDEBAR
------------------------------------------------------------ */

.premium-sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.premium-section {
  margin-bottom: 4px;
}

.premium-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

/* SEO meter */
.premium-meter {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

body[data-theme="light"] .premium-meter {
  background: rgba(241, 245, 249, 0.9);
}

.premium-meter-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: inherit;
  transition: width 0.16s ease-out, background 0.16s ease-out;
  background: linear-gradient(90deg, var(--accent-teal), #38bdf8);
}

.premium-meter-fill.warn {
  background: linear-gradient(90deg, #facc15, #fb923c);
}

.premium-meter-fill.over {
  background: linear-gradient(90deg, #f97373, #fb7185);
}

.premium-meter-label {
  display: flex;
  justify-content: flex-end;
  font-size: 0.8rem;
  margin-top: 4px;
  opacity: 0.8;
}

/* Reading time */
.premium-reading {
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Social limits */
.premium-social {
  margin-bottom: 10px;
}

.premium-social-label {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
  font-size: 0.86rem;
  margin-bottom: 4px;
}

.premium-social-label span:nth-child(2) {
  flex: 1;
  margin-left: 4px;
}

.premium-social-count {
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
  font-size: 0.8rem;
}

.premium-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex-shrink: 0;
}

body[data-theme="dark"] .premium-icon {
  filter: invert(1);
}

.premium-bar {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 1);
}

body[data-theme="light"] .premium-bar {
  background: rgba(226, 232, 240, 1);
}

.premium-bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-teal), #38bdf8);
  transition: width 0.16s ease-out, background 0.16s ease-out;
}

.premium-bar-fill.over {
  background: linear-gradient(90deg, #f97373, #fb7185);
}

/* Buttons */
.premium-buttons {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.premium-btn {
  flex: 1;
  border-radius: 999px;
  border: none;
  padding: 7px 12px;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: radial-gradient(circle at top left, var(--accent-teal), var(--accent-teal-dark));
  color: #ecfdf5;
  /* box-shadow: 0 4px 10px rgba(15, 118, 110, 0.25); */
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.08s ease;
}

.premium-btn.secondary {
  background: rgba(15, 23, 42, 0.92);
  color: var(--dark-subtext);
  /* box-shadow: 0 4px 8px rgba(15, 23, 42, 0.3); */
  border: 1px solid rgba(148, 163, 184, 0.55);
}

body[data-theme="light"] .premium-btn.secondary {
  background: rgba(255, 255, 255, 0.95);
  color: var(--light-subtext);
  box-shadow: 0 10px 18px rgba(148, 163, 184, 0.4);
}

.premium-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.premium-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.6);
}

.premium-btn,
.premium-btn.secondary {
    box-shadow: none !important;
}

/* ------------------------------------------------------------
   ICON-ONLY THEME BUTTON (CIRCULAR)
------------------------------------------------------------ */
.theme-btn.icon-only {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
  gap: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
}

/* Dark mode appearance */
body[data-theme="dark"] .theme-btn.icon-only {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--dark-text);
}

/* Light mode appearance */
body[data-theme="light"] .theme-btn.icon-only {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--light-border);
  color: var(--light-text);
}

/* Hover */
.theme-btn.icon-only:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* Active press */
.theme-btn.icon-only:active {
  transform: translateY(0);
  box-shadow: none;
}

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

.theme-btn.icon-only span {
  line-height: 1;
}





/* ------------------------------------------------------------
   FOOTER
------------------------------------------------------------ */
.footer {
  text-align: center;
  margin-top: 50px;
  font-size: 0.9rem;
  opacity: 0.6;
}



   
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .page-wrapper {
    padding: 22px 16px 32px;
  }


/* ================================
   SEO Accordion Sections — CLEAN VERSION
   ================================ */

		  /* Each accordion card */
.seo-sections details {
  border: 1px solid var(--light-border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 18px;
  background: var(--light-card);
}

/* Dark theme card */
body[data-theme="dark"] .seo-sections details {
  background: var(--dark-card);
  border-color: rgba(255, 255, 255, 0.15);
}

/* LIGHT MODE STYLING */
body:not([data-theme="dark"]) .seo-sections details {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.4);
}

/* summary text stronger in light mode */
body:not([data-theme="dark"]) .seo-sections summary {
  color: rgba(0,0,0,0.82); /* readable contrast */
}

/* content slightly softer */
body:not([data-theme="dark"]) .seo-sections p,
body:not([data-theme="dark"]) .seo-sections ul,
body:not([data-theme="dark"]) .seo-sections h3 {
  color: rgba(0,0,0,0.65);
}

/* list divider toned for light backgrounds */
body:not([data-theme="dark"]) .seo-sections ul li {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}


/* Accordion title */
.seo-sections summary {
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  padding-left: 2px;
  color: var(--text-primary);
}

/* Remove default arrow */
.seo-sections summary::-webkit-details-marker {
  display: none;
}

/* Indent only paragraphs and headings, NOT lists */
.seo-sections details p,
.seo-sections details h3 {
  padding-left: 20px;
}


/* Soft secondary text for answers */
.seo-sections p,
.seo-sections ul,
.seo-sections h3 {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 6px;
  color: var(--text-secondary); /* softer */
}

/* Section sub-headings (Instagram, SMS, etc.) */
.seo-sections h3 {
  font-weight: 500; /* no bold shouting */
  margin-top: 14px;
  margin-bottom: 6px;
}

/* Bullet lists */
.seo-sections ul {
  padding-left: 28px; /* proper indent */
  margin-top: 6px;
}

/* Line between list items */
.seo-sections ul li {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 20px 0;
}

.seo-sections ul li:last-child {
  border-bottom: none;
}

.seo-sections ul li {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 12px 0;
  margin-left: 0; /* reset any inherited weirdness */
  list-style: disc; /* force bullets if browser got confused */
}

.seo-sections ul {
  padding-left: 28px;
}




/* FORCE accordion styling */
.seo-sections details {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 18px;
  background: rgba(255,255,255,0.04);
}

/* Proper bullet indentation */
.seo-sections ul {
  list-style: disc;
  list-style-position: outside;
  padding-left: 28px;
  margin-top: 10px;
}

/* Better spacing between list items */
.seo-sections ul li {
  padding: 10px 0;
  margin: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.seo-sections ul li:last-child {
  border-bottom: none;
}

/* --- FORCE SUMMARY TO BEHAVE PROPERLY --- */
.seo-sections summary {
  display: block !important;
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 0 10px 0;
  cursor: pointer;
  color: var(--text-primary); /* stronger */
}

/* Remove default marker in ALL browsers */
.seo-sections summary::-webkit-details-marker {
  display: none !important;
}
.seo-sections summary::marker {
  content: "" !important;
}

/* --- RESTORE CARD LOOK --- */
.seo-sections details {
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 10px;
  padding: 16px 20px !important;
  margin-bottom: 18px;
  background: rgba(255,255,255,0.04);
}

/* --- FIX BULLET INDENT + SPACING --- */
.seo-sections ul {
  list-style: disc !important;
  list-style-position: outside;
  padding-left: 28px !important;
  margin-top: 10px;
}

.seo-sections ul li {
  padding: 10px 0;
  margin: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.seo-sections ul li:last-child {
  border-bottom: none;
}

/* ------------------------------------------------------------
   RESPONSIVE — CLEAN + FIXED
------------------------------------------------------------ */

/* ✅ Tablet / small laptop */
@media (max-width: 960px) {
  .tool-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ✅ Small mobile header wrap */
@media (max-width: 400px) {
  .tool-header {
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
}

/* ✅ General mobile adjustments */
@media (max-width: 480px) {

  /* --- keep separate as requested --- */
  .tool-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 10px;
    font-size: 0.85rem;
  }

  .tool-icon-card {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 12px; /* original preserved */
    font-size: 0.85rem;
  }

  /* --- unified --- */
  .tool-textarea {
    height: 160px; /* was 260px */
  }

  .tool-panel {
    padding: 16px; /* was 22px */
  }

  .tool-side-panel {
    margin-top: 6px;  /* was 18px */
    padding: 18px;   /* was 24px */
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 6px;
  }

  .stat-card {
    padding: 10px 8px;
  }

  .stat-label {
    font-size: 0.65rem;
    margin-bottom: 4px;
  }

  .stat-number {
    font-size: 1.1rem;
  }
}

/* ✅ Ultra-small screens */
@media (max-width: 390px) {
  .tool-title {
    font-size: 1.8rem;
  }
}



/* ============================================================
   CHARACTER COUNTER – SAFE, NON-CONFLICTING STYLES
   ============================================================ */

.cc-limits {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cc-limit-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cc-limit-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  opacity: 0.85;
}

.cc-bar {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 1);
}

body[data-theme="light"] .cc-bar {
  background: rgba(226, 232, 240, 1);
}

.cc-bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-teal), #38bdf8);
  transition: width 0.16s ease-out, background 0.16s ease-out;
}

.cc-bar-fill.warn {
  background: linear-gradient(90deg, #facc15, #fb923c);
}

.cc-bar-fill.over {
  background: linear-gradient(90deg, #f97373, #fb7185);
}



/* ============================
   ✅ MOBILE RESPONSIVE TWEAKS
   ============================ */

@media (max-width: 640px) {
  .cc-limits {
    gap: 14px;
    margin-top: 18px;
  }

  .cc-limit-label {
    font-size: 0.8rem;
  }

  .cc-bar {
    height: 5px;
  }
}

/* ============================================================
   SINGLE-COLUMN TOOL LAYOUT (for tools without sidebar)
   ============================================================ */

.tool-shell.single-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 800px; /* matches your visual balance */
  margin: 0 auto;
  gap: 0; /* clean stacking */
}

@media (max-width: 480px) {
  .tool-shell.single-column {
    padding: 0;
    max-width: 100%;
  }
}

/* ============================================================
   ICON + BUTTON COLOR MATCH
   ============================================================ */

/* CC icon color */
.tool-shell.single-column .tool-icon {
  background: var(--accent-teal);
  color: #fff;
}

/* Copy button using same accent */
.tool-shell.single-column #copyBtn.premium-btn {
  background: linear-gradient(
        135deg,
        var(--tool-gradient-start),
        var(--tool-gradient-end)
    );
    color: #fff;
    border: none;
}

/* Hover state (optional, consistent with your global style) */
.tool-shell.single-column #copyBtn.premium-btn:hover {
  opacity: 0.9;
}

/* ============================================================
   CHARACTER COUNTER — SPACING FIX BELOW LIMIT SECTION
   ============================================================ */

.cc-limits + .premium-buttons {
  margin-top: 28px; /* adjust if needed: 24–36px works well */
}



/* ============================================================
   SINGLE-COLUMN TOOL — MATCH WORD COUNTER SPACING
   ============================================================ */

.tool-shell.single-column .tool-panel {
  margin-bottom: 32px; /* matches Word Counter visual spacing */
}

/* ============================================================
   TOOL-PAGE ICON GRADIENTS (MATCH HOMEPAGE STYLE)
   ============================================================ */

.tool-shell .tool-icon-card {
  background: linear-gradient(135deg, var(--tool-gradient-start), var(--tool-gradient-end));
  color: #fff;
}

/* Fine-print note style for Character Counter */
.tool-note.small {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 6px;
  line-height: 1.4;
}

/* ============================================================
   Related Tools — styled container
   ============================================================ */

.related-tools {
  margin-top: 32px;
  padding: 20px 22px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-theme="light"] .related-tools {
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.related-tools h3 {
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 800;
}

.related-tools p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.related-tools a {
  color: var(--accent-teal);
  text-decoration: none;
  font-weight: 600;
}

.related-tools a:hover {
  text-decoration: none;
}

/* Fix vertical alignment inside Related Tools box */
.related-tools h3 {
  margin: 0 0 6px 0; /* remove default top margin */
}

.related-tools p {
  margin: 0; /* remove default paragraph margin */
}

/* Match link styling inside inline tool notes */
.tool-note a {
  color: var(--accent-teal);
  text-decoration: none;
  font-weight: 600;
}

.tool-note a:hover {
  text-decoration: none;
}

.tool-note a:visited {
  color: var(--accent-teal);
}

/* Match link styling inside accordion content */
.seo-sections a {
  color: var(--accent-teal);
  text-decoration: none;
  font-weight: 600;
}

.seo-sections a:hover {
  text-decoration: none;
}

/* Prevent purple visited links */
.seo-sections a:visited {
  color: var(--accent-teal);
}

/* Make tool-note visually identical to tool-subtitle */
.tool-note {
  margin: 4px 0 0 0;
  font-size: 1rem;
  opacity: 0.85;
  line-height: 1.45;
  color: inherit;
}

/* Make tool-note match subtitle in light mode */
body[data-theme="light"] .tool-note {
  color: var(--light-subtext);
}

.tool-item:hover:not(.disabled) .tool-item-grid {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

/* Remove hover shadow in light mode as well */
body[data-theme="light"] .tool-item:hover:not(.disabled) .tool-item-grid {
  box-shadow: none;
}

.theme-toggle:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.rl-options {
  margin-top: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
}

.rl-mode-group,
.rl-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}

.rl-label {
  font-weight: 600;
  opacity: 0.9;
}

.rl-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.tool-note {
  font-size: 0.9rem;
  margin-top: 6px;
  opacity: 0.9;
}

.tool-note + .tool-note {
  margin-top: 4px;
}

.tool-subtitle {
  margin-bottom: 6px;
}

.toggle-twitter-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin: 10px 0 4px;
  opacity: 0.85;
}

.platform-note {
  font-size: 0.8rem;
  opacity: 0.7;
  margin: 4px 0 10px;
}

/* Smooth fade when Twitter count updates */
#ccXCount {
  transition: opacity 0.2s ease;
}

.count-updating #ccXCount {
  opacity: 0.4;
}

.tc-options {
  display: flex;
  flex-wrap: wrap;             /* allow wrapping on narrow screens */
  gap: 0.75rem 1.5rem;         /* vertical + horizontal gap */
  margin: 1rem 0;
  font-size: 0.95rem;
  opacity: 0.9;
}


.tc-options label {
  cursor: pointer;
}

.tool-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.related-box {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 1.25rem;
  border-radius: 10px;
  margin: 2rem 0;
}

/* ============================================================
   UNIVERSAL MAIN TOOL BUTTON — MATCH ICON COLOR
   Applies to all main action buttons across all tools
============================================================ */

/* Detect any button inside .tool-panel that is a primary action */
.tool-panel button,
.tool-actions button,
button.primary-action {
  background: linear-gradient(
        135deg,
        var(--tool-gradient-start),
        var(--tool-gradient-end)
  );
  color: #fff !important;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

/* Hover state */
.tool-panel button:hover,
.tool-actions button:hover,
button.primary-action:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Pressed state */
.tool-panel button:active,
.tool-actions button:active,
button.primary-action:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

/* ============================================================
   PATCH 2025-01 — SAFE BUTTON + LIGHT MODE FIXES
   ============================================================ */

/* ------------------------------------------------------------
   1) Fix invisible text on CC + RLB secondary buttons (light mode)
   ------------------------------------------------------------ */
body[data-theme="light"] .premium-btn.secondary {
    color: #1e293b !important; /* slate-800 visible text */
    border-color: rgba(0,0,0,0.15) !important;
}

/* ------------------------------------------------------------
   2) Unify ALL tools' button styles to match Word Counter
      - Primary = coloured (tool gradient)
      - Secondary = neutral (light/dark mode appropriate)
   ------------------------------------------------------------ */

/* Main action buttons */
.primary-btn,
button.primary-action,
.tool-panel .primary-btn,
.tool-actions .primary-btn {
    background: linear-gradient(
        135deg,
        var(--tool-gradient-start),
        var(--tool-gradient-end)
    ) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 10px 18px !important;
    font-weight: 600 !important;
}

/* Secondary buttons — light mode */
.secondary-btn,
.tool-panel .secondary-btn,
.tool-actions .secondary-btn {
    background: rgba(255,255,255,0.92) !important;
    color: #1e293b !important;
    border: 1px solid rgba(0,0,0,0.12) !important;
    border-radius: 999px !important;
}

/* Secondary buttons — dark mode */
body[data-theme="dark"] .secondary-btn,
body[data-theme="dark"] .tool-panel .secondary-btn,
body[data-theme="dark"] .tool-actions .secondary-btn {
    background: rgba(15,23,42,0.92) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(148,163,184,0.35) !important;
}

/* ------------------------------------------------------------
   3) STOP all global buttons from being coloured accidentally
   ------------------------------------------------------------ */
.tool-panel button:not(.primary-btn):not(.premium-btn):not(.primary-action),
.tool-actions button:not(.primary-btn):not(.premium-btn):not(.primary-action) {
    background: inherit !important; /* don't override */
    color: inherit !important;
}

/* Remove dangerous global rule from earlier in the file */
.tool-panel button,
.tool-actions button,
button.primary-action {
    background: none !important;   /* reset ALL inherited colouring */
    color: inherit !important;
}

/* Ensure primary-btn has the same sizing as premium-btn */
.primary-btn {
    padding: 7px 16px !important;
    font-size: 0.86rem !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
}






/* ============================================================
   FINAL OVERRIDE — FORCE CHARACTER COUNTER STATS TO FLEX LAYOUT
   ============================================================ */

@media (max-width: 600px) {
    .stats-grid.two-col {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }

    .stats-grid.two-col .stat-card {
        flex: 0 0 calc(33.33% - 8px) !important; /* 3 equal columns */
        box-sizing: border-box !important;
        text-align: center !important;
        padding: 10px 6px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .stats-grid.two-col .stat-label {
        font-size: 0.72rem !important;
        line-height: 1.1 !important;
        min-height: 2.1em !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: normal !important;
    }

    .stats-grid.two-col .stat-number {
        font-size: 1.3rem !important;
        line-height: 1 !important;
    }
}

/* Light mode fallback */
html[data-theme="light"],
body[data-theme="light"] {
    background-color: var(--light-bg-bottom) !important;
}

/* Dark mode fallback */
html:not([data-theme="light"]),
body:not([data-theme="light"]) {
    background-color: var(--dark-bg-bottom) !important;
}

/* ============================================================
   SAFARI LANDSCAPE FIX FOR HOMEPAGE
   ============================================================ */


.page-wrapper {
    padding: 12px;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

@supports(padding: max(0px)) {
    .page-wrapper {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
}
