:root {
  --tb-bg: #f7f9fc;
  --tb-text: #0f1f3d;
  --tb-muted: #66758f;
  --tb-line: #d9e2ef;
  --tb-soft-line: #edf2f7;
  --tb-surface: #ffffff;
  --tb-primary: #1463ff;
  --tb-primary-dark: #0c43b7;
  --tb-primary-soft: #eaf2ff;
  --tb-success: #18b783;
  --tb-warning: #f59e0b;
  --tb-purple: #7c4dff;
  --tb-danger: #ff4d4f;
  --tb-radius: 8px;
  --tb-shadow: 0 14px 35px rgba(15, 31, 61, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  color: var(--tb-text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    linear-gradient(135deg, rgba(20, 99, 255, 0.05), transparent 36rem),
    linear-gradient(180deg, #ffffff 0, var(--tb-bg) 34rem);
  letter-spacing: 0;
}

a {
  color: var(--tb-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.site-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  min-height: 65vh;
  padding: 2.2rem 0 0;
}

.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--tb-soft-line);
  box-shadow: 0 8px 22px rgba(15, 31, 61, 0.05);
  backdrop-filter: blur(14px);
}

.navbar-brand,
.navbar-nav .nav-link {
  color: var(--tb-text);
}

.navbar-nav .nav-link {
  font-size: 0.92rem;
  font-weight: 600;
}

.navbar-nav .dropdown-menu {
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow);
}

.brand-badge {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, var(--tb-primary), #0a48c7);
  font-size: 1rem;
  box-shadow: 0 8px 18px rgba(20, 99, 255, 0.24);
}

.btn {
  border-radius: 7px;
  font-weight: 700;
  letter-spacing: 0;
}

.btn-primary {
  --bs-btn-bg: var(--tb-primary);
  --bs-btn-border-color: var(--tb-primary);
  --bs-btn-hover-bg: var(--tb-primary-dark);
  --bs-btn-hover-border-color: var(--tb-primary-dark);
  box-shadow: 0 10px 20px rgba(20, 99, 255, 0.18);
}

.btn-soft-primary {
  color: var(--tb-primary);
  background: var(--tb-primary-soft);
  border: 1px solid #cfe0ff;
}

.btn-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--tb-line);
  background: #fff;
}

.text-purple {
  color: var(--tb-purple) !important;
}

.toolbox-hero {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: clamp(2.2rem, 5vw, 4rem) 0 2.4rem;
}

.toolbox-hero::after {
  content: "";
  position: absolute;
  inset: 2rem -8rem auto auto;
  width: 36rem;
  height: 24rem;
  background: radial-gradient(circle, rgba(20, 99, 255, 0.12), transparent 68%);
  pointer-events: none;
}

.toolbox-hero h1 {
  max-width: 10ch;
  margin: 0;
  color: var(--tb-text);
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.95;
  font-weight: 800;
}

.hero-lead {
  max-width: 38rem;
  margin: 1.35rem 0 1.8rem;
  color: var(--tb-muted);
  font-size: 1.14rem;
  line-height: 1.65;
}

.hero-search {
  max-width: 37rem;
  height: 58px;
  display: grid;
  grid-template-columns: 3.25rem 1fr auto;
  align-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
  box-shadow: 0 18px 40px rgba(15, 31, 61, 0.08);
}

.hero-search i {
  color: var(--tb-primary);
  text-align: center;
  font-size: 1.2rem;
}

.hero-search input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  font-size: 1rem;
}

.hero-search .btn {
  height: 100%;
  border-radius: 0;
  padding-inline: 1.4rem;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
  color: var(--tb-muted);
  font-size: 0.86rem;
}

.quick-links a {
  padding: 0.28rem 0.65rem;
  color: #345276;
  background: #f2f6fc;
  border: 1px solid var(--tb-line);
  border-radius: 999px;
  text-decoration: none;
}

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

