:root {
  --paper: #f4f0e4;
  --ink: #18262d;
  --muted: #53646d;
  --panel: rgba(255, 252, 244, 0.88);
  --stroke: rgba(24, 38, 45, 0.14);
  --brand: #0a8d83;
  --brand-dark: #08635d;
  --accent: #e97f24;
  --good: #15643b;
  --bad: #8b1c1c;
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --paper: #151d22;
  --ink: #e4e8eb;
  --muted: #9aabb6;
  --panel: rgba(30, 40, 48, 0.92);
  --stroke: rgba(200, 220, 230, 0.12);
  --brand: #12c4b8;
  --brand-dark: #0fa89e;
  --accent: #f0953e;
  --good: #2db866;
  --bad: #e05555;
}
[data-theme="dark"] body {
  background:
    radial-gradient(circle at 9% 11%, rgba(18, 196, 184, 0.12), transparent 30%),
    radial-gradient(circle at 92% 0%, rgba(18, 196, 184, 0.08), transparent 34%),
    linear-gradient(165deg, #101820, #151d22 55%, #1a2530);
}
[data-theme="dark"] .texture {
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
}
[data-theme="dark"] .spotlight-card,
[data-theme="dark"] .related-card,
[data-theme="dark"] .tool-card,
[data-theme="dark"] .hero-stats div,
[data-theme="dark"] .hero-signal,
[data-theme="dark"] .checkbox-row,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .limit-card,
[data-theme="dark"] .preview-html,
[data-theme="dark"] .secondary-link,
[data-theme="dark"] .trust-pill,
[data-theme="dark"] .ad-slot,
[data-theme="dark"] .empty-state {
  background: rgba(30, 40, 48, 0.7);
}
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: rgba(20, 30, 38, 0.95);
  color: var(--ink);
}
[data-theme="dark"] .lang-dropdown {
  background: #1e2830;
}
[data-theme="dark"] .secondary-link:hover {
  background: rgba(30, 40, 48, 0.9);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}
html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: "Outfit", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 11%, rgba(247, 223, 128, 0.55), transparent 30%),
    radial-gradient(circle at 92% 0%, rgba(88, 214, 190, 0.38), transparent 34%),
    linear-gradient(165deg, #f7f3e6, #ece7d9 55%, #ece8db);
  padding: 18px;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), transparent 80%);
}

.site-header,
.site-footer,
.container {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
}

.header-link {
  color: #fff;
  text-decoration: none;
  background: linear-gradient(130deg, var(--brand), var(--brand-dark));
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.88rem;
}

/* Language Switcher */
.lang-switcher {
  position: relative;
  margin-left: 8px;
  display: none !important;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s;
}
.lang-btn:hover {
  border-color: var(--brand);
}
.lang-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 130px;
  z-index: 999;
  overflow: hidden;
}
.lang-dropdown.open {
  display: block;
}
.lang-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.1s;
}
.lang-dropdown button:hover {
  background: rgba(10,141,131,0.08);
}
.site-header {
  gap: 8px;
}

.container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 18px;
  max-width: 100%;
}
.hero.panel {
  overflow: hidden;
  backdrop-filter: blur(4px);
  animation: rise 440ms ease both;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4.5vw, 3.1rem);
  max-width: 100%;
  overflow-wrap: break-word;
}

.hero p {
  max-width: 66ch;
  color: var(--muted);
  line-height: 1.55;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: 18px;
  max-width: 100%;
  overflow: hidden;
  align-items: start;
  word-break: break-word;
}
.hero-copy, .hero-signal { min-width: 0; overflow: hidden; }

.hero-copy,
.hero-signal {
  display: grid;
  gap: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.secondary-link {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
}

.secondary-link:hover {
  background: rgba(255, 255, 255, 0.9);
}

.hero-kicker {
  margin: 0 0 8px;
  font-family: "Space Mono", monospace;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--brand-dark);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-stats div {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 10px;
}

.hero-stats span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-stats strong {
  font-size: 1.06rem;
}

.hero-signal {
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.64);
}

.hero-signal h2,
.tool-page-header h1 {
  margin-top: 0;
}

.hero-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: break-word;
}
.hero-list a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}
.hero-list a:hover {
  text-decoration: underline;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-pill {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--stroke);
  font-size: 0.82rem;
  color: var(--ink);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.trust-card h2,
.section-heading h2 {
  margin: 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.section-copy {
  margin: 0;
  color: var(--muted);
  max-width: 36ch;
  line-height: 1.55;
}

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

.spotlight-card {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.spotlight-card h3,
.spotlight-card p {
  margin: 0;
}

.spotlight-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.spotlight-card h3 a:hover {
  text-decoration: underline;
}

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

.related-card {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.68);
  border-radius: 16px;
  padding: 15px;
  display: grid;
  gap: 8px;
}

.related-card h3,
.related-card p {
  margin: 0;
}

.related-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.related-card h3 a:hover {
  text-decoration: underline;
}

.related-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.category-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chip {
  width: auto;
  border-radius: 999px;
  border: 1px solid rgba(10, 141, 131, 0.22);
  background: rgba(10, 141, 131, 0.08);
  color: var(--brand-dark);
  padding: 8px 12px;
  font-weight: 700;
  box-shadow: none;
  transform: none;
}

.category-chip:hover {
  box-shadow: none;
  transform: translateY(-1px);
}

.category-chip.active {
  background: linear-gradient(130deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.category-chip-reset {
  background: rgba(233, 127, 36, 0.08);
  border-color: rgba(233, 127, 36, 0.22);
  color: #7a3809;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 12px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.83rem;
}

input,
textarea,
select,
button {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 10px;
  font: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.95);
}

textarea {
  min-height: 180px;
  resize: vertical;
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
}

button {
  background: linear-gradient(130deg, var(--brand), var(--brand-dark));
  color: #fff;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(8, 99, 93, 0.25);
}

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

.tool-card {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.66);
  border-radius: 16px;
  padding: 18px;
  display: grid;
  gap: 8px;
  animation: rise 560ms ease both;
  transition: transform 0.22s cubic-bezier(0.16,1,0.3,1), box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}
/* Skip rendering off-screen tool cards for faster page loads */
.tool-card {
  content-visibility: auto;
  contain-intrinsic-size: 0 200px;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  border-color: var(--brand);
}
.tool-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  opacity: 0;
  transition: opacity 0.22s ease;
}
.tool-card:hover::before { opacity: 1; }

.tool-card-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 2px;
}

.tool-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.tool-card h3 a,
a.tool-card h3 {
  color: var(--brand);
  text-decoration: none;
}

.tool-card h3 a:hover,
a.tool-card:hover h3 {
  text-decoration: underline;
}

a.tool-card {
  color: var(--ink);
  text-decoration: none;
  display: block;
}

/* ── Inline Suggestions (below tool result, next to sidebar) ── */
.inline-suggestions {
  margin-top: 16px;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.suggestions-label {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 4px;
  padding: 0;
}
a.suggestion-card {
  display: flex !important;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--panel);
  text-decoration: none !important;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  color: var(--ink);
}
a.suggestion-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(10,141,131,0.12);
  transform: translateY(-2px);
}
a.suggestion-card strong {
  font-size: 0.9rem;
  color: var(--brand);
  display: block;
}
a.suggestion-card span {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  display: block;
}
@media (max-width: 600px) {
  .inline-suggestions { grid-template-columns: 1fr; }
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.pill {
  justify-self: start;
  font-size: 0.73rem;
  border-radius: 999px;
  background: rgba(10, 141, 131, 0.12);
  color: var(--brand-dark);
  border: 1px solid rgba(10, 141, 131, 0.27);
  padding: 3px 8px;
}

.card-cta {
  justify-self: start;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(130deg, var(--accent), #bf5b14);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.83rem;
  font-weight: 700;
}

.empty-state,
.ad-slot {
  border: 1px dashed var(--stroke);
  border-radius: 14px;
  padding: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
}

.ad-slot-live {
  border-style: solid;
  background: rgba(255, 255, 255, 0.82);
}

.ad-slot-label {
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.fasttool-ad {
  min-height: 120px;
}

.fasttool-ad-sidebar {
  min-height: 250px;
}

.site-footer {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.site-footer-nav a,
.prose-content a {
  color: var(--brand-dark);
  text-decoration: none;
}

.site-footer-nav a:hover,
.prose-content a:hover {
  text-decoration: underline;
}

.prose-page h1 {
  margin-top: 0;
}

.prose-content {
  color: var(--muted);
  line-height: 1.65;
}

.prose-content h2 {
  color: var(--ink);
  margin-top: 1.4rem;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 320px;
  gap: 12px;
}

.tool-page-header {
  margin-bottom: 12px;
}

.tool-page-header p {
  color: var(--muted);
}

.workbench,
.result,
.sidebar {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px;
}
.sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
}

.workbench {
  display: grid;
  gap: 10px;
}

.result {
  margin-top: 12px;
}

.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 8px;
}

.checkbox-row input {
  width: auto;
}

.result-box {
  border-radius: 12px;
  padding: 12px;
  line-height: 1.45;
}

.result-box.info {
  background: rgba(8, 99, 93, 0.08);
  border: 1px solid rgba(8, 99, 93, 0.25);
}

.result-box.success {
  background: rgba(21, 100, 59, 0.1);
  border: 1px solid rgba(21, 100, 59, 0.26);
}

.result-box.error {
  background: rgba(139, 28, 28, 0.1);
  border: 1px solid rgba(139, 28, 28, 0.28);
}

.result-box pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.84rem;
}

/* ── Key Features & FAQ Section ── */
/* These sections are below the fold; skip rendering until scrolled into view */
[data-tool-meta="static"] {
  display: grid; gap: 0;
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}
[data-tool-meta="static"] h2 {
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--brand-dark);
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(10,141,131,0.15);
}
[data-tool-meta="static"] h2:first-child { margin-top: 0; }

