/* ─────────────────────────────────────────────────────────────────────────
   Fospertise Tools & CBM Calculator Styles
   Clean Light Theme matching Fospertise Website Inner Pages Design System
───────────────────────────────────────────────────────────────────────── */

:root {
  --tools-page-bg: #ffffff;
  --tools-section-bg: #f8fafc;
  --tools-card-bg: #ffffff;
  --tools-card-border: #e2e8f0;
  --tools-card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --tools-card-shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.1);
  --tools-text-primary: #0f172a;
  --tools-text-secondary: #475569;
  --tools-text-muted: #64748b;
  --tools-primary-brand: #1a1a2e;
  --tools-accent: #c3f73a;
  --tools-accent-dark: #0f172a;
}

/* Page Background */
body.tools-page-body {
  background-color: var(--tools-page-bg);
  color: var(--tools-text-primary);
}

/* Hero Section */
.tools-light-hero {
  padding-top: 150px;
  padding-bottom: 50px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #f1f5f9;
}

.tools-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.tools-hero-badge i {
  color: #0284c7;
}

.tools-hero-title {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.15;
  color: #0f172a;
  font-family: var(--tp-ff-clash, 'Clash Display', sans-serif);
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .tools-hero-title {
    font-size: 34px;
  }
}

.tools-hero-desc {
  font-size: 18px;
  color: #475569;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Breadcrumb */
.tools-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
  font-size: 14px;
  color: #94a3b8;
}

.tools-breadcrumb a {
  color: #64748b;
  font-weight: 500;
  transition: color 0.2s;
}

.tools-breadcrumb a:hover {
  color: #0f172a;
}

.tools-breadcrumb span.sep {
  color: #cbd5e1;
}

.tools-breadcrumb span.current {
  color: #0f172a;
  font-weight: 600;
}

/* Main Calculator Card (Left) */
.cbm-calc-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 35px 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .cbm-calc-wrapper {
    padding: 24px 18px;
    border-radius: 16px;
  }
}

/* Unit Selection Tabs */
.cbm-unit-tabs-wrapper {
  margin-bottom: 24px;
}

.cbm-unit-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cbm-unit-label span {
  font-size: 15px;
  font-weight: 600;
  color: #030303;
  font-family: var(--tp-ff-p, 'Plus Jakarta Sans', sans-serif);
  letter-spacing: -0.01em;
}

.cbm-unit-label .cbm-unit-hint {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 400;
}

.cbm-unit-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #f8fafc;
  padding: 5px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.cbm-unit-tab-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--tp-ff-p, 'Plus Jakarta Sans', sans-serif);
  color: #64748b;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cbm-unit-tab-btn:hover {
  color: #030303;
  background: rgba(255, 255, 255, 0.8);
}

.cbm-unit-tab-btn.active {
  background: #030303;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Input Fields matching Website Design System (contact.html / careers) */
.cbm-input-group {
  margin-bottom: 22px;
}

.cbm-input-label {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  font-family: var(--tp-ff-p, 'Plus Jakarta Sans', sans-serif);
  color: #030303;
  margin-bottom: 8px;
  line-height: 1.4;
}

.cbm-input-label .required-dot {
  color: #ef4444;
  margin-left: 4px;
}

.cbm-input-label .optional-tag {
  font-size: 13px;
  font-weight: 400;
  color: #94a3b8;
  margin-left: auto;
}

.cbm-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.cbm-input-control {
  width: 100%;
  height: 56px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0 70px 0 18px;
  color: #030303;
  font-size: 16px;
  font-weight: 500;
  font-family: var(--tp-ff-p, 'Plus Jakarta Sans', sans-serif);
  outline: none;
  transition: all 0.25s ease;
}

.cbm-input-control::placeholder {
  color: #dadee0;
  font-weight: 400;
  font-size: 16px;
}

.cbm-input-control:focus {
  background-color: #ffffff;
  border-color: #e2e8f0;
  box-shadow: none;
  outline: none;
}

.cbm-input-unit-badge {
  position: absolute;
  right: 18px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--tp-ff-p, 'Plus Jakarta Sans', sans-serif);
  color: #94a3b8;
  background: transparent;
  padding: 0;
  pointer-events: none;
  user-select: none;
}

