/* Media-consent page: self-contained additions to Reginald's shared design. */
.consent-page {
  background: #f8f3e7;
}

.consent-narrow {
  width: min(100% - 32px, 880px);
}

.consent-hero {
  padding-bottom: 48px;
}

.consent-hero h1 {
  max-width: 820px;
  font-size: clamp(2.2rem, 6vw, 4.25rem);
}

.consent-hero .lead {
  max-width: 730px;
}

.consent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.consent-meta span {
  border: 1px solid rgba(35, 79, 61, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: #315b49;
  padding: 8px 13px;
  font-size: 0.88rem;
  font-weight: 800;
}

.consent-section {
  padding: 54px 0 86px;
  background:
    radial-gradient(circle at 8% 5%, rgba(130, 157, 128, 0.13), transparent 25rem),
    radial-gradient(circle at 92% 45%, rgba(179, 146, 93, 0.1), transparent 30rem),
    #f8f3e7;
}

.consent-card {
  position: relative;
  margin: 0 0 22px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(35, 79, 61, 0.18);
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.97);
  box-shadow: 0 18px 42px rgba(43, 59, 49, 0.08);
}

.consent-card h2 {
  margin: 6px 0 12px;
  color: #203b30;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.consent-summary {
  border-top: 5px solid #75967c;
}

.consent-summary [data-consent-summary] p {
  color: #4c5e54;
  font-size: 1.02rem;
  line-height: 1.75;
}

.withdrawal-callout {
  margin: 22px 0 0;
  padding: 16px 18px;
  border-left: 4px solid #b1814f;
  border-radius: 0 14px 14px 0;
  background: #f3ead9;
  color: #3f4b43;
}

.withdrawal-callout a {
  overflow-wrap: anywhere;
  font-weight: 800;
  text-decoration: underline;
}

.consent-notice {
  margin-bottom: 20px;
  padding: 13px 16px;
  border: 1px solid #b8c8bd;
  border-radius: 13px;
  background: #edf4ef;
  color: #2d5644;
  font-weight: 750;
}

.consent-notice.ready {
  border-color: #a9c3ad;
  background: #eef7ef;
}

.consent-notice.error,
.form-errors {
  border-color: #d8a8a0;
  background: #fff0ed;
  color: #7b3127;
}

.consent-terms {
  padding: 0;
  overflow: hidden;
}

.consent-terms summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 20px clamp(22px, 4vw, 38px);
  color: #214735;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 800;
}

.consent-terms summary::after {
  content: "+";
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  background: #e1ebe2;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.consent-terms[open] summary::after {
  content: "−";
}

.consent-terms summary:focus-visible {
  outline: 3px solid #c58b52;
  outline-offset: -5px;
}

.terms-body {
  padding: 2px clamp(22px, 4vw, 38px) 34px;
  border-top: 1px solid rgba(35, 79, 61, 0.13);
}

.term-section {
  padding-top: 24px;
}

.term-section h3 {
  margin: 0 0 10px;
  color: #284d3c;
  font-size: 1.14rem;
}

.term-section p,
.term-section li {
  color: #4e5d55;
  line-height: 1.72;
}

.term-section ul {
  padding-left: 1.35rem;
}

.step-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #2b5944;
  color: #fffdf7;
  font-weight: 900;
}

.field-help {
  margin: 0 0 22px;
  color: #5d6b63;
}

.permission-subheading {
  margin: 28px 0 8px;
  color: #284d3c;
  font-size: 1.08rem;
}

.decision-group {
  margin: 18px 0;
}

.consent-check {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  align-items: start;
  margin: 14px 0;
  padding: 17px;
  border: 1px solid #c7d5ca;
  border-radius: 15px;
  background: #f8fbf7;
  cursor: pointer;
}

.consent-check:hover {
  border-color: #789780;
  background: #f2f8f3;
}

.consent-check:has(input:checked) {
  border-color: #557c63;
  background: #eaf3ec;
  box-shadow: inset 4px 0 #557c63;
}

.consent-check input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: #2b5944;
}

.consent-check input:focus-visible {
  outline: 3px solid #c58b52;
  outline-offset: 3px;
}

.consent-check strong,
.consent-check small {
  display: block;
}

.consent-check strong {
  margin-bottom: 5px;
  color: #284c3b;
  font-size: 1rem;
}

.consent-check small {
  color: #59685f;
  font-size: 0.91rem;
  line-height: 1.55;
}

.final-confirmation {
  margin-top: 24px;
  border-color: #b79c74;
  background: #fbf6ea;
}

