/* Onboarding additions on top of signup.css: the live analysis, its findings and the score. */

:root {
  --pass-c: var(--ice);
  --warn-c: var(--ember);
  --fail-c: var(--problem);
  --unknown-c: color-mix(in srgb, var(--ash) 78%, transparent);
}

/* Score on the pass card */
.pass-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-top: 14px; }
.pass-score[hidden] { display: none; }
.pass-score b { font-size: 34px; font-weight: 500; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.pass-score span { font-size: 14px; color: rgba(255, 255, 255, .55); }
.pass-score i { flex-basis: 100%; height: 3px; margin-top: 10px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.pass-score em { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1.4s cubic-bezier(.2, .8, .2, 1); }

/* The scope: a small quiet dial and one line of narration */
.scope { display: flex; align-items: center; gap: 28px; margin-top: 22px; }
.dial { position: relative; flex: none; width: 150px; height: 150px; }
.dial svg { width: 100%; height: 100%; overflow: visible; }
.dial-ring { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 1; }
.dial-ticks { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 4; stroke-dasharray: .6 7.6; }
.dial-sweep { transform-origin: 100px 100px; animation: dial-sweep 3.6s linear infinite; }
.dial-sweep line { stroke: rgba(255, 255, 255, .35); stroke-width: 1; }
.is-done .dial-sweep { opacity: 0; transition: opacity .8s; }
.scope.is-done .scope-clock { display: none; }
@keyframes dial-sweep { to { transform: rotate(1turn); } }
.dial-point .dot { fill: rgba(255, 255, 255, .28); transition: fill .4s; }
.dial-point .halo { fill: currentColor; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4); transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.dial-point text { font: 9px var(--mono); letter-spacing: .06em; fill: rgba(255, 255, 255, .42); transition: fill .4s; }
.dial-point[data-status] .dot { fill: currentColor; }
.dial-point[data-status] .halo { opacity: .16; transform: scale(1); }
.dial-point[data-status] text { fill: rgba(255, 255, 255, .78); }
.dial-point[data-status="pass"] { color: var(--pass-c); }
.dial-point[data-status="warn"] { color: var(--warn-c); }
.dial-point[data-status="fail"] { color: var(--fail-c); }
.dial-point[data-status="unknown"] { color: rgba(255, 255, 255, .5); }
.dial-count { position: absolute; inset: 0; display: grid; place-content: center; grid-auto-flow: column; align-items: baseline; gap: 2px; }
.dial-count b { font-size: 34px; font-weight: 400; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.dial-count span { font-size: 14px; color: var(--faint); }
.scope.is-consumer .dial-point, .scope.is-consumer .dial-sweep { opacity: 0; }
.scope.is-consumer .dial-count span, .scope.is-consumer .scope-clock { display: none; }
.scope.is-consumer .dial-count b { color: var(--pass-c); }
.scope-copy { min-width: 0; }
.scope-label { display: block; font-size: 13px; color: var(--faint); }
.scope-now { min-height: 24px; margin: 6px 0 0; font-size: 15px; color: var(--ink); }
.scope-clock { margin: 4px 0 0; font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* Live analysis rows, in the review list style */
.checks { margin-top: 20px; border-top: 1px solid var(--line); }
.check { display: grid; grid-template-columns: 96px 1fr auto; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.check dt { color: var(--body); }
.check dd { margin: 0; min-width: 0; color: var(--faint); overflow-wrap: anywhere; font-size: 15px; transition: color .3s; }
.check .detail { display: block; margin-top: 3px; font: 12.5px var(--mono); color: var(--faint); }
.check .state { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; color: var(--faint); }
.check .state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.check[data-status] dd { color: var(--ink); }
.check[data-status] { animation: pass-in .3s ease-out; }
.check[data-status="pass"] .state { color: var(--pass-c); }
.check[data-status="warn"] .state { color: var(--warn-c); }
.check[data-status="fail"] .state { color: var(--fail-c); }
.check[data-status="unknown"] .state { color: var(--unknown-c); }
.check:not([data-status]) .state::before { animation: wait 1s ease-in-out infinite; }
@keyframes wait { 50% { opacity: .2; } }

/* Findings, in the choice card style but read-only */
.findings { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.finding { padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 12px; background: rgba(26, 29, 36, .72); }
.finding[data-sev="fail"] { --c: var(--fail-c); }
.finding[data-sev="warn"] { --c: var(--warn-c); }
.finding b { display: block; font-weight: 500; }
.finding .tag { margin-left: 8px; font: 12px var(--mono); color: var(--c); }
.finding p { margin: 4px 0 0; font-size: 14px; color: var(--body); }
.finding .fix { margin-top: 10px; font-size: 14px; color: var(--ink); }
.finding .fix span { color: var(--faint); }
.finding code { font: 13px var(--mono); color: color-mix(in srgb, var(--ember) 68%, white); overflow-wrap: anywhere; }
.dns-record { margin: 12px 0 0; border-top: 1px solid var(--line); }
.dns-record div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.dns-record dt { color: var(--faint); font-size: 13px; }
.dns-record dd { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; margin: 0; }
.dns-record code { min-width: 0; white-space: normal; word-break: break-all; }
.dns-record .copy { flex: none; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--body); cursor: pointer; }
.dns-record .copy:hover { border-color: #fff; color: #fff; }
.strong-points { margin-top: 18px; font-size: 14px; color: var(--body); }
.strong-points b { font-weight: 500; color: var(--pass-c); }
.strong-points span { color: var(--faint); }
.spf-senders { margin-top: 10px; }
.findings-actions { flex-wrap: wrap; }
.recheck-hint { margin-top: 10px; }

/* Demo placement: the send list and its tools */
.send-list dd { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.send-list code { font: 14px var(--mono); color: var(--ink); overflow-wrap: anywhere; text-align: right; }
.send-list .copy { flex: none; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--body); cursor: pointer; }
.send-list .copy:hover { border-color: #fff; color: #fff; }
.scope-note { margin-top: 12px; font-size: 13px; color: var(--faint); }
.ask-actions .btn-ghost { background: none; color: #fff; box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; }
.ask-actions .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.ask-actions + .ask-actions { margin-top: 14px; }
.mailbox-menu-wrap { position: relative; display: grid; flex: 1 1 220px; gap: 8px; }
.mailbox-menu-wrap > .btn { width: 100%; justify-content: center; }
.mailbox-menu {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #12151b;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .24);
}
.mailbox-menu.hidden { display: none; }
.mailbox-menu a {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}
.mailbox-menu a:last-child { border-bottom: 0; }
.mailbox-menu a:hover, .mailbox-menu a:focus-visible { background: rgba(255, 255, 255, .08); outline: 0; }
.mailbox-menu span { font-size: 13px; font-weight: 600; }
.mailbox-menu small { color: var(--faint); font-size: 12px; line-height: 1.35; }

.field input[type="password"] { letter-spacing: .08em; }
.ask-actions .btn:disabled { opacity: .45; cursor: progress; }
.consent { margin-top: 18px; font-size: 14px; color: var(--faint); }
.consent a { color: var(--body); text-decoration: underline; text-underline-offset: 3px; }
.consent a:hover { color: #fff; }
.preview-note { margin-top: 16px; font-size: 14px; color: var(--warn-c); }

@media (max-width: 900px) {
  .check { grid-template-columns: 72px 1fr auto; gap: 10px; }
  .scope { gap: 18px; }
  .dial { width: 128px; height: 128px; }
  .dial-count b { font-size: 26px; }
}

@media (max-width: 520px) {
  .dns-record div { grid-template-columns: 1fr; gap: 4px; }
  .dns-record dd { align-items: flex-start; }
  .dns-record code { padding-top: 5px; }
  .findings-actions { gap: 10px; }
  .findings-actions .btn { padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .check[data-status], .check:not([data-status]) .state::before, .dial-sweep { animation: none; }
  .pass-score em { transition: none; }
}
