/* ── dKH to PPM Converter ───────────────────────────────────────── */

.dkp-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 860px;
  margin: 2rem auto;
  background: #ecfeff;
  border: 1.5px solid #a5f3fc;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 32px rgba(8,145,178,0.11);
  color: #164e63;
  box-sizing: border-box;
}

/* Header */
.dkp__header {
  background: linear-gradient(135deg, #082032 0%, #0c4a6e 30%, #0369a1 65%, #0891b2 100%);
  padding: clamp(1.4rem, 4vw, 2rem) clamp(1.2rem, 4vw, 2rem);
}
.dkp__header h2 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}
.dkp__header p {
  font-size: 0.9rem;
  color: #a5f3fc;
  margin: 0;
}

/* Body */
.dkp__body {
  display: flex;
  align-items: flex-start;
}

.dkp__card {
  flex: 1;
  padding: clamp(1.2rem, 3vw, 1.6rem);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.dkp__card-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #0891b2;
  border-bottom: 2px solid #cffafe;
  padding-bottom: 0.5rem;
}

.dkp__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #164e63;
  margin-bottom: 0.35rem;
}

.dkp__input-row {
  display: flex;
  align-items: center;
  border: 2px solid #a5f3fc;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.dkp__input-row:focus-within {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8,145,178,0.15);
}

.dkp__input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.68rem 0.85rem;
  font-size: 1.05rem;
  color: #164e63;
  background: transparent;
  font-weight: 600;
  width: 100%;
  box-sizing: border-box;
}
.dkp__input::placeholder { color: #94a3b8; font-weight: 400; }

.dkp__unit {
  background: #cffafe;
  color: #0891b2;
  padding: 0.68rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Presets */
.dkp__preset-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #0891b2;
}
.dkp__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dkp__preset-btn {
  background: #ecfeff;
  border: 1.5px solid #a5f3fc;
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 0.72rem;
  color: #0369a1;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.dkp__preset-btn:hover,
.dkp__preset-btn.dkp--active {
  background: #0891b2;
  border-color: #0891b2;
  color: #fff;
}

.dkp__arrow {
  text-align: center;
  font-size: 1.4rem;
  color: #0891b2;
  line-height: 1;
}

/* Result box */
.dkp__result-box {
  background: #ecfeff;
  border: 2px solid #a5f3fc;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dkp__result-box.dkp--has-value {
  background: #cffafe;
  border-color: #22d3ee;
}
.dkp__result-val {
  font-size: 1.5rem;
  font-weight: 900;
  color: #164e63;
  line-height: 1;
}
.dkp__result-unit {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0891b2;
  margin-left: 4px;
}
.dkp__result-sub {
  font-size: 0.75rem;
  color: #0369a1;
  font-weight: 600;
  min-height: 1rem;
}

/* Formula */
.dkp__formula {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.55;
  background: #f8fafc;
  border-left: 3px solid #a5f3fc;
  padding: 0.5rem 0.75rem;
  border-radius: 0 6px 6px 0;
}

/* Clear */
.dkp__clear-btn {
  align-self: flex-start;
  background: none;
  border: 1.5px solid #cbd5e1;
  border-radius: 7px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 600;
}
.dkp__clear-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fff5f5;
}

/* Divider */
.dkp__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-width: 48px;
  background: #ecfeff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #0891b2;
  border-left: 1px solid #cffafe;
  border-right: 1px solid #cffafe;
}

/* Table */
.dkp__table-section {
  padding: clamp(1rem, 3vw, 1.5rem);
  background: #fff;
  border-top: 1.5px solid #cffafe;
}
.dkp__table-title {
  font-size: clamp(0.85rem, 2.5vw, 0.98rem);
  font-weight: 800;
  color: #164e63;
  margin: 0 0 0.85rem;
}
.dkp__table-wrap { overflow-x: auto; }
.dkp__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.dkp__table thead tr {
  background: linear-gradient(90deg, #0c4a6e, #0891b2);
}
.dkp__table thead th {
  color: #fff;
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}
.dkp__table tbody tr:nth-child(even) { background: #ecfeff; }
.dkp__table tbody tr:hover { background: #cffafe; }
.dkp__table tbody td {
  padding: 0.48rem 0.9rem;
  color: #164e63;
  font-weight: 500;
  border-bottom: 1px solid #cffafe;
  white-space: nowrap;
}

/* Guide section */
.dkp__guide-section {
  padding: clamp(1rem, 3vw, 1.5rem);
  background: #ecfeff;
  border-top: 1.5px solid #a5f3fc;
}
.dkp__guide-title {
  font-size: clamp(0.88rem, 2.5vw, 1rem);
  font-weight: 800;
  color: #164e63;
  margin: 0 0 0.85rem;
}
.dkp__guide-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.dkp__guide-card {
  background: #fff;
  border: 1.5px solid #a5f3fc;
  border-radius: 12px;
  padding: 1rem 0.75rem;
  text-align: center;
}
.dkp__guide-icon { font-size: 1.6rem; margin-bottom: 6px; }
.dkp__guide-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 6px;
  line-height: 1.3;
}
.dkp__guide-range {
  font-size: 0.95rem;
  font-weight: 900;
  color: #164e63;
  margin-bottom: 2px;
}
.dkp__guide-ppm {
  font-size: 0.72rem;
  color: #0891b2;
  font-weight: 600;
}

/* Note */
.dkp__note {
  background: #ecfeff;
  border-top: 1.5px solid #a5f3fc;
  padding: 0.85rem clamp(1rem, 3vw, 1.5rem);
  font-size: 0.82rem;
  color: #164e63;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 640px) {
  .dkp__body { flex-direction: column; }
  .dkp__divider {
    width: 100%; min-width: unset; height: 36px;
    border-left: none; border-right: none;
    border-top: 1px solid #cffafe; border-bottom: 1px solid #cffafe;
  }
  .dkp__card { padding: 1rem; }
  .dkp__guide-grid { grid-template-columns: repeat(2, 1fr); }
}