[data-tool-meta="static"] ul {
  list-style: none;
  padding: 0; margin: 0;
  display: grid; gap: 6px;
}
[data-tool-meta="static"] li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(10,141,131,0.05);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  font-size: 0.9rem;
}
[data-tool-meta="static"] li::before {
  content: "\2713";
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(10,141,131,0.15);
  color: var(--brand);
  font-size: 0.72rem; font-weight: 700;
}
[data-tool-meta="static"] li:hover {
  background: rgba(10,141,131,0.1);
  border-color: rgba(10,141,131,0.2);
}

[data-tool-meta="static"] details {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color 0.2s;
}
[data-tool-meta="static"] details:hover {
  border-color: var(--brand);
}
[data-tool-meta="static"] details[open] {
  border-color: var(--brand);
  background: rgba(10,141,131,0.03);
}
[data-tool-meta="static"] summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  display: flex; align-items: center; gap: 10px;
  list-style: none;
  transition: background 0.15s;
}
[data-tool-meta="static"] summary::-webkit-details-marker { display: none; }
[data-tool-meta="static"] summary::before {
  content: "+";
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 8px;
  background: rgba(10,141,131,0.12);
  color: var(--brand);
  font-size: 1rem; font-weight: 700;
  transition: transform 0.25s ease, background 0.2s;
}
[data-tool-meta="static"] details[open] summary::before {
  content: "\2212";
  background: var(--brand);
  color: #fff;
  transform: rotate(180deg);
}
[data-tool-meta="static"] summary:hover {
  background: rgba(10,141,131,0.06);
}
[data-tool-meta="static"] details p {
  padding: 0 16px 14px 50px;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ── Pro Tips Box ── */
[data-tool-meta="static"] .pro-tips {
  background: linear-gradient(135deg, rgba(10,141,131,0.06) 0%, rgba(10,141,131,0.02) 100%);
  border: 1px solid rgba(10,141,131,0.15);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  padding: 20px 20px 12px;
  margin: 8px 0;
}
[data-tool-meta="static"] .pro-tips h2 {
  font-size: 1.05rem;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  color: var(--brand);
}
[data-tool-meta="static"] .pro-tips ul {
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
[data-tool-meta="static"] .pro-tips li {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(10,141,131,0.1);
}
[data-tool-meta="static"] .pro-tips li::before {
  content: "\1F4A1";
  margin-right: 8px;
}

/* ── Did You Know Box ── */
[data-tool-meta="static"] .did-you-know {
  background: linear-gradient(135deg, rgba(59,130,246,0.06) 0%, rgba(59,130,246,0.02) 100%);
  border: 1px solid rgba(59,130,246,0.15);
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  padding: 20px;
  margin: 8px 0;
}
[data-tool-meta="static"] .did-you-know h2 {
  font-size: 1.05rem;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  color: #3b82f6;
}
[data-tool-meta="static"] .did-you-know p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 8px;
  padding-left: 24px;
  position: relative;
}
[data-tool-meta="static"] .did-you-know p::before {
  content: "\2139\FE0F";
  position: absolute;
  left: 0;
}
[data-tool-meta="static"] .did-you-know p:last-child { margin-bottom: 0; }

/* ── Tool Examples ── */
[data-tool-meta="static"] .tool-examples {
  display: grid;
  gap: 12px;
  margin: 8px 0;
}
.tool-example {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  overflow: hidden;
}
.tool-example summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.tool-example summary::-webkit-details-marker { display: none; }
.tool-example summary::before {
  content: "\25B6";
  font-size: 0.65rem;
  color: var(--brand);
  transition: transform 0.2s;
}
.tool-example[open] summary::before { transform: rotate(90deg); }
.tool-example[open] { border-color: var(--brand); }
.example-body {
  padding: 0 16px 14px;
}
.example-io {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}
.example-io .io-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.example-io .io-block {
  background: rgba(10,141,131,0.04);
  border: 1px solid rgba(10,141,131,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
}
.example-io .io-block.input-block {
  background: rgba(59,130,246,0.05);
  border-color: rgba(59,130,246,0.15);
}
.example-io .io-block.output-block {
  background: rgba(16,185,129,0.05);
  border-color: rgba(16,185,129,0.15);
}
.example-io .io-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--brand);
  padding-top: 18px;
}
.example-explanation {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted);
  font-style: italic;
  margin: 0;
  padding-left: 4px;
  border-left: 2px solid rgba(10,141,131,0.2);
  padding: 4px 0 4px 12px;
}
@media (max-width: 600px) {
  .example-io {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .example-io .io-arrow {
    transform: rotate(90deg);
    padding: 0;
  }
}
/* ── Tool Article / Deep Dive ── */
[data-tool-meta="static"] .tool-article {
  background: linear-gradient(135deg, rgba(139,92,246,0.04) 0%, rgba(139,92,246,0.01) 100%);
  border: 1px solid rgba(139,92,246,0.12);
  border-left: 4px solid #8b5cf6;
  border-radius: 12px;
  padding: 20px;
  margin: 8px 0;
}
[data-tool-meta="static"] .tool-article h2 {
  font-size: 1.05rem;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  color: #8b5cf6;
}
[data-tool-meta="static"] .tool-article p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 10px;
}
[data-tool-meta="static"] .tool-article p:last-child { margin-bottom: 0; }

/* Dark mode for examples & article */
[data-theme="dark"] .tool-example { border-color: var(--stroke); }
[data-theme="dark"] .tool-example[open] { border-color: var(--brand); }
[data-theme="dark"] .example-io .io-block { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .example-io .io-block.input-block { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.2); }
[data-theme="dark"] .example-io .io-block.output-block { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.2); }
[data-theme="dark"] [data-tool-meta="static"] .tool-article {
  background: linear-gradient(135deg, rgba(139,92,246,0.1) 0%, rgba(139,92,246,0.03) 100%);
  border-color: rgba(139,92,246,0.2);
}

/* ── Comparison Table ── */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  font-size: 0.85rem;
  margin: 8px 0;
}
.comparison-table thead {
  background: var(--brand);
  color: #fff;
}
.comparison-table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.comparison-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--stroke);
  line-height: 1.45;
}
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:nth-child(even) { background: rgba(10,141,131,0.03); }
.comparison-table tbody tr:hover { background: rgba(10,141,131,0.06); }
.comparison-table td:first-child { font-weight: 500; }

/* ── Glossary / Key Concepts ── */
[data-tool-meta="static"] .glossary {
  display: grid;
  gap: 4px;
  margin: 0;
}
[data-tool-meta="static"] .glossary dt {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  padding: 12px 14px 0;
  margin: 0;
}
[data-tool-meta="static"] .glossary dd {
  font-size: 0.87rem;
  line-height: 1.6;
  color: var(--muted);
  padding: 4px 14px 12px;
  margin: 0;
  border-bottom: 1px solid var(--stroke);
}
[data-tool-meta="static"] .glossary dd:last-child { border-bottom: none; }

/* ── Ordered list styling for steps ── */
[data-tool-meta="static"] ol {
  padding: 0;
  margin: 0;
  counter-reset: step;
  list-style: none;
  display: grid;
  gap: 6px;
}
[data-tool-meta="static"] ol li {
  counter-increment: step;
  padding: 10px 12px 10px 44px;
  position: relative;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  display: block;
}
[data-tool-meta="static"] ol li::before {
  content: counter(step);
  position: absolute;
  left: 10px;
  top: 9px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ── Dark mode adjustments for new sections ── */
[data-theme="dark"] [data-tool-meta="static"] .pro-tips {
  background: linear-gradient(135deg, rgba(10,141,131,0.12) 0%, rgba(10,141,131,0.04) 100%);
  border-color: rgba(10,141,131,0.25);
}
[data-theme="dark"] [data-tool-meta="static"] .pro-tips li {
  background: rgba(255,255,255,0.04);
  border-color: rgba(10,141,131,0.15);
}
[data-theme="dark"] [data-tool-meta="static"] .did-you-know {
  background: linear-gradient(135deg, rgba(59,130,246,0.12) 0%, rgba(59,130,246,0.04) 100%);
  border-color: rgba(59,130,246,0.25);
}
[data-theme="dark"] .comparison-table { border-color: var(--stroke); }
[data-theme="dark"] .comparison-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .comparison-table tbody tr:hover { background: rgba(10,141,131,0.1); }
[data-theme="dark"] [data-tool-meta="static"] ol li {
  background: rgba(255,255,255,0.04);
}

.helper-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.88rem;
}

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

.stat-card {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.67);
  padding: 9px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.stat-card strong {
  font-size: 1.05rem;
}

