.consent-planner-section {
  scroll-margin-top: 88px;
}

.consent-tool {
  margin-top: 24px;
  overflow: clip;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(20, 28, 45, 0.08);
}

.consent-tool,
.consent-tool * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.consent-tool-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-bottom: 1px solid #e5e9f0;
  background: #f7f9fc;
}

.consent-tool-header h3 {
  margin: 0 0 6px;
  color: #161b28;
  font-size: 1.35rem;
  line-height: 1.25;
}

.consent-tool-header p {
  max-width: 680px;
  margin: 0;
  color: #5e6676;
  font-size: 0.95rem;
  line-height: 1.55;
}

.consent-local-badge {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid #a9d9cc;
  border-radius: 6px;
  background: #eaf8f3;
  color: #14644f;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.consent-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}

.consent-form {
  min-width: 0;
  padding: 24px;
}

.consent-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.consent-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.consent-field > span {
  color: #282e3c;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.3;
}

.consent-field small {
  color: #7b8290;
  font-size: 0.75rem;
  font-weight: 600;
}

.consent-field input,
.consent-field select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfd6e1;
  border-radius: 6px;
  background: #ffffff;
  color: #1b2130;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.35;
}

.consent-field input::placeholder {
  color: #8b92a0;
}

.consent-field input:focus-visible,
.consent-field select:focus-visible,
.consent-check input:focus-visible,
.consent-actions button:focus-visible {
  outline: 3px solid rgba(67, 97, 238, 0.24);
  outline-offset: 2px;
  border-color: #4361ee;
}

.consent-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.consent-fieldset + .consent-fieldset {
  margin-top: 24px;
}

.consent-fieldset legend {
  width: 100%;
  margin: 0;
  padding: 0 0 10px;
  border-bottom: 1px solid #dfe4ec;
  color: #1d2330;
  font-size: 0.94rem;
  font-weight: 850;
  line-height: 1.35;
}

.consent-fieldset legend span {
  margin-left: 8px;
  color: #a13c31;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.consent-check-list {
  display: grid;
}

.consent-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 15px 2px;
  border-bottom: 1px solid #edf0f4;
  cursor: pointer;
}

.consent-check:last-child {
  border-bottom: 0;
}

.consent-check input {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: #16785f;
}

.consent-check span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.consent-check strong {
  color: #242a37;
  font-size: 0.9rem;
  line-height: 1.35;
}

.consent-check small {
  color: #6c7381;
  font-size: 0.8rem;
  line-height: 1.5;
}

.consent-summary {
  position: sticky;
  top: 88px;
  min-width: 0;
  min-height: 440px;
  padding: 24px;
  border-left: 1px solid #e2e6ed;
  background: #f7f9fc;
}

.consent-summary-label {
  margin: 0 0 9px;
  color: #697182;
  font-size: 0.73rem;
  font-weight: 850;
  line-height: 1.3;
  text-transform: uppercase;
}

.consent-summary h3 {
  margin: 0 0 10px;
  color: #8c2f28;
  font-size: 1.2rem;
  line-height: 1.3;
}

.consent-summary[data-state="review"] h3 {
  color: #8a5a10;
}

.consent-summary[data-state="ready"] h3 {
  color: #14644f;
}

.consent-summary > p:not(.consent-summary-label):not(.consent-progress-label):not(.consent-critical):not(.consent-boundary) {
  margin: 0;
  color: #5f6775;
  font-size: 0.87rem;
  line-height: 1.55;
}

.consent-progress {
  height: 8px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 4px;
  background: #dfe4ec;
}

.consent-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #4361ee;
  transition: width 160ms ease;
}

.consent-summary[data-state="blocked"] .consent-progress span {
  background: #c44b3f;
}

.consent-summary[data-state="ready"] .consent-progress span {
  background: #16785f;
}

.consent-progress-label,
.consent-critical {
  margin: 9px 0 0;
  color: #4f5765;
  font-size: 0.8rem;
  line-height: 1.4;
}

.consent-critical {
  min-height: 2.8em;
  color: #8c2f28;
  font-weight: 750;
}

.consent-summary[data-state="ready"] .consent-critical {
  color: #14644f;
}

.consent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.consent-actions button {
  min-width: 0;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #c8d0dc;
  border-radius: 6px;
  background: #ffffff;
  color: #2d3544;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.consent-actions button:hover {
  border-color: #4361ee;
  color: #304fd0;
}

.consent-actions .consent-reset {
  color: #7a3b35;
}

.consent-boundary {
  margin: 18px 0 0;
  color: #747b88;
  font-size: 0.72rem;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .consent-workspace {
    grid-template-columns: 1fr;
  }

  .consent-summary {
    position: static;
    min-height: 0;
    border-top: 1px solid #e2e6ed;
    border-left: 0;
  }
}

@media (max-width: 680px) {
  #privacy-before .guide-table tbody th,
  #privacy-disclosure .guide-table tbody th {
    width: 100%;
    overflow-wrap: normal;
    word-break: normal;
  }

  .consent-tool-header {
    display: grid;
    gap: 14px;
    padding: 18px;
  }

  .consent-local-badge {
    justify-self: start;
  }

  .consent-form,
  .consent-summary {
    padding: 18px;
  }

  .consent-meta-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .consent-check {
    grid-template-columns: 21px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 0;
  }

  .consent-actions {
    grid-template-columns: 1fr;
  }

  .consent-actions button {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-progress span {
    transition: none;
  }
}

@media print {
  .consent-tool {
    box-shadow: none;
  }

  .consent-workspace {
    grid-template-columns: 1fr;
  }

  .consent-summary {
    position: static;
    min-height: 0;
    border-top: 1px solid #d7dce4;
    border-left: 0;
  }

  .consent-actions,
  .consent-local-badge {
    display: none;
  }
}
