:root {
  --blue: #146bff;
  --blue-dark: #0758e7;
  --ink: #0b1425;
  --muted: #596984;
  --line: #e1e9f4;
  --card: #ffffff;
  --shadow: 0 14px 35px rgba(32, 70, 130, 0.075);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; color: var(--ink); font-family: "Inter", Arial, sans-serif; overflow-x: hidden; background: radial-gradient(circle at 70% 13%, #eff6ff 0, rgba(239,246,255,0) 28%), linear-gradient(180deg, #fff 0%, #f7faff 100%); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(20, 107, 255, 0.3); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 24px; height: 24px; }
.icon-sprite { position: absolute; overflow: hidden; width: 1px; height: 1px; }
.site-shell { width: min(1300px, calc(100% - 64px)); margin: 0 auto; }
.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; }

.tool-header { position: relative; z-index: 20; height: 70px; border-bottom: 1px solid #e9eef5; background: rgba(255, 255, 255, 0.92); box-shadow: 0 2px 12px rgba(26, 56, 102, 0.025); }
.header-inner { display: flex; align-items: center; height: 100%; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; letter-spacing: -0.8px; }
.brand > span:last-child span { color: var(--blue); }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; color: #fff; border-radius: 50%; background: linear-gradient(135deg, #247bff, #0951d6); box-shadow: 0 6px 14px rgba(18, 104, 246, 0.24); }
.brand-mark svg { width: 18px; height: 18px; }
.tool-nav { display: flex; align-items: center; gap: 34px; margin: 0 auto; font-size: 13px; font-weight: 600; }
.tool-nav a { display: inline-flex; align-items: center; gap: 4px; transition: color 0.2s ease; }
.tool-nav a:hover { color: var(--blue); }
.nav-down { width: 14px; height: 14px; }
.header-tools { display: flex; align-items: center; gap: 18px; }
.header-search { position: relative; display: flex; align-items: center; width: 358px; height: 39px; color: #71809a; border: 1px solid #d9e2ee; border-radius: 8px; background: #fff; }
.header-search:focus-within { border-color: #8db7ff; box-shadow: 0 0 0 3px rgba(20,107,255,.08); }
.header-search input { width: 100%; height: 100%; padding: 0 39px 0 14px; color: var(--ink); font-size: 12px; border: 0; border-radius: inherit; outline: 0; background: transparent; }
.header-search input::placeholder { color: #78869d; }
.header-search svg { position: absolute; right: 13px; width: 18px; height: 18px; pointer-events: none; }
.login-button { min-width: 76px; height: 39px; padding: 0 16px; color: #fff; font-size: 12px; font-weight: 700; border: 0; border-radius: 7px; background: linear-gradient(135deg, #1d75fb, #105de8); box-shadow: 0 6px 13px rgba(18, 104, 246, .2); transition: filter 0.2s, transform 0.2s; }
.login-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.mobile-menu { display: none; place-items: center; width: 38px; height: 38px; color: var(--ink); border: 0; border-radius: 7px; background: #f1f5fb; }
.mobile-menu svg { width: 21px; height: 21px; }

.breadcrumb { display: flex; align-items: center; gap: 13px; min-height: 55px; padding-top: 12px; color: #6c7d97; font-size: 12px; }
.breadcrumb a { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb > svg { flex: 0 0 auto; width: 14px; height: 14px; color: #a1aec0; }
.breadcrumb a svg { width: 16px; height: 16px; }
.breadcrumb span[aria-current="page"] { color: #162137; font-weight: 600; }

.tool-badge { display: inline-flex; gap: 6px; margin: 0 0 16px; padding: 6px 11px; color: #0864f7; font-size: 10px; font-weight: 800; letter-spacing: 0.03em; border-radius: 30px; background: #edf4ff; }
.tool-badge span { opacity: 0.72; }

/* Word Counter Tool Specific Styles */
.word-tool {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 52px;
  padding-top: 14px;
  align-items: start;
}

.word-copy {
  padding: 4px 4px 0;
}

.word-copy h1 {
  margin: 0;
  font-size: clamp(40px, 4.1vw, 57px);
  line-height: 1.03;
  letter-spacing: -2.8px;
}

.word-copy h1 strong {
  color: var(--blue);
}

.word-copy > p:last-child {
  max-width: 475px;
  margin: 19px 0 25px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.counter-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e8edf4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(32, 70, 130, 0.075);
  overflow: hidden;
}

#text-input {
  width: 100%;
  min-height: 260px;
  padding: 1rem;
  border: 0;
  border-bottom: 1px solid #e8edf4;
  border-radius: 0;
  font: inherit;
  color: var(--ink);
  background: #fbfcff;
  resize: vertical;
  outline: 0;
}

#text-input::placeholder {
  color: #a0adc0;
}

#text-input:focus {
  background: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 1rem;
  background: #fbfcff;
  border-bottom: 1px solid #e8edf4;
}

.stats-grid article {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stats-grid b {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 4px;
  line-height: 1;
}

.stats-grid small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.card-actions {
  display: flex;
  gap: 12px;
  padding: 1rem;
  justify-content: flex-end;
  background: #fbfcff;
}

.primary, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: filter 0.2s, background 0.2s;
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, #1975ff, #0758e6);
  box-shadow: 0 9px 18px rgba(12, 96, 241, 0.18);
}

.primary:hover {
  filter: brightness(1.06);
}

.secondary {
  color: var(--blue);
  background: #fff;
  border: 1px solid #d9e2ee;
}

.secondary:hover {
  background: #f6f9ff;
  border-color: #b0c5ff;
}

.primary svg, .secondary svg {
  width: 17px;
  height: 17px;
}

.explore-bar { display: flex; align-items: center; justify-content: space-between; margin: 17px auto 20px; padding: 18px 80px; border-radius: 12px; background: linear-gradient(105deg, #f0f6ff, #f6f9ff); }
.explore-bar > div { display: flex; align-items: center; gap: 12px; }
.explore-mark { display: grid; place-items: center; width: 31px; height: 31px; color: #fff; border-radius: 50%; background: linear-gradient(145deg, #3186ff, #0754df); }
.explore-mark svg { width: 21px; height: 21px; }
.explore-bar p { margin: 0; font-size: 12px; }
.explore-bar p span { color: var(--blue); }
.explore-bar small { display: block; margin-top: 5px; color: #6d7b91; font-size: 10px; }
.explore-bar a { display: inline-flex; align-items: center; gap: 12px; min-width: 229px; height: 39px; padding: 0 17px; color: #fff; font-size: 12px; font-weight: 700; border-radius: 7px; background: linear-gradient(135deg, #267bff, #0758e9); box-shadow: 0 8px 17px rgba(12, 96, 241, 0.16); }
.explore-bar a svg { width: 17px; height: 17px; margin-left: auto; }

.toast { position: fixed; z-index: 30; left: 50%; bottom: 25px; max-width: calc(100% - 32px); padding: 12px 17px; color: #fff; font-size: 12px; border-radius: 8px; background: #10213b; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18); opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: 0.22s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1160px) {
  .word-tool {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .word-copy {
    max-width: 650px;
  }
}

@media (max-width: 1020px) {
  .tool-header { height: 65px; }
  .tool-nav { position: absolute; top: 64px; right: 0; left: 0; display: grid; gap: 0; max-height: 0; margin: 0; overflow: hidden; visibility: hidden; border-top: 1px solid #e4eaf3; background: #fff; box-shadow: 0 12px 22px rgba(31, 67, 119, 0.12); transition: max-height 0.25s, visibility 0.25s; }
  .tool-header.nav-open .tool-nav { max-height: 340px; visibility: visible; }
  .tool-nav a { padding: 14px 20px; border-bottom: 1px solid #edf1f6; }
  .tool-nav a:last-child { border: 0; }
  .header-tools { margin-left: auto; }
  .header-search { width: min(320px, 38vw); }
  .mobile-menu { display: grid; }
  .explore-bar { padding: 18px 30px; }
}

@media (max-width: 640px) {
  .word-tool {
    gap: 26px;
  }

  .word-copy {
    padding-top: 10px;
  }

  .word-copy h1 {
    font-size: 36px;
    letter-spacing: -1.6px;
  }

  .word-copy > p:last-child {
    margin: 13px 0 22px;
    font-size: 13px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .card-actions {
    gap: 8px;
    padding: 12px;
  }

  .primary, .secondary {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }

  .explore-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }

  .explore-bar a {
    width: 100%;
    min-width: 0;
  }
}