.limit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.limit-card {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.limit-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.limit-card.good {
  border-color: rgba(21, 100, 59, 0.26);
  background: rgba(21, 100, 59, 0.08);
}

.limit-card.warn {
  border-color: rgba(233, 127, 36, 0.32);
  background: rgba(233, 127, 36, 0.08);
}

.limit-card.over {
  border-color: rgba(139, 28, 28, 0.3);
  background: rgba(139, 28, 28, 0.08);
}

.preview-html {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  margin: 8px 0;
  padding: 10px;
}

.preview-html p,
.preview-html ul,
.preview-html h1,
.preview-html h2,
.preview-html h3 {
  margin-top: 0;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.palette-block {
  min-height: 78px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  font-family: "Space Mono", monospace;
  color: #111;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.sidebar h3 {
  margin-top: 0;
}

.sidebar ul {
  margin: 0;
  padding-left: 17px;
  line-height: 1.45;
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--brand) transparent;
}
.sidebar ul::-webkit-scrollbar { width: 5px; }
.sidebar ul::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 4px; }
.sidebar ul::-webkit-scrollbar-track { background: transparent; }

.sidebar a {
  color: var(--brand-dark);
}

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

@media (max-width: 920px) {
  .filters,
  .hero-stats,
  .tool-layout,
  .checkbox-grid,
  .hero-layout,
  .trust-grid,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Theme Toggle ── */
.theme-toggle {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  width: 36px; height: 36px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s;
  margin-left: 4px;
}
.theme-toggle:hover { border-color: var(--brand); transform: none; box-shadow: none; }
.theme-toggle svg { width: 18px; height: 18px; stroke: var(--ink); }

/* ── Card Hover Effects ── */
.tool-card, .spotlight-card, .related-card {
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.tool-card:hover, .spotlight-card:hover, .related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .tool-card:hover,
[data-theme="dark"] .spotlight-card:hover,
[data-theme="dark"] .related-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ── Focus Styles (WCAG AA) ── */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10, 141, 131, 0.15);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
}

/* ── Button Press ── */
button:active { transform: translateY(1px) scale(0.98); box-shadow: none; }

/* ── Toast Notifications ── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column-reverse; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--ink); color: var(--paper);
  padding: 10px 18px; border-radius: 12px;
  font-size: 0.88rem; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  animation: toast-in 300ms ease forwards;
  pointer-events: auto;
}
.toast.toast-out { animation: toast-out 250ms ease forwards; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

/* ── Back to Top ── */
.back-to-top {
  position: fixed; bottom: 24px; left: 24px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(130deg, var(--brand), var(--brand-dark));
  color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(8,99,93,0.3);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 999; padding: 0;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(8,99,93,0.4); }
.back-to-top svg { width: 20px; height: 20px; }

/* ── Social Proof ── */
.social-proof { text-align: center; }
.proof-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 12px; margin-bottom: 16px;
}
.proof-stat { padding: 14px 8px; }
.proof-stat strong {
  display: block; font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--brand); font-weight: 800;
}
.proof-stat span { font-size: 0.84rem; color: var(--muted); }
.proof-badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.proof-badge {
  background: linear-gradient(130deg, rgba(10,141,131,0.1), rgba(10,141,131,0.05));
  border: 1px solid rgba(10,141,131,0.2);
  border-radius: 999px; padding: 8px 16px;
  font-size: 0.84rem; font-weight: 600; color: var(--brand-dark);
}

