.editor-intro{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:64px;padding-block:var(--sai-hero-y);align-items:end;border-bottom:1px solid var(--sai-line)}.editor-back{display:inline-flex;min-height:44px;align-items:center;font-size:var(--sai-text-small);color:var(--sai-action);margin-bottom:20px}.editor-intro h1{font-size:var(--sai-text-h1);font-weight:730;line-height:var(--sai-leading-heading);letter-spacing:var(--sai-tracking-display);margin-bottom:24px}.editor-intro>div>p{font-size:var(--sai-text-body);color:var(--sai-muted);line-height:1.8}.editor-intro-note{background:var(--sai-blue);padding:32px;border-top:3px solid var(--sai-ink)}.editor-intro-note>span{font-size:var(--sai-text-small)}.editor-intro-note strong{display:block;font-size:var(--sai-text-h3);font-weight:650;margin:16px 0;overflow-wrap:anywhere;line-height:1.4}.editor-intro-note p{font-size:var(--sai-text-small);color:var(--sai-body)}.editor-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:72px;padding:48px 0 80px}.editor-layout>*{min-width:0}.editor-navigation ol{padding:0;margin:0 0 24px;list-style:none}.editor-navigation li{border-bottom:1px solid var(--sai-line)}.editor-navigation [data-step]{display:flex;gap:16px;min-height:64px;align-items:center;width:100%;padding:12px 0;text-align:left;font-size:var(--sai-text-body);color:var(--sai-muted)}.editor-navigation [data-step] span{font-size:var(--sai-text-caption);font-variant-numeric:tabular-nums}.editor-navigation [aria-current=step]{color:var(--sai-action);font-weight:650;border-bottom:2px solid var(--sai-action)}.editor-navigation p{font-size:var(--sai-text-small);line-height:1.8;color:var(--sai-muted);margin-bottom:20px}.editor-navigation .sai-button{width:100%;font-size:var(--sai-text-small)}.editor-help-link{display:inline-flex;align-items:center;min-height:48px;font-size:var(--sai-text-small);color:var(--sai-action)}.editor-status{font-size:var(--sai-text-small);padding:16px 20px;line-height:1.8;background:var(--sai-field);margin-bottom:32px;color:var(--sai-body)}.editor-error{color:var(--sai-danger);font-size:var(--sai-text-small);padding:16px 0;border-bottom:1px solid var(--sai-danger);margin-bottom:24px}.editor-step h2{font-size:var(--sai-text-h2);font-weight:700;letter-spacing:-.035em;margin-bottom:16px}.editor-step h2:focus{outline:none}.editor-section-note{font-size:var(--sai-text-body);color:var(--sai-muted);line-height:1.8;margin-bottom:32px}.editor-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.editor-fields>.full{grid-column:1/-1}.editor-fields label,.editor-single-field{display:block;font-size:var(--sai-text-small);font-weight:600;min-width:0}.editor-fields :is(input,textarea,select),.editor-single-field input{margin-top:8px}.editor-fields textarea{resize:vertical;min-height:130px}.editor-fields textarea#profile-summary{min-height:240px}.editor-fields small,.editor-field-note{font-size:var(--sai-text-small);font-weight:400;display:block;color:var(--sai-muted);margin-top:8px;line-height:1.7}.editor-fields input::placeholder,.editor-fields textarea::placeholder,.editor-single-field input::placeholder{color:var(--sai-muted);opacity:1}.profile-editor .optional,.profile-editor .required{font-size:var(--sai-text-caption);font-weight:400;color:var(--sai-muted);margin-left:5px}.editor-block-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:40px 0 20px;padding-top:24px;border-top:1px solid var(--sai-line)}.editor-block-heading h3{font-size:var(--sai-text-h3);font-weight:650}.editor-block-heading p{font-size:var(--sai-text-small);color:var(--sai-muted);margin-top:8px}.editor-add{flex:none;padding:10px 0 10px 12px;color:var(--sai-action);font-size:var(--sai-text-small);min-height:44px}.editor-record{padding:24px;background:white;border:1px solid var(--sai-line);margin-top:16px;min-width:0}.editor-record-top{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;font-size:var(--sai-text-small);color:var(--sai-muted)}.editor-record-top button{font-size:var(--sai-text-small);min-height:44px;color:var(--sai-muted);text-decoration:underline;text-underline-offset:4px}.editor-empty{font-size:var(--sai-text-small);color:var(--sai-muted);padding:20px 0;border-block:1px solid var(--sai-line-soft)}.editor-photo-row{display:flex;align-items:center;gap:24px;margin-bottom:32px}.editor-avatar{width:112px;height:140px;flex:none;display:grid;place-items:center;background:var(--sai-blue);color:var(--sai-ink);font-size:var(--sai-text-h2);font-weight:650;overflow:hidden}.editor-avatar img{width:100%;height:100%;object-fit:cover}.editor-photo-row>div{min-width:0}.editor-photo-row p{font-size:var(--sai-text-caption);color:var(--sai-muted);line-height:1.8}.editor-upload-label{font-size:var(--sai-text-small);font-weight:600}.editor-text-button{min-height:44px;min-width:44px;font-size:var(--sai-text-small);font-weight:600;color:var(--sai-ink);padding:8px 16px;border:1px solid transparent;border-radius:var(--sai-radius);background:transparent}.editor-text-button:hover:not(:disabled){background:var(--sai-field)}.editor-text-button:disabled{color:var(--sai-muted);cursor:not-allowed}.editor-choice-group,.editor-check-group{border:0;padding:0;margin:0 0 32px;min-width:0}.editor-choice-group legend,.editor-check-group legend{font-size:var(--sai-text-body);font-weight:650;margin-bottom:16px}.editor-choice-group>label{display:flex;gap:14px;align-items:flex-start;border:1px solid var(--sai-line);padding:20px;margin-bottom:10px;cursor:pointer;min-width:0}.editor-choice-group>label:has(input:checked){background:var(--sai-selected);border-color:var(--sai-action)}.editor-choice-group strong{display:block;font-size:var(--sai-text-body);font-weight:600}.editor-choice-group small{display:block;font-size:var(--sai-text-small);color:var(--sai-muted);line-height:1.8;margin-top:6px}.editor-choice-group input,.editor-check-group input{width:18px;height:18px;flex:none;margin:4px 0 0;accent-color:var(--sai-action)}.editor-check-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.editor-check-group label{display:flex;gap:12px;align-items:center;padding:16px;border:1px solid var(--sai-line);font-size:var(--sai-text-body);cursor:pointer}.editor-check-group label:has(input:checked){background:var(--sai-selected);border-color:var(--sai-action)}.editor-check-group input{margin:0}.editor-single-field{margin-bottom:32px}.editor-step-actions{display:flex;justify-content:flex-end;gap:12px;padding-top:24px;margin-top:32px;border-top:1px solid var(--sai-line)}.editor-preview{border:1px solid var(--sai-line);padding:0 32px;margin-bottom:32px}.editor-preview .folio-heading{padding:32px 0;grid-template-columns:minmax(0,1fr) 100px;gap:24px}.editor-preview .folio-portrait{width:100px}.editor-preview .preview-name{font-size:var(--sai-text-h2)}.editor-preview .folio-label{font-size:var(--sai-text-caption)}.editor-preview .folio-headline{font-size:var(--sai-text-lead)}.editor-preview .folio-body{grid-template-columns:1fr;gap:32px;padding:32px 0}.editor-preview .folio-aside{border:0;border-top:1px solid var(--sai-line);padding:24px 0 0}.editor-preview .folio-aside dl{display:grid;grid-template-columns:1fr 1fr;gap:24px}.editor-preview .folio-portrait>span{font-size:var(--sai-text-h2)}.saved-profile-links{padding:20px;background:var(--sai-selected);margin-top:24px;display:flex;flex-wrap:wrap;gap:16px}.saved-profile-links a{display:inline-flex;min-height:44px;align-items:center;color:var(--sai-action);font-weight:600;font-size:var(--sai-text-small)}.editor-publish{width:100%}.profile-editor [aria-invalid=true]{border-color:var(--sai-danger)}.profile-editor :is(input,button,select,textarea):focus-visible{outline:2px solid var(--sai-action);outline-offset:3px}
@media(max-width:1100px){.editor-layout{grid-template-columns:210px minmax(0,1fr);gap:32px}.editor-intro{gap:32px}.editor-intro-note{padding:24px}}
@media(max-width:900px){.editor-intro{grid-template-columns:1fr;gap:24px}.editor-intro-note{display:none}.editor-layout{grid-template-columns:1fr;padding-top:24px;gap:24px}.editor-navigation ol{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}.editor-navigation p,.editor-help-link{display:none}.editor-navigation .sai-button{width:auto;min-height:44px}.editor-navigation [data-step]{min-height:54px}.editor-step h2{font-size:var(--sai-text-h2)}}
@media(max-width:600px){.editor-intro h1{font-size:var(--sai-text-h1)}.editor-intro>div>p{font-size:var(--sai-text-small)}.editor-back{margin-bottom:12px}.editor-fields{grid-template-columns:1fr;gap:20px}.editor-fields>.full{grid-column:auto}.editor-record{padding:16px}.editor-block-heading{gap:12px;align-items:flex-start}.editor-add{font-size:var(--sai-text-small);padding-left:0;white-space:nowrap}.editor-step h2{font-size:var(--sai-text-h2)}.editor-section-note{font-size:var(--sai-text-small)}.editor-photo-row{gap:16px}.editor-avatar{width:80px;height:100px}.editor-check-group{grid-template-columns:1fr}.editor-choice-group>label{padding:16px}.editor-step-actions{flex-wrap:wrap}.editor-step-actions .sai-button{flex:1;font-size:var(--sai-text-small);padding-inline:12px}.editor-preview{padding-inline:16px}.editor-preview .folio-heading{grid-template-columns:minmax(0,1fr) 64px;gap:12px}.editor-preview .preview-name{font-size:var(--sai-text-h2)}.editor-preview .folio-portrait{width:64px}.editor-preview .folio-headline{font-size:var(--sai-text-body)}.editor-preview .folio-aside dl{grid-template-columns:1fr}.editor-preview .folio-record{grid-template-columns:1fr}.editor-status{font-size:var(--sai-text-small);padding:16px}.editor-navigation ol{gap:0 12px}.editor-navigation [data-step]{font-size:var(--sai-text-small);gap:9px}.editor-navigation [data-step] span{font-size:var(--sai-text-caption)}.editor-block-heading h3{font-size:var(--sai-text-h3)}}

