@font-face {
  font-family: "Virgil";
  src: url("/fonts/virgil.woff2") format("woff2");
  font-display: swap;
}

dialog.signin {
  --background: #ffffff;
  --foreground: oklch(0.145 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.48 0 0);
  --border: oklch(0.922 0 0);
  --brand: #004dfc;
  --primary: #004dfc;
  --primary-foreground: #ffffff;
  --card: #ffffff;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --hand: "Virgil", "Comic Sans MS", cursive;
  --dash: color-mix(in oklch, var(--foreground) 18%, transparent);
  --ink: color-mix(in oklch, var(--foreground) 82%, transparent);
  --hot: #e0261b;
  color-scheme: light;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--background);
  color: var(--foreground);
  overflow: auto;
  overscroll-behavior: contain;
}
dialog.signin::backdrop { background: #ffffff; }
.signin * { border-radius: 0; }
.signin-body { display: flex; flex-direction: column; min-height: 100%; padding: 28px 32px 0; }
.signin-top, .signin-step h2, .signin-plan { width: 100%; max-width: 1100px; margin-inline: auto; }
.signin.first .signin-top, .signin.first .signin-step h2, .signin.first .signin-plan { max-width: 820px; }
.signin.first .signin-step { margin-top: clamp(0px, 8vh, 80px); }
.signin-kicker { margin: 0; font: 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
dialog.signin h2 { margin: 0 auto 10px; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.signin .hot { color: var(--hot); font-weight: 600; }

.signin-top { display: flex; align-items: center; gap: 14px; margin: 0 auto 22px; }
.signin-steps { display: flex; gap: 4px; }
.signin-steps i { width: 28px; height: 6px; background: var(--border); }
.signin-steps i.done { background: var(--brand); }
.signin-close { margin-left: auto; width: 36px; height: 36px; border: 1px solid var(--border); background: transparent; color: var(--muted-foreground); font-size: 22px; line-height: 1; cursor: pointer; }
.signin-close:hover { color: var(--foreground); background: var(--muted); }

.signin-plan { margin: 22px auto 8px; border-top: 1px dashed var(--dash); }
.signin-plan div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-bottom: 1px dashed var(--dash); }
.signin-plan div:last-child { border-bottom: 0; }
.signin-plan dt { padding-top: 4px; font: 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
.signin-plan dd { margin: 0; font-size: 17px; line-height: 1.55; }

.cfpage { margin: 22px -32px 0; padding: 40px 32px 32px; background: #fafafa; border-top: 1px solid #ececec; color: #1d1d1d; text-align: center; }
.cfp-logos { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 22px; }
.cfp-logo { display: grid; place-items: center; width: 66px; height: 66px; border: 1px solid #e3e3e3; border-radius: 50% !important; background: #fff; }
.cfp-logo img { width: 30px; height: 30px; }
.cfp-cloud svg { width: 42px; height: 20px; }
.cfp-link { width: 46px; height: 0; border-top: 1.5px dashed #9a9a9a; position: relative; }
.cfp-link::after { content: ""; position: absolute; right: -1px; top: -5px; width: 7px; height: 7px; border-top: 1.5px solid #9a9a9a; border-right: 1.5px solid #9a9a9a; transform: rotate(45deg); }
.cfp-title { margin: 0 0 8px; font: 700 26px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: -0.01em; }
.cfp-warn { margin: 0 0 26px; color: #6f6f6f; font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.cfp-warn svg { display: inline-block; width: 17px; height: 17px; margin-right: 8px; vertical-align: -3px; }
.consent { position: relative; padding: 0 0 6px; text-align: left; }
.consent-art { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.consent-art path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.consent-art .must { stroke: var(--hot); stroke-width: 2.8; }
.consent-art path { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.signin.on .consent-art path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.7s ease var(--delay, 0ms); }

.note { position: absolute; z-index: 1; margin: 0; font: 16px/1.3 var(--hand); color: var(--ink); opacity: 0; transition: opacity 0.4s var(--delay, 0ms); }
.signin.on .note { opacity: 1; }
.note.left { text-align: right; }
.note.must { color: var(--foreground); font-size: 16px; line-height: 1.35; }
.note.must strong { display: block; color: var(--hot); margin-bottom: 6px; font-size: 28px; line-height: 1.1; font-weight: 400; }

.cfc {
  --cf-bg: #ffffff;
  --cf-line: #e3e3e3;
  --cf-icon-line: #d9d9d9;
  --cf-text: #1d1d1d;
  --cf-soft: #6f6f6f;
  --cf-hover: #f2f2f2;
  position: relative;
  width: 548px;
  margin: 0 auto;
  padding: 30px 0 6px;
  background: var(--cf-bg);
  border: 1px solid var(--cf-line);
  border-radius: 12px !important;
  color: var(--cf-text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
.cfc-head { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 22px; padding: 0 30px; color: var(--cf-soft); font-size: 15px; }
.cfc-label { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 0 30px; color: var(--cf-soft); font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.cfc-label, .cfc-head span, .cfc-sensitive b, .cfc-sensitive .count { white-space: nowrap; }
.cfc-label .edit { margin-left: auto; color: var(--cf-text); font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.cfc-info { flex: none; display: inline-grid; place-items: center; width: 15px; height: 15px; border: 1.3px solid currentColor; border-radius: 50% !important; font: 600 10px/1 Georgia, serif; text-transform: none; }
.cfc-scopes { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 10px; margin: 0; padding: 0 30px 22px; }
.cfc-chip { display: inline-flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 8px !important; white-space: nowrap; }
.cfc-ico { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border: 1px solid var(--cf-icon-line); border-radius: 8px !important; background: var(--cf-bg); color: #5c5c5c; }
.cfc-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cfc-chip.hit { background: var(--cf-hover); }
.cfc-rule { height: 1px; margin: 0 0 18px; background: var(--cf-line); }
.cfc-rule.inset { margin: 0 30px; }
.cfc-sensitive { display: flex; align-items: center; gap: 12px; padding: 14px 30px; border-top: 1px solid var(--cf-line); }
.cfc-sensitive b { font-weight: 600; }
.cfc-sensitive .count { color: var(--cf-soft); font-size: 14px; }
.cfc-sensitive .caret { flex: none; margin-left: auto; width: 9px; height: 9px; border-left: 1.5px solid var(--cf-soft); border-top: 1.5px solid var(--cf-soft); transform: translateY(3px) rotate(45deg); }
.cfc-shield { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border: 1.5px solid #f2d046; border-radius: 8px !important; background: #fffbea; }
.cfc-shield svg { width: 16px; height: 16px; }
.cfc-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 30px; padding: 16px 0 18px; border-top: 1px dashed var(--cf-line); }
.cfc-toggle b { display: block; font-weight: 500; }
.cfc-toggle small { display: block; color: var(--cf-soft); font-size: 14px; }
.cfc-switch { position: relative; width: 44px; height: 26px; flex: none; border: 1px solid var(--cf-icon-line); border-radius: 13px !important; background: var(--cf-hover); }
.cfc-switch i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50% !important; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); }

.signin-actions { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px; margin: auto -32px 0; padding: 18px max(32px, calc((100% - 1100px) / 2 + 32px)) 16px; border-top: 1px dashed var(--dash); background: var(--background); }
.signin-actions .btn-primary { flex: 1; }
.signin.first .signin-actions { padding-inline: max(32px, calc((100% - 820px) / 2 + 32px)); }
.btn-xl { height: 60px; padding: 0 28px; font-size: 18px; }
.signin-revoke { flex-basis: 100%; display: block; text-align: center; padding: 4px 0; font-size: 13.5px; color: var(--muted-foreground); text-decoration: underline; text-decoration-color: var(--dash); text-underline-offset: 3px; }
.signin-revoke:hover { color: var(--brand); text-decoration-color: currentColor; }
.signin-revoke svg { display: inline-block; width: 14px; height: 14px; margin-left: 4px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2; }
.cfc-who { padding: 18px 30px 22px; border-top: 1px solid var(--cf-line); }
.cfc-box { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--cf-line); border-radius: 10px !important; }
.cfc-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 6px !important; background: #ececec; color: #6f6f6f; font-size: 11px; font-weight: 600; }
.cfc-who .cfc-ico svg { stroke-width: 1.4; }
.cfc-edit { margin-left: auto; padding: 4px 10px; border: 1px solid var(--cf-line); border-radius: 6px !important; font-size: 14px; font-weight: 500; }
.cfc-trust { margin: 18px 0 6px; color: var(--cf-soft); text-align: center; }
.cfc-manage { margin: 0 0 16px; color: var(--cf-soft); font-size: 13.5px; font-style: italic; text-align: center; }
.cfc-btn { display: block; margin-top: 8px; padding: 10px; border: 1px solid var(--cf-line); border-radius: 8px !important; font-weight: 500; text-align: center; }
.cfc-authorize { border-color: #2c6fef; background: #2c6fef; color: #fff; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.consent.stacked .cfc { width: min(100%, 560px); }
.consent:not(.stacked) .cfc { display: grid; grid-template-columns: 530px 370px; width: 900px; margin: 0; padding: 0; font-size: 14.5px; }
.consent:not(.stacked) .cfc-perms { padding: 28px 0 0; border-right: 1px solid var(--cf-line); }
.consent:not(.stacked) .cfc-head, .consent:not(.stacked) .cfc-label { padding: 0 24px; }
.consent:not(.stacked) .cfc-scopes { gap: 38px 8px; padding: 0 24px 24px; }
.consent:not(.stacked) .cfc-sensitive { padding: 14px 24px; }
.consent:not(.stacked) .cfc-toggle { margin: 0 24px; }
.consent:not(.stacked) .cfc-who { display: flex; flex-direction: column; padding: 24px; border-top: 0; }
.consent:not(.stacked) .cfc-trust { margin-top: auto; }
.note.inside { white-space: nowrap; font-size: 15px; }
.consent.stacked .cfc-scopes { flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 0 16px 14px; }
.consent.stacked .cfc-scopes li { padding: 2px 0 10px; }
.consent.stacked .cfc-head, .consent.stacked .cfc-label { padding: 0 16px; }
.consent.stacked .cfc-sensitive { padding: 14px 16px; }
.consent.stacked .cfc-toggle { margin: 0 16px; }
.consent.stacked .cfc-rule.inset { margin: 0 16px; }
.consent.stacked .note { position: relative; display: block; margin: 4px 0 0 72px; font-size: 16px; text-align: left; }
.consent.stacked .note.must { margin: 18px 16px 16px; padding-left: 0; }
.consent.stacked .cfc-head { flex-wrap: wrap; gap: 2px 12px; font-size: 14px; }
.consent.stacked .cfc-sensitive { gap: 8px; font-size: 14px; }
.consent.stacked .cfc-sensitive .count { font-size: 13px; }
.consent.stacked .cfc-label { letter-spacing: 0.03em; }
.consent.stacked .note.must strong { font-size: 25px; }

@media (max-width: 720px) {
  .signin-body { padding: 22px 18px 0; }
  .cfpage { margin-inline: -18px; padding: 28px 12px 24px; }
  .cfp-title { font-size: 21px; }
  .cfp-warn { font-size: 13px; }
  .cfc-who { padding: 16px; }
  dialog.signin h2 { font-size: 22px; }
  .signin-actions, .signin.first .signin-actions { margin: auto -18px 0; padding: 12px 18px; }
  .btn-xl { height: 54px; font-size: 17px; padding: 0 18px; }
  .signin-plan div { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 16px 0; }
  .signin-plan dd { font-size: 16px; }
  .cfc { font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .note, .signin.on .consent-art path { transition: none; }
}
.signin-step[data-step="2"] h2 { text-align: center; }
.cfp-logos, .cfp-title, .cfp-warn, .cfc-head, .cfc-label, .cfc-who > *, .cfc-sensitive .cfc-info, .cfc-sensitive .count, .cfc-sensitive .caret { opacity: 0.35; }
.cfc { --cf-line: #efefef; box-shadow: none; }