/* ── Popularity Badges ── */
.badge-pill {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  border-radius: 999px; padding: 2px 8px; margin-left: 6px;
  vertical-align: middle;
}
.badge-popular {
  background: linear-gradient(130deg, rgba(10,141,131,0.15), rgba(10,141,131,0.08));
  color: var(--brand-dark); border: 1px solid rgba(10,141,131,0.25);
}
.badge-new {
  background: linear-gradient(130deg, rgba(233,127,36,0.15), rgba(233,127,36,0.08));
  color: #93440c; border: 1px solid rgba(233,127,36,0.25);
}
.badge-trending {
  background: linear-gradient(130deg, rgba(139,92,246,0.15), rgba(139,92,246,0.08));
  color: #5b21b6; border: 1px solid rgba(139,92,246,0.25);
}
[data-theme="dark"] .badge-new { color: var(--accent); }
[data-theme="dark"] .badge-trending { color: #a78bfa; }
[data-theme="dark"] .category-chip-reset { color: #f0953e; }

/* ── Keyboard Hint ── */
.shortcut-hint {
  margin: 8px 0 0; font-size: 0.78rem; color: var(--muted); opacity: 0.7;
}
.shortcut-hint kbd {
  background: var(--panel); border: 1px solid var(--stroke);
  border-radius: 4px; padding: 1px 5px; font-size: 0.75rem;
  font-family: "Space Mono", monospace;
}

/* ── Mobile: 768px ── */
@media (max-width: 768px) {
  body { padding: 12px; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .spotlight-grid, .related-grid { grid-template-columns: 1fr 1fr; }
  .panel { padding: 14px; border-radius: 16px; }
  button, .card-cta, .header-link, .secondary-link, .lang-btn, .theme-toggle {
    min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  }
  input, textarea, select { min-height: 44px; font-size: 16px; }
  .sidebar ul { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
  .sidebar.expanded ul { max-height: 2000px; }
  .sidebar h3 { cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
  .sidebar h3::after { content: "+"; font-size: 1.2rem; color: var(--muted); transition: transform 0.2s; }
  .sidebar.expanded h3::after { content: "\2212"; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile: 640px ── */
@media (max-width: 640px) {
  .spotlight-grid, .related-grid, .tool-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .header-link, .hero-actions .secondary-link { text-align: center; }
  .trust-strip { justify-content: center; flex-wrap: wrap; }
  .hero-copy h1 { font-size: 1.5rem; line-height: 1.25; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .category-chip-row { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .category-chip { flex-shrink: 0; }
  .actions { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .back-to-top { bottom: 16px; left: 16px; width: 38px; height: 38px; }
  .toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { text-align: center; }
}

/* ── Small Mobile: 480px ── */
@media (max-width: 480px) {
  body { padding: 8px; }
  .container { overflow-x: hidden; }
  .hero h1, .hero-copy h1 { font-size: 1.25rem; line-height: 1.25; word-break: break-word; }
  .hero-copy p { font-size: 0.85rem; }
  .hero-kicker { font-size: 0.65rem; }
  .site-header { flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
  .site-header .header-link { font-size: 0.82rem; padding: 6px 14px; }
  .hero-layout { gap: 12px; }
  .hero-signal { padding: 12px; }
  .hero-signal h2 { font-size: 1rem; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .hero-stats > div { padding: 8px; }
  .hero-stats span { font-size: 0.68rem; }
  .hero-stats strong { font-size: 1rem; }
  .hero-list { font-size: 0.85rem; padding-left: 16px; line-height: 1.5; }
  .trust-pill { font-size: 0.72rem; padding: 5px 8px; }
  .panel { padding: 12px; }
  .filters { gap: 8px; }
  .tool-card { padding: 12px; }
  .tool-card-icon { font-size: 1.6rem; }
  .tool-card h3 { font-size: 0.95rem; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .proof-number { font-size: 1.8rem; }
  .trust-grid { grid-template-columns: 1fr; }
  .history-panel { width: calc(100vw - 32px); right: 16px; }
  .cmd-palette { width: calc(100vw - 24px); }
  .cmd-hint { display: none; }
  .actions { grid-template-columns: 1fr; }
}

/* ── Command Palette (Cmd+K) ── */
.cmd-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 18vh;
  animation: cmd-fade-in 150ms ease;
}
.cmd-overlay.closing { animation: cmd-fade-out 120ms ease forwards; }
@keyframes cmd-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmd-fade-out { from { opacity: 1; } to { opacity: 0; } }

.cmd-palette {
  width: min(560px, 92vw);
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: cmd-slide-in 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cmd-slide-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cmd-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--stroke);
}
.cmd-input-wrap svg { width: 20px; height: 20px; stroke: var(--muted); flex-shrink: 0; }
.cmd-input {
  flex: 1; border: none; background: none; outline: none;
  font: inherit; font-size: 1.05rem; color: var(--ink);
}
.cmd-input::placeholder { color: var(--muted); }
.cmd-kbd {
  font-family: "Space Mono", monospace; font-size: 0.72rem;
  background: var(--stroke); border-radius: 4px;
  padding: 2px 6px; color: var(--muted);
}
.cmd-results {
  max-height: 340px; overflow-y: auto;
  padding: 6px;
}
.cmd-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  cursor: pointer; transition: background 100ms;
  text-decoration: none; color: var(--ink);
}
.cmd-item:hover, .cmd-item.active {
  background: rgba(10,141,131,0.1);
}
.cmd-item-name { font-weight: 600; font-size: 0.95rem; }
.cmd-item-cat { font-size: 0.78rem; color: var(--muted); margin-left: auto; }
.cmd-item .badge-pill { font-size: 0.62rem; }
.cmd-empty {
  padding: 24px; text-align: center; color: var(--muted);
}
.cmd-footer {
  display: flex; gap: 14px; padding: 10px 18px;
  border-top: 1px solid var(--stroke);
  font-size: 0.75rem; color: var(--muted);
}
.cmd-footer kbd {
  background: var(--stroke); border-radius: 3px;
  padding: 1px 5px; font-family: "Space Mono", monospace;
}
.cmd-hint {
  position: fixed; bottom: 72px; left: 24px;
  background: var(--panel); border: 1px solid var(--stroke);
  border-radius: 10px; padding: 6px 12px;
  font-size: 0.78rem; color: var(--muted);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 998;
  animation: cmd-fade-in 500ms ease 2s both;
}
.cmd-hint kbd {
  background: var(--stroke); border-radius: 3px;
  padding: 1px 5px; font-family: "Space Mono", monospace; font-size: 0.72rem;
}

/* ── Session History Panel ── */
.history-toggle {
  position: fixed; bottom: 24px; right: 72px;
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(130deg, var(--accent), #bf5b14);
  color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(191,91,20,0.3);
  z-index: 999; padding: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.history-toggle:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(191,91,20,0.4); }
.history-toggle svg { width: 20px; height: 20px; }
.history-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--bad); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.history-panel {
  position: fixed; bottom: 80px; right: 24px;
  width: min(380px, 88vw); max-height: 420px;
  background: var(--panel); border: 1px solid var(--stroke);
  border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,0.2);
  z-index: 9998; overflow: hidden;
  animation: cmd-slide-in 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.history-panel.hidden { display: none; }
.history-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--stroke);
  font-weight: 700;
}
.history-header button {
  width: auto; background: none; border: 1px solid var(--stroke);
  border-radius: 8px; padding: 4px 10px; font-size: 0.78rem;
  color: var(--muted); cursor: pointer;
}
.history-list {
  max-height: 340px; overflow-y: auto; padding: 8px;
}
.history-entry {
  display: grid; gap: 4px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer; transition: background 100ms;
  margin-bottom: 4px;
}
.history-entry:hover {
  background: rgba(10,141,131,0.06);
  border-color: var(--stroke);
}
.history-entry-tool {
  font-size: 0.78rem; font-weight: 700; color: var(--brand);
}
.history-entry-value {
  font-family: "Space Mono", monospace; font-size: 0.8rem;
  color: var(--ink); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 100%;
}
.history-entry-time {
  font-size: 0.7rem; color: var(--muted);
}

/* ── Smart Paste Banner ── */
.smart-paste-banner {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(130deg, var(--brand), var(--brand-dark));
  color: #fff; padding: 10px 20px; border-radius: 14px;
  box-shadow: 0 8px 28px rgba(8,99,93,0.35);
  z-index: 10001; display: flex; align-items: center; gap: 12px;
  font-size: 0.9rem; font-weight: 600;
  animation: cmd-slide-in 250ms cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 92vw;
}
.smart-paste-banner a {
  color: #fff; text-decoration: underline; font-weight: 700;
}
.smart-paste-banner .close-btn {
  background: rgba(255,255,255,0.2); border: none; color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.9rem; padding: 0;
}

/* ── Share Button ── */
.share-btn {
  width: auto; background: none; border: 1px solid var(--stroke);
  border-radius: 10px; padding: 6px 12px;
  color: var(--muted); font-size: 0.82rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.share-btn:hover { border-color: var(--brand); color: var(--brand); transform: none; box-shadow: none; }
.share-btn svg { width: 14px; height: 14px; }

/* ── Timer/Counter Stability ── */
.timer-display, .stopwatch-display, .countdown-display {
  font-family: "Space Mono", monospace !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  min-width: 8ch;
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
}

/* ── Fullscreen Tool Mode ── */
.fullscreen-btn {
  width: auto; background: none; border: 1px solid var(--stroke);
  border-radius: 10px; padding: 6px 12px;
  color: var(--muted); font-size: 0.82rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.fullscreen-btn:hover { border-color: var(--brand); color: var(--brand); transform: none; box-shadow: none; }
.fullscreen-btn svg { width: 14px; height: 14px; }

body.tool-fullscreen .site-header,
body.tool-fullscreen .site-footer,
body.tool-fullscreen .tool-page-header,
body.tool-fullscreen .sidebar,
body.tool-fullscreen .related-tools,
body.tool-fullscreen .related-articles,
body.tool-fullscreen [data-tool-meta] {
  display: none !important;
}
body.tool-fullscreen .container { max-width: 100%; padding: 8px; }
body.tool-fullscreen .tool-layout { grid-template-columns: 1fr !important; }
body.tool-fullscreen .workbench { min-height: 80vh; }
body.tool-fullscreen .texture { display: none; }
body.tool-fullscreen { padding: 0; }

/* ── Twitter Share Button ── */
.twitter-share-btn {
  width: auto; background: #000; color: #fff;
  border: none; border-radius: 10px; padding: 8px 14px;
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px;
  transition: background 0.15s, transform 0.12s;
}
.twitter-share-btn:hover { background: #1a1a1a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.twitter-share-btn svg { flex-shrink: 0; }

/* ── Rate Tool ── */
.rate-tool-wrap {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--stroke);
}
.rate-label {
  font-size: 0.82rem; color: var(--muted); font-weight: 600;
}
.rate-btn {
  width: auto; background: none; border: 1px solid var(--stroke);
  border-radius: 8px; padding: 5px 8px;
  cursor: pointer; display: inline-flex; align-items: center;
  color: var(--muted); transition: border-color 0.15s, color 0.15s;
}
.rate-btn:hover { border-color: var(--brand); color: var(--brand); transform: none; box-shadow: none; }
.rate-btn.voted { opacity: 0.5; cursor: default; }
.rate-btn.voted:hover { border-color: var(--stroke); color: var(--muted); }
.rate-count {
  font-size: 0.78rem; color: var(--muted); font-weight: 600; min-width: 1ch;
}

/* ── Share Friends Banner ── */
.share-friends-banner {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(130deg, var(--accent), #bf5b14);
  color: #fff; padding: 12px 20px; border-radius: 14px;
  box-shadow: 0 8px 28px rgba(191,91,20,0.35);
  z-index: 10001; display: flex; align-items: center; gap: 12px;
  font-size: 0.9rem; font-weight: 600;
  animation: cmd-slide-in 250ms cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 92vw;
}
.share-friends-banner.closing { animation: cmd-fade-out 300ms ease forwards; }
.share-friends-btn {
  width: auto; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4);
  border-radius: 8px; padding: 6px 14px; color: #fff;
  font-weight: 700; cursor: pointer; font-size: 0.82rem;
}
.share-friends-btn:hover { background: rgba(255,255,255,0.3); transform: none; box-shadow: none; }
.share-friends-banner .close-btn {
  background: rgba(255,255,255,0.2); border: none; color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.9rem; padding: 0;
}

/* ── Blog Styles ── */
.prose-content h2 { margin-top: 1.8rem; }
.prose-content p { margin-bottom: 1rem; }

/* ── Monthly Users Counter ── */
.proof-users-note {
  font-size: 0.7rem; color: var(--muted); opacity: 0.7;
  display: block; margin-top: 2px;
}

/* ── Skip to Content (Accessibility) ── */
.skip-to-content {
  position: absolute; top: -100%; left: 16px;
  background: var(--brand); color: #fff;
  padding: 8px 16px; border-radius: 0 0 8px 8px;
  font-weight: 600; font-size: 0.9rem;
  z-index: 10000; text-decoration: none;
  transition: top 0.2s;
}
.skip-to-content:focus {
  top: 0;
}

/* ── How It Works Section ── */
.how-it-works-section { text-align: center; }
.hiw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}
.hiw-step {
  position: relative;
  padding: 32px 24px 28px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--panel);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.hiw-step:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.hiw-icon {
  display: block;
  font-size: 2.4rem;
  margin-bottom: 8px;
  line-height: 1;
}
.hiw-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(130deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.hiw-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}
.hiw-step p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* ── Why Choose Section ── */
.why-choose-section { text-align: center; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
  text-align: left;
}
.why-card {
  padding: 28px 24px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--panel);
  transition: transform 0.2s, box-shadow 0.2s;
}
.why-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.why-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
}
.why-card p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

/* ── Testimonials Section ── */
.testimonials-section { text-align: center; }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
  text-align: left;
}
.testimonial-card {
  padding: 28px 24px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.testimonial-card blockquote {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ink);
  font-style: italic;
}
.testimonial-card footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
}
.testimonial-card footer strong {
  font-size: 0.9rem;
  color: var(--ink);
}
.testimonial-card footer span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Stats Bar ── */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 20px 24px;
  margin: 8px 0 24px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--panel);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.stats-bar span[aria-hidden] {
  color: var(--muted);
  opacity: 0.5;
}

/* ── Dark mode for editorial sections ── */
[data-theme="dark"] .hiw-step,
[data-theme="dark"] .why-card,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .stats-bar {
  background: rgba(30, 40, 48, 0.7);
}
[data-theme="dark"] .hiw-step:hover,
[data-theme="dark"] .why-card:hover,
[data-theme="dark"] .testimonial-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ── Editorial sections responsive ── */
@media (max-width: 900px) {
  .hiw-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Last Updated Date ── */
.last-updated {
  font-size: 0.78rem;
  color: var(--muted);
  margin: -8px 0 12px;
}
.last-updated time { font-weight: 500; }

/* ── Contextual Links ── */
.contextual-links {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0.5rem;
}
.contextual-links a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.contextual-links a:hover {
  color: var(--brand-dark);
}

/* ── Tool Tabs ── */
.tool-tabs { margin-top: 16px; }

.tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--stroke);
  padding-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  width: auto;
  padding: 10px 18px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  font-family: inherit;
  border-radius: 0;
}

.tab-btn:hover { color: var(--ink); }
.tab-btn.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

.tab-panel { display: none; padding: 20px 0; }
.tab-panel.active { display: block; }

@media (max-width: 600px) {
  .tab-btn { padding: 8px 14px; font-size: 0.82rem; }
}

/* ── Related Articles ── */
.related-articles {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  content-visibility: auto;
  contain-intrinsic-size: 0 300px;
}
.related-articles h2 {
  font-size: 1.1rem;
  margin: 0 0 12px;
  font-weight: 600;
}
.related-articles ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-articles li a {
  color: var(--brand);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: opacity 0.2s;
}
.related-articles li a:hover { opacity: 0.8; text-decoration: underline; }

/* ── Contact Form ── */
.contact-intro {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.contact-response-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 141, 131, 0.08);
  border: 1px solid rgba(10, 141, 131, 0.2);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 2rem;
  font-size: 0.92rem;
  color: var(--ink);
}
.contact-response-icon {
  font-size: 1.2rem;
}
[data-theme="dark"] .contact-response-note {
  background: rgba(18, 196, 184, 0.1);
  border-color: rgba(18, 196, 184, 0.2);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.contact-form-group {
  display: flex;
  flex-direction: column;
}

.contact-form-group label {
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--ink);
}

.contact-required {
  color: var(--bad);
}

.contact-form-group input,
.contact-form-group select,
.contact-form-group textarea {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
[data-theme="dark"] .contact-form-group input,
[data-theme="dark"] .contact-form-group select,
[data-theme="dark"] .contact-form-group textarea {
  background: rgba(20, 30, 38, 0.95);
}

.contact-form-group input:focus,
.contact-form-group select:focus,
.contact-form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10, 141, 131, 0.12);
}

.contact-form-group textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
}