/* Feet + Inches Dual Input Box */
.cbm-feet-dual-input {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Quantity Field */
.cbm-qty-wrapper {
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px dashed #e2e8f0;
}

/* Actions */
.cbm-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.cbm-calc-btn {
  flex: 1;
  height: 56px;
  background: #030303;
  color: #ffffff;
  border: 1px solid #030303;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--tp-ff-p, 'Plus Jakarta Sans', sans-serif);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
  letter-spacing: -0.01em;
}

.cbm-calc-btn:hover {
  background: var(--tp-theme-primary);
  color: #030303;
  border-color: var(--tp-theme-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.cbm-reset-btn {
  height: 56px;
  padding: 0 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--tp-ff-p, 'Plus Jakarta Sans', sans-serif);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cbm-reset-btn:hover {
  background: #f8fafc;
  border-color: #030303;
  color: #030303;
}

/* ─────────────────────────────────────────────────────────────────────────
   Multi-Line CBM Cargo Table Calculator (Matching Reference UI)
───────────────────────────────────────────────────────────────────────── */
.cbm-table-calc-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.04);
}

@media (max-width: 991px) {
  .cbm-table-calc-card {
    padding: 20px 15px;
  }
}

.cbm-calc-top-bar {
  padding-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
}

.cbm-table-main-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  font-family: var(--tp-ff-clash, 'Clash Display', sans-serif);
}

.cbm-table-sub-title {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

.cbm-btn-outline-sm {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cbm-btn-outline-sm:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Responsive Table */
.cbm-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 15px;
  padding-bottom: 8px;
}

.cbm-calc-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0 10px;
  font-family: var(--tp-ff-p, 'Plus Jakarta Sans', sans-serif);
}

/* Table Header */
.cbm-calc-table thead th {
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
}

.cbm-info-icon {
  display: inline-block;
  margin-left: 3px;
  font-size: 13px;
  color: #64748b;
  cursor: help;
  user-select: none;
}

.cbm-calc-table th.th-unit { width: 90px; }
.cbm-calc-table th.th-dim { width: 110px; }
.cbm-calc-table th.th-weight { width: 120px; }
.cbm-calc-table th.th-pkg { width: 90px; }
.cbm-calc-table th.th-calc { width: 110px; }
.cbm-calc-table th.th-action { width: 40px; }

/* Table Body Cells */
.cbm-calc-table tbody td {
  padding: 4px 6px;
  vertical-align: middle;
}

/* Table Input Styling */
.cbm-cell-input-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0 8px;
  transition: all 0.2s ease;
}

.cbm-cell-input-box:focus-within {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: none;
  outline: none;
}

.cbm-row-control {
  width: 100%;
  height: 38px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  font-family: var(--tp-ff-p, 'Plus Jakarta Sans', sans-serif);
  padding: 0 4px;
  text-align: right;
}

.cbm-row-control:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.cbm-cell-input-box.no-unit .cbm-row-control {
  text-align: center;
}

/* Hide HTML5 number spinners */
.cbm-row-control::-webkit-inner-spin-button,
.cbm-row-control::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.cbm-row-control[type="number"] {
  -moz-appearance: textfield;
}

.cbm-cell-unit-badge {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  padding-left: 4px;
}

/* Unit Dropdown */
.cbm-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.cbm-unit-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0 26px 0 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23475569%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: all 0.2s ease;
}

.cbm-unit-select:focus {
  background-color: #ffffff;
  border-color: #e2e8f0;
  box-shadow: none !important;
  outline: none !important;
}

/* Computed Readouts */
.cbm-td-calc {
  font-size: 14px;
  color: #0f172a;
  font-weight: 500;
  padding: 0 8px;
  white-space: nowrap;
}

.cbm-td-calc.bold {
  font-weight: 700;
}

.cbm-calc-val {
  display: inline-block;
}

/* Delete Row Button */
.cbm-row-del-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.cbm-row-del-btn:hover:not(:disabled) {
  background: #fee2e2;
  color: #ef4444;
}

.cbm-row-del-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

/* Table Footer / Totals Row */
.cbm-calc-table tfoot td {
  padding-top: 18px;
  padding-bottom: 6px;
  border-top: 1px solid #e2e8f0;
  vertical-align: middle;
}

/* Add line — uses site .cst-btn.bg-black; only size tweaks here */
.cbm-add-line-btn.cst-btn {
  font-size: 14px;
  padding: 13px 18px 11px;
  cursor: pointer;
  white-space: nowrap;
}

.cbm-add-line-btn .text-1 i,
.cbm-add-line-btn .text-2 i {
  margin-right: 6px;
}

.cbm-totals-label {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  padding-right: 12px;
}

.totals-val {
  font-size: 14px;
  color: #0f172a;
}

.totals-val.bold {
  font-weight: 700;
}

