/* The editor is the campus archive room, including its standalone extension view. */
:root {
  --campus-serif:"Songti SC","STSong","Noto Serif CJK SC",Georgia,serif;
}
body,body.handbook {
  background-color:var(--bg);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23000' filter='url(%23n)' opacity='.03' d='M0 0h96v96H0z'/%3E%3C/svg%3E");
  color:var(--text);
}
body h1,body h2,body h3,.nav-caption,.record-head strong {font-family:var(--campus-serif);color:var(--ink)}
.sidebar{background:var(--surface-2);border-right:1px solid var(--line)}
.nav-caption{color:var(--ink);font-size:19px;font-weight:700;letter-spacing:.05em}
.sidebar-progress strong,.sidebar-progress a,#nav a,#nav a small,.sidebar-bottom,.topbar {color:var(--muted)}
.sidebar-progress progress,.sidebar-progress progress::-webkit-progress-bar{background:var(--line)}
.sidebar-progress progress{accent-color:var(--primary)}
.sidebar-progress progress::-webkit-progress-value{background:var(--primary)}
#nav a{border-radius:0;min-height:36px;gap:8px}
#nav a b{color:var(--primary);font:600 12px/1.4 Georgia,serif;min-width:23px}
#nav a[aria-current]{color:var(--primary);background:var(--surface);box-shadow:inset 3px 0 var(--primary)}
#nav a[aria-current] b,#nav a.populated small{color:var(--primary)}
#nav a[data-checked="true"] small{color:#48684f}
.sidebar-bottom .local-dot{background:var(--muted)}
.topbar,.profile-next{background:color-mix(in srgb,var(--surface) 96%,transparent);border-color:var(--line)}
.topbar strong,.profile-next button,.topbar i{color:var(--primary)}
#save:not(.primary){border-color:var(--line);color:var(--primary);background:transparent}
#save-state{color:var(--text)}#save-state.unsaved{color:var(--primary)}
.book-options .page .hero,.page .hero{
  position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr);
  border-radius:16px;border:1px solid var(--line);overflow:hidden;gap:0;min-height:236px;
  background:linear-gradient(180deg,#cfe2ee 0%,#eaf2f8 65%,#f7fafc 100%);
}
.page .hero>div{grid-area:1/1;max-width:min(52%,520px);z-index:1;padding:30px 0 36px clamp(22px,3vw,42px);align-self:start}
.hero .eyebrow{font:600 13px/1.6 var(--campus-serif);letter-spacing:.12em;color:var(--primary)}
.page .hero h1{text-wrap:balance;font:700 clamp(32px,3.4vw,50px)/1.22 var(--campus-serif);letter-spacing:-.04em;margin:8px 0 14px;color:var(--ink)}
.page .hero p{text-wrap:pretty;max-width:30em;color:var(--text);font-size:14px;line-height:1.85}
.page .hero .campus-illustration{grid-area:1/1;display:block;width:60%;max-width:none;height:auto;align-self:end;justify-self:end;margin-right:-1px;margin-bottom:-1px;-webkit-mask-image:linear-gradient(90deg,transparent,#000 22%);mask-image:linear-gradient(90deg,transparent,#000 22%)}
.page .card,.profile-overview,.profile-backup,#profile-source {background-color:var(--surface);border-color:var(--line)}
.page .card{border-radius:10px;box-shadow:0 2px 0 var(--line)}
.page .profile-overview{background:var(--surface);border:1px solid var(--line)}
.page .profile-overview.date-warning{background:#fcf5e9;border-color:#dbc79e;border-left:3px solid #b38a45}
.profile-overview a,.ocr-details summary,.profile-backup summary,#profile-source summary,.profile-backup a{color:var(--primary)}
.profile-overview a:hover,.entry-alternatives button:hover{color:var(--primary-hover)}
.profile-overview p,.profile-next span,p,.muted,.field,.import-card .import-privacy{color:var(--text)}
.profile-drop{position:relative;overflow:hidden;background:var(--surface);
  color:var(--primary);border:1.5px dashed #afc4d4;border-radius:6px;padding:24px 16px;gap:8px}
.profile-drop strong{font:650 23px/1.4 var(--campus-serif);color:var(--ink)}
.profile-drop p{color:var(--muted)}
.profile-drop.dragging{background:var(--primary-soft);outline-color:var(--primary)}
.import-card .import-heading{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.import-card .import-heading:after{content:"";height:3px;border-block:1px solid var(--line);flex:1}
.import-card .import-heading h2{margin:0;font-size:22px}
.entry-alternatives button,#profile-new,.entry-alternatives button:hover{color:var(--primary);background:transparent}
body button,body.handbook button,body .button,body.handbook .button{border-radius:6px;color:var(--text);border-color:var(--line);background:var(--surface)}
body button:hover,body .button:hover{background:var(--surface-2);border-color:var(--primary)}
body button.primary,body.handbook button.primary,body.handbook .button.primary{background:var(--primary);border-color:var(--primary);color:white}
body button.primary:hover,body.handbook button.primary:hover{background:var(--primary-hover);border-color:var(--primary-hover)}
body input,body textarea,body select{background:var(--surface);border-color:var(--line);color:var(--ink)}
body input:focus,body textarea:focus,body select:focus{border-color:var(--primary);box-shadow:0 0 0 3px #2a5c8026}
body input[aria-invalid=true]{border-color:var(--danger)}
body .notice:not(.error),.import-progress,.import-counts span{background:var(--surface);border-color:var(--line);color:var(--text)}
#sections>.card{position:relative;padding-top:30px;margin-block:30px;border-top:2px solid var(--primary);box-shadow:var(--shadow)}
.section-head{gap:12px;flex-wrap:wrap;margin-bottom:16px;align-items:center}
.section-head h2{display:flex;align-items:center;gap:12px;font-size:22px}
.section-number{font:700 14px/1 Georgia,serif;color:var(--primary);background:var(--primary-soft);letter-spacing:.03em;border:1px solid var(--line);border-radius:3px;padding:7px 8px;margin:0}
.section-head>button{margin-left:auto}.archive-status{color:var(--muted);font-size:12px;line-height:1.3}
.archive-status[data-checked=true]{transform:rotate(-6deg);padding:3px 8px;color:#48684f;border:2px double #729478;border-radius:2px;font-family:var(--campus-serif);letter-spacing:.05em}
.record{border-color:var(--line)}.record-check{display:block;margin:18px 0 0 auto;font-size:12px}
.record-check[data-checked=true]{color:#48684f;border-color:#9bae98;background:#f3f6ef}
.empty{background:var(--surface-2);border-color:var(--line);color:var(--muted)}
.profile-backup,#profile-source{border:1px solid var(--line);border-radius:6px;padding:12px 16px}
@media(max-width:900px) and (min-width:701px){#nav a b{display:inline-block;min-width:18px;font-size:11px}#nav a{gap:5px;padding-inline:6px}.page .hero{min-height:215px}}
@media(max-width:700px){
  .page .hero,.book-options .page .hero{display:flex;flex-direction:column;align-items:stretch;min-height:0}
  .page .hero>div{max-width:100%;padding:18px 20px 0}
  .page .hero h1{font-size:31px;margin:5px 0 7px}
  .page .hero p{font-size:13px}
  .page .hero .campus-illustration{width:min(100%,520px);height:auto;max-height:135px;object-fit:fill;align-self:end;margin:-4px -1px -1px 0}
  .sidebar{background:var(--surface-2);border-right:0}
  #nav a b{display:block;min-width:0;font-size:10px}#nav a[aria-current]{box-shadow:inset 0 -2px var(--primary)}
  .section-head h2{font-size:19px;gap:7px}.section-head{gap:8px}.section-head>button{padding:6px 9px}
  #sections>.card{padding-top:22px;margin-block:22px}
}
@media(prefers-reduced-motion:no-preference){.profile-drop,button{transition:background-color .15s ease,border-color .15s ease}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}
#sections>.card .section-number{position:absolute;left:24px;top:-14px;min-width:40px;text-align:center;padding:5px 10px;border-radius:4px 4px 1px 1px;background:var(--primary-soft)}
#sections>.card .section-head h2{margin:0}
@media(max-width:700px){.page .hero .campus-illustration{width:min(100%,460px);max-height:none;object-fit:contain}#sections>.card .section-number{left:16px}}

.page .hero .campus-illustration{filter:saturate(.85)}
.page .profile-overview,.page .profile-overview.date-warning{background:var(--primary-soft);border:1px solid #c9dcea;border-left:4px solid var(--primary);border-radius:12px}
#overview-close{color:var(--muted)}
#profile-drop{background:var(--surface);border-color:#afc4d4}
#profile-drop.dragging{background:var(--surface-2);border-color:var(--primary)}
#profile-drop .archive-tray{color:var(--primary)}
#save:not(.primary){border-color:var(--primary);color:var(--primary)}
#save.primary{color:white;background:var(--primary);border-color:var(--primary)}
body .sidebar-bottom{background:var(--surface-2)}
