:root {
  color-scheme: light;
  --ink: #342a2b;
  --muted: #685b5b;
  --paper: #fbfafa;
  --tint: #f3edec;
  --accent: #784652;
  --line: #cdbfbe;
  --serif: 'Bodoni Moda', 'Bodoni 72', Didot, Georgia, serif;
  font: 16px/1.5 'Jost', 'Avenir Next', Avenir, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  accent-color: var(--accent);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
::selection { color: #342a2b; background: #f4d6d8; }
:focus-visible { outline: 3px solid #854c57; outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 1; background: white; color: var(--ink); padding: .6rem; }
.skip:focus { top: .5rem; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: 1rem clamp(1.15rem, 6vw, 6rem); border-bottom: 1px solid var(--line); }
.wordmark { display: block; width: clamp(7rem, 15vw, 11rem); height: 3rem; object-fit: contain; object-position: left; }
.top-actions, .languages, .actions, .editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.languages { gap: .1rem; }
button, input, textarea, select { font: inherit; }
button { min-height: 2.75rem; cursor: pointer; color: inherit; }
button:disabled { opacity: .55; cursor: default; }
.languages button, .sections button, .quiet { background: transparent; border: 0; padding: .5rem .65rem; }
.languages button { font-size: .79rem; letter-spacing: .08em; color: var(--muted); }
.languages [aria-pressed="true"], .quiet:hover { text-decoration: underline; text-underline-offset: .35rem; }
.languages [aria-pressed="true"] { font-weight: 700; color: var(--ink); }
main { width: min(74rem, 100%); margin: 0 auto; padding: clamp(1.5rem, 5vw, 4.5rem) clamp(1.15rem, 6vw, 5rem) 4rem; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(2.6rem, 6vw, 4.25rem); letter-spacing: -.035em; line-height: 1.08; overflow-wrap: anywhere; }
.gate { max-width: 27rem; margin: clamp(1.5rem, 7vh, 5rem) auto 0; }
.intro { color: var(--muted); margin: .9rem 0 2rem; }
.login-form, .editor fieldset, .form-pair { display: grid; gap: 1.1rem; }
label { display: grid; gap: .36rem; font-size: .94rem; font-weight: 550; }
input, textarea, select { width: 100%; color: var(--ink); background: white; border: 1px solid #a79898; border-radius: .2rem; padding: .66rem .76rem; font-size: 1rem; font-weight: 400; }
textarea { min-height: 6rem; resize: vertical; }
select { min-height: 2.9rem; }
.primary, .secondary, .danger { border: 1px solid var(--ink); border-radius: .18rem; padding: .56rem 1rem; font-weight: 550; }
.primary { color: white; background: var(--ink); }
.secondary, .danger { color: var(--ink); background: transparent; }
.primary:hover:enabled { background: #63414a; }
.secondary:hover:enabled, .danger:hover:enabled { background: var(--tint); }
.danger { color: #863842; border-color: #a56a70; margin-left: auto; }
.login-form .primary { margin-top: .25rem; }
.recovery-link { justify-self: center; color: var(--accent); text-decoration: underline; text-underline-offset: .22em; }
.sections { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.sections button { padding: .5rem .05rem; border-bottom: 2px solid transparent; color: var(--muted); }
.sections [aria-current="page"] { color: var(--ink); border-color: var(--accent); font-weight: 650; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.records { border-top: 1px solid var(--line); }
.record { border-bottom: 1px solid var(--line); padding: 1rem .1rem; overflow-wrap: anywhere; }
.record summary { cursor: pointer; }
.record summary::marker { color: var(--accent); }
.record-title { font-weight: 600; }
.meta { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.summary-meta { display: block; margin: .25rem 0 0 1.1rem; }
.details { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: .45rem 1rem; padding: 1rem 0 .25rem; margin: 0; font-size: .95rem; }
dt { color: var(--muted); }
dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.place-record { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.place-record h2 { font-size: 1.55rem; line-height: 1.2; margin-bottom: .3rem; }
.empty { padding-block: 2.5rem; color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1.25rem; font-size: .9rem; }
.editor h1 { margin-bottom: 2rem; }
.editor fieldset { border: 0; min-width: 0; margin: 0; padding: 0; }
.editor .translations, .form-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.editor .translations { margin-block: .6rem; }
.editor .copy-group, .editor .publication { border-top: 1px solid var(--line); }
.editor .copy-group legend, .editor .publication legend { font: 1.45rem var(--serif); padding: 0 .6rem 0 0; margin-bottom: .9rem; }
.editor .publication { margin-block: .9rem; gap: .75rem; }
.publication select { max-width: 20rem; }
.checkbox { display: flex; align-items: start; gap: .55rem; }
.checkbox input { width: 1.15rem; height: 1.15rem; flex: none; margin: .2rem 0 0; }
.hint { color: var(--muted); font-size: .9rem; }
.photo-upload { display: grid; gap: .45rem; }
.photo-upload input { min-width: 0; }
.photo-upload button { justify-self: start; }
#photo-feedback:empty { display: none; }
#photo-feedback { color: var(--accent); }
.editor-actions { border-top: 1px solid var(--line); padding-top: 1.1rem; }
#feedback { max-width: 55rem; color: var(--accent); margin: 1rem auto 0; overflow-wrap: anywhere; }
body:has(#workspace[hidden]) #feedback { max-width: 27rem; }
#feedback[data-kind="error"] { color: #87373f; font-weight: 550; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 640px) {
  .masthead { padding-block: .65rem; }
  .top-actions, .actions { gap: .3rem; }
  .sections { margin-bottom: 1.5rem; }
  .editor .translations, .form-pair { grid-template-columns: minmax(0, 1fr); }
  .details { grid-template-columns: 1fr; gap: .1rem; }
  .details dd { margin-bottom: .55rem; }
}

#cms .section-head h1 { margin: 0; }
#cms .cms-array { display: grid; gap: .75rem; }
#cms .cms-array > legend { font: 1.12rem var(--serif); }
#cms .cms-array > button, #cms .cms-repeat > button { justify-self: start; }
#cms .cms-repeat { padding: .8rem 1rem; border-left: 2px solid var(--line); background: var(--tint); }
#cms .cms-repeat > legend { font: .9rem var(--sans, sans-serif); }
#cms .copy-group + .publication { margin-top: 1rem; }
#cms .cms-preview { display: grid; gap: .9rem; margin-top: 1.2rem; max-width: 46rem; }
#cms .cms-preview img { width: 100%; max-height: 20rem; object-fit: cover; }
#cms .cms-preview p { white-space: pre-line; }
#cms .photo-upload { border-top: 1px solid var(--line); padding-block: .8rem; }
#cms input[readonly] { background: var(--tint); }
