/* Tool pages — shared shell (domain, calculator, …) */

.td-page {
  padding-block: 16px 56px;
}

.td-wrap {
  max-width: 1080px;
}

.td-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--lx-ink-soft);
  text-decoration: none;
}

.td-back:hover {
  color: var(--lx-purple);
}

.td-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.td-tool {
  margin-bottom: 36px;
  position: relative;
  border-radius: var(--lx-radius-xl);
  overflow: hidden;
}

/* Full domain checker UI inside site */
.is-domain-check .dc-page--embed {
  background: #eef0f4;
  min-height: auto;
}

.is-domain-check .dc-page--embed .dc-app {
  width: 100%;
  max-width: none;
  padding: 12px 0 20px;
  min-height: auto;
}

.is-domain-check .dc-page--embed .dc-topbar,
.is-domain-check .dc-page--embed .dc-footer {
  display: none;
}

.is-domain-check .dc-page--embed .dc-sidebar {
  position: sticky;
  top: 12px;
}

@media (max-width: 900px) {
  .is-domain-check .dc-page--embed .dc-sidebar {
    position: static;
  }
}

/* API section */
.td-api {
  padding-top: 28px;
  border-top: 1px solid var(--lx-border);
}

.td-api__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
}

.td-api__lead {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--lx-ink-soft);
}

.td-api__endpoint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.td-api__label {
  font-size: 11px;
  font-weight: 800;
  color: var(--lx-silver-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.td-api__code {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--lx-silver-100);
  border: 1px solid var(--lx-border);
  font-size: 12px;
  font-weight: 600;
  word-break: break-all;
}

.td-api__grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

@media (min-width: 640px) {
  .td-api__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.td-api__card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--lx-border);
  background: var(--lx-surface);
}

.td-api__card--wide {
  margin-bottom: 14px;
}

.td-api__card h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.td-api__card h3 span {
  font-size: 11px;
  font-weight: 600;
  color: var(--lx-silver-500);
}

.td-api__pre {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: #1e1e24;
  color: #e8e8ed;
  font-size: 11px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.td-api__notes {
  margin: 0;
  padding: 0 18px 0 0;
  font-size: 12px;
  color: var(--lx-ink-soft);
  line-height: 1.85;
}

.td-api__notes code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--lx-silver-100);
  font-size: 11px;
}

/* Tool API accordion panel */
.tap {
  margin-top: 28px;
  border: 1px solid var(--lx-border);
  border-radius: 16px;
  background: var(--lx-surface);
  overflow: hidden;
}

.tap__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: 0;
  background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  color: var(--lx-ink);
  cursor: pointer;
  text-align: start;
  transition: background 0.15s;
}

.tap__trigger:hover {
  background: var(--lx-purple-soft);
}

.tap.is-open .tap__trigger {
  border-bottom: 1px solid var(--lx-border);
}

.tap__chevron {
  flex-shrink: 0;
  color: var(--lx-purple);
  transition: transform 0.2s ease;
}

.tap.is-open .tap__chevron {
  transform: rotate(180deg);
}

.tap__body {
  border-top: 0;
}

.tap__inner {
  padding: 18px;
}

.tap__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .tap__meta {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tap__meta-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--lx-border);
}

.tap__meta-item span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--lx-ink-soft);
  margin-bottom: 4px;
}

.tap__meta-item strong {
  font-size: 12px;
  font-weight: 800;
  color: var(--lx-ink);
  line-height: 1.5;
}

.tap__endpoint {
  margin-bottom: 14px;
}

.tap__endpoint-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--lx-silver-500);
  margin-bottom: 6px;
}

.tap__endpoint-code {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--lx-silver-100);
  border: 1px solid var(--lx-border);
  font-size: 12px;
  font-weight: 600;
  word-break: break-all;
}

.tap__ctype {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--lx-ink-soft);
}

.tap__block {
  margin-bottom: 12px;
}

.tap__block-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--lx-ink);
}

.tap__pre {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1e1e24;
  color: #e8e8ed;
  font-size: 11px;
  line-height: 1.65;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.tap__notes {
  margin: 14px 0 0;
  padding: 0 18px 0 0;
  font-size: 12px;
  color: var(--lx-ink-soft);
  line-height: 1.85;
}

.tap__notes code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--lx-silver-100);
  font-size: 11px;
}

/* Calculator embed */
.is-calculator .calc-page--embed {
  background: transparent;
}
