dialog.km-form-doc {
  --fd-paper:#26242d;
  --fd-ink:#f4f0f6;
  --fd-muted:#c6bfcd;
  --fd-line:#55505d;
  --fd-accent:#c9b5f6;
  box-sizing:border-box;
  position:fixed;
  inset:0;
  width:min(730px,calc(100% - 32px));
  max-width:none;
  max-height:none;
  padding:0;
  margin:auto;
  color:var(--fd-ink);
  background:var(--fd-paper);
  border:1px solid var(--fd-line);
  border-radius:18px;
  box-shadow:0 20px 80px #0008;
  overflow:hidden;
  text-align:start;
}
.km-form-doc[data-document=terms] {--fd-accent:#edbd85}
.km-form-doc[data-document=policy] {--fd-accent:#9bcbdc}
html[data-theme=light] dialog.km-form-doc {
  --fd-paper:#fffdfb; --fd-ink:#292530; --fd-muted:#655d6b;
  --fd-line:#d5cdd8; --fd-accent:#633f94; box-shadow:0 20px 64px #342d4238;
}
html[data-theme=light] .km-form-doc[data-document=terms] {--fd-accent:#80511e}
html[data-theme=light] .km-form-doc[data-document=policy] {--fd-accent:#226274}
.km-form-doc::backdrop {background:rgb(14 12 20 / 68%)}
.km-form-doc .km-form-doc-shell {
  display:flex; flex-direction:column; max-height:min(760px,calc(100vh - 40px));
  max-height:min(760px,calc(100dvh - 40px));
  font:400 1rem/1.62 Inter,system-ui,sans-serif;
}
.km-form-doc-head,.km-form-doc-foot {flex:none;padding:14px clamp(18px,4vw,32px)}
.km-form-doc-head {border-bottom:1px solid var(--fd-line)}
.km-form-doc #km-form-doc-title {
  margin:8px 0 0;color:var(--fd-ink);font:750 clamp(1.25rem,3.4vw,1.8rem)/1.18 Manrope,Inter,system-ui,sans-serif;
  letter-spacing:-.025em;overflow-wrap:anywhere;
}
.km-form-doc .km-form-doc-version {margin:5px 0 0;font-size:.86rem;color:var(--fd-muted)}
.km-form-doc .km-form-doc-body {
  min-height:0; padding:16px clamp(18px,4vw,32px) 24px;
  overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; overflow-wrap:anywhere;
  color:var(--fd-ink); line-height:1.62;
}
.km-form-doc-body section {padding:0;margin:0}
.km-form-doc-body section + section {margin-top:18px;padding-top:17px;border-top:1px solid var(--fd-line)}
.km-form-doc-body h3 {margin:0 0 6px;color:var(--fd-ink);font:700 1.06rem/1.4 Manrope,Inter,system-ui,sans-serif}
.km-form-doc-number {margin-inline-end:9px;color:var(--fd-accent);font:600 .8rem/1 Inter,system-ui,sans-serif;font-variant-numeric:tabular-nums}
.km-form-doc-body p {margin:0 0 .6em;color:var(--fd-ink);line-height:1.62}
.km-form-doc-body p:last-child {margin-bottom:0}
.km-form-doc :is(.km-form-doc-body,.km-form-doc-foot) a {
  color:var(--fd-accent);text-decoration:underline;text-underline-offset:.18em;
}
.km-form-doc .km-form-doc-foot {display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:4px 12px;border-top:1px solid var(--fd-line);font-size:.88rem}
.km-form-doc .km-form-doc-back {margin-inline-end:auto}
.km-form-doc :is(.km-form-doc-return,.km-form-doc-back) {
  min-height:36px;border:1px solid var(--fd-line);border-radius:8px;
  padding:4px 10px;color:var(--fd-ink);background:transparent;font:650 .88rem/1.35 Inter,system-ui,sans-serif;cursor:pointer;
}
.km-form-doc :is(.km-form-doc-return,.km-form-doc-back):hover {border-color:var(--fd-accent)}
.km-form-doc :focus-visible {outline:2px solid var(--fd-accent);outline-offset:2px}
.km-form-doc .km-form-doc-body:focus-visible {outline-offset:-3px}
.km-form-doc [hidden] {display:none!important}
@media(max-width:520px),(max-height:450px) {
  dialog.km-form-doc {width:calc(100% - 16px);border-radius:12px}
  .km-form-doc .km-form-doc-shell {max-height:calc(100vh - 18px);max-height:calc(100dvh - 18px)}
  .km-form-doc-head,.km-form-doc-foot {padding:8px 16px}
}
/* Keep each document link a single tap target when the consent line wraps. */
form label a:is([href$="consent.html"],[href$="policy.html"],[href$="terms.html"]) {
  display:inline-block;max-width:100%;vertical-align:baseline;
}
