/* ===================================================
   TEXTOOL — Main Stylesheet
   Based on Firecrawl Design System
   Text Case Converter: UPPER / lower / Title Case
   Zero dependencies. Vanilla JS.
=================================================== */

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

/* ── Variables (Firecrawl Design System) ─────────── */
:root {
  --heat-4: #fa5d190a;
  --heat-8: #fa5d1914;
  --heat-12: #fa5d191f;
  --heat-16: #fa5d1929;
  --heat-20: #fa5d1933;
  --heat-40: #fa5d1966;
  --heat-90: #fa5d19e6;
  --heat-100: #fa5d19ff;
  --accent-black: #262626ff;
  --accent-white: #ffffffff;
  --surface: #ffffffff;
  --surface-raised: #ffffffff;
  --accent-amethyst: #9061ffff;
  --accent-bluetron: #2a6dfbff;
  --accent-crimson: #eb3424ff;
  --accent-forest: #42c366ff;
  --accent-honey: #ecb730ff;
  --black-alpha-1: #00000003;
  --black-alpha-2: #00000005;
  --black-alpha-3: #00000008;
  --black-alpha-4: #0000000a;
  --black-alpha-5: #0000000d;
  --black-alpha-6: #0000000f;
  --black-alpha-7: #00000012;
  --black-alpha-8: #00000014;
  --black-alpha-10: #0000001a;
  --black-alpha-12: #0000001f;
  --black-alpha-16: #00000029;
  --black-alpha-20: #00000033;
  --black-alpha-24: #0000003d;
  --black-alpha-32: #26262652;
  --black-alpha-40: #26262666;
  --black-alpha-48: #2626267a;
  --black-alpha-56: #2626268f;
  --black-alpha-64: #262626a3;
  --black-alpha-72: #262626b8;
  --black-alpha-88: #262626e0;
  --white-alpha-56: #ffffff8f;
  --white-alpha-72: #ffffffb8;
  --border-faint: #edededff;
  --border-muted: #e8e8e8ff;
  --border-loud: #e6e6e6ff;
  --illustrations-faint: #edededff;
  --illustrations-muted: #e6e6e6ff;
  --illustrations-default: #dbdbdbff;
  --background-base: #f9f9f9ff;
  --background-lighter: #fbfbfbff;
  
  /* Aliases for compatibility */
  --ink: #262626;
  --paper: #F9F9F9;
  --paper-alt: #F2F2EE;
  --accent: #FF4C00;
  --accent-2: #0066FF;
  --muted: #888880;
  --border: #E0E0DA;
  --tool-bg: #FFFFFF;
  --radius: 5px;
  --font-serif: 'Inter', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'ui-monospace', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', monospace;
  --max: 72rem;
  --pad: 1.25rem;
}

