:root { color-scheme:light; --ink:#222; --muted:#666; --line:#dedede; --soft:#f5f5f5; --danger:#a12622; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; background:#fff; color:var(--ink); font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; -webkit-font-smoothing:antialiased; }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; }
a { color:inherit; text-underline-offset:3px; }
a:hover { text-decoration-thickness:2px; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:2px solid #222; outline-offset:3px; }
input:focus,textarea:focus,select:focus { outline:2px solid #777; outline-offset:1px; }
button:disabled { opacity:.4; cursor:default; }
h1,h2,h3,p { margin-top:0; }
h1 { font-size:24px; line-height:1.3; font-weight:600; letter-spacing:-.025em; margin-bottom:0; }
h2 { font-size:19px; line-height:1.4; font-weight:600; margin-bottom:20px; }
h3 { font-size:16px; font-weight:600; margin-bottom:12px; }
p { margin-bottom:16px; }
.muted,.field-help,.save-status { color:var(--muted); }
.button { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:40px; padding:8px 14px; border:1px solid #ccc; border-radius:4px; background:#fff; color:var(--ink); font-size:14px; line-height:1.4; text-decoration:none; white-space:nowrap; }
.button:hover { background:var(--soft); }
.button.primary { background:#222; color:#fff; border-color:#222; }
.button.primary:hover { background:#444; border-color:#444; }
.button.danger,.text-button.danger { color:var(--danger); }
.text-button { border:0; background:none; padding:5px 0; color:inherit; font-size:14px; text-decoration:underline; text-underline-offset:3px; }
.simple-editor { width:100%; max-width:788px; margin:0 auto; padding:32px 24px 60px; }
.editor-header { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:28px; }
.header-actions { display:flex; align-items:center; gap:20px; font-size:14px; }
.header-actions a { text-decoration:none; }
.header-actions a:hover { text-decoration:underline; }
.header-actions .text-button { text-decoration:none; }
.editor-tabs { display:flex; gap:24px; border-bottom:1px solid var(--line); }
.nav-button { padding:10px 1px 12px; border:0; border-bottom:2px solid transparent; margin-bottom:-1px; background:none; color:var(--muted); font-size:15px; }
.nav-button.active,.nav-button[aria-current="page"] { color:var(--ink); border-bottom-color:var(--ink); font-weight:600; }
.nav-button:hover { color:var(--ink); }
.nav-count { margin-left:5px; font-size:12px; font-weight:400; color:var(--muted); }
.save-bar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 16px; position:sticky; top:0; z-index:3; background:#fff; border-bottom:1px solid var(--line); padding:14px 0; margin-bottom:28px; }
.save-status { font-size:13px; }
.save-status.dirty { color:#222; font-weight:500; }
.save-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
#discard-button { border-color:transparent; color:var(--muted); }
#discard-button:hover:not(:disabled) { background:var(--soft); }
#toggle-preview[aria-expanded="true"] { background:var(--soft); }
.workspace-grid,.editor-column,.section-panel { min-width:0; }
.section-panel > h2 { margin-bottom:24px; }
.panel-heading { margin-bottom:24px; }
.panel-heading h2 { margin-bottom:8px; }
.panel-heading p { color:var(--muted); font-size:14px; }
.panel-block { margin-bottom:28px; }
.field { min-width:0; margin-bottom:20px; }
.field label { display:block; margin-bottom:7px; font-size:14px; font-weight:500; }
input:not([type="checkbox"]):not([type="radio"]),textarea,select { width:100%; display:block; border:1px solid #ccc; border-radius:4px; padding:9px 11px; background:#fff; color:var(--ink); font-size:16px; line-height:1.5; }
input:not([type="checkbox"]):not([type="radio"]) { min-height:43px; }
textarea { resize:vertical; min-height:86px; }
textarea#home-aboutBody { min-height:132px; }
input[type="checkbox"],input[type="radio"] { width:17px; height:17px; accent-color:#222; margin:0; flex:none; }
input[type="file"] { font-size:14px; padding:12px; }
input[type="file"]::file-selector-button { background:var(--soft); border:1px solid #ccc; border-radius:3px; padding:6px 10px; margin-right:12px; color:var(--ink); cursor:pointer; }
.field-help { margin:6px 0 0; font-size:13px; line-height:1.5; }
.checkbox-field { display:flex; align-items:center; gap:10px; margin:20px 0; font-size:14px; }
.checkbox-field label { margin:0; }
.advanced-fields { margin:24px 0; padding:0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.advanced-fields + .advanced-fields { margin-top:-25px; }
.advanced-fields > summary { cursor:pointer; padding:14px 0; font-size:14px; font-weight:500; }
.advanced-fields[open] > summary { margin-bottom:10px; }
.advanced-fields > :last-child:not(summary) { margin-bottom:24px; }
.portrait-options { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:22px; }
.portrait-option { display:flex; align-items:center; gap:12px; background:#fff; padding:10px 14px 10px 10px; color:var(--ink); border:1px solid #ccc; border-radius:4px; font-size:14px; }
.portrait-option img { display:block; width:52px; height:52px; object-fit:cover; }
.portrait-option.selected,.portrait-option[aria-pressed="true"] { border-color:#222; box-shadow:inset 0 0 0 1px #222; }
.portrait-option:hover { background:var(--soft); }
.writing-toolbar,.section-heading-row { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.writing-toolbar h2,.section-heading-row h2 { margin:0; }
.writing-toolbar .field-help { margin-top:3px; }
.entry-list { margin-bottom:28px; border-top:1px solid var(--line); }
.entry-card { width:100%; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:13px 12px; border:0; border-bottom:1px solid var(--line); border-radius:0; text-align:left; background:#fff; color:var(--ink); }
.entry-card:hover,.entry-card.selected { background:var(--soft); }
.entry-card.selected { box-shadow:inset 3px 0 0 #222; }
.entry-title { display:block; font-size:14px; line-height:1.5; }
.entry-meta { display:block; font-size:12px; line-height:1.5; color:var(--muted); white-space:nowrap; }
.entry-actions { display:flex; align-items:center; gap:16px; }
.entry-actions .text-button { font-size:13px; }
.link-list { display:grid; gap:12px; margin-bottom:8px; }
.link-row { display:grid; grid-template-columns:130px minmax(0,1fr) auto; gap:12px; align-items:end; }
.link-row .field { margin-bottom:0; }
.link-row .field label { font-size:12px; }
.link-row .remove-link { min-height:43px; padding-inline:3px; font-size:13px; }
#add-paper-link { font-size:13px; margin-top:6px; }
.form-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:22px; }
.form-footer .field-help { margin:0; }
.empty-state { color:var(--muted); margin:0; padding:18px 0; font-size:14px; }
.notice { font-size:14px; line-height:1.5; padding:12px 14px; background:var(--soft); border:1px solid var(--line); border-radius:4px; margin:0 0 22px; overflow-wrap:anywhere; }
.notice:empty { display:none; }
.notice.error { color:var(--danger); border-color:#e3c4c1; background:#fff8f7; }
.notice.success { background:#f7f7f7; border-color:#d6d6d6; }
.demo-banner { color:var(--muted); background:var(--soft); border:1px solid var(--line); border-radius:4px; padding:10px 13px; margin:0 0 24px; font-size:13px; }
.demo-banner .text-button { font-size:13px; margin-left:8px; }
.current-document { margin-bottom:24px; }
.current-document a { font-size:15px; }
.current-document p { color:var(--muted); font-size:14px; margin:0 0 8px; }
.file-upload { margin-bottom:16px; }
.file-upload > label { display:block; font-size:14px; font-weight:500; margin-bottom:8px; }
#cv-upload-help { margin:0 0 16px; }
#cv-notice { margin-top:18px; }
.preview-panel { margin-top:36px; border:1px solid var(--line); border-radius:4px; overflow:hidden; background:var(--soft); }
.preview-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 16px; border-bottom:1px solid var(--line); }
.preview-toolbar h2,.preview-toolbar h3 { font-size:14px; margin:0; }
.preview-toolbar .field-help { font-size:12px; }
.device-toggle { display:flex; gap:4px; }
.device-toggle button { border:1px solid transparent; background:none; border-radius:3px; color:var(--muted); font-size:12px; padding:5px 9px; }
.device-toggle button.active,.device-toggle button[aria-pressed="true"] { border-color:#ccc; color:var(--ink); background:white; }
.preview-viewport { width:100%; margin:0 auto; }
.preview-viewport.mobile { max-width:390px; border-left:1px solid var(--line); border-right:1px solid var(--line); }
.preview-viewport iframe { width:100%; height:640px; display:block; border:0; background:#fff; }
.preview-caption { font-size:12px; color:var(--muted); padding:10px 14px; border-top:1px solid var(--line); margin:0; }
.auth-shell { max-width:420px; margin:70px auto; padding:0 24px; }
.back-link { display:inline-block; margin-bottom:30px; font-size:14px; }
.auth-card h1 { margin-bottom:12px; }
.auth-card > p { color:var(--muted); font-size:14px; }
.auth-card form { margin:24px 0; }
.auth-card #sign-in-button { width:100%; }
.auth-divider { border-top:1px solid var(--line); margin:24px 0 16px; }
.auth-card .notice { margin-top:18px; }
.confirm-dialog { width:calc(100% - 40px); max-width:410px; border:1px solid #ccc; border-radius:6px; padding:26px; color:var(--ink); box-shadow:0 12px 50px #0002; }
.confirm-dialog::backdrop { background:#0005; }
.confirm-dialog h2 { font-size:21px; margin-bottom:12px; }
.confirm-dialog p { font-size:15px; color:var(--muted); }
.dialog-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; margin-top:24px; }
.skip-link { position:fixed; top:-80px; left:16px; z-index:10; padding:10px 14px; background:#fff; border:1px solid #ccc; }
.skip-link:focus { top:12px; }
.visually-hidden,.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:560px) {
  .simple-editor { padding:24px 18px 40px; }
  .editor-header { align-items:flex-start; gap:14px; margin-bottom:24px; }
  .editor-header h1 { font-size:22px; }
  .header-actions { gap:12px; flex-wrap:wrap; justify-content:flex-end; font-size:13px; }
  .header-actions .text-button { font-size:13px; }
  .editor-tabs { gap:25px; }
  .save-bar { gap:9px; margin-bottom:24px; }
  .save-status { width:100%; font-size:12px; }
  .save-actions { width:100%; justify-content:flex-end; }
  .save-actions .button { font-size:13px; padding:8px 11px; }
  .save-actions #discard-button { margin-right:auto; padding-left:0; }
  .link-row { grid-template-columns:90px minmax(0,1fr); gap:8px; }
  .link-row .remove-link { grid-column:2; justify-self:end; min-height:28px; padding:0; }
  .entry-card { gap:12px; padding:12px 8px; }
  .entry-title { font-size:14px; }
  .writing-toolbar,.section-heading-row { gap:12px; }
  .portrait-option { flex:1; gap:8px; padding:8px; }
  .portrait-option img { width:42px; height:42px; }
  .form-footer { align-items:flex-start; }
  .preview-viewport iframe { height:560px; }
  .auth-shell { margin-top:34px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; transition:none !important; } }
