/*
 * /tools: the tools index and each tool. Its own stylesheet, scoped to .tools, so nothing
 * here touches the article layout in insights.css. Type follows the homepage rules: Poppins
 * headings in navy, DM Sans text, no eyebrows, no all-caps labels. Tokens (--navy, --blue,
 * --cyan, --ink, --line) come from styles.css; the fallbacks keep the page legible without it.
 *
 * Print: a tool prints its own summary (.tl-print) and nothing else. The header, footer,
 * explanation and controls are hidden.
 */

.tools {
  --tl-navy: var(--navy, #011f2e);
  --tl-blue: var(--blue, #015579);
  --tl-cyan: var(--cyan, #00cef3);
  --tl-ink: var(--ink, #1b2327);
  --tl-line: var(--line, #e4e8ea);
  --tl-muted: #596065;
  --tl-soft: #f5f7f8;
  --tl-head: Poppins, 'DM Sans', Arial, sans-serif;

  color: var(--tl-ink);
}

.tools .tl-wrap {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 60px;
}

.tools h1,
.tools h2,
.tools h3 {
  font-family: var(--tl-head);
  color: var(--tl-navy);
}

/* ---- Breadcrumb and heading --------------------------------------------- */

.tools .tl-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--tl-muted);
}

.tools .tl-crumbs li + li::before {
  content: '/';
  margin-right: 6px;
  color: #b6bdc1;
}

.tools .tl-crumbs a {
  color: inherit;
  text-decoration: none;
}

.tools .tl-crumbs a:hover {
  color: var(--tl-navy);
}

.tools .tl-head {
  padding: 26px 0 10px;
  text-align: center;
}

.tools .tl-head h1 {
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.tools .tl-dek {
  max-width: 760px;
  margin: 20px auto 0;
  font-size: 20px;
  line-height: 1.5;
  color: var(--tl-muted);
}

.tools .tl-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 18px 0 0;
  font-size: 15px;
  color: var(--tl-muted);
}

.tools .tl-meta a {
  color: inherit;
}

/* ---- The tool ------------------------------------------------------------- */

.tools .tl-tool {
  margin-top: 30px;
}

.tools .tl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.tools .tl-form,
.tools .tl-side {
  min-width: 0;
}

.tools .tl-side {
  position: sticky;
  top: 118px;
}

.tools .tl-intro-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.tools .tl-lede {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--tl-muted);
}

.tools fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.tools .tl-block {
  margin: 0 0 18px;
  padding: 20px 22px;
  border: 1px solid var(--tl-line);
  border-radius: 18px;
  background: #fff;
}

.tools .tl-block > legend {
  float: left;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  font-family: var(--tl-head);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--tl-navy);
}

.tools .tl-block > legend + * {
  clear: both;
}

.tools .tl-block > legend i {
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--tl-muted);
}

.tools .tl-hint {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--tl-muted);
}

.tools .tl-hint-tight {
  margin: 10px 0 0;
}

.tools .tl-hint a,
.tools .tl-note a,
.tools .tl-about a,
.tools .tl-index-note a {
  color: var(--tl-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Inputs --------------------------------------------------------------- */

.tools .tl-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tools .tl-field {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}

.tools .tl-field > span:first-child {
  font-size: 15px;
  font-weight: 500;
  color: var(--tl-navy);
}

.tools .tl-field > span i {
  font-style: normal;
  font-weight: 400;
  color: var(--tl-muted);
}

.tools input[type='text'],
.tools input[type='date'],
.tools input[type='time'],
.tools input[type='number'],
.tools select,
.tools textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #c9d1d5;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: var(--tl-ink);
}

.tools textarea {
  resize: vertical;
}

.tools input:focus-visible,
.tools select:focus-visible,
.tools textarea:focus-visible,
.tools button:focus-visible,
.tools summary:focus-visible,
.tools a:focus-visible {
  outline: 3px solid var(--tl-cyan);
  outline-offset: 2px;
}

.tools .tl-notes {
  margin: 0 0 18px;
}

.tools .tl-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  align-self: end;
  font-size: 16px;
  cursor: pointer;
}

.tools .tl-check input {
  width: 22px;
  height: 22px;
  accent-color: var(--tl-navy);
}

.tools .tl-inline {
  display: flex;
  gap: 8px;
}

.tools .tl-inline input {
  flex: 1;
  min-width: 0;
}