.saved-profile-links{margin:0 0 28px}.editor-preview .preview-name{font-weight:730;line-height:1.2;letter-spacing:-.045em;margin:0 0 20px}.editor-fields input[readonly]{color:var(--sai-muted);background:var(--sai-surface)}
.join-gate{max-width:680px;padding:64px 0 96px}.join-gate h2{font-size:var(--sai-text-h2);font-weight:700;letter-spacing:-.035em;margin-bottom:16px}.join-gate p{font-size:var(--sai-text-body);line-height:1.8;color:var(--sai-body);margin-bottom:32px;word-break:keep-all}.join-gate-actions{display:flex;flex-wrap:wrap;gap:12px 16px}.join-gate-actions .sai-button{min-width:160px}@media(max-width:480px){.join-gate{padding-block:40px 64px}.join-gate-actions .sai-button{width:100%}}
/* The editor uses the shared profile renderer without its site-only proposal panel. */
.editor-preview .folio-heading{grid-template-columns:100px minmax(0,1fr);gap:20px;padding:24px 0}
.editor-preview .folio-portrait{width:100px}
.editor-preview .folio-layout{display:block;padding:12px 0 24px}
.editor-preview .folio-section{padding:22px 0}
.editor-preview .folio-sections{padding:0}
.editor-preview .folio-record{grid-template-columns:84px minmax(0,1fr)}
.editor-preview a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  white-space:normal;
  overflow-wrap:anywhere;
}
.editor-confirm{display:flex;align-items:flex-start;gap:12px;min-width:0;margin-block:20px;padding:16px;border:1px solid var(--sai-line);font-size:var(--sai-text-small);line-height:1.7;overflow-wrap:anywhere}.editor-confirm input{width:22px!important;height:22px;min-height:22px;flex:none;margin:2px 0 0;accent-color:var(--sai-action)}
.editor-education-public{min-width:0;margin:20px 0 0;padding:16px;border:1px solid var(--sai-line);display:flex;gap:8px 16px;flex-wrap:wrap}.editor-education-public legend{font-size:var(--sai-text-small);padding-inline:4px}.editor-education-public label{display:flex;align-items:center;gap:8px;min-height:44px;font-size:var(--sai-text-small)}.editor-education-public input{width:20px!important;height:20px;min-height:20px;flex:none;accent-color:var(--sai-action)}.editor-education-public p{width:100%;font-size:var(--sai-text-caption);color:var(--sai-muted)}
.profile-editor :is(input,select,textarea,button){max-width:100%;min-width:0;box-sizing:border-box}.profile-editor select{width:100%;min-height:48px;padding:12px;border:1px solid var(--sai-control-line);border-radius:var(--sai-radius);background:var(--sai-surface);font-size:16px}.profile-editor button{white-space:normal;height:auto;min-height:44px}.editor-preview p{overflow-wrap:anywhere}.editor-preview:empty{display:none}.editor-preview{min-width:0}.editor-photo-row>div:last-child{flex:1;min-width:0}#preview-public-profile{width:100%;margin-bottom:16px}
@media(max-width:600px){.editor-photo-row{flex-wrap:wrap}.editor-photo-row>div:last-child{flex-basis:calc(100% - 96px)}.editor-preview .folio-portrait{flex:none}.editor-confirm{padding:12px}.editor-education-public{padding:12px}}
@media(max-width:600px){.editor-preview .folio-heading{grid-template-columns:64px minmax(0,1fr);gap:12px}.editor-preview .folio-portrait{width:64px;aspect-ratio:1}.editor-preview .folio-record{grid-template-columns:minmax(0,1fr)}}

