.pd-tool *{
  color: #5f5f5f;
}
.pd-tool {
  --pd-bg: #f6f8f7;
  --pd-surface: #ffffff;
  --pd-surface-soft: #eef3f0;
  --pd-text: #17231d;
  --pd-muted: #5b6a62;
  --pd-border: #d6dfda;
  --pd-accent: #176b4d;
  --pd-accent-strong: #0f533b;
  --pd-accent-soft: #e4f1eb;
  --pd-warning-bg: #fff7df;
  --pd-warning-border: #e8c45b;
  --pd-danger-bg: #fff0ee;
  --pd-danger-border: #df9e95;
  --pd-danger-text: #6d2620;
  --pd-focus: #0a6fca;
  --pd-radius: 18px;
  --pd-radius-small: 12px;
  --pd-shadow: 0 16px 40px rgba(23, 35, 29, 0.08);
  --pd-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  color: var(--pd-text);
  font-family: var(--pd-font);
  font-size: 16px;
  line-height: 1.55;
  margin: 32px 0;
}

.pd-tool *,
.pd-tool *::before,
.pd-tool *::after {
  box-sizing: border-box;
}

.pd-tool p {
  margin: 0;
}

.pd-tool .pd-shell {
  background: var(--pd-bg);
  border: 1px solid var(--pd-border);
  border-radius: var(--pd-radius);
  box-shadow: var(--pd-shadow);
  overflow: hidden;
}

.pd-tool .pd-intro {
  background: var(--pd-surface);
  border-bottom: 1px solid var(--pd-border);
  padding: 28px;
}