.contact-form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2353646d' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Validation error states */
.contact-error {
  display: block;
  font-size: 0.8rem;
  color: var(--bad);
  margin-top: 4px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 200ms ease, max-height 200ms ease;
}
.contact-error-visible {
  opacity: 1;
  max-height: 2rem;
}

.contact-invalid {
  border-color: var(--bad) !important;
  box-shadow: 0 0 0 3px rgba(139, 28, 28, 0.1) !important;
}
[data-theme="dark"] .contact-invalid {
  box-shadow: 0 0 0 3px rgba(224, 85, 85, 0.15) !important;
}

/* Submit button */
.contact-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  align-self: flex-start;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  background: linear-gradient(130deg, var(--brand), var(--brand-dark));
  color: #fff;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.contact-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(8, 99, 93, 0.3);
}
.contact-submit-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: none;
}
.contact-btn-icon {
  font-size: 1.1rem;
}
.contact-btn-success {
  background: linear-gradient(130deg, var(--good), #1a8a4a) !important;
}

.contact-form-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: -0.5rem;
  line-height: 1.5;
}

/* Divider */
.contact-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 2.5rem 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contact-divider::before,
.contact-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--stroke);
}

/* Direct email section */
.contact-direct-email {
  text-align: center;
  margin-bottom: 2.5rem;
}
.contact-direct-email h2 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}
.contact-direct-email p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}
.contact-email-link {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  padding: 8px 20px;
  border: 2px solid var(--brand);
  border-radius: 10px;
  transition: background 200ms ease, color 200ms ease;
}
.contact-email-link:hover {
  background: var(--brand);
  color: #fff;
}

/* FAQ section */
.contact-faq {
  margin-top: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--stroke);
}
.contact-faq h2 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}
.contact-faq > p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.contact-faq-item {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 200ms ease;
}
.contact-faq-item[open] {
  border-color: var(--brand);
}
.contact-faq-item summary {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.contact-faq-item summary::-webkit-details-marker {
  display: none;
}
.contact-faq-item summary::before {
  content: '\25B6';
  font-size: 0.65rem;
  color: var(--brand);
  transition: transform 200ms ease;
}
.contact-faq-item[open] summary::before {
  transform: rotate(90deg);
}
.contact-faq-item p {
  padding: 0 18px 14px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}
.contact-faq-item a {
  color: var(--brand);
}

/* Responsive */
@media (max-width: 640px) {
  .contact-form-row {
    grid-template-columns: 1fr;
  }
  .contact-submit-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Newsletter Section ── */
.newsletter-section {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(135deg, rgba(10,141,131,0.06), rgba(10,141,131,0.02));
  border-top: 1px solid var(--stroke);
  margin-top: 32px;
}
.newsletter-section h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}
.newsletter-section p {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 0.92rem;
}
.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  font-size: 0.95rem;
  background: var(--panel);
  color: var(--ink);
}
.newsletter-form button {
  padding: 12px 24px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.newsletter-form button:hover { opacity: 0.9; }
@media (max-width: 500px) {
  .newsletter-form { flex-direction: column; }
}
[data-theme="dark"] .newsletter-section {
  background: linear-gradient(135deg, rgba(10,141,131,0.1), rgba(10,141,131,0.03));
}

/* ── Breadcrumb Navigation ── */
.breadcrumb {
  padding: 8px 0;
  margin-bottom: 4px;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
  font-size: 0.82rem;
}
.breadcrumb li + li::before {
  content: "\203A";
  margin-right: 4px;
  color: var(--muted);
}
.breadcrumb a {
  color: var(--brand);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] {
  color: var(--muted);
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Print Stylesheet ── */
@media print {
  .site-header, .site-footer, .sidebar, .ad-slot,
  .tab-nav, .skip-to-content, .skip-link, .breadcrumb, .related-tools, .related-articles,
  .share-banner, .power-features, .cookie-banner { display: none !important; }
  .tab-panel { display: block !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
  .tool-tabs { border: none; }
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATION SYSTEMS & MICRO-INTERACTIONS
   Added: 2026-04-04
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Fade-In-Up Animation ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease-out both; }

/* ── 2. Staggered Tool Card Reveal ── */
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.tool-grid .tool-card { animation: cardReveal 0.5s ease-out both; }
.tool-grid .tool-card:nth-child(1)  { animation-delay: 0.00s; }
.tool-grid .tool-card:nth-child(2)  { animation-delay: 0.05s; }
.tool-grid .tool-card:nth-child(3)  { animation-delay: 0.10s; }
.tool-grid .tool-card:nth-child(4)  { animation-delay: 0.15s; }
.tool-grid .tool-card:nth-child(5)  { animation-delay: 0.20s; }
.tool-grid .tool-card:nth-child(6)  { animation-delay: 0.25s; }
.tool-grid .tool-card:nth-child(7)  { animation-delay: 0.30s; }
.tool-grid .tool-card:nth-child(8)  { animation-delay: 0.35s; }
.tool-grid .tool-card:nth-child(9)  { animation-delay: 0.40s; }
.tool-grid .tool-card:nth-child(10) { animation-delay: 0.45s; }
.tool-grid .tool-card:nth-child(11) { animation-delay: 0.50s; }
.tool-grid .tool-card:nth-child(12) { animation-delay: 0.55s; }

/* ── 3. Hero Section Animations ── */

/* Floating gradient orbs */
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(30px, -20px) scale(1.05); }
  50%      { transform: translate(-15px, -35px) scale(0.95); }
  75%      { transform: translate(-25px, 10px) scale(1.03); }
}
@keyframes floatOrbAlt {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(-20px, 15px) scale(1.04); }
  50%      { transform: translate(25px, 30px) scale(0.97); }
  75%      { transform: translate(15px, -20px) scale(1.02); }
}
.hero.panel {
  position: relative;
  z-index: 1;
}
.hero.panel::before,
.hero.panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(60px);
  opacity: 0.35;
  will-change: transform;
}
.hero.panel::before {
  width: 280px; height: 280px;
  top: -60px; left: -40px;
  background: radial-gradient(circle, var(--brand), transparent 70%);
  animation: floatOrb 8s ease-in-out infinite;
}
.hero.panel::after {
  width: 220px; height: 220px;
  bottom: -50px; right: -30px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  animation: floatOrbAlt 10s ease-in-out infinite;
}

/* Hero h1 text reveal */
@keyframes heroTextReveal {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-copy h1 {
  animation: heroTextReveal 0.4s ease-out forwards;
}

/* Typewriter cursor blink for hero kicker */
@keyframes cursorBlink {
  0%, 100% { border-right-color: var(--brand); }
  50%      { border-right-color: transparent; }
}
.hero-kicker {
  border-right: 2px solid var(--brand);
  padding-right: 4px;
  animation: cursorBlink 1s step-end infinite;
}

/* Pulsing glow on hero CTA */
@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(10, 141, 131, 0.4); }
  50%      { box-shadow: 0 0 20px 4px rgba(10, 141, 131, 0.2); }
}
.hero-actions .header-link {
  animation: ctaGlow 2.5s ease-in-out infinite;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-actions .header-link:hover {
  transform: translateY(-2px);
  animation: none;
  box-shadow: 0 8px 24px rgba(10, 141, 131, 0.3);
}

/* ── 4. Enhanced Tool Card Hover Effects ── */
.tool-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}
.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12),
              0 0 0 1px var(--brand),
              0 0 20px rgba(10, 141, 131, 0.08);
  border-color: var(--brand);
}
[data-theme="dark"] .tool-card:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35),
              0 0 0 1px var(--brand),
              0 0 20px rgba(18, 196, 184, 0.1);
}
.tool-card-icon {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}
.tool-card:hover .tool-card-icon {
  transform: scale(1.15);
}

/* ── 5. Scroll-Triggered Reveal Animations ── */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
.reveal-left  { animation: slideInLeft  0.6s ease-out both; }
.reveal-right { animation: slideInRight 0.6s ease-out both; }
.reveal-scale { animation: scaleIn      0.5s ease-out both; }

/* ── 6. Button Animations ── */

/* Ripple effect on click */
button {
  position: relative;
  overflow: hidden;
}
button::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
  pointer-events: none;
}
button:active::after {
  width: 300px; height: 300px;
  opacity: 1;
  transition: width 0s, height 0s, opacity 0s;
}