/* Private editor boundary: hidden must win over layout display rules. */
.profile-editor [hidden]{display:none!important}
.editor-session{padding-block:32px;overflow-wrap:anywhere}
.editor-session p{margin-bottom:16px;line-height:1.8;color:var(--sai-body)}
.editor-session :is(button,a){min-height:44px;max-width:100%;white-space:normal}
.editor-session a{margin-left:16px}
.editor-recovery{display:flex;flex-wrap:wrap;gap:8px 16px}
.editor-recovery:has(> :not([hidden])){margin-bottom:24px}
.editor-recovery .editor-help-link:not([hidden]),
.editor-session .editor-help-link:not([hidden]){
  display:inline-flex;
  align-items:center;
  min-height:44px;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  white-space:normal;
  overflow-wrap:anywhere;
}
.profile-editor :is(input,textarea,select){font-size:16px}
.profile-editor input:not([type=checkbox]):not([type=radio]){min-height:44px}
.profile-editor :is(input,textarea,select,button,a,[tabindex]){scroll-margin-block:112px}
@media(max-width:480px){.editor-session a{margin-left:0}.editor-session button{width:100%}}

/* V5: the photo picker. The native file input is invisible (opacity 0) but stays on top of the button, focusable and labelled; the label is the Secondary button. */
.editor-avatar[data-state=empty]{height:112px;border-radius:50%}
.editor-avatar-icon{width:48px;height:48px;fill:none;stroke:var(--sai-muted);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.editor-upload-label{display:block;margin-bottom:8px}
.editor-photo-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.editor-file-control{position:relative;display:inline-flex;max-width:100%}
.profile-editor .editor-file-input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.profile-editor .editor-file-input:disabled{cursor:not-allowed}
.editor-file-button{cursor:pointer}
.editor-file-input:hover:not(:disabled)+.editor-file-button{background:var(--sai-selected);color:var(--sai-action);border-color:var(--sai-action)}
.editor-file-input:focus-visible+.editor-file-button{outline:2px solid var(--sai-action);outline-offset:2px}
.editor-file-input:disabled+.editor-file-button{background:var(--sai-field);color:var(--sai-muted);border-color:var(--sai-line);cursor:not-allowed}
.editor-file-input[aria-invalid=true]+.editor-file-button{border-color:var(--sai-danger)}
.editor-photo-row .editor-file-name{margin:8px 0 4px;font-size:var(--sai-text-small);color:var(--sai-body);overflow-wrap:anywhere}
@media(max-width:600px){.editor-avatar[data-state=empty]{height:80px}.editor-avatar-icon{width:36px;height:36px}}

/* V5: a problem that belongs to one input is shown under it (the input also gets aria-invalid and the red border above). */
.profile-editor .editor-field-error{display:block;margin-top:8px;color:var(--sai-danger);font-size:var(--sai-text-small);font-weight:600;line-height:1.7;overflow-wrap:anywhere}
.editor-confirm:has(input[aria-invalid=true]){border-color:var(--sai-danger)}
