/* ToolNest Studio – single stylesheet. Colors are CSS variables: change the theme in :root. */
:root {
  --ink: #0b1a33;
  --text: #24334f;
  --muted: #5c6b87;
  --line: #dbe4f2;
  --bg: #f5f8fd;
  --surface: #ffffff;
  --blue-50: #eef4ff;
  --blue-100: #dce8ff;
  --blue-500: #2f6bf0;
  --blue-600: #2358d6;
  --blue-700: #1b45ad;
  --navy: #0c1e44;
  --navy-2: #12295a;
  --teal: #0e8fa8;
  --good: #16794c;
  --warn: #b45309;
  --bad: #b42318;
  --radius: 10px;
  --radius-lg: 14px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 800;
}

h2 {
  font-size: 1.4rem;
  font-weight: 700;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.container.narrow {
  max-width: 820px;
}

.center {
  text-align: center;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 100;
}

.skip-link:focus {
  left: 8px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s;
}

.site-header.scrolled {
  box-shadow: 0 6px 24px rgba(11, 26, 51, .08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  display: block;
  height: 36px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}

.main-nav>a,
.dropdown-toggle {
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  background: none;
  border: 0;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color .15s, color .15s;
}

.main-nav>a:hover,
.dropdown-toggle:hover,
.dropdown:hover .dropdown-toggle,
.dropdown.open .dropdown-toggle {
  background: var(--blue-50);
  color: var(--blue-700);
  text-decoration: none;
}

.dropdown {
  position: relative;
}

.dropdown-toggle .bi {
  font-size: .7rem;
  display: inline-block;
  transition: transform .25s ease;
}

.dropdown:hover .dropdown-toggle .bi,
.dropdown.open .dropdown-toggle .bi {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(11, 26, 51, .12);
  z-index: 100;
}

.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

@media (min-width: 861px) {
  .dropdown:hover .dropdown-menu {
    display: block;
  }
}

.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: .93rem;
  font-weight: 500;
}

.dropdown-menu a:hover {
  background: var(--blue-50);
  text-decoration: none;
}

.dropdown-menu a .bi {
  color: var(--blue-600);
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
}

.dropdown-menu a span {
  margin-left: auto;
  color: var(--muted);
  font-size: .8rem;
}

.dropdown-menu .dropdown-all {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  color: var(--blue-600);
  font-weight: 600;
}

.menu-btn {
  display: none;
  margin-left: auto;
  font-size: 1.6rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
}

/* ---------- search ---------- */
.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 13px 18px 13px 42px;
}

.search input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(47, 107, 240, .15);
}

.search-compact {
  flex: 0 1 340px;
  width: 100%;
  max-width: 340px;
  margin-left: 0;
}

.search-compact input {
  padding: 9px 16px 9px 38px;
  font-size: .92rem;
  background: var(--bg);
}

.search-compact input:focus {
  background: var(--surface);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 60;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(11, 26, 51, .16);
  padding: 6px;
  max-height: 420px;
  overflow-y: auto;
}

.search-compact .search-results {
  min-width: 360px;
  left: auto;
}

.search-results[hidden] {
  display: none;
}

.sr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
}

.sr-item:hover,
.sr-item.active {
  background: var(--blue-50);
  text-decoration: none;
}

.sr-item .icon-tile {
  width: 34px;
  height: 34px;
  font-size: 1rem;
}

.sr-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sr-text strong {
  color: var(--ink);
  font-size: .93rem;
}