.totals-val.total-highlight {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.totals-sub-val {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

/* ── Tablet & Mobile: table → stacked line cards ───────────────────────── */
@media (max-width: 991px) {
  .cbm-calc-top-bar {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 14px;
  }

  .cbm-calc-top-actions {
    width: 100%;
  }

  .cbm-calc-top-actions .cbm-btn-outline-sm {
    flex: 1;
    justify-content: center;
    padding: 10px 14px;
  }

  .cbm-table-responsive {
    overflow-x: visible;
    padding-bottom: 0;
  }

  .cbm-calc-table {
    min-width: 0;
    border-spacing: 0;
  }

  .cbm-calc-table,
  .cbm-calc-table tbody,
  .cbm-calc-table tfoot {
    display: block;
    width: 100%;
  }

  .cbm-calc-table thead {
    display: none;
  }

  .cbm-calc-table tbody {
    counter-reset: cbm-line;
  }

  /* Each cargo line becomes a card */
  .cbm-calc-table tbody tr.cbm-table-row {
    counter-increment: cbm-line;
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
  }

  .cbm-calc-table tbody tr.cbm-table-row::before {
    content: "Line " counter(cbm-line);
    grid-column: 1 / -1;
    order: 0;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-right: 36px;
  }

  .cbm-calc-table tbody td {
    display: block;
    padding: 0;
    min-width: 0;
    text-align: left !important;
  }

  .cbm-calc-table tbody td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Row 1: dimensions */
  .cbm-td-length,
  .cbm-td-width,
  .cbm-td-height { grid-column: span 2; order: 1; }

  /* Row 2: unit, weight, packages */
  .cbm-td-unit,
  .cbm-td-weight,
  .cbm-td-pkg { grid-column: span 2; order: 2; }

  .cbm-cell-input-box,
  .cbm-unit-select {
    background-color: #ffffff;
  }

  .cbm-unit-select {
    width: 100%;
    height: 40px;
  }

  .cbm-row-control {
    height: 40px;
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  /* Row 3: computed readouts */
  .cbm-calc-table tbody td.cbm-td-calc {
    grid-column: span 2;
    order: 3;
    background: #eef2ff;
    border-radius: 8px;
    padding: 8px 10px;
    white-space: normal;
  }

  .cbm-calc-table tbody td.cbm-td-calc::before {
    margin-bottom: 2px;
  }

  .cbm-td-calc .cbm-calc-val {
    font-size: 14px;
    word-break: break-word;
  }

  /* Delete button pinned to card corner */
  .cbm-calc-table tbody td.cbm-td-action {
    position: absolute;
    top: 8px;
    right: 8px;
  }

  .cbm-row-del-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  /* Totals footer */
  .cbm-calc-table tfoot tr.cbm-totals-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .cbm-calc-table tfoot td {
    display: block;
    padding: 0;
    border-top: none;
    text-align: left !important;
  }

  .cbm-calc-table tfoot td.cbm-totals-btn-cell {
    grid-column: 1 / -1;
    padding-bottom: 6px;
  }

  .cbm-add-line-btn.cst-btn {
    width: 100%;
    text-align: center;
    padding: 15px 16px 12px;
  }

  .cbm-calc-table tfoot td.cbm-totals-label {
    grid-column: 1 / -1;
    padding: 14px 0 0;
    border-top: 1px solid #e2e8f0;
  }

  .cbm-calc-table tfoot td.cbm-totals-cft,
  .cbm-calc-table tfoot td.cbm-totals-empty {
    display: none;
  }

  .cbm-calc-table tfoot td.cbm-totals-pkgs,
  .cbm-calc-table tfoot td.cbm-totals-weight,
  .cbm-calc-table tfoot td.cbm-totals-volume {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
  }

  .cbm-calc-table tfoot td.cbm-totals-volume {
    background: #0f172a;
    border-color: #0f172a;
  }

  .cbm-calc-table tfoot td.cbm-totals-volume .totals-val,
  .cbm-calc-table tfoot td.cbm-totals-volume::before {
    color: #ffffff;
  }

  .cbm-calc-table tfoot td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 3px;
  }
}

/* Phones: readouts & totals as full-width rows */
@media (max-width: 575px) {
  .cbm-table-main-title {
    font-size: 18px;
  }

  .cbm-calc-table tbody tr.cbm-table-row {
    gap: 10px 8px;
    padding: 12px;
  }

  .cbm-cell-input-box {
    padding: 0 6px;
  }

  .cbm-row-control {
    padding: 0 2px;
  }

  .cbm-cell-unit-badge {
    font-size: 12px;
    padding-left: 2px;
  }

  .cbm-calc-table tbody td.cbm-td-calc {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  .cbm-calc-table tbody td.cbm-td-calc::before {
    margin-bottom: 0;
  }

  .cbm-calc-table tfoot tr.cbm-totals-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cbm-calc-table tfoot td.cbm-totals-pkgs,
  .cbm-calc-table tfoot td.cbm-totals-weight,
  .cbm-calc-table tfoot td.cbm-totals-volume {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .cbm-calc-table tfoot td[data-label]::before {
    margin-bottom: 0;
  }
}

.cbm-results-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 35px 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .cbm-results-card {
    padding: 24px 18px;
    border-radius: 16px;
  }
}

/* Placeholder state (visible before calculate) */
.cbm-results-placeholder {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
}

.cbm-results-placeholder .placeholder-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #0284c7;
  margin-bottom: 20px;
}

.cbm-results-placeholder .placeholder-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
  font-family: var(--tp-ff-clash, 'Clash Display', sans-serif);
}

.cbm-results-placeholder .placeholder-desc {
  font-size: 15px;
  color: #64748b;
  max-width: 360px;
  line-height: 1.6;
}

/* Active results header */
.cbm-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.cbm-results-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cbm-results-title i {
  color: #0284c7;
}

.cbm-copy-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cbm-copy-btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Primary Metric Box */
.cbm-primary-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 576px) {
  .cbm-primary-metrics {
    grid-template-columns: 1fr;
  }
}

