:root {
  --pd-primary: oklch(0.3 0.07 250);
  --pd-primary-soft: oklch(0.96 0.008 250);
  --pd-text: #1f2937;
  --pd-muted: #6b7280;
  --pd-border: rgba(15, 23, 42, 0.12);
  --pd-danger: #b91c1c;
  --pd-success-bg: #ecfdf5;
  --pd-success-text: #065f46;
  --pd-error-bg: #fef2f2;
  --pd-error-text: #991b1b;
}

body.pd-legal-mode {
  background: #f8fafc;
  color: var(--pd-text);
}

.pd-legal-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(248, 250, 252, 1) 0%, rgba(255, 255, 255, 1) 24%, rgba(248, 250, 252, 1) 100%);
}

.pd-container {
  width: min(1080px, calc(100vw - 32px));
  margin: 0 auto;
}

.pd-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--pd-border);
}

.pd-topbar-inner,
.pd-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.pd-brand {
  color: var(--pd-primary);
  font-weight: 700;
  text-decoration: none;
}

.pd-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.pd-nav a,
.pd-footer a,
.pd-document a,
.pd-legal-links a {
  color: var(--pd-primary);
  text-decoration: none;
}

.pd-nav a:hover,
.pd-footer a:hover,
.pd-document a:hover,
.pd-legal-links a:hover {
  text-decoration: underline;
}

.pd-hero {
  padding: 56px 0 24px;
}

.pd-eyebrow {
  margin: 0 0 12px;
  color: var(--pd-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pd-hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.1;
  color: #0f172a;
}

.pd-lead {
  margin: 16px 0 0;
  max-width: 760px;
  color: var(--pd-muted);
  font-size: 18px;
  line-height: 1.7;
}

.pd-section {
  padding: 0 0 56px;
}

.pd-document {
  display: grid;
  gap: 24px;
  background: #ffffff;
  border: 1px solid var(--pd-border);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  padding: 28px;
}

.pd-document h2 {
  margin: 8px 0 0;
  font-size: 24px;
  line-height: 1.3;
  color: #0f172a;
}

.pd-document p,
.pd-document li {
  margin: 0;
  color: var(--pd-text);
  line-height: 1.8;
}

.pd-document ul {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}

.pd-document code {
  display: inline-block;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.95em;
}

.pd-card {
  border: 1px solid var(--pd-border);
  border-radius: 18px;
  padding: 20px;
}

.pd-card-muted {
  background: var(--pd-primary-soft);
}

.pd-document table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--pd-border);
}

.pd-document th,
.pd-document td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--pd-border);
  vertical-align: top;
  text-align: left;
  line-height: 1.6;
}

.pd-document th {
  width: 28%;
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
  font-weight: 700;
}

.pd-document tbody tr:last-child th,
.pd-document tbody tr:last-child td,
.pd-document thead tr:last-child th,
.pd-document thead tr:last-child td {
  border-bottom: none;
}

.pd-footer {
  border-top: 1px solid var(--pd-border);
  background: rgba(255, 255, 255, 0.85);
}

.pd-footer p {
  margin: 0;
  color: var(--pd-muted);
  line-height: 1.7;
}

.pd-consent-block {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid var(--pd-border);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.95);
}

.pd-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--pd-text);
  font-size: 14px;
  line-height: 1.6;
}

.pd-consent-label input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--pd-primary);
  flex: 0 0 auto;
}

.pd-required {
  color: var(--pd-danger);
}

.pd-legal-links {
  color: var(--pd-muted);
  font-size: 13px;
  line-height: 1.6;
}

.pd-consent-error {
  display: none;
  margin-top: 8px;
  color: var(--pd-danger);
  font-size: 13px;
  line-height: 1.5;
}

.pd-consent-error.is-visible {
  display: block;
}

.pd-form-status {
  display: none;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.pd-form-status--pending,
.pd-form-status--error {
  display: block;
}

.pd-form-status--pending {
  background: var(--pd-primary-soft);
  color: var(--pd-primary);
}

.pd-form-status--error {
  background: var(--pd-error-bg);
  color: var(--pd-error-text);
}

.pd-success-box {
  padding: 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 18px;
  background: var(--pd-success-bg);
  color: var(--pd-success-text);
}

.pd-success-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.pd-success-text {
  margin: 0;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .pd-topbar-inner,
  .pd-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .pd-document {
    padding: 20px;
    border-radius: 20px;
  }

  .pd-document th,
  .pd-document td {
    display: block;
    width: 100%;
  }

  .pd-document th {
    border-bottom: none;
    padding-bottom: 6px;
  }

  .pd-document td {
    padding-top: 0;
  }
}
