:root {
  color-scheme: light;
  font: 14px/1.45 system-ui, sans-serif;
  color: #141a24;
  background: #fdfdfd;
  --line: #dce4ee;
  --surface: #f5f6f9;
  --blue: #387cf1;
  --muted: #546782;
  --content-width: 768px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }

.masthead {
  background: #fff;
  border-bottom: 1px solid #e3e7ed;
  box-shadow: 0 2px 5px #18283a26;
}

.masthead-inner,
main { width: min(var(--content-width), calc(100% - 32px)); margin-inline: auto; }

.masthead-inner {
  display: flex;
  align-items: center;
  min-height: 80px;
  gap: 12px;
  color: #202c40;
  font-size: 20px;
}

.mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #cfe0fc;
  background: #eaf2ff;
  color: #215ebf;
  font-size: 28px;
}

.connection {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 50%;
  background: #8d9caf;
}

.connection[data-state="online"] { background: #2f8969; }
.connection[data-state="unavailable"] { background: #b83240; }
#discard { color: var(--muted); font-size: 20px; }

main { margin-block: clamp(32px, 6vw, 75px) 56px; }
fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
.address { display: grid; gap: 26px; }
.line label { display: block; margin-bottom: 10px; font-weight: 500; }

.line input,
.editor {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
}

.line input {
  height: 50px;
  padding-inline: 12px;
  font: inherit;
  box-shadow: 0 1px 2px #18283a10;
}

.field-note { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }

button {
  font: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
}

button:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding-inline: 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 650;
  box-shadow: 0 1px 3px #162a3726;
}

.primary:hover:not(:disabled) { background: #2968d3; }
.attachment-area { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
#attach { width: min(300px, 100%); }

.tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 56px 0 16px; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; font-size: 16px; }
.tools .icon-button { border-color: var(--line); }
.icon-button:hover { background: #eaf1fc; }

.editor {
  min-height: 206px;
  padding: 12px;
  overflow-wrap: anywhere;
  font: 16px/1.45 Georgia, serif;
}

.editor[aria-disabled="true"] { opacity: .7; }
.actions { display: flex; justify-content: flex-end; margin-top: 40px; }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.files li { display: flex; align-items: center; max-width: 100%; gap: 4px; padding-left: 8px; background: var(--surface); border-radius: 6px; }
.files span { overflow-wrap: anywhere; }
.files button { padding: 4px 8px; }
.files button:hover { background: #eaf1fc; }
#status { margin: 12px 0 0; color: #21634f; }
#status:empty { margin: 0; }
#status[data-error] { color: #a12532; }

.sign-out { padding: 6px 10px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.sign-out:hover { background: #eaf1fc; }

.login { max-width: 400px; }
.login h1 { margin: 0 0 24px; font-size: 26px; }
.login form { display: grid; gap: 20px; }
.login-error { margin: 0 0 20px; color: #a12532; }