.decision-all {
  border-width: 2px;
  border-color: #5e866c;
  background: #eef6ef;
}

.decision-deny {
  border-width: 2px;
  border-color: #98745d;
  background: #fbf3ec;
}

.decision-deny:hover,
.decision-deny:has(input:checked) {
  border-color: #815a46;
  background: #f5e6dc;
  box-shadow: inset 4px 0 #815a46;
}

.dependency-note,
.decision-status {
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f4efe3;
  color: #526058;
  font-size: 0.91rem;
  line-height: 1.6;
}

.decision-status {
  margin-bottom: 0;
  border-left: 4px solid #66836e;
  font-weight: 750;
}

.decision-status.declined {
  border-left-color: #91664e;
  background: #f7eae1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
  color: #314c3f;
  font-weight: 800;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field span small {
  color: #6a766f;
  font-weight: 600;
}

.form-field b {
  color: #983e30;
}

.form-field input,
.form-field select {
  min-width: 0;
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid #aebeb3;
  border-radius: 11px;
  background: #fff;
  color: #24382f;
  font: inherit;
  font-weight: 500;
}

.form-field input:focus,
.form-field select:focus {
  border-color: #38694f;
  outline: 3px solid rgba(56, 105, 79, 0.18);
}

.form-field input[aria-invalid="true"],
.form-field select[aria-invalid="true"],
.consent-check input[aria-invalid="true"] {
  outline: 3px solid rgba(166, 62, 48, 0.27);
}

.signature-input {
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 1.15rem !important;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form-errors {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid;
  border-radius: 12px;
  line-height: 1.55;
}

.consent-submit {
  width: 100%;
  min-height: 56px;
  font-size: 1.05rem;
}

.consent-submit[disabled] {
  cursor: not-allowed;
  opacity: 0.58;
}

.submit-note {
  margin: 11px 0 0;
  color: #69736d;
  text-align: center;
  font-size: 0.88rem;
}

.confirmation-card {
  border-top: 5px solid #4f7b60;
  text-align: center;
}

.confirmation-mark {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  background: #dcecdf;
  color: #25523d;
  font-size: 2rem;
  font-weight: 900;
}

.confirmation-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
  text-align: left;
}

.confirmation-details div {
  padding: 14px;
  border-radius: 12px;
  background: #f1f5ef;
}

.confirmation-details dt {
  color: #68736d;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.confirmation-details dd {
  margin: 4px 0 0;
  color: #294838;
  font-size: 1.05rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.record-status {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #d9ebdd;
  color: #235139;
}

.record-status.declined {
  background: #f3e2d8;
  color: #70452f;
}

.confirmed-selections {
  margin: 20px 0;
  padding: 17px;
  border-radius: 14px;
  background: #f7f3e8;
  text-align: left;
}

.confirmed-selections ul {
  margin-bottom: 0;
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.download-status {
  min-height: 1.5em;
  color: #476253;
  font-weight: 700;
}

.zh-page .consent-card,
.zh-page .form-field,
.zh-page .consent-check {
  letter-spacing: 0;
}

@media (max-width: 640px) {
  .consent-narrow {
    width: min(100% - 24px, 880px);
  }

  .consent-hero {
    padding-top: 44px;
    padding-bottom: 34px;
  }

  .consent-hero h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .consent-section {
    padding: 32px 0 58px;
  }

  .consent-card {
    padding: 21px 17px;
    border-radius: 18px;
  }

  .consent-terms {
    padding: 0;
  }

  .consent-terms summary {
    padding: 18px 17px;
    font-size: 1.1rem;
  }

  .terms-body {
    padding: 0 17px 24px;
  }

  .form-grid,
  .confirmation-details {
    grid-template-columns: 1fr;
  }

  .form-field-wide {
    grid-column: auto;
  }

  .consent-check {
    grid-template-columns: 24px 1fr;
    gap: 11px;
    padding: 14px;
  }

  .confirmation-actions .btn {
    width: 100%;
  }
}

@media print {
  .site-header,
  .site-footer,
  .consent-hero,
  .consent-notice,
  .consent-summary,
  .consent-terms,
  .consent-form,
  .confirmation-actions,
  .download-status {
    display: none !important;
  }

  .consent-section {
    padding: 0;
    background: #fff;
  }

  .confirmation-card[hidden] {
    display: none !important;
  }

  .confirmation-card {
    display: block !important;
    border: 1px solid #777;
    box-shadow: none;
  }
}