.toolbox-bin {
  position: absolute;
  right: 1rem;
  bottom: 1.5rem;
  width: min(27rem, 100%);
  height: 12.5rem;
  border-radius: 20px 20px 32px 32px;
  background: linear-gradient(160deg, #ffffff, #e9f0fa);
  border: 1px solid var(--tb-line);
  box-shadow: 0 28px 55px rgba(15, 31, 61, 0.18);
}

.toolbox-bin::after {
  content: "\F5DB";
  font-family: "bootstrap-icons";
  position: absolute;
  left: 50%;
  bottom: 2.3rem;
  transform: translateX(-50%);
  color: var(--tb-primary);
  font-size: 3.5rem;
}

.toolbox-lid {
  position: absolute;
  right: 2.2rem;
  top: 2.2rem;
  width: 23rem;
  height: 7.5rem;
  border-radius: 20px;
  background: linear-gradient(160deg, #ffffff, #edf3fb);
  border: 1px solid var(--tb-line);
  transform: rotate(7deg);
  box-shadow: 0 18px 36px rgba(15, 31, 61, 0.11);
}

.toolbox-bin > i {
  position: absolute;
  top: -2.7rem;
  width: 4.2rem;
  height: 5.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 14px;
  font-size: 2.1rem;
  box-shadow: 0 12px 24px rgba(15, 31, 61, 0.18);
}

.toolbox-bin .pdf { left: 3.6rem; background: var(--tb-danger); transform: rotate(-9deg); }
.toolbox-bin .image { left: 8.8rem; background: var(--tb-success); transform: rotate(5deg); }
.toolbox-bin .video { right: 7.8rem; background: var(--tb-purple); transform: rotate(-5deg); }
.toolbox-bin .code { right: 2.8rem; background: var(--tb-primary); transform: rotate(8deg); }

.category-strip {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0.25rem;
  margin-bottom: 1.9rem;
  padding: 0.9rem;
  background: #fff;
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow);
}

.category-strip a {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.25rem;
  color: var(--tb-text);
  text-decoration: none;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 700;
  transition: background 0.18s ease, transform 0.18s ease;
}

.category-strip i {
  font-size: 1.5rem;
  color: var(--tb-primary);
}

.category-strip a:hover,
.category-strip a.active {
  background: var(--tb-primary-soft);
  transform: translateY(-1px);
}

.section-block {
  margin: 2rem 0;
}

.section-title-row,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.section-title-row h2,
.section-head h2 {
  margin: 0;
  color: var(--tb-text);
  font-size: 1.55rem;
  font-weight: 800;
}

.section-head.compact {
  align-items: flex-start;
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.tool-tile,
.category-card,
.guide-card,
.section-card {
  background: var(--tb-surface);
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
  box-shadow: 0 8px 24px rgba(15, 31, 61, 0.04);
}

.tool-tile,
.category-card,
.guide-card {
  position: relative;
  padding: 1.2rem;
  min-height: 11.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tool-tile:hover,
.category-card:hover,
.guide-card:hover {
  transform: translateY(-3px);
  border-color: #bed3f5;
  box-shadow: var(--tb-shadow);
}

.tool-tile h3,
.category-card h3,
.guide-card h3 {
  margin: 0.75rem 0 0.45rem;
  font-size: 1rem;
  font-weight: 800;
}

.tool-tile h3 a,
.category-card h3 a,
.guide-card h3 a {
  color: var(--tb-text);
  text-decoration: none;
}

.tool-tile p,
.category-card p,
.guide-card p {
  color: var(--tb-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.tool-link {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: auto;
  font-weight: 800;
  font-size: 0.86rem;
  text-decoration: none;
}

.tool-icon {
  width: 2.65rem;
  height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--tb-primary);
  border-radius: 8px;
  font-size: 1.38rem;
}

.category-pdf { background: var(--tb-danger); }
.category-image { background: var(--tb-success); }
.category-video { background: var(--tb-purple); }
.category-audio { background: #ff7a00; }
.category-developer { background: var(--tb-primary); }
.category-seo { background: #f59e0b; }
.category-text { background: #13b8bd; }
.category-utility { background: #637083; }

.trust-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.05rem;
  background: linear-gradient(90deg, #eff6ff, #ffffff);
  border: 1px solid #cfe0ff;
  border-radius: var(--tb-radius);
}

.trust-band div {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  column-gap: 0.85rem;
  align-items: center;
}

.trust-band i {
  grid-row: span 2;
  color: var(--tb-primary);
  font-size: 1.8rem;
}

.trust-band strong {
  font-size: 0.95rem;
}

.trust-band span {
  color: var(--tb-muted);
  font-size: 0.82rem;
}

.category-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.category-card-head {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.category-card h3 {
  margin: 0 0 0.15rem;
}

.category-card-head span:not(.tool-icon) {
  color: var(--tb-muted);
  font-size: 0.82rem;
}

.category-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.category-mini-links a {
  padding: 0.22rem 0.5rem;
  color: #345276;
  background: #f4f7fb;
  border: 1px solid var(--tb-soft-line);
  border-radius: 999px;
  font-size: 0.76rem;
  text-decoration: none;
}

.guide-section {
  padding: 1.4rem;
  background: #fff;
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
}

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

.guide-card span {
  color: var(--tb-muted);
  font-size: 0.8rem;
}

.final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 2.5rem 0 0;
  padding: 1.5rem;
  color: #fff;
  background: linear-gradient(135deg, #062b5f, #0a4ad4);
  border-radius: var(--tb-radius);
}

.final-cta h2 {
  margin: 0 0 0.25rem;
  font-size: 1.55rem;
  font-weight: 800;
}

.final-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.hero,
.section-card {
  border-radius: var(--tb-radius);
}

.eyebrow {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tb-primary);
  font-weight: 800;
  margin: 0;
}

.ad-slot,
.ad-rail {
  min-height: 4.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7b8da8;
  border: 1px solid #d7e7fb;
  border-radius: var(--tb-radius);
  padding: 0.9rem;
  background: linear-gradient(180deg, #f7fbff, #eef6ff);
  text-align: center;
}

.ad-slot {
  margin-bottom: 1rem;
}

.ad-gap {
  margin: 2rem 0;
}

.ad-rail-row {
  position: relative;
}

.left-rail,
.right-rail {
  position: absolute;
  top: 1rem;
  width: 13rem;
  z-index: 2;
}

.left-rail {
  left: 1rem;
}

.right-rail {
  right: 1rem;
}

.tool-breadcrumb {
  margin-bottom: 1rem;
}

.breadcrumb {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.tool-hero {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  margin-bottom: 1.4rem;
  padding: 1.4rem;
  background: #fff;
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
  box-shadow: 0 10px 24px rgba(15, 31, 61, 0.05);
}

.tool-hero h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

.tool-hero p {
  margin: 0;
  color: var(--tb-muted);
}

.tool-guide {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tool-guide > div {
  padding: 1.1rem;
  background: #fff;
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
}

.tool-guide h2 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-weight: 800;
}

.tool-guide p,
.tool-guide li {
  color: var(--tb-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.tool-guide ol {
  margin: 0;
  padding-left: 1.2rem;
}

.tool-workspace {
  align-items: stretch;
}

.tool-panel,
.status-card {
  border-color: #d6e2f2;
  box-shadow: var(--tb-shadow);
}

.tool-panel .form-label {
  color: var(--tb-text);
  font-size: 0.86rem;
  font-weight: 800;
}

.form-control,
.form-select {
  border-color: var(--tb-line);
  border-radius: 7px;
  color: var(--tb-text);
  font-size: 0.94rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--tb-primary);
  box-shadow: 0 0 0 0.2rem rgba(20, 99, 255, 0.12);
}

.btn-action {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.45rem;
  min-width: 9.5rem;
  justify-content: center;
}

.status-card {
  position: sticky;
  top: 6rem;
}

.status-kicker {
  margin: 0.45rem 0 1rem;
  color: var(--tb-muted);
  font-size: 0.88rem;
}

.result-box {
  white-space: pre-wrap;
  word-break: break-word;
  color: #243955;
  background: #f8fbff;
  border: 1px solid var(--tb-line);
  border-radius: 7px;
  padding: 1rem;
  min-height: 190px;
  font-size: 0.9rem;
}

.progress-panel .progress {
  height: 0.65rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.55rem;
  font-size: 0.86rem;
  color: var(--tb-muted);
}

.faq-card,
.related-card {
  box-shadow: none;
}

.site-footer {
  color: #dce9ff;
  background: linear-gradient(135deg, #052552, #07376f 52%, #06224c);
}

.site-footer h5,
.site-footer h6 {
  color: #fff;
}

.footer-copy,
.site-footer .text-muted {
  color: rgba(220, 233, 255, 0.75) !important;
}

.footer-links {
  display: grid;
  gap: 0.35rem;
}

.footer-links a,
.site-footer a {
  color: rgba(220, 233, 255, 0.86);
  text-decoration: none;
}

.footer-subscribe {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.2rem;
  padding-top: 1rem;
  color: rgba(220, 233, 255, 0.62);
  border-top: 1px solid rgba(220, 233, 255, 0.16);
  font-size: 0.82rem;
}

@media (max-width: 1200px) {
  .tool-card-grid,
  .category-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .left-rail,
  .right-rail {
    display: none !important;
  }
}

@media (max-width: 991px) {
  .toolbox-hero h1 {
    max-width: 12ch;
  }

  .hero-visual {
    min-height: 240px;
  }

  .toolbox-lid,
  .toolbox-bin {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .toolbox-lid {
    transform: translateX(-50%) rotate(7deg);
  }

  .tool-card-grid,
  .category-card-grid,
  .guide-grid,
  .tool-guide,
  .trust-band {
    grid-template-columns: 1fr 1fr;
  }

  .status-card {
    position: static;
  }
}

@media (max-width: 767px) {
  .site-main {
    padding-top: 1.2rem;
  }

  .toolbox-hero {
    min-height: auto;
    padding-top: 1.4rem;
  }

  .toolbox-hero h1 {
    font-size: 3rem;
  }

  .hero-search {
    grid-template-columns: 2.8rem 1fr;
    height: auto;
  }

  .hero-search .btn {
    grid-column: 1 / -1;
    height: 46px;
    border-radius: 0;
  }

  .hero-visual {
    display: none;
  }

  .category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-card-grid,
  .category-card-grid,
  .guide-grid,
  .tool-guide,
  .trust-band {
    grid-template-columns: 1fr;
  }

  .final-cta,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

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