/* The ELARA website editor. Plain and readable: the site's colours, system fonts, large boxes,
   and the Save button always in reach. */

:root {
  --ink: #302546;
  --body: #58527b;
  --soft: #f5f0fd;
  --line: #ddd5ee;
  --pink: #c2185b;
  --ok: #1f7a4d;
  --bad: #b3261e;
  --radius: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
}

h1, h2, legend { color: var(--ink); line-height: 1.25; }
h1 { font-size: 1.9rem; margin: 0.3em 0 0.4em; }
h2 { font-size: 1.25rem; margin: 0 0 0.6em; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--soft);
}
.bar .home { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.bar .who { display: inline-flex; align-items: center; gap: 12px; }
.bar form { margin: 0; }

main { max-width: 860px; margin: 0 auto; padding: 16px 20px 120px; }
.lede { font-size: 1.1rem; }
.crumbs { margin: 8px 0 0; }

.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 18px 0; }
.card.narrow { max-width: 520px; margin: 40px auto; }

.files { list-style: none; margin: 0; padding: 0; }
.files li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.files li:first-child { border-top: 0; }
.files a { font-weight: 600; font-size: 1.05rem; }
.when { font-size: 0.9rem; }

button {
  font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); padding: 6px 12px;
}
button.primary { background: var(--ink); color: #fff; border-color: var(--ink); padding: 10px 22px; font-weight: 600; }
button.secondary { padding: 10px 18px; font-weight: 600; }
button.link { border: 0; background: none; padding: 0; text-decoration: underline; }
button:disabled { opacity: 0.6; cursor: default; }

.status { min-height: 1.5em; font-weight: 600; }
.help { margin: 2px 0 6px; font-size: 0.9rem; }

.notice { border-radius: var(--radius); padding: 12px 16px; margin: 14px 0; background: var(--soft); border: 1px solid var(--line); }
.notice.ok { border-color: var(--ok); background: #eaf6ef; }
.notice.bad { border-color: var(--bad); background: #fdecea; }
.notice ul { margin: 6px 0 0; padding-left: 1.2em; }

.note { background: var(--soft); border-left: 4px solid var(--ink); padding: 10px 14px; margin: 12px 0 18px; font-size: 0.95rem; }

fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 18px 0; padding: 12px 16px 6px; min-width: 0; }
fieldset.depth-0 > legend { font-size: 1.15rem; font-weight: 700; padding: 0 6px; }
fieldset legend { font-weight: 700; padding: 0 6px; }

.field { margin: 0 0 14px; }
.field label, .field .label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.req { font-weight: 400; font-size: 0.85rem; color: var(--body); }
input[type="text"], input[type="number"], textarea, select {
  width: 100%; font: inherit; color: var(--ink); border: 1px solid #b9b0d0; border-radius: 8px; padding: 8px 10px; background: #fff;
}
textarea { resize: vertical; }
.field.readonly p:not(.help) { margin: 0; padding: 6px 10px; background: var(--soft); border-radius: 8px; color: var(--ink); }

.list > .item { border-top: 1px dashed var(--line); padding: 10px 0 2px; }
.list > .item:first-of-type { border-top: 0; }
.item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.item-name { font-weight: 600; color: var(--ink); }
.item-buttons { display: inline-flex; gap: 6px; }
button.add { margin: 4px 0 12px; }

.actions {
  position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap;
  padding: 12px 0; background: linear-gradient(to top, #fff 75%, rgba(255, 255, 255, 0));
}

.history ul { list-style: none; padding: 0; margin: 0; font-size: 0.92rem; }
.history li { padding: 6px 0; border-top: 1px solid var(--line); }
.history .msg { color: var(--body); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  main { padding: 12px 16px 120px; }
  .actions { justify-content: stretch; }
  .actions button { flex: 1; }
}
