/**
 * smallai.tools - Tool Educational Documentation & Stepper UI
 * Designed to match Reference Documentation Layout (UIDAI/e-Aadhaar style)
 * Scoped strictly to tool pages (.tool-doc-section)
 */

html, body {
  overflow-x: clip !important;
}

.tool-doc-section {
  padding: 3.5rem 0 5.5rem;
  background: var(--paper);
  border-top: 1px solid var(--line);
  position: relative;
  width: 100%;
  clear: both;
}

.tool-doc-container {
  max-width: 1240px;
  width: 100%;
  margin-inline: auto;
  padding-inline: 24px;
  box-sizing: border-box;
}

.tool-doc-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
  align-items: stretch;
  width: 100%;
}

/* -------------------------------------------------------------------------
   Left Column: Sticky "ON THIS PAGE" Navigation (Desktop)
   ------------------------------------------------------------------------- */
.tool-doc-sidebar {
  position: relative;
  display: block;
  align-self: stretch;
  height: 100%;
}

.tool-doc-toc-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.tool-doc-toc-sticky::-webkit-scrollbar {
  width: 4px;
}

.tool-doc-toc-sticky::-webkit-scrollbar-track {
  background: transparent;
}

.tool-doc-toc-sticky::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}

.tool-doc-toc-header {
  margin-bottom: 14px;
}

.tool-doc-toc-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  user-select: none;
}

.tool-doc-toc-nav {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--line);
  position: relative;
}

.tool-doc-toc-link {
  display: block;
  padding: 8px 0 8px 16px;
  margin-left: -2px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
  text-decoration: none !important;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  font-weight: 500;
}

.tool-doc-toc-link:hover {
  color: var(--indigo);
}

.tool-doc-toc-link.active {
  color: var(--indigo);
  font-weight: 600;
  border-left-color: var(--indigo);
}

/* -------------------------------------------------------------------------
   Mobile Jump Navigation Pills (Tablets & Mobile)
   ------------------------------------------------------------------------- */
.tool-doc-mobile-toc-bar {
  display: none;
  margin-bottom: 2rem;
  padding: 12px 16px;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tool-doc-mobile-toc-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.tool-doc-mobile-toc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.tool-doc-mobile-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.tool-doc-mobile-pills::-webkit-scrollbar {
  display: none;
}

.tool-doc-mobile-pill {
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 9999px;
  background: var(--solidbw);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  text-decoration: none !important;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tool-doc-mobile-pill.active,
.tool-doc-mobile-pill:hover {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #ffffff !important;
}

/* -------------------------------------------------------------------------
   Right Main Column Documentation Area
   ------------------------------------------------------------------------- */
.tool-doc-main {
  min-width: 0;
  max-width: 860px;
  width: 100%;
}

.tool-doc-block {
  scroll-margin-top: 100px;
}

.tool-doc-heading {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.32;
  letter-spacing: -0.015em;
}

.tool-doc-lead {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
}

/* -------------------------------------------------------------------------
   Tool In-Depth Overview (Unwanted Vertical Line Removed - Natural Paragraph)
   ------------------------------------------------------------------------- */
.tool-overview-body {
  border-left: none !important;
  border-right: none !important;
  padding: 0 !important;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
  word-break: break-word;
}

.tool-overview-body p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

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

.tool-doc-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 3.5rem 0;
}

/* -------------------------------------------------------------------------
   Connected Numbered Stepper (UIDAI/e-Aadhaar reference style)
   ------------------------------------------------------------------------- */
.tool-stepper {
  display: flex;
  flex-direction: column;
  margin: 1.5rem 0 0.5rem;
}

.tool-stepper-item {
  display: flex;
  gap: 20px;
  position: relative;
  align-items: stretch;
}

.tool-stepper-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 32px;
}

.tool-stepper-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid #60a5fa;
  background: var(--solidbw);
  color: #2563eb;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
  z-index: 2;
  flex-shrink: 0;
}

html[data-theme="dark"] .tool-stepper-circle {
  background: #1e293b;
  color: #93c5fd;
  border-color: #3b82f6;
}

.tool-stepper-line {
  width: 2px;
  flex: 1;
  min-height: 28px;
  border-left: 2px dotted #93c5fd;
  margin: 4px 0;
}

html[data-theme="dark"] .tool-stepper-line {
  border-left-color: #3b82f6;
  opacity: 0.6;
}

.tool-stepper-content {
  padding-bottom: 2.25rem;
  flex: 1;
  min-width: 0;
}

.tool-stepper-item.is-last .tool-stepper-content {
  padding-bottom: 0.5rem;
}

.tool-stepper-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.tool-stepper-text-col {
  min-width: 0;
}

.tool-stepper-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 4px 0 6px;
  line-height: 1.4;
}

.tool-stepper-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
}

.tool-stepper-img-col {
  min-width: 0;
}

.tool-stepper-img-wrap {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-alt);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 100%;
}

.tool-stepper-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 768px) {
  .tool-stepper-body-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .tool-stepper-img-wrap {
    max-width: 500px;
  }
}

/* -------------------------------------------------------------------------
   Feature Item with Checkmark Badge
   ------------------------------------------------------------------------- */
.tool-feature-item-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.tool-feature-check-icon {
  flex-shrink: 0;
  display: flex;
  margin-top: 2px;
}

.tool-feature-item-header h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.tool-feature-item-header h4::before {
  display: none !important;
}

/* -------------------------------------------------------------------------
   Checklist Item (Reference Screenshot 2 style)
   ------------------------------------------------------------------------- */
.tool-doc-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
}

.tool-doc-check-icon {
  flex-shrink: 0;
  display: flex;
  margin-top: 3px;
}

/* -------------------------------------------------------------------------
   Privacy Assurance Card
   ------------------------------------------------------------------------- */
.tool-privacy-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  padding: 1.75rem;
  border-radius: var(--radius);
}

.tool-privacy-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--indigo-tint);
  color: var(--indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-privacy-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.tool-privacy-desc {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

/* -------------------------------------------------------------------------
   Disclaimer Card
   ------------------------------------------------------------------------- */
.tool-disclaimer-card {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* -------------------------------------------------------------------------
   Related Tools Header
   ------------------------------------------------------------------------- */
.tool-related-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 12px;
}

.tool-related-explore-link {
  color: var(--indigo);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none !important;
}

.tool-related-explore-link:hover {
  text-decoration: underline !important;
}

/* -------------------------------------------------------------------------
   Responsive Media Queries
   ------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .tool-doc-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .tool-doc-sidebar {
    display: none !important;
  }
  .tool-doc-mobile-toc-bar {
    display: block;
  }
  .tool-doc-section {
    padding: 2.5rem 0 4.5rem;
  }
  .tool-doc-heading {
    font-size: 1.45rem;
  }
}