.tools .tl-percent {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tools .tl-percent input {
  max-width: 110px;
}

.tools .tl-off {
  margin-top: 14px;
}

.tools .tl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.tools .tl-chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 12px;
  border-radius: 999px;
  background: var(--tl-soft);
  font-size: 14px;
}

.tools .tl-chips button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #e4e9ec;
  font: inherit;
  font-size: 13px;
  color: var(--tl-navy);
  cursor: pointer;
}

/* ---- Buttons -------------------------------------------------------------- */

.tools .tl-secondary,
.tools .tl-remove {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid #c9d1d5;
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--tl-navy);
  cursor: pointer;
}

.tools .tl-secondary:hover:not(:disabled),
.tools .tl-remove:hover {
  border-color: var(--tl-navy);
}

.tools button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tools .tl-remove {
  min-height: 46px;
  padding: 0 12px;
  font-size: 14px;
}

.tools .tl-link-btn {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--tl-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---- Yes / No and 1 to 5 choices ------------------------------------------ */

.tools .tl-gate,
.tools .tl-criterion {
  padding: 14px 0;
  border-top: 1px solid var(--tl-line);
}

.tools .tl-gate > legend,
.tools .tl-criterion > legend {
  float: left;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--tl-navy);
}

.tools .tl-gate > legend + *,
.tools .tl-criterion > legend + * {
  clear: both;
}

.tools .tl-weight {
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tl-soft);
  font-size: 13px;
  font-weight: 400;
  color: var(--tl-muted);
}

.tools .tl-pills,
.tools .tl-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tools .tl-pill input,
.tools .tl-rate input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
}

.tools .tl-pill,
.tools .tl-rate {
  position: relative;
  cursor: pointer;
}

.tools .tl-pill span,
.tools .tl-rate span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid #c9d1d5;
  border-radius: 12px;
  background: #fff;
  font-size: 16px;
  color: var(--tl-ink);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tools .tl-rate span {
  min-width: 54px;
  padding: 0 12px;
  font-weight: 500;
}

.tools .tl-pill:hover span,
.tools .tl-rate:hover span {
  border-color: var(--tl-navy);
}

.tools .tl-pill input:checked + span,
.tools .tl-rate input:checked + span {
  border-color: var(--tl-navy);
  background: var(--tl-navy);
  color: #fff;
}

.tools .tl-pill input:checked + span[data-answer='not-met'] {
  border-color: #a42c47;
  background: #a42c47;
}

.tools .tl-pill input:checked + span[data-answer='unsure'] {
  border-color: #7a4f08;
  background: #7a4f08;
}

.tools .tl-pill input:focus-visible + span,
.tools .tl-rate input:focus-visible + span {
  outline: 3px solid var(--tl-cyan);
  outline-offset: 2px;
}

.tools .tl-ends {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--tl-muted);
}

/* ---- Customize ------------------------------------------------------------ */

.tools .tl-customize {
  margin: 0 0 18px;
  border: 1px solid var(--tl-line);
  border-radius: 18px;
  background: var(--tl-soft);
}

.tools .tl-customize summary {
  padding: 16px 22px;
  font-size: 16px;
  font-weight: 500;
  color: var(--tl-navy);
  cursor: pointer;
}

.tools .tl-customize-body {
  padding: 0 22px 22px;
}

