/* Authoring UI. Uses site tokens and never permits a separate theme. */
.learn-editor-page .editor-shell { max-width: 1320px; padding-top: 58px; padding-bottom: 100px; }
.editor-heading { display:flex; gap:24px; align-items:start; justify-content:space-between; border-bottom:1px solid var(--line); padding-bottom:28px; }
.editor-kicker { font-size:12px; letter-spacing:.15em; color:var(--muted); font-weight:750; }
.editor-heading h1 { margin:10px 0 14px; font-size:clamp(32px,4vw,52px); font-weight:620; letter-spacing:-.04em; }
.editor-heading p:last-child { max-width:720px; color:var(--muted); font-size:14px; line-height:1.75; }
.editor-state { font-size:12px; padding:7px 11px; border:1px solid var(--line); border-radius:8px; color:var(--ink); white-space:nowrap; }
.editor-message { font-size:14px; margin:24px 0; line-height:1.7; color:var(--muted); }
#editor-recovery-content { box-sizing:border-box; max-width:100%; white-space:pre-wrap; overflow-wrap:anywhere; overflow-x:auto; }
.editor-grid { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(300px,.9fr); gap:38px; margin-top:30px; }
.editor-fields { min-width:0; display:flex; flex-direction:column; gap:12px; }
.editor-fields label { display:block; font-size:13px; font-weight:720; color:var(--ink); margin-top:10px; }
.editor-fields label span { font-size:12px; font-weight:400; color:var(--muted); margin-left:7px; }
.editor-fields input, .editor-fields textarea {
  box-sizing:border-box; display:block; width:100%; font:inherit; font-size:14px; line-height:1.75;
  padding:12px 14px; border-radius:9px; border:1px solid var(--line);
  background:var(--surface); color:var(--ink); resize:vertical;
}
.editor-fields input:focus-visible, .editor-fields textarea:focus-visible, .editor-button:focus-visible {
  outline:2px solid var(--accent); outline-offset:2px;
}
#editor-body { min-height:350px; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:13px; }
.editor-pair { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.editor-help { color:var(--muted); font-size:12px; line-height:1.75; margin:10px 0; }
.editor-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:16px; }
.editor-button {
  display:inline-flex; align-items:center; justify-content:center; padding:10px 18px;
  min-height:43px; border-radius:9px; border:1px solid var(--line); font:inherit;
  color:var(--ink); background:var(--surface); font-size:13px; font-weight:720;
  cursor:pointer;
}
.editor-button.editor-primary { border-color:var(--brand-primary); background:var(--brand-primary); color:var(--brand-cta-ink); }
.editor-button:disabled { opacity:.52; cursor:not-allowed; }
.editor-preview-panel { align-self:start; position:sticky; top:22px; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.editor-preview-header { display:flex; gap:12px; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--line); font-size:12px; }
.editor-preview-header span { color:var(--muted); }
.editor-preview { max-height:650px; overflow:auto; padding:24px; overflow-wrap:anywhere; line-height:1.85; }
.editor-preview h2 { margin:8px 0 20px; font-size:25px; line-height:1.25; }
.editor-preview h3 { margin:24px 0 9px; font-size:20px; line-height:1.3; }
.editor-preview h4 { margin:18px 0 6px; font-size:16px; }
.editor-preview p { font-size:14px; margin:8px 0 14px; white-space:pre-wrap; }
.editor-preview pre { overflow:auto; white-space:pre-wrap; padding:14px; background:var(--surface); border:1px solid var(--line); border-radius:8px; font-size:12px; }
.editor-preview ul { padding-left:22px; line-height:1.8; }
.editor-preview .editor-placeholder { color:var(--muted); }
.editor-video-previews { padding:0 18px 18px; }
.editor-video-item { margin-top:12px; border:1px solid var(--line); border-radius:8px; padding:12px; }
.editor-video-item strong { display:block; margin-bottom:8px; font-size:12px; }
.editor-video-item button { border:1px solid var(--line); background:var(--surface); color:var(--ink); font:inherit; font-size:12px; padding:7px 10px; cursor:pointer; }
.editor-video-item iframe { display:block; width:100%; aspect-ratio:16/9; border:0; }
.editor-feedback { color:var(--ink); font-size:13px; min-height:1.5em; line-height:1.7; margin-top:20px; }
#editor-form[hidden], #editor-login[hidden], #editor-current-state[hidden] { display:none!important; }
#editor-fields { border:0; padding:0; margin:0; min-inline-size:0; }
@media(max-width:930px) { .editor-grid { grid-template-columns:1fr; } .editor-preview-panel { position:static; } }
@media(max-width:610px) { .editor-pair { grid-template-columns:1fr; } .editor-heading { display:block; } .editor-heading h1 { font-size:34px; } }

/* Owner-scoped D1 drafts: readable list, not locally cached metadata. */
.editor-my-submissions { margin:28px 0 36px; padding:19px 0 15px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.editor-list-heading { display:flex; gap:16px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.editor-list-heading h2 { margin:0; font-size:21px; font-weight:620; letter-spacing:-.025em; }
.editor-list-actions { display:flex; gap:9px; align-items:center; flex-wrap:wrap; }
.editor-list-actions .editor-button, #editor-list-more { min-height:34px; padding:6px 12px; border-radius:0; font-size:12px; text-decoration:none; }
.editor-list-items { display:flex; flex-direction:column; border-top:1px solid var(--line); }
.editor-list-entry { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px 0; border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none; }
.editor-list-entry:hover, .editor-list-entry:focus-visible { color:var(--accent-text); }
.editor-list-entry strong { font-size:14px; font-weight:640; overflow-wrap:anywhere; }
.editor-list-entry span { flex-shrink:0; color:var(--muted); font-size:12px; }
.editor-list-entry[aria-current="page"] strong { text-decoration:underline; text-underline-offset:4px; }
.editor-list-items .editor-help { margin:10px 0; }
#editor-list-more { margin-top:12px; }
#editor-my-submissions[hidden], #editor-list-more[hidden] { display:none!important; }
@media(max-width:600px) {
  #editor-list-refresh, #editor-list-items > div > button, #editor-save, #editor-submit { min-width:44px; min-height:44px; }
}