.cbm-metric-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.cbm-metric-box.highlight {
  border-color: #0f172a;
  background: #ffffff;
}

.cbm-metric-box .metric-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.cbm-metric-box .metric-value {
  font-size: 30px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
  font-family: var(--tp-ff-clash, 'Clash Display', sans-serif);
}

.cbm-metric-box .metric-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

/* Secondary Detail Grid */
.cbm-secondary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

@media (max-width: 576px) {
  .cbm-secondary-grid {
    grid-template-columns: 1fr;
  }
}

.cbm-submetric-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}

.cbm-submetric-item .sub-label {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 2px;
}

.cbm-submetric-item .sub-val {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

/* Container Stuffing Estimate Cards */
.cbm-containers-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.cbm-containers-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cbm-container-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 576px) {
  .cbm-container-bars {
    grid-template-columns: 1fr;
  }
}

.cbm-container-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.cbm-container-item .con-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.cbm-container-item .con-cap {
  font-size: 10px;
  color: #64748b;
  margin-bottom: 6px;
}

.cbm-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}

.cbm-progress-bar-fill {
  height: 100%;
  background: #0f172a;
  border-radius: 999px;
  transition: width 0.4s ease;
  width: 0%;
}

.cbm-container-item .con-stat {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  display: flex;
  justify-content: space-between;
}

/* Formula Breakdown Box */
.cbm-formula-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin-top: 16px;
  font-size: 12px;
  color: #475569;
}

.cbm-formula-box .formula-head {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.cbm-formula-box code {
  color: #0f172a;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
}

/* Content & Guide Area */
.tools-content-area {
  padding-top: 60px;
  padding-bottom: 80px;
  background: #ffffff;
}

.tools-article-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 35px;
  margin-bottom: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

@media (max-width: 768px) {
  .tools-article-card {
    padding: 20px;
  }
}

.tools-article-title {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  font-family: var(--tp-ff-clash, 'Clash Display', sans-serif);
  margin-bottom: 16px;
}

.tools-article-card p {
  color: #475569;
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.tools-table-responsive {
  overflow-x: auto;
  margin: 20px 0;
}

.tools-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tools-table th {
  background: #f8fafc;
  color: #0f172a;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 700;
}

.tools-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
}

.tools-table tr:hover td {
  background: #f8fafc;
  color: #0f172a;
}

/* FAQ Accordion */
.tools-faq-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 18px 0;
}

.tools-faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0;
}

.tools-faq-question:hover {
  color: #0284c7;
}

.tools-faq-answer {
  padding-top: 12px;
  color: #475569;
  font-size: 15px;
  line-height: 1.7;
}

/* ─────────────────────────────────────────────────────────────────────────
   Tools Hub Grid (tools/index.html)
───────────────────────────────────────────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 390px));
  gap: 24px;
  margin-top: 35px;
}

@media (max-width: 992px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.tool-hub-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  position: relative;
}

.tool-hub-card:hover {
  transform: translateY(-6px);
  border-color: #cbd5e1;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.08);
}

.tool-hub-card.active-tool {
  border-top: 3px solid #0f172a;
}

.tool-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #0f172a;
  margin-bottom: 20px;
}

.tool-card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.tool-card-badge.badge-live {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.tool-card-badge.badge-soon {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.tool-card-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  font-family: var(--tp-ff-clash, 'Clash Display', sans-serif);
  margin-bottom: 12px;
}

.tool-card-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.tool-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  transition: all 0.2s;
}

.tool-hub-card:hover .tool-card-cta {
  gap: 12px;
  color: #0284c7;
}

.tool-hub-card.disabled-card {
  opacity: 0.7;
}

.tool-hub-card.disabled-card .tool-card-icon {
  background: #f8fafc;
  color: #94a3b8;
}
