* { box-sizing: border-box; }
:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #172836;
  background: #eef3f5;
  line-height: 1.5;
}
body { margin: 0; }
.wrap { max-width: 72rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 3rem); }
.top { background: #163643; color: #fff; padding-block: 1rem; font-weight: 650; }
.top .wrap { display: flex; gap: .75rem; align-items: center; }
.mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .5rem; background: #d6f4e7; color: #163643; font: bold 2rem Georgia, serif; }
.intro { padding-block: clamp(2rem, 6vw, 4.5rem) 2rem; }
h1, h2, p { margin: 0; }
h1 { font: 600 clamp(2.3rem, 6vw, 4.4rem)/1.1 Georgia, serif; letter-spacing: -.04em; }
h2 { font-size: 1.25rem; }
.intro p, .preview > p { margin-top: .6rem; color: #415866; }
.layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; padding-bottom: 2rem; }
.card { min-width: 0; padding: clamp(1rem, 3vw, 2rem); background: #fff; border: 1px solid #c6d7df; border-radius: 1rem; }
form { display: grid; gap: .9rem; margin-top: 1.25rem; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.field { min-width: 0; }
label { display: block; margin-bottom: .25rem; font-size: .95rem; font-weight: 650; }
input, select, button { font: inherit; border-radius: .5rem; }
input, select { width: 100%; padding: .6rem .75rem; color: inherit; border: 1px solid #718a99; background-color: #fff; }
select { appearance: none; padding-right: 2.2rem; background-image: linear-gradient(45deg, transparent 50%, #344d5b 50%), linear-gradient(135deg, #344d5b 50%, transparent 50%); background-position: right 1.25rem center, right .95rem center; background-size: .3rem .3rem; background-repeat: no-repeat; }
button { justify-self: start; font-weight: 650; border: 1px solid #236558; color: #12453b; background: #fff; padding: .65rem 1rem; cursor: pointer; }
button.primary { background: #125447; color: #fff; }
button:enabled:hover { box-shadow: inset 0 0 0 2px currentColor; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #137b69; outline-offset: 3px; }
[aria-invalid="true"] { border-color: #aa2834; }
small { display: block; font-size: .875rem; color: #9b2230; }
small:empty { display: none; }
.preview { background: #f8fcfc; }
.result { background: #e8f3f1; min-height: 7rem; margin-block: 1rem; padding: 1rem; border-radius: .65rem; overflow-wrap: anywhere; white-space: pre-wrap; }
#copy-status:empty { margin: 0; }
@media (max-width: 48rem) { .layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 26rem) { .row { grid-template-columns: minmax(0, 1fr); } }
fieldset { min-width: 0; margin: 0; padding: .85rem; border: 1px solid #c6d7df; border-radius: .65rem; }
legend { padding-inline: .3rem; font-size: .95rem; font-weight: 650; }
.hint { color: #415866; font-size: .875rem; }
input + .hint { display: block; margin-top: .25rem; }
.required, #form-status { color: #9b2230; }
#form-status:empty { display: none; }
.footer { padding-bottom: 2rem; color: #415866; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.session { margin-bottom: 1.25rem; }
.session > p, #project-status, #reference-status { margin-top: .6rem; }
.project-bar { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; margin-top: 1rem; }
.project-bar .field { flex: 1 1 15rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.danger { color: #9b2230; border-color: #9b2230; }
#project-form { padding: 1rem; border: 1px solid #c6d7df; border-radius: .65rem; }
#project-status:empty, #reference-status:empty { display: none; }
.reference-list, .bibliography-list { margin: .8rem 0; padding: 0; list-style: none; overflow-wrap: anywhere; }
.reference-list li, .bibliography-list li { border-top: 1px solid #c6d7df; padding-block: .75rem; }
.reference-list .actions { margin-top: .5rem; }
.reference-list button { padding: .35rem .7rem; }
.bibliography-list:empty { display: none; }
#bibliography-list + .actions { margin-top: .5rem; }
a.button {
  display: inline-block;
  margin-top: .75rem;
  padding: .65rem 1rem;
  border: 1px solid #125447;
  border-radius: .5rem;
  background: #125447;
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}
a.button:hover { box-shadow: inset 0 0 0 2px currentColor; }
.profile, .profile-identity { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.profile { justify-content: space-between; margin-top: .75rem; }
.profile-identity { min-width: 0; }
.profile-identity strong { overflow-wrap: anywhere; }
#profile-avatar, .avatar-fallback { width: 2.5rem; height: 2.5rem; border-radius: 50%; }
#profile-avatar { object-fit: cover; }
.avatar-fallback { display: grid; place-items: center; background: #d6f4e7; color: #163643; font-weight: 700; }
#auth-status { color: #9b2230; }
