/* Tools hub and calculator pages. */

.tool-hero {
  padding: calc(var(--header-h) + 48px) 0 32px;
  background: var(--cream);
}

.tool-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-dim);
}

.tool-crumb a:hover {
  color: var(--ink);
}

.tool-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tool-hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.05rem, 4.2vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.038em;
  line-height: 1.1;
}

.tool-lead {
  width: min(100%, 40rem);
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 16.5px;
  line-height: 1.62;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tool-hub-list {
  padding-top: 8px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.tool-card:hover {
  border-color: #d6d6d0;
  color: inherit;
}

.tool-card strong {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.tool-card span {
  color: var(--text-muted);
  font-size: 15px;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px;
  padding: 8px 0 72px;
}

.tool-panel {
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}

.tool-panel h2 {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.tool-fields {
  display: grid;
  gap: 14px;
}

.tool-fields .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-fields .field > span {
  font-size: 13px;
  color: var(--text-muted);
}

.tool-fields input,
.tool-fields select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--cream);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.tool-fields select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' viewBox='0 0 12 8'%3E%3Cpath stroke='%236a6a6a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m1.5 1.5 4.5 5 4.5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.tool-panel .btn-fill {
  margin-top: 8px;
  width: 100%;
}

.tool-result {
  min-height: 220px;
}

.tool-result[hidden] {
  display: none;
}

.tool-figure {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.tool-result p {
  margin: 0 0 12px;
  color: var(--text-muted);
}

.tool-result ul {
  margin: 0 0 18px;
  padding-left: 1.2em;
  color: var(--text-muted);
}

.tool-copy {
  width: min(100%, 760px);
  margin: 0 auto;
}

.tool-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.tool-copy h3 {
  margin: 28px 0 10px;
  font-size: 20px;
  font-weight: 500;
}

.tool-copy p,
.tool-copy li {
  color: var(--text-muted);
}

.tool-copy p {
  margin: 0 0 16px;
  font-size: 16.5px;
  line-height: 1.65;
}

.tool-copy ul,
.tool-copy ol {
  margin: 0 0 20px;
  padding-left: 1.2em;
}

.tool-copy a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tool-note {
  margin: 0 0 24px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--cream-deep);
}

.tool-note p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.dir-section {
  padding: 88px 0;
  background: var(--cream);
}

.dir-section.on-paper {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 560px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.section-head p {
  margin: 14px 0 0;
  color: var(--text-muted);
}

.faq-list {
  width: min(100%, 760px);
  margin: 0 auto;
}

.faq-list details {
  padding: 20px 0;
  border-bottom: 1px solid var(--line-strong);
}

.faq-list summary {
  cursor: pointer;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list details p {
  margin: 10px 0 0;
  color: var(--text-muted);
}

.dir-close {
  padding: 80px 0 96px;
  text-align: center;
  background: var(--cream);
}

.dir-close h2 {
  margin: 0 auto;
  max-width: 16ch;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.038em;
  line-height: 1.12;
}

.dir-close-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 26px;
}

@media (max-width: 800px) {
  .tool-grid,
  .tool-layout {
    grid-template-columns: 1fr;
  }

  .dir-close-actions {
    flex-direction: column;
    gap: 16px;
  }
}