/* ── Reset ─────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

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

a {
  color: #FF4D00;
  transition: color 0.15s ease;
}

a:hover {
  color: #E04400;
}

/* ── Header ────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  font-family: var(--font-sans);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-logo .logo-dot {
  color: var(--accent);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 0.5rem;
}

.header-nav {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  padding: 1rem var(--pad);
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.header-nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s;
}

.header-nav a:hover {
  color: var(--ink);
}

.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  color: var(--ink);
  white-space: nowrap;
  transition: border-color 0.15s;
}

.lang-btn:hover {
  border-color: var(--ink);
}

.lang-btn svg {
  flex-shrink: 0;
}

.lang-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--tool-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 200;
  overflow: hidden;
}

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

.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.1s;
}

.lang-dropdown a:hover {
  background: var(--paper-alt);
}

.lang-dropdown a.active {
  font-weight: 600;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }

  .header-nav {
    display: flex;
    flex-direction: row;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .header-inner {
    height: 64px;
  }
}

/* ── Breadcrumb ────────────────────────────────── */
.breadcrumb {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.5rem var(--pad);
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  text-decoration: none;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.breadcrumb span {
  color: var(--ink);
  font-weight: 500;
}

/* ── Main ──────────────────────────────────────── */
main {
  flex: 1;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ── Hero ──────────────────────────────────────── */
.hero {
  padding: 2rem var(--pad) 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 5vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.hero h1 em {
  color: var(--accent);
  font-style: italic;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 0;
}

/* ── Tool Card ─────────────────────────────────── */
.tool-section {
  padding: 1.5rem var(--pad) 2rem;
  max-width: var(--max);
  margin: 0 auto;
}

.tool-card {
  background: var(--tool-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* Mode Buttons */
.mode-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mode-bar::-webkit-scrollbar {
  display: none;
}

.mode-btn {
  flex: 1;
  min-width: 100px;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  border-right: 1.5px solid var(--ink);
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.mode-btn:last-child {
  border-right: none;
}

.mode-btn:hover {
  background: var(--paper-alt);
  color: var(--ink);
}

.mode-btn.active {
  background: var(--ink);
  color: var(--paper);
}

/* Textareas */
.textareas {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .textareas {
    grid-template-columns: 1fr 1fr;
    min-height: 260px;
  }
}

.textarea-wrap {
  position: relative;
}

.textarea-wrap+.textarea-wrap {
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .textarea-wrap+.textarea-wrap {
    border-top: none;
    border-left: 1px solid var(--border);
  }
}

.textarea-label {
  position: absolute;
  top: 0.6rem;
  left: 0.85rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
}

textarea {
  width: 100%;
  height: 180px;
  padding: 2rem 0.9rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.925rem;
  line-height: 1.7;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--ink);
}

textarea::placeholder {
  color: #BBBBB5;
}

textarea[readonly] {
  background: var(--paper-alt);
  cursor: default;
}

@media (min-width: 768px) {
  textarea {
    height: 100%;
    min-height: 240px;
  }
}

/* Stats Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  background: var(--paper-alt);
}

.stat-item {
  text-align: center;
  padding: 0.5rem 0.25rem;
  border-right: 1px solid var(--border);
  font-size: 0.8rem;
}

.stat-item:last-child {
  border-right: none;
}

@media (max-width: 400px) {
  .stats-bar {
    grid-template-columns: 1fr;
  }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .stat-item:last-child {
    border-bottom: none;
  }
}

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.2;
}

.stat-lbl {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Action Buttons */
.action-bar {
  display: flex;
  gap: 0.6rem;
  padding: 0.85rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
  text-decoration: none;
  white-space: nowrap;
  background: var(--paper);
  color: var(--ink);
}

.btn:hover {
  background: var(--paper-alt);
  border-color: var(--ink);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: #FF4C00;
  color: #FFFFFF;
  border-radius: 10px;
  border: none;
  box-shadow: color(display-p3 0.9804 0.1127 0.098 / 0.2) 0px -6px 12px 0px inset, color(display-p3 0.9804 0.3647 0.098 / 0.12) 0px 2px 4px 0px, color(display-p3 0.9804 0.3647 0.098 / 0.12) 0px 1px 1px 0px, color(display-p3 0.9804 0.3647 0.098 / 0.16) 0px 0.5px 0.5px 0px, color(display-p3 0.9804 0.3647 0.098 / 0.2) 0px 0.25px 0.25px 0px;
}

.btn-primary:hover {
  background: #E04400;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-outline {
  background: #EFEFEF;
  color: #262626;
  border-radius: 10px;
  border: none;
  box-shadow: none;
}

.btn-outline:hover {
  background: #E0E0E0;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
}

.btn-danger {
  background: var(--paper);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 2px 2px 0 var(--accent);
}

.btn-danger:hover {
  box-shadow: 3px 3px 0 var(--accent);
}

.btn.copied {
  background: #00C17A;
  color: #fff;
  border-color: #00C17A;
  box-shadow: 2px 2px 0 #00C17A;
}

/* Error message */
.tool-error {
  display: none;
  margin: 0 0.85rem 0.85rem;
  padding: 0.5rem 0.75rem;
  background: #FFF0EF;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--accent);
  animation: shake 0.3s ease;
}

.tool-error.show {
  display: block;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

/* ── Info Section ───────────────────────────────── */
.info-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem var(--pad);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .info-section {
    grid-template-columns: 1fr 340px;
  }
}

.prose-container h2 {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 3vw, 36px);
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.markdown-body h3 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  color: var(--ink);
}

.markdown-body h4 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: var(--ink);
}

.prose-container p {
  color: #444;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.prose-container p:last-child {
  margin-bottom: 0;
}

/* Markdown Text Body - spacing between paragraphs */
.markdown-body p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.markdown-body p:last-child {
  margin-bottom: 0;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.75rem;
  font-size: 0.98rem;
  background: var(--tool-bg);
  border: 1.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.markdown-body th,
.markdown-body td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.markdown-body th {
  background: var(--paper-alt);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.markdown-body tr:last-child td {
  border-bottom: none;
}

/* ── FAQ ───────────────────────────────────────── */
.faq-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--pad) 2rem;
}

.faq-section h2 {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 3vw, 36px);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.faq-item {
  border-top: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--border);
}

.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1rem 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--ink);
}

