/* ============================================================
   TOOLS INDEX PAGE STYLING
   ============================================================ */

/* Section labels and titles */
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.section-sub {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* ============================================================
   HOW TO START GUIDANCE
   ============================================================ */

.how-to-start {
  padding: 3rem 0 3.5rem 0;
  margin-top: -0.5rem;
}

.hs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 0;
}

.hs-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.hs-card:hover {
  background: var(--surface2);
  border-left-color: var(--accent);
  transform: translateX(2px);
}

.hs-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.hs-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.hs-text {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.hs-link {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
  align-self: flex-start;
}

.hs-link:hover {
  color: var(--accent);
  opacity: 0.7;
}

/* ============================================================
   WORKFLOW SECTION
   ============================================================ */

.workflow-section {
  padding: 3rem 0 3.5rem 0;
}

.workflow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 0;
}

.workflow-step {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-bright);
  border-radius: 2px;
  padding: 1.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.workflow-step:hover {
  background: var(--surface2);
  border-left-color: var(--accent);
  transform: translateX(2px);
}

.workflow-step-final {
  border-left-color: var(--accent2);
  background: rgba(123, 97, 255, 0.04);
}

.workflow-step-final:hover {
  background: rgba(123, 97, 255, 0.08);
  border-left-color: var(--accent2);
}

.workflow-phase {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.workflow-step-final .workflow-phase {
  color: var(--accent2);
}

.workflow-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.workflow-step-final .workflow-name {
  color: var(--accent2);
}

.workflow-desc {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}


@media (min-width: 900px) {
  .workflow-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem;
  }

  .workflow-step {
    border-left: none;
    border-top: 2px solid var(--border-bright);
    border-radius: 2px;
    padding: 1.2rem;
  }

  .workflow-step:hover {
    border-top-color: var(--accent);
    transform: translateY(-2px);
  }

  .workflow-step::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 1.2rem;
    height: 1px;
    background: var(--border);
    transform: translateY(-50%);
  }

  .workflow-step:last-child::after {
    display: none;
  }

  .workflow-step-final {
    border-top-color: var(--accent2);
  }

  .workflow-step-final:hover {
    border-top-color: var(--accent2);
  }

  .workflow-name {
    font-size: 1rem;
  }

  .workflow-desc {
    font-size: 0.85rem;
  }
}

@media (max-width: 900px) {
  .workflow-step {
    position: relative;
  }
}

/* ============================================================
   TOOL LIBRARY SECTIONS
   ============================================================ */

.tl-section {
  padding: 2.5rem 0 1.5rem 0;
}

.tl-group {
  margin-bottom: 4rem;
}

.tl-group:last-child {
  margin-bottom: 2rem;
}

.tl-group-header {
  margin-bottom: 2rem;
}

.tl-group-heading {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  padding: 0;
}

.tl-group-intro {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.5;
  margin: 0;
}

.tl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  auto-rows: max-content;
}

.tl-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-bright);
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  position: relative;
}

.tl-card:hover {
  background: var(--surface2);
  border-top-color: var(--accent);
}

.tl-card-tier-core {
  border-top-color: var(--accent);
}

.tl-card-tier-core:hover {
  border-top-color: var(--accent);
  background: var(--surface2);
}

.tl-card-featured {
  border-top-color: var(--accent2);
  border-color: var(--accent2);
  background: rgba(123, 97, 255, 0.04);
}

.tl-card-featured:hover {
  border-top-color: var(--accent2);
  background: rgba(123, 97, 255, 0.08);
}

.tl-card-anchor-label {
  position: absolute;
  top: -12px;
  left: 22px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--accent2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--bg);
  padding: 0 6px;
}

.tl-card-top {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.tl-badge {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  white-space: nowrap;
}

.tl-badge.live {
  color: var(--accent3);
  border: 1px solid rgba(0, 255, 136, 0.3);
  background: rgba(0, 255, 136, 0.05);
}

.tl-badge .blink {
  display: inline-block;
  margin-right: 4px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.tl-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  transition: color 0.2s ease;
  line-height: 1.3;
}

.tl-card:hover .tl-title {
  color: var(--accent);
}

.tl-card-featured:hover .tl-title {
  color: var(--accent2);
}

.tl-desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 14px;
  flex: 1;
}