.tools .tl-customize h3 {
  margin: 20px 0 10px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.tools .tl-edit-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.tools .tl-edit-row input {
  flex: 1;
  min-width: 0;
}

.tools .tl-edit-row select {
  width: auto;
  flex: 0 0 auto;
}

.tools .tl-add {
  margin-top: 4px;
}

/* ---- Result ---------------------------------------------------------------- */

.tools .tl-result {
  padding: 24px;
  border: 1px solid var(--tl-line);
  border-left-width: 6px;
  border-radius: 18px;
  background: #fff;
}

.tools .tl-result-title {
  margin: 0;
  font-size: 15px;
  color: var(--tl-muted);
}

.tools .tl-verdict {
  margin: 4px 0 0;
  font-family: var(--tl-head);
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.tools .tl-score {
  margin: 12px 0 0;
  font-size: 17px;
  color: var(--tl-ink);
}

.tools .tl-score b {
  font-family: var(--tl-head);
  font-size: 26px;
}

.tools .tl-score span {
  color: var(--tl-muted);
}

.tools .tl-gauge {
  position: relative;
  height: 10px;
  margin: 12px 0 6px;
  border-radius: 10px;
  background: #e1e6e9;
}

.tools .tl-gauge-fill {
  display: block;
  height: 100%;
  border-radius: 10px;
  background: currentColor;
  transition: width 0.3s ease;
}

.tools .tl-gauge-mark {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 18px;
  margin-left: -1px;
  background: #5b6970;
}

.tools .tl-gauge-key {
  margin: 0;
  font-size: 13.5px;
  color: var(--tl-muted);
}

.tools .tl-reason {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--tl-ink);
}

.tools .tl-v-bid { border-left-color: #0b7356; color: #0b6a4f; background: #f1f9f6; }
.tools .tl-v-discuss { border-left-color: #a86f0a; color: #7a4f08; background: #fdf7ea; }
.tools .tl-v-nobid { border-left-color: #b8324f; color: #a42c47; background: #fcf1f4; }
.tools .tl-v-confirm { border-left-color: var(--tl-blue); color: var(--tl-blue); background: #eef6fa; }
.tools .tl-v-wait { border-left-color: #8a949a; color: #3b4449; background: var(--tl-soft); }
.tools .tl-v-plan { border-left-color: var(--tl-cyan); color: var(--tl-navy); background: #eef8fb; }

.tools .tl-result .tl-reason,
.tools .tl-result .tl-score {
  color: var(--tl-ink);
}

.tools .tl-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.tools .tl-stats div {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
}

.tools .tl-stats dt {
  font-size: 13px;
  line-height: 1.3;
  color: var(--tl-muted);
}

.tools .tl-stats dd {
  margin: 4px 0 0;
  font-family: var(--tl-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--tl-navy);
}

.tools .tl-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 16px;
}

.tools .tl-actions .button {
  margin-top: 0;
  min-height: 46px;
  padding: 10px 22px;
  font-size: 15px;
}

.tools .tl-privacy {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tl-muted);
}

.tools .tl-note {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--tl-line);
  border-radius: 14px;
  background: #fff;
}

.tools .tl-note-warn {
  border-color: #e6c88a;
  background: #fdf7ea;
}

.tools .tl-note p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--tl-ink);
}

.tools .tl-note .tl-note-source {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--tl-muted);
}

.tools .tl-warnings {
  margin: 14px 0 0;
  padding: 14px 18px 14px 34px;
  border: 1px solid #e6c88a;
  border-radius: 14px;
  background: #fdf7ea;
  font-size: 15px;
  line-height: 1.5;
  color: #5c3b05;
}

.tools .tl-warnings li + li {
  margin-top: 6px;
}

/* ---- Timeline --------------------------------------------------------------- */

.tools .tl-timeline {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.tools .tl-timeline li {
  position: relative;
  padding: 12px 0 12px 22px;
  border-left: 2px solid var(--tl-line);
  margin-left: 6px;
}

.tools .tl-timeline li::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 18px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--tl-navy);
  border-radius: 50%;
  background: #fff;
}

.tools .tl-timeline .tl-step::before {
  background: var(--tl-navy);
}

.tools .tl-timeline p {
  margin: 0;
}

.tools .tl-when {
  font-size: 14px;
  color: var(--tl-muted);
}

.tools .tl-what {
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--tl-navy);
}

.tools .tl-detail {
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--tl-muted);
}

/* ---- Mobile summary bar ----------------------------------------------------- */

.tools .tl-minibar {
  display: none;
}

/* ---- Product action ---------------------------------------------------------- */

.tools .tl-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  margin-top: 30px;
  padding: 26px 30px;
  border-radius: 22px;
  background: var(--tl-soft);
}

.tools .tl-cta h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.tools .tl-cta p {
  margin: 8px 0 0;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--tl-muted);
}

.tools .tl-cta .button {
  margin-top: 0;
}

/* ---- Explanation ------------------------------------------------------------- */

.tools .tl-about {
  max-width: 740px;
  margin: 44px auto 0;
}