.pd-tool .pd-kicker {
  color: var(--pd-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.pd-tool .pd-title {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
}

.pd-tool .pd-lead {
  font-size: 1.04rem;
  max-width: 780px;
}

.pd-tool .pd-note {
  background: var(--pd-accent-soft);
  border-left: 4px solid var(--pd-accent);
  border-radius: 0 var(--pd-radius-small) var(--pd-radius-small) 0;
  color: var(--pd-muted);
  margin-top: 16px;
  padding: 12px 14px;
}

.pd-tool .pd-form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.pd-tool .pd-card {
  background: var(--pd-surface);
  border: 1px solid var(--pd-border);
  border-radius: var(--pd-radius-small);
  margin: 0;
  min-width: 0;
  padding: 20px;
}

.pd-tool .pd-question {
  float: none;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 0;
}

.pd-tool .pd-help {
  color: var(--pd-muted);
  font-size: 0.92rem;
  margin-top: 8px;
}

.pd-tool .pd-options,
.pd-tool .pd-checks {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.pd-tool .pd-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pd-tool .pd-checks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pd-tool .pd-choice {
  min-width: 0;
  position: relative;
}

.pd-tool .pd-choice input {
  height: 1px;
  margin: -1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.pd-tool .pd-choice label {
  align-items: flex-start;
  background: var(--pd-surface);
  border: 1px solid var(--pd-border);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  height: 100%;
  min-height: 48px;
  padding: 12px 14px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.pd-tool .pd-choice label::before {
  background: var(--pd-surface);
  border: 2px solid var(--pd-border);
  content: "";
  flex: 0 0 18px;
  height: 18px;
  margin: 2px 10px 0 0;
  width: 18px;
}

.pd-tool .pd-choice input[type="radio"] + label::before {
  border-radius: 50%;
}

.pd-tool .pd-choice input[type="checkbox"] + label::before {
  border-radius: 5px;
}

.pd-tool .pd-choice input:checked + label {
  background: var(--pd-accent-soft);
  border-color: var(--pd-accent);
}

.pd-tool .pd-choice input[type="radio"]:checked + label::before {
  background: var(--pd-accent);
  border: 5px solid var(--pd-surface);
  box-shadow: 0 0 0 2px var(--pd-accent);
}

.pd-tool .pd-choice input[type="checkbox"]:checked + label::before {
  background: var(--pd-accent);
  border-color: var(--pd-accent);
  box-shadow: inset 0 0 0 4px var(--pd-surface);
}

.pd-tool .pd-choice input:focus-visible + label,
.pd-tool .pd-button:focus-visible,
.pd-tool .pd-result:focus-visible {
  outline: 3px solid var(--pd-focus);
  outline-offset: 3px;
}

.pd-tool .pd-choice-text {
  font-weight: 600;
}

.pd-tool .pd-protection {
  background: var(--pd-warning-bg);
  border-color: var(--pd-warning-border);
}

.pd-tool .pd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pd-tool .pd-button {
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 48px;
  padding: 13px 18px;
  transition: background-color 160ms ease;
}

.pd-tool .pd-button-primary {
  background: var(--pd-accent);
  color: #ffffff;
}

.pd-tool .pd-button-primary:hover {
  background: var(--pd-accent-strong);
}

.pd-tool .pd-button-secondary {
  background: var(--pd-surface);
  border-color: var(--pd-border);
  color: var(--pd-text);
}

.pd-tool .pd-button-secondary:hover {
  background: var(--pd-surface-soft);
}

.pd-tool .pd-form-message {
  color: var(--pd-danger-text);
  font-weight: 700;
  min-height: 1.4em;
}

.pd-tool .pd-form-message:empty {
  min-height: 0;
}

.pd-tool .pd-result {
  background: var(--pd-surface);
  border-top: 1px solid var(--pd-border);
  padding: 28px;
  scroll-margin-top: 20px;
}

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

.pd-tool .pd-result-top {
  align-items: center;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(160px, 0.7fr) minmax(0, 2fr);
}

.pd-tool .pd-score-block,
.pd-tool .pd-status-block {
  min-width: 0;
}

.pd-tool .pd-score-label {
  color: var(--pd-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pd-tool .pd-score-number {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1;
  margin-top: 6px;
}

.pd-tool .pd-score-total {
  color: var(--pd-muted);
  font-size: 1rem;
  font-weight: 600;
}

.pd-tool .pd-status {
  font-size: 1.25rem;
  font-weight: 800;
}

.pd-tool .pd-status-copy {
  color: var(--pd-muted);
  margin-top: 6px;
}

.pd-tool .pd-meter {
  background: var(--pd-surface-soft);
  border-radius: 999px;
  height: 12px;
  margin: 20px 0;
  overflow: hidden;
}

.pd-tool .pd-meter-fill {
  --pd-score: 0;
  background: var(--pd-accent);
  border-radius: inherit;
  height: 100%;
  max-width: 100%;
  transition: width 280ms ease;
  width: calc(var(--pd-score) * 1%);
}

.pd-tool .pd-protection-alert {
  background: var(--pd-danger-bg);
  border: 1px solid var(--pd-danger-border);
  border-radius: var(--pd-radius-small);
  color: var(--pd-danger-text);
  margin-bottom: 20px;
  padding: 16px;
}

.pd-tool .pd-protection-title {
  font-weight: 800;
}

.pd-tool .pd-protection-copy {
  margin-top: 5px;
}

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

.pd-tool .pd-result-card {
  background: var(--pd-bg);
  border: 1px solid var(--pd-border);
  border-radius: var(--pd-radius-small);
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 18px;
}

.pd-tool .pd-result-heading {
  font-weight: 800;
  margin-bottom: 10px;
}

.pd-tool .pd-list {
  display: grid;
  gap: 9px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pd-tool .pd-list-item {
  color: var(--pd-muted);
  padding-left: 18px;
  position: relative;
}

.pd-tool .pd-list-item::before {
  color: var(--pd-accent);
  content: "\2022";
  font-weight: 800;
  left: 2px;
  position: absolute;
  top: 0;
}

.pd-tool .pd-list-item-strong {
  color: var(--pd-text);
  font-weight: 700;
}

.pd-tool .pd-list-empty {
  color: var(--pd-muted);
}

.pd-tool .pd-result-footnote {
  color: var(--pd-muted);
  font-size: 0.85rem;
  margin-top: 16px;
}

@media (max-width: 720px) {
  .pd-tool {
    margin: 24px 0;
  }

  .pd-tool .pd-intro,
  .pd-tool .pd-form,
  .pd-tool .pd-result {
    padding: 18px;
  }

  .pd-tool .pd-card {
    padding: 16px;
  }

  .pd-tool .pd-options,
  .pd-tool .pd-checks,
  .pd-tool .pd-result-top,
  .pd-tool .pd-result-grid {
    grid-template-columns: 1fr;
  }

  .pd-tool .pd-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-tool *,
  .pd-tool *::before,
  .pd-tool *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