.sr-text small {
  color: var(--muted);
  font-size: .8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sr-empty {
  padding: 14px;
  color: var(--muted);
  font-size: .92rem;
}

.sr-all {
  display: block;
  padding: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  font-weight: 600;
  font-size: .9rem;
}

/* ---------- hero & sections ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chip-row-center {
  justify-content: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: .88rem;
  font-weight: 600;
}

.chip:hover {
  border-color: var(--blue-500);
  color: var(--blue-700);
  text-decoration: none;
}

.chip .bi {
  color: var(--blue-600);
}

.section {
  padding: 52px 0;
}

.section-tight {
  padding: 26px 0;
}

.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
}

.section-head h2 .bi {
  color: var(--blue-600);
  margin-right: 6px;
}

.link-more {
  font-weight: 600;
  font-size: .93rem;
}

.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 26px 0 30px;
}

.page-head h1 {
  margin-bottom: .25em;
}

.page-head p {
  color: var(--muted);
  margin: 0;
  max-width: 680px;
}

.page-head-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-search {
  max-width: 560px;
  margin-top: 18px;
}

.center .page-search {
  margin-inline: auto;
  margin-bottom: 0;
}

.breadcrumbs {
  margin-bottom: 14px;
  font-size: .85rem;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
}

.breadcrumbs li+li::before {
  content: "/";
  margin-right: 6px;
  color: var(--line);
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--blue-600);
}

.breadcrumbs [aria-current] {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- cards ---------- */
.icon-tile {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 1.2rem;
}

.icon-tile-lg {
  width: 54px;
  height: 54px;
  font-size: 1.5rem;
  border-radius: 12px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.tool-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--text);
  transition: border-color .15s, background-color .15s;
}

.tool-card:hover {
  border-color: var(--blue-500);
  text-decoration: none;
}

.tool-card:hover .icon-tile {
  background: var(--blue-600);
  color: #fff;
}

.icon-tile {
  transition: background-color .15s, color .15s;
}

.tool-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tool-card-body strong {
  color: var(--ink);
  font-size: 1rem;
}

.tool-card-body span {
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--text);
  transition: border-color .15s;
}

.cat-card:hover {
  border-color: var(--blue-500);
  text-decoration: none;
}

.cat-card strong {
  color: var(--ink);
  font-size: 1.05rem;
  margin-top: 6px;
}

.cat-desc {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
  flex: 1;
}

.cat-count {
  font-size: .82rem;
  font-weight: 700;
  color: var(--blue-700);
  background: var(--blue-100);
  padding: 2px 10px;
  border-radius: 999px;
  margin-top: 6px;
}

.cat-block {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.cat-block:last-child {
  border-bottom: 0;
}

.pill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-list a {
  display: inline-block;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: .92rem;
  font-weight: 500;
}

.pill-list a:hover {
  border-color: var(--blue-500);
  color: var(--blue-700);
  text-decoration: none;
}

.pill-list .pill-more {
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 600;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px;
  margin-top: 22px;
}

.feature .bi {
  font-size: 1.6rem;
  color: var(--blue-600);
}

.feature h3 {
  margin: 8px 0 4px;
}

.feature p {
  color: var(--muted);
  font-size: .93rem;
  margin: 0;
}

.result-meta {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 14px;
}

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}

.empty .bi {
  font-size: 2.2rem;
  color: var(--blue-500);
}

.big-code {
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--blue-600);
  margin: 0;
  line-height: 1;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
}

/* ---------- pagination ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
}

.page-link {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: .92rem;
}

a.page-link:hover {
  border-color: var(--blue-500);
  color: var(--blue-700);
  text-decoration: none;
}

.page-link.is-current {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #fff;
}

.page-gap {
  color: var(--muted);
  padding: 0 4px;
}

/* ---------- tool page ---------- */
.tool-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 2px 10px rgba(11, 26, 51, .04);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.prose {
  max-width: 720px;
}

.prose h2 {
  margin-top: 1.6em;
  font-size: 1.3rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--text);
}

.steps {
  padding-left: 1.3em;
  display: grid;
  gap: 6px;
  margin-bottom: 1em;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

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

.faq summary::after {
  content: "+";
  font-size: 1.3rem;
  line-height: 1;
  color: var(--blue-600);
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  padding: 0 16px 14px;
  margin: 0;
  color: var(--muted);
}

.content-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: sticky;
  top: 86px;
}

.side-title {
  font-size: 1rem;
  margin-bottom: 10px;
}

.side-list {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: .92rem;
}

.side-item:hover {
  background: var(--blue-50);
  text-decoration: none;
}

.side-item .icon-tile {
  width: 36px;
  height: 36px;
  font-size: 1rem;
}