.faq-q svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item.open .faq-q svg {
  transform: rotate(180deg);
}

.faq-a {
  display: none;
  padding: 0 0 1rem;
  font-size: 0.9rem;
  color: #444;
  line-height: 1.7;
}

.faq-item.open .faq-a {
  display: block;
}

/* ── Blog Cards ────────────────────────────────── */
.blog-section {
  background: var(--paper-alt);
  border-top: 1px solid var(--border);
  padding: 2rem var(--pad);
}

.blog-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.blog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.blog-header h2 {
  margin-bottom: 0 !important;
}

.blog-section h2 {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 3vw, 36px);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

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

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  background: var(--tool-bg);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 0;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 1.15rem;
  flex: 1;
}

.blog-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.blog-card h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.blog-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Related articles inside blog posts */
.related-articles {
  margin: 2.5rem 0 1rem;
  padding: 1.5rem;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--paper-alt);
  box-shadow: 4px 4px 0 var(--ink);
}

.related-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.related-header h3 {
  margin: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* ── Footer ────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--ink);
  color: var(--paper);
  padding: 2rem var(--pad);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 2fr;
    align-items: start;
  }
}

.footer-brand .site-logo {
  color: var(--paper);
}

.footer-tagline {
  font-size: 0.82rem;
  color: #888;
  margin-top: 0.4rem;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-links a {
  font-size: 0.82rem;
  color: #aaa;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--paper);
}

.footer-bottom {
  max-width: var(--max);
  margin: 1.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: #888;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ── Blog Post Styling ─────────────────────────── */
.blog-hero {
  text-align: left;
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(1rem, 3vw, 2rem);
  background: var(--paper-alt);
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.blog-hero .breadcrumb {
  margin-bottom: 1.5rem;
}

.featured-image {
  margin-top: 2rem;
  max-width: 1000px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--tool-bg);
}

.featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 750px) 320px;
  justify-content: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.blog-post-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #333;
}

.blog-post-body h2 {
  font-family: var(--font-sans);
  font-size: 36px;
  font-weight: 700;
  margin: 3rem 0 1.25rem;
  color: var(--ink);
  line-height: 1.2;
}

.blog-post-body h3 {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--ink);
}

.blog-post-body h4 {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  margin: 1.5rem 0 0.6rem;
  color: var(--ink);
}

.blog-post-body p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.blog-post-body a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}

.blog-post-body a:hover {
  text-decoration-color: var(--ink);
}

.blog-post-body ul,
.blog-post-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  list-style-position: outside;
}

.blog-post-body li {
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.blog-post-body strong {
  color: var(--ink);
}

.blog-post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.75rem;
  font-size: 0.98rem;
  background: var(--tool-bg);
  border: 1.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.blog-post-body th,
.blog-post-body td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.blog-post-body th {
  background: var(--paper-alt);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.blog-post-body tr:last-child td {
  border-bottom: none;
}

.cta-box {
  margin: 2.5rem 0 1rem;
  padding: 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff1e8 0%, #ffffff 60%);
  box-shadow: 6px 6px 0 var(--ink);
}

.cta-box .cta-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.cta-box .cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.cta-box .cta-btn:hover {
  background: #e04400;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.blog-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-box {
  background: var(--ink);
  color: var(--paper);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.1);
}

.sidebar-box h3 {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 1rem;
}

.sidebar-box p {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.sidebar-box .btn-outline {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  width: 100%;
  justify-content: center;
  font-size: 0.85rem;
  padding: 0.8rem;
}

.sidebar-box .btn-outline:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

@media (max-width: 900px) {
  .blog-content-wrap {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .blog-sidebar {
    position: static;
  }
}

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

/* Smooth page load */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-card {
  animation: fadeUp 0.4s ease both;
}

.hero {
  animation: fadeUp 0.3s ease both;
}
