/* The join wizard (/contribute). Tokens from style.css, buttons and avatar
 * pieces from people.css. Prefix: cw-. */
.cw { padding-top: 36px; padding-bottom: 24px; max-width: 1120px; }
.cw-title { margin-top: 12px; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 750; color: #fff; }
.cw-title .kw { background: linear-gradient(110deg, var(--amber), var(--teal) 60%, var(--emerald)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cw-lead { margin-top: 12px; font-size: 16px; line-height: 1.55; color: var(--mut); max-width: 64ch; }
.cw-flash { margin-top: 20px; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); color: var(--ink); }
.cw-block { margin-top: 24px; }
.cw-block h2 { font-size: 22px; color: #fff; }
.cw-block p { margin-top: 10px; color: var(--mut); max-width: 70ch; }

.cw-cols { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--gutter); align-items: start; }
.cw-card { padding: 28px 32px 26px; }

/* --- progress ------------------------------------------------------------------ */
.cw-progress { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cw-progress li { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 3px solid var(--line-2); color: var(--dim); font-size: 13.5px; min-width: 0; }
.cw-n { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); font: 600 12.5px/24px var(--mono); text-align: center; }
.cw-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-progress li.done { border-top-color: var(--emerald); color: var(--mut); }
.cw-progress li.done .cw-n { background: var(--emerald); border-color: var(--emerald); color: #03201c; }
.cw-progress li[aria-current="step"] { border-top-color: var(--amber); color: #fff; font-weight: 650; }
.cw-progress li[aria-current="step"] .cw-n { background: var(--amber); border-color: var(--amber); color: #1a1300; }
.cw-stepline { margin-top: 22px; color: var(--dim); font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }

/* --- a step ---------------------------------------------------------------------- */
.cw-step { margin-top: 10px; }
.cw-h { font-size: 26px; line-height: 1.2; font-weight: 700; color: #fff; letter-spacing: -0.01em; outline: none; }
.cw-p { margin-top: 10px; color: var(--mut); font-size: 15px; max-width: 62ch; }
.cw-p b { color: var(--ink); }
.cw-label { display: block; margin-top: 22px; margin-bottom: 8px; color: var(--ink); font-weight: 600; font-size: 14px; }
.cw-opt { margin-left: 6px; color: var(--dim); font: 400 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.cw-input { width: 100%; max-width: 380px; background: var(--bg); color: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 13px 14px; font: 500 18px/1.2 var(--sans); }
.cw-input:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-color: var(--teal); }
.cw-input[aria-invalid="true"] { border-color: var(--coral); }
.cw-hint { margin-top: 8px; color: var(--dim); font-size: 12.5px; }
.cw-err { color: var(--coral); font-size: 13.5px; }
.cw-err:not(:empty) { margin-top: 8px; }
.cw-ok { color: var(--emerald); font-size: 13.5px; }
.cw-ok:not(:empty) { margin-top: 10px; }
.cw-small { margin-top: 16px; color: var(--dim); font-size: 13px; }
.cw-linkbtn { border: 0; padding: 0; background: none; color: var(--teal); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; border-radius: 4px; }
.cw-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cw-row { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cw-row.center { justify-content: center; }
.cw-row .cw-hint { margin-top: 0; }

.cw-faces { display: flex; flex-wrap: wrap; gap: 10px; }
.cw-face { padding: 4px; border-radius: 50%; border: 2px solid transparent; background: none; line-height: 0; transition: transform 120ms; }
.cw-face:hover { border-color: var(--line-2); transform: translateY(-2px); }
.cw-face[aria-checked="true"] { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18); }

.cw-anon { margin-top: 22px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(45, 212, 191, 0.3); background: rgba(45, 212, 191, 0.06); color: var(--mut); font-size: 14px; }
.cw-anon b { color: var(--teal); }
.cw-notice { margin-top: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.06); color: var(--mut); font-size: 13.5px; }

.cw-code { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 10px 10px 14px; }
.cw-code code { flex: 1; min-width: 0; color: var(--ink); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; user-select: all; }
.cw-code.block { align-items: flex-start; }
.cw-code button { flex: none; padding: 6px 14px; font-size: 13px; font-weight: 600; }

.cw-os { margin-top: 18px; display: inline-flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.cw-os button { border: 0; border-radius: 9px; padding: 8px 18px; color: var(--mut); font: 500 14px/1.2 var(--sans); }
.cw-os button:hover { color: var(--ink); }
.cw-os button[aria-selected="true"] { background: var(--card-2); color: #fff; font-weight: 650; box-shadow: inset 0 0 0 1px var(--line-2); }
.cw-pane .cw-label { margin-top: 16px; }
.cw-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--mut); font-size: 13.5px; cursor: pointer; }
.cw-check input { width: 16px; height: 16px; accent-color: var(--teal); }
.cw-alt { margin-top: 20px; padding-top: 4px; border-top: 1px solid var(--rule); }
#link-box .cw-os { margin-top: 14px; margin-bottom: 10px; }

.cw-check-box { margin-top: 22px; display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--card-2); }
.cw-check-t { color: #fff; font-weight: 650; font-size: 16px; }
.cw-check-box .cw-hint { margin-top: 2px; }
.cw-spin { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(45, 212, 191, 0.2); border-top-color: var(--teal); animation: cw-spin 0.9s linear infinite; }
@keyframes cw-spin { to { transform: rotate(360deg); } }
.cw-trouble { margin-top: 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.05); color: var(--mut); font-size: 13.5px; }
.cw-trouble b { color: var(--ink); }
.cw-trouble ul { margin: 8px 0; padding-left: 20px; }
.cw-trouble li { margin: 4px 0; }
.cw-done { margin-top: 8px; padding: 28px 16px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.cw-done h3 { margin-top: 18px; font-size: 30px; color: #fff; letter-spacing: -0.02em; outline: none; }
.cw-done .cw-p { margin-left: auto; margin-right: auto; }
.cw-done .cw-row { margin-top: 20px; }
.cw-done .cw-hint { margin-top: 20px; max-width: 56ch; }
.cw-done-av, .cw-back-av, .cw-preview-av { display: inline-flex; padding: 5px; }

.cw-nav { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 12px; }
.cw-nav #next { margin-left: auto; min-width: 150px; }

/* --- side: preview and privacy -------------------------------------------------------- */
.cw-side { display: grid; gap: var(--gutter); position: sticky; top: 24px; }
.cw-side .card { padding: 20px; }
.cw-side-k { color: var(--dim); font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.cw-preview { text-align: center; }
.cw-preview-av { margin-top: 16px; }
.cw-preview-name { margin-top: 8px; font-size: 17px; font-weight: 650; color: #fff; overflow-wrap: anywhere; }
.cw-preview-name.empty { color: var(--dim); font-weight: 400; }
.cw-preview-st { color: var(--emerald); font-size: 12.5px; }
.cw-privacy ul { list-style: none; margin: 10px 0 18px; padding: 0; display: grid; gap: 7px; font-size: 13.5px; color: var(--mut); }
.cw-privacy li { position: relative; padding-left: 22px; }
.cw-privacy li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.cw-yes li::before { content: "✓"; color: var(--emerald); }
.cw-no li::before { content: "✕"; color: var(--coral); }

/* --- returning visitor ------------------------------------------------------------------ */
.cw-back-top { display: flex; align-items: center; gap: 20px; }
.cw-back-who h2 { margin-top: 8px; font-size: 28px; overflow-wrap: anywhere; outline: none; }
.cw-back .cw-back-state { margin-top: 4px; }
.cw-back-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.cw-confirm { margin-top: 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(229, 138, 127, 0.35); background: rgba(229, 138, 127, 0.06); }
.cw-confirm p { margin-top: 0; }
.cw-confirm b { color: var(--ink); }

@media (max-width: 900px) {
  .cw-cols { grid-template-columns: minmax(0, 1fr); }
  .cw-side { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 600px) {
  .cw { padding-top: 22px; }
  .cw-card { padding: 20px 18px; }
  .cw-l { display: none; }
  .cw-progress li[aria-current="step"] .cw-l { display: inline; }
  .cw-h { font-size: 22px; }
  .cw-nav .pp-btn { flex: 1; }
  .cw-back-top { flex-direction: column; align-items: flex-start; }
  .cw-os { display: flex; }
  .cw-os button { flex: 1; padding: 8px 6px; }
  .cw-code.block { flex-direction: column; }
  .cw-code.block button { align-self: flex-end; }
}
