/* SetelDoc Dermatology Toolbox v1.1.1 */

/* Hide the WordPress/Astra page title on pages where this shortcode is rendered. */
.entry-title,
.page-title,
.post-title,
.wp-block-post-title,
.entry-header,
.entry-header-row,
.ast-single-entry-banner,
.ast-archive-description {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.sd-derm-app {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --red: #dc2626;
  --green: #16a34a;
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 18px 76px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  color: var(--ink);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.sd-derm-app * { box-sizing: border-box; }

.sd-derm-toplinks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.sd-derm-toplinks a {
  text-decoration: none !important;
  text-align: center;
  padding: 13px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  font-weight: 850;
  font-size: 14.5px;
  line-height: 1.25;
  color: #334155;
  background: #fff;
}

.sd-derm-toplinks a:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

/* Deliberately title-only: no eyebrow, subtitle or metadata. */
.sd-derm-hero {
  text-align: center;
  padding: 18px 12px 24px;
}

.sd-derm-hero h1 {
  margin: 0 !important;
  font-size: clamp(36px, 6vw, 52px) !important;
  line-height: 1.04 !important;
  letter-spacing: -1.5px;
  color: #0f172a !important;
  font-weight: 950 !important;
}

.sd-derm-tabs {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  border: 1px solid #eef2f7;
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .06);
  margin-bottom: 18px;
}

.sd-derm-tabs button {
  white-space: nowrap;
  border: 0;
  background: transparent;
  padding: 11px 14px;
  border-radius: 12px;
  font-weight: 850;
  font-size: 14px;
  color: #64748b;
  cursor: pointer;
}

.sd-derm-tabs button.active {
  background: #eff6ff;
  color: #1d4ed8;
}

.sd-derm-panel {
  display: none;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
  margin-bottom: 18px;
}

.sd-derm-panel.active { display: block; }

.sd-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.sd-section-heading.compact { margin-top: 10px; }

.sd-section-heading h2 {
  font-size: 27px !important;
  line-height: 1.14 !important;
  margin: 5px 0 6px !important;
  color: #0f172a !important;
  font-weight: 900 !important;
}

.sd-section-heading p {
  margin: 0;
  color: #64748b;
  font-size: 16px;
  line-height: 1.55;
}

.sd-kicker {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 950;
  letter-spacing: .1em;
}

.sd-kicker.red { color: #b91c1c; }
.sd-kicker.blue { color: #1d4ed8; }
.sd-kicker.green { color: #15803d; }
.sd-kicker.amber { color: #b45309; }
.sd-kicker.violet { color: #6d28d9; }
.sd-kicker.cyan { color: #0e7490; }

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

.sd-redflag-grid button {
  text-align: left;
  border: 1px solid #fecaca;
  background: #fffafa;
  border-radius: 17px;
  padding: 17px 16px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 10px;
  row-gap: 4px;
}

.sd-redflag-grid button span {
  grid-row: 1 / 3;
  font-size: 23px;
  line-height: 1.2;
}

.sd-redflag-grid button b {
  font-size: 15.5px;
  line-height: 1.3;
  color: #7f1d1d;
}

.sd-redflag-grid button small {
  font-size: 14px;
  line-height: 1.48;
  color: #64748b;
}

.sd-redflag-grid button.selected {
  background: #fef2f2;
  border-color: #f87171;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .06);
}

.sd-status-box {
  margin-top: 16px;
  border-radius: 15px;
  padding: 15px 17px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sd-status-box strong { font-size: 15.5px; }
.sd-status-box span { font-size: 14.5px; line-height: 1.5; }
.sd-status-box.safe { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.sd-status-box.danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.sd-nav-form,
.sd-ftu-grid,
.sd-steroid-helper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.sd-steroid-helper { grid-template-columns: 1fr 1fr; }

.sd-derm-app label {
  display: block;
  font-size: 13px;
  font-weight: 850;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sd-derm-app select,
.sd-derm-app input[type=search] {
  width: 100%;
  height: 52px;
  margin-top: 7px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  color: #1e293b;
  padding: 0 13px;
  font-size: 15px;
  font-weight: 650;
  outline: none;
}

.sd-derm-app select:focus,
.sd-derm-app input[type=search]:focus {
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .06);
}

.sd-nav-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.sd-primary-btn,
.sd-secondary-btn {
  border-radius: 13px;
  padding: 12px 17px;
  font-weight: 850;
  font-size: 14.5px;
  cursor: pointer;
}

.sd-primary-btn { border: 1px solid #2563eb; background: #2563eb; color: #fff; }
.sd-secondary-btn { border: 1px solid #cbd5e1; background: #fff; color: #475569; }
.hidden { display: none !important; }

.sd-result-stack {
  margin-top: 20px;
  display: grid;
  gap: 11px;
}

.sd-dx-card {
  border: 1px solid #dbeafe;
  border-radius: 17px;
  padding: 17px;
  background: #f8fbff;
}

.sd-dx-card .rank {
  font-size: 11.5px;
  font-weight: 950;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.sd-dx-card h3 {
  margin: 5px 0 9px !important;
  font-size: 20px !important;
  color: #1e3a8a !important;
}

.sd-dx-card p {
  margin: 0 0 9px;
  font-size: 15px;
  color: #475569;
  line-height: 1.55;
}

.sd-dx-card .why { font-size: 13.5px; color: #64748b; }
.sd-dx-card.warning { background: #fff7ed; border-color: #fed7aa; }
.sd-dx-card.warning h3 { color: #9a3412 !important; }

.sd-ftu-card {
  border: 1px solid #dcfce7;
  background: #fbfffc;
  border-radius: 19px;
  padding: 20px;
}

.sd-ftu-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-top: 16px;
}

.sd-ftu-result > div {
  background: #fff;
  border: 1px solid #dcfce7;
  border-radius: 14px;
  padding: 15px;
}

.sd-ftu-result small {
  display: block;
  font-size: 10.5px;
  color: #64748b;
  font-weight: 900;
  letter-spacing: .08em;
}

.sd-ftu-result strong {
  display: block;
  margin-top: 5px;
  color: #15803d;
  font-size: 22px;
}

.sd-fineprint {
  font-size: 13.5px;
  color: #64748b;
  margin: 12px 0 0;
  line-height: 1.5;
}

.sd-divider { height: 1px; background: #eef2f7; margin: 28px 0; }

.sd-steroid-output {
  margin-top: 16px;
  padding: 17px;
  border-radius: 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  font-size: 15px;
  line-height: 1.6;
}

.sd-steroid-output small { font-size: 13.5px; line-height: 1.55; }

.sd-potency-details {
  margin-top: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  padding: 14px 16px;
}

.sd-potency-details summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 850;
  color: #334155;
}

.sd-potency-list { display: grid; gap: 9px; margin-top: 14px; }

.sd-potency-list > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 14px;
  line-height: 1.45;
}

.sd-potency-list b { white-space: nowrap; }
.sd-potency-list .very { background: #fef2f2; color: #991b1b; }
.sd-potency-list .potent { background: #fff7ed; color: #9a3412; }
.sd-potency-list .moderate { background: #f0f9ff; color: #075985; }
.sd-potency-list .mild { background: #f0fdf4; color: #166534; }

.sd-guide-search-wrap { margin-bottom: 14px; }
.sd-guide-list { display: grid; gap: 10px; }

.sd-guide-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.sd-guide-card summary {
  list-style: none;
  display: grid;
  grid-template-columns: 38px 1fr 30px;
  align-items: center;
  gap: 9px;
  padding: 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 850;
  color: #1e293b;
}

.sd-guide-card summary::-webkit-details-marker { display: none; }
.sd-guide-icon { font-size: 21px; }
.sd-guide-card summary b { text-align: center; color: #94a3b8; }
.sd-guide-card[open] summary b { transform: rotate(180deg); }

.sd-guide-body {
  border-top: 1px solid #f1f5f9;
  padding: 17px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sd-guide-body h4 {
  margin: 0 0 7px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #2563eb;
}

.sd-guide-body ul { margin: 0; padding-left: 19px; }

.sd-guide-body li {
  font-size: 15px;
  line-height: 1.55;
  color: #475569;
  margin-bottom: 5px;
}

.sd-escalate {
  grid-column: 1 / -1;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 13px 14px;
  color: #9a3412;
  font-size: 14.5px;
  line-height: 1.5;
}

.sd-counsel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
}

.sd-counsel-card {
  text-align: left;
  border: 1px solid #cffafe;
  background: #f8feff;
  border-radius: 16px;
  padding: 17px;
  cursor: pointer;
}

.sd-counsel-card:hover { border-color: #67e8f9; }

.sd-counsel-card b {
  display: block;
  color: #155e75;
  font-size: 16px;
  margin-bottom: 7px;
}

.sd-counsel-card span {
  display: block;
  color: #475569;
  font-size: 14.5px;
  line-height: 1.58;
}

.sd-counsel-card small {
  display: block;
  margin-top: 10px;
  color: #0891b2;
  font-size: 13px;
  font-weight: 850;
}

.sd-copy-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 9999;
}

.sd-copy-toast.show { opacity: 1; }

.sd-derm-footer {
  margin-top: 20px;
  padding: 20px 4px 0;
  border-top: 1px solid #eef2f7;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
}

.sd-derm-footer strong { color: #64748b; }

.sd-no-results {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: #64748b;
  font-size: 14.5px;
  text-align: center;
}

@media (max-width: 768px) {
  .sd-derm-app { padding: 8px 12px 64px; font-size: 15px; }
  .sd-derm-toplinks { grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 10px; }
  .sd-derm-toplinks a { font-size: 12.5px; padding: 11px 6px; }
  .sd-derm-hero { padding: 15px 8px 20px; }
  .sd-derm-hero h1 { font-size: 36px !important; letter-spacing: -1px; }
  .sd-derm-tabs { top: 4px; margin-bottom: 14px; }
  .sd-derm-tabs button { font-size: 13px; padding: 10px 12px; }
  .sd-derm-panel { padding: 20px 15px; border-radius: 20px; }
  .sd-section-heading h2 { font-size: 23px !important; }
  .sd-section-heading p { font-size: 15px; }
  .sd-redflag-grid { grid-template-columns: 1fr; }
  .sd-redflag-grid button { padding: 15px; }
  .sd-redflag-grid button b { font-size: 15px; }
  .sd-redflag-grid button small { font-size: 13.5px; }
  .sd-nav-form,
  .sd-ftu-grid,
  .sd-steroid-helper { grid-template-columns: 1fr; }
  .sd-ftu-result { grid-template-columns: 1fr; }
  .sd-guide-body { grid-template-columns: 1fr; }
  .sd-counsel-grid { grid-template-columns: 1fr; }
  .sd-potency-list > div { flex-direction: column; gap: 4px; }
  .sd-guide-card summary { font-size: 15.5px; }
  .sd-guide-body li { font-size: 14.5px; }
  .sd-counsel-card span { font-size: 14px; }
}
