/* Tools column and calculators. Extends layout.css and directory.css. */

.tool-guides {
  display: grid;
  grid-template-columns: 1fr;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.tool-guides a {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1.1fr) minmax(0, 1.3fr);
  gap: 1rem 2rem;
  align-items: baseline;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.tool-guides span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tool-guides strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.tool-guides em {
  font-style: normal;
  color: var(--ink-soft);
}

.tool-guides a:hover strong {
  font-style: italic;
}

.tool-table {
  width: 100%;
  margin-top: 1.5rem;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.tool-table th,
.tool-table td {
  padding: 0.9rem 0.8rem 0.9rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.tool-table th {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.tool-table td:first-child {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  width: 22%;
}

.dir-section p,
.dir-section li {
  max-width: 42rem;
  color: var(--ink-soft);
}

.dir-section .tool-guides,
.dir-section .tool-guides li {
  max-width: none;
  margin-top: 0;
  padding-left: 0;
  color: inherit;
}

.dir-section ul,
.dir-section ol {
  padding-left: 1.15rem;
}

.dir-section li + li {
  margin-top: 0.45rem;
}

.calc-form {
  display: grid;
  gap: 1.35rem;
  max-width: 36rem;
  margin-top: 2rem;
}

.calc-field {
  display: grid;
  gap: 0.35rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.calc-field input,
.calc-field select {
  width: 100%;
  margin: 0;
  padding: 0.55rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background-color: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-transform: none;
}

.calc-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.8rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%231c1612' stroke-width='1.4' stroke-linecap='square' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.1rem center;
  background-size: 0.7rem 0.45rem;
  font-family: var(--sans);
  font-size: 1.15rem;
  letter-spacing: 0;
  cursor: pointer;
}

.calc-field .site-select__button,
.calc-field .site-select__option {
  font-family: var(--sans);
  letter-spacing: 0;
  text-transform: none;
}

.calc-field .site-select__button {
  font-size: 1.15rem;
}

.form-note,
.calc-error {
  max-width: 36rem;
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.calc-error {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.calc-submit {
  justify-self: start;
  margin-top: 0.4rem;
  padding: 0 0 0.15rem;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  cursor: pointer;
}

.calc-result {
  max-width: 46rem;
  margin-top: 2.5rem;
}

.dir-section p.calc-figure,
.dir-section p.calc-error {
  max-width: 46rem;
  color: var(--ink);
}

.calc-figure {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

#listes .calc-field {
  max-width: 36rem;
  margin-top: 1.25rem;
}

.calc-directory {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  letter-spacing: -0.03em;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 800px) {
  .tool-guides a,
  .tool-table td:first-child {
    display: block;
    width: auto;
  }

  .tool-guides a {
    gap: 0.35rem;
  }

  .tool-table,
  .tool-table tbody,
  .tool-table tr,
  .tool-table td {
    display: block;
    width: 100%;
  }

  .tool-table thead {
    display: none;
  }

  .tool-table tr {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
  }

  .tool-table td {
    padding: 0.15rem 0;
    border: 0;
  }

  .tool-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-top: 0.45rem;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .calc-facts div,
  .profile-facts.calc-facts div {
    grid-template-columns: 1fr;
  }
}