/* ---------- tool controls (shared by all tools) ---------- */
.stack {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field>label,
.label {
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .suffix {
  position: absolute;
  right: 12px;
  color: var(--muted);
  font-size: .85rem;
  pointer-events: none;
}

.input-wrap input {
  padding-right: 56px;
}

input[type=text],
input[type=number],
input[type=date],
input[type=url],
input[type=datetime-local],
input[type=search],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: .98rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}

textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

textarea.mono,
.mono {
  font-family: var(--mono);
  font-size: .9rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(47, 107, 240, .15);
}

input[type=range] {
  width: 100%;
  accent-color: var(--blue-600);
}

input[type=checkbox],
input[type=radio] {
  accent-color: var(--blue-600);
  width: 17px;
  height: 17px;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.checks label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .93rem;
  cursor: pointer;
}

.hint {
  color: var(--muted);
  font-size: .85rem;
  margin: 0;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  border-color: var(--blue-500);
  text-decoration: none;
}

.btn-primary {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-700);
  border-color: var(--blue-700);
}

.btn-sm {
  padding: 6px 12px;
  font-size: .85rem;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.stat {
  background: var(--blue-50);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.stat b {
  display: block;
  font-size: 1.5rem;
  color: var(--blue-700);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.stat span {
  font-size: .82rem;
  color: var(--muted);
}

.stat.big {
  grid-column: 1 / -1;
  background: var(--blue-600);
}

.stat.big b {
  color: #fff;
  font-size: 2rem;
}

.stat.big span {
  color: #dbe7ff;
}

.output {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: .9rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 48px;
}

.notice {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: .92rem;
  background: var(--blue-50);
  color: var(--blue-700);
}

.notice.error {
  background: #fdecea;
  color: var(--bad);
}

.notice.ok {
  background: #e7f6ee;
  color: var(--good);
}

.table-wrap {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

table.data th {
  color: var(--muted);
  font-weight: 600;
  background: var(--bg);
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 30px 16px;
  border: 2px dashed var(--blue-100);
  border-radius: var(--radius-lg);
  background: var(--blue-50);
  cursor: pointer;
  color: var(--blue-700);
  font-weight: 600;
}

.dropzone:hover,
.dropzone.drag,
.dropzone:focus-within {
  border-color: var(--blue-500);
}

.dropzone .bi {
  font-size: 1.8rem;
}

.dropzone small {
  color: var(--muted);
  font-weight: 400;
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.preview {
  max-width: 100%;
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: repeating-conic-gradient(#f0f4fb 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}

.row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.row-item code {
  font-family: var(--mono);
  font-size: .88rem;
  overflow-wrap: anywhere;
}

.row-item .row-label {
  font-size: .8rem;
  color: var(--muted);
  display: block;
  font-family: var(--font);
}

.meter {
  height: 8px;
  background: var(--blue-100);
  border-radius: 99px;
  overflow: hidden;
}

.meter>i {
  display: block;
  height: 100%;
  background: var(--blue-600);
  width: 0;
  transition: width .15s;
}

.meter.over>i {
  background: var(--bad);
}

.serp {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
  font-family: Arial, sans-serif;
}

.serp .serp-url {
  color: #1f6b3a;
  font-size: .85rem;
  overflow-wrap: anywhere;
}

.serp .serp-title {
  color: #1a0dab;
  font-size: 1.2rem;
  margin: 2px 0 4px;
  line-height: 1.3;
}

.serp .serp-desc {
  color: #4d5156;
  font-size: .9rem;
  margin: 0;
  line-height: 1.5;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy);
  color: #b9c7e6;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-top: 48px;
  padding-bottom: 36px;
}

.footer-brand p {
  margin-top: 14px;
  font-size: .92rem;
  max-width: 300px;
}

.footer-brand img {
  display: block;
  height: 36px;
  width: auto;
}

.site-footer h3 {
  color: #fff;
  font-size: .95rem;
  margin-bottom: 12px;
}

.site-footer .footer-sub {
  margin-top: 22px;
}

.site-footer ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.site-footer a {
  color: #b9c7e6;
  font-size: .92rem;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid var(--navy-2);
  padding: 16px 0;
  font-size: .85rem;
}

.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .content-side {
    position: static;
  }

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

  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }

  .menu-btn {
    display: inline-grid;
    place-items: center;
  }

  .search-compact {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    margin-left: 0;
  }

  .search-compact .search-results {
    min-width: 0;
    left: 0;
  }

  .main-nav {
    display: none;
    order: 4;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 6px 0 10px;
    border-top: 1px solid var(--line);
    margin: 0;
  }

  .main-nav.open {
    display: flex;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 10px;
    min-width: 0;
  }

  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 40px 0 33px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tool-panel {
    padding: 16px;
  }

  .page-head-row .icon-tile-lg {
    display: none;
  }
}


/* =====================================================================
   v2 additions: hero, motion, blog, polish
   ===================================================================== */
:root {
  --ease: cubic-bezier(.22, .8, .3, 1);
  --glow: 0 10px 30px rgba(35, 88, 214, .16);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 40px 0 33px;
  background: linear-gradient(135deg, #0a1a3d 0%, #12295a 38%, #1b45ad 78%, #2f6bf0 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  animation: drift 14s ease-in-out infinite alternate;
}

.o1 {
  width: 380px;
  height: 380px;
  background: #2f6bf0;
  top: -120px;
  left: -60px;
}

.o2 {
  width: 320px;
  height: 320px;
  background: #0e8fa8;
  right: 8%;
  top: 30%;
  animation-delay: -5s;
  opacity: .4;
}

.o3 {
  width: 260px;
  height: 260px;
  background: #6aa0ff;
  bottom: -120px;
  left: 40%;
  animation-delay: -9s;
  opacity: .35;
}

@keyframes drift {
  to {
    transform: translate(40px, 30px) scale(1.12);
  }
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: .85rem;
  font-weight: 600;
  color: #e4eeff;
  margin-bottom: 18px;
  backdrop-filter: blur(6px);
}

.hero-badge .bi {
  color: #ffd76a;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4.8vw, 3.4rem);
  line-height: 1.12;
  margin-bottom: .45em;
}

.rotator {
  display: inline-block;
  color: #9cc2ff;
  background: linear-gradient(90deg, #9cc2ff, #6ee7f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity .35s, transform .35s var(--ease);
}

.rotator.out {
  opacity: 0;
  transform: translateY(10px);
}

.hero-lead {
  font-size: 1.12rem;
  color: #c9d9f5;
  max-width: 600px;
  margin-bottom: 1.5em;
}

.hero .search {
  max-width: 600px;
}

.hero .search input {
  padding: 17px 22px 17px 50px;
  font-size: 1.05rem;
  border-radius: 14px;
  border-color: transparent;
  box-shadow: 0 14px 34px rgba(4, 12, 36, .35);
}

.hero .search input:focus {
  box-shadow: 0 14px 34px rgba(4, 12, 36, .35), 0 0 0 4px rgba(156, 194, 255, .45);
}

.hero .search-icon {
  left: 18px;
  font-size: 1.1rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.chip-row-center {
  justify-content: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: .88rem;
  font-weight: 600;
  transition: transform .2s var(--ease), border-color .2s, background-color .2s;
}

.chip:hover {
  border-color: var(--blue-500);
  color: var(--blue-700);
  text-decoration: none;
  transform: translateY(-2px);
}

.chip .bi {
  color: var(--blue-600);
}

.hero .chip {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .22);
  color: #eaf1ff;
  backdrop-filter: blur(6px);
}

.hero .chip .bi {
  color: #9cc2ff;
}

.hero .chip:hover {
  background: rgba(255, 255, 255, .2);
  border-color: rgba(255, 255, 255, .5);
  color: #fff;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 44px;
  margin: 34px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.hero-stats dt {
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.hero-stats dd {
  margin: 2px 0 0;
  font-size: .85rem;
  color: #aac0e6;
}

.hero-visual {
  position: relative;
  height: 380px;
}

.float-card {
  position: absolute;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 14px 18px;
  min-width: 210px;
  border-radius: 16px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .26);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(4, 12, 36, .3);
  animation: floaty 6s ease-in-out infinite;
}

.float-card .bi {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .18);
  font-size: 1.35rem;
  color: #cfe1ff;
}

.float-card b {
  font-size: .98rem;
  line-height: 1.2;
  align-self: end;
}

.float-card small {
  color: #b4c9ee;
  font-size: .8rem;
  align-self: start;
}

.fc1 {
  top: 0;
  left: 6%;
  animation-delay: 0s;
}

.fc2 {
  top: 20%;
  right: 0;
  animation-delay: -1.2s;
}

.fc3 {
  top: 44%;
  left: 0;
  animation-delay: -2.4s;
}

.fc4 {
  top: 66%;
  right: 6%;
  animation-delay: -3.6s;
}

.fc5 {
  bottom: 0;
  left: 18%;
  animation-delay: -4.8s;
}

@keyframes floaty {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

/* ---------- scroll reveal ---------- */
.js .reveal,
.js .stagger>* {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.js .reveal.in,
.js .stagger.in>* {
  opacity: 1;
  transform: none;
}

.js .stagger.in>*:nth-child(2) {
  transition-delay: .05s;
}

.js .stagger.in>*:nth-child(3) {
  transition-delay: .1s;
}

.js .stagger.in>*:nth-child(4) {
  transition-delay: .15s;
}

.js .stagger.in>*:nth-child(5) {
  transition-delay: .2s;
}

.js .stagger.in>*:nth-child(6) {
  transition-delay: .25s;
}

.js .stagger.in>*:nth-child(n+7) {
  transition-delay: .3s;
}

/* ---------- card + button polish ---------- */
.tool-card {
  position: relative;
  transition: transform .25s var(--ease), border-color .2s, box-shadow .25s;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow);
}

.tool-card:hover .icon-tile {
  transform: rotate(-6deg) scale(1.06);
}

.tool-arrow {
  position: absolute;
  right: 14px;
  top: 14px;
  color: var(--blue-500);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .2s, transform .25s var(--ease);
}

.tool-card:hover .tool-arrow {
  opacity: 1;
  transform: none;
}

.icon-tile {
  transition: background-color .2s, color .2s, transform .25s var(--ease);
}

.cat-card {
  transition: transform .25s var(--ease), border-color .2s, box-shadow .25s, background-color .2s;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow);
  background: var(--surface);
}

.btn {
  transition: transform .15s var(--ease), background-color .2s, border-color .2s, box-shadow .2s;
}

.btn:active {
  transform: scale(.97);
}

.btn-primary:hover {
  box-shadow: 0 8px 20px rgba(35, 88, 214, .3);
  transform: translateY(-1px);
}

.btn-light {
  background: #fff;
  color: var(--blue-700);
  border-color: #fff;
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}

.tool-panel {
  animation: panelIn .5s var(--ease) both;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.stat {
  transition: transform .2s var(--ease);
}

.stat:hover {
  transform: translateY(-2px);
}

.main-nav>a,
.dropdown-toggle {
  transition: background-color .2s, color .2s;
}

.dropdown-menu {
  animation: menuIn .2s var(--ease);
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.link-more .bi {
  transition: transform .2s;
}

.link-more:hover .bi {
  transform: translateX(3px);
}

.section-head h2 .bi {
  color: var(--blue-500);
}

/* ---------- how it works / cta ---------- */
.how-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.how-grid li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.how-num {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff;
  font-weight: 800;
  margin-bottom: 10px;
}

.how-grid p {
  margin: 0;
  color: var(--muted);
  font-size: .93rem;
}

.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-700) 100%);
  color: #dbe7ff;
  text-align: center;
  padding: 54px 0;
  margin-top: 20px;
}

.cta-band h2 {
  color: #fff;
  font-size: 1.7rem;
}

.cta-band p {
  margin-bottom: 1.2em;
}

/* ---------- blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--text);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .2s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow);
  border-color: var(--blue-500);
  text-decoration: none;
}

.blog-thumb {
  position: relative;
  display: grid;
  place-items: center;
  height: 130px;
  font-size: 2.6rem;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-2), var(--blue-500));
  overflow: hidden;
}

.blog-thumb::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  right: -50px;
  top: -70px;
  transition: transform .5s var(--ease);
}

.blog-card:hover .blog-thumb::before {
  transform: scale(1.3);
}

.blog-thumb .bi {
  position: relative;
  transition: transform .3s var(--ease);
}

.blog-card:hover .blog-thumb .bi {
  transform: scale(1.12) rotate(-4deg);
}

.blog-thumb em {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-style: normal;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .18);
  padding: 3px 10px;
  border-radius: 999px;
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  flex: 1;
}

.blog-card-body strong {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.35;
}

.blog-meta {
  color: var(--muted);
  font-size: .82rem;
}

.blog-excerpt {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
  flex: 1;
}

.blog-more {
  color: var(--blue-600);
  font-weight: 600;
  font-size: .9rem;
  margin-top: 4px;
}

.blog-more .bi {
  transition: transform .2s;
}

.blog-card:hover .blog-more .bi {
  transform: translateX(4px);
}

.blog-card.is-featured {
  flex-direction: row;
  margin-bottom: 22px;
}

.blog-card.is-featured .blog-thumb {
  flex: 0 0 38%;
  height: auto;
  min-height: 240px;
  font-size: 4rem;
}

.blog-card.is-featured .blog-card-body {
  padding: 28px;
  justify-content: center;
}

.blog-card.is-featured strong {
  font-size: 1.6rem;
}

.tag-pill {
  display: inline-block;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: .78rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.post-body {
  font-size: 1.04rem;
  line-height: 1.75;
  max-width: 740px;
}

.post-body h2 {
  margin-top: 1.8em;
}

.post-body ul,
.post-body ol {
  padding-left: 1.3em;
  margin-bottom: 1em;
  display: grid;
  gap: 6px;
}

.post-body code {
  background: var(--blue-50);
  color: var(--blue-700);
  padding: 1px 6px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: .88em;
}

/* ---------- back to top ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: var(--blue-600);
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 8px 22px rgba(35, 88, 214, .4);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s var(--ease), background-color .2s;
}

.to-top.show {
  opacity: 1;
  transform: none;
}

.to-top:hover {
  background: var(--blue-700);
}

/* ---------- tool-specific shared bits ---------- */
.swatch {
  width: 100%;
  height: 90px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.swatch-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.swatch-chip {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  background: #fff;
  text-align: center;
  font-family: var(--mono);
  font-size: .8rem;
  transition: transform .2s var(--ease);
}

.swatch-chip:hover {
  transform: translateY(-3px);
}

.swatch-chip i {
  display: block;
  height: 64px;
}

.swatch-chip span {
  display: block;
  padding: 6px 4px;
}

.file-list {
  display: grid;
  gap: 8px;
  list-style: none;
}

.file-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: .92rem;
}

.file-list li span {
  flex: 1;
  overflow-wrap: anywhere;
}

.file-list small {
  color: var(--muted);
}

.big-timer {
  font-family: var(--mono);
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  letter-spacing: .02em;
  padding: 18px 0;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tabs button {
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  color: var(--text);
  transition: all .2s;
}

.tabs button.on {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #fff;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}

.emoji-grid button {
  font-size: 1.6rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 0;
  cursor: pointer;
  transition: transform .15s var(--ease);
}

.emoji-grid button:hover {
  transform: scale(1.18);
  background: var(--blue-50);
}

.diff-add {
  background: #e7f6ee;
  color: var(--good);
}

.diff-del {
  background: #fdecea;
  color: var(--bad);
  text-decoration: line-through;
}

mark.m {
  background: #fff1a8;
  border-radius: 3px;
}

/* ---------- responsive (v2) ---------- */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

  .blog-card.is-featured {
    flex-direction: column;
  }

  .blog-card.is-featured .blog-thumb {
    flex: none;
    min-height: 150px;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 48px 0 52px;
  }

  .hero-stats {
    gap: 18px 30px;
  }

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

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .js .reveal,
  .js .stagger>* {
    opacity: 1;
    transform: none;
  }
}