/* Public policies and cookie choices follow the JAWA MENU account presentation. */
.marketplace main:has(.terms-page) { max-width: 1100px; margin: 0 auto; padding: var(--space-6) var(--space-6) var(--space-16); }
.marketplace .terms-page { max-width: 800px; margin: 0 auto; overflow-wrap: anywhere; font-size: var(--type-body-lg); line-height: var(--type-body-lg-line); font-weight: 400; }
.marketplace .terms-page a { color: var(--color-link); }
.marketplace .terms-page h2 { margin: var(--space-6) 0 var(--space-2); font-size: var(--type-section); line-height: var(--type-section-line); font-weight: 600; letter-spacing: normal; }
.marketplace .terms-intro { margin-bottom: var(--space-8); }
.marketplace .terms-eyebrow { margin: 0 0 var(--space-3); color: var(--color-brand); font-size: var(--type-label); font-weight: 600; }
.marketplace .terms-intro h1 { margin: 0 0 var(--space-4); font-size: var(--type-title); line-height: var(--type-title-line); font-weight: 600; letter-spacing: normal; white-space: normal; }
.marketplace .terms-lead { max-width: 62ch; margin: 0 0 var(--space-4); }
.marketplace .terms-meta { color: var(--color-text-muted); font-size: var(--type-body); margin: 0; }
.marketplace .terms-summary, .marketplace .terms-draft { padding: var(--space-6); margin-bottom: var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-card); }
.marketplace .terms-summary { background: var(--color-surface); }
.marketplace .terms-summary h2 { margin-top: 0; }
.marketplace .terms-summary ul { padding-left: var(--space-6); }
.marketplace .terms-summary li + li { margin-top: var(--space-2); }
.marketplace .terms-summary p:last-child, .marketplace .terms-draft p { margin-bottom: 0; }
.marketplace .terms-summary p:last-child { color: var(--color-text-muted); font-size: var(--type-body); }
.marketplace .terms-draft { background: var(--color-warning-bg); color: var(--color-warning); border-color: currentColor; }
.marketplace .terms-draft p { margin-top: var(--space-2); }
.marketplace .terms-contents { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); padding-bottom: var(--space-6); border-bottom: 1px solid var(--color-border); }
.marketplace .terms-contents a, .marketplace .terms-footer a { display: inline-flex; align-items: center; min-height: 48px; text-underline-offset: 0.2em; }
.marketplace .terms-document { line-height: 1.65; }
.marketplace .terms-document section { padding-top: var(--space-8); scroll-margin-top: var(--space-6); }
.marketplace .terms-document h2 { margin: 0 0 var(--space-4); }
.marketplace .terms-document h3 { margin: var(--space-6) 0 var(--space-3); font-size: var(--type-body-lg); font-weight: 600; }
.marketplace .terms-document p { margin: 0 0 var(--space-4); }
.marketplace .terms-document a { text-underline-offset: 0.2em; }
.marketplace .terms-definitions { margin: var(--space-6) 0; }
.marketplace .terms-definitions dt { font-weight: 600; margin-top: var(--space-4); }
.marketplace .terms-definitions dd { margin: var(--space-1) 0 0; white-space: pre-line; }
.marketplace .terms-footer { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin-top: var(--space-8); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }

/* The notice occupies its own bottom row; the page and notice scroll separately. */
body.marketplace.cookie-shell:has(#cookie-notice) {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
body.marketplace.cookie-shell:has(#cookie-notice) > .site-header { flex: none; }
body.marketplace.cookie-shell:has(#cookie-notice) > .marketplace-content {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
.marketplace .cookie-notice {
  flex: none;
  max-height: 55dvh;
  padding: var(--space-4) var(--space-6);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  color: var(--color-text);
  background: var(--color-surface-raised);
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-popover);
  font-size: var(--type-body);
  line-height: var(--type-body-line);
}
.marketplace .cookie-notice-inner { display: flex; align-items: center; gap: var(--space-6); max-width: 1100px; margin-inline: auto; }
.marketplace .cookie-notice-copy { flex: 1; min-width: 0; }
.marketplace .cookie-notice h2 { margin: 0 0 var(--space-2); color: var(--color-text); font-size: var(--type-section); line-height: var(--type-section-line); font-weight: 600; }
.marketplace .cookie-notice p { margin: 0; max-width: 76ch; }
.marketplace .policy-links { flex: none; max-width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); margin: 0; padding: 0; border: 0; background: transparent; color: inherit; font-size: var(--type-body); line-height: var(--type-body-line); }
.marketplace .policy-links a { display: inline-flex; align-items: center; min-height: 48px; color: var(--color-brand); text-underline-offset: 0.2em; }
.marketplace .cookie-choice { flex: none; }
.marketplace .cookie-choice-form { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0; }
.marketplace .cookie-choice-form .cookie-choice-button {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-control);
  background: var(--color-brand-fixed);
  color: var(--color-on-brand-fixed);
  font: inherit;
  font-size: var(--type-body-lg);
  line-height: var(--type-body-lg-line);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease;
}
.marketplace .cookie-choice-status { margin: 0 0 var(--space-4); }
.marketplace .cookie-choice-status:empty { display: none; }
.marketplace .cookie-choice-announcement { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.marketplace .cookie-notice :focus-visible, .marketplace .cookie-choice :focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
@media (hover: hover) {
  .marketplace .cookie-choice-form .cookie-choice-button:hover:not(:disabled) { background: color-mix(in srgb, var(--color-brand-fixed) 88%, #000); }
}
.marketplace .cookie-choice-form .cookie-choice-button:active:not(:disabled) { background: color-mix(in srgb, var(--color-brand-fixed) 80%, #000); }
.marketplace .cookie-choice-form .cookie-choice-button:disabled { cursor: wait; color: var(--color-text-muted); background: var(--color-canvas); }

@media (max-width: 760px) {
  .marketplace main:has(.terms-page) { padding: var(--space-6) clamp(var(--space-6), 14.5vw, 7rem); }
  .marketplace .terms-summary, .marketplace .terms-draft { padding: var(--space-4); }
  .marketplace .cookie-notice { padding: var(--space-4); }
  .marketplace .cookie-notice-inner { flex-direction: column; align-items: stretch; gap: var(--space-2); }
  .marketplace .cookie-choice-form { width: 100%; }
  .marketplace .cookie-choice-form .cookie-choice-button { padding-inline: var(--space-4); }
}
@media (prefers-reduced-motion: reduce) {
  .marketplace .cookie-choice-form .cookie-choice-button { transition: none; }
}
@media print {
  .marketplace .site-header, .marketplace .site-footer, .marketplace .cookie-notice,
  .marketplace .terms-contents, .marketplace .terms-footer { display: none; }
  body.marketplace { background: var(--color-on-brand-fixed); color: #000; }
  body.marketplace.cookie-shell:has(#cookie-notice) { display: block; height: auto; overflow: visible; }
  body.marketplace.cookie-shell:has(#cookie-notice) > .marketplace-content { overflow: visible; }
  .marketplace main:has(.terms-page) { max-width: none; padding: 0; }
  .marketplace .terms-page { max-width: none; }
  .marketplace .terms-document section { padding-top: var(--space-4); }
  .marketplace .terms-document h2, .marketplace .terms-document h3 { break-after: avoid; }
  .marketplace .terms-summary, .marketplace .terms-draft { break-inside: avoid; }
}
