:root {
  --dd-fit-blue: #3659a5;
  --dd-fit-blue-dark: #294889;
  --dd-fit-panel: #f7f7f8;
  --dd-fit-line: rgba(31, 39, 51, 0.14);
  --dd-fit-ink: #111827;
  --dd-fit-muted: #4b5563;
}

.dd-fit {
  display: grid;
  gap: 1.35rem;
  color: var(--dd-fit-ink);
  font-family: var(--theme-font-family-sans);
}

.dd-fit-header,
.dd-fit-card,
.dd-fit-source {
  border: 1px solid var(--dd-fit-line);
  border-radius: 0.75rem;
}

.dd-fit-header {
  background: #fff;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.dd-fit-kicker {
  margin: 0 0 0.5rem;
  color: var(--dd-fit-blue);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dd-fit-header h2,
.dd-fit-card h3,
.dd-fit-source h3 {
  margin: 0;
  font-family: var(--theme-font-family-sans);
}

.dd-fit-header h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
}

.dd-fit-header p:last-child {
  max-width: 62rem;
  margin: 0.7rem 0 0;
  color: var(--dd-fit-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.dd-fit-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.9fr) minmax(24rem, 1.2fr);
  gap: 1.2rem;
}

.dd-fit-card {
  overflow: hidden;
  background: var(--dd-fit-panel);
}

.dd-fit-card-header {
  border-bottom: 1px solid var(--dd-fit-line);
  background: #fff;
  padding: 1rem 1.1rem;
}

.dd-fit-card h3,
.dd-fit-source h3 {
  color: var(--dd-fit-blue-dark);
  font-size: 1rem;
  font-weight: 800;
}

.dd-fit-form,
.dd-fit-manual {
  display: grid;
  gap: 0.9rem;
}

.dd-fit-form {
  padding: 1.1rem;
}

.dd-fit-manual[hidden] {
  display: none;
}

.dd-fit-form label {
  display: grid;
  gap: 0.35rem;
}

.dd-fit-form span {
  color: var(--dd-fit-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.dd-fit-form select,
.dd-fit-form input {
  min-height: 2.8rem;
  width: 100%;
  border: 1px solid rgba(31, 39, 51, 0.18);
  border-radius: 0.6rem;
  background: #fff;
  color: var(--dd-fit-ink);
  padding: 0.62rem 0.75rem;
}

.dd-fit-table-wrap {
  overflow-x: auto;
}

.dd-fit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.dd-fit-table th,
.dd-fit-table td {
  border-bottom: 1px solid var(--dd-fit-line);
  padding: 0.72rem 0.85rem;
  text-align: left;
  vertical-align: top;
}

.dd-fit-table thead th {
  background: #fff;
  color: var(--dd-fit-blue-dark);
  font-size: 0.875rem;
  text-transform: uppercase;
}

.dd-fit-table tbody th {
  width: 42%;
  color: var(--dd-fit-muted);
  font-size: 0.875rem;
  text-transform: uppercase;
}

.dd-fit-zone-card {
  background: #fff;
}

.dd-fit-zone {
  padding: 1.1rem;
}

.dd-fit-zone-axis {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  color: var(--dd-fit-muted);
  font-size: 0.84rem;
}

.dd-fit-zone-axis strong {
  color: var(--dd-fit-ink);
}

.dd-fit-zone-axis span:last-child {
  text-align: right;
}

.dd-fit-zone-track {
  position: relative;
  min-height: 8.5rem;
  margin-top: 0.75rem;
  border: 1px solid var(--dd-fit-line);
  border-radius: 0.6rem;
  background: linear-gradient(90deg, #f3f4f6 0, #fff 50%, #f3f4f6 100%);
  overflow: hidden;
}

.dd-fit-zone-zero {
  position: absolute;
  inset: 0 auto 0 50%;
  width: 2px;
  background: rgba(17, 24, 39, 0.35);
}

.dd-fit-zone-band {
  position: absolute;
  min-width: 0.45rem;
  border: 1px solid rgba(31, 39, 51, 0.22);
  border-radius: 0.45rem;
  padding: 0.35rem 0.45rem;
  color: #172033;
  font-size: 0.875rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.dd-fit-zone-hole {
  top: 1.35rem;
  background: #e5e7eb;
}

.dd-fit-zone-shaft {
  bottom: 1.35rem;
  background: #fff;
}

.dd-fit-source {
  display: grid;
  gap: 0.55rem;
  background: #fff;
  padding: clamp(1rem, 2vw, 1.35rem);
}

.dd-fit-source p,
.dd-fit-source ul {
  margin: 0;
  color: var(--dd-fit-muted);
  font-size: 1rem;
  line-height: 1.45;
}

.dd-fit-source ul {
  padding-left: 1.25rem;
}

@media (max-width: 900px) {
  .dd-fit-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dd-fit-header,
  .dd-fit-card-header,
  .dd-fit-form,
  .dd-fit-zone {
    padding: 0.95rem;
  }

  .dd-fit-header h2 {
    font-size: 1.8rem;
  }

  .dd-fit-table {
    font-size: 0.84rem;
  }
}
