@font-face { font-family: "Crimson Pro"; src: url("../fonts/CrimsonPro-Roman.ttf") format("truetype"); font-style: normal; font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Crimson Pro"; src: url("../fonts/CrimsonPro-Italic.ttf") format("truetype"); font-style: italic; font-weight: 200 900; font-display: swap; }
:root { color-scheme: light; --ink: #111; --muted: #626262; --rule: #d8d8d8; --serif: "Crimson Pro", Georgia, serif; --sidebar: 15rem; font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: var(--ink); background: #fff; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.55; }
::selection { background: #ddd; color: #000; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; border: 1px solid #a2a2a2; border-radius: 0; background: #fff; padding: .55rem .8rem; min-height: 2.6rem; }
button { cursor: pointer; line-height: 1.3; }
button:hover { background: #f2f2f2; border-color: var(--ink); }
button:disabled { color: #777; border-color: var(--rule); cursor: default; }
button[aria-pressed="true"], .primary-button, #save-now { color: #fff; background: var(--ink); border-color: var(--ink); }
.primary-button:hover, #save-now:hover { background: #333; }
input, select, textarea { max-width: 100%; min-width: 0; }
textarea { width: 100%; min-height: 7rem; resize: vertical; }
input[type="checkbox"] { accent-color: #111; }
:focus-visible { outline: 2px solid #111; outline-offset: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.5rem, 3.3vw, 3.6rem); margin: 0 0 .6rem; letter-spacing: -.025em; }
h2 { font-size: 2rem; margin: 0 0 1rem; }
h3 { font-size: 1.6rem; }
p { margin: .6rem 0 1.25rem; }
.eyebrow, label, legend { font-size: .85rem; font-weight: 500; }
.eyebrow { color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem; }
.muted, main > h1 + p, .document-type { color: var(--muted); }
.skip-link { position: fixed; top: -6rem; left: 1rem; background: #fff; padding: 1rem; z-index: 10; }
.skip-link:focus { top: 1rem; }
.workspace-bar { height: 4rem; border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 1.5rem; padding: 0 1.5rem; font-size: .8rem; }
.workspace-bar span { color: var(--muted); }
.workspace-bar button { min-height: 2rem; padding: .35rem .6rem; font-size: .8rem; }
.sidebar { position: fixed; top: 4rem; bottom: 0; width: var(--sidebar); border-right: 1px solid var(--rule); padding: 2.5rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 3rem; overflow-y: auto; background: white; }
.identity { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; }
.identity span { display: block; font: .75rem/1.5 Arial, sans-serif; color: var(--muted); margin-top: .7rem; }
.sidebar nav { display: grid; gap: .4rem; }
.sidebar nav a { text-decoration: none; padding: .5rem 0; font-size: .9rem; }
.sidebar nav a[aria-current] { text-decoration: underline; text-underline-offset: .45em; }
.sidebar nav a:hover { text-decoration: underline; }
.sidebar form { margin-top: auto; }
.quiet-button { border-color: transparent; padding-inline: 0; font-size: .85rem; }
.workspace-content { margin-left: var(--sidebar); }
.navigation-collapsed .workspace-content { margin-left: 0; }
main { max-width: 90rem; margin: 0 auto; padding: 3.5rem clamp(1.5rem, 4vw, 5rem) 5rem; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 1rem; padding-block: 1.4rem; border-block: 1px solid var(--rule); }
.filters .field { margin: 0; flex: 1; min-width: 9rem; }
.filters .search-field { flex: 2; }
.document-list { list-style: none; padding: 0; margin: 0 0 3rem; }
.document-list > li { display: flex; gap: 2rem; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--rule); padding: 1.4rem 0; }
.document-title { display: block; font: 400 1.75rem/1.2 var(--serif); overflow-wrap: anywhere; }
.document-title a { text-decoration: none; }
.document-title a:hover { text-decoration: underline; }
.document-type { display: block; font-size: .8rem; margin-top: .4rem; }
.document-list form { flex-shrink: 0; }
.create-section { border-top: 1px solid var(--ink); padding-top: 1.5rem; }
.create-form { display: flex; align-items: end; flex-wrap: wrap; gap: 1rem; }
.create-form .field { flex: 1; min-width: 12rem; }
.field { display: grid; gap: .4rem; margin: 1rem 0; min-width: 0; }
.field:not(.wide) { max-width: 28rem; }
.field.wide { max-width: none; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: 1rem; }
fieldset { min-width: 0; margin: 2rem 0; padding: 1.5rem; border: 1px solid var(--rule); }
legend { padding: 0 .5rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .3rem; padding: .75rem 0; border-block: 1px solid var(--rule); margin: 1.5rem 0 0; }
.toolbar button { font-size: .8rem; min-height: 2.2rem; padding: .4rem .6rem; border-color: transparent; }
.toolbar button:hover { border-color: #aaa; }
.editor { padding: 2.5rem 0; min-height: 30rem; }
.editor .ProseMirror { font: 400 1.5rem/1.65 var(--serif); max-width: 65ch; margin: 0 auto; min-height: 25rem; overflow-wrap: anywhere; }
.editor .ProseMirror:focus { outline: none; }
.editor:focus-within { border-bottom: 1px solid #111; }
.ProseMirror h1 { font-size: 2.2rem; }
.ProseMirror h2 { font-size: 1.9rem; }
.ProseMirror h3 { font-size: 1.6rem; }
.ProseMirror p { margin: 0 0 1em; }
.save-controls { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 0; border-block: 1px solid var(--rule); margin: 1rem 0 2rem; }
#save-status, #history-message { font-size: .85rem; color: var(--muted); }
.notice, [role="alert"]:not(:empty) { padding: 1rem 1.25rem; border: 1px solid var(--ink); border-left-width: 3px; margin-block: 1.5rem; }
.notice h2 { font-size: 1.6rem; }
#validation-status:empty { display: none; }
[aria-invalid="true"] { border: 2px solid #111; }
.field-error-message { display: block; font-weight: 600; font-size: .85rem; }
.repeatable h2 { font: 500 .9rem/1.5 Arial, sans-serif; }
.repeatable-row, .row-controls { display: flex; align-items: end; gap: .5rem; margin-block: .75rem; flex-wrap: wrap; }
.repeatable-row .field { flex: 1; margin: 0; }
.item-card { margin: 1.5rem 0; padding: 1.25rem; border: 1px solid var(--rule); }
.item-card h3 { margin-top: 0; }
.building-card { border-top-color: #111; }
.building-navigation { display: flex; align-items: end; gap: 1rem; margin-top: 2rem; border-bottom: 1px solid var(--rule); }
.building-navigation > button { flex-shrink: 0; margin-bottom: .5rem; }
.building-tabs { display: flex; flex: 1; min-width: 0; overflow-x: auto; padding: .35rem .25rem 0; }
.building-tabs [role="tab"] { flex: 0 0 auto; max-width: 24rem; overflow-wrap: anywhere; padding: .8rem 1rem; background: white; border: 0; border-bottom: 2px solid transparent; text-align: left; }
.building-tabs [aria-selected="true"] { border-bottom-color: var(--ink); }
.building-tabs [role="tab"]:hover { background: #f2f2f2; }
.building-tabs [role="tab"]:focus-visible { outline-offset: -4px; }
.building-tabs .has-errors { font-weight: 600; }
#register-empty { padding-block: 2rem; }
.section-title-field { margin-top: 0; }
.section-title-field input { font: 400 2rem/1.2 var(--serif); border-color: var(--rule); padding: .5rem .65rem; width: 100%; }
.floor-card > .section-title-field input { font-size: 1.6rem; }
.section-title-field input::placeholder { color: var(--muted); opacity: 1; }
.section-title-field input:hover, .section-title-field input:focus { border-color: var(--ink); }
.floor-card, .residents { margin-left: 1rem; }
.checkbox-field { display: flex; align-items: center; gap: .6rem; margin-block: .75rem; }
.checkbox-field input { min-height: 0; inline-size: 1.15rem; block-size: 1.15rem; }
#selected-buildings li, #history-list li { margin-block: .75rem; }
.inline-controls { display: inline-flex; gap: .4rem; margin-left: 1rem; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; }
.manuscript { max-width: 55rem; width: 100%; margin-inline: auto; min-width: 0; }
.preview-controls { display: flex; justify-content: flex-end; margin-bottom: 1.5rem; }
.pdf-panel { border-top: 1px solid var(--rule); padding-top: 1.5rem; min-width: 0; }
.pdf-panel p { font-size: .85rem; color: var(--muted); }
.pdf-panel iframe { width: 100%; height: 72vh; min-height: 30rem; border: 1px solid var(--rule); background: #fff; }
#pdf-status[data-state="error"], #pdf-status[data-state="stale"] { color: #111; font-weight: 600; border-left: 2px solid #111; padding-left: .75rem; }
section[aria-labelledby="history-heading"] { margin-top: 2.5rem; }
.login-page .workspace-content { margin: 0; }
.login-page main { max-width: 32rem; padding-top: 12vh; }
.login-page .identity { border-bottom: 1px solid var(--rule); padding-bottom: 2rem; margin-bottom: 3rem; }
.login-page form { display: grid; gap: .8rem; margin-top: 2rem; }
.login-page button { margin-top: .8rem; }
@media (min-width: 78rem) {
  .preview-open .editor-layout { grid-template-columns: minmax(0, 1fr) minmax(24rem, .9fr); }
  .preview-open .pdf-panel { border-top: 0; border-left: 1px solid var(--rule); padding: 0 0 0 2rem; position: sticky; top: 2rem; align-self: start; }
}
@media (max-width: 52rem) {
  .building-navigation { flex-wrap: wrap; }
  .building-tabs { flex-basis: 100%; }
  .sidebar { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--rule); gap: 1rem; padding: 1.5rem; }
  .sidebar form { margin-top: 0; }
  .workspace-content { margin-left: 0; }
  main { padding: 2rem 1.25rem 3rem; }
  .page-heading { align-items: start; flex-direction: column; gap: 1rem; }
  .document-list > li { gap: 1rem; flex-wrap: wrap; }
  .floor-card, .residents { margin-left: 0; }
  .item-card, fieldset { padding: 1rem; }
  .inline-controls { display: flex; margin: .5rem 0 0; flex-wrap: wrap; }
  .editor .ProseMirror { font-size: 1.4rem; }
  .workspace-bar { padding-inline: 1rem; gap: 1rem; }
}