/* Gradient shift on hover for header-link and primary buttons */
.header-link {
  background-size: 200% 100%;
  background-image: linear-gradient(130deg, var(--brand), var(--brand-dark), var(--brand));
  transition: background-position 0.4s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.header-link:hover {
  background-position: 100% 0;
}

/* Active state press-down */
button:active,
.header-link:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

/* ── 7. Loading / Skeleton Shimmer ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.06) 25%,
    rgba(0, 0, 0, 0.1) 37%,
    rgba(0, 0, 0, 0.06) 63%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 8px;
}
[data-theme="dark"] .skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 25%,
    rgba(255, 255, 255, 0.12) 37%,
    rgba(255, 255, 255, 0.06) 63%
  );
  background-size: 200% 100%;
}

/* ── 8. Result / Stat Card Animations ── */

/* Stat card entrance with pop effect (outside #toolWorkbench only) */
@keyframes statPop {
  0%   { opacity: 0; transform: scale(0.85) translateY(10px); }
  60%  { transform: scale(1.04) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.stat-card:not(#toolWorkbench .stat-card) {
  animation: statPop 0.45s ease-out both;
}
.stats-grid:not(#toolWorkbench .stats-grid) .stat-card:nth-child(1) { animation-delay: 0.0s; }
.stats-grid:not(#toolWorkbench .stats-grid) .stat-card:nth-child(2) { animation-delay: 0.08s; }
.stats-grid:not(#toolWorkbench .stats-grid) .stat-card:nth-child(3) { animation-delay: 0.16s; }
.stats-grid:not(#toolWorkbench .stats-grid) .stat-card:nth-child(4) { animation-delay: 0.24s; }
.stats-grid:not(#toolWorkbench .stats-grid) .stat-card:nth-child(5) { animation-delay: 0.32s; }

/* Success result flash (outside #toolWorkbench only) */
@keyframes successFlash {
  0%   { box-shadow: 0 0 0 0 rgba(21, 100, 59, 0.35); }
  40%  { box-shadow: 0 0 16px 4px rgba(21, 100, 59, 0.18); }
  100% { box-shadow: 0 0 0 0 rgba(21, 100, 59, 0); }
}
.result-box.success:not(#toolWorkbench .result-box) {
  animation: successFlash 1s ease-out;
}

/* Error result shake (outside #toolWorkbench only) */
@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  15%      { transform: translateX(-6px); }
  30%      { transform: translateX(5px); }
  45%      { transform: translateX(-4px); }
  60%      { transform: translateX(3px); }
  75%      { transform: translateX(-2px); }
}
.result-box.error:not(#toolWorkbench .result-box) {
  animation: errorShake 0.5s ease-out;
}

/* ── 9. Dark Mode Smooth Transitions ── */
body,
.panel,
.workbench,
.result,
.sidebar,
.tool-card,
.spotlight-card,
.related-card,
.stat-card,
.hero-stats div,
.hero-signal,
.checkbox-row,
.site-header,
.site-footer,
input,
textarea,
select,
button,
.header-link,
.secondary-link,
.lang-dropdown,
.theme-toggle,
.ad-slot,
.empty-state {
  transition:
    background-color 0.3s ease,
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* ── 10. Floating Particles Effect (CSS-only) ── */
@keyframes particleFloat {
  0%, 100% { transform: translateY(0) translateX(0); }
  25%      { transform: translateY(-20px) translateX(10px); }
  50%      { transform: translateY(-40px) translateX(-5px); }
  75%      { transform: translateY(-20px) translateX(-10px); }
}
@keyframes particleFade {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 0.6; }
}
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particles::before,
.particles::after {
  content: "";
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  animation: particleFloat 12s ease-in-out infinite,
             particleFade 6s ease-in-out infinite;
}
.particles::before {
  box-shadow:
    80px 120px 0 var(--brand),
    200px 80px  0 var(--accent),
    350px 200px 0 var(--brand),
    520px 140px 0 var(--accent),
    700px 260px 0 var(--brand),
    150px 340px 0 var(--accent),
    400px 400px 0 var(--brand),
    600px 50px  0 var(--accent),
    900px 180px 0 var(--brand),
    1050px 320px 0 var(--accent),
    250px 500px 0 var(--brand),
    750px 420px 0 var(--accent);
  animation-delay: 0s;
}
.particles::after {
  box-shadow:
    120px 200px 0 var(--accent),
    300px 150px 0 var(--brand),
    480px 280px 0 var(--accent),
    650px 100px 0 var(--brand),
    830px 350px 0 var(--accent),
    180px 420px 0 var(--brand),
    500px 50px  0 var(--accent),
    1000px 240px 0 var(--brand),
    50px 300px  0 var(--accent),
    380px 460px 0 var(--brand),
    720px 380px 0 var(--accent),
    950px 80px  0 var(--brand);
  animation-delay: -4s;
  animation-duration: 15s;
}

/* ── 11. Glassmorphism Enhancement for Panels ── */
.panel {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: backdrop-filter 0.3s ease,
              box-shadow 0.3s ease,
              border-color 0.3s ease,
              background 0.3s ease;
}
.panel:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06),
              inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  border-color: rgba(10, 141, 131, 0.18);
}
[data-theme="dark"] .panel:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
              inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  border-color: rgba(18, 196, 184, 0.15);
}

/* ── 12. Scroll Progress Indicator ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   END ANIMATION SYSTEMS
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   TOOL PAGE VISUAL ENHANCEMENTS
   Added: 2026-04-04
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Tool Workbench Glassmorphism ── */
#toolWorkbench {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
#toolWorkbench:hover {
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] #toolWorkbench {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] #toolWorkbench:hover {
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.3);
}

/* ── 2. Input Field Focus Animations ── */
#toolWorkbench input,
#toolWorkbench textarea,
#toolWorkbench select {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
#toolWorkbench input:focus,
#toolWorkbench textarea:focus,
#toolWorkbench select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10, 141, 131, 0.15), 0 2px 8px rgba(10, 141, 131, 0.08);
  outline: none;
  transform: scale(1.01);
}
[data-theme="dark"] #toolWorkbench input:focus,
[data-theme="dark"] #toolWorkbench textarea:focus,
[data-theme="dark"] #toolWorkbench select:focus {
  box-shadow: 0 0 0 3px rgba(18, 196, 184, 0.18), 0 2px 8px rgba(18, 196, 184, 0.1);
}

/* Float label pattern */
.float-label {
  position: relative;
}
.float-label label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.88rem;
  color: var(--muted);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  padding: 0 4px;
}
.float-label input:focus ~ label,
.float-label input:not(:placeholder-shown) ~ label,
.float-label textarea:focus ~ label,
.float-label textarea:not(:placeholder-shown) ~ label {
  top: -2px;
  font-size: 0.72rem;
  color: var(--brand);
  background: var(--paper);
}

/* ── 3. Button Enhancements ── */

/* Primary button gradient shimmer on hover */
#toolWorkbench button {
  background-size: 200% 100%;
  background-image: linear-gradient(130deg, var(--brand), var(--brand-dark), var(--brand));
  transition: background-position 0.4s ease, transform 0.15s ease, box-shadow 0.3s ease;
}
#toolWorkbench button:hover {
  background-position: 100% 0;
  box-shadow: 0 4px 16px rgba(10, 141, 131, 0.3);
}
[data-theme="dark"] #toolWorkbench button:hover {
  box-shadow: 0 4px 16px rgba(18, 196, 184, 0.25);
}

/* Active press */
#toolWorkbench button:active {
  transform: scale(0.97);
  filter: brightness(0.92);
  transition-duration: 0.06s;
}

/* Loading spinner state */
@keyframes btnSpin {
  to { transform: rotate(360deg); }
}
button.loading {
  pointer-events: none;
  opacity: 0.8;
  position: relative;
  color: transparent !important;
}
button.loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
}

/* ── 4. Stat Card Pop-In Animation ── */
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  60%  { transform: scale(1.05); }
  to   { opacity: 1; transform: scale(1); }
}
#toolWorkbench .stat-card {
  animation: popIn 0.4s ease-out both;
}
#toolWorkbench .stats-grid .stat-card:nth-child(1) { animation-delay: 0.0s; }
#toolWorkbench .stats-grid .stat-card:nth-child(2) { animation-delay: 0.07s; }
#toolWorkbench .stats-grid .stat-card:nth-child(3) { animation-delay: 0.14s; }
#toolWorkbench .stats-grid .stat-card:nth-child(4) { animation-delay: 0.21s; }
#toolWorkbench .stats-grid .stat-card:nth-child(5) { animation-delay: 0.28s; }
#toolWorkbench .stats-grid .stat-card:nth-child(6) { animation-delay: 0.35s; }

/* ── 5. Result Box Animations ── */

/* Success: slide-down + green left border pulse */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes greenPulse {
  0%, 100% { border-left-color: var(--good); }
  50%      { border-left-color: rgba(21, 100, 59, 0.4); }
}
#toolWorkbench .result-box.success {
  border-left: 4px solid var(--good);
  animation: slideDown 0.35s ease-out, greenPulse 2s ease-in-out 0.35s 2;
}

/* Error: shake + red left border */
@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  12%      { transform: translateX(-8px); }
  25%      { transform: translateX(7px); }
  37%      { transform: translateX(-5px); }
  50%      { transform: translateX(4px); }
  62%      { transform: translateX(-2px); }
  75%      { transform: translateX(1px); }
}
#toolWorkbench .result-box.error {
  animation: shakeError 0.5s ease-out;
  border-left: 4px solid var(--bad);
}