.tools .tl-about h2 {
  margin: 34px 0 0;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.tools .tl-about p {
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.65;
  color: var(--tl-muted);
}

.tools .tl-related {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.tools .tl-related li {
  padding: 12px 0;
  border-top: 1px solid var(--tl-line);
  font-size: 18px;
}

/* ---- Index -------------------------------------------------------------------- */

.tools .tl-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.tools .tl-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 26px 26px 24px;
  border: 1px solid #eceef0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 7px 18px #011f2e08;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.tools .tl-card:hover {
  transform: translateY(-3px);
  border-color: #cfe7ef;
  box-shadow: 0 16px 34px #011f2e12;
}

.tools .tl-card h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.tools .tl-card p {
  margin: 10px 0 0;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--tl-muted);
}

.tools .tl-card ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.tools .tl-card li {
  padding: 8px 0;
  border-top: 1px solid var(--tl-line);
  font-size: 15px;
  color: var(--tl-muted);
}

.tools .tl-card-go {
  margin-top: auto;
  padding-top: 18px;
  font-weight: 500;
  color: var(--tl-blue);
}

.tools .tl-index-note {
  max-width: 740px;
  margin: 30px auto 0;
  font-size: 17px;
  line-height: 1.6;
  text-align: center;
  color: var(--tl-muted);
}

/* ---- Print summary: hidden on screen ------------------------------------------- */

.tools .tl-print {
  display: none;
}

/* ---- Small screens --------------------------------------------------------------- */

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

  .tools .tl-side {
    position: static;
  }

  .tools .tl-minibar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding: 12px 16px;
    border: 1px solid var(--tl-line);
    border-left-width: 6px;
    border-radius: 14px;
    box-shadow: 0 -6px 22px #011f2e14;
    font-size: 15px;
  }

  .tools .tl-minibar b {
    font-family: var(--tl-head);
    font-size: 18px;
  }

  .tools .tl-minibar span {
    color: var(--tl-ink);
  }
}

@media (max-width: 700px) {
  .tools .tl-wrap {
    width: calc(100% - 32px);
    padding-bottom: 40px;
  }

  .tools .tl-dek {
    font-size: 18px;
  }

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

  .tools .tl-block {
    padding: 16px;
  }

  .tools .tl-customize-body {
    padding: 0 16px 18px;
  }

  .tools .tl-customize summary {
    padding: 14px 16px;
  }

  .tools .tl-edit-row {
    flex-wrap: wrap;
  }

  .tools .tl-edit-row input {
    flex-basis: 100%;
  }

  .tools .tl-edit-row select {
    flex: 1;
  }

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

  .tools .tl-stats div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

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

  .tools .tl-cta {
    padding: 22px;
  }

  .tools .tl-cta .button {
    width: 100%;
  }

  .tools .tl-actions .button,
  .tools .tl-actions .tl-secondary {
    flex: 1 1 100%;
  }

  .tools .tl-about p,
  .tools .tl-related li {
    font-size: 17px;
  }

  .tools .tl-rate span {
    min-width: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tools .tl-gauge-fill,
  .tools .tl-card,
  .tools .tl-pill span,
  .tools .tl-rate span {
    transition: none;
  }
}

/* ---- Print ------------------------------------------------------------------------ */

@media print {
  @page {
    margin: 16mm;
  }

  body {
    background: #fff !important;
  }

  .marketing-page header,
  .marketing-page footer,
  .marketing-page dialog,
  .marketing-demo-backdrop,
  .tools .tl-noprint,
  .tools .tl-screen,
  .tools .tl-crumbs {
    display: none !important;
  }

  .tools .tl-wrap {
    width: 100%;
    padding: 0;
  }

  .tools .tl-tool {
    margin: 0;
  }

  .tools .tl-print {
    display: block;
    color: #000;
    font-size: 11pt;
    line-height: 1.4;
  }

  .tools .tl-print h2 {
    margin: 0 0 4pt;
    font-size: 20pt;
    color: #000;
  }

  .tools .tl-print-sub,
  .tools .tl-print-verdict,
  .tools .tl-print-foot {
    margin: 4pt 0 8pt;
  }

  .tools .tl-print-foot {
    margin-top: 12pt;
    font-size: 9pt;
    color: #333;
  }

  .tools .tl-print-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }

  .tools .tl-print-table th,
  .tools .tl-print-table td {
    padding: 4pt 6pt;
    border: 0.5pt solid #777;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
  }

  .tools .tl-print-table th {
    background: #eee;
  }

  .tools .tl-print-table tr {
    break-inside: avoid;
  }
}
