/* heckenpad's one stylesheet: the Satz tokens it uses (owner: tinymedia-2.0/editor/src/lib/styles/tokens.css,
   copied by value) and the rules the pages need: page frame, lists, forms, notices, editor bar, save status, rescue
   notice. */
.app {
  color-scheme: light dark;
  --paper: light-dark(#eff1f5, #2e3440);
  --surface: light-dark(#ffffff, #3b4252);
  --ink: light-dark(#2e3440, #eceff4);
  --muted: light-dark(#4c566a, #b4bccb);
  --line: light-dark(#c4cbd6, #4c566a);
  --accent: #1f5a97;
  --accent-ink: #ffffff;
  --signal: #ebcb8b;
  --signal-ink: #2e3440;
  --ok: light-dark(#2f6b3a, #a3be8c);
  --danger: light-dark(#b0362d, #f2a79e);
  --danger-soft: light-dark(#f6e1de, #4a3236);
  --focus-color: light-dark(#1f5a97, #ebcb8b);
  --sans: 'Helvetica Neue', Helvetica, Arial, Roboto, 'Liberation Sans', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --small: 14px; --body: 16px; --title: 32px;
  --bold: 700; --leading: 1.5;
  --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px;
  --radius: 2px; --hairline: 1px; --focus: 3px; --focus-offset: 2px; --target: 44px;
  --form-width: 720px; --main-width: 1040px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--body) / var(--leading) var(--sans); }
a { color: inherit; }
:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: var(--focus-offset); }

button {
  min-height: var(--target); padding: 0 var(--s4); border: 0; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: var(--bold); cursor: pointer;
}

button.quiet { background: transparent; color: var(--ink); border: var(--hairline) solid var(--line); font-weight: normal; }
a.button {
  display: inline-flex; align-items: center; min-height: var(--target); padding: 0 var(--s4); border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font-weight: var(--bold); text-decoration: none;
}
input[type='search'] {
  min-height: var(--target); padding: 0 var(--s3); border: var(--hairline) solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: inherit;
}

.page { max-width: var(--form-width); margin: 0 auto; padding: var(--s6) var(--s4); }
.page h1 { font-size: var(--title); line-height: 1.1; margin: 0 0 var(--s4); }
.page h2 { font-size: var(--body); margin: var(--s8) 0 var(--s2); }
.who { display: flex; align-items: center; gap: var(--s2); margin: 0; }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s4) 0; }
.filter input { flex: 1; }
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s2) 0; border-bottom: var(--hairline) solid var(--line); }
.meta, .empty { color: var(--muted); font-size: var(--small); }
fieldset { border: 0; margin: 0 0 var(--s4); padding: 0; }
legend { font-weight: var(--bold); margin-bottom: var(--s2); }
.option { display: block; padding: var(--s2) 0; }
.done { color: var(--ok); font-weight: var(--bold); }
.danger { margin-top: var(--s8); padding-top: var(--s4); border-top: var(--hairline) solid var(--line); }
.danger button { background: var(--danger); }

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  max-width: var(--main-width); margin: 0 auto; padding: var(--s2) var(--s4); border-bottom: var(--hairline) solid var(--line);
}
.home { font-weight: var(--bold); text-decoration: none; }

/* The save status: green = saved, yellow = waiting for the server, red = not connected. */
.status { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: var(--small); color: var(--muted); white-space: nowrap; }
.status::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.status[data-state='saved']::before { background: var(--ok); }
.status[data-state='saving']::before { background: var(--signal); }
.status[data-state='offline'] { color: var(--danger); font-weight: var(--bold); }
.status[data-state='offline']::before { background: var(--danger); }
.status[data-state='readOnly']::before { background: var(--muted); }

.rescue {
  max-width: var(--main-width); margin: var(--s3) auto 0; padding: var(--s3) var(--s4);
  background: var(--danger-soft); border-left: var(--focus) solid var(--danger);
}
.rescue p { margin: 0 0 var(--s2); }
.rescue p:last-child { margin: 0; display: flex; gap: var(--s2); flex-wrap: wrap; }

.editor { max-width: var(--main-width); margin: 0 auto; padding: var(--s4); }
.editor .cm-editor { min-height: 70vh; background: var(--surface); border: var(--hairline) solid var(--line); border-radius: var(--radius); }
.editor .cm-editor.cm-focused { outline: var(--focus) solid var(--focus-color); outline-offset: var(--focus-offset); }
.editor .cm-content { font-family: var(--mono); font-size: var(--body); padding: var(--s4) 0; caret-color: var(--ink); }
.editor .cm-line { padding: 0 var(--s4); }