.tl-params {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tl-param {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  border: 1px solid var(--border-bright);
  padding: 3px 8px;
  border-radius: 2px;
}

.tl-output {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  padding-top: 10px;
  border-top: 1px solid var(--border);
  transition: color 0.2s ease;
}

.tl-card:hover .tl-output {
  color: var(--text-mid);
}

/* ============================================================
   DECISION MATRIX / COMPARISON TABLE SECTION
   ============================================================ */

.decision-matrix {
  padding: 3rem 0 3rem 0;
}

.section-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 2rem 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-rule::before {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.section-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border));
}

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

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.compare-table th {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  padding: 11px 16px;
  text-align: left;
  background: var(--surface2);
  border-bottom: 1px solid var(--border-bright);
  border-right: 1px solid var(--border);
  font-weight: 600;
}

.compare-table th:last-child {
  border-right: none;
}

.compare-table td {
  padding: 12px 16px;
  color: var(--text-mid);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: middle;
}

.compare-table td:last-child {
  border-right: none;
}

.compare-table td:first-child {
  font-weight: 500;
  color: var(--text);
}

.compare-table a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.compare-table a:hover {
  color: var(--accent);
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table tbody tr:hover td {
  background: var(--surface2);
}

.featured-row td {
  background: rgba(123, 97, 255, 0.04);
  border-bottom-color: rgba(123, 97, 255, 0.2);
}

.featured-row:hover td {
  background: rgba(123, 97, 255, 0.08);
}

.featured-row td:first-child a {
  color: var(--accent2);
  font-weight: 600;
}

.featured-row td:first-child a:hover {
  color: var(--accent2);
  opacity: 0.8;
}

.category-header td {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 14px 16px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.category-header:hover td {
  background: var(--surface);
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

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

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

  .workflow-step {
    border-left: 3px solid var(--border-bright);
    border-top: none;
  }

  .workflow-step:hover {
    transform: translateX(2px);
  }

  .workflow-step-final {
    border-left-color: var(--accent2);
  }

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

  .tl-section {
    padding: 2rem 0 1rem 0;
  }

  .tl-group {
    margin-bottom: 2.5rem;
  }

  .section-rule {
    margin: 2rem 0 1.5rem 0;
  }

  .decision-matrix {
    padding: 2rem 0 2rem 0;
  }
}

@media (max-width: 640px) {
  .section-label {
    font-size: 10px;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
  }

  .section-sub {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .how-to-start {
    padding: 2.5rem 0 2.5rem 0;
  }

  .hs-card {
    padding: 1.2rem;
  }

  .hs-title {
    font-size: 1rem;
  }

  .hs-text {
    font-size: 0.85rem;
  }

  .workflow-section {
    padding: 2.5rem 0 2.5rem 0;
  }

  .workflow-step {
    padding: 1.2rem;
  }

  .workflow-name {
    font-size: 1rem;
  }

  .workflow-desc {
    font-size: 0.85rem;
  }

  .tl-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tl-card {
    padding: 16px 18px;
  }

  .tl-card-top {
    margin-bottom: 8px;
  }

  .tl-title {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .tl-desc {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .tl-params {
    gap: 4px;
    margin-bottom: 10px;
  }

  .tl-output {
    font-size: 10px;
    padding-top: 10px;
  }

  .tl-group-heading {
    font-size: 11px;
  }

  .tl-group-intro {
    font-size: 0.9rem;
  }

  .compare-table {
    font-size: 12px;
  }

  .compare-table th,
  .compare-table td {
    padding: 8px 12px;
  }

  .compare-table th {
    font-size: 9px;
  }

  .compare-table td {
    font-size: 11px;
  }

  .decision-matrix {
    padding: 2rem 0 2rem 0;
  }
}