/* Warning: fade-in + amber left border */
@keyframes fadeInWarn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
#toolWorkbench .result-box.info {
  animation: fadeInWarn 0.4s ease-out;
  border-left: 4px solid var(--accent);
}

/* ── 6. Sidebar Improvements ── */
.sidebar ul {
  scroll-behavior: smooth;
}
.sidebar a {
  display: block;
  padding: 4px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}
.sidebar a:hover {
  background: rgba(10, 141, 131, 0.08);
  padding-left: 14px;
  color: var(--brand);
}
[data-theme="dark"] .sidebar a:hover {
  background: rgba(18, 196, 184, 0.1);
}
.sidebar li.active > a {
  background: rgba(10, 141, 131, 0.1);
  color: var(--brand);
  font-weight: 600;
  position: relative;
}
.sidebar li.active > a::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--brand);
  border-radius: 3px;
  animation: fadeInUp 0.3s ease-out both;
}

/* ── 7. Tab System Enhancement ── */
.tab-nav {
  position: relative;
}
.tab-btn {
  position: relative;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.tab-btn.active {
  text-shadow: 0 0 16px rgba(10, 141, 131, 0.15);
}
[data-theme="dark"] .tab-btn.active {
  text-shadow: 0 0 16px rgba(18, 196, 184, 0.2);
}

/* Tab content transition */
.tab-panel {
  animation: none;
}
.tab-panel.active {
  animation: tabFadeIn 0.35s ease-out both;
}
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 8. Copy Button Feedback ── */
@keyframes copyFlash {
  0%   { background: #15643b; box-shadow: 0 0 0 0 rgba(21, 100, 59, 0.4); }
  50%  { box-shadow: 0 0 12px 4px rgba(21, 100, 59, 0.15); }
  100% { background: linear-gradient(130deg, var(--brand), var(--brand-dark)); box-shadow: none; }
}
button.copied {
  animation: copyFlash 1.2s ease-out;
}
button.copied::after {
  content: none !important;
}

/* ── 9. Responsive Improvements ── */
@media (max-width: 768px) {
  #toolWorkbench {
    padding: 18px 14px;
    border-radius: 12px;
  }
  #toolWorkbench .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  #toolWorkbench button,
  #toolWorkbench input,
  #toolWorkbench select,
  #toolWorkbench textarea {
    min-height: 44px;
    font-size: 1rem;
  }
  #toolWorkbench .result-box {
    border-radius: 10px;
  }
}
@media (max-width: 480px) {
  #toolWorkbench {
    padding: 14px 10px;
  }
  #toolWorkbench .stats-grid {
    grid-template-columns: 1fr;
  }
  #toolWorkbench button {
    padding: 12px;
  }
}

/* ── 10. How-To-Use Steps Styling ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step-card {
  text-align: center;
  padding: 32px 20px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .step-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.step-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}
.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
@media (max-width: 768px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .step-card {
    padding: 24px 16px;
  }
}

/* ── 11. Stats Banner Styling ── */
section.stats-banner {
  display: flex !important;
  justify-content: space-around;
  align-items: center;
  padding: 40px 20px;
  margin: 32px 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  gap: 16px;
}
.stat-item {
  text-align: center;
}
.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  display: block;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-top: 4px;
  display: block;
}
@media (max-width: 640px) {
  .stats-banner {
    flex-wrap: wrap;
    gap: 24px;
    padding: 28px 16px;
  }
  .stat-item {
    flex: 0 0 45%;
  }
  .stat-num {
    font-size: 2rem;
  }
}

/* ── 12. Beta Banner Styling Enhancement ── */
.beta-banner {
  position: relative;
}
.beta-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  margin-right: 8px;
  animation: betaPulse 2s infinite;
}
@keyframes betaPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.beta-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  padding: 4px 8px;
  min-height: auto;
  width: auto;
}
.beta-close:hover {
  opacity: 1;
}
.beta-close::after {
  content: none !important;
}

/* ── 13. Featured Categories Showcase ── */
.featured-categories { text-align: center; }
.featured-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.featured-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.featured-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--brand);
}
[data-theme="dark"] .featured-cat-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.featured-cat-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.featured-cat-name {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 4px;
}
.featured-cat-count {
  font-size: 0.78rem;
  color: var(--muted);
}
@media (max-width: 640px) {
  .featured-cat-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
  }
  .featured-cat-card {
    padding: 14px 8px;
  }
  .featured-cat-icon {
    font-size: 1.6rem;
  }
}

/* ── 14. How-It-Works Hero (above tool grid) ── */
.how-it-works-hero { text-align: center; }
.how-it-works-hero h2 {
  margin-bottom: 24px;
  font-size: 1.5rem;
}
.how-it-works { text-align: center; }
.how-it-works h2 {
  margin-bottom: 24px;
  font-size: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   END TOOL PAGE VISUAL ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   LIGHT MODE POLISH
   Added: 2026-04-04
   Only appended — no existing rules modified.
   All selectors scoped with body:not([data-theme="dark"]) to
   avoid any conflict with dark-mode styles.
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Light Mode Hero Gradient ── */
body:not([data-theme="dark"]) .hero.panel {
  background: linear-gradient(145deg, rgba(255,252,244,0.95), rgba(240,248,246,0.9));
  box-shadow: 0 4px 32px rgba(10,141,131,0.08);
}

/* ── 2. Light Mode Tool Cards ── */
body:not([data-theme="dark"]) .tool-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.02);
}
body:not([data-theme="dark"]) .tool-card:hover {
  box-shadow: 0 4px 16px rgba(10,141,131,0.12), 0 8px 32px rgba(0,0,0,0.06);
  border-color: rgba(10,141,131,0.2);
}

/* ── 3. Light Mode Stats Banner ── */
body:not([data-theme="dark"]) section.stats-banner {
  background: linear-gradient(135deg, #0a8d83 0%, #08635d 60%, #064e49 100%);
  box-shadow: 0 8px 32px rgba(10,141,131,0.18);
}
body:not([data-theme="dark"]) .stat-num {
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
body:not([data-theme="dark"]) .stat-label {
  opacity: 0.92;
}

/* ── 4. Light Mode Featured Category Cards ── */
body:not([data-theme="dark"]) .featured-cat-card {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
body:not([data-theme="dark"]) .featured-cat-card:hover {
  background: #fff;
  box-shadow: 0 6px 24px rgba(10,141,131,0.1), 0 2px 8px rgba(0,0,0,0.04);
  border-color: rgba(10,141,131,0.25);
}

/* ── 5. Light Mode Step Cards ── */
body:not([data-theme="dark"]) .step-card {
  background: linear-gradient(168deg, #fff 60%, rgba(240,252,250,0.6));
  border-color: rgba(10,141,131,0.08);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
body:not([data-theme="dark"]) .step-card:hover {
  box-shadow: 0 8px 28px rgba(10,141,131,0.1), 0 2px 8px rgba(0,0,0,0.04);
  border-color: rgba(10,141,131,0.18);
}

/* ── 6. Light Mode Input Fields ── */
body:not([data-theme="dark"]) input,
body:not([data-theme="dark"]) textarea,
body:not([data-theme="dark"]) select {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
}
body:not([data-theme="dark"]) #toolWorkbench input:focus,
body:not([data-theme="dark"]) #toolWorkbench textarea:focus,
body:not([data-theme="dark"]) #toolWorkbench select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10,141,131,0.1), inset 0 1px 3px rgba(10,141,131,0.06);
}

/* ── 7. Light Mode Panel Glassmorphism ── */
body:not([data-theme="dark"]) .panel {
  background: rgba(255,252,244,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.03), inset 0 0 0 1px rgba(255,255,255,0.5);
}
body:not([data-theme="dark"]) .panel:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.05), inset 0 0 0 1px rgba(255,255,255,0.6);
}

/* ── 8. Light Mode Scroll Progress Bar ── */
body:not([data-theme="dark"]) .scroll-progress {
  height: 4px;
  background: linear-gradient(90deg, #0a8d83, #e97f24);
  box-shadow: 0 0 8px rgba(10,141,131,0.25);
}

/* ── 9. Light Mode CTA Section ── */
body:not([data-theme="dark"]) .header-link {
  background: linear-gradient(130deg, #0a8d83, #08635d);
  box-shadow: 0 2px 12px rgba(10,141,131,0.2);
}
body:not([data-theme="dark"]) .header-link:hover {
  box-shadow: 0 4px 18px rgba(10,141,131,0.3);
}
body:not([data-theme="dark"]) .secondary-link {
  border-color: rgba(10,141,131,0.25);
  color: var(--brand);
}
body:not([data-theme="dark"]) .secondary-link:hover {
  background: rgba(10,141,131,0.06);
  border-color: var(--brand);
}

/* ── 10. Theme Toggle Button Polish ── */
.theme-toggle {
  transition: border-color 0.25s ease, transform 0.35s ease, box-shadow 0.25s ease;
}
body:not([data-theme="dark"]) .theme-toggle {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
body:not([data-theme="dark"]) .theme-toggle:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 10px rgba(10,141,131,0.12);
}
[data-theme="dark"] .theme-toggle {
  background: rgba(30,40,48,0.95);
  border-color: rgba(200,220,230,0.15);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
[data-theme="dark"] .theme-toggle:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 10px rgba(18,196,184,0.2);
}
.theme-toggle svg {
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-toggle:active svg {
  transform: rotate(180deg) scale(0.85);
}

/* ── 11. Light Mode Spotlight & Related Cards ── */
body:not([data-theme="dark"]) .spotlight-card,
body:not([data-theme="dark"]) .related-card {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
body:not([data-theme="dark"]) .spotlight-card:hover,
body:not([data-theme="dark"]) .related-card:hover {
  box-shadow: 0 6px 20px rgba(10,141,131,0.1), 0 2px 8px rgba(0,0,0,0.04);
  border-color: rgba(10,141,131,0.2);
}

/* ── 12. Light Mode Proof / Trust Badges ── */
body:not([data-theme="dark"]) .proof-badge {
  background: linear-gradient(130deg, rgba(10,141,131,0.07), rgba(10,141,131,0.02));
  border-color: rgba(10,141,131,0.15);
}
body:not([data-theme="dark"]) .trust-pill {
  background: rgba(255,255,255,0.9);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* ── 13. Light Mode Hero Stats ── */
body:not([data-theme="dark"]) .hero-stats div {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

/* ── 14. Light Mode Workbench ── */
body:not([data-theme="dark"]) #toolWorkbench {
  background: rgba(255,255,255,0.8);
  box-shadow: 0 2px 16px rgba(0,0,0,0.03);
}

/* ═══════════════════════════════════════════════════════════════
   END LIGHT MODE POLISH
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   CTA SECTION + FOOTER REDESIGN
   Added: 2026-04-04
   ═══════════════════════════════════════════════════════════════ */

/* ── 15. CTA Section ── */
.cta-section { text-align: center; padding: 60px 24px; margin: 48px 0 0; border-radius: 20px; background: linear-gradient(135deg, rgba(10,141,131,0.12), rgba(10,141,131,0.04)); border: 1px solid var(--stroke); }
.cta-section h2 { font-size: 2rem; margin-bottom: 12px; }
.cta-section p { color: var(--muted); max-width: 520px; margin: 0 auto 28px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta-btn { padding: 14px 28px; border-radius: 999px; font-weight: 700; text-decoration: none; font-size: 1rem; transition: transform 0.2s, box-shadow 0.2s; }
.cta-btn.primary { background: linear-gradient(130deg, var(--brand), var(--brand-dark)); color: #fff; }
.cta-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(10,141,131,0.3); }
.cta-btn.secondary { background: var(--panel); border: 1px solid var(--stroke); color: var(--ink); }
.cta-btn.secondary:hover { border-color: var(--brand); transform: translateY(-2px); }

/* ── 16. Footer Redesign ── */
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding: 48px 0 32px; border-top: 1px solid var(--stroke); }
.footer-brand p { color: var(--muted); font-size: 0.9rem; margin-top: 8px; max-width: 280px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
.footer-links a { color: var(--ink); text-decoration: none; font-size: 0.92rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--brand); }
.footer-bottom { text-align: center; padding: 20px 0; border-top: 1px solid var(--stroke); margin-top: 16px; }
.footer-bottom p { color: var(--muted); font-size: 0.82rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════════════
   END CTA SECTION + FOOTER REDESIGN
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   MOBILE-SPECIFIC OPTIMIZATIONS & TOUCH IMPROVEMENTS
   Added: 2026-04-04
   Only appended — no existing rules modified.
   ═══════════════════════════════════════════════════════════════ */

/* ── M1. Smooth Scroll with reduced-motion respect ── */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ── M2. Safe Areas for Notched Devices ── */
@supports (padding: env(safe-area-inset-top)) {
  body {
    padding-left: max(env(safe-area-inset-left), 8px);
    padding-right: max(env(safe-area-inset-right), 8px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .back-to-top {
    bottom: calc(24px + env(safe-area-inset-bottom));
    left: calc(24px + env(safe-area-inset-left));
  }
  .history-toggle {
    bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .toast-container {
    bottom: calc(24px + env(safe-area-inset-bottom));
    right: calc(24px + env(safe-area-inset-right));
  }
}

/* ── M3. Touch-Friendly Inputs (prevent iOS zoom on focus) ── */
@media (max-width: 768px) {
  input, textarea, select {
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
  }
  select {
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2353646d' d='M1.4 0L6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
  }
  #toolWorkbench label {
    margin-bottom: 6px;
  }
  #toolWorkbench > * + * {
    margin-top: 12px;
  }
}

/* ── M4. Mobile Hero Section (< 640px) ── */
@media (max-width: 639px) {
  .hero.panel {
    padding: 16px 14px;
  }
  .hero h1,
  .hero-copy h1 {
    font-size: 1.8rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
  }
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .header-link,
  .hero-actions .secondary-link {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 12px 16px;
  }
  /* Hide heavy animated orbs on mobile for performance */
  .hero.panel::before,
  .hero.panel::after {
    display: none;
  }
}

/* ── M5. Mobile Tool Cards (< 480px) ── */
@media (max-width: 479px) {
  .tool-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .tool-card {
    padding: 16px;
    min-height: 48px;
  }
  .tool-card-icon {
    font-size: 2.4rem;
  }
  .tool-card h3 {
    font-size: 1rem;
  }
  /* Ensure all tappable areas meet 48px minimum */
  .tool-card a,
  .tool-card button,
  .card-cta,
  .pill {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
  }
  .spotlight-card,
  .related-card {
    padding: 14px;
  }
}

/* ── M6. Mobile How-It-Works Steps ── */
@media (max-width: 639px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .step-card {
    padding: 20px 16px;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 16px;
  }
  .step-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 1.05rem;
    margin-bottom: 0;
  }
  .step-card h3 {
    margin-top: 0;
  }
  .hiw-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ── M7. Mobile Stats Banner ── */
@media (max-width: 479px) {
  .stats-banner {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 24px 16px;
    text-align: center;
  }
  .stat-item {
    flex: unset;
  }
  .stat-num {
    font-size: 1.8rem;
  }
  .stat-label {
    font-size: 0.82rem;
  }
  .stats-bar {
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    font-size: 0.9rem;
  }
  .stats-bar span[aria-hidden] {
    display: none;
  }
  .proof-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
}
@media (max-width: 359px) {
  .stats-banner {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .stat-num {
    font-size: 1.6rem;
  }
}

/* ── M8. Mobile Featured Categories ── */
@media (max-width: 479px) {
  .featured-cat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .featured-cat-card {
    padding: 12px 8px;
  }
  .featured-cat-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
  }
  .featured-cat-name {
    font-size: 0.84rem;
  }
  .featured-cat-count {
    font-size: 0.72rem;
  }
}

/* ── M9. Mobile Header (prevent overlap) ── */
@media (max-width: 479px) {
  .site-header {
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }
  .site-header-actions {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: 100%;
  }
  .brand {
    width: 100%;
    text-align: center;
    font-size: 1.05rem;
  }
  .header-link {
    font-size: 0.8rem;
    padding: 8px 12px;
    min-height: 44px;
  }
  /* Hide Blog link on very small screens to save space */
  .site-header-actions a[href*="blog"] {
    display: none;
  }
}
@media (max-width: 359px) {
  .site-header-actions .header-link {
    font-size: 0.76rem;
    padding: 6px 10px;
  }
  .theme-toggle {
    width: 34px;
    height: 34px;
  }
}

/* ── M10. Mobile Footer (stacked single column) ── */
@media (max-width: 479px) {
  .site-footer {
    text-align: center;
    gap: 12px;
  }
  .site-footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .site-footer-nav a {
    display: flex;
    padding: 6px 0;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 0 20px;
  }
  .footer-brand p {
    max-width: 100%;
  }
}

/* ── M11. Back-to-Top & FAB Mobile Position ── */
@media (max-width: 479px) {
  .back-to-top {
    bottom: 12px;
    left: auto;
    right: 12px;
    width: 44px;
    height: 44px;
    z-index: 999;
  }
  .history-toggle {
    bottom: 12px;
    right: 62px;
    width: 44px;
    height: 44px;
  }
  .history-panel {
    bottom: 68px;
    right: 8px;
    left: 8px;
    width: auto;
    max-height: 60vh;
  }
  .cmd-hint {
    display: none;
  }
}

/* ── M12. Disable Hover Effects on Touch Devices ── */
@media (hover: none) and (pointer: coarse) {
  .tool-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--stroke);
  }
  .tool-card:hover::before {
    opacity: 0;
  }
  .tool-card:hover .tool-card-icon {
    transform: none;
  }
  .spotlight-card:hover,
  .related-card:hover {
    transform: none;
    box-shadow: none;
  }
  .step-card:hover {
    transform: none;
    box-shadow: none;
  }
  .featured-cat-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--stroke);
  }
  /* Active-state feedback for touch instead of hover */
  .tool-card:active {
    transform: scale(0.98);
    border-color: var(--brand);
  }
  .spotlight-card:active,
  .related-card:active {
    transform: scale(0.98);
  }
  .featured-cat-card:active {
    transform: scale(0.97);
    border-color: var(--brand);
  }
}

/* ── M13. Mobile Tool Page Workbench Spacing ── */
@media (max-width: 479px) {
  #toolWorkbench {
    padding: 12px 8px;
  }
  #toolWorkbench textarea {
    min-height: 100px;
  }
  #toolWorkbench .actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #toolWorkbench .actions button {
    width: 100%;
    min-height: 48px;
  }
  .tab-nav {
    gap: 2px;
  }
  .tab-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
    min-height: 44px;
  }
  .cmd-palette {
    width: calc(100vw - 16px);
    border-radius: 12px;
  }
  .cmd-overlay {
    padding-top: 10vh;
  }
}

/* ═══════════════════════════════════════════════════════════════
   END MOBILE-SPECIFIC OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════ */
